Skip to content

Commit

Permalink
feat(frontend): 添加全局及业务下的资源标签管理功能 TencentBlueKing#7285
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 22784
  • Loading branch information
royalpioneer committed Nov 4, 2024
1 parent 45b92b5 commit fe3c2bf
Show file tree
Hide file tree
Showing 84 changed files with 7,580 additions and 4,069 deletions.
30 changes: 30 additions & 0 deletions dbm-ui/frontend/lib/bk-icon/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ <h2 class="page-title">
</div>
<section class="tab-content single-color active" data-type="singleColor">
<ul class="icon-list">
<li class="icon-item" title="tags">
<span class="icon bk-dbm-icon db-icon-tags"></span>
<p class="icon-text">tags</p>
</li>
<li class="icon-item" title="check-circle-fill">
<span class="icon bk-dbm-icon db-icon-check-circle-fill"></span>
<p class="icon-text">check-circle-fill</p>
Expand Down Expand Up @@ -749,6 +753,10 @@ <h2 class="page-title">
<span class="icon bk-dbm-icon db-icon-backup-2"></span>
<p class="icon-text">backup-2</p>
</li>
<li class="icon-item" title="loading-tubiao">
<span class="icon bk-dbm-icon db-icon-loading-tubiao"></span>
<p class="icon-text">loading-tubiao</p>
</li>
<li class="icon-item" title="host-select">
<span class="icon bk-dbm-icon db-icon-host-select"></span>
<p class="icon-text">host-select</p>
Expand Down Expand Up @@ -829,6 +837,10 @@ <h2 class="page-title">
<span class="icon bk-dbm-icon db-icon-dirty-host"></span>
<p class="icon-text">dirty-host</p>
</li>
<li class="icon-item" title="tag-3">
<span class="icon bk-dbm-icon db-icon-tag-3"></span>
<p class="icon-text">tag-3</p>
</li>
<li class="icon-item" title="saoba">
<span class="icon bk-dbm-icon db-icon-saoba"></span>
<p class="icon-text">saoba</p>
Expand Down Expand Up @@ -990,6 +1002,12 @@ <h3 class="describe-title">如何使用</h3>
</section>
<section class="tab-content multiple-color" data-type="multipleColor">
<ul class="icon-list">
<li class="colorful-icon">
<svg class="icon svg-icon">
<use xlink:href="#db-icon-tags"></use>
</svg>
<p class="icon-text">tags</p>
</li>
<li class="colorful-icon">
<svg class="icon svg-icon">
<use xlink:href="#db-icon-check-circle-fill"></use>
Expand Down Expand Up @@ -1938,6 +1956,12 @@ <h3 class="describe-title">如何使用</h3>
</svg>
<p class="icon-text">backup-2</p>
</li>
<li class="colorful-icon">
<svg class="icon svg-icon">
<use xlink:href="#db-icon-loading-tubiao"></use>
</svg>
<p class="icon-text">loading-tubiao</p>
</li>
<li class="colorful-icon">
<svg class="icon svg-icon">
<use xlink:href="#db-icon-host-select"></use>
Expand Down Expand Up @@ -2058,6 +2082,12 @@ <h3 class="describe-title">如何使用</h3>
</svg>
<p class="icon-text">dirty-host</p>
</li>
<li class="colorful-icon">
<svg class="icon svg-icon">
<use xlink:href="#db-icon-tag-3"></use>
</svg>
<p class="icon-text">tag-3</p>
</li>
<li class="colorful-icon">
<svg class="icon svg-icon">
<use xlink:href="#db-icon-saoba"></use>
Expand Down
Binary file modified dbm-ui/frontend/lib/bk-icon/fonts/iconcool.eot
Binary file not shown.
Binary file modified dbm-ui/frontend/lib/bk-icon/fonts/iconcool.ttf
Binary file not shown.
Binary file modified dbm-ui/frontend/lib/bk-icon/fonts/iconcool.woff
Binary file not shown.
7 changes: 5 additions & 2 deletions dbm-ui/frontend/src/components/disk-pop-info/DiskPopInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<BkPopover
:popover-delay="[0, 300]"
theme="light"
trigger="hover"
:trigger="trigger"
:width="430">
<span style="padding: 0 10px">
<slot />
Expand All @@ -26,9 +26,12 @@
interface Props {
data: DbResourceModel['storage_device'];
trigger?: 'hover' | 'click' | 'manual';
}
const props = defineProps<Props>();
const props = withDefaults(defineProps<Props>(), {
trigger: 'hover',
});
const { t } = useI18n();
Expand Down
2 changes: 2 additions & 0 deletions dbm-ui/frontend/src/layout/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@
],
[menuEnum.observableManage]: ['DBHASwitchEvents', 'inspectionManage'],
[menuEnum.configManage]: [
'BizResourcePool',
'BizResourceTag',
'DbConfigure',
'DBMonitorStrategy',
'DBMonitorAlarmGroup',
Expand Down
32 changes: 31 additions & 1 deletion dbm-ui/frontend/src/layout/components/ConfigManage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,36 @@
:active-key="currentActiveKey"
:opened-keys="[parentKey]"
@click="handleMenuChange">
<BkMenuGroup :name="t('资源管理')">
<BkMenuItem
key="BizResourcePool"
v-db-console="'bizConfigManage.businessResourcePool'">
<template #icon>
<DbIcon
svg
type="list" />
</template>
<span
v-overflow-tips.right
class="text-overflow">
{{ t('资源池') }}
</span>
</BkMenuItem>
<BkMenuItem
key="BizResourceTag"
v-db-console="'bizConfigManage.businessResourceTag'">
<template #icon>
<DbIcon
svg
type="tag-3" />
</template>
<span
v-overflow-tips.right
class="text-overflow">
{{ t('资源标签') }}
</span>
</BkMenuItem>
</BkMenuGroup>
<BkMenuGroup :name="t('业务配置')">
<BkMenuItem
key="DbConfigure"
Expand Down Expand Up @@ -99,7 +129,7 @@
parentKey,
key: currentActiveKey,
routeLocation: handleMenuChange,
} = useActiveKey(menuRef as Ref<InstanceType<typeof Menu>>, 'DbConfigure');
} = useActiveKey(menuRef as Ref<InstanceType<typeof Menu>>, 'BizResourcePool');
const styles = useMenuStyles(menuBoxRef);
</script>
12 changes: 12 additions & 0 deletions dbm-ui/frontend/src/layout/components/ResourceManage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@
{{ t('污点主机处理') }}
</span>
</BkMenuItem>
<BkMenuItem
key="resourceTagsManagement"
v-db-console="'resourceManage.resourceTagsManagement'">
<template #icon>
<DbIcon type="tag-3" />
</template>
<span
v-overflow-tips.right
class="text-overflow">
{{ t('资源标签管理') }}
</span>
</BkMenuItem>
<BkMenuItem
key="resourcePoolOperationRecord"
v-db-console="'resourceManage.resourceOperationRecord'">
Expand Down
Loading

0 comments on commit fe3c2bf

Please sign in to comment.