diff --git a/nezha-fronted/src/assets/css/components/index.scss b/nezha-fronted/src/assets/css/components/index.scss
index 991b3c43a..518737a84 100644
--- a/nezha-fronted/src/assets/css/components/index.scss
+++ b/nezha-fronted/src/assets/css/components/index.scss
@@ -102,6 +102,7 @@
@import './page/dashboard/panel.scss';
@import './page/monitor/project/project.scss';
@import './page/tool/ping.scss';
+@import './page/tool/trace.scss';
@import './common/v-selectpagenew/selectpage.scss';
@import './common/paramBpx/paramBox.scss';
diff --git a/nezha-fronted/src/assets/css/components/page/tool/trace.scss b/nezha-fronted/src/assets/css/components/page/tool/trace.scss
new file mode 100644
index 000000000..1e51a79a0
--- /dev/null
+++ b/nezha-fronted/src/assets/css/components/page/tool/trace.scss
@@ -0,0 +1,125 @@
+.trace{
+ .choose{
+ width: 50px !important;
+ height: 36px !important;
+ line-height: 36px !important;
+ padding: 0 !important;
+ border-radius: 2px 0px 0px 2px !important;
+ border-right: none !important;
+ span{
+ display: flex;
+ align-content: center;
+ justify-content: center;
+ }
+ i{
+ font-size: 20px !important;
+ }
+ }
+ .btn{
+ width: 50px !important;
+ height: 36px !important;
+ line-height: 36px !important;
+ padding: 0 !important;
+ border-radius: 0px 2px 2px 0px !important;
+ span{
+ display: flex;
+ align-content: center;
+ justify-content: center;
+ }
+ i{
+ font-size: 22px !important;
+ color: $--color-primary !important;
+ }
+ i.quadrate{
+ display: inline-block;
+ width: 12px;
+ height: 12px;
+ background: $--color-primary;
+ }
+ }
+
+ .nz-table2{
+ height: calc(100% - 64px) !important;
+ .empty{
+ width: 100%;
+ height: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ .el-steps{
+ width: 620px;
+ }
+ .el-step__icon{
+ width: 64px;
+ height: 64px;
+ border: 1px solid $--border-color-light;
+ background-color: $--background-color-empty;
+ }
+ .el-step__line{
+ top: 32px;
+ height: 1px;
+ }
+ span{
+ color: #BEBEBE;
+ }
+ .nz-icon-edit{
+ font-size: 26px;
+ }
+ .el-icon-more{
+ font-size: 22px;
+ }
+ .msg{
+ font-size: 18px;
+ }
+ .txt{
+ color: $--color-text-regular;
+ }
+ }
+ .data-wrap{
+ height: 100%;
+ .data-top{
+ width: 100%;
+ padding-left: 15px;
+ box-sizing: border-box;
+ height: 36px;
+ line-height: 36px;
+ border: 1px solid $--border-color-light;
+ margin-bottom: 14px;
+ span{
+ color: $--color-text-primary;
+ margin-right: 30px;
+ font-size: 14px;
+ font-weight: 500;
+ font-weight: bold;
+ }
+ }
+ .data-bottom{
+ height: calc(100% - 50px) !important;
+ .details{
+ padding: 20px;
+ }
+ }
+ }
+ }
+}
+
+.wrap{
+ .el-input,.el-input__inner{
+ height: 100%;
+ }
+ .el-input-group__append{
+ color: $--color-text-primary;
+ }
+}
+.pop-tit{
+ font-size: 14px;
+ color: $--color-text-primary;
+ line-height: 40px;
+}
+.pop-list-wrap{
+ border: 1px solid $--button-light-border-color !important;
+}
+.pop-list{
+ max-height: 144px;
+ overflow-y: auto;
+}
\ No newline at end of file
diff --git a/nezha-fronted/src/components/common/alert/alertRuleInfo.vue b/nezha-fronted/src/components/common/alert/alertRuleInfo.vue
index e0d49a170..87b16ff8d 100644
--- a/nezha-fronted/src/components/common/alert/alertRuleInfo.vue
+++ b/nezha-fronted/src/components/common/alert/alertRuleInfo.vue
@@ -142,13 +142,17 @@ export default {
this.$emit('showText')
},
severityDataColor () {
- this.severityData.map(item => {
- this.severityColor = item.color
+ this.severityData.forEach(item => {
+ if (this.alertRuleData.severityId === item.id) {
+ this.severityColor = item.color
+ }
})
},
returnColor (obj) {
- let color = '#23bf9a'
+ console.log(obj, this.severityDataWeight)
+ let color = ''
if (!obj) {
+ color = '#23bf9a'
return color
} else {
this.severityDataWeight.forEach(severity => {
@@ -168,8 +172,8 @@ export default {
this.$get('/alert/rule/' + this.id).then((res) => {
if (res.msg === 'success') {
this.loading = false
- this.severityDataColor()
this.alertRuleData = res.data
+ this.severityDataColor()
this.alertColor = this.returnColor(res.data.alert)
const weekDays = this.getWeeksTime()
if (this.trendTimer) {
diff --git a/nezha-fronted/src/components/common/js/constants.js b/nezha-fronted/src/components/common/js/constants.js
index 5f87ea0bd..972d5e6b0 100644
--- a/nezha-fronted/src/components/common/js/constants.js
+++ b/nezha-fronted/src/components/common/js/constants.js
@@ -368,8 +368,9 @@ export const fromRoute = {
ipam: 'ipam',
apiKey: 'apiKey',
chartTemp: 'chartTemp',
- backups:'backups',
- ping: 'ping'
+ backups: 'backups',
+ ping: 'ping',
+ trace: 'trace'
}
export const chartdatasource = [
diff --git a/nezha-fronted/src/components/common/table/settings/pingTable.vue b/nezha-fronted/src/components/common/table/tool/pingTable.vue
similarity index 100%
rename from nezha-fronted/src/components/common/table/settings/pingTable.vue
rename to nezha-fronted/src/components/common/table/tool/pingTable.vue
diff --git a/nezha-fronted/src/components/common/table/tool/traceTable.vue b/nezha-fronted/src/components/common/table/tool/traceTable.vue
new file mode 100644
index 000000000..efe8bcfb2
--- /dev/null
+++ b/nezha-fronted/src/components/common/table/tool/traceTable.vue
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+ {{item.label}}
+
+
+
+
+
+
+
+ {{scope.row[item.prop].name}}
+ {{scope.row[item.prop]}}%
+ {{scope.row[item.prop]}}ms
+ {{scope.row[item.prop]}}
+ -
+
+
+
+
+
+
No results found
+
+
+
+
+
+
+
diff --git a/nezha-fronted/src/components/page/tool/ping.vue b/nezha-fronted/src/components/page/tool/ping.vue
index 4dc4e07e9..e48ab629d 100644
--- a/nezha-fronted/src/components/page/tool/ping.vue
+++ b/nezha-fronted/src/components/page/tool/ping.vue
@@ -96,7 +96,7 @@
+
+
diff --git a/nezha-fronted/src/router/index.js b/nezha-fronted/src/router/index.js
index 75e385023..c214dce8c 100644
--- a/nezha-fronted/src/router/index.js
+++ b/nezha-fronted/src/router/index.js
@@ -201,6 +201,10 @@ export default new Router({
{
path: '/ping',
component: resolve => require(['../components/page/tool/ping.vue'], resolve)
+ },
+ {
+ path: '/trace',
+ component: resolve => require(['../components/page/tool/trace.vue'], resolve)
}
]
}