From 5100a693273b6339d57e853000f6cacfe2ed2c47 Mon Sep 17 00:00:00 2001 From: RIHTARSIC Joze <joze.rihtarsic@ext.ec.europa.eu> Date: Tue, 13 Jun 2023 19:32:22 +0200 Subject: [PATCH] Small fixes on Certificate panel --- .../smp-warning-panel.component.html | 3 +- .../smp-warning-panel.component.ts | 1 + .../credential-dialog.component.html | 14 +++---- .../certificate-panel.component.html | 39 ++++++++++--------- .../user-certificate-panel.component.html | 7 ++-- .../user-certificate-panel.component.scss | 4 ++ .../user-certificates.component.ts | 2 +- smp-angular/src/styles.css | 3 ++ .../oasis-cppa3-spi/pom.xml | 1 - 9 files changed, 42 insertions(+), 32 deletions(-) diff --git a/smp-angular/src/app/common/components/smp-warning-panel/smp-warning-panel.component.html b/smp-angular/src/app/common/components/smp-warning-panel/smp-warning-panel.component.html index 8be89d856..1facf3361 100644 --- a/smp-angular/src/app/common/components/smp-warning-panel/smp-warning-panel.component.html +++ b/smp-angular/src/app/common/components/smp-warning-panel/smp-warning-panel.component.html @@ -1,6 +1,7 @@ <div [ngClass]="{ 'smp-warning-panel': label, - 'alert-info': type === 'info', + 'smp-warning-panel-padding': padding && label, + 'alert-info': type === 'info', 'alert-success': type === 'success', 'alert-warning': type === 'warning', 'alert-error': type === 'error'}" diff --git a/smp-angular/src/app/common/components/smp-warning-panel/smp-warning-panel.component.ts b/smp-angular/src/app/common/components/smp-warning-panel/smp-warning-panel.component.ts index 9a8b820c6..7ca12d585 100644 --- a/smp-angular/src/app/common/components/smp-warning-panel/smp-warning-panel.component.ts +++ b/smp-angular/src/app/common/components/smp-warning-panel/smp-warning-panel.component.ts @@ -5,6 +5,7 @@ import { Component, Input } from '@angular/core'; templateUrl: './smp-warning-panel.component.html', }) export class SmpWarningPanelComponent { + @Input() padding:boolean = true; @Input() label:string; @Input() icon:string; @Input() type:string = 'warning'; diff --git a/smp-angular/src/app/common/dialogs/credential-dialog/credential-dialog.component.html b/smp-angular/src/app/common/dialogs/credential-dialog/credential-dialog.component.html index a6f1d7e76..ff0fb560b 100644 --- a/smp-angular/src/app/common/dialogs/credential-dialog/credential-dialog.component.html +++ b/smp-angular/src/app/common/dialogs/credential-dialog/credential-dialog.component.html @@ -46,7 +46,12 @@ (change)="uploadCertificate($event)"> <button id="importButton" mat-flat-button color="primary" (click)="fileInput.click()">Import</button> </label> - + <mat-form-field class="certificate-id" style="width:100%"> + <mat-label>SMP certificate ID</mat-label> + <input matInput formControlName="certificateId" + id="certificateId_id" + resizeable="true" readonly="true"> + </mat-form-field> <mat-form-field class="certificate-subject" style="width:100%"> <mat-label>Subject Name</mat-label> <input matInput formControlName="subject" id="subject_id" @@ -74,12 +79,7 @@ <input matInput formControlName="serialNumber" id="servialNumber_id" readonly="true"> </mat-form-field> - <mat-form-field class="certificate-id" style="width:100%"> - <mat-label>SMP certificate ID</mat-label> - <input matInput formControlName="certificateId" - id="certificateId_id" - resizeable="true" readonly="true"> - </mat-form-field> + </div> </mat-dialog-content> <mat-dialog-actions> diff --git a/smp-angular/src/app/common/panels/certificate-panel/certificate-panel.component.html b/smp-angular/src/app/common/panels/certificate-panel/certificate-panel.component.html index 10de1966f..1504ec77f 100644 --- a/smp-angular/src/app/common/panels/certificate-panel/certificate-panel.component.html +++ b/smp-angular/src/app/common/panels/certificate-panel/certificate-panel.component.html @@ -36,25 +36,6 @@ [value]="certificate?.subject" readonly> </mat-form-field> - <mat-form-field> - <mat-label>Issuer</mat-label> - <input matInput placeholder="Issuer" - id="issuer_id" - [value]="certificate?.issuer" - readonly> - </mat-form-field> - <mat-form-field> - <mat-label>Serial Number</mat-label> - <input matInput placeholder="Serial Number" id="servialNumber_id" - [value]="certificate?.serialNumber" - readonly> - </mat-form-field> - <mat-form-field> - <mat-label>Certificate revocation list URL</mat-label> - <input matInput placeholder="Certificate revocation list URL" id="clrUrl_id" - [value]="certificate?.crlUrl" - readonly> - </mat-form-field> <div style="display: flex;flex-direction: row;flex-grow: 1"> <mat-form-field style="flex-grow: 1"> <mat-label>Valid from date</mat-label> @@ -82,5 +63,25 @@ </ngx-mat-datetime-picker> </mat-form-field> </div> + <mat-form-field> + <mat-label>Issuer</mat-label> + <input matInput placeholder="Issuer" + id="issuer_id" + [value]="certificate?.issuer" + readonly> + </mat-form-field> + <mat-form-field> + <mat-label>Serial Number</mat-label> + <input matInput placeholder="Serial Number" id="servialNumber_id" + [value]="certificate?.serialNumber" + readonly> + </mat-form-field> + <mat-form-field> + <mat-label>Certificate revocation list URL</mat-label> + <input matInput placeholder="Certificate revocation list URL" id="clrUrl_id" + [value]="certificate?.crlUrl" + readonly> + </mat-form-field> + </div> diff --git a/smp-angular/src/app/user-settings/user-certificates/user-certificate-panel/user-certificate-panel.component.html b/smp-angular/src/app/user-settings/user-certificates/user-certificate-panel/user-certificate-panel.component.html index 5162c5cb8..163c73123 100644 --- a/smp-angular/src/app/user-settings/user-certificates/user-certificate-panel/user-certificate-panel.component.html +++ b/smp-angular/src/app/user-settings/user-certificates/user-certificate-panel/user-certificate-panel.component.html @@ -1,16 +1,17 @@ <div class="panel smp-data-panel" [formGroup]="credentialForm" (ngSubmit)="onSaveButtonClicked()"> - <smp-warning-panel *ngIf="_credential.certificate?.invalid;" + <smp-warning-panel *ngIf="_credential.certificate?.invalid;" class="smp-certificate-warning-panel" + [padding]="false" icon="error" label="Invalid certificate: {{_credential.certificate.invalidReason}}"> </smp-warning-panel> <div style="display: flex;flex-flow: row wrap;"> <mat-form-field style="flex-grow: 2"> <mat-label>Certificate ID</mat-label> - <input matInput placeholder="Access token ID" + <input matInput [matTooltip]="credential?.name" [value]="credential?.name" maxlength="255" readonly> </mat-form-field> - <div style="display: inline"> + <div style="display: inline;display: flex; flex-direction: row; justify-content: space-between; gap: 3px;"> <button id="deleteButton" mat-raised-button (click)="onDeleteButtonClicked()" color="primary" > diff --git a/smp-angular/src/app/user-settings/user-certificates/user-certificate-panel/user-certificate-panel.component.scss b/smp-angular/src/app/user-settings/user-certificates/user-certificate-panel/user-certificate-panel.component.scss index e69de29bb..588a7d255 100644 --- a/smp-angular/src/app/user-settings/user-certificates/user-certificate-panel/user-certificate-panel.component.scss +++ b/smp-angular/src/app/user-settings/user-certificates/user-certificate-panel/user-certificate-panel.component.scss @@ -0,0 +1,4 @@ +.smp-certificate-warning-panel { + font-size: 0.8em; +} + diff --git a/smp-angular/src/app/user-settings/user-certificates/user-certificates.component.ts b/smp-angular/src/app/user-settings/user-certificates/user-certificates.component.ts index bd09fd9e6..0efdfaaf4 100644 --- a/smp-angular/src/app/user-settings/user-certificates/user-certificates.component.ts +++ b/smp-angular/src/app/user-settings/user-certificates/user-certificates.component.ts @@ -109,7 +109,7 @@ export class UserCertificatesComponent implements BeforeLeaveGuard { this.dialog.open(ConfirmationDialogComponent, { data: { title: "Update Certificate data", - description: "Action will update Certificate settings: " + credential.name + " data!<br /><br />Do you wish to continue?" + description: "Action will update Certificate data:<br />" + credential.name + "!<br /><br />Do you wish to continue?" } }).afterClosed().subscribe(result => { if (result) { diff --git a/smp-angular/src/styles.css b/smp-angular/src/styles.css index 960680b43..612b3b389 100644 --- a/smp-angular/src/styles.css +++ b/smp-angular/src/styles.css @@ -245,6 +245,9 @@ a:hover { gap:0.7em; align-items: center; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 1px 2px 0 rgba(0, 0, 0, 0.24); +} + +.smp-warning-panel-padding { padding: 0.5em; } diff --git a/smp-resource-extensions/oasis-cppa3-spi/pom.xml b/smp-resource-extensions/oasis-cppa3-spi/pom.xml index 99d039019..3856fe473 100644 --- a/smp-resource-extensions/oasis-cppa3-spi/pom.xml +++ b/smp-resource-extensions/oasis-cppa3-spi/pom.xml @@ -25,7 +25,6 @@ <jaxb-api.version>2.3.1</jaxb-api.version> <org.glassfish.jaxb.jaxb-runtime.version>2.3.8</org.glassfish.jaxb.jaxb-runtime.version> </properties> - <artifactId>oasis-cppa3-spi</artifactId> <name>oasis-cppa3-spi</name> <packaging>jar</packaging> -- GitLab