From c94846da72a38200fdf90956fe86f46f0156b174 Mon Sep 17 00:00:00 2001 From: Ekko Chang Date: Tue, 11 Jun 2019 10:14:14 +0000 Subject: Fix bug of HDFS and css style Issue-ID: DCAEGEN2-1188 Change-Id: I282579f4e6fc65c59474f71ac26b44f2fb5e975c Signed-off-by: Ekko Chang --- .../dashboard-list/dashboard-list.component.html | 208 +++++++++------------ .../dbs-modal/hdfs/hdfs.component.css | 19 ++ .../dbs-modal/hdfs/hdfs.component.html | 122 ++++++++++++ .../dbs-modal/hdfs/hdfs.component.spec.ts | 44 +++++ .../database-list/dbs-modal/hdfs/hdfs.component.ts | 67 +++++++ .../datalake-handler/admin/src/src/styles.css | 15 +- 6 files changed, 348 insertions(+), 127 deletions(-) create mode 100644 components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/hdfs/hdfs.component.css create mode 100644 components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/hdfs/hdfs.component.html create mode 100644 components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/hdfs/hdfs.component.spec.ts create mode 100644 components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/hdfs/hdfs.component.ts diff --git a/components/datalake-handler/admin/src/src/app/dashboard-setting/dashboard-list/dashboard-list.component.html b/components/datalake-handler/admin/src/src/app/dashboard-setting/dashboard-list/dashboard-list.component.html index d35d2e15..3293aa84 100644 --- a/components/datalake-handler/admin/src/src/app/dashboard-setting/dashboard-list/dashboard-list.component.html +++ b/components/datalake-handler/admin/src/src/app/dashboard-setting/dashboard-list/dashboard-list.component.html @@ -22,24 +22,20 @@
-
-
+
+
@@ -47,92 +43,63 @@
- - - - - + + + + .st1 { + fill: #232324; + } + + .st2 { + fill: #0D0D0F; + } + + + + + + + + +
- - - + + - - + +
- - - - + + + - - - - + + +
- - - - + + + - - - - - + - - - - + + + +
- - - - + + + - - - - - + + +
+ [ngClass]="{'truecheck':db.enabled == true,'falsecheck':db.enabled == false}"> {{ db.name }}
@@ -209,4 +176,3 @@ M33x3Llz5s+fLxFeCIL4T4ABAKZ9PUaesuDFAAAAAElFTkSuQmCC" transform="matrix(1 0 0 1
- diff --git a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/hdfs/hdfs.component.css b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/hdfs/hdfs.component.css new file mode 100644 index 00000000..d6d32ca4 --- /dev/null +++ b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/hdfs/hdfs.component.css @@ -0,0 +1,19 @@ +/* +* ============LICENSE_START======================================================= +* ONAP : DataLake +* ================================================================================ +* Copyright 2019 QCT +*================================================================================= +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* ============LICENSE_END========================================================= +*/ 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 new file mode 100644 index 00000000..830ed8f2 --- /dev/null +++ b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/hdfs/hdfs.component.html @@ -0,0 +1,122 @@ + + +
+ + + + + + +
diff --git a/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/hdfs/hdfs.component.spec.ts b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/hdfs/hdfs.component.spec.ts new file mode 100644 index 00000000..dafbdadc --- /dev/null +++ b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/hdfs/hdfs.component.spec.ts @@ -0,0 +1,44 @@ +/* + * ============LICENSE_START======================================================= + * ONAP : DataLake + * ================================================================================ + * Copyright 2019 QCT + *================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import { async, ComponentFixture, TestBed } from "@angular/core/testing"; + +import { HdfsComponent } from "./H./hdfs.component + +describe("HdfsComponent", () => { + let component: HdfsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [HdfsComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HdfsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it("should create", () => { + expect(component).toBeTruthy(); + }); +}); 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 new file mode 100644 index 00000000..0ada4117 --- /dev/null +++ b/components/datalake-handler/admin/src/src/app/database/database-list/dbs-modal/hdfs/hdfs.component.ts @@ -0,0 +1,67 @@ +/* + * ============LICENSE_START======================================================= + * ONAP : DataLake + * ================================================================================ + * Copyright 2019 QCT + *================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +/** + * + * @author Ekko Chang + * + */ + +import { Component, Input, Output, EventEmitter } from "@angular/core"; +import { NgbActiveModal } from "@ng-bootstrap/ng-bootstrap"; +import { Db } from "src/app/core/models/db.model"; +import { AdminService } from "src/app/core/services/admin.service"; + +@Component({ + selector: "app-hdfs", + templateUrl: "./hdfs.component.html", + styleUrls: ["./hdfs.component.css"] +}) +export class HdfsComponent { + @Output() passEntry: EventEmitter = new EventEmitter(); + @Input() db: Db; + tempDb: Db; + + constructor( + public activeModal: NgbActiveModal, + public adminService: AdminService + ) {} + + ngOnInit() { + // cache for display + this.tempDb = new Db(); + const feed = { + name: "HDFS", + enabled: true, // TODO: enable + host: this.db.host, + port: this.db.port, + database: this.db.database, + encrypt: this.db.encrypt, + login: this.db.login, + pass: this.db.pass + }; + this.tempDb = feed; + } + + passBack() { + this.db = this.tempDb; + this.passEntry.emit(this.db); + } +} diff --git a/components/datalake-handler/admin/src/src/styles.css b/components/datalake-handler/admin/src/src/styles.css index ef3295b3..94a04d93 100644 --- a/components/datalake-handler/admin/src/src/styles.css +++ b/components/datalake-handler/admin/src/src/styles.css @@ -65,7 +65,7 @@ body { font-family: "Open Sans", sans-serif; font-weight: 400; font-size: 14px; - letter-spacing: 1px; + letter-spacing: 0.6px; color: #ffffff; text-align: left; } @@ -589,12 +589,15 @@ input#switch:checked+.dl-slider:before { border-radius: 6px; padding: 4px 4px 4px 10px; } -.p-1.alert-delete-model{ + +.p-1.alert-delete-model { padding: 0.25rem 0.5rem; } -.p-1 .alert-delete-title{ - padding: 1.25rem 1.5rem!important; + +.p-1 .alert-delete-title { + padding: 1.25rem 1.5rem !important; } -.p-1 .alert-delete-content{ - padding: 1.25rem 4.5rem!important; + +.p-1 .alert-delete-content { + padding: 1.25rem 4.5rem !important; } -- cgit