Skip to content

Commit

Permalink
Prevent connecting to read only ledgers
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
  • Loading branch information
Gavinok committed Oct 25, 2024
1 parent 674d9c9 commit beba972
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
<template #loading>{{ $t('common.loading') }}</template>
<Column :sortable="false" header="Connect">
<template #body="{ data }">
<EndorserConnect :ledger-info="data" />
<div v-if="data.is_write">
<EndorserConnect :ledger-info="data" />
</div>
</template>
</Column>
<Column :sortable="true" field="ledger_id" header="Ledger" />
Expand All @@ -41,16 +43,16 @@
<Column
:sortable="true"
field="is_write"
header="Read Only"
header="Writable"
data-type="boolean"
style="min-width: 6rem"
>
<template #body="{ data }">
<i
class="pi"
:class="{
'pi-pencil text-green-500': data.is_write,
'pi-pencil text-red-400': !data.is_write,
'pi-check-circle text-green-500': data.is_write,
'': !data.is_write,
}"
></i>
</template>
Expand Down Expand Up @@ -115,7 +117,7 @@ const endorserList =
(config: any) => ({
ledger_id: config.id,
endorser_alias: config.endorser_alias,
is_write: config.is_write,
is_write: !config.is_write,
})
)
: [];
Expand Down

0 comments on commit beba972

Please sign in to comment.