Skip to content

Commit

Permalink
More ledger information
Browse files Browse the repository at this point in the history
Signed-off-by: Lucas ONeil <lucasoneil@gmail.com>
  • Loading branch information
loneil committed Nov 11, 2023
1 parent 662e098 commit b21a5a5
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,41 @@
<ProgressSpinner v-if="loading" />
<div v-else>
<p>
<strong>ACA-Py Version:</strong> {{ serverConfig?.config?.version }}
<strong>{{ $t('serverConfig.acapyVersion') }}</strong>
{{ serverConfig?.config?.version }}
</p>
<p>
<strong>{{ $t('serverConfig.tractionProxy') }}</strong>
{{ config.frontend.tenantProxyPath }}
<a :href="swaggerUrl" target="_blank"> <i class="pi pi-external-link ml-2" /> </a>
</p>

<div class="grid mt-3">
<div class="col">
<Fieldset legend="Ledger Details" :toggleable="true">
<p class="mt-0">Ledger List</p>
<Fieldset
:legend="$t('serverConfig.ledger.ledgerDetails')"
:toggleable="true"
>
<p class="mt-0">
<strong>{{ $t('serverConfig.ledger.ledgerList') }}</strong>
</p>
<DataTable :value="ledgerConfigList" size="small" striped-rows>
<Column field="id" header="id"></Column>
<Column field="endorser_alias" header="endorser_alias"></Column>
<Column field="endorser_did" header="endorser_did"></Column>
</DataTable>
<p>
<strong>{{ $t('serverConfig.ledger.quickConnect') }}</strong>
{{ config.frontend.quickConnectEndorserName }}
</p>
<p>
<strong>{{ $t('serverConfig.ledger.default') }}</strong>
{{ serverConfig?.config?.['ledger.write_ledger'] }}
</p>
</Fieldset>

<PluginList class="mt-4" />

<Accordion class="mt-4">
<AccordionTab :header="$t('serverConfig.expand')">
<div v-if="loading" class="flex justify-content-center">
Expand All @@ -31,22 +52,16 @@
</div>

<div class="col">
<Fieldset legend="Header" :toggleable="true">
<p class="m-0">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat
nulla pariatur. Excepteur sint occaecat cupidatat non proident,
sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
<Fieldset
:legend="$t('serverConfig.tenantUi.tenantUi')"
:toggleable="true"
>
<p class="m-0"></p>
</Fieldset>

<PluginList class="mt-4" />
</div>
</div>
</div>
<vue-json-pretty :data="config" />
</MainCardContent>
</template>

Expand All @@ -63,12 +78,13 @@ import { computed, onMounted } from 'vue';
import VueJsonPretty from 'vue-json-pretty';
import { useToast } from 'vue-toastification';
// Components
import { useInnkeeperTenantsStore } from '@/store';
import { useConfigStore, useInnkeeperTenantsStore } from '@/store';
import MainCardContent from '../../layout/mainCard/MainCardContent.vue';
import PluginList from '@/components/about/PluginList.vue';
const toast = useToast();
const { config } = storeToRefs(useConfigStore());
const innkeeperTenantsStore = useInnkeeperTenantsStore();
const { loading, serverConfig } = storeToRefs(useInnkeeperTenantsStore());
Expand All @@ -83,13 +99,16 @@ const loadConfig = async () => {
});
};
// computed list of the "ledger.ledger_config_list" array in serverConfig
const ledgerConfigList = computed(() => {
if (serverConfig.value?.config) {
return serverConfig.value.config['ledger.ledger_config_list'];
}
return [];
});
const swaggerUrl = computed(
() => `${config.value.frontend.tenantProxyPath}/api/doc`
);
</script>

<style scoped></style>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import VueJsonPretty from 'vue-json-pretty';
import 'vue-json-pretty/lib/styles.css';
import { storeToRefs } from 'pinia';
import { useConfigStore, useTokenStore } from '@/store';
import { useConfigStore } from '@/store';
import JWT from './JWT.vue';
import 'primeicons/primeicons.css';
Expand Down
15 changes: 13 additions & 2 deletions services/tenant-ui/frontend/src/plugins/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,19 @@
"phone": "Phone / Mobile"
},
"serverConfig": {
"expand": "Show full server status config",
"serverConfig": "Server Configuration"
"acapyVersion": "ACA-Py Version:",
"expand": "Show full ACA-Py server config",
"ledger": {
"default": "Default base ledger:",
"ledgerDetails": "Ledger Details",
"ledgerList": "Ledger List",
"quickConnect": "Tenant UI quick-connect endorser:"
},
"tractionProxy": "Traction Proxy URL:",
"serverConfig": "Server Configuration",
"tenantUi": {
"tenantUi": "Tenant UI"
}
},
"session": {
"countdown": "You are going to be logged out in { seconds } seconds...",
Expand Down

0 comments on commit b21a5a5

Please sign in to comment.