@@ -81,6 +93,10 @@ export default {
type: Array,
default: () => [],
},
+ ruleType: {
+ type: String,
+ default: 'http',
+ },
},
data() {
return {
@@ -150,6 +166,11 @@ export default {
font-weight: 400;
cursor: pointer;
+ position: relative;
+
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
&:hover {
background-color: @layout-sidebar-selected-color;
@@ -160,6 +181,20 @@ export default {
background-color: @layout-sidebar-selected-color;
color: @layout-header-font-selected-color;
}
+
+ &-corporate {
+ flex-shrink: 0;
+ width: 18px;
+ height: 18px;
+ background-color: #E1EFFF;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 50%;
+
+ color: #2F54EB;
+ font-size: 12px;
+ }
}
}
}
@@ -201,6 +236,7 @@ export default {
font-weight: 400;
cursor: pointer;
+ position: relative;
&:hover {
background-color: @layout-sidebar-selected-color;
@@ -219,5 +255,29 @@ export default {
.corporate-tip {
margin-top: 20px;
}
+
+ .corporate-flag {
+ position: absolute;
+ top: 0;
+ right: 0;
+ z-index: 4;
+
+ width: 38px;
+ height: 28px;
+ border-left: 38px solid transparent;
+ border-top: 28px solid @primary-color_4;
+
+ &-text {
+ width: 37px;
+ position: absolute;
+ top: -28px;
+ right: 3px;
+ text-align: right;
+
+ color: @primary-color;
+ font-size: 10px;
+ font-weight: 400;
+ }
+ }
}
diff --git a/cmdb-ui/src/modules/cmdb/components/httpSnmpAD/index.vue b/cmdb-ui/src/modules/cmdb/components/httpSnmpAD/index.vue
index 7eb7534..ff66e50 100644
--- a/cmdb-ui/src/modules/cmdb/components/httpSnmpAD/index.vue
+++ b/cmdb-ui/src/modules/cmdb/components/httpSnmpAD/index.vue
@@ -1,14 +1,15 @@
-
+
{{ cate }}
{
const { ruleType, ruleName } = newVal
- if (['snmp'].includes(ruleType) && ruleName) {
- getSnmpAttributes(ruleName).then((res) => {
+ if (['snmp', 'components'].includes(ruleType) && ruleName) {
+ getSnmpAttributes(ruleType, ruleName).then((res) => {
if (this.isEdit) {
this.formatTableData(res)
} else {
@@ -122,7 +128,8 @@ export default {
}
})
}
- if (ruleType === 'http' && ruleName) {
+
+ if (this.isCloud && ruleName) {
getHttpCategories(this.httpMap[`${this.ruleName}`].name).then((res) => {
this.categories = res
const categoriesSelect = []
diff --git a/cmdb-ui/src/modules/cmdb/lang/en.js b/cmdb-ui/src/modules/cmdb/lang/en.js
index 54d54d3..20e1db1 100644
--- a/cmdb-ui/src/modules/cmdb/lang/en.js
+++ b/cmdb-ui/src/modules/cmdb/lang/en.js
@@ -480,6 +480,8 @@ const cmdb_en = {
snmp: 'Network Devices',
http: 'Public Clouds',
plugin: 'Plugin',
+ component: 'Databases & Middleware',
+ privateCloud: 'Private Clouds',
rule: 'AutoDiscovery Rules',
timeout: 'Timeout error',
mode: 'Mode',
diff --git a/cmdb-ui/src/modules/cmdb/lang/zh.js b/cmdb-ui/src/modules/cmdb/lang/zh.js
index db45822..1dfbab3 100644
--- a/cmdb-ui/src/modules/cmdb/lang/zh.js
+++ b/cmdb-ui/src/modules/cmdb/lang/zh.js
@@ -479,7 +479,8 @@ const cmdb_zh = {
agent: '服务器',
snmp: '网络设备',
http: '公有云',
- plugin: '插件',
+ component: '数据库 & 中间件',
+ privateCloud: '私有云',
rule: '自动发现规则',
timeout: '超时错误',
mode: '模式',
diff --git a/cmdb-ui/src/modules/cmdb/views/ci_types/attrADTabpane.vue b/cmdb-ui/src/modules/cmdb/views/ci_types/attrADTabpane.vue
index ca278c6..13510ed 100644
--- a/cmdb-ui/src/modules/cmdb/views/ci_types/attrADTabpane.vue
+++ b/cmdb-ui/src/modules/cmdb/views/ci_types/attrADTabpane.vue
@@ -104,22 +104,51 @@
-
- {{ $t('cmdb.ciType.cloudAccessKeyTip') }}
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ item }}
-
+
@@ -234,6 +235,7 @@ export default {
color: @text-color_3;
font-size: 12px;
font-weight: 400;
+ flex-shrink: 0;
}
&-right {
@@ -249,7 +251,6 @@ export default {
color: @text-color_3;
font-size: 11px;
font-weight: 400;
- max-width: 95px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
diff --git a/cmdb-ui/src/modules/cmdb/views/discovery/editDrawer.vue b/cmdb-ui/src/modules/cmdb/views/discovery/editDrawer.vue
index a97e69c..d895bb5 100644
--- a/cmdb-ui/src/modules/cmdb/views/discovery/editDrawer.vue
+++ b/cmdb-ui/src/modules/cmdb/views/discovery/editDrawer.vue
@@ -171,7 +171,7 @@ export default {
},
computed: {
title() {
- if ([DISCOVERY_CATEGORY_TYPE.HTTP, DISCOVERY_CATEGORY_TYPE.SNMP, DISCOVERY_CATEGORY_TYPE.AGENT].includes(this.adType)) {
+ if ([DISCOVERY_CATEGORY_TYPE.HTTP, DISCOVERY_CATEGORY_TYPE.SNMP, DISCOVERY_CATEGORY_TYPE.AGENT, DISCOVERY_CATEGORY_TYPE.PRIVATE_CLOUD, DISCOVERY_CATEGORY_TYPE.COMPONENT].includes(this.adType)) {
return this.ruleData.name
}
if (this.type === 'edit') {
@@ -202,7 +202,7 @@ export default {
return
}
this.$nextTick(() => {
- if (adType === DISCOVERY_CATEGORY_TYPE.AGENT) {
+ if ([DISCOVERY_CATEGORY_TYPE.HTTP, DISCOVERY_CATEGORY_TYPE.SNMP, DISCOVERY_CATEGORY_TYPE.PRIVATE_CLOUD].includes(adType)) {
this.tableData = data?.attributes ?? []
return
}
diff --git a/cmdb-ui/src/modules/cmdb/views/discovery/index.vue b/cmdb-ui/src/modules/cmdb/views/discovery/index.vue
index 9b83600..39984e8 100644
--- a/cmdb-ui/src/modules/cmdb/views/discovery/index.vue
+++ b/cmdb-ui/src/modules/cmdb/views/discovery/index.vue
@@ -39,7 +39,10 @@