From 2cd8f59845aa6dfdd4f5472b3c23c62effd6382a Mon Sep 17 00:00:00 2001 From: Kianna <30884335+kiannaquach@users.noreply.github.com> Date: Tue, 5 Sep 2023 14:44:20 -0700 Subject: [PATCH] [VAULT-19341] convert secrets engines, learn more to ts and fix date bug (#22762) --- .../dashboard/{learn-more-card.js => learn-more-card.ts} | 0 .../{secrets-engines-card.js => secrets-engines-card.ts} | 7 ++++++- .../templates/components/dashboard/client-count-card.hbs | 2 +- ui/app/templates/components/dashboard/replication-card.hbs | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) rename ui/app/components/dashboard/{learn-more-card.js => learn-more-card.ts} (100%) rename ui/app/components/dashboard/{secrets-engines-card.js => secrets-engines-card.ts} (84%) diff --git a/ui/app/components/dashboard/learn-more-card.js b/ui/app/components/dashboard/learn-more-card.ts similarity index 100% rename from ui/app/components/dashboard/learn-more-card.js rename to ui/app/components/dashboard/learn-more-card.ts diff --git a/ui/app/components/dashboard/secrets-engines-card.js b/ui/app/components/dashboard/secrets-engines-card.ts similarity index 84% rename from ui/app/components/dashboard/secrets-engines-card.js rename to ui/app/components/dashboard/secrets-engines-card.ts index b7343e5be3..d30e315ccc 100644 --- a/ui/app/components/dashboard/secrets-engines-card.js +++ b/ui/app/components/dashboard/secrets-engines-card.ts @@ -4,6 +4,7 @@ */ import Component from '@glimmer/component'; +import type SecretEngineModel from 'vault/models/secret-engine'; /** * @module DashboardSecretsEnginesCard @@ -16,7 +17,11 @@ import Component from '@glimmer/component'; * @param {array} secretsEngines - list of secrets engines */ -export default class DashboardSecretsEnginesCard extends Component { +interface Args { + secretsEngines: SecretEngineModel[]; +} + +export default class DashboardSecretsEnginesCard extends Component { get filteredSecretsEngines() { return this.args.secretsEngines?.filter((secretEngine) => secretEngine.shouldIncludeInList); } diff --git a/ui/app/templates/components/dashboard/client-count-card.hbs b/ui/app/templates/components/dashboard/client-count-card.hbs index 6d33b931aa..5d4ba26b27 100644 --- a/ui/app/templates/components/dashboard/client-count-card.hbs +++ b/ui/app/templates/components/dashboard/client-count-card.hbs @@ -50,7 +50,7 @@ /> Updated - {{date-format this.updatedAt "MMM dd, yyyy hh:mm:SS"}} + {{date-format this.updatedAt "MMM dd, yyyy hh:mm:ss"}} {{/if}} diff --git a/ui/app/templates/components/dashboard/replication-card.hbs b/ui/app/templates/components/dashboard/replication-card.hbs index 80d3c72c27..03305b6078 100644 --- a/ui/app/templates/components/dashboard/replication-card.hbs +++ b/ui/app/templates/components/dashboard/replication-card.hbs @@ -79,7 +79,7 @@ /> Updated - {{date-format @updatedAt "MMM dd, yyyy hh:mm:SS"}} + {{date-format @updatedAt "MMM dd, yyyy hh:mm:ss"}} {{else}}