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

Feature flags 717 #743

Merged
merged 22 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from 7 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
1 change: 1 addition & 0 deletions services/tenant-ui/config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"showInnkeeperReservationPassword": true,
"showInnkeeperAdminLogin": true,
"showOIDCReservationLogin": false,
"showWritableComponents": true,
"oidc": {
"active": false,
"authority": "https://dev.loginproxy.gov.bc.ca/auth/realms/digitaltrust-nrm",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ import StatusChip from '../common/StatusChip.vue';
import { TABLE_OPT, API_PATH } from '@/helpers/constants';
import { formatDateLong } from '@/helpers';

// State
import { useConfigStore } from '@/store/configStore';
const { config } = storeToRefs(useConfigStore());

const confirm = useConfirm();
const toast = useToast();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
:connection-id="props.connectionId"
:connection-name="props.connectionName"
/>
<div class="p-inputgroup flex-1 send-message">
<div
v-if="config.frontend.showWritableComponents"
class="p-inputgroup flex-1 send-message"
>
<InputText
v-model="message"
type="text"
Expand All @@ -36,6 +39,10 @@ import MessageContactList from './MessageContactList.vue';

// State
import { useMessageStore } from '@/store';
import { storeToRefs } from 'pinia';
import { useConfigStore } from '@/store/configStore';

const { config } = storeToRefs(useConfigStore());

const messageStore = useMessageStore();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<Column :sortable="false" header="Actions">
<template #body="{ data }">
<Button
v-if="config.frontend.showWritableComponents"
title="Delete Credential Definition"
icon="pi pi-trash"
class="p-button-rounded p-button-icon-only p-button-text"
Expand Down Expand Up @@ -129,6 +130,7 @@ import { useToast } from 'vue-toastification';
// State
import { useGovernanceStore } from '../../store';
import { storeToRefs } from 'pinia';
import { useConfigStore } from '@/store/configStore';
// Custom components
import RowExpandData from '../common/RowExpandData.vue';
import { TABLE_OPT, API_PATH } from '@/helpers/constants';
Expand All @@ -138,6 +140,8 @@ import MainCardContent from '../layout/mainCard/MainCardContent.vue';
const confirm = useConfirm();
const toast = useToast();

const { config } = storeToRefs(useConfigStore());

const governanceStore = useGovernanceStore();
const { loading, storedCredDefs } = storeToRefs(useGovernanceStore());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<template #header>
<div class="flex justify-content-between">
<div class="flex justify-content-start">
<OfferCredential />
<OfferCredential v-if="config.frontend.showWritableComponents" />
</div>
<div class="flex justify-content-end">
<span class="p-input-icon-left">
Expand Down Expand Up @@ -142,6 +142,7 @@ import { Ref, computed, onMounted, ref } from 'vue';
// State
import { useContactsStore, useIssuerStore } from '@/store';
import { storeToRefs } from 'pinia';
import { useConfigStore } from '@/store/configStore';
// PrimeVue/etc
import { FilterMatchMode } from 'primevue/api';
import Column from 'primevue/column';
Expand All @@ -159,6 +160,8 @@ import DeleteCredentialExchangeButton from './deleteCredential/DeleteCredentialE
import RevokeCredentialButton from './deleteCredential/RevokeCredentialButton.vue';
import OfferCredential from './offerCredential/OfferCredential.vue';

const { config } = storeToRefs(useConfigStore());

const toast = useToast();

const { listContacts, findConnectionName } = useContactsStore();
Expand Down
11 changes: 9 additions & 2 deletions services/tenant-ui/frontend/src/components/issuance/Schemas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@
<template #header>
<div class="flex justify-content-between">
<div class="flex justify-content-start">
<CreateSchema />
<CopySchema class="ml-4" />
<CreateSchema v-if="config.frontend.showWritableComponents" />
<CopySchema
v-if="config.frontend.showWritableComponents"
class="ml-4"
/>
</div>
<div class="flex justify-content-end">
<span class="p-input-icon-left">
Expand Down Expand Up @@ -173,6 +176,10 @@ import RowExpandData from '../common/RowExpandData.vue';
import { TABLE_OPT, API_PATH } from '@/helpers/constants';
import { formatDateLong } from '@/helpers';

// State
import { useConfigStore } from '@/store/configStore';
const { config } = storeToRefs(useConfigStore());

const confirm = useConfirm();
const toast = useToast();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
<template #header>
<div class="flex justify-content-between">
<div class="flex justify-content-start">
<CreateMessage @success="loadTable" />
<CreateMessage
v-if="config.frontend.showWritableComponents"
@success="loadTable"
/>
</div>
<div class="flex justify-content-end">
<span class="p-input-icon-left">
Expand Down Expand Up @@ -133,6 +136,10 @@ import MainCardContent from '../layout/mainCard/MainCardContent.vue';
import CreateMessage from './createMessage/CreateMessage.vue';
import LoadingLabel from '../common/LoadingLabel.vue';

// State
import { useConfigStore } from '@/store/configStore';
const { config } = storeToRefs(useConfigStore());

const toast = useToast();

const messageStore = useMessageStore();
Expand Down
5 changes: 4 additions & 1 deletion services/tenant-ui/frontend/src/components/oca/Oca.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<template #header>
<div class="flex justify-content-between">
<div class="flex justify-content-start">
<CreateOca />
<!-- <CreateOca v-if="config.frontend.showWritableComponents" /> -->
popkinj marked this conversation as resolved.
Show resolved Hide resolved
</div>
<div class="flex justify-content-end">
<span class="p-input-icon-left">
Expand All @@ -39,6 +39,7 @@
<Column :sortable="false" header="Actions">
<template #body="{ data }">
<Button
v-if="config.frontend.showWritableComponents"
title="Delete Credential Definition"
icon="pi pi-trash"
class="p-button-rounded p-button-icon-only p-button-text"
Expand Down Expand Up @@ -122,6 +123,8 @@ import { useToast } from 'vue-toastification';
// State
import { useGovernanceStore } from '../../store';
import { storeToRefs } from 'pinia';
import { useConfigStore } from '@/store/configStore';
const { config } = storeToRefs(useConfigStore());
// Custom components
import CreateOca from './createOca/CreateOca.vue';
import MainCardContent from '../layout/mainCard/MainCardContent.vue';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
>
<template #header>
<div class="flex justify-content-between">
<CreateRequest />
<CreateRequest v-if="config.frontend.showWritableComponents" />

<div class="flex justify-content-end">
<span class="p-input-icon-left">
Expand All @@ -42,9 +42,15 @@
<Column :sortable="false" :header="$t('common.actions')">
<template #body="{ data }">
<div class="flex">
<DeleteExchangeRecord :record-id="data.presentation_exchange_id" />
<DeleteExchangeRecord
v-if="config.frontend.showWritableComponents"
:record-id="data.presentation_exchange_id"
/>
<CreateRequest
v-if="data.role === 'verifier'"
v-if="
data.role === 'verifier' &&
config.frontend.showWritableComponents
"
:existing-pres-req="data.presentation_request"
icon-display
/>
Expand Down Expand Up @@ -104,6 +110,7 @@ import { useToast } from 'vue-toastification';
// State
import { useContactsStore, useVerifierStore } from '@/store';
import { storeToRefs } from 'pinia';
import { useConfigStore } from '@/store/configStore';
// Components
import MainCardContent from '@/components/layout/mainCard/MainCardContent.vue';
import CreateRequest from './createPresentationRequest/CreateRequest.vue';
Expand All @@ -124,6 +131,7 @@ const { contacts } = storeToRefs(useContactsStore());
const { loading, presentations, selectedPresentation } = storeToRefs(
useVerifierStore()
);
const { config } = storeToRefs(useConfigStore());

const loadTable = async () => {
verifierStore.listPresentations().catch((err) => {
Expand Down
Loading