diff --git a/common/src/main/java/org/dromara/hertzbeat/common/entity/manager/Tag.java b/common/src/main/java/org/dromara/hertzbeat/common/entity/manager/Tag.java index 89d34aa48dc..65b33a2046b 100644 --- a/common/src/main/java/org/dromara/hertzbeat/common/entity/manager/Tag.java +++ b/common/src/main/java/org/dromara/hertzbeat/common/entity/manager/Tag.java @@ -67,6 +67,9 @@ public class Tag { @Schema(title = "Tag Color | 标签颜色", example = "#ffff", accessMode = READ_WRITE) private String color; + @Schema(title = "Tag Color | 标签描述", example = "用于监控mysql", accessMode = READ_WRITE) + private String description; + @Schema(title = "标记类型 0:监控自动生成(monitorId,monitorName) 1: 用户生成 2: 系统预置", accessMode = READ_WRITE) @Min(0) @Max(3) diff --git a/script/sql/schema.sql b/script/sql/schema.sql index 94c42e51772..297330ecb3d 100644 --- a/script/sql/schema.sql +++ b/script/sql/schema.sql @@ -96,6 +96,7 @@ CREATE TABLE hzb_tag `value` varchar(100) comment 'TAG标签值(可为空)', type tinyint not null default 0 comment '标记类型 0:监控自动生成(monitorId,monitorName) 1: 用户生成 2: 系统预制', color varchar(100) default '#ffffff' comment '标签颜色' , + description varchar(255) comment '标签描述(可为空)', creator varchar(100) comment '创建者', modifier varchar(100) comment '最新修改者', gmt_create timestamp default current_timestamp comment 'create time', diff --git a/web-app/src/app/pojo/Tag.ts b/web-app/src/app/pojo/Tag.ts index 64abfcd3b41..1f7c5826811 100644 --- a/web-app/src/app/pojo/Tag.ts +++ b/web-app/src/app/pojo/Tag.ts @@ -3,6 +3,7 @@ export class Tag { name!: string; value!: string; color: string = this.getRandomColor(); + description!: string; // 标记类型 0:监控自动生成(monitorId,monitorName) 1: 用户生成 2: 系统预置 type!: number; creator!: string; diff --git a/web-app/src/app/routes/setting/tags/tags.component.html b/web-app/src/app/routes/setting/tags/tags.component.html index fe2fd93c774..bde8582f794 100644 --- a/web-app/src/app/routes/setting/tags/tags.component.html +++ b/web-app/src/app/routes/setting/tags/tags.component.html @@ -57,6 +57,7 @@ {{ 'tag.name' | i18n }} {{ 'tag.value' | i18n }} {{ 'tag.color' | i18n }} + {{ 'tag.description' | i18n }} {{ 'tag.update-time' | i18n }} {{ 'common.edit' | i18n }} @@ -76,6 +77,7 @@ {{ data.color }} + {{ data.description }} {{ data.gmtUpdate | date : 'YYYY-MM-dd HH:mm:ss' }}