Merge "DataLake DB module interface Function modification"
diff --git a/components/datalake-handler/admin/src/src/app/core/services/rest-api.service.ts b/components/datalake-handler/admin/src/src/app/core/services/rest-api.service.ts
index b913410..7eb5cf0 100644
--- a/components/datalake-handler/admin/src/src/app/core/services/rest-api.service.ts
+++ b/components/datalake-handler/admin/src/src/app/core/services/rest-api.service.ts
@@ -162,20 +162,10 @@
catchError(this.handleError)
);
}
-
- addDb(d: Db): Observable<any> {
- return this.http
- .post<any>(prefix + "dbs", JSON.stringify(d), httpOptions)
- .pipe(
- retry(1),
- tap(_ => console.log(`add db name=${d.name}`)),
- catchError(this.handleError)
- );
- }
-
+
upadteDb(d: Db): Observable<any> {
return this.http
- .put(prefix + "dbs/" + d.name, JSON.stringify(d), httpOptions)
+ .put(prefix + "dbs", d)
.pipe(
retry(1),
tap(_ => this.extractData),
@@ -183,14 +173,6 @@
);
}
- deleteDb(name: string): Observable<any> {
- return this.http.delete(prefix + "dbs/" + name, httpOptions).pipe(
- retry(1),
- tap(_ => console.log(`deleted db name=${name}`)),
- catchError(this.handleError)
- );
- }
-
/*
Feeder
*/
diff --git a/components/datalake-handler/admin/src/src/app/database/database-list/database-list.component.html b/components/datalake-handler/admin/src/src/app/database/database-list/database-list.component.html
index 8b71f52..829d6c6 100644
--- a/components/datalake-handler/admin/src/src/app/database/database-list/database-list.component.html
+++ b/components/datalake-handler/admin/src/src/app/database/database-list/database-list.component.html
@@ -21,21 +21,9 @@
<div class="d-flex flex-wrap">
<!-- Database list -->
<div *ngFor="let db of this.dbs" class="col-sm-3 db-block">
- <div class="db-panel">
+ <div class="db-panel" (click)="this.openDetailModal(db.name)" style="cursor: pointer;padding: 40px;">
<div class="d-flex flex-column align-content-center">
- <div class="ml-auto dropdown db-dropdown mr-2" data-boundary="window">
- <a class="badge badge-light db-dropdown" data-toggle="dropdown">
- <i class="fas fa-ellipsis-h fa-2x db-config-icon"></i>
- </a>
- <div class="dropdown-menu">
- <button class="dropdown-item" type="button" (click)="this.deleteDb(db.name)">
- <i class="fas fa-times db-config-icon"></i> {{ 'DELETE' | translate }}
- </button>
- </div>
- </div>
-
- <div>
- <button type="button" class="btn" (click)="this.openDetailModal(db.name)">
+ <div class="db-box">
<div class="align-self-center" style="height: 130px;">
<!-- Couchbase -->
<div class="p-0" *ngIf="db.name == 'Couchbase'">
@@ -234,48 +222,14 @@
</span>
</div>
</div>
-
<div class="mt-auto">
+ <i class="fa fa-check-circle" aria-hidden="true"
+ [ngClass]="{'truecheck':db.enabled == true,'falsecheck':db.enabled == false}"></i>
{{ db.name }}
</div>
- </button>
</div>
</div>
</div>
</div>
-
- <!-- Add -->
- <div class="col-sm-3 db-block">
- <div class="db-panel">
- <div class="d-flex flex-column align-content-center">
- <div class="ml-auto dropdown db-dropdown mr-2" style="visibility: hidden;" data-boundary="window">
- <a class="badge badge-light db-dropdown" data-toggle="dropdown">
- <i class="fas fa-ellipsis-h fa-2x db-config-icon"></i>
- </a>
- <div class="dropdown-menu">
- <button class="dropdown-item" type="button">
- <i class="fas fa-times db-config-icon"></i> Delete
- </button>
- </div>
- </div>
-
- <div>
- <button type="button" class="btn" (click)="this.openAddModal()">
- <div class="align-self-center" style="height: 130px;">
- <div style="width:100px; height:100px;">
- <i class="fas fa-plus fa-3x pt-4 dl-icon-enable"></i>
- </div>
- </div>
-
- <div class="mt-auto" style="visibility: hidden;">
- add
- </div>
- </button>
- </div>
-
- </div>
- </div>
- </div>
-
</div>
diff --git a/components/datalake-handler/admin/src/src/app/database/database-list/database-list.component.ts b/components/datalake-handler/admin/src/src/app/database/database-list/database-list.component.ts
index 13a6274..556e9f9 100644
--- a/components/datalake-handler/admin/src/src/app/database/database-list/database-list.component.ts
+++ b/components/datalake-handler/admin/src/src/app/database/database-list/database-list.component.ts
@@ -134,31 +134,6 @@
});
}
- deleteDb(name: string) {
- const index = this.dbs.findIndex(d => d.name === name);
- const modalRef = this.modalService.open(AlertComponent, {
- size: "sm",
- centered: true
- });
-
- modalRef.componentInstance.message =
- 'Are you sure you want to delete " ' + name + '" ?';
- modalRef.componentInstance.passEntry.subscribe(receivedEntry => {
- // Delete database
- this.restApiService.deleteDb(name).subscribe(
- res => {
- this.dbs.splice(index, 1);
- this.notificationService.success("Success deleted.");
- modalRef.close();
- },
- err => {
- this.notificationService.error(err);
- modalRef.close();
- }
- );
- });
- }
-
openDetailModal(name: string) {
var modalRef, index;
@@ -210,15 +185,20 @@
} else {
modalRef.componentInstance.db = this.tempDbDetail;
}
-
modalRef.componentInstance.passEntry.subscribe(receiveEntry => {
this.tempDbDetail = receiveEntry;
- if (index != -1) {
- // Db name found, to update db
+ let enabled = receiveEntry.enabled;
+ console.log(this.tempDbDetail,"this.tempDbDetail");
+ if(enabled == true){
this.restApiService.upadteDb(this.tempDbDetail).subscribe(
res => {
- this.dbs[index] = this.tempDbDetail;
- this.notificationService.success("Success updated.");
+ console.log(res);
+ if (res.statusCode == 200) {
+ this.dbs[index] = this.tempDbDetail;
+ this.notificationService.success("SUCCESSFULLY_UPDATED");
+ }else {
+ this.notificationService.error("FAILED_UPDATED");
+ }
modalRef.close();
},
err => {
@@ -226,12 +206,16 @@
modalRef.close();
}
);
- } else {
- // Db name not found, to insert db
- this.restApiService.addDb(this.tempDbDetail).subscribe(
+ }else {
+ this.restApiService.upadteDb(this.dbs[index]).subscribe(
res => {
- this.dbs.push(this.tempDbDetail);
- this.notificationService.success("Success inserted.");
+ console.log(res);
+ if (res.statusCode == 200) {
+ this.dbs[index] = this.tempDbDetail;
+ this.notificationService.success("SUCCESSFULLY_DELETED");
+ }else {
+ this.dbs[index].encrypt = true;
+ }
modalRef.close();
},
err => {
diff --git a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/couchbase/couchbase.component.html b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/couchbase/couchbase.component.html
index d11ffd9..c67ab85 100644
--- a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/couchbase/couchbase.component.html
+++ b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/couchbase/couchbase.component.html
@@ -24,6 +24,7 @@
<div class="row">
<div class="col-md-12">
<label class="dl-h3">{{ 'DOCUMENT_STORE' | translate }} | Couchbase</label>
+ <i class="fas fa-plus fa-2x close-btn-icon" (click)="activeModal.close('Close click')"></i>
</div>
</div>
@@ -63,7 +64,7 @@
<div class="col-md-3"><label class="dl-emphasis1" for="inputPort">{{ "PORT" | translate}}</label></div>
<div class="col-md-2">
<input [(ngModel)]="this.tempDb.port" class="form-control dl-input-text" id="inputPort" type="text"
- placeholder="" (input)="this.adminService.onKeyPressNumber($event)">
+ placeholder="Default" (input)="this.adminService.onKeyPressNumber($event)">
</div>
</div>
</div>
@@ -85,18 +86,31 @@
<div class="form-group">
<div class="row">
- <div class="col-md-3"><label class="dl-emphasis1" for="inputSsl">{{ "ENABLE_SSL" | translate}}</label></div>
+ <div class="col-md-3"><label class="dl-emphasis1" for="switchs">{{ "ENABLE_SSL" | translate}}</label></div>
<div class="col-md-3">
<div class="input-group">
<div class="input-group-prepend">
- <label class="input-group-text dl-input-chk-label">
- <input id="chkSsl" [(ngModel)]="this.tempDb.encrypt" type="checkbox" />
- <span class="dl-input-checkmark"></span>
+ <label class="dl-switch">
+ <input id="switchs" type="checkbox" [(ngModel)]="this.tempDb.encrypt" />
+ <span class="dl-slider round"></span>
</label>
</div>
- <label class="form-control dl-input-chk" for="chkSsl">
- Enable
- </label>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <div class="row">
+ <div class="col-md-3"><label class="dl-emphasis1" for="switch">{{ "Enabled" | translate}}</label></div>
+ <div class="col-md-3">
+ <div class="input-group">
+ <div class="input-group-prepend">
+ <label class="dl-switch">
+ <input id="switch" type="checkbox" [(ngModel)]="this.tempDb.enabled" />
+ <span class="dl-slider round"></span>
+ </label>
+ </div>
</div>
</div>
</div>
diff --git a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/couchbase/couchbase.component.ts b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/couchbase/couchbase.component.ts
index deee9a0..5e11900 100644
--- a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/couchbase/couchbase.component.ts
+++ b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/couchbase/couchbase.component.ts
@@ -49,7 +49,7 @@
this.tempDb = new Db();
const feed = {
name: "Couchbase",
- enabled: true, // TODO: enable
+ enabled: this.db.enabled,
host: this.db.host,
port: this.db.port,
database: this.db.database,
diff --git a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/druid/druid.component.html b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/druid/druid.component.html
index 0f0de21..5d5a38c 100644
--- a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/druid/druid.component.html
+++ b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/druid/druid.component.html
@@ -24,6 +24,7 @@
<div class="row">
<div class="col-md-12">
<label class="dl-h3">OLAP store | Druid</label>
+ <i class="fas fa-plus fa-2x close-btn-icon" (click)="activeModal.close('Close click')"></i>
</div>
</div>
@@ -38,15 +39,15 @@
<div class="modal-body border-0 ml-4 mr-4">
<div class="container">
- <div class="form-group">
- <div class="row">
- <div class="col-md-3"><label class="dl-emphasis1" for="inputBucket">Database</label></div>
- <div class="col-md-4">
- <input [(ngModel)]="this.tempDb.database" class="form-control dl-input-text" id="inputBucket" type="text"
- placeholder="">
- </div>
- </div>
- </div>
+ <!--<div class="form-group">-->
+ <!--<div class="row">-->
+ <!--<div class="col-md-3"><label class="dl-emphasis1" for="inputBucket">Database</label></div>-->
+ <!--<div class="col-md-4">-->
+ <!--<input [(ngModel)]="this.tempDb.database" class="form-control dl-input-text" id="inputBucket" type="text"-->
+ <!--placeholder="">-->
+ <!--</div>-->
+ <!--</div>-->
+ <!--</div>-->
<div class="form-group">
<div class="row">
@@ -63,7 +64,7 @@
<div class="col-md-3"><label class="dl-emphasis1" for="inputPort">{{ "PORT" | translate}}</label></div>
<div class="col-md-2">
<input [(ngModel)]="this.tempDb.port" class="form-control dl-input-text" id="inputPort" type="text"
- placeholder="" (input)="this.adminService.onKeyPressNumber($event)">
+ placeholder="Default" (input)="this.adminService.onKeyPressNumber($event)">
</div>
</div>
</div>
@@ -85,18 +86,31 @@
<div class="form-group">
<div class="row">
- <div class="col-md-3"><label class="dl-emphasis1" for="inputSsl">{{ "ENABLE_SSL" | translate}}</label></div>
+ <div class="col-md-3"><label class="dl-emphasis1" for="switchs">{{ "ENABLE_SSL" | translate}}</label></div>
<div class="col-md-3">
<div class="input-group">
<div class="input-group-prepend">
- <label class="input-group-text dl-input-chk-label">
- <input id="chkSsl" [(ngModel)]="this.tempDb.encrypt" type="checkbox" />
- <span class="dl-input-checkmark"></span>
+ <label class="dl-switch">
+ <input id="switchs" type="checkbox" [(ngModel)]="this.tempDb.encrypt" />
+ <span class="dl-slider round"></span>
</label>
</div>
- <label class="form-control dl-input-chk" for="chkSsl">
- Enable
- </label>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <div class="row">
+ <div class="col-md-3"><label class="dl-emphasis1" for="switch">{{ "Enabled" | translate}}</label></div>
+ <div class="col-md-3">
+ <div class="input-group">
+ <div class="input-group-prepend">
+ <label class="dl-switch">
+ <input id="switch" type="checkbox" [(ngModel)]="this.tempDb.enabled" />
+ <span class="dl-slider round"></span>
+ </label>
+ </div>
</div>
</div>
</div>
diff --git a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/druid/druid.component.ts b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/druid/druid.component.ts
index 7465c26..43bd0ed 100644
--- a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/druid/druid.component.ts
+++ b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/druid/druid.component.ts
@@ -49,7 +49,7 @@
this.tempDb = new Db();
const feed = {
name: "Druid",
- enabled: true, // TODO: enable
+ enabled: this.db.enabled,
host: this.db.host,
port: this.db.port,
database: this.db.database,
diff --git a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.html b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.html
index a9cac35..1a7e7e8 100644
--- a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.html
+++ b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.html
@@ -24,6 +24,7 @@
<div class="row">
<div class="col-md-12">
<label class="dl-h3"> {{ 'SEARCH_ENGINE' | translate }} | Elasticsearch</label>
+ <i class="fas fa-plus fa-2x close-btn-icon" (click)="activeModal.close('Close click')"></i>
</div>
</div>
@@ -53,7 +54,7 @@
<div class="col-md-3"><label class="dl-emphasis1" for="inputPort">{{ "PORT" | translate}}</label></div>
<div class="col-md-2">
<input [(ngModel)]="this.tempDb.port" class="form-control dl-input-text" id="inputPort" type="text"
- placeholder="" (input)="this.adminService.onKeyPressNumber($event)">
+ placeholder="Default" (input)="this.adminService.onKeyPressNumber($event)">
</div>
</div>
</div>
@@ -75,18 +76,31 @@
<div class="form-group">
<div class="row">
- <div class="col-md-3"><label class="dl-emphasis1" for="inputSsl">{{ "ENABLE_SSL" | translate}}</label></div>
+ <div class="col-md-3"><label class="dl-emphasis1" for="switchs">{{ "ENABLE_SSL" | translate}}</label></div>
<div class="col-md-3">
<div class="input-group">
<div class="input-group-prepend">
- <label class="input-group-text dl-input-chk-label">
- <input id="chkSsl" [(ngModel)]="this.tempDb.encrypt" type="checkbox" />
- <span class="dl-input-checkmark"></span>
+ <label class="dl-switch">
+ <input id="switchs" type="checkbox" [(ngModel)]="this.tempDb.encrypt" />
+ <span class="dl-slider round"></span>
</label>
</div>
- <label class="form-control dl-input-chk" for="chkSsl">
- Enable
- </label>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <div class="row">
+ <div class="col-md-3"><label class="dl-emphasis1" for="switch">{{ "Enabled" | translate}}</label></div>
+ <div class="col-md-3">
+ <div class="input-group">
+ <div class="input-group-prepend">
+ <label class="dl-switch">
+ <input id="switch" type="checkbox" [(ngModel)]="this.tempDb.enabled" />
+ <span class="dl-slider round"></span>
+ </label>
+ </div>
</div>
</div>
</div>
diff --git a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.ts b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.ts
index dbe57c9..bbecea5 100644
--- a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.ts
+++ b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.ts
@@ -49,7 +49,7 @@
this.tempDb = new Db();
const feed = {
name: "Elasticsearch",
- enabled: true, // TODO: enable
+ enabled: this.db.enabled,
host: this.db.host,
port: this.db.port,
database: this.db.database,
diff --git a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/hdfs/hdfs.component.html b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/hdfs/hdfs.component.html
index 830ed8f..39b905b 100644
--- a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/hdfs/hdfs.component.html
+++ b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/hdfs/hdfs.component.html
@@ -24,6 +24,7 @@
<div class="row">
<div class="col-md-12">
<label class="dl-h3">Hadoop | HDFS</label>
+ <i class="fas fa-plus fa-2x close-btn-icon" (click)="activeModal.close('Close click')"></i>
</div>
</div>
@@ -53,7 +54,7 @@
<div class="col-md-3"><label class="dl-emphasis1" for="inputPort">{{ "PORT" | translate}}</label></div>
<div class="col-md-2">
<input [(ngModel)]="this.tempDb.port" class="form-control dl-input-text" id="inputPort" type="text"
- placeholder="" (input)="this.adminService.onKeyPressNumber($event)">
+ placeholder="Default" (input)="this.adminService.onKeyPressNumber($event)">
</div>
</div>
</div>
@@ -75,18 +76,31 @@
<div class="form-group">
<div class="row">
- <div class="col-md-3"><label class="dl-emphasis1" for="inputSsl">{{ "ENABLE_SSL" | translate}}</label></div>
+ <div class="col-md-3"><label class="dl-emphasis1" for="switchs">{{ "ENABLE_SSL" | translate}}</label></div>
<div class="col-md-3">
<div class="input-group">
<div class="input-group-prepend">
- <label class="input-group-text dl-input-chk-label">
- <input id="chkSsl" [(ngModel)]="this.tempDb.encrypt" type="checkbox" />
- <span class="dl-input-checkmark"></span>
+ <label class="dl-switch">
+ <input id="switchs" type="checkbox" [(ngModel)]="this.tempDb.encrypt" />
+ <span class="dl-slider round"></span>
</label>
</div>
- <label class="form-control dl-input-chk" for="chkSsl">
- Enable
- </label>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <div class="row">
+ <div class="col-md-3"><label class="dl-emphasis1" for="switch">{{ "Enabled" | translate}}</label></div>
+ <div class="col-md-3">
+ <div class="input-group">
+ <div class="input-group-prepend">
+ <label class="dl-switch">
+ <input id="switch" type="checkbox" [(ngModel)]="this.tempDb.enabled" />
+ <span class="dl-slider round"></span>
+ </label>
+ </div>
</div>
</div>
</div>
diff --git a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/hdfs/hdfs.component.ts b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/hdfs/hdfs.component.ts
index 0ada411..034e290 100644
--- a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/hdfs/hdfs.component.ts
+++ b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/hdfs/hdfs.component.ts
@@ -49,7 +49,7 @@
this.tempDb = new Db();
const feed = {
name: "HDFS",
- enabled: true, // TODO: enable
+ enabled: this.db.enabled,
host: this.db.host,
port: this.db.port,
database: this.db.database,
diff --git a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/mongodb/mongodb.component.html b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/mongodb/mongodb.component.html
index bda2b3a..48dc051 100644
--- a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/mongodb/mongodb.component.html
+++ b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/mongodb/mongodb.component.html
@@ -24,6 +24,7 @@
<div class="row">
<div class="col-md-12">
<label class="dl-h3">Document store | MongoDB</label>
+ <i class="fas fa-plus fa-2x close-btn-icon" (click)="activeModal.close('Close click')"></i>
</div>
</div>
@@ -63,7 +64,7 @@
<div class="col-md-3"><label class="dl-emphasis1" for="inputPort">{{ "PORT" | translate}}</label></div>
<div class="col-md-2">
<input [(ngModel)]="this.tempDb.port" class="form-control dl-input-text" id="inputPort" type="text"
- placeholder="" (input)="this.adminService.onKeyPressNumber($event)">
+ placeholder="Default" (input)="this.adminService.onKeyPressNumber($event)">
</div>
</div>
</div>
@@ -85,18 +86,31 @@
<div class="form-group">
<div class="row">
- <div class="col-md-3"><label class="dl-emphasis1" for="inputSsl">{{ "ENABLE_SSL" | translate}}</label></div>
+ <div class="col-md-3"><label class="dl-emphasis1" for="switchs">{{ "ENABLE_SSL" | translate}}</label></div>
<div class="col-md-3">
<div class="input-group">
<div class="input-group-prepend">
- <label class="input-group-text dl-input-chk-label">
- <input id="chkSsl" [(ngModel)]="this.tempDb.encrypt" type="checkbox" />
- <span class="dl-input-checkmark"></span>
+ <label class="dl-switch">
+ <input id="switchs" type="checkbox" [(ngModel)]="this.tempDb.encrypt" />
+ <span class="dl-slider round"></span>
</label>
</div>
- <label class="form-control dl-input-chk" for="chkSsl">
- Enable
- </label>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <div class="row">
+ <div class="col-md-3"><label class="dl-emphasis1" for="switch">{{ "Enabled" | translate}}</label></div>
+ <div class="col-md-3">
+ <div class="input-group">
+ <div class="input-group-prepend">
+ <label class="dl-switch">
+ <input id="switch" type="checkbox" [(ngModel)]="this.tempDb.enabled" />
+ <span class="dl-slider round"></span>
+ </label>
+ </div>
</div>
</div>
</div>
diff --git a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/mongodb/mongodb.component.ts b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/mongodb/mongodb.component.ts
index 6f37f6a..05a1526 100644
--- a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/mongodb/mongodb.component.ts
+++ b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/mongodb/mongodb.component.ts
@@ -49,7 +49,7 @@
this.tempDb = new Db();
const feed = {
name: "MongoDB",
- enabled: true, // TODO: enable
+ enabled: this.db.enabled,
host: this.db.host,
port: this.db.port,
database: this.db.database,
diff --git a/components/datalake-handler/admin/src/src/styles.css b/components/datalake-handler/admin/src/src/styles.css
index 8dcf761..33af86d 100644
--- a/components/datalake-handler/admin/src/src/styles.css
+++ b/components/datalake-handler/admin/src/src/styles.css
@@ -540,15 +540,15 @@
transition: 0.4s;
}
-input#switch:checked+.dl-slider {
+input#switch:checked+.dl-slider,input#switchs:checked+.dl-slider {
background-color: #5dbebb;
}
-input#switch:focus+.dl-slider {
+input#switch:focus+.dl-slider,input#switchs:checked+.dl-slider {
box-shadow: 0 0 1px #5dbebb;
}
-input#switch:checked+.dl-slider:before {
+input#switch:checked+.dl-slider:before,input#switchs:checked+.dl-slider:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
@@ -612,3 +612,9 @@
float: right;
cursor: pointer;
}
+.truecheck{
+ color:#5DBEBB
+}
+.falsecheck{
+ color:#BDBEC0
+}