Skip to content

Commit

Permalink
Merged in feature/SHIBUI-576 (pull request #97)
Browse files Browse the repository at this point in the history
SHIBUI-576 Implemented First page of wizard

* SHIBUI-576 Initial draft of wizard module

* SHIBUI-576 Initial draft of wizard module

* SHIBUI-576 Initial implementation of schema-form component

* SHIBUI-576 Implemented First page of wizard

* SHIBUI-576

Approved-by: Shibui Jenkins <shibui.jenkins@gmail.com>
Approved-by: Ryan Mathis <rmathis@unicon.net>
  • Loading branch information
rmathis committed Jun 28, 2018
1 parent 3659adc commit 4949eba
Show file tree
Hide file tree
Showing 59 changed files with 1,607 additions and 244 deletions.
44 changes: 42 additions & 2 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@
"@ngrx/entity": "^5.2.0",
"@ngrx/router-store": "^5.2.0",
"@ngrx/store": "^5.2.0",
"rxjs": "^6.1.0",
"rxjs-compat": "^6.1.0",
"bootstrap": "4.1.1",
"core-js": "^2.4.1",
"deep-object-diff": "^1.1.0",
"file-saver": "^1.3.3",
"font-awesome": "^4.7.0",
"ngx-schema-form": "^2.0.0-beta.3",
"rxjs": "^6.1.0",
"rxjs-compat": "^6.1.0",
"xml-formatter": "^1.0.1",
"zone.js": "^0.8.26",
"deep-object-diff": "^1.1.0"
"z-schema": "^3.22.0",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.5.0",
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<ng-container i18n="@@action--add-source">Metadata Source</ng-container>
</a>
<a class="nav-link"
routerLink="/metadata/provider/new"
routerLink="/metadata/provider/wizard"
routerLinkActive="active"
aria-label="Add a new metadata resolver"
role="button">
Expand Down
4 changes: 4 additions & 0 deletions ui/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import { ErrorInterceptor } from './core/service/error.interceptor';
import { NavigatorService } from './core/service/navigator.service';
import { ContentionModule } from './contention/contention.module';
import { SharedModule } from './shared/shared.module';
import { WizardModule } from './wizard/wizard.module';
import { FormModule } from './schema-form/schema-form.module';

@NgModule({
declarations: [
Expand All @@ -37,6 +39,8 @@ import { SharedModule } from './shared/shared.module';
NgbModalModule.forRoot(),
NgbPopoverModule.forRoot(),
NgbPaginationModule.forRoot(),
WizardModule.forRoot(),
FormModule.forRoot(),
NotificationModule,
HttpClientModule,
ContentionModule,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FileBackedHttpMetadataProvider } from './file-backed-http-metadata-provider';

describe('Resolver construct', () => {
describe('FileBackedHttmMetadataProvider construct', () => {

const config = {
id: 'foo',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,86 +1,21 @@
import {
MetadataProvider,
MetadataEntity,
Organization,
Contact,
MDUI,
LogoutEndpoint,
SecurityInfo,
Certificate,
SsoService,
IdpSsoDescriptor,
RelyingPartyOverrides
MetadataProvider
} from '../../model';
import { MetadataTypes } from '../../domain.type';

export class FileBackedHttpMetadataProvider implements MetadataProvider, MetadataEntity {
id = '';
export class FileBackedHttpMetadataProvider implements MetadataProvider {
id: string;
name: string;
'@type': string;

createdDate?: string;
modifiedDate?: string;
version: string;

entityId = '';
serviceProviderName = '';
organization = {} as Organization;
contacts = [] as Contact[];
mdui = {} as MDUI;

securityInfo = {
x509CertificateAvailable: false,
authenticationRequestsSigned: false,
wantAssertionsSigned: false,
x509Certificates: [] as Certificate[]
} as SecurityInfo;

assertionConsumerServices = [] as SsoService[];
serviceProviderSsoDescriptor = {
nameIdFormats: []
} as IdpSsoDescriptor;

logoutEndpoints = [] as LogoutEndpoint[];

serviceEnabled = false;

relyingPartyOverrides = {
nameIdFormats: [] as string[],
authenticationMethods: [] as string[]
} as RelyingPartyOverrides;

attributeRelease = [] as string[];

constructor(descriptor?: Partial<MetadataProvider>) {
Object.assign(this, descriptor);
}

getId(): string {
return this.id;
}

getDisplayId(): string {
return this.id;
}

isDraft(): boolean {
return false;
}

getCreationDate(): Date {
return new Date(this.createdDate);
}

get name(): string {
return this.serviceProviderName;
}

get enabled(): boolean {
return this.serviceEnabled;
}

get kind(): string {
return MetadataTypes.PROVIDER;
}

serialize(): any {
return this;
}
}
13 changes: 2 additions & 11 deletions ui/src/app/metadata/domain/model/metadata-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@ import {
} from '../model';

export interface MetadataProvider extends MetadataBase {
serviceProviderName: string;
organization?: Organization;
contacts?: Contact[];
mdui?: MDUI;
securityInfo?: SecurityInfo;
assertionConsumerServices?: SsoService[];
serviceProviderSsoDescriptor?: IdpSsoDescriptor;
logoutEndpoints?: LogoutEndpoint[];
serviceEnabled?: boolean;
relyingPartyOverrides: RelyingPartyOverrides;
attributeRelease: string[];
name: string;
'@type': string;
}
89 changes: 8 additions & 81 deletions ui/src/app/metadata/metadata.routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,100 +2,27 @@ import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { ManagerComponent } from './manager/container/manager.component';
import { BlankResolverComponent } from './resolver/container/blank-resolver.component';
import { NewResolverComponent } from './resolver/container/new-resolver.component';
import { UploadResolverComponent } from './resolver/container/upload-resolver.component';
import { CopyResolverComponent } from './resolver/container/copy-resolver.component';
import { ConfirmCopyComponent } from './resolver/container/confirm-copy.component';
import { CopyIsSetGuard } from './resolver/guard/copy-isset.guard';
import { MetadataPageComponent } from './metadata.component';
import { ResolverComponent } from './resolver/container/resolver.component';
import { EditorComponent } from './resolver/container/editor.component';
import { CanDeactivateGuard } from '../core/service/can-deactivate.guard';
import { DraftComponent } from './resolver/container/draft.component';
import { WizardComponent } from './resolver/container/wizard.component';
import { NewProviderComponent } from './provider/container/new-provider.component';
import { ProviderWizardComponent } from './provider/container/wizard.component';

import { ResolverRoutes } from './resolver/resolver.routing';
import { ProviderRoutes } from './provider/provider.routing';

const routes: Routes = [
{
path: '',
component: MetadataPageComponent,
children: [
{ path: '', component: ManagerComponent },
{
path: 'resolver',
children: [
{
path: 'new',
component: NewResolverComponent,
children: [
{ path: '', redirectTo: 'blank', pathMatch: 'prefix' },
{
path: 'blank',
component: BlankResolverComponent,
canDeactivate: []
},
{
path: 'upload',
component: UploadResolverComponent,
canDeactivate: []
},
{
path: 'copy',
component: CopyResolverComponent,
canDeactivate: []
}
]
},
{
path: 'new/copy/confirm',
component: ConfirmCopyComponent,
canActivate: [CopyIsSetGuard]
},
{
path: ':id',
component: ResolverComponent,
canActivate: [],
children: [
{ path: 'edit', redirectTo: 'edit/2' },
{
path: 'edit/:index',
component: EditorComponent,
canDeactivate: [CanDeactivateGuard]
}
]
},
{
path: ':entityId',
component: DraftComponent,
canActivate: [],
children: [
{ path: 'wizard', redirectTo: 'wizard/2' },
{
path: 'wizard/:index',
component: WizardComponent,
canDeactivate: [CanDeactivateGuard]
}
]
}
]
},
{
path: 'provider',
children: [
{
path: 'new',
component: NewProviderComponent
}
]
}
...ResolverRoutes,
...ProviderRoutes
]
},
];

@NgModule({
imports: [RouterModule.forChild(routes)],
imports: [
RouterModule.forChild(routes),
],
exports: [RouterModule]
})
export class MetadataRoutingModule { }
Loading

0 comments on commit 4949eba

Please sign in to comment.