-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SHIBUI-580 Fixed issues with saving provider
- Loading branch information
Showing
19 changed files
with
354 additions
and
96 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,10 @@ | ||
import { | ||
MetadataBase, | ||
Organization, | ||
Contact, | ||
MDUI, | ||
SecurityInfo, | ||
SsoService, | ||
IdpSsoDescriptor, | ||
LogoutEndpoint, | ||
RelyingPartyOverrides | ||
} from '../model'; | ||
|
||
export interface MetadataProvider extends MetadataBase { | ||
name: string; | ||
'@type': string; | ||
enabled: boolean; | ||
resourceId: string; | ||
} |
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,32 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { HttpClient } from '@angular/common/http'; | ||
import { Observable } from 'rxjs'; | ||
|
||
import { MetadataFilter } from '../../domain/model'; | ||
|
||
@Injectable() | ||
export class MetadataFilterService { | ||
|
||
readonly endpoint = '/MetadataResolvers'; | ||
readonly base = '/api'; | ||
|
||
constructor( | ||
private http: HttpClient | ||
) { } | ||
query(): Observable<MetadataFilter[]> { | ||
return this.http.get<MetadataFilter[]>(`${this.base}${this.endpoint}`, {}); | ||
} | ||
|
||
find(id: string): Observable<MetadataFilter> { | ||
// console.log(id); | ||
return this.http.get<MetadataFilter>(`${this.base}${this.endpoint}/${id}`); | ||
} | ||
|
||
update(filter: MetadataFilter): Observable<MetadataFilter> { | ||
return this.http.put<MetadataFilter>(`${this.base}${this.endpoint}/${filter.id}`, filter); | ||
} | ||
|
||
save(filter: MetadataFilter): Observable<MetadataFilter> { | ||
return this.http.post<MetadataFilter>(`${this.base}${this.endpoint}`, filter); | ||
} | ||
} |
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
112 changes: 112 additions & 0 deletions
112
ui/src/app/metadata/provider/action/collection.action.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,112 @@ | ||
import { Action } from '@ngrx/store'; | ||
import { MetadataProvider } from '../../domain/model/metadata-provider'; | ||
import { Update } from '@ngrx/entity'; | ||
|
||
export enum ProviderCollectionActionTypes { | ||
FIND = '[Metadata Provider] Find', | ||
SELECT_PROVIDER = '[Metadata Provider] Select Request', | ||
SELECT_PROVIDER_SUCCESS = '[Metadata Provider] Select Success', | ||
SELECT_PROVIDER_FAIL = '[Metadata Provider] Select Fail', | ||
|
||
UPDATE_PROVIDER_REQUEST = '[Metadata Provider] Update Request', | ||
UPDATE_PROVIDER_SUCCESS = '[Metadata Provider] Update Success', | ||
UPDATE_PROVIDER_FAIL = '[Metadata Provider] Update Fail', | ||
|
||
LOAD_PROVIDER_REQUEST = '[Metadata Provider Collection] Provider REQUEST', | ||
LOAD_PROVIDER_SUCCESS = '[Metadata Provider Collection] Provider SUCCESS', | ||
LOAD_PROVIDER_ERROR = '[Metadata Provider Collection] Provider ERROR', | ||
|
||
ADD_PROVIDER_REQUEST = '[Metadata Provider Collection] Add Provider', | ||
ADD_PROVIDER_SUCCESS = '[Metadata Provider Collection] Add Provider Success', | ||
ADD_PROVIDER_FAIL = '[Metadata Provider Collection] Add Provider Fail', | ||
|
||
REMOVE_PROVIDER_REQUEST = '[Metadata Provider Collection] Remove Provider Request', | ||
REMOVE_PROVIDER_SUCCESS = '[Metadata Provider Collection] Remove Provider Success', | ||
REMOVE_PROVIDER_FAIL = '[Metadata Provider Collection] Remove Provider Fail' | ||
} | ||
|
||
export class LoadProviderRequest implements Action { | ||
readonly type = ProviderCollectionActionTypes.LOAD_PROVIDER_REQUEST; | ||
|
||
constructor() { } | ||
} | ||
|
||
export class LoadProviderSuccess implements Action { | ||
readonly type = ProviderCollectionActionTypes.LOAD_PROVIDER_SUCCESS; | ||
|
||
constructor(public payload: MetadataProvider[]) { } | ||
} | ||
|
||
export class LoadProviderError implements Action { | ||
readonly type = ProviderCollectionActionTypes.LOAD_PROVIDER_ERROR; | ||
|
||
constructor(public payload: any) { } | ||
} | ||
|
||
export class UpdateProviderRequest implements Action { | ||
readonly type = ProviderCollectionActionTypes.UPDATE_PROVIDER_REQUEST; | ||
|
||
constructor(public payload: MetadataProvider) { } | ||
} | ||
|
||
export class UpdateProviderSuccess implements Action { | ||
readonly type = ProviderCollectionActionTypes.UPDATE_PROVIDER_SUCCESS; | ||
|
||
constructor(public payload: Update<MetadataProvider>) { } | ||
} | ||
|
||
export class UpdateProviderFail implements Action { | ||
readonly type = ProviderCollectionActionTypes.UPDATE_PROVIDER_FAIL; | ||
|
||
constructor(public payload: MetadataProvider) { } | ||
} | ||
|
||
export class AddProviderRequest implements Action { | ||
readonly type = ProviderCollectionActionTypes.ADD_PROVIDER_REQUEST; | ||
|
||
constructor(public payload: MetadataProvider) { } | ||
} | ||
|
||
export class AddProviderSuccess implements Action { | ||
readonly type = ProviderCollectionActionTypes.ADD_PROVIDER_SUCCESS; | ||
|
||
constructor(public payload: MetadataProvider) { } | ||
} | ||
|
||
export class AddProviderFail implements Action { | ||
readonly type = ProviderCollectionActionTypes.ADD_PROVIDER_FAIL; | ||
|
||
constructor(public payload: any) { } | ||
} | ||
|
||
export class RemoveProviderRequest implements Action { | ||
readonly type = ProviderCollectionActionTypes.REMOVE_PROVIDER_REQUEST; | ||
|
||
constructor(public payload: MetadataProvider) { } | ||
} | ||
|
||
export class RemoveProviderSuccess implements Action { | ||
readonly type = ProviderCollectionActionTypes.REMOVE_PROVIDER_SUCCESS; | ||
|
||
constructor(public payload: MetadataProvider) { } | ||
} | ||
|
||
export class RemoveProviderFail implements Action { | ||
readonly type = ProviderCollectionActionTypes.REMOVE_PROVIDER_FAIL; | ||
|
||
constructor(public payload: MetadataProvider) { } | ||
} | ||
|
||
export type ProviderCollectionActionsUnion = | ||
| LoadProviderRequest | ||
| LoadProviderSuccess | ||
| LoadProviderError | ||
| AddProviderRequest | ||
| AddProviderSuccess | ||
| AddProviderFail | ||
| RemoveProviderRequest | ||
| RemoveProviderSuccess | ||
| RemoveProviderFail | ||
| UpdateProviderRequest | ||
| UpdateProviderSuccess | ||
| UpdateProviderFail; |
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
Oops, something went wrong.