summaryrefslogtreecommitdiffstats
path: root/components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb
diff options
context:
space:
mode:
Diffstat (limited to 'components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb')
-rw-r--r--components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb/mongodb.component.css57
-rw-r--r--components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb/mongodb.component.html164
-rw-r--r--components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb/mongodb.component.spec.ts44
-rw-r--r--components/datalake-handler/admin/src/src/app/views/database/database-list/dbs-modal/mongodb/mongodb.component.ts97
4 files changed, 0 insertions, 362 deletions
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);
- }
-}