Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented Certificates and ModalUploadCertificate pages #281

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/assets/styles/bmc/custom/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,12 @@ div[role='group'] {
background-color: $gray-900;
border-color: $gray-900;
}
.form-control-file {
opacity: 0;
height: 0;
&:focus + span {
box-shadow:
inset 0 0 0 3px theme-color('primary'),
Nikhil-Ashoka marked this conversation as resolved.
Show resolved Hide resolved
inset 0 0 0 5px $white;
}
}
47 changes: 18 additions & 29 deletions src/components/Global/FormFile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,26 @@
<template>
<div class="custom-form-file-container">
<label>
<b-form-file
<BFormFile
:id="id"
v-model="file"
:accept="accept"
:disabled="disabled"
:state="state"
class="form-control-file"
@change="$emit('input', file)"
>
</b-form-file>
</BFormFile>
<span
class="add-file-btn btn"
:class="{
disabled,
'btn-secondary': isSecondary,
'btn-primary': !isSecondary,
}"
>
{{ $t('global.fileUpload.browseText') }}
</span>
<slot name="invalid"></slot>
</label>
<div v-if="file" class="clear-selected-file px-3 py-2 mt-2">
Expand All @@ -31,9 +42,9 @@

<script setup>
import { useI18n } from 'vue-i18n';
import { BFormFile } from 'bootstrap-vue-next';
// import { BFormFile } from 'bootstrap-vue-next';
import IconClose from '@carbon/icons-vue/es/close/20';
import { ref } from 'vue';
import { ref, computed } from 'vue';

const props = defineProps({
id: {
Expand All @@ -57,36 +68,14 @@ const props = defineProps({
default: 'secondary',
},
});
console.log(
'id: ',
props.id,
'disabled: ',
props.disabled,
'accept: ',
props.accept,
'state: ',
props.state,
'variant',
props.variant,
);
const { t } = useI18n();
const file = ref(null);
// const isSecondary = computed(() => {
// return props.variant === 'secondary';
// });
const isSecondary = computed(() => {
return props.variant === 'secondary';
});
</script>

<style lang="scss" scoped>
.form-control-file {
opacity: 0;
height: 0;
&:focus + span {
box-shadow:
inset 0 0 0 3px theme-color('primary'),
inset 0 0 0 5px $white;
}
}

// Get mouse pointer on complete element
.add-file-btn {
position: relative;
Expand Down
9 changes: 9 additions & 0 deletions src/router/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import Memory from '@/views/ResourceManagement/Memory';
import Power from '@/views/ResourceManagement/Power';
import PowerRestorePolicy from '@/views/Settings/PowerRestorePolicy';
import IBMiServiceFunctions from '@/views/Logs/IBMiServiceFunctions';
import Certificates from '@/views/SecurityAndAccess/Certificates';

const roles = {
administrator: 'Administrator',
Expand Down Expand Up @@ -142,6 +143,14 @@ export const routes = [
title: i18n.global.t('appPageTitle.memory'),
},
},
{
path: '/security-and-access/certificates',
name: 'certificates',
component: Certificates,
meta: {
title: i18n.global.t('appPageTitle.certificates'),
},
},
{
path: '/:pathMatch(.*)*',
name: 'page-not-found',
Expand Down
5 changes: 4 additions & 1 deletion src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import ResourceMemoryStore from './modules/ResourceManagement/ResourceMemoryStor
import PowerPolicyStore from './modules/Settings/PowerPolicyStore';
import IBMiServiceFunctionsStore from './modules/Logs/IBMiServiceFunctionsStore';
import AuditLogsStore from './modules/Logs/AuditLogsStore';

import CertificatesStore from './modules/SecurityAndAccess/CertificatesStore';
import UserManagementStore from './modules/SecurityAndAccess/UserManagementStore';
// ... (export use other stores)
export {
EventLogStore,
Expand All @@ -31,5 +32,7 @@ export {
ResourceMemoryStore,
PowerPolicyStore,
IBMiServiceFunctionsStore,
CertificatesStore,
UserManagementStore,
AuditLogsStore,
};
Loading