diff --git a/backend/src/main/resources/i18n/messages.properties b/backend/src/main/resources/i18n/messages.properties index f82153ce6..182a2491e 100644 --- a/backend/src/main/resources/i18n/messages.properties +++ b/backend/src/main/resources/i18n/messages.properties @@ -55,6 +55,7 @@ action.xml=XML action.manage=Manage action.close=Close action.back-to-top=Back to Top +action.restore=Restore value.enabled=Enabled value.disabled=Disabled @@ -416,6 +417,7 @@ label.check-to-select=Check to select label.current=Current label.restore=Restore label.compare-selected=Compare Selected +label.restore-version=Restore Version ({ date }) label.saved=Saved label.by=By @@ -471,6 +473,9 @@ message.database-constraint=There was a database constraint problem processing t message.no-filters=No Filters message.no-filters-added=No filters have been added to this Metadata Provider +message.create-new-version-from-version=Create New Version from Version ({ date }) Settings +message.restoring-this-version-will-copy=Restoring this version will copy the Version ({ date }) configuration and create a new Version from the selected version settings. You can then edit the configuration before saving the new version. + tooltip.entity-id=Entity ID tooltip.service-provider-name=Service Provider Name (Dashboard Display Only) tooltip.force-authn=Disallows use (or reuse) of authentication results and login flows that don\u0027t provide a real-time proof of user presence in the login process diff --git a/ui/src/app/metadata/configuration/component/history-list.component.html b/ui/src/app/metadata/configuration/component/history-list.component.html index ff4599b91..168d0cf19 100644 --- a/ui/src/app/metadata/configuration/component/history-list.component.html +++ b/ui/src/app/metadata/configuration/component/history-list.component.html @@ -34,7 +34,7 @@ diff --git a/ui/src/app/metadata/configuration/configuration.module.ts b/ui/src/app/metadata/configuration/configuration.module.ts index c55e24051..906bed24d 100644 --- a/ui/src/app/metadata/configuration/configuration.module.ts +++ b/ui/src/app/metadata/configuration/configuration.module.ts @@ -1,5 +1,5 @@ import { NgModule, ModuleWithProviders } from '@angular/core'; -import { CommonModule } from '@angular/common'; +import { CommonModule, DatePipe } from '@angular/common'; import { StoreModule } from '@ngrx/store'; import { EffectsModule } from '@ngrx/effects'; import { RouterModule } from '@angular/router'; @@ -63,7 +63,9 @@ import { RestoreVersionEffects } from './effect/restore.effect'; SharedModule ], exports: [], - providers: [] + providers: [ + DatePipe + ] }) export class MetadataConfigurationModule { static forRoot(): ModuleWithProviders { diff --git a/ui/src/app/metadata/configuration/container/restore.component.html b/ui/src/app/metadata/configuration/container/restore.component.html index 0b5a2f1ac..66f994d1d 100644 --- a/ui/src/app/metadata/configuration/container/restore.component.html +++ b/ui/src/app/metadata/configuration/container/restore.component.html @@ -1,14 +1,22 @@

- Restore Version ({{ date$ | async | date:DATE_FORMAT }}) + + Restore Version ( date ) +

-

Create New Version from Version ({{ date$ | async | date:DATE_FORMAT }}) Settings

-

Restoring this version will copy the Version ({{ date$ | async | date:DATE_FORMAT }}) configuration and create a new Version from the - selected version settings. You can then edit the configuration before saving the new version.

- Cancel  - +

+ Create New Version from Version ( date ) Settings +

+

+ Restoring this version will copy the Version ( date ) configuration and create a new Version from the selected version settings. You can then edit the configuration before saving the new version. +

+ Cancel  +
diff --git a/ui/src/app/metadata/configuration/container/restore.component.ts b/ui/src/app/metadata/configuration/container/restore.component.ts index 69c6a6f18..388c5f8d8 100644 --- a/ui/src/app/metadata/configuration/container/restore.component.ts +++ b/ui/src/app/metadata/configuration/container/restore.component.ts @@ -7,6 +7,7 @@ import * as fromConfiguration from '../reducer'; import { CONFIG_DATE_FORMAT } from '../configuration.values'; import { RestoreVersionRequest } from '../action/restore.action'; import { withLatestFrom, map, takeUntil } from 'rxjs/operators'; +import { DatePipe } from '@angular/common'; @Component({ selector: 'restore-component', @@ -20,11 +21,11 @@ export class RestoreComponent implements OnDestroy { restore$ = this.subj.asObservable(); date$ = this.store.select(fromConfiguration.getConfigurationVersionDate); - - DATE_FORMAT = CONFIG_DATE_FORMAT; + date: string; constructor( - private store: Store + private store: Store, + private datePipe: DatePipe ) { this.restore$.pipe( withLatestFrom( @@ -34,6 +35,10 @@ export class RestoreComponent implements OnDestroy { ), map(([restore, version, type, id]) => new RestoreVersionRequest({ id, type, version })) ).subscribe(this.store); + + this.date$.pipe(takeUntil(this.subj)).subscribe( + (date) => this.date = this.datePipe.transform(date, CONFIG_DATE_FORMAT) + ); } restore() {