diff options
Diffstat (limited to 'components/datalake-handler/admin/src/src/app/views/database')
24 files changed, 0 insertions, 2100 deletions
diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/database-add-modal/database-add-modal.component.css b/components/datalake-handler/admin/src/src/app/views/database/database-list/database-add-modal/database-add-modal.component.css deleted file mode 100644 index ac205fe8..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/database-add-modal/database-add-modal.component.css +++ /dev/null @@ -1,40 +0,0 @@ -/* -* ============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========================================================= -*/ - - - -.nav-pills .nav-link.active, -.nav-pills .nav-link:hover { - color: #ffffff; - background-color: #5DBEBB; -} - -.nav-link { - font-family: "Open Sans", sans-serif; - font-weight: 400; - font-size: 14px; - color: #313449; - text-align: left; - border-radius: 0px; -} - -.nav-pills .show>.nav-link { - background-color: #FFFFFF; -} diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/database-add-modal/database-add-modal.component.html b/components/datalake-handler/admin/src/src/app/views/database/database-list/database-add-modal/database-add-modal.component.html deleted file mode 100644 index 21a06e98..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/database-add-modal/database-add-modal.component.html +++ /dev/null @@ -1,73 +0,0 @@ -<!-- -============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========================================================= ---> - -<div class="p-0"> - <div class="modal-header pb-0 border-0"> - <div class="container-fluid"> - <div class="row"> - <div class="col-md-12"> - <label class="dl-h3">{{ 'NEW_DB' | translate }}</label> - </div> - </div> - <div class="row"> - <div class="col-md-12"> - <hr/> - </div> - </div> - </div> - </div> - <div class="modal-body p-0"> - <div class="container-fluid"> - <div class="tab-content mb-auto" id="v-pills-tabContent"> - <!-- All --> - <div class="tab-pane fade show active" id="v-pills-all" role="tabpanel" aria-labelledby="v-pills-all-tab"> - <div class="nav flex-column nav-pills" id="menu-tab2" role="tablist" aria-orientation="vertical"> - <a class="nav-link" (click)="this.clickItem('Couchbase')" data-toggle="pill" role="tab" - aria-selected="true">Couchbase</a> - <a class="nav-link" (click)="this.clickItem('Druid')" data-toggle="pill" role="tab" - aria-selected="true">Druid</a> - <a class="nav-link" (click)="this.clickItem('Elasticsearch')" data-toggle="pill" role="tab" - aria-selected="true">Elasticsearch</a> - <a class="nav-link" (click)="this.clickItem('MongoDB')" data-toggle="pill" role="tab" - aria-selected="true">MongoDB</a> - <a class="nav-link" (click)="this.clickItem('HDFS')" data-toggle="pill" role="tab" - aria-selected="true">HDFS</a> - </div> - </div> - </div> - <div class="d-flex mt-auto justify-content-end p-3"> - <div class="p-1 col-sm-3"> - <span> - <button type="button" class="btn dl-btn-dark btn-block" (click)="this.passBack()"> - Next - </button> - </span> - </div> - <div class="p-1 col-sm-3"> - <span> - <button type="button" class="btn dl-btn-light btn-block" (click)="activeModal.close('Close click')"> - Cancel - </button> - </span> - </div> - </div> - </div> - </div> -</div> diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/database-add-modal/database-add-modal.component.spec.ts b/components/datalake-handler/admin/src/src/app/views/database/database-list/database-add-modal/database-add-modal.component.spec.ts deleted file mode 100644 index bde10b2c..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/database-add-modal/database-add-modal.component.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * ============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 { DatabaseAddModalComponent } from "./database-add-modal.component"; - -describe("DatabaseAddModalComponent", () => { - let component: DatabaseAddModalComponent; - let fixture: ComponentFixture<DatabaseAddModalComponent>; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [DatabaseAddModalComponent] - }).compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(DatabaseAddModalComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it("should create", () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/database-add-modal/database-add-modal.component.ts b/components/datalake-handler/admin/src/src/app/views/database/database-list/database-add-modal/database-add-modal.component.ts deleted file mode 100644 index 30665d87..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/database-add-modal/database-add-modal.component.ts +++ /dev/null @@ -1,153 +0,0 @@ -/* - * ============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 - * - * @contributor Chunmeng Guo - * - */ - -import {Component, Output, EventEmitter, ViewChild, ElementRef} from "@angular/core"; -import {NgbActiveModal, NgbModal} from "@ng-bootstrap/ng-bootstrap"; -import {CouchbaseComponent} from "src/app/views/database/database-list/dbs-modal/couchbase/couchbase.component"; -import {DruidComponent} from "src/app/views/database/database-list/dbs-modal/druid/druid.component"; -import {ElasticsearchComponent} from "src/app/views/database/database-list/dbs-modal/elasticsearch/elasticsearch.component"; -import {MongodbComponent} from "src/app/views/database/database-list/dbs-modal/mongodb/mongodb.component"; -import {HdfsComponent} from "src/app/views/database/database-list/dbs-modal/hdfs/hdfs.component"; -import {Db} from "src/app/core/models/db.model"; -import {RestApiService} from "src/app/core/services/rest-api.service"; -import {ToastrNotificationService} from "src/app/shared/components/toastr-notification/toastr-notification.service"; -import {NgxSpinnerService} from "ngx-spinner"; - -@Component({ - selector: "app-database-add-modal", - templateUrl: "./database-add-modal.component.html", - styleUrls: ["./database-add-modal.component.css"] -}) -export class DatabaseAddModalComponent { - @Output() passEntry: EventEmitter<any> = new EventEmitter(); - seletedItem: string = ""; - dbList: any = []; - dbs: Db[] = []; - loading: Boolean = true; - dbNew: Db; - db_NewBody: Db; - constructor( - public activeModal: NgbActiveModal, - private spinner: NgxSpinnerService, - private notificationService: ToastrNotificationService, - private modalService: NgbModal, - private dbApiService: RestApiService - ) {} - - ngOnInit() {} - - clickItem(name: string) { - this.seletedItem = name; - } - - passBack() { - console.log(this.seletedItem, "next"); - this.openNewModal(this.seletedItem); - } - - newDb(modalRef) { - this.dbNew = new Db(); - this.db_NewBody = new Db(); - modalRef.componentInstance.db = this.db_NewBody; - modalRef.componentInstance.dbList_length = this.dbList.length; - modalRef.componentInstance.passEntry.subscribe(receivedEntry => { - this.db_NewBody = receivedEntry; - this.dbApiService - .createDb(this.db_NewBody) - .subscribe( - res => { - this.spinner.hide(); - if (res.statusCode == 200) { - this.dbNew = res.returnBody; - this.dbList.push(this.dbNew); - this.dbList = [...this.dbList]; - this.notificationService.success("SUCCESSFULLY_CREARED"); - } else { - this.notificationService.error("FAILED_CREARED"); - } - modalRef.close(); - }, - err => { - this.spinner.hide(); - this.notificationService.error(err); - modalRef.close(); - } - ); - }); - } - - openNewModal(name: string) { - var modalRef; - - switch (name) { - case "Couchbase": { - modalRef = this.modalService.open(CouchbaseComponent, { - size: "lg", - centered: true - }); - this.newDb(modalRef); - break; - } - case "Druid": { - modalRef = this.modalService.open(DruidComponent, { - size: "lg", - centered: true - }); - this.newDb(modalRef); - break; - } - case "Elasticsearch": { - modalRef = this.modalService.open(ElasticsearchComponent, { - size: "lg", - centered: true - }); - this.newDb(modalRef); - break; - } - case "MongoDB": { - modalRef = this.modalService.open(MongodbComponent, { - size: "lg", - centered: true - }); - this.newDb(modalRef); - break; - } - case "HDFS": { - modalRef = this.modalService.open(HdfsComponent, { - size: "lg", - centered: true - }); - this.newDb(modalRef); - break; - } - default: { - break; - } - } - } -} diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/couchbase/couchbase.component.css b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/couchbase/couchbase.component.css deleted file mode 100644 index 7752355c..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/couchbase/couchbase.component.css +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2019 CMCC, Inc. and others. All rights reserved. - - 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. -*/ -.row-wrapper{ - display: flex; -} -.row-quarter-item{ - width: 20%; - margin-bottom: 15px; -} -.row-half-item{ - width: 45%; -} -.row-half-item2{ - width: 50%; -} -.usual-item{ - margin-left: 2%; -} -.usual-item2{ - margin-left: 6.5%; -} -input::-webkit-input-placeholder { - font-size: 12px; - color: #999999 !important; -} -input:-moz-placeholder { - /* Mozilla Firefox 4 to 18 */ - font-size: 12px; - color: #999999 !important; -} -input::-moz-placeholder { - /* Mozilla Firefox 19+ */ - font-size: 12px; - color: #999999 !important; -} -input::-ms-input-placeholder { - /* Internet Explorer 10+ */ - font-size: 12px; - color: #999999 !important; -} - -.input_style { - width: 200px; -} 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 deleted file mode 100644 index 0eb67366..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/couchbase/couchbase.component.html +++ /dev/null @@ -1,164 +0,0 @@ -<!-- - Copyright (C) 2019 CMCC, Inc. and others. All rights reserved. - - 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. ---> -<div class="p-1"> - <div class="modal-header pb-0 border-0"> - <div class="container-fluid"> - <div class="row"> - <div class="col-md-12"> - <label class="dl-h3">{{ this.dbInputTitle }}</label> - </div> - </div> - <div class="row"> - <div class="col-md-12"> - <hr> - </div> - </div> - </div> - </div> - - <div class="modal-body border-0"> - <div class="container"> - - <div class="form-group row row-wrapper"> - <div class="row-half-item usual-item"> - <div> - <label class="dl-emphasis1" >{{ 'NAME' | translate }}</label> - </div> - <div> - <input [(ngModel)]="this.dbInput.name" class="form-control dl-input-text input_style" placeholder="" type="text"/> - </div> - </div> - - <div class="row-half-item usual-item"> - <div> - <label class="dl-emphasis1" >{{ 'STATUS' | translate }}</label> - </div> - <div> - <label class="dl-switch"> - <input [(ngModel)]="this.dbInput.enabled" id="switch" type="checkbox" /> - <span class="dl-slider round"></span> - </label> - </div> - </div> - </div> - - <div class="form-group row row-wrapper"> - <div class="row-half-item usual-item"> - <div> - <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="" required="required" /> - </div> - </div> - - <div class="row-half-item usual-item"> - <div> - <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="" required="required" /> - </div> - </div> - </div> - - <div class="form-group row row-wrapper"> - <div class="row-half-item usual-item"> - <div> - <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="" required="required" /> - </div> - </div> - - <div class="row-half-item usual-item"> - <div> - <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="" required="required" /> - </div> - </div> - </div> - - <div class="form-group row row-wrapper"> - <div class="row-half-item usual-item"> - <div> - <label class="dl-emphasis1">{{ 'SECURE_COMMUNICATION' | translate }}</label> - </div> - <div class="input-group" style="width: 120px"> - <label class="input-group-text dl-input-chk-label"> - <input [(ngModel)]="this.dbInput.encrypt" id="chkSaveRaw" type="checkbox" /> - <span class="dl-input-checkmark"></span> - </label> - <label class="form-control dl-input-chk" for="chkSaveRaw"> - Secure - </label> - </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> - - <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> - - - <div class="modal-footer border-0 pt-0 pb-2"> - <div class="container"> - <div class="row"> - <div class="col-md-6 p-0"> - - </div> - <div class="col-md-3 p-1"> - <span> - <button type="button" class="btn dl-btn-dark btn-block" (click)="this.passBack()"> - Save - </button> - </span> - </div> - <div class="col-md-3 p-1"> - <span> - <button type="button" class="btn dl-btn-light btn-block" (click)="activeModal.close('Close click')"> - Cancel - </button> - </span> - </div> - </div> - </div> - </div> -</div> - diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/couchbase/couchbase.component.spec.ts b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/couchbase/couchbase.component.spec.ts deleted file mode 100644 index e3de0b45..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/couchbase/couchbase.component.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * ============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 { CouchbaseComponent } from "./couchbase.component"; - -describe("CouchbaseComponent", () => { - let component: CouchbaseComponent; - let fixture: ComponentFixture<CouchbaseComponent>; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [CouchbaseComponent] - }).compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(CouchbaseComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it("should create", () => { - expect(component).toBeTruthy(); - }); -}); 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 deleted file mode 100644 index 5c347ad0..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/couchbase/couchbase.component.ts +++ /dev/null @@ -1,97 +0,0 @@ -/* - * ============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 - * - * @contributor Chunmeng Guo - * - */ - -import {Component, Input, Output, EventEmitter, ViewChild, ElementRef} 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"; -import {NgxSpinnerService} from "ngx-spinner"; - -@Component({ - selector: "app-couchbase", - templateUrl: "./couchbase.component.html", - styleUrls: ["./couchbase.component.css"] -}) -export class CouchbaseComponent { - @Output() passEntry: EventEmitter<any> = new EventEmitter(); - @Input() editDb: Db; - @Input() db: Db; - @Input() dbList_length; - dbInput: Db; - dbTypeIdList: Array<string> = ["CB"]; - @ViewChild("d_dbTypeId") d_dbTypeId: ElementRef; - - defaultDbType: string; - dbInputTitle = ""; - constructor( - public activeModal: NgbActiveModal, - public adminService: AdminService, - private spinner: NgxSpinnerService - ) { } - - ngOnInit() { - if (this.editDb == null) { - this.dbInput = new Db(); - const feed = { - id: null, - name: this.db.name, - enabled: this.db.enabled, - host: this.db.host, - port: this.db.port, - database: this.db.database, - encrypt: this.db.encrypt, - login: this.db.login, - pass: this.db.pass, - dbTypeId: this.db.dbTypeId - } - this.dbInput = feed; - this.dbInputTitle = "New Couchbase"; - console.log("create db"); - - } else { - this.dbInput = this.editDb; - this.dbInputTitle = "Edit" + "-" + this.editDb.dbTypeId + "-" + this.editDb.name; - this.defaultDbType = this.dbInput.dbTypeId; - console.log("edit db"); - } - } - - passBack() { - this.spinner.show(); - if (this.dbInput.name == '' || this.dbInput.name == undefined) { - return false; - } - this.editDb = this.dbInput; - this.editDb.dbTypeId = this.d_dbTypeId.nativeElement.value; - console.log(this.editDb, "db"); - this.passEntry.emit(this.editDb); - setTimeout(() => { - this.spinner.hide(); - }, 500); - } -} diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/druid/druid.component.css b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/druid/druid.component.css deleted file mode 100644 index 7752355c..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/druid/druid.component.css +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2019 CMCC, Inc. and others. All rights reserved. - - 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. -*/ -.row-wrapper{ - display: flex; -} -.row-quarter-item{ - width: 20%; - margin-bottom: 15px; -} -.row-half-item{ - width: 45%; -} -.row-half-item2{ - width: 50%; -} -.usual-item{ - margin-left: 2%; -} -.usual-item2{ - margin-left: 6.5%; -} -input::-webkit-input-placeholder { - font-size: 12px; - color: #999999 !important; -} -input:-moz-placeholder { - /* Mozilla Firefox 4 to 18 */ - font-size: 12px; - color: #999999 !important; -} -input::-moz-placeholder { - /* Mozilla Firefox 19+ */ - font-size: 12px; - color: #999999 !important; -} -input::-ms-input-placeholder { - /* Internet Explorer 10+ */ - font-size: 12px; - color: #999999 !important; -} - -.input_style { - width: 200px; -} 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 deleted file mode 100644 index 0eb67366..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/druid/druid.component.html +++ /dev/null @@ -1,164 +0,0 @@ -<!-- - Copyright (C) 2019 CMCC, Inc. and others. All rights reserved. - - 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. ---> -<div class="p-1"> - <div class="modal-header pb-0 border-0"> - <div class="container-fluid"> - <div class="row"> - <div class="col-md-12"> - <label class="dl-h3">{{ this.dbInputTitle }}</label> - </div> - </div> - <div class="row"> - <div class="col-md-12"> - <hr> - </div> - </div> - </div> - </div> - - <div class="modal-body border-0"> - <div class="container"> - - <div class="form-group row row-wrapper"> - <div class="row-half-item usual-item"> - <div> - <label class="dl-emphasis1" >{{ 'NAME' | translate }}</label> - </div> - <div> - <input [(ngModel)]="this.dbInput.name" class="form-control dl-input-text input_style" placeholder="" type="text"/> - </div> - </div> - - <div class="row-half-item usual-item"> - <div> - <label class="dl-emphasis1" >{{ 'STATUS' | translate }}</label> - </div> - <div> - <label class="dl-switch"> - <input [(ngModel)]="this.dbInput.enabled" id="switch" type="checkbox" /> - <span class="dl-slider round"></span> - </label> - </div> - </div> - </div> - - <div class="form-group row row-wrapper"> - <div class="row-half-item usual-item"> - <div> - <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="" required="required" /> - </div> - </div> - - <div class="row-half-item usual-item"> - <div> - <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="" required="required" /> - </div> - </div> - </div> - - <div class="form-group row row-wrapper"> - <div class="row-half-item usual-item"> - <div> - <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="" required="required" /> - </div> - </div> - - <div class="row-half-item usual-item"> - <div> - <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="" required="required" /> - </div> - </div> - </div> - - <div class="form-group row row-wrapper"> - <div class="row-half-item usual-item"> - <div> - <label class="dl-emphasis1">{{ 'SECURE_COMMUNICATION' | translate }}</label> - </div> - <div class="input-group" style="width: 120px"> - <label class="input-group-text dl-input-chk-label"> - <input [(ngModel)]="this.dbInput.encrypt" id="chkSaveRaw" type="checkbox" /> - <span class="dl-input-checkmark"></span> - </label> - <label class="form-control dl-input-chk" for="chkSaveRaw"> - Secure - </label> - </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> - - <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> - - - <div class="modal-footer border-0 pt-0 pb-2"> - <div class="container"> - <div class="row"> - <div class="col-md-6 p-0"> - - </div> - <div class="col-md-3 p-1"> - <span> - <button type="button" class="btn dl-btn-dark btn-block" (click)="this.passBack()"> - Save - </button> - </span> - </div> - <div class="col-md-3 p-1"> - <span> - <button type="button" class="btn dl-btn-light btn-block" (click)="activeModal.close('Close click')"> - Cancel - </button> - </span> - </div> - </div> - </div> - </div> -</div> - diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/druid/druid.component.spec.ts b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/druid/druid.component.spec.ts deleted file mode 100644 index 833fa410..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/druid/druid.component.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * ============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 { DruidComponent } from "./druid.component"; - -describe("DruidComponent", () => { - let component: DruidComponent; - let fixture: ComponentFixture<DruidComponent>; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [DruidComponent] - }).compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(DruidComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it("should create", () => { - expect(component).toBeTruthy(); - }); -}); 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 deleted file mode 100644 index cf4027a6..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/druid/druid.component.ts +++ /dev/null @@ -1,97 +0,0 @@ -/* - * ============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 - * - * @contributor Chunmeng Guo - * - */ - -import {Component, Input, Output, EventEmitter, ViewChild, ElementRef} 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"; -import {NgxSpinnerService} from "ngx-spinner"; - -@Component({ - selector: "app-druid", - templateUrl: "./druid.component.html", - styleUrls: ["./druid.component.css"] -}) -export class DruidComponent { - @Output() passEntry: EventEmitter<any> = new EventEmitter(); - @Input() editDb: Db; - @Input() db: Db; - @Input() dbList_length; - dbInput: Db; - dbTypeIdList: Array<string> = ["DRUID"]; - @ViewChild("d_dbTypeId") d_dbTypeId: ElementRef; - - defaultDbType: string; - dbInputTitle = ""; - constructor( - public activeModal: NgbActiveModal, - public adminService: AdminService, - private spinner: NgxSpinnerService - ) { } - - ngOnInit() { - if (this.editDb == null) { - this.dbInput = new Db(); - const feed = { - id: null, - name: this.db.name, - enabled: this.db.enabled, - host: this.db.host, - port: this.db.port, - database: this.db.database, - encrypt: this.db.encrypt, - login: this.db.login, - pass: this.db.pass, - dbTypeId: this.db.dbTypeId - } - this.dbInput = feed; - this.dbInputTitle = "New Druid"; - console.log("create db"); - - } else { - this.dbInput = this.editDb; - this.dbInputTitle = "Edit" + "-" + this.editDb.dbTypeId + "-" + this.editDb.name; - this.defaultDbType = this.dbInput.dbTypeId; - console.log("edit db"); - } - } - - passBack() { - this.spinner.show(); - if (this.dbInput.name == '' || this.dbInput.name == undefined) { - return false; - } - this.editDb = this.dbInput; - this.editDb.dbTypeId = this.d_dbTypeId.nativeElement.value; - console.log(this.editDb, "db"); - this.passEntry.emit(this.editDb); - setTimeout(() => { - this.spinner.hide(); - }, 500); - } -} diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.css b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.css deleted file mode 100644 index 7752355c..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.css +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2019 CMCC, Inc. and others. All rights reserved. - - 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. -*/ -.row-wrapper{ - display: flex; -} -.row-quarter-item{ - width: 20%; - margin-bottom: 15px; -} -.row-half-item{ - width: 45%; -} -.row-half-item2{ - width: 50%; -} -.usual-item{ - margin-left: 2%; -} -.usual-item2{ - margin-left: 6.5%; -} -input::-webkit-input-placeholder { - font-size: 12px; - color: #999999 !important; -} -input:-moz-placeholder { - /* Mozilla Firefox 4 to 18 */ - font-size: 12px; - color: #999999 !important; -} -input::-moz-placeholder { - /* Mozilla Firefox 19+ */ - font-size: 12px; - color: #999999 !important; -} -input::-ms-input-placeholder { - /* Internet Explorer 10+ */ - font-size: 12px; - color: #999999 !important; -} - -.input_style { - width: 200px; -} 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 deleted file mode 100644 index 0eb67366..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.html +++ /dev/null @@ -1,164 +0,0 @@ -<!-- - Copyright (C) 2019 CMCC, Inc. and others. All rights reserved. - - 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. ---> -<div class="p-1"> - <div class="modal-header pb-0 border-0"> - <div class="container-fluid"> - <div class="row"> - <div class="col-md-12"> - <label class="dl-h3">{{ this.dbInputTitle }}</label> - </div> - </div> - <div class="row"> - <div class="col-md-12"> - <hr> - </div> - </div> - </div> - </div> - - <div class="modal-body border-0"> - <div class="container"> - - <div class="form-group row row-wrapper"> - <div class="row-half-item usual-item"> - <div> - <label class="dl-emphasis1" >{{ 'NAME' | translate }}</label> - </div> - <div> - <input [(ngModel)]="this.dbInput.name" class="form-control dl-input-text input_style" placeholder="" type="text"/> - </div> - </div> - - <div class="row-half-item usual-item"> - <div> - <label class="dl-emphasis1" >{{ 'STATUS' | translate }}</label> - </div> - <div> - <label class="dl-switch"> - <input [(ngModel)]="this.dbInput.enabled" id="switch" type="checkbox" /> - <span class="dl-slider round"></span> - </label> - </div> - </div> - </div> - - <div class="form-group row row-wrapper"> - <div class="row-half-item usual-item"> - <div> - <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="" required="required" /> - </div> - </div> - - <div class="row-half-item usual-item"> - <div> - <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="" required="required" /> - </div> - </div> - </div> - - <div class="form-group row row-wrapper"> - <div class="row-half-item usual-item"> - <div> - <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="" required="required" /> - </div> - </div> - - <div class="row-half-item usual-item"> - <div> - <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="" required="required" /> - </div> - </div> - </div> - - <div class="form-group row row-wrapper"> - <div class="row-half-item usual-item"> - <div> - <label class="dl-emphasis1">{{ 'SECURE_COMMUNICATION' | translate }}</label> - </div> - <div class="input-group" style="width: 120px"> - <label class="input-group-text dl-input-chk-label"> - <input [(ngModel)]="this.dbInput.encrypt" id="chkSaveRaw" type="checkbox" /> - <span class="dl-input-checkmark"></span> - </label> - <label class="form-control dl-input-chk" for="chkSaveRaw"> - Secure - </label> - </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> - - <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> - - - <div class="modal-footer border-0 pt-0 pb-2"> - <div class="container"> - <div class="row"> - <div class="col-md-6 p-0"> - - </div> - <div class="col-md-3 p-1"> - <span> - <button type="button" class="btn dl-btn-dark btn-block" (click)="this.passBack()"> - Save - </button> - </span> - </div> - <div class="col-md-3 p-1"> - <span> - <button type="button" class="btn dl-btn-light btn-block" (click)="activeModal.close('Close click')"> - Cancel - </button> - </span> - </div> - </div> - </div> - </div> -</div> - diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.spec.ts b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.spec.ts deleted file mode 100644 index 57798da3..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * ============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 { ElasticsearchComponent } from "./elasticsearch.component"; - -describe("ElasticsearchComponent", () => { - let component: ElasticsearchComponent; - let fixture: ComponentFixture<ElasticsearchComponent>; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ElasticsearchComponent] - }).compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ElasticsearchComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it("should create", () => { - expect(component).toBeTruthy(); - }); -}); 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 deleted file mode 100644 index 4331bc7e..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/elasticsearch/elasticsearch.component.ts +++ /dev/null @@ -1,97 +0,0 @@ -/* - * ============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 - * - * @contributor Chunmeng Guo - * - */ - -import {Component, Input, Output, EventEmitter, ViewChild, ElementRef} 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"; -import {NgxSpinnerService} from "ngx-spinner"; - -@Component({ - selector: "app-elasticsearch", - templateUrl: "./elasticsearch.component.html", - styleUrls: ["./elasticsearch.component.css"] -}) -export class ElasticsearchComponent { - @Output() passEntry: EventEmitter<any> = new EventEmitter(); - @Input() editDb: Db; - @Input() db: Db; - @Input() dbList_length; - dbInput: Db; - dbTypeIdList: Array<string> = ["ES"]; - @ViewChild("d_dbTypeId") d_dbTypeId: ElementRef; - - defaultDbType: string; - dbInputTitle = ""; - constructor( - public activeModal: NgbActiveModal, - public adminService: AdminService, - private spinner: NgxSpinnerService - ) { } - - ngOnInit() { - if (this.editDb == null) { - this.dbInput = new Db(); - const feed = { - id: null, - name: this.db.name, - enabled: this.db.enabled, - host: this.db.host, - port: this.db.port, - database: this.db.database, - encrypt: this.db.encrypt, - login: this.db.login, - pass: this.db.pass, - dbTypeId: this.db.dbTypeId - } - this.dbInput = feed; - this.dbInputTitle = "New Elasticsearch"; - console.log("create db"); - - } else { - this.dbInput = this.editDb; - this.dbInputTitle = "Edit" + "-" + this.editDb.dbTypeId + "-" + this.editDb.name; - this.defaultDbType = this.dbInput.dbTypeId; - console.log("edit db"); - } - } - - passBack() { - this.spinner.show(); - if (this.dbInput.name == '' || this.dbInput.name == undefined) { - return false; - } - this.editDb = this.dbInput; - this.editDb.dbTypeId = this.d_dbTypeId.nativeElement.value; - console.log(this.editDb, "db"); - this.passEntry.emit(this.editDb); - setTimeout(() => { - this.spinner.hide(); - }, 500); - } -} diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/hdfs/hdfs.component.css b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/hdfs/hdfs.component.css deleted file mode 100644 index 7752355c..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/hdfs/hdfs.component.css +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2019 CMCC, Inc. and others. All rights reserved. - - 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. -*/ -.row-wrapper{ - display: flex; -} -.row-quarter-item{ - width: 20%; - margin-bottom: 15px; -} -.row-half-item{ - width: 45%; -} -.row-half-item2{ - width: 50%; -} -.usual-item{ - margin-left: 2%; -} -.usual-item2{ - margin-left: 6.5%; -} -input::-webkit-input-placeholder { - font-size: 12px; - color: #999999 !important; -} -input:-moz-placeholder { - /* Mozilla Firefox 4 to 18 */ - font-size: 12px; - color: #999999 !important; -} -input::-moz-placeholder { - /* Mozilla Firefox 19+ */ - font-size: 12px; - color: #999999 !important; -} -input::-ms-input-placeholder { - /* Internet Explorer 10+ */ - font-size: 12px; - color: #999999 !important; -} - -.input_style { - width: 200px; -} 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 deleted file mode 100644 index a12165cd..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/hdfs/hdfs.component.html +++ /dev/null @@ -1,144 +0,0 @@ -<!-- - Copyright (C) 2019 CMCC, Inc. and others. All rights reserved. - - 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. ---> -<div class="p-1"> - <div class="modal-header pb-0 border-0"> - <div class="container-fluid"> - <div class="row"> - <div class="col-md-12"> - <label class="dl-h3">{{ this.dbInputTitle }}</label> - </div> - </div> - <div class="row"> - <div class="col-md-12"> - <hr> - </div> - </div> - </div> - </div> - - <div class="modal-body border-0"> - <div class="container"> - - <div class="form-group row row-wrapper"> - <div class="row-half-item usual-item"> - <div> - <label class="dl-emphasis1" >{{ 'NAME' | translate }}</label> - </div> - <div> - <input [(ngModel)]="this.dbInput.name" class="form-control dl-input-text input_style" placeholder="" type="text"/> - </div> - </div> - - <div class="row-half-item usual-item"> - <div> - <label class="dl-emphasis1" >{{ 'STATUS' | translate }}</label> - </div> - <div> - <label class="dl-switch"> - <input [(ngModel)]="this.dbInput.enabled" id="switch" type="checkbox" /> - <span class="dl-slider round"></span> - </label> - </div> - </div> - </div> - - <div class="form-group row row-wrapper"> - <div class="row-half-item usual-item"> - <div> - <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="" required="required" /> - </div> - </div> - - <div class="row-half-item usual-item"> - <div> - <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="" required="required" /> - </div> - </div> - </div> - - <div class="form-group row row-wrapper"> - <div class="row-half-item usual-item"> - <div> - <label class="dl-emphasis1">{{ 'SECURE_COMMUNICATION' | translate }}</label> - </div> - <div class="input-group" style="width: 120px"> - <label class="input-group-text dl-input-chk-label"> - <input [(ngModel)]="this.dbInput.encrypt" id="chkSaveRaw" type="checkbox" /> - <span class="dl-input-checkmark"></span> - </label> - <label class="form-control dl-input-chk" for="chkSaveRaw"> - Secure - </label> - </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> - - <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> - - - <div class="modal-footer border-0 pt-0 pb-2"> - <div class="container"> - <div class="row"> - <div class="col-md-6 p-0"> - - </div> - <div class="col-md-3 p-1"> - <span> - <button type="button" class="btn dl-btn-dark btn-block" (click)="this.passBack()"> - Save - </button> - </span> - </div> - <div class="col-md-3 p-1"> - <span> - <button type="button" class="btn dl-btn-light btn-block" (click)="activeModal.close('Close click')"> - Cancel - </button> - </span> - </div> - </div> - </div> - </div> -</div> - diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/hdfs/hdfs.component.spec.ts b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/hdfs/hdfs.component.spec.ts deleted file mode 100644 index dafbdadc..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/hdfs/hdfs.component.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * ============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<HdfsComponent>; - - 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/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 deleted file mode 100644 index f471e828..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/hdfs/hdfs.component.ts +++ /dev/null @@ -1,97 +0,0 @@ -/* - * ============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 - * - * @contributor Chunmeng Guo - * - */ - -import {Component, Input, Output, EventEmitter, ViewChild, ElementRef} 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"; -import {NgxSpinnerService} from "ngx-spinner"; - -@Component({ - selector: "app-hdfs", - templateUrl: "./hdfs.component.html", - styleUrls: ["./hdfs.component.css"] -}) -export class HdfsComponent { - @Output() passEntry: EventEmitter<any> = new EventEmitter(); - @Input() editDb: Db; - @Input() db: Db; - @Input() dbList_length; - dbInput: Db; - dbTypeIdList: Array<string> = ["HDFS"]; - @ViewChild("d_dbTypeId") d_dbTypeId: ElementRef; - - defaultDbType: string; - dbInputTitle = ""; - constructor( - public activeModal: NgbActiveModal, - public adminService: AdminService, - private spinner: NgxSpinnerService - ) { } - - ngOnInit() { - if (this.editDb == null) { - this.dbInput = new Db(); - const feed = { - id: null, - name: this.db.name, - enabled: this.db.enabled, - host: this.db.host, - port: this.db.port, - database: this.db.database, - encrypt: this.db.encrypt, - login: this.db.login, - pass: this.db.pass, - dbTypeId: this.db.dbTypeId - } - this.dbInput = feed; - this.dbInputTitle = "New Hdfs"; - console.log("create db"); - - } else { - this.dbInput = this.editDb; - this.dbInputTitle = "Edit" + "-" + this.editDb.dbTypeId + "-" + this.editDb.name; - this.defaultDbType = this.dbInput.dbTypeId; - console.log("edit db"); - } - } - - passBack() { - this.spinner.show(); - if (this.dbInput.name == '' || this.dbInput.name == undefined) { - return false; - } - this.editDb = this.dbInput; - this.editDb.dbTypeId = this.d_dbTypeId.nativeElement.value; - console.log(this.editDb, "db"); - this.passEntry.emit(this.editDb); - setTimeout(() => { - this.spinner.hide(); - }, 500); - } -} diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb/mongodb.component.css b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb/mongodb.component.css deleted file mode 100644 index 7752355c..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb/mongodb.component.css +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2019 CMCC, Inc. and others. All rights reserved. - - 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. -*/ -.row-wrapper{ - display: flex; -} -.row-quarter-item{ - width: 20%; - margin-bottom: 15px; -} -.row-half-item{ - width: 45%; -} -.row-half-item2{ - width: 50%; -} -.usual-item{ - margin-left: 2%; -} -.usual-item2{ - margin-left: 6.5%; -} -input::-webkit-input-placeholder { - font-size: 12px; - color: #999999 !important; -} -input:-moz-placeholder { - /* Mozilla Firefox 4 to 18 */ - font-size: 12px; - color: #999999 !important; -} -input::-moz-placeholder { - /* Mozilla Firefox 19+ */ - font-size: 12px; - color: #999999 !important; -} -input::-ms-input-placeholder { - /* Internet Explorer 10+ */ - font-size: 12px; - color: #999999 !important; -} - -.input_style { - width: 200px; -} 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 deleted file mode 100644 index 0eb67366..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb/mongodb.component.html +++ /dev/null @@ -1,164 +0,0 @@ -<!-- - Copyright (C) 2019 CMCC, Inc. and others. All rights reserved. - - 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. ---> -<div class="p-1"> - <div class="modal-header pb-0 border-0"> - <div class="container-fluid"> - <div class="row"> - <div class="col-md-12"> - <label class="dl-h3">{{ this.dbInputTitle }}</label> - </div> - </div> - <div class="row"> - <div class="col-md-12"> - <hr> - </div> - </div> - </div> - </div> - - <div class="modal-body border-0"> - <div class="container"> - - <div class="form-group row row-wrapper"> - <div class="row-half-item usual-item"> - <div> - <label class="dl-emphasis1" >{{ 'NAME' | translate }}</label> - </div> - <div> - <input [(ngModel)]="this.dbInput.name" class="form-control dl-input-text input_style" placeholder="" type="text"/> - </div> - </div> - - <div class="row-half-item usual-item"> - <div> - <label class="dl-emphasis1" >{{ 'STATUS' | translate }}</label> - </div> - <div> - <label class="dl-switch"> - <input [(ngModel)]="this.dbInput.enabled" id="switch" type="checkbox" /> - <span class="dl-slider round"></span> - </label> - </div> - </div> - </div> - - <div class="form-group row row-wrapper"> - <div class="row-half-item usual-item"> - <div> - <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="" required="required" /> - </div> - </div> - - <div class="row-half-item usual-item"> - <div> - <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="" required="required" /> - </div> - </div> - </div> - - <div class="form-group row row-wrapper"> - <div class="row-half-item usual-item"> - <div> - <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="" required="required" /> - </div> - </div> - - <div class="row-half-item usual-item"> - <div> - <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="" required="required" /> - </div> - </div> - </div> - - <div class="form-group row row-wrapper"> - <div class="row-half-item usual-item"> - <div> - <label class="dl-emphasis1">{{ 'SECURE_COMMUNICATION' | translate }}</label> - </div> - <div class="input-group" style="width: 120px"> - <label class="input-group-text dl-input-chk-label"> - <input [(ngModel)]="this.dbInput.encrypt" id="chkSaveRaw" type="checkbox" /> - <span class="dl-input-checkmark"></span> - </label> - <label class="form-control dl-input-chk" for="chkSaveRaw"> - Secure - </label> - </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> - - <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> - - - <div class="modal-footer border-0 pt-0 pb-2"> - <div class="container"> - <div class="row"> - <div class="col-md-6 p-0"> - - </div> - <div class="col-md-3 p-1"> - <span> - <button type="button" class="btn dl-btn-dark btn-block" (click)="this.passBack()"> - Save - </button> - </span> - </div> - <div class="col-md-3 p-1"> - <span> - <button type="button" class="btn dl-btn-light btn-block" (click)="activeModal.close('Close click')"> - Cancel - </button> - </span> - </div> - </div> - </div> - </div> -</div> - diff --git a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb/mongodb.component.spec.ts b/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb/mongodb.component.spec.ts deleted file mode 100644 index a9ff1b8d..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb/mongodb.component.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * ============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 { MongodbComponent } from "./mongodb.component"; - -describe("MongodbComponent", () => { - let component: MongodbComponent; - let fixture: ComponentFixture<MongodbComponent>; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [MongodbComponent] - }).compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(MongodbComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it("should create", () => { - expect(component).toBeTruthy(); - }); -}); 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 deleted file mode 100644 index bcd2e880..00000000 --- a/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb/mongodb.component.ts +++ /dev/null @@ -1,97 +0,0 @@ -/* - * ============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 - * - * @contributor Chunmeng Guo - * - */ - -import {Component, Input, Output, EventEmitter, ViewChild, ElementRef} 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"; -import {NgxSpinnerService} from "ngx-spinner"; - -@Component({ - selector: "app-mongodb", - templateUrl: "./mongodb.component.html", - styleUrls: ["./mongodb.component.css"] -}) -export class MongodbComponent { - @Output() passEntry: EventEmitter<any> = new EventEmitter(); - @Input() editDb: Db; - @Input() db: Db; - @Input() dbList_length; - dbInput: Db; - dbTypeIdList: Array<string> = ["MONGO"]; - @ViewChild("d_dbTypeId") d_dbTypeId: ElementRef; - - defaultDbType: string; - dbInputTitle = ""; - constructor( - public activeModal: NgbActiveModal, - public adminService: AdminService, - private spinner: NgxSpinnerService - ) { } - - ngOnInit() { - if (this.editDb == null) { - this.dbInput = new Db(); - const feed = { - id: null, - name: this.db.name, - enabled: this.db.enabled, - host: this.db.host, - port: this.db.port, - database: this.db.database, - encrypt: this.db.encrypt, - login: this.db.login, - pass: this.db.pass, - dbTypeId: this.db.dbTypeId - } - this.dbInput = feed; - this.dbInputTitle = "New MongoDb"; - console.log("create db"); - - } else { - this.dbInput = this.editDb; - this.dbInputTitle = "Edit" + "-" + this.editDb.dbTypeId + "-" + this.editDb.name; - this.defaultDbType = this.dbInput.dbTypeId; - console.log("edit db"); - } - } - - passBack() { - this.spinner.show(); - if (this.dbInput.name == '' || this.dbInput.name == undefined) { - return false; - } - this.editDb = this.dbInput; - this.editDb.dbTypeId = this.d_dbTypeId.nativeElement.value; - console.log(this.editDb, "db"); - this.passEntry.emit(this.editDb); - setTimeout(() => { - this.spinner.hide(); - }, 500); - } -} |