From a4e52f7004680a3e16b2e95ad0e10c5fb9a9cda7 Mon Sep 17 00:00:00 2001 From: Ryan Mathis Date: Tue, 23 Feb 2021 07:17:42 -0700 Subject: [PATCH 1/3] UI Tweaks --- .../src/main/resources/metadata-sources-ui-schema.json | 6 ++++++ ui/src/app/contention/effect/contention.effect.ts | 4 ++-- .../resolver/container/resolver-edit.component.ts | 7 +++---- .../app/schema-form/widget/array/array.component.html | 5 +++-- .../widget/boolean-radio/boolean-radio.component.html | 10 +++++----- .../schema-form/widget/check/checkbox.component.html | 6 +++--- .../app/schema-form/widget/radio/radio.component.html | 10 ++++------ 7 files changed, 26 insertions(+), 22 deletions(-) diff --git a/backend/src/main/resources/metadata-sources-ui-schema.json b/backend/src/main/resources/metadata-sources-ui-schema.json index 9a0b4fb9e..156dffce2 100644 --- a/backend/src/main/resources/metadata-sources-ui-schema.json +++ b/backend/src/main/resources/metadata-sources-ui-schema.json @@ -446,6 +446,12 @@ "urn:oasis:names:tc:SAML:2.0:bindings:SOAP" ], "description": "urn:oasis:names:tc:SAML:2.0:bindings:SOAP" + }, + { + "enum": [ + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" + ], + "description": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" } ] } diff --git a/ui/src/app/contention/effect/contention.effect.ts b/ui/src/app/contention/effect/contention.effect.ts index aa89ffbd1..f6845df3f 100644 --- a/ui/src/app/contention/effect/contention.effect.ts +++ b/ui/src/app/contention/effect/contention.effect.ts @@ -23,12 +23,12 @@ export class ContentionEffects { switchMap(contention => { const resolutionAction = of(new ResolveContentionAction({ value: contention.resolutionObject, handlers: contention.handlers })); const rejectionAction = of(new CancelContentionAction({ value: contention.rejectionObject, handlers: contention.handlers })); - if (contention.ourChanges.length < 1) { + /*if (contention.ourChanges.length < 1) { return rejectionAction; } if (contention.theirChanges.length < 1) { return resolutionAction; - } + }*/ return this.modal .open(ContentionDialogComponent, DEFAULT_MODAL_OPTIONS, { contention }) .pipe( diff --git a/ui/src/app/metadata/resolver/container/resolver-edit.component.ts b/ui/src/app/metadata/resolver/container/resolver-edit.component.ts index 6d5e802d2..c5cc6b324 100644 --- a/ui/src/app/metadata/resolver/container/resolver-edit.component.ts +++ b/ui/src/app/metadata/resolver/container/resolver-edit.component.ts @@ -1,11 +1,11 @@ import { Component, OnDestroy } from '@angular/core'; -import { Router, ActivatedRoute, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; +import { Router, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; import { Observable, of, Subject } from 'rxjs'; -import { skipWhile, map, combineLatest, filter, takeUntil } from 'rxjs/operators'; +import { map, filter } from 'rxjs/operators'; import { Store } from '@ngrx/store'; import * as fromWizard from '../../../wizard/reducer'; import * as fromResolver from '../reducer'; -import { ClearWizard, SetIndex, LoadSchemaRequest } from '../../../wizard/action/wizard.action'; +import { LoadSchemaRequest } from '../../../wizard/action/wizard.action'; import { MetadataResolver } from '../../domain/model'; import { Clear } from '../action/entity.action'; import { Wizard } from '../../../wizard/model'; @@ -41,7 +41,6 @@ export class ResolverEditComponent implements OnDestroy, CanComponentDeactivate constructor( private store: Store, private router: Router, - private route: ActivatedRoute, private modalService: NgbModal, private diffService: DifferentialService ) { diff --git a/ui/src/app/schema-form/widget/array/array.component.html b/ui/src/app/schema-form/widget/array/array.component.html index 2bcf6271b..84a5a1e9b 100644 --- a/ui/src/app/schema-form/widget/array/array.component.html +++ b/ui/src/app/schema-form/widget/array/array.component.html @@ -38,9 +38,10 @@
-
+
- + +   diff --git a/ui/src/app/schema-form/widget/boolean-radio/boolean-radio.component.html b/ui/src/app/schema-form/widget/boolean-radio/boolean-radio.component.html index 8b335f58e..217dd94ee 100644 --- a/ui/src/app/schema-form/widget/boolean-radio/boolean-radio.component.html +++ b/ui/src/app/schema-form/widget/boolean-radio/boolean-radio.component.html @@ -8,18 +8,18 @@ {{ schema.description }}
-
+
+ [attr.disabled]="schema.readOnly" + disableValidation="true">
diff --git a/ui/src/app/schema-form/widget/check/checkbox.component.html b/ui/src/app/schema-form/widget/check/checkbox.component.html index 62be86566..538251826 100644 --- a/ui/src/app/schema-form/widget/check/checkbox.component.html +++ b/ui/src/app/schema-form/widget/check/checkbox.component.html @@ -1,17 +1,17 @@
-
-
diff --git a/ui/src/app/schema-form/widget/radio/radio.component.html b/ui/src/app/schema-form/widget/radio/radio.component.html index 316161909..de9187120 100644 --- a/ui/src/app/schema-form/widget/radio/radio.component.html +++ b/ui/src/app/schema-form/widget/radio/radio.component.html @@ -4,16 +4,14 @@ {{schema.description}} -
- + -
From d817386ba1234cd0a55c891c2e1beb93e9c83d6a Mon Sep 17 00:00:00 2001 From: Ryan Mathis Date: Mon, 1 Mar 2021 10:24:43 -0700 Subject: [PATCH 2/3] Fixed issue with contention --- backend/src/main/resources/i18n/messages.properties | 1 + .../component/contention-dialog.component.html | 12 ++++++++---- ui/src/app/contention/effect/contention.effect.ts | 6 ------ .../metadata/provider/effect/collection.effect.ts | 4 ++-- .../app/metadata/provider/effect/editor.effect.ts | 13 ++++++++----- .../app/metadata/resolver/effect/entity.effect.ts | 11 +++++++++-- 6 files changed, 28 insertions(+), 19 deletions(-) diff --git a/backend/src/main/resources/i18n/messages.properties b/backend/src/main/resources/i18n/messages.properties index 0d5356269..0032a25ed 100644 --- a/backend/src/main/resources/i18n/messages.properties +++ b/backend/src/main/resources/i18n/messages.properties @@ -453,6 +453,7 @@ message.protocol-support-required=Protocol Support Enumeration is required if an message.conflict=Conflict message.data-version-contention=Data Version Contention message.contention-new-version=A newer version of this metadata source has been saved. Below are a list of changes. You can use your changes or their changes. +message.contention-error=There was a problem saving due to a mismatched version. message.organization-feedback=These three fields must all be entered if any single field has a value. message.valid-email=Must be a valid Email Address message.valid-url=Must be a valid URL diff --git a/ui/src/app/contention/component/contention-dialog.component.html b/ui/src/app/contention/component/contention-dialog.component.html index 0922f982f..1ff63bb4b 100644 --- a/ui/src/app/contention/component/contention-dialog.component.html +++ b/ui/src/app/contention/component/contention-dialog.component.html @@ -3,12 +3,16 @@