-
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-1268 Integrated header with version history
- Loading branch information
Showing
39 changed files
with
364 additions
and
197 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
52 changes: 52 additions & 0 deletions
52
ui/src/app/metadata/configuration/action/history.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,52 @@ | ||
import { Action } from '@ngrx/store'; | ||
import { MetadataHistory } from '../model/history'; | ||
|
||
export enum HistoryActionTypes { | ||
LOAD_HISTORY_REQUEST = '[Configuration History] Load History Request', | ||
LOAD_HISTORY_SUCCESS = '[Configuration History] Load History Success', | ||
LOAD_HISTORY_ERROR = '[Configuration History] Load History Error', | ||
SET_HISTORY = '[Configuration History] Set History', | ||
CLEAR_HISTORY = '[Configuration History] Clear History', | ||
SELECT_VERSION = '[Configuration History] Select Version' | ||
} | ||
|
||
export class LoadHistoryRequest implements Action { | ||
readonly type = HistoryActionTypes.LOAD_HISTORY_REQUEST; | ||
|
||
constructor(public payload: { id: string, type: string }) { } | ||
} | ||
|
||
export class LoadHistorySuccess implements Action { | ||
readonly type = HistoryActionTypes.LOAD_HISTORY_SUCCESS; | ||
|
||
constructor(public payload: MetadataHistory) { } | ||
} | ||
|
||
export class LoadHistoryError implements Action { | ||
readonly type = HistoryActionTypes.LOAD_HISTORY_ERROR; | ||
|
||
constructor(public payload: any) { } | ||
} | ||
|
||
export class SelectVersion implements Action { | ||
readonly type = HistoryActionTypes.SELECT_VERSION; | ||
constructor(public payload: string | null) { } | ||
} | ||
|
||
export class SetHistory implements Action { | ||
readonly type = HistoryActionTypes.SET_HISTORY; | ||
|
||
constructor(public payload: MetadataHistory) {} | ||
} | ||
|
||
export class ClearHistory implements Action { | ||
readonly type = HistoryActionTypes.CLEAR_HISTORY; | ||
} | ||
|
||
export type HistoryActionsUnion = | ||
| LoadHistoryRequest | ||
| LoadHistorySuccess | ||
| LoadHistoryError | ||
| SetHistory | ||
| ClearHistory | ||
| SelectVersion; |
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
File renamed without changes.
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
9 changes: 5 additions & 4 deletions
9
ui/src/app/metadata/configuration/component/metadata-header.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 |
---|---|---|
@@ -1,13 +1,14 @@ | ||
<div class="card enabled-status"> | ||
<div class="card enabled-status" *ngIf="version"> | ||
<div class="card-body"> | ||
<h2 class="card-title version-title">Version 5</h2> | ||
<h2 class="card-title version-title">Version {{ versionNumber }}</h2> | ||
<p class="card-text version-details"> | ||
Saved <span class="save-date">Mmm DD, YYYY</span>, by <span class="author">Username</span> | ||
Saved <span class="save-date">{{ version.date | date }}</span>, by <span class="author">{{ version.creator }}</span> | ||
</p> | ||
<p class="card-text"> | ||
<span class="badge badge-primary" *ngIf="isEnabled" translate="value.enabled">Enabled</span> | ||
| ||
<span class="badge badge-danger" *ngIf="!isEnabled" translate="value.disabled">Disabled</span> | ||
<span class="badge badge-primary">Current</span> | ||
<span class="badge badge-primary" *ngIf="isCurrent">Current</span> | ||
</p> | ||
</div> | ||
</div> |
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
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,10 @@ | ||
import { MetadataSourceEditor } from '../domain/model/wizards/metadata-source-editor'; | ||
|
||
export enum PATHS { | ||
resolver = 'EntityDescriptor', | ||
provider = 'MetadataResolvers' | ||
} | ||
|
||
export const DEFINITIONS = { | ||
resolver: MetadataSourceEditor | ||
}; |
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
3 changes: 3 additions & 0 deletions
3
ui/src/app/metadata/configuration/container/metadata-history.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,3 @@ | ||
<div class="container"> | ||
<history-list [history]="history$ | async"></history-list> | ||
</div> |
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
22 changes: 22 additions & 0 deletions
22
ui/src/app/metadata/configuration/container/metadata-history.component.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,22 @@ | ||
import { Component, ChangeDetectionStrategy } from '@angular/core'; | ||
import { Observable } from 'rxjs'; | ||
import { Store } from '@ngrx/store'; | ||
import { ConfigurationState, getVersionCollection } from '../reducer'; | ||
import { MetadataVersion } from '../model/version'; | ||
|
||
@Component({ | ||
selector: 'metadata-history', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
templateUrl: './metadata-history.component.html', | ||
styleUrls: [] | ||
}) | ||
export class MetadataHistoryComponent { | ||
|
||
history$: Observable<MetadataVersion[]>; | ||
|
||
constructor( | ||
private store: Store<ConfigurationState> | ||
) { | ||
this.history$ = this.store.select(getVersionCollection); | ||
} | ||
} |
15 changes: 11 additions & 4 deletions
15
ui/src/app/metadata/configuration/container/metadata-options.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
Oops, something went wrong.