Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 5100a693 authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

Small fixes on Certificate panel

parent 5e2cf91a
No related branches found
No related tags found
No related merge requests found
Showing
with 42 additions and 32 deletions
<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'}"
......
......@@ -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';
......
......@@ -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>
......
......@@ -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>
<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" >
......
.smp-certificate-warning-panel {
font-size: 0.8em;
}
......@@ -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) {
......
......@@ -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;
}
......
......@@ -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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment