diff --git a/ngapp/src/app/connections/add-connection/add-connection-form/add-connection-form.component.css b/ngapp/src/app/connections/add-connection/add-connection-form/add-connection-form.component.css deleted file mode 100644 index 491084a8..00000000 --- a/ngapp/src/app/connections/add-connection/add-connection-form/add-connection-form.component.css +++ /dev/null @@ -1,60 +0,0 @@ -select { - width: auto; -} - -.create-connection-form-panel.dragging { - border: 1px dashed #39a5dc; - background-color: #eef; -} - -.create-connection-form-panel { - padding-top: 25px; -} - -span.disabled { - color: #999; -} - -.dropdown ul { - max-height: 250px; - overflow: auto; -} - -div.spinner { - display: inline-block; - margin-right: 5px; -} - -.platform-toggle { - display: inline-block; - text-align: center; - cursor: pointer; - border: 1px solid transparent; - padding: 5px; - margin-right: 8px; - border-radius: 3px; -} -.platform-toggle:hover { - border: 1px solid #bee1f4; - background-color: #def3ff; -} -.platform-toggle.selected { - background-color: #0088ce; - color: white; - cursor: default; - border: 1px solid transparent; -} -.platform-toggle.disabled { - opacity: 0.6; - cursor: not-allowed; -} -.platform-toggle span.fa { - font-size: 32px; -} -.platform-toggle span.lbl { - font-size: 14px; -} - -.account-link-warning { - margin-top: 10px; -} diff --git a/ngapp/src/app/connections/add-connection/add-connection-form/add-connection-form.component.html b/ngapp/src/app/connections/add-connection/add-connection-form/add-connection-form.component.html deleted file mode 100644 index 0c42ee26..00000000 --- a/ngapp/src/app/connections/add-connection/add-connection-form/add-connection-form.component.html +++ /dev/null @@ -1,42 +0,0 @@ -
-

Connection Properties

-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
-
- - -
-
-
-
diff --git a/ngapp/src/app/connections/add-connection/add-connection-form/add-connection-form.component.spec.ts b/ngapp/src/app/connections/add-connection/add-connection-form/add-connection-form.component.spec.ts deleted file mode 100644 index 947a91f5..00000000 --- a/ngapp/src/app/connections/add-connection/add-connection-form/add-connection-form.component.spec.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FormsModule } from '@angular/forms'; -import { AddConnectionFormComponent } from './add-connection-form.component'; -import { RouterTestingModule } from '@angular/router/testing'; - -describe('AddConnectionFormComponent', () => { - let component: AddConnectionFormComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [ FormsModule, RouterTestingModule ], - declarations: [ AddConnectionFormComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(AddConnectionFormComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should be created', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/ngapp/src/app/connections/add-connection/add-connection-form/add-connection-form.component.ts b/ngapp/src/app/connections/add-connection/add-connection-form/add-connection-form.component.ts deleted file mode 100644 index 5ebdd104..00000000 --- a/ngapp/src/app/connections/add-connection/add-connection-form/add-connection-form.component.ts +++ /dev/null @@ -1,63 +0,0 @@ -/** - * @license - * Copyright 2017 JBoss Inc - * - * 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. - */ - -import { Component, EventEmitter, OnInit, Output } from '@angular/core'; -import { Router } from '@angular/router'; - -import { NewConnection } from '@connections/shared/new-connection.model'; - -@Component({ - selector: 'app-add-connection-form', - templateUrl: './add-connection-form.component.html', - styleUrls: ['./add-connection-form.component.css'] -}) -export class AddConnectionFormComponent implements OnInit { - - @Output() onCreateConnection = new EventEmitter(); - - model = new NewConnection(); - creatingConnection = false; - - constructor( private router: Router ) { } - - ngOnInit() { - } - - get currentConnection() { return JSON.stringify(this.model); } - - /** - * Called when the user clicks the "Create Connection" submit button on the form. - */ - public createConnection(): void { - const connection: NewConnection = new NewConnection(); - connection.setName(this.model.getName()); - connection.setJndiName(this.model.getJndiName()); - connection.setDriverName(this.model.getDriverName()); - connection.setJdbc(this.model.isJdbc()); - - console.log('[AddConnectionFormComponent] Firing create-connection event: %o', connection); - - this.creatingConnection = true; - this.onCreateConnection.emit(connection); - } - - public cancelAdd(): void { - const link: string[] = [ '/connections' ]; - this.router.navigate(link); - } - -} diff --git a/ngapp/src/app/connections/add-connection/add-connection.component.spec.ts b/ngapp/src/app/connections/add-connection/add-connection.component.spec.ts index 06f3c190..0e58c22e 100644 --- a/ngapp/src/app/connections/add-connection/add-connection.component.spec.ts +++ b/ngapp/src/app/connections/add-connection/add-connection.component.spec.ts @@ -2,7 +2,7 @@ import {async, ComponentFixture, TestBed} from '@angular/core/testing'; import {RouterTestingModule} from '@angular/router/testing'; import {AddConnectionComponent} from './add-connection.component'; -import {AddConnectionFormComponent} from "@connections/add-connection/add-connection-form/add-connection-form.component"; +import {AddConnectionFormComponent} from "@connections/shared/add-connection-form/add-connection-form.component"; import {FormsModule} from "@angular/forms"; import {ConnectionService} from "@connections/shared/connection.service"; import {MockConnectionService} from "@connections/shared/mock-connection.service";