diff options
author | Sean Zhang <xiazhang@nvidia.com> | 2024-06-15 08:42:41 +0300 |
---|---|---|
committer | Gunnar Mills <gunnar@gmills.xyz> | 2024-06-25 18:45:07 +0300 |
commit | 8841b7d463a5272a87faaa14cb103f778a772770 (patch) | |
tree | 731d8c82ddb76c1c9358c36d707747b09c5189cd /src/views/SecurityAndAccess/Certificates | |
parent | ccb71f0bd6b91b4344cf9a776a433528a5771217 (diff) | |
download | webui-vue-8841b7d463a5272a87faaa14cb103f778a772770.tar.xz |
Replace fixed paths with response from API
Currently, the Redfish request used fixed URIs, modify the code to use
the BMC and System paths got from response of API calls.
For CertificateStore, since it was using the URL for constant variable
assignment, changed the constant CERTIFICATE_TYPES to method call.
Change-Id: I330b7272083e3e6993aae5705aae170b8e9a4659
Signed-off-by: Sean Zhang <xiazhang@nvidia.com>
Diffstat (limited to 'src/views/SecurityAndAccess/Certificates')
-rw-r--r-- | src/views/SecurityAndAccess/Certificates/ModalGenerateCsr.vue | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/views/SecurityAndAccess/Certificates/ModalGenerateCsr.vue b/src/views/SecurityAndAccess/Certificates/ModalGenerateCsr.vue index d9d65912..9f60d2ba 100644 --- a/src/views/SecurityAndAccess/Certificates/ModalGenerateCsr.vue +++ b/src/views/SecurityAndAccess/Certificates/ModalGenerateCsr.vue @@ -366,7 +366,6 @@ import IconCheckmark from '@carbon/icons-vue/es/checkmark/20'; import { required, requiredIf } from 'vuelidate/lib/validators'; import { COUNTRY_LIST } from './CsrCountryCodes'; -import { CERTIFICATE_TYPES } from '@/store/modules/SecurityAndAccess/CertificatesStore'; import BVToastMixin from '@/components/Mixins/BVToastMixin'; import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; @@ -391,14 +390,6 @@ export default { keyCurveId: null, keyBitLength: null, }, - certificateOptions: CERTIFICATE_TYPES.reduce((arr, cert) => { - if (cert.type === 'TrustStore Certificate') return arr; - arr.push({ - text: cert.label, - value: cert.type, - }); - return arr; - }, []), countryOptions: COUNTRY_LIST.map((country) => ({ text: country.label, value: country.code, @@ -410,6 +401,21 @@ export default { csrStringCopied: false, }; }, + computed: { + certificateTypes() { + return this.$store.getters['certificates/certificateTypes']; + }, + certificateOptions() { + return this.certificateTypes.reduce((arr, cert) => { + if (cert.type === 'TrustStore Certificate') return arr; + arr.push({ + text: cert.label, + value: cert.type, + }); + return arr; + }, []); + }, + }, validations: { form: { certificateType: { required }, |