fix: add expiration date information to service users keys (#7497)

* feat: add ExpirationDate to MachineKey JSON detail

* fix: include time in expiration date column for machine keys table

* fix: show expiration date in ShowKeyDialog if available

* fix: add machine key expiration date note

---------

Co-authored-by: Tim Möhlmann <[email protected]>
This commit is contained in:
Miguel Cabrerizo
2024-03-13 18:21:19 +00:00
committed by GitHub
co-authored by Tim Möhlmann
parent 30a1f4b39e
commit dff5984f7d
6 changed files with 53 additions and 34 deletions
@@ -11,6 +11,7 @@ import { InfoSectionType } from '../info-section/info-section.component';
})
export class ShowKeyDialogComponent {
public keyResponse!: AddMachineKeyResponse.AsObject | AddAppKeyResponse.AsObject;
public expirationDate: string = '';
public InfoSectionType: any = InfoSectionType;
constructor(
@@ -18,6 +19,10 @@ export class ShowKeyDialogComponent {
@Inject(MAT_DIALOG_DATA) public data: any,
) {
this.keyResponse = data.key;
if (this.keyResponse.keyDetails) {
const keyDetails: { expirationDate: string } = JSON.parse(atob(this.keyResponse.keyDetails.toString()));
this.expirationDate = keyDetails.expirationDate;
}
}
public saveFile(): void {