From 5f674393e8fa5fd4959d502c5a057f4533cf4fbd Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Tue, 12 Mar 2019 16:51:39 +0000 Subject: [PATCH 01/12] Register Endpoint Tile - basic icons --- .../create-endpoint-base-step.component.html | 14 +++++ .../create-endpoint-base-step.component.scss | 6 ++ ...reate-endpoint-base-step.component.spec.ts | 25 ++++++++ .../create-endpoint-base-step.component.ts | 58 +++++++++++++++++++ .../create-endpoint-cf-step-1.component.html | 11 +--- .../create-endpoint-cf-step-1.component.ts | 38 +++++------- .../create-endpoint.component.html | 6 +- .../create-endpoint.component.ts | 18 +++++- .../create-endpoint/create-endpoint.module.ts | 4 ++ .../features/endpoints/endpoints.module.ts | 13 ++--- .../features/endpoints/endpoints.routing.ts | 22 +++++-- 11 files changed, 166 insertions(+), 49 deletions(-) create mode 100644 src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.html create mode 100644 src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.scss create mode 100644 src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.spec.ts create mode 100644 src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.ts diff --git a/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.html b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.html new file mode 100644 index 0000000000..988b35dc96 --- /dev/null +++ b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.html @@ -0,0 +1,14 @@ + + Register a new Endpoint + + + +
+

Select your endpoint type

+

+ Endpoints provide ..... +

