summaryrefslogtreecommitdiffstats
path: root/cds-ui/client
diff options
context:
space:
mode:
Diffstat (limited to 'cds-ui/client')
-rw-r--r--cds-ui/client/src/app/app-routing.module.ts30
-rw-r--r--cds-ui/client/src/app/app.module.ts6
-rw-r--r--cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.html15
-rw-r--r--cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.scss10
-rw-r--r--cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.ts43
-rw-r--r--cds-ui/client/src/app/common/shared/shared.module.ts6
6 files changed, 81 insertions, 29 deletions
diff --git a/cds-ui/client/src/app/app-routing.module.ts b/cds-ui/client/src/app/app-routing.module.ts
index 8a33f224a..22e488749 100644
--- a/cds-ui/client/src/app/app-routing.module.ts
+++ b/cds-ui/client/src/app/app-routing.module.ts
@@ -21,28 +21,20 @@ limitations under the License.
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
-// import { AboutComponent } from './common/shared/components/about/about.component';
-// import { PageNotFoundComponent } from './common/shared/components/page-not-found/page-not-found.component';
-// import { SelectTemplateComponent } from './feature-module/select-template/select-template.component';
-// import { HomeComponent } from './common/shared/components/home/home.component';
+import { HomeComponent } from './common/shared/components/home/home.component';
const routes: Routes = [
-// {
-// path: '',
-// component: HomeComponent,
-// children: [
-// {
-// path: '',
-// component: AboutComponent
-
-// },
-// {
-// path: 'controllerBlueprint',
-// loadChildren: './feature-module/controller-blueprint/controller-blueprint.module#ControllerBlueprintModule'
-// }
-// ]
-// }
+{
+ path: '',
+ component: HomeComponent,
+ children: [
+ {
+ path: 'blueprint',
+ loadChildren: './feature-modules/blueprint/blueprint.module#BlueprintModule'
+ }
+ ]
+}
];
@NgModule({
diff --git a/cds-ui/client/src/app/app.module.ts b/cds-ui/client/src/app/app.module.ts
index 25ea016fa..d61731dde 100644
--- a/cds-ui/client/src/app/app.module.ts
+++ b/cds-ui/client/src/app/app.module.ts
@@ -30,6 +30,9 @@ import { HttpClientModule } from '@angular/common/http';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
+import { SharedModule } from './common/shared/shared.module';
+
+
// import { blueprintReducer } from './common/store/reducers/blueprint.reducer';
// import { HeaderComponent, AboutComponent, PageNotFoundComponent, HomeComponent } from './common/shared/components/index';
// import { SharedModule } from './common/shared/shared.module';
@@ -65,7 +68,8 @@ import { AppComponent } from './app.component';
MatRadioModule,
MatFormFieldModule,
MatStepperModule,
- HttpClientModule
+ HttpClientModule,
+ SharedModule
],
providers: [],
bootstrap: [AppComponent]
diff --git a/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.html b/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.html
index c76be7691..1bff1aba1 100644
--- a/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.html
+++ b/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.html
@@ -18,7 +18,7 @@ See the License for the specific language governing permissions and
limitations under the License.
============LICENSE_END============================================
-->
-<mat-card class="CBAform">
+<!-- <mat-card class="CBAform">
<mat-card-content>
<mat-horizontal-stepper [linear]=true #stepper (selectionChange)="changeRoute($event)">
<div *ngFor="let step of stepDetails">
@@ -29,4 +29,17 @@ limitations under the License.
</div>
</mat-horizontal-stepper>
</mat-card-content>
+</mat-card> -->
+
+<mat-card class="CBAform">
+ <mat-card-content>
+ <mat-horizontal-stepper [linear]=true #stepper (selectionChange)="changeRoute($event)">
+ <a *ngFor="let routeLink of routeLinks; let i = index;">
+ <mat-step>
+ <ng-template matStepLabel>{{routeLink.label}}
+ </ng-template>
+ </mat-step>
+ </a>
+ </mat-horizontal-stepper>
+ </mat-card-content>
</mat-card>
diff --git a/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.scss b/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.scss
index f3c33e823..119a7d796 100644
--- a/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.scss
+++ b/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.scss
@@ -18,6 +18,14 @@ See the License for the specific language governing permissions and
limitations under the License.
============LICENSE_END============================================
*/
-.mat-horizontal-content-container{
+// .mat-horizontal-content-container {
+// display: none !important;
+// }
+
+.mat-card {
+ padding: 0px !important;
+}
+
+mat-horizontal-stepper .mat-horizontal-content-container {
display: none !important;
} \ No newline at end of file
diff --git a/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.ts b/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.ts
index bbfc11970..fed75d75f 100644
--- a/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.ts
+++ b/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.ts
@@ -18,8 +18,9 @@ See the License for the specific language governing permissions and
limitations under the License.
============LICENSE_END============================================
*/
-import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
+import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
+import { MatStepper } from '@angular/material';
import { GlobalContants } from '../../../constants/app-constants';
@@ -30,18 +31,52 @@ import { GlobalContants } from '../../../constants/app-constants';
})
export class CBAWizardComponent implements OnInit {
@Input() stepsRequired: any;
+ @ViewChild('stepper') stepper: MatStepper;
@Output() stepChanged = new EventEmitter();
public stepDetails = GlobalContants.cbawizard.stepsRequired.steps;
+ private routeLinks : any[];
+ activeLinkIndex = -1;
- constructor(private router: Router) { }
+
+ constructor(private router: Router) {
+ this.routeLinks = [
+ {
+ label: 'CBA Metadata',
+ link: '/blueprint/selectTemplate',
+ index: 0
+ }, {
+ label: 'Controller Blueprint Designer',
+ link: '/blueprint/modifyTemplate',
+ index: 1
+ }, {
+ label: 'Test',
+ link: '/blueprint/testTemplate',
+ index: 2
+ }, {
+ label: 'Deploy',
+ link: '/blueprint/deployTemplate',
+ index: 3
+ }
+ ];
+
+ }
ngOnInit() {
+ // this.router.events.subscribe((res) => {
+ // this.activeLinkIndex = this.routeLinks.indexOf(this.routeLinks.find(tab => tab.link === this.router.url));
+ // this.stepper.selectedIndex = this.activeLinkIndex;
+ // });
+ this.routeLinks.forEach((step, index)=>{
+ if(step.link == this.router.url) {
+ this.stepper.selectedIndex = step.index
+ }
+ });
}
changeRoute(event){
- this.stepDetails.forEach((step, index)=>{
+ this.routeLinks.forEach((step, index)=>{
if(index == event.selectedIndex) {
- this.router.navigate([step.componentURL]);
+ this.router.navigate([step.link]);
}
});
}
diff --git a/cds-ui/client/src/app/common/shared/shared.module.ts b/cds-ui/client/src/app/common/shared/shared.module.ts
index 202a41870..e3760b01c 100644
--- a/cds-ui/client/src/app/common/shared/shared.module.ts
+++ b/cds-ui/client/src/app/common/shared/shared.module.ts
@@ -21,18 +21,18 @@ limitations under the License.
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
-// import { HomeComponent } from './components/home/home.component';
+import { HomeComponent } from './components/home/home.component';
import { CBAWizardComponent } from './components/cbawizard/cbawizard.component';
import { MatToolbarModule,MatIconModule, MatButtonModule, MatSidenavModule, MatListModule, MatGridListModule, MatCardModule, MatMenuModule, MatTableModule, MatPaginatorModule, MatSortModule, MatInputModule, MatSelectModule, MatRadioModule, MatFormFieldModule, MatStepperModule} from '@angular/material';
import { RouterModule } from "@angular/router";
@NgModule({
declarations: [
- // HomeComponent,
+ HomeComponent,
CBAWizardComponent
],
exports: [
- // HomeComponent,
+ HomeComponent,
CBAWizardComponent
],
imports: [