This repository has been archived by the owner on Nov 22, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
1,220 additions
and
1,644 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
ngapp/src/app/connections/add-connection-wizard/add-connection-wizard.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.add-connection-form { | ||
padding: 15px | ||
} | ||
|
||
.add-connection-form /*.form-instructions*/ { | ||
font-size: 15px; | ||
padding-top: 10px | ||
} | ||
|
||
.add-connection-form .form-instructions ol { | ||
padding-left: 20px; | ||
} | ||
|
||
.wizard-pf-failed-icon { | ||
color: #9c3535; | ||
font-size: 67px; | ||
line-height: 67px; | ||
} |
111 changes: 111 additions & 0 deletions
111
ngapp/src/app/connections/add-connection-wizard/add-connection-wizard.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
<pfng-wizard #wizard | ||
[config]="wizardConfig" | ||
(onCancel)="cancelClicked($event)" | ||
(onNext)="nextClicked($event)" | ||
(onStepChange)="stepChanged($event)"> | ||
<!-- ------------------------- --> | ||
<!-- Step 1 : Basic Properties --> | ||
<!-- ------------------------- --> | ||
<pfng-wizard-step [config]="step1Config"> | ||
<h3><i>{{ step1InstructionMessage }}</i></h3> | ||
<div *ngIf="!templatesLoaded"> | ||
<div class="spinner spinner-lg blank-slate-pf-icon"></div> | ||
</div> | ||
<form [formGroup]=basicPropertyForm class="form-horizontal" *ngIf="templatesLoaded"> | ||
<div [ngClass]="driverValid ? 'form-group' : 'form-group has-error'"> | ||
<label class="col-sm-2 control-label">Connection Type</label> | ||
<div class="col-sm-10"> | ||
<select class="form-control" formControlName="driver" title=""> | ||
<option value="" selected hidden>-- Select a Connection Type ---</option> | ||
<option *ngFor="let driver of templateNames" [value]="driver">{{ driver }}</option> | ||
</select> | ||
<div class="help-block" *ngIf="!driverValid">{{ getBasicPropertyErrorMessage("driver") }}</div> | ||
</div> | ||
</div> | ||
|
||
<div [ngClass]="nameValid ? 'form-group' : 'form-group has-error'"> | ||
<label class="col-sm-2 control-label">Name</label> | ||
<div class="col-sm-10"> | ||
<input class="form-control" formControlName="name" title=""> | ||
<div class="help-block" *ngIf="!nameValid">{{ getBasicPropertyErrorMessage("name") }}</div> | ||
</div> | ||
</div> | ||
<div [ngClass]="jndiValid ? 'form-group' : 'form-group has-error'"> | ||
<label class="col-sm-2 control-label">JNDI Identifier</label> | ||
<div class="col-sm-10"> | ||
<input class="form-control" formControlName="jndi" title=""> | ||
<div class="help-block" *ngIf="!jndiValid">{{ getBasicPropertyErrorMessage("jndi") }}</div> | ||
</div> | ||
</div> | ||
</form> | ||
</pfng-wizard-step> | ||
<!-- ---------------------------- --> | ||
<!-- Step 2 : Advanced Properties --> | ||
<!-- ---------------------------- --> | ||
<pfng-wizard-step [config]="step2Config"> | ||
<h3><i>{{ step2InstructionMessage }}</i></h3> | ||
<div *ngIf="!detailPropertiesLoaded"> | ||
<div class="spinner spinner-lg blank-slate-pf-icon"></div> | ||
</div> | ||
<div class="add-connection-form row" *ngIf="detailPropertiesLoaded"> | ||
<app-property-form [formProperties]="getPropertyDefinitions()"></app-property-form> | ||
</div> | ||
</pfng-wizard-step> | ||
<!-- -------------------------- --> | ||
<!-- Step 3 : Review and Create --> | ||
<!-- -------------------------- --> | ||
<pfng-wizard-step [config]="step3Config"> | ||
<!-- Step 3A: Review --> | ||
<pfng-wizard-substep [config]="step3aConfig"> | ||
<h3><i>{{ step3InstructionMessage }}</i></h3> | ||
<h4>Connection Properties:</h4> | ||
<form class="form-horizontal"> | ||
<div class="form-group"> | ||
<label class="col-sm-2 control-label">Connection Type:</label> | ||
<label class="col-sm-10">{{ connectionDriverName }}</label> | ||
</div> | ||
<div class="form-group"> | ||
<label class="col-sm-2 control-label">Name:</label> | ||
<label class="col-sm-10">{{ connectionName }}</label> | ||
</div> | ||
<div class="form-group"> | ||
<label class="col-sm-2 control-label">JNDI Identifier:</label> | ||
<label class="col-sm-10">{{ connectionJndiName }}</label> | ||
</div> | ||
</form> | ||
<h4>Connection Detail Required Properties:</h4> | ||
<form class="form-horizontal"> | ||
<div *ngFor="let prop of requiredPropertyValues"> | ||
<div class="form-group"> | ||
<label class="col-sm-2 control-label">{{ prop[0] }}:</label> | ||
<label class="col-sm-10">{{ prop[1] }}</label> | ||
</div> | ||
</div> | ||
</form> | ||
</pfng-wizard-substep> | ||
<!-- Step 3B: Create --> | ||
<pfng-wizard-substep [config]="step3bConfig" (onShow)="createConnection()"> | ||
<div class="wizard-pf-contents"> | ||
<!-- In progress --> | ||
<div class="wizard-pf-process blank-slate-pf" *ngIf="!createComplete"> | ||
<div class="spinner spinner-lg blank-slate-pf-icon"></div> | ||
<h3 class="blank-slate-pf-main-action">Creation in progress</h3> | ||
<p class="blank-slate-pf-secondary-action">The connection is being created. </p> | ||
</div> | ||
<!-- Create Successful --> | ||
<div class="wizard-pf-complete blank-slate-pf" *ngIf="createComplete && createSuccessful"> | ||
<div class="wizard-pf-success-icon"><span class="glyphicon glyphicon-ok-circle"></span></div> | ||
<h3 class="blank-slate-pf-main-action">Creation was successful</h3> | ||
<p class="blank-slate-pf-secondary-action">The connection was created successfully. Click on the button to see all connections.</p> | ||
<a class="btn btn-lg btn-primary" [routerLink]="[connectionSummaryLink]">View All Connections</a> | ||
</div> | ||
<!-- Create Failed --> | ||
<div class="wizard-pf-complete blank-slate-pf" *ngIf="createComplete && !createSuccessful"> | ||
<div class="wizard-pf-failed-icon"><span class="glyphicon glyphicon-remove-circle"></span></div> | ||
<h3 class="blank-slate-pf-main-action">Creation failed</h3> | ||
<p class="blank-slate-pf-secondary-action">The connection creation failed. Correct any properties and retry.</p> | ||
</div> | ||
</div> | ||
</pfng-wizard-substep> | ||
</pfng-wizard-step> | ||
</pfng-wizard> |
36 changes: 36 additions & 0 deletions
36
ngapp/src/app/connections/add-connection-wizard/add-connection-wizard.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { async, ComponentFixture, TestBed } from "@angular/core/testing"; | ||
|
||
import {FormGroup, FormsModule, ReactiveFormsModule} from "@angular/forms"; | ||
import {RouterTestingModule} from "@angular/router/testing"; | ||
import {CoreModule} from "@core/core.module"; | ||
import {PropertyFormPropertyComponent} from "@shared/property-form/property-form-property/property-form-property.component"; | ||
import {PropertyFormComponent} from "@shared/property-form/property-form.component"; | ||
import {SharedModule} from "@shared/shared.module"; | ||
import {PatternFlyNgModule, WizardConfig, WizardStepComponent} from "patternfly-ng"; | ||
import { AddConnectionWizardComponent } from "./add-connection-wizard.component"; | ||
|
||
describe("AddConnectionWizardComponent", () => { | ||
let component: AddConnectionWizardComponent; | ||
let fixture: ComponentFixture<AddConnectionWizardComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
imports: [ CoreModule, FormsModule, PatternFlyNgModule, ReactiveFormsModule, RouterTestingModule, SharedModule ], | ||
declarations: [ AddConnectionWizardComponent, FormGroup, PropertyFormComponent, PropertyFormPropertyComponent, | ||
WizardConfig, WizardStepComponent ] | ||
}) | ||
.compileComponents().then(() => { | ||
// nothing to do | ||
}); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(AddConnectionWizardComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it("should be created", () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.