Skip to content

Commit

Permalink
fix(frontend): 监控告警自测bug修复 #1531
Browse files Browse the repository at this point in the history
  • Loading branch information
jinquantianxia authored and hLinx committed Oct 26, 2023
1 parent cafe895 commit f9eb1c2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 1 addition & 3 deletions dbm-ui/frontend/src/components/db-table/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@
releateUrlQuery?: boolean,
// 没提供默认使用浏览器窗口的高度 window.innerHeight
containerHeight?: number,
pageOffsetBottom?: number,
}

interface Emits {
Expand Down Expand Up @@ -153,7 +152,6 @@
primaryKey: 'id',
releateUrlQuery: false,
containerHeight: undefined,
pageOffsetBottom: 48,
});

const emits = defineEmits<Emits>();
Expand Down Expand Up @@ -498,7 +496,7 @@
const totalHeight = props.containerHeight ? props.containerHeight : window.innerHeight;
const tableHeaderHeight = 42;
const paginationHeight = 60;
const pageOffsetBottom = props.containerHeight ? 0 : props.pageOffsetBottom;
const pageOffsetBottom = props.containerHeight ? 0 : 20;
const tableRowHeight = 42;

const tableRowTotalHeight = totalHeight - top - tableHeaderHeight - paginationHeight - pageOffsetBottom;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
ref="tableRef"
class="table-box"
:columns="columns"
:data-source="queryMonitorPolicyList"
:page-offset-bottom="35" />
:data-source="queryMonitorPolicyList" />
</div>
<EditRule
v-model="isShowEditStrrategySideSilder"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
field: 'name',
minWidth: 220,
render: ({ row }: {row: RowData}) => {
const isNotActive = row.status === RuleStatus.TERMINATED || row.status === RuleStatus.EXPIRED;
const isNotActive = [RuleStatus.TERMINATED, RuleStatus.EXPIRED].includes(row.status as RuleStatus);
const color = (isNotActive || !row.is_enabled) ? '#63656E' : '#3A84FF';
return <bk-button
text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,13 @@
const { run: fetchUseList } = useRequest(getUseList, {
manual: true,
onSuccess: (res) => {
contactList.value = res.results.filter(item => !tagsList.value?.includes(item.username))
.map(item => ({ label: item.username, value: item.username }));
contactList.value = res.results.reduce((results, item) => {
if (!tagsList.value?.includes(item.username)) {
const obj = { label: item.username, value: item.username };
results.push(obj);
}
return results;
}, [] as { label: string, value: string }[]);
},
});

Expand Down

0 comments on commit f9eb1c2

Please sign in to comment.