diff --git a/nezha-fronted/package-lock.json b/nezha-fronted/package-lock.json index 0662d2ccf..3fe552be9 100644 --- a/nezha-fronted/package-lock.json +++ b/nezha-fronted/package-lock.json @@ -2493,6 +2493,14 @@ } } }, + "clone-regexp": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clone-regexp/-/clone-regexp-2.2.0.tgz", + "integrity": "sha512-beMpP7BOtTipFuW8hrJvREQ2DrRu3BE7by0ZpibtfBA+qfHYvMGTc2Yb1JMYPKg/JUw0CHYvpg796aNTSW9z7Q==", + "requires": { + "is-regexp": "^2.0.0" + } + }, "clone-response": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", @@ -4497,6 +4505,11 @@ "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==", "dev": true }, + "diacritics": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/diacritics/-/diacritics-1.3.0.tgz", + "integrity": "sha1-PvqHMj67hj5mls67AILUj/PW96E=" + }, "diffie-hellman": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", @@ -7425,6 +7438,11 @@ "has": "^1.0.1" } }, + "is-regexp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-2.1.0.tgz", + "integrity": "sha512-OZ4IlER3zmRIoB9AqNhEggVxqIH4ofDns5nRrPS6yQxXE1TPCUpFznBfRQmQa8uC+pXqjMnukiJBxCisIxiLGA==" + }, "is-resolvable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", @@ -14674,6 +14692,15 @@ "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", "dev": true }, + "vue-text-highlight": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/vue-text-highlight/-/vue-text-highlight-2.0.10.tgz", + "integrity": "sha512-6WMWqr3OYonmK257o87shm7efMaFTyevEo8u5fN15gceyy2463fITFj9Wuh+W5lqLUm4n6cAZUS+y6xfzYB2aA==", + "requires": { + "clone-regexp": "^2.1.0", + "diacritics": "^1.3.0" + } + }, "vuedraggable": { "version": "2.23.2", "resolved": "https://registry.npm.taobao.org/vuedraggable/download/vuedraggable-2.23.2.tgz", diff --git a/nezha-fronted/package.json b/nezha-fronted/package.json index ed4f080fc..a74453a58 100644 --- a/nezha-fronted/package.json +++ b/nezha-fronted/package.json @@ -41,11 +41,11 @@ "vue-countupjs": "^1.0.0", "vue-draggable-resizable": "^2.3.0", "vue-grid-layout": "^2.3.12", - "vue-highlight-text": "^1.6.2", "vue-i18n": "^8.15.1", "vue-quill-editor": "^3.0.6", "vue-resource": "^1.5.1", "vue-router": "^3.0.1", + "vue-text-highlight": "^2.0.10", "vuedraggable": "^2.23.2", "vuex": "^3.1.2", "xlsx": "^0.15.6", @@ -69,7 +69,6 @@ "eslint-plugin-import": "^2.22.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.3.1", - "eslint-plugin-promise": "^4.3.1", "eslint-plugin-vue": "^7.7.0", "extract-text-webpack-plugin": "^3.0.0", "file-loader": "^1.1.4", diff --git a/nezha-fronted/src/assets/css/components/common/globalSearch/globalSearch.scss b/nezha-fronted/src/assets/css/components/common/globalSearch/globalSearch.scss index d6615094b..c87dc4a96 100644 --- a/nezha-fronted/src/assets/css/components/common/globalSearch/globalSearch.scss +++ b/nezha-fronted/src/assets/css/components/common/globalSearch/globalSearch.scss @@ -21,6 +21,7 @@ background: rgba(0,0,0,0); width: 80%; max-width: 1040px; + min-width: 894px; height: auto; display: flex; flex-direction: column; @@ -76,6 +77,9 @@ box-sizing: border-box; height: 100%; } + .global-search-content-left { + box-shadow: 0 2px 4px 0 rgba(0,0,0,0.14); + } .list{ height: 100%; width: 100%; diff --git a/nezha-fronted/src/assets/css/components/common/globalSearch/searchItemInfo.scss b/nezha-fronted/src/assets/css/components/common/globalSearch/searchItemInfo.scss new file mode 100644 index 000000000..63ff0c80f --- /dev/null +++ b/nezha-fronted/src/assets/css/components/common/globalSearch/searchItemInfo.scss @@ -0,0 +1,75 @@ +.search-item-box{ + width: 100%; + height: 100%; + overflow: hidden; + background: $--background-color-2; + display: flex; + flex-direction: column; + align-items: center; + box-sizing: border-box; + padding: 60px 75px 0 75px; + .search-item-title-icon{ + .nz-icon{ + font-size: 32px; + } + } + .search-item-path{ + margin: 16px 0; + font-size: 14px; + span:first-child{ + color: $--color-text-secondary; + } + span:nth-of-type(2){ + color: $--color-text-secondary; + margin: 0 5px; + } + span:nth-of-type(2){ + color: $--color-text-primary; + } + } + .search-item-name{ + font-size: 20px; + font-weight: 600; + max-width: 100%; + //overflow: hidden; + word-break: break-all; + word-wrap: break-word; + color: $--color-text-primary; + margin-bottom: 30px; + } + .search-item-info{ + width: 100%; + border-bottom: 1px solid $--border-color-light; + display: flex; + height: 47px; + .search-item-key{ + width: 100px; + font-size: 14px; + line-height: 47px; + color:$--color-text-regular; + letter-spacing: 0; + font-weight: 400; + } + .search-item-value-box{ + line-height: 47px; + width: calc(100% - 100px); + display: flex; + .nz-icon{ + line-height: 47px; + margin-right: 10px; + } + .search-item-value{ + width: calc(100% - 30px); + font-size: 14px; + color: $--color-text-primary; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + line-height: 47px; + } + } + } + .search-item-info:last-child{ + border-bottom: none; + } +} diff --git a/nezha-fronted/src/assets/css/components/index.scss b/nezha-fronted/src/assets/css/components/index.scss index 0f0d79c10..472be5eda 100644 --- a/nezha-fronted/src/assets/css/components/index.scss +++ b/nezha-fronted/src/assets/css/components/index.scss @@ -54,6 +54,7 @@ @import './common/table/settings/switchTab.scss'; @import './common/table/special/endpointQuery.scss'; @import './common/globalSearch/globalSearch'; +@import './common/globalSearch/searchItemInfo'; @import './common/browserWindowZoom.scss'; @import './common/chartUnit.scss'; @import './common/elementSet.scss'; diff --git a/nezha-fronted/src/components/common/alert/alertLabel.vue b/nezha-fronted/src/components/common/alert/alertLabel.vue index 6864ef26d..5fc652556 100644 --- a/nezha-fronted/src/components/common/alert/alertLabel.vue +++ b/nezha-fronted/src/components/common/alert/alertLabel.vue @@ -111,7 +111,8 @@
{{$t('overall.module')}}
  - {{alertLabelData && alertLabelData.module && alertLabelData.module.name ? alertLabelData.module.name : '--'}}
+ {{alertLabelData && alertLabelData.moduleNum ? alertLabelData.moduleNum : '--'}} +
Endpoint
diff --git a/nezha-fronted/src/components/common/globalSearch/globalSearch.vue b/nezha-fronted/src/components/common/globalSearch/globalSearch.vue index 28f9b646a..efea542e6 100644 --- a/nezha-fronted/src/components/common/globalSearch/globalSearch.vue +++ b/nezha-fronted/src/components/common/globalSearch/globalSearch.vue @@ -28,7 +28,7 @@ >
- {{item.name}} + {{item.name}}
{{ item.sub }} @@ -39,7 +39,7 @@
- +
@@ -81,12 +81,14 @@ + +