Dashboard-list interface Function modification 13/90213/3
authorcyuamber <xuranyjy@chinamobile.com>
Thu, 20 Jun 2019 02:41:14 +0000 (10:41 +0800)
committerxu ran <xuranyjy@chinamobile.com>
Thu, 20 Jun 2019 10:02:14 +0000 (10:02 +0000)
Change-Id: I00f3c5511dc35ff697a0983e8e297a6fcdd505fa
Issue-ID: DCAEGEN2-1624
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
components/datalake-handler/admin/src/src/app/dashboard-setting/dashboard-list/create-dashboard/create-dashboard.component.html
components/datalake-handler/admin/src/src/app/dashboard-setting/dashboard-list/create-dashboard/create-dashboard.component.ts
components/datalake-handler/admin/src/src/app/dashboard-setting/dashboard-list/dashboard-list.component.ts
components/datalake-handler/admin/src/src/styles.css

index 8996fce..5fdc45a 100644 (file)
@@ -21,6 +21,7 @@
         <div class="col-md-12">
           <label class="dl-h3" *ngIf="this.tempDb.name==undefined">{{ "NewDashboard" | translate}}</label>
           <label class="dl-h3" style="letter-spacing: 0" *ngIf="this.tempDb.name!=undefined">{{this.tempDb.name}}</label>
+          <i class="fas fa-plus fa-2x close-btn-icon" (click)="activeModal.close('Close click')"></i>
         </div>
       </div>
 
@@ -52,7 +53,7 @@
           <div class="col-md-3"><label class="dl-emphasis1" for="inputHost">{{ "HOST" | translate}}</label></div>
           <div class="col-md-4">
             <input [(ngModel)]="this.tempDb.host" class="form-control dl-input-text" id="inputHost" type="text"
-                   placeholder="{{ 'InputValue' | translate}}" [disabled]="!this.tempDb.enabled" [attr.disabled]='!this.tempDb.enabled?true:undefined'>
+                   placeholder="{{ 'InputValue' | translate}}" >
           </div>
         </div>
       </div>
@@ -62,7 +63,7 @@
           <div class="col-md-3"><label class="dl-emphasis1" for="inputPort">{{ "PORT" | translate}}</label></div>
           <div class="col-md-3">
             <input [(ngModel)]="this.tempDb.port" class="form-control dl-input-text" id="inputPort" type="text"
-                   placeholder="{{ 'InputValue' | translate}}" (input)="this.adminService.onKeyPressNumber($event)" [disabled]="!this.tempDb.enabled" [attr.disabled]='!this.tempDb.enabled?true:undefined'>
+                   placeholder="{{ 'InputValue' | translate}}" (input)="this.adminService.onKeyPressNumber($event)" >
           </div>
         </div>
       </div>
                                        for="inputUserName">{{ "AUTHENTICATION" | translate}}</label></div>
           <div class="col-sm-4">
             <input [(ngModel)]="this.tempDb.login" class="form-control dl-input-text" id="inputUserName" type="text"
-                   placeholder="{{ 'Username' | translate}}" [disabled]="!this.tempDb.enabled" [attr.disabled]='!this.tempDb.enabled?true:undefined'>
+                   placeholder="{{ 'Username' | translate}}" >
           </div>
           <div class="col-sm-4">
             <input [(ngModel)]="this.tempDb.pass" class="form-control dl-input-text" id="inputPass" type="password"
-                   placeholder=" {{ 'Password' | translate}}" [disabled]="!this.tempDb.enabled" [attr.disabled]='!this.tempDb.enabled?true:undefined'>
+                   placeholder=" {{ 'Password' | translate}}" >
           </div>
         </div>
       </div>
index 4a865f2..991826c 100644 (file)
@@ -65,7 +65,7 @@ export class CreateDashboardComponent implements OnInit {
 
 
   passBack() {
-    if(this.tempDb.host == '' || this.tempDb.host == undefined){
+    if(this.tempDb.host == null && this.tempDb.port == null && this.tempDb.login == null && this.tempDb.pass == null){
       return false;
     }
     this.dashboard = this.tempDb;
index 97bda85..8bb4126 100644 (file)
@@ -56,7 +56,14 @@ export class DashboardListComponent implements OnInit {
   ) {
     // Set page title
     this.adminService.setTitle("SIDEBAR.DASHBOARDLIST");
-    // this.getName();
+    this.initList();
+
+  }
+
+  ngOnInit() {
+    this.spinner.show();
+  }
+  initList(){
     this.initData().then(data => {
       this.initDbsList(this.dbList).then(data => {
         this.dbs = data;
@@ -65,11 +72,6 @@ export class DashboardListComponent implements OnInit {
     });
   }
 
-  ngOnInit() {
-    this.spinner.show();
-  }
-
-
   async initData() {
     this.dbList = [];
     this.dbList = await this.getDbList();
@@ -124,7 +126,7 @@ export class DashboardListComponent implements OnInit {
           res => {
             console.log(res);
             if (res.statusCode == 200) {
-              this.initData();
+              this.initList();
               this.notificationService.success("SUCCESSFULLY_UPDATED");
             } else {
               this.notificationService.error("FAILED_UPDATED");
@@ -141,7 +143,7 @@ export class DashboardListComponent implements OnInit {
           res => {
             console.log(res);
             if (res.statusCode == 200) {
-              this.initData();
+              this.initList();
               this.notificationService.success("SUCCESSFULLY_DELETED");
             } else {
               this.dbs[thisIndex].enabled = true;
index 33af86d..9feefc9 100644 (file)
@@ -370,8 +370,8 @@ hr {
 
 .dl-input-text:disabled,
 .dl-input-text[readonly] {
-  background-color: #ffffff;
-  opacity: 1;
+  background-color: rgba(233, 236, 239, 0.5);
+  /*opacity: 1;*/
 }
 
 .input-group-text {
@@ -618,3 +618,16 @@ ngb-modal-window.templatess .modal-dialog-centered {
 .falsecheck{
   color:#BDBEC0
 }
+input::-webkit-input-placeholder{
+color:#313032!important;
+}
+:-moz-placeholder{
+  color: #313032 !important;
+}
+::-moz-placeholder{
+  color: #313032 !important;
+}
+:-ms-input-placeholder{
+  color: #313032 !important;
+}
+