+ +
+
+
\ No newline at end of file diff --git a/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.scss b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.scss new file mode 100644 index 0000000000..a9fdc63c60 --- /dev/null +++ b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.scss @@ -0,0 +1,6 @@ +.select-step { + width: 100%; + &__help { + padding-bottom: 10px; + } +} diff --git a/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.spec.ts b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.spec.ts new file mode 100644 index 0000000000..bec49b7ca1 --- /dev/null +++ b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CreateEndpointBaseStepComponent } from './create-endpoint-base-step.component'; + +describe('CreateEndpointBaseStepComponent', () => { + let component: CreateEndpointBaseStepComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ CreateEndpointBaseStepComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CreateEndpointBaseStepComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.ts b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.ts new file mode 100644 index 0000000000..81b420eb7a --- /dev/null +++ b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.ts @@ -0,0 +1,58 @@ +import { Component } from '@angular/core'; +import { Store } from '@ngrx/store'; + +import { RouterNav } from '../../../../../../store/src/actions/router.actions'; +import { AppState } from '../../../../../../store/src/app-state'; +import { + BASE_REDIRECT_QUERY, +} from '../../../../shared/components/add-service-instance/add-service-instance-base-step/add-service-instance.types'; +import { TileConfigManager } from '../../../../shared/components/tile/tile-selector.helpers'; +import { ITileConfig, ITileData } from '../../../../shared/components/tile/tile-selector.types'; +import { getEndpointTypes } from '../../endpoint-helpers'; + +interface ICreateEndpointTilesData extends ITileData { + type: string; +} + +@Component({ + selector: 'app-create-endpoint-base-step', + templateUrl: './create-endpoint-base-step.component.html', + styleUrls: ['./create-endpoint-base-step.component.scss'] +}) +export class CreateEndpointBaseStepComponent { + + private tileManager = new TileConfigManager(); + + public tileSelectorConfig: ITileConfig[]; + + private pSelectedTile: ITileConfig; + get selectedTile() { + return this.pSelectedTile; + } + set selectedTile(tile: ITileConfig) { + this.pSelectedTile = tile; + if (tile) { + this.store.dispatch(new RouterNav({ + path: `endpoints/new/${tile.data.type}`, + query: { + [BASE_REDIRECT_QUERY]: true + } + })); + } + } + constructor(public store: Store) { + const endpointTypes = getEndpointTypes(); + this.tileSelectorConfig = endpointTypes.map(et => { + return this.tileManager.getNextTileConfig( + et.label, + { + matIcon: et.icon, + matIconFont: et.iconFont + }, + // { matIcon: 'service', matIconFont: 'stratos-icons' }, + { type: et.value } + ); + }); + } + +} diff --git a/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-cf-step-1/create-endpoint-cf-step-1.component.html b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-cf-step-1/create-endpoint-cf-step-1.component.html index d30e96b9d1..8efbb93cee 100644 --- a/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-cf-step-1/create-endpoint-cf-step-1.component.html +++ b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-cf-step-1/create-endpoint-cf-step-1.component.html @@ -1,12 +1,5 @@
-

Endpoint Information

- - - - {{ type.label }} - - - +

{{endpoint.label}} Information

Name is required @@ -37,4 +30,4 @@

Advanced Information (Optional)

{{clientRedirectURI}}
- + \ No newline at end of file diff --git a/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-cf-step-1/create-endpoint-cf-step-1.component.ts b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-cf-step-1/create-endpoint-cf-step-1.component.ts index 95c9354e5f..3ea2885ce0 100644 --- a/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-cf-step-1/create-endpoint-cf-step-1.component.ts +++ b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-cf-step-1/create-endpoint-cf-step-1.component.ts @@ -1,21 +1,22 @@ import { AfterContentInit, Component, ViewChild } from '@angular/core'; import { NgForm, NgModel } from '@angular/forms'; +import { ActivatedRoute } from '@angular/router'; import { Store } from '@ngrx/store'; import { denormalize } from 'normalizr'; import { Observable } from 'rxjs'; import { filter, map, pairwise, withLatestFrom } from 'rxjs/operators'; -import { UtilsService } from '../../../../core/utils.service'; -import { IStepperStep, StepOnNextFunction } from '../../../../shared/components/stepper/step/step.component'; -import { DEFAULT_ENDPOINT_TYPE, getEndpointTypes, getFullEndpointApiUrl } from '../../endpoint-helpers'; +import { GetAllEndpoints, RegisterEndpoint } from '../../../../../../store/src/actions/endpoint.actions'; import { AppState } from '../../../../../../store/src/app-state'; +import { EndpointsEffect } from '../../../../../../store/src/effects/endpoint.effects'; +import { endpointSchemaKey, entityFactory } from '../../../../../../store/src/helpers/entity-factory'; +import { getAPIRequestDataState, selectUpdateInfo } from '../../../../../../store/src/selectors/api.selectors'; import { selectPaginationState } from '../../../../../../store/src/selectors/pagination.selectors'; import { endpointStoreNames } from '../../../../../../store/src/types/endpoint.types'; -import { GetAllEndpoints, RegisterEndpoint } from '../../../../../../store/src/actions/endpoint.actions'; -import { getAPIRequestDataState, selectUpdateInfo } from '../../../../../../store/src/selectors/api.selectors'; -import { entityFactory, endpointSchemaKey } from '../../../../../../store/src/helpers/entity-factory'; -import { EndpointsEffect } from '../../../../../../store/src/effects/endpoint.effects'; import { EndpointTypeConfig } from '../../../../core/extension/extension-types'; +import { IStepperStep, StepOnNextFunction } from '../../../../shared/components/stepper/step/step.component'; +import { getIdFromRoute } from '../../../cloud-foundry/cf.helpers'; +import { getEndpointTypes, getFullEndpointApiUrl } from '../../endpoint-helpers'; /* tslint:disable:no-access-missing-member https://github.com/mgechev/codelyzer/issues/191*/ @@ -34,7 +35,6 @@ export class CreateEndpointCfStep1Component implements IStepperStep, AfterConten validate: Observable; @ViewChild('form') form: NgForm; - @ViewChild('typeField') typeField: NgModel; @ViewChild('nameField') nameField: NgModel; @ViewChild('urlField') urlField: NgModel; @ViewChild('skipSllField') skipSllField: NgModel; @@ -44,9 +44,7 @@ export class CreateEndpointCfStep1Component implements IStepperStep, AfterConten @ViewChild('clientIDField') clientIDField: NgModel; @ViewChild('clientSecretField') clientSecretField: NgModel; - typeValue: any; - - endpointTypes = getEndpointTypes(); + endpoint: EndpointTypeConfig; urlValidation: string; showAdvancedFields = false; @@ -54,7 +52,7 @@ export class CreateEndpointCfStep1Component implements IStepperStep, AfterConten endpointTypeSupportsSSO = false; - constructor(private store: Store, private utilsService: UtilsService) { + constructor(private store: Store, activatedRoute: ActivatedRoute) { this.existingEndpoints = store.select(selectPaginationState(endpointStoreNames.type, GetAllEndpoints.storeKey)) .pipe( @@ -70,12 +68,9 @@ export class CreateEndpointCfStep1Component implements IStepperStep, AfterConten }) ); - // Auto-select default endpoint type - typically this is Cloud Foundry - const defaultType = this.endpointTypes.filter((t) => t.value === DEFAULT_ENDPOINT_TYPE); - if (defaultType && defaultType.length) { - this.typeValue = defaultType[0].value; - this.setUrlValidation(this.typeValue); - } + const endpointType = getIdFromRoute(activatedRoute, 'type'); + this.endpoint = getEndpointTypes().find(e => e.value === endpointType); + this.setUrlValidation(this.endpoint); // Client Redirect URI for SSO this.clientRedirectURI = window.location.protocol + '//' + window.location.hostname + @@ -84,7 +79,7 @@ export class CreateEndpointCfStep1Component implements IStepperStep, AfterConten onNext: StepOnNextFunction = () => { const action = new RegisterEndpoint( - this.typeField.value, + this.endpoint.value, this.nameField.value, this.urlField.value, !!this.skipSllField.value, @@ -124,8 +119,7 @@ export class CreateEndpointCfStep1Component implements IStepperStep, AfterConten })); } - setUrlValidation(endpointValue: string) { - const endpoint = this.endpointTypes.find(e => e.value === endpointValue); + setUrlValidation(endpoint: EndpointTypeConfig) { this.urlValidation = endpoint ? endpoint.urlValidation : ''; this.setAdvancedFields(endpoint); } @@ -134,7 +128,7 @@ export class CreateEndpointCfStep1Component implements IStepperStep, AfterConten setAdvancedFields(endpoint: EndpointTypeConfig) { this.showAdvancedFields = endpoint.value === 'cf'; - // Only allow SSL if the endpoint type isCloud Foundry + // Only allow SSL if the endpoint type is Cloud Foundry this.endpointTypeSupportsSSO = endpoint.value === 'cf'; } } diff --git a/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint.component.html b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint.component.html index c8b87774eb..ecfe0c91dc 100644 --- a/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint.component.html +++ b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint.component.html @@ -1,9 +1,9 @@ -

Register new Endpoint

+ Register a new Endpoint
- + - + \ No newline at end of file diff --git a/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint.component.ts b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint.component.ts index 6bb78c5514..41cb9e46f6 100644 --- a/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint.component.ts +++ b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint.component.ts @@ -1,8 +1,22 @@ -import { Component, OnInit } from '@angular/core'; +import { Component } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; + +import { IRouterNavPayload } from '../../../../../store/src/actions/router.actions'; +import { + BASE_REDIRECT_QUERY, +} from '../../../shared/components/add-service-instance/add-service-instance-base-step/add-service-instance.types'; @Component({ selector: 'app-create-endpoint', templateUrl: './create-endpoint.component.html', styleUrls: ['./create-endpoint.component.scss'] }) -export class CreateEndpointComponent { } +export class CreateEndpointComponent { + public basePreviousRedirect: IRouterNavPayload; + + constructor(route: ActivatedRoute) { + this.basePreviousRedirect = route.snapshot.queryParams[BASE_REDIRECT_QUERY] ? { + path: 'endpoints/new' + } : null; + } +} diff --git a/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint.module.ts b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint.module.ts index 125fde4b8f..f85d83217e 100644 --- a/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint.module.ts +++ b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint.module.ts @@ -4,6 +4,8 @@ import { SharedModule } from '../../../shared/shared.module'; import { CreateEndpointComponent } from './create-endpoint.component'; import { NgModule } from '@angular/core'; import { CreateEndpointCfStep1Component } from './create-endpoint-cf-step-1/create-endpoint-cf-step-1.component'; +import { CreateEndpointBaseStepComponent } from './create-endpoint-base-step/create-endpoint-base-step.component'; +import { ConnectEndpointStepComponent } from './connect-endpoint-step/connect-endpoint-step.component'; @NgModule({ imports: [ @@ -14,6 +16,8 @@ import { CreateEndpointCfStep1Component } from './create-endpoint-cf-step-1/crea declarations: [ CreateEndpointComponent, CreateEndpointCfStep1Component, + CreateEndpointBaseStepComponent, + ConnectEndpointStepComponent, ], exports: [ CreateEndpointComponent diff --git a/src/frontend/packages/core/src/features/endpoints/endpoints.module.ts b/src/frontend/packages/core/src/features/endpoints/endpoints.module.ts index e8d131f64d..6c6621b970 100644 --- a/src/frontend/packages/core/src/features/endpoints/endpoints.module.ts +++ b/src/frontend/packages/core/src/features/endpoints/endpoints.module.ts @@ -2,20 +2,19 @@ import { NgModule } from '@angular/core'; import { CoreModule } from '../../core/core.module'; import { SharedModule } from '../../shared/shared.module'; - -import { EndointsRoutingModule } from './endpoints.routing'; -import { EndpointsPageComponent } from './endpoints-page/endpoints-page.component'; -import { CreateEndpointModule } from './create-endpoint/create-endpoint.module'; -import { ConnectEndpointDialogComponent } from './connect-endpoint-dialog/connect-endpoint-dialog.component'; import { CredentialsAuthFormComponent } from './connect-endpoint-dialog/auth-forms/credentials-auth-form.component'; -import { SSOAuthFormComponent } from './connect-endpoint-dialog/auth-forms/sso-auth-form.component'; import { NoneAuthFormComponent } from './connect-endpoint-dialog/auth-forms/none-auth-form.component'; +import { SSOAuthFormComponent } from './connect-endpoint-dialog/auth-forms/sso-auth-form.component'; +import { ConnectEndpointDialogComponent } from './connect-endpoint-dialog/connect-endpoint-dialog.component'; +import { CreateEndpointModule } from './create-endpoint/create-endpoint.module'; +import { EndpointsPageComponent } from './endpoints-page/endpoints-page.component'; +import { EndpointsRoutingModule } from './endpoints.routing'; @NgModule({ imports: [ CoreModule, SharedModule, - EndointsRoutingModule, + EndpointsRoutingModule, CreateEndpointModule ], declarations: [ diff --git a/src/frontend/packages/core/src/features/endpoints/endpoints.routing.ts b/src/frontend/packages/core/src/features/endpoints/endpoints.routing.ts index 931666c26e..946b1ab116 100644 --- a/src/frontend/packages/core/src/features/endpoints/endpoints.routing.ts +++ b/src/frontend/packages/core/src/features/endpoints/endpoints.routing.ts @@ -1,11 +1,14 @@ import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; +import { RouterModule, Routes } from '@angular/router'; -import { EndpointsPageComponent } from './endpoints-page/endpoints-page.component'; -import { CreateEndpointComponent } from './create-endpoint/create-endpoint.component'; import { DynamicExtensionRoutes } from '../../core/extension/dynamic-extension-routes'; -import { PageNotFoundComponentComponent } from '../../core/page-not-found-component/page-not-found-component.component'; import { StratosActionType } from '../../core/extension/extension-service'; +import { PageNotFoundComponentComponent } from '../../core/page-not-found-component/page-not-found-component.component'; +import { + CreateEndpointBaseStepComponent, +} from './create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component'; +import { CreateEndpointComponent } from './create-endpoint/create-endpoint.component'; +import { EndpointsPageComponent } from './endpoints-page/endpoints-page.component'; const endpointsRoutes: Routes = [ { @@ -14,7 +17,14 @@ const endpointsRoutes: Routes = [ extensionsActionsKey: StratosActionType.Endpoints } }, - { path: 'new', component: CreateEndpointComponent }, + { + path: 'new', + component: CreateEndpointBaseStepComponent + }, + { + path: 'new/:type', + component: CreateEndpointComponent + }, { path: '**', component: PageNotFoundComponentComponent, @@ -30,4 +40,4 @@ const endpointsRoutes: Routes = [ RouterModule.forChild(endpointsRoutes), ] }) -export class EndointsRoutingModule { } +export class EndpointsRoutingModule { } From 4ea68e8e351b5c847e0030949e225b12999cad0d Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Wed, 13 Mar 2019 13:22:59 +0000 Subject: [PATCH 02/12] fix imports --- .../create-endpoint/create-endpoint.module.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint.module.ts b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint.module.ts index f85d83217e..59e69848ef 100644 --- a/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint.module.ts +++ b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint.module.ts @@ -1,11 +1,11 @@ import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; + import { CoreModule } from '../../../core/core.module'; import { SharedModule } from '../../../shared/shared.module'; -import { CreateEndpointComponent } from './create-endpoint.component'; -import { NgModule } from '@angular/core'; -import { CreateEndpointCfStep1Component } from './create-endpoint-cf-step-1/create-endpoint-cf-step-1.component'; import { CreateEndpointBaseStepComponent } from './create-endpoint-base-step/create-endpoint-base-step.component'; -import { ConnectEndpointStepComponent } from './connect-endpoint-step/connect-endpoint-step.component'; +import { CreateEndpointCfStep1Component } from './create-endpoint-cf-step-1/create-endpoint-cf-step-1.component'; +import { CreateEndpointComponent } from './create-endpoint.component'; @NgModule({ imports: [ @@ -16,8 +16,7 @@ import { ConnectEndpointStepComponent } from './connect-endpoint-step/connect-en declarations: [ CreateEndpointComponent, CreateEndpointCfStep1Component, - CreateEndpointBaseStepComponent, - ConnectEndpointStepComponent, + CreateEndpointBaseStepComponent ], exports: [ CreateEndpointComponent From 0dba376a8648c525887fdcf5620fd74bde5a7ec6 Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Wed, 13 Mar 2019 13:40:43 +0000 Subject: [PATCH 03/12] Fix issue when combining endpoint list cards & user provided service --- .../components/list/list-cards/card/card.component.ts | 11 ++++++++++- .../endpoint/endpoint-card/endpoint-card.component.ts | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/frontend/packages/core/src/shared/components/list/list-cards/card/card.component.ts b/src/frontend/packages/core/src/shared/components/list/list-cards/card/card.component.ts index aaa6848012..44e3410390 100644 --- a/src/frontend/packages/core/src/shared/components/list/list-cards/card/card.component.ts +++ b/src/frontend/packages/core/src/shared/components/list/list-cards/card/card.component.ts @@ -70,7 +70,16 @@ export class CardComponent { return this.pItem; } - @Input() dataSource = null as IListDataSource; + private pDataSource: IListDataSource = null as IListDataSource; + @Input() set dataSource(ds: IListDataSource) { + this.pDataSource = ds; + if (this.cardComponent) { + this.cardComponent.dataSource = this.pDataSource; + } + } + get dataSource() { + return this.pDataSource; + } @ViewChild('target', { read: ViewContainerRef }) target: ViewContainerRef; diff --git a/src/frontend/packages/core/src/shared/components/list/list-types/endpoint/endpoint-card/endpoint-card.component.ts b/src/frontend/packages/core/src/shared/components/list/list-types/endpoint/endpoint-card/endpoint-card.component.ts index c05cced76d..be9f5c56de 100644 --- a/src/frontend/packages/core/src/shared/components/list/list-types/endpoint/endpoint-card/endpoint-card.component.ts +++ b/src/frontend/packages/core/src/shared/components/list/list-types/endpoint/endpoint-card/endpoint-card.component.ts @@ -60,7 +60,7 @@ export class EndpointCardComponent extends CardCell implements On @Input('dataSource') set dataSource(ds: BaseEndpointsDataSource) { - if (ds.endpointType !== 'cf' && !this.cardMenu) { + if (ds && ds.endpointType !== 'cf' && !this.cardMenu) { this.cardMenu = this.endpointListHelper.endpointActions().map(endpointAction => ({ label: endpointAction.label, action: () => endpointAction.action(this.pRow), From fcd11039ff87ec448702eeacd939d50942423830 Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Wed, 13 Mar 2019 14:16:30 +0000 Subject: [PATCH 04/12] Add tile selector img & tidyup --- .../create-endpoint-base-step.component.html | 6 ++++-- .../create-endpoint-base-step.component.ts | 11 ++++++----- .../stepper/steppers/steppers.component.html | 5 +++-- .../tile-selector/tile-selector.component.html | 6 +++++- .../tile-selector/tile-selector.component.scss | 4 ++++ .../shared/components/tile/tile-selector.helpers.ts | 6 +++--- .../src/shared/components/tile/tile-selector.types.ts | 9 ++++++++- 7 files changed, 33 insertions(+), 14 deletions(-) diff --git a/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.html b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.html index 988b35dc96..6f2bdcfbaf 100644 --- a/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.html +++ b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.html @@ -4,9 +4,11 @@
-

Select your endpoint type

+

Select the endpoint type

- Endpoints provide ..... + To gain access to additional resources register a new endpoint. Most endpoints will require credentials that can + be supplied during + the 'Connecting' process. To do this return to the Endpoints page.

diff --git a/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.ts b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.ts index 81b420eb7a..7c761d493f 100644 --- a/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.ts +++ b/src/frontend/packages/core/src/features/endpoints/create-endpoint/create-endpoint-base-step/create-endpoint-base-step.component.ts @@ -45,11 +45,12 @@ export class CreateEndpointBaseStepComponent { this.tileSelectorConfig = endpointTypes.map(et => { return this.tileManager.getNextTileConfig( et.label, - { - matIcon: et.icon, - matIconFont: et.iconFont - }, - // { matIcon: 'service', matIconFont: 'stratos-icons' }, + et.imagePath ? { + location: et.imagePath + } : { + matIcon: et.icon, + matIconFont: et.iconFont + }, { type: et.value } ); }); diff --git a/src/frontend/packages/core/src/shared/components/stepper/steppers/steppers.component.html b/src/frontend/packages/core/src/shared/components/stepper/steppers/steppers.component.html index e77b77c6a4..a28e2c12fb 100644 --- a/src/frontend/packages/core/src/shared/components/stepper/steppers/steppers.component.html +++ b/src/frontend/packages/core/src/shared/components/stepper/steppers/steppers.component.html @@ -25,8 +25,9 @@
- +