Skip to content

Commit

Permalink
fix(frontend): riak下架允许选择异常节点 #7858
Browse files Browse the repository at this point in the history
  • Loading branch information
3octaves authored and jinquantianxia committed Nov 11, 2024
1 parent db3d979 commit c89ad75
Showing 1 changed file with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@
<template>
<div class="delete-nodes">
<NodeNumber :id="data.id" />
<BkAlert
<!-- <BkAlert
v-if="normalCount <= 3"
theme="warning"
:title="t('当前正常的节点数量少于n ,不能删除节点,请先添加节点', [3])" />
:title="t('当前正常的节点数量少于n ,不能删除节点,请先添加节点', [3])" /> -->
<DbTable
ref="tableRef"
class="mt-16"
:columns="columns"
:data-source="getRiakNodeList"
:is-row-select-enable="isRowSelectEnable" />
:data-source="getRiakNodeList" />
</div>
</template>

Expand Down Expand Up @@ -97,15 +96,15 @@

const tableRef = ref();

const nodeList = computed<RiakNodeModel[]>(() => tableRef.value?.getData() || []);
const normalCount = computed(() => nodeList.value.filter(nodeItem => nodeItem.isNodeNormal).length);
// const nodeList = computed<RiakNodeModel[]>(() => tableRef.value?.getData() || []);
// const normalCount = computed(() => nodeList.value.filter(nodeItem => nodeItem.isNodeNormal).length);

const isRowSelectEnable = ({ row }: { row: RiakNodeModel }) => {
if (normalCount.value > 3) {
return row.isNodeNormal;
}
return false;
};
// const isRowSelectEnable = ({ row }: { row: RiakNodeModel }) => {
// if (normalCount.value > 3) {
// return row.isNodeNormal;
// }
// return false;
// };

const fetchData = () => {
tableRef.value.fetchData({}, {
Expand Down

0 comments on commit c89ad75

Please sign in to comment.