fix db and tools ui
Optimized page display and fixed bugs of tools created.
Solved the problem of create db or tool failure.
Change-Id: If8eb0596876835baa36c1f9f82ac1a166e4494e3
Issue-ID: DCAEGEN2-1877
Signed-off-by: ZhangZihao <zhangzihao@chinamobile.com>
diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/database-list.component.html b/components/datalake-handler/admin/src/src/app/views/database/database-list/database-list.component.html
index ca33d91..db75f71 100644
--- a/components/datalake-handler/admin/src/src/app/views/database/database-list/database-list.component.html
+++ b/components/datalake-handler/admin/src/src/app/views/database/database-list/database-list.component.html
@@ -32,9 +32,7 @@
<!-- button -->
<div class="p-1">
- <button class="btn dl-btn-dark" (click)="newDbModal();">
- {{ "NEW_DB" | translate }}
- </button>
+ <app-button [text]="'plus'" [style]="'inlineicon'" [color]="'dark'" (click)="newDbModal()"></app-button>
</div>
</div>
</div>
diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/couchbase/couchbase.component.html b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/couchbase/couchbase.component.html
index b58b6d2..0eb6736 100644
--- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/couchbase/couchbase.component.html
+++ b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/couchbase/couchbase.component.html
@@ -61,7 +61,7 @@
<label class="dl-emphasis1" >{{ 'HOST' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.dbInput.host" class="form-control dl-input-text input_style" type="text" placeholder="0.0.0.0" required="required" />
+ <input [(ngModel)]="this.dbInput.host" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
</div>
</div>
@@ -70,7 +70,7 @@
<label class="dl-emphasis1" >{{ 'PORT' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.dbInput.port" class="form-control dl-input-text input_style" type="text" placeholder="0.0.0.0" required="required" />
+ <input [(ngModel)]="this.dbInput.port" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
</div>
</div>
</div>
@@ -81,7 +81,7 @@
<label class="dl-emphasis1" >{{ 'Username' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.dbInput.login" class="form-control dl-input-text input_style" type="text" placeholder="login" required="required" />
+ <input [(ngModel)]="this.dbInput.login" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
</div>
</div>
@@ -90,7 +90,7 @@
<label class="dl-emphasis1" >{{ 'Password' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.dbInput.pass" class="form-control dl-input-text input_style" type="text" placeholder="pass" required="required" />
+ <input [(ngModel)]="this.dbInput.pass" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
</div>
</div>
</div>
@@ -116,12 +116,23 @@
<label class="dl-emphasis1" >{{ 'DB_TYPE' | translate }}</label>
</div>
<div>
- <select #d_dbTypeId class="custom-select dl-input-text input_style" >
+ <select #d_dbTypeId class="custom-select dl-input-text input_style" disabled>
<option *ngFor="let item of this.dbTypeIdList" [selected]="item == this.defaultDbType">{{ item }}</option>
</select>
</div>
</div>
</div>
+
+ <div class="form-group row row-wrapper">
+ <div class="row-half-item usual-item">
+ <div>
+ <label class="dl-emphasis1" >{{ 'DATABASE' | translate }}</label>
+ </div>
+ <div>
+ <input [(ngModel)]="this.dbInput.database" class="form-control dl-input-text input_style" type="text" required="required" />
+ </div>
+ </div>
+ </div>
</div>
</div>
diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/couchbase/couchbase.component.ts b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/couchbase/couchbase.component.ts
index be3b251..5c347ad 100644
--- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/couchbase/couchbase.component.ts
+++ b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/couchbase/couchbase.component.ts
@@ -43,7 +43,7 @@
@Input() db: Db;
@Input() dbList_length;
dbInput: Db;
- dbTypeIdList: Array<string> = ["CB", "DRUID", "ES", "HDFS", "MONGO"];
+ dbTypeIdList: Array<string> = ["CB"];
@ViewChild("d_dbTypeId") d_dbTypeId: ElementRef;
defaultDbType: string;
@@ -75,7 +75,7 @@
} else {
this.dbInput = this.editDb;
- this.dbInputTitle = "Edit " + this.editDb.name;
+ this.dbInputTitle = "Edit" + "-" + this.editDb.dbTypeId + "-" + this.editDb.name;
this.defaultDbType = this.dbInput.dbTypeId;
console.log("edit db");
}
diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/druid/druid.component.html b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/druid/druid.component.html
index b58b6d2..0eb6736 100644
--- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/druid/druid.component.html
+++ b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/druid/druid.component.html
@@ -61,7 +61,7 @@
<label class="dl-emphasis1" >{{ 'HOST' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.dbInput.host" class="form-control dl-input-text input_style" type="text" placeholder="0.0.0.0" required="required" />
+ <input [(ngModel)]="this.dbInput.host" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
</div>
</div>
@@ -70,7 +70,7 @@
<label class="dl-emphasis1" >{{ 'PORT' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.dbInput.port" class="form-control dl-input-text input_style" type="text" placeholder="0.0.0.0" required="required" />
+ <input [(ngModel)]="this.dbInput.port" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
</div>
</div>
</div>
@@ -81,7 +81,7 @@
<label class="dl-emphasis1" >{{ 'Username' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.dbInput.login" class="form-control dl-input-text input_style" type="text" placeholder="login" required="required" />
+ <input [(ngModel)]="this.dbInput.login" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
</div>
</div>
@@ -90,7 +90,7 @@
<label class="dl-emphasis1" >{{ 'Password' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.dbInput.pass" class="form-control dl-input-text input_style" type="text" placeholder="pass" required="required" />
+ <input [(ngModel)]="this.dbInput.pass" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
</div>
</div>
</div>
@@ -116,12 +116,23 @@
<label class="dl-emphasis1" >{{ 'DB_TYPE' | translate }}</label>
</div>
<div>
- <select #d_dbTypeId class="custom-select dl-input-text input_style" >
+ <select #d_dbTypeId class="custom-select dl-input-text input_style" disabled>
<option *ngFor="let item of this.dbTypeIdList" [selected]="item == this.defaultDbType">{{ item }}</option>
</select>
</div>
</div>
</div>
+
+ <div class="form-group row row-wrapper">
+ <div class="row-half-item usual-item">
+ <div>
+ <label class="dl-emphasis1" >{{ 'DATABASE' | translate }}</label>
+ </div>
+ <div>
+ <input [(ngModel)]="this.dbInput.database" class="form-control dl-input-text input_style" type="text" required="required" />
+ </div>
+ </div>
+ </div>
</div>
</div>
diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/druid/druid.component.ts b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/druid/druid.component.ts
index 5c424fc..cf4027a 100644
--- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/druid/druid.component.ts
+++ b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/druid/druid.component.ts
@@ -43,7 +43,7 @@
@Input() db: Db;
@Input() dbList_length;
dbInput: Db;
- dbTypeIdList: Array<string> = ["CB", "DRUID", "ES", "HDFS", "MONGO"];
+ dbTypeIdList: Array<string> = ["DRUID"];
@ViewChild("d_dbTypeId") d_dbTypeId: ElementRef;
defaultDbType: string;
@@ -75,7 +75,7 @@
} else {
this.dbInput = this.editDb;
- this.dbInputTitle = "Edit " + this.editDb.name;
+ this.dbInputTitle = "Edit" + "-" + this.editDb.dbTypeId + "-" + this.editDb.name;
this.defaultDbType = this.dbInput.dbTypeId;
console.log("edit db");
}
diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.html b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.html
index b58b6d2..0eb6736 100644
--- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.html
+++ b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.html
@@ -61,7 +61,7 @@
<label class="dl-emphasis1" >{{ 'HOST' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.dbInput.host" class="form-control dl-input-text input_style" type="text" placeholder="0.0.0.0" required="required" />
+ <input [(ngModel)]="this.dbInput.host" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
</div>
</div>
@@ -70,7 +70,7 @@
<label class="dl-emphasis1" >{{ 'PORT' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.dbInput.port" class="form-control dl-input-text input_style" type="text" placeholder="0.0.0.0" required="required" />
+ <input [(ngModel)]="this.dbInput.port" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
</div>
</div>
</div>
@@ -81,7 +81,7 @@
<label class="dl-emphasis1" >{{ 'Username' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.dbInput.login" class="form-control dl-input-text input_style" type="text" placeholder="login" required="required" />
+ <input [(ngModel)]="this.dbInput.login" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
</div>
</div>
@@ -90,7 +90,7 @@
<label class="dl-emphasis1" >{{ 'Password' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.dbInput.pass" class="form-control dl-input-text input_style" type="text" placeholder="pass" required="required" />
+ <input [(ngModel)]="this.dbInput.pass" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
</div>
</div>
</div>
@@ -116,12 +116,23 @@
<label class="dl-emphasis1" >{{ 'DB_TYPE' | translate }}</label>
</div>
<div>
- <select #d_dbTypeId class="custom-select dl-input-text input_style" >
+ <select #d_dbTypeId class="custom-select dl-input-text input_style" disabled>
<option *ngFor="let item of this.dbTypeIdList" [selected]="item == this.defaultDbType">{{ item }}</option>
</select>
</div>
</div>
</div>
+
+ <div class="form-group row row-wrapper">
+ <div class="row-half-item usual-item">
+ <div>
+ <label class="dl-emphasis1" >{{ 'DATABASE' | translate }}</label>
+ </div>
+ <div>
+ <input [(ngModel)]="this.dbInput.database" class="form-control dl-input-text input_style" type="text" required="required" />
+ </div>
+ </div>
+ </div>
</div>
</div>
diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.ts b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.ts
index ed3e513..4331bc7 100644
--- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.ts
+++ b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.ts
@@ -43,7 +43,7 @@
@Input() db: Db;
@Input() dbList_length;
dbInput: Db;
- dbTypeIdList: Array<string> = ["CB", "DRUID", "ES", "HDFS", "MONGO"];
+ dbTypeIdList: Array<string> = ["ES"];
@ViewChild("d_dbTypeId") d_dbTypeId: ElementRef;
defaultDbType: string;
@@ -75,7 +75,7 @@
} else {
this.dbInput = this.editDb;
- this.dbInputTitle = "Edit " + this.editDb.name;
+ this.dbInputTitle = "Edit" + "-" + this.editDb.dbTypeId + "-" + this.editDb.name;
this.defaultDbType = this.dbInput.dbTypeId;
console.log("edit db");
}
diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/hdfs/hdfs.component.html b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/hdfs/hdfs.component.html
index d13cbee..a12165c 100644
--- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/hdfs/hdfs.component.html
+++ b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/hdfs/hdfs.component.html
@@ -61,7 +61,7 @@
<label class="dl-emphasis1" >{{ 'HOST' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.dbInput.host" class="form-control dl-input-text input_style" type="text" placeholder="0.0.0.0" required="required" />
+ <input [(ngModel)]="this.dbInput.host" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
</div>
</div>
@@ -70,7 +70,7 @@
<label class="dl-emphasis1" >{{ 'PORT' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.dbInput.port" class="form-control dl-input-text input_style" type="text" placeholder="0.0.0.0" required="required" />
+ <input [(ngModel)]="this.dbInput.port" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
</div>
</div>
</div>
@@ -96,12 +96,23 @@
<label class="dl-emphasis1" >{{ 'DB_TYPE' | translate }}</label>
</div>
<div>
- <select #d_dbTypeId class="custom-select dl-input-text input_style" >
+ <select #d_dbTypeId class="custom-select dl-input-text input_style" disabled>
<option *ngFor="let item of this.dbTypeIdList" [selected]="item == this.defaultDbType">{{ item }}</option>
</select>
</div>
</div>
</div>
+
+ <div class="form-group row row-wrapper">
+ <div class="row-half-item usual-item">
+ <div>
+ <label class="dl-emphasis1" >{{ 'DATABASE' | translate }}</label>
+ </div>
+ <div>
+ <input [(ngModel)]="this.dbInput.database" class="form-control dl-input-text input_style" type="text" required="required" />
+ </div>
+ </div>
+ </div>
</div>
</div>
diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/hdfs/hdfs.component.ts b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/hdfs/hdfs.component.ts
index 2c161fd..f471e82 100644
--- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/hdfs/hdfs.component.ts
+++ b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/hdfs/hdfs.component.ts
@@ -43,7 +43,7 @@
@Input() db: Db;
@Input() dbList_length;
dbInput: Db;
- dbTypeIdList: Array<string> = ["CB", "DRUID", "ES", "HDFS", "MONGO"];
+ dbTypeIdList: Array<string> = ["HDFS"];
@ViewChild("d_dbTypeId") d_dbTypeId: ElementRef;
defaultDbType: string;
@@ -75,7 +75,7 @@
} else {
this.dbInput = this.editDb;
- this.dbInputTitle = "Edit " + this.editDb.name;
+ this.dbInputTitle = "Edit" + "-" + this.editDb.dbTypeId + "-" + this.editDb.name;
this.defaultDbType = this.dbInput.dbTypeId;
console.log("edit db");
}
diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb/mongodb.component.html b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb/mongodb.component.html
index b58b6d2..0eb6736 100644
--- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb/mongodb.component.html
+++ b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb/mongodb.component.html
@@ -61,7 +61,7 @@
<label class="dl-emphasis1" >{{ 'HOST' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.dbInput.host" class="form-control dl-input-text input_style" type="text" placeholder="0.0.0.0" required="required" />
+ <input [(ngModel)]="this.dbInput.host" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
</div>
</div>
@@ -70,7 +70,7 @@
<label class="dl-emphasis1" >{{ 'PORT' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.dbInput.port" class="form-control dl-input-text input_style" type="text" placeholder="0.0.0.0" required="required" />
+ <input [(ngModel)]="this.dbInput.port" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
</div>
</div>
</div>
@@ -81,7 +81,7 @@
<label class="dl-emphasis1" >{{ 'Username' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.dbInput.login" class="form-control dl-input-text input_style" type="text" placeholder="login" required="required" />
+ <input [(ngModel)]="this.dbInput.login" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
</div>
</div>
@@ -90,7 +90,7 @@
<label class="dl-emphasis1" >{{ 'Password' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.dbInput.pass" class="form-control dl-input-text input_style" type="text" placeholder="pass" required="required" />
+ <input [(ngModel)]="this.dbInput.pass" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
</div>
</div>
</div>
@@ -116,12 +116,23 @@
<label class="dl-emphasis1" >{{ 'DB_TYPE' | translate }}</label>
</div>
<div>
- <select #d_dbTypeId class="custom-select dl-input-text input_style" >
+ <select #d_dbTypeId class="custom-select dl-input-text input_style" disabled>
<option *ngFor="let item of this.dbTypeIdList" [selected]="item == this.defaultDbType">{{ item }}</option>
</select>
</div>
</div>
</div>
+
+ <div class="form-group row row-wrapper">
+ <div class="row-half-item usual-item">
+ <div>
+ <label class="dl-emphasis1" >{{ 'DATABASE' | translate }}</label>
+ </div>
+ <div>
+ <input [(ngModel)]="this.dbInput.database" class="form-control dl-input-text input_style" type="text" required="required" />
+ </div>
+ </div>
+ </div>
</div>
</div>
diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb/mongodb.component.ts b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb/mongodb.component.ts
index 765da25..bcd2e88 100644
--- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb/mongodb.component.ts
+++ b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb/mongodb.component.ts
@@ -43,7 +43,7 @@
@Input() db: Db;
@Input() dbList_length;
dbInput: Db;
- dbTypeIdList: Array<string> = ["CB", "DRUID", "ES", "HDFS", "MONGO"];
+ dbTypeIdList: Array<string> = ["MONGO"];
@ViewChild("d_dbTypeId") d_dbTypeId: ElementRef;
defaultDbType: string;
@@ -75,7 +75,7 @@
} else {
this.dbInput = this.editDb;
- this.dbInputTitle = "Edit " + this.editDb.name;
+ this.dbInputTitle = "Edit" + "-" + this.editDb.dbTypeId + "-" + this.editDb.name;
this.defaultDbType = this.dbInput.dbTypeId;
console.log("edit db");
}
diff --git a/components/datalake-handler/admin/src/src/app/views/tools/modal-tools/modal-tools.component.html b/components/datalake-handler/admin/src/src/app/views/tools/modal-tools/modal-tools.component.html
index 0b0b462..f4f9aba 100644
--- a/components/datalake-handler/admin/src/src/app/views/tools/modal-tools/modal-tools.component.html
+++ b/components/datalake-handler/admin/src/src/app/views/tools/modal-tools/modal-tools.component.html
@@ -62,7 +62,7 @@
<label class="dl-emphasis1" >{{ 'HOST' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.toolInput.host" class="form-control dl-input-text input_style" type="text" placeholder="0.0.0.0" required="required" />
+ <input [(ngModel)]="this.toolInput.host" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
</div>
</div>
@@ -71,7 +71,7 @@
<label class="dl-emphasis1" >{{ 'PORT' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.toolInput.port" class="form-control dl-input-text input_style" type="text" placeholder="0.0.0.0" required="required" />
+ <input [(ngModel)]="this.toolInput.port" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
</div>
</div>
</div>
@@ -82,7 +82,7 @@
<label class="dl-emphasis1" >{{ 'Username' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.toolInput.login" class="form-control dl-input-text input_style" type="text" placeholder="login" required="required" />
+ <input [(ngModel)]="this.toolInput.login" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
</div>
</div>
@@ -91,7 +91,29 @@
<label class="dl-emphasis1" >{{ 'Password' | translate }}</label>
</div>
<div>
- <input [(ngModel)]="this.toolInput.pass" class="form-control dl-input-text input_style" type="text" placeholder="pass" required="required" />
+ <input [(ngModel)]="this.toolInput.pass" class="form-control dl-input-text input_style" type="text" placeholder="" required="required" />
+ </div>
+ </div>
+ </div>
+
+ <div class="form-group row row-wrapper">
+ <div class="row-half-item usual-item">
+ <div>
+ <label class="dl-emphasis1" >{{ 'DATABASE' | translate }}</label>
+ </div>
+ <div>
+ <input [(ngModel)]="this.toolInput.database" class="form-control dl-input-text input_style" type="text" required="required" />
+ </div>
+ </div>
+
+ <div class="row-half-item usual-item">
+ <div>
+ <label class="dl-emphasis1" >{{ 'DB_TYPE' | translate }}</label>
+ </div>
+ <div>
+ <select #d_dbTypeId class="custom-select dl-input-text input_style" disabled>
+ <option *ngFor="let item of this.dbTypeIdList" [selected]="item == this.defaultDbType">{{ item }}</option>
+ </select>
</div>
</div>
</div>
diff --git a/components/datalake-handler/admin/src/src/app/views/tools/modal-tools/modal-tools.component.ts b/components/datalake-handler/admin/src/src/app/views/tools/modal-tools/modal-tools.component.ts
index 8ffeaad..87071e6 100644
--- a/components/datalake-handler/admin/src/src/app/views/tools/modal-tools/modal-tools.component.ts
+++ b/components/datalake-handler/admin/src/src/app/views/tools/modal-tools/modal-tools.component.ts
@@ -20,7 +20,7 @@
*
*/
-import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
+import {Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';
import {Db} from "src/app/core/models/db.model";
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
import {AdminService} from "src/app/core/services/admin.service";
@@ -38,8 +38,8 @@
@Input() tool: Db;
@Input() toolList_length;
toolInput: Db;
- d_dbTypeId: string = "";
-
+ @ViewChild("d_dbTypeId") d_dbTypeId: ElementRef;
+ dbTypeIdList: Array<string> = [];
defaultDbType: string;
toolInputTitle = "";
data: string;
@@ -66,12 +66,14 @@
}
this.toolInput = feed;
this.toolInputTitle = this.data === "Kibana" ? "New Kibana" : "New Superset";
+ this.dbTypeIdList = this.data === "Kibana" ? ["KIBANA"] : ["SUPERSET"];
console.log("create db");
} else {
this.toolInput = this.editTool;
- this.toolInputTitle = "Edit " + this.editTool.name;
- this.defaultDbType = this.toolInput.dbTypeId;
+ this.toolInputTitle = "Edit" + "-" + this.editTool.dbTypeId + "-" + this.editTool.name;
+ this.defaultDbType = this.editTool.dbTypeId;
+ this.dbTypeIdList = [this.editTool.dbTypeId];
console.log("edit db");
}
}
@@ -82,11 +84,7 @@
return false;
}
this.editTool = this.toolInput;
- if (this.data == '' || this.data == undefined) {
- this.editTool.dbTypeId = this.toolInput.dbTypeId;
- } else {
- this.editTool.dbTypeId = this.data === "Kibana" ? "KIBANA" : "SUPERSET";
- }
+ this.editTool.dbTypeId = this.d_dbTypeId.nativeElement.value;
this.editTool.encrypt = false;
console.log(this.editTool, "editTool");
this.passEntry.emit(this.editTool);
diff --git a/components/datalake-handler/admin/src/src/app/views/tools/tools.component.ts b/components/datalake-handler/admin/src/src/app/views/tools/tools.component.ts
index ebe33e4..be0d253 100644
--- a/components/datalake-handler/admin/src/src/app/views/tools/tools.component.ts
+++ b/components/datalake-handler/admin/src/src/app/views/tools/tools.component.ts
@@ -112,10 +112,10 @@
dataAction($event) {
if($event[0] == "trash"){
- console.log($event, "tools 中触发执行删除操作");
+ console.log($event, "tools delete");
this.deleteToolModel($event[1]);
}else {
- console.log($event, "tools 中触发执行修改操作");
+ console.log($event, "tools update");
this.updateToolModel($event[1]);
}
}
@@ -137,7 +137,6 @@
this.initData();
} else {
this.notificationService.error("FAILED_DELETED");
- this.initData();
}
modalRef.close();
},
@@ -169,7 +168,6 @@
this.initData();
} else {
this.notificationService.error("FAILED_UPDATED");
- this.initData();
}
modalRef.close();
},
@@ -178,7 +176,6 @@
modalRef.close();
}
);
- })
-
+ });
}
}
diff --git a/components/datalake-handler/admin/src/src/assets/i18n/en-us.json b/components/datalake-handler/admin/src/src/assets/i18n/en-us.json
index f0217a8..13872a4 100644
--- a/components/datalake-handler/admin/src/src/assets/i18n/en-us.json
+++ b/components/datalake-handler/admin/src/src/assets/i18n/en-us.json
@@ -82,7 +82,7 @@
"NEW_MONGODB": "New MongoDB",
"NEW_HDFS": "New Hdfs",
"SECURE_COMMUNICATION": "Secure Communication",
- "DB_TYPE": "DbType",
"NEW_TOOL": "New Tool",
- "NEW_KIBANA": "New Kibana"
+ "NEW_KIBANA": "New Kibana",
+ "DATABASE": "Database"
}