RED-3982 - added 'pkcs signature' and 'kms signature' forms
This commit is contained in:
parent
ff795dd9a1
commit
e929705a76
@ -22,6 +22,9 @@
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="isInConfiguration">
|
||||
{{ 'digital-signature-dialog.upload-warning-message' | translate }}
|
||||
<iqser-upload-file></iqser-upload-file>
|
||||
|
||||
<redaction-pkcs-signature-configuration
|
||||
*ngIf="selectedOption === certificateType.PKCS"
|
||||
></redaction-pkcs-signature-configuration>
|
||||
|
||||
@ -33,5 +33,10 @@
|
||||
.selected {
|
||||
background: rgba(variables.$red-1, 0.1);
|
||||
}
|
||||
|
||||
iqser-upload-file {
|
||||
padding-top: 24px;
|
||||
padding-bottom: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,8 @@ import { Component, Injector, ViewChild } from '@angular/core';
|
||||
import { digitalSignatureDialogTranslations } from '../../translations/digital-signature-dialog-translations';
|
||||
import { BaseDialogComponent } from '../../../../../../../../libs/common-ui/src';
|
||||
import { MatDialogRef } from '@angular/material/dialog';
|
||||
import { PkcsSignatureConfigurationComponent } from './pkcs-signature-configuration/pkcs-signature-configuration.component';
|
||||
import { KmsSignatureConfigurationComponent } from './kms-signature-configuration/kms-signature-configuration.component';
|
||||
|
||||
enum CertificateType {
|
||||
PKCS = 'pkcs',
|
||||
@ -13,8 +15,8 @@ enum CertificateType {
|
||||
styleUrls: ['./configure-certificate-dialog.component.scss'],
|
||||
})
|
||||
export class ConfigureCertificateDialogComponent extends BaseDialogComponent {
|
||||
// @ViewChild(EditDossierGeneralInfoComponent) generalInfoComponent: EditDossierGeneralInfoComponent;
|
||||
// @ViewChild(EditDossierDownloadPackageComponent) downloadPackageComponent: EditDossierDownloadPackageComponent;
|
||||
@ViewChild(PkcsSignatureConfigurationComponent) pkcsSignatureConfigurationComponent: PkcsSignatureConfigurationComponent;
|
||||
@ViewChild(KmsSignatureConfigurationComponent) kmsSignatureConfigurationComponent: KmsSignatureConfigurationComponent;
|
||||
|
||||
readonly certificateType = CertificateType;
|
||||
readonly certificateOptions = Object.values(CertificateType);
|
||||
@ -29,6 +31,11 @@ export class ConfigureCertificateDialogComponent extends BaseDialogComponent {
|
||||
|
||||
toggleIsInConfiguration() {
|
||||
this.isInConfiguration = !this.isInConfiguration;
|
||||
if (this.isInConfiguration && this.selectedOption === CertificateType.KMS) {
|
||||
this._dialogRef.updateSize('810px');
|
||||
} else {
|
||||
this._dialogRef.updateSize('662px');
|
||||
}
|
||||
}
|
||||
|
||||
save() {}
|
||||
|
||||
@ -1 +1,37 @@
|
||||
<iqser-upload-file></iqser-upload-file>
|
||||
<form [formGroup]="form">
|
||||
<div class="flex">
|
||||
<div class="flex fields-container">
|
||||
<div class="iqser-input-group required w-300">
|
||||
<label translate="digital-signature-dialog.forms.kms.certificate-name"></label>
|
||||
<input formControlName="certificateName" type="text" />
|
||||
</div>
|
||||
<div class="iqser-input-group required w-300">
|
||||
<label translate="digital-signature-dialog.forms.kms.kms-service-endpoint"></label>
|
||||
<input formControlName="kmsServiceEndpoint" type="text" />
|
||||
</div>
|
||||
<div class="iqser-input-group required w-300">
|
||||
<label translate="digital-signature-dialog.forms.kms.kms-region"></label>
|
||||
<input formControlName="kmsRegion" type="text" />
|
||||
</div>
|
||||
<div class="iqser-input-group required w-300">
|
||||
<label translate="digital-signature-dialog.forms.kms.kms-id"></label>
|
||||
<input formControlName="kmsKeyId" type="text" />
|
||||
</div>
|
||||
<div class="iqser-input-group required w-300">
|
||||
<label translate="digital-signature-dialog.forms.kms.kms-access-key"></label>
|
||||
<input formControlName="kmsAccessKey" type="text" />
|
||||
</div>
|
||||
<div class="iqser-input-group required w-300">
|
||||
<label translate="digital-signature-dialog.forms.kms.kms-secret-key"></label>
|
||||
<input formControlName="kmsSecretKey" type="text" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex fields-container">
|
||||
<div class="iqser-input-group w-400 certificate">
|
||||
<label translate="digital-signature-dialog.forms.kms.certificate-content"></label>
|
||||
<textarea formControlName="certificate" type="text"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
.certificate {
|
||||
height: 100%;
|
||||
|
||||
textarea {
|
||||
resize: none;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,5 @@
|
||||
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-kms-signature-configuration',
|
||||
@ -6,4 +7,20 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||
styleUrls: ['./kms-signature-configuration.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class KmsSignatureConfigurationComponent {}
|
||||
export class KmsSignatureConfigurationComponent implements OnInit {
|
||||
form: FormGroup;
|
||||
|
||||
constructor(private readonly _formBuilder: FormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.form = this._formBuilder.group({
|
||||
certificateName: ['', Validators.required],
|
||||
kmsServiceEndpoint: ['', Validators.required],
|
||||
kmsRegion: ['', Validators.required],
|
||||
kmsKeyId: ['', Validators.required],
|
||||
kmsAccessKey: ['', Validators.required],
|
||||
kmsSecretKey: ['', Validators.required],
|
||||
certificate: ['', Validators.required],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -1 +1,26 @@
|
||||
<iqser-upload-file></iqser-upload-file>
|
||||
<form [formGroup]="form">
|
||||
<div class="flex">
|
||||
<div class="flex fields-container">
|
||||
<div class="iqser-input-group required w-300">
|
||||
<label translate="digital-signature-dialog.forms.pkcs.certificate-name"></label>
|
||||
<input formControlName="certificateName" type="text" />
|
||||
</div>
|
||||
<div class="iqser-input-group required w-300">
|
||||
<label translate="digital-signature-dialog.forms.pkcs.password-key"></label>
|
||||
<input formControlName="password" type="password" />
|
||||
</div>
|
||||
<div class="iqser-input-group w-300">
|
||||
<label translate="digital-signature-dialog.forms.pkcs.contact-information"></label>
|
||||
<input formControlName="contactInfo" type="text" />
|
||||
</div>
|
||||
<div class="iqser-input-group w-300">
|
||||
<label translate="digital-signature-dialog.forms.pkcs.location"></label>
|
||||
<input formControlName="location" type="text" />
|
||||
</div>
|
||||
<div class="iqser-input-group w-450">
|
||||
<label translate="digital-signature-dialog.forms.pkcs.reason"></label>
|
||||
<textarea formControlName="reason" rows="4" type="text"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
textarea {
|
||||
resize: none;
|
||||
}
|
||||
@ -1,4 +1,5 @@
|
||||
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-pkcs-signature-configuration',
|
||||
@ -6,4 +7,18 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||
styleUrls: ['./pkcs-signature-configuration.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class PkcsSignatureConfigurationComponent {}
|
||||
export class PkcsSignatureConfigurationComponent implements OnInit {
|
||||
form: FormGroup;
|
||||
|
||||
constructor(private readonly _formBuilder: FormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.form = this._formBuilder.group({
|
||||
certificateName: ['', Validators.required],
|
||||
password: ['', Validators.required],
|
||||
contactInfo: [''],
|
||||
location: [''],
|
||||
reason: [''],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ export class AdminDialogService extends DialogService<DialogType> {
|
||||
},
|
||||
configureCertificate: {
|
||||
component: ConfigureCertificateDialogComponent,
|
||||
dialogConfig: { disableClose: false },
|
||||
dialogConfig: { disableClose: false, maxHeight: '100vh' },
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@ -24,14 +24,6 @@
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.fields-container {
|
||||
flex-direction: column;
|
||||
|
||||
&:first-child {
|
||||
margin-right: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
redaction-small-chip {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"ADMIN_CONTACT_NAME": null,
|
||||
"ADMIN_CONTACT_URL": null,
|
||||
"API_URL": "https://dev-05.iqser.cloud/redaction-gateway-v1",
|
||||
"API_URL": "https://dev-08.iqser.cloud/redaction-gateway-v1",
|
||||
"APP_NAME": "RedactManager",
|
||||
"AUTO_READ_TIME": 3,
|
||||
"BACKEND_APP_VERSION": "4.4.40",
|
||||
@ -17,7 +17,7 @@
|
||||
"MAX_RETRIES_ON_SERVER_ERROR": 3,
|
||||
"OAUTH_CLIENT_ID": "redaction",
|
||||
"OAUTH_IDP_HINT": null,
|
||||
"OAUTH_URL": "https://dev-05.iqser.cloud/auth/realms/redaction",
|
||||
"OAUTH_URL": "https://dev-08.iqser.cloud/auth/realms/redaction",
|
||||
"RECENT_PERIOD_IN_HOURS": 24,
|
||||
"SELECTION_MODE": "structural",
|
||||
"MANUAL_BASE_URL": "https://docs.redactmanager.com/preview"
|
||||
|
||||
@ -662,6 +662,24 @@
|
||||
"continue": "",
|
||||
"save": ""
|
||||
},
|
||||
"forms": {
|
||||
"kms": {
|
||||
"certificate-content": "",
|
||||
"certificate-name": "",
|
||||
"kms-access-key": "",
|
||||
"kms-id": "",
|
||||
"kms-region": "",
|
||||
"kms-secret-key": "",
|
||||
"kms-service-endpoint": ""
|
||||
},
|
||||
"pkcs": {
|
||||
"certificate-name": "",
|
||||
"contact-information": "",
|
||||
"location": "",
|
||||
"password-key": "",
|
||||
"reason": ""
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"kms": {
|
||||
"description": "",
|
||||
@ -676,7 +694,8 @@
|
||||
"before-configuration": "",
|
||||
"kms": "",
|
||||
"pkcs": ""
|
||||
}
|
||||
},
|
||||
"upload-warning-message": ""
|
||||
},
|
||||
"digital-signature-screen": {
|
||||
"action": {
|
||||
|
||||
@ -662,6 +662,24 @@
|
||||
"continue": "Continue",
|
||||
"save": "Save Configurations"
|
||||
},
|
||||
"forms": {
|
||||
"kms": {
|
||||
"certificate-content": "Certificate Content",
|
||||
"certificate-name": "Certificate Name",
|
||||
"kms-access-key": "KMS Access Key",
|
||||
"kms-id": "KMS Id",
|
||||
"kms-region": "KMS Region",
|
||||
"kms-secret-key": "KMS Secret Key",
|
||||
"kms-service-endpoint": "KMS Service Endpoint"
|
||||
},
|
||||
"pkcs": {
|
||||
"certificate-name": "Certificate Name",
|
||||
"contact-information": "Contact Information",
|
||||
"location": "Location",
|
||||
"password-key": "Password Key",
|
||||
"reason": "Reason"
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"kms": {
|
||||
"description": "Provide a corresponding PEM file containing the certificate, along with Amazon KMS credentials needed for securing the private key.",
|
||||
@ -676,7 +694,8 @@
|
||||
"before-configuration": "Configure Digital Signature Certificate",
|
||||
"kms": "Configure a Certificate with Amazon KMS",
|
||||
"pkcs": "Configure a PKCS#12 Certificate"
|
||||
}
|
||||
},
|
||||
"upload-warning-message": "To configure the certificate, you first need to upload it."
|
||||
},
|
||||
"digital-signature-screen": {
|
||||
"action": {
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit c695f5c4419f4fd8d76946d5a474dccbda0edad2
|
||||
Subproject commit f90405572f662bb150950032f726305a616de0dc
|
||||
Loading…
x
Reference in New Issue
Block a user