Skip to content

Commit

Permalink
bugfix user role display not correctly on webui (#1227)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsun28 authored Sep 6, 2023
1 parent 93a06ad commit 2c12427
Show file tree
Hide file tree
Showing 76 changed files with 340 additions and 363 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import lombok.extern.slf4j.Slf4j;
import org.dromara.hertzbeat.common.constants.CommonConstants;
import org.dromara.hertzbeat.common.entity.dto.Message;
import org.dromara.hertzbeat.common.util.JsonUtil;
import org.dromara.hertzbeat.manager.pojo.dto.LoginDto;
import org.dromara.hertzbeat.manager.pojo.dto.RefreshTokenResponse;
import org.springframework.http.ResponseEntity;
Expand Down Expand Up @@ -98,6 +99,7 @@ public ResponseEntity<Message<Map<String, String>>> authGetToken(@Valid @Request
Map<String, String> resp = new HashMap<>(2);
resp.put("token", issueToken);
resp.put("refreshToken", issueRefresh);
resp.put("role", JsonUtil.toJson(roles));
return ResponseEntity.ok(new Message<>(resp));
}

Expand Down
2 changes: 1 addition & 1 deletion manager/src/main/resources/define/app-a_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ name:
# 监控类型的帮助描述信息
help:
zh-CN: HertzBeat 支持自定义监控,您只需配置监控模版 YML 就能适配一款自定义的监控类型。<br>定义流程如下:HertzBeat 页面 -> 监控模版菜单 -> 新增监控类型 -> 配置自定义监控模版YML -> 点击保存应用 -> 使用新监控类型添加监控。
en-US: "HertzBeat supports c ustom monitoring, and you only need to configure the monitoring template YML to adapt to a custom monitoring type. <br>Definition process as follow: HertzBeat Pages -> Main Menu -> Monitor Template -> edit and save -> apply this template."
en-US: "HertzBeat supports custom monitoring, and you only need to configure the monitoring template YML to adapt to a custom monitoring type. <br>Definition process as follow: HertzBeat Pages -> Main Menu -> Monitor Template -> edit and save -> apply this template."
zh-TW: HertzBeat支持自定義監控,您只需配寘監控模版YML就能適配一款自定義的監控類型。<br>定義流程如下:HertzBeat頁面->監控模版選單->新增監控類型->配寘自定義監控模版YML ->點擊保存應用->使用新監控類型添加監控。
helpLink:
zh-CN: https://hertzbeat.com/zh-cn/docs/advanced/extend-point/
Expand Down
2 changes: 1 addition & 1 deletion manager/src/main/resources/define/app-activemq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ name:
# 监控类型的帮助描述信息
help:
zh-CN: HertzBeat 使用<a class='help_module_content' href='https://baijiahao.baidu.com/s?id=1605937053950156833&wfr=spider&for=pc'> JMX 协议</a>对 Apache ActiveMQ 消息中间件的运行状态,节点,Topic等相关指标(broker、topic、memory pool、class loading、thread)进行监测。<br><span class='help_module_span'>⚠️注意:您需要在 ActiveMQ 开启 JMX 服务。<a class='help_module_content' href='https://hertzbeat.com/zh-cn/docs/help/activemq#%E7%9B%91%E6%8E%A7%E5%89%8D%E6%93%8D%E4%BD%9C'>点击查看开启步骤</a>。</span>
en-US: "HertzBeat uses <a class='help_module_content' href='https://netbeans.apache.org/kb/docs/java/jmx-manager-tutorial.html'> JMX protocol</a> to monitor the running status, nodes, topics, and other indicators of Apache ActiveMQ message-oriented middleware. <br><span class='help_module_span'>⚠️Note: You should enable the JMX service in ActiveMQ. <a class='help_module_content' href='https://hertzbeat.com/docs/help/activemq#%E7%9B%91%E6%8E%A7%E5%89%8D%E6%93%8D%E4%BD%9C'>Click here to view the specific steps.</a></span>"
en-US: "HertzBeat uses <a class='help_module_content' href='https://netbeans.apache.org/kb/docs/java/jmx-manager-tutorial.html'> JMX protocol</a> to monitor the running status, nodes, topics, and other metrics of Apache ActiveMQ message-oriented middleware. <br><span class='help_module_span'>⚠️Note: You should enable the JMX service in ActiveMQ. <a class='help_module_content' href='https://hertzbeat.com/docs/help/activemq#%E7%9B%91%E6%8E%A7%E5%89%8D%E6%93%8D%E4%BD%9C'>Click here to view the specific steps.</a></span>"
zh-TW: HertzBeat使用<a class='help_module_content' href='https://baijiahao.baidu.com/s?id=1605937053950156833&wfr=spider&for=pc'> JMX 協定</a>對 Apache ActiveMQ 消息中介軟體的運行狀態,節點,Topic 等相關名額(broker、topic、memory pool、class loading、thread)進行監測。<br><span class='help_module_span'> ⚠️注意:您需要在 ActiveMQ 開啟 JMX 服務。<a class='help_module_content' href=' https://hertzbeat.com/zh-cn/docs/help/activemq#%E7%9B%91%E6%8E%A7%E5%89%8D%E6%93%8D%E4%BD%9C'>點擊查看開啟步驟</a>。</span>
helpLink:
zh-CN: https://hertzbeat.com/zh-cn/docs/help/activemq
Expand Down
2 changes: 1 addition & 1 deletion manager/src/main/resources/define/app-airflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ name:
# 监控类型的帮助描述信息
help:
zh-CN: Hertzbeat 对 Apache Airflow 通用性能指标(airflow health、airflow version)进行采集监控。<br>您可以点击“<i>新建 Apache Airflow </i>”并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
en-US: HertzBeat monitors Apache Airflow through general performance indicators such as airflow health and airflow version. You could click the "<i>New Apache Airflow</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
en-US: HertzBeat monitors Apache Airflow through general performance metrics such as airflow health and airflow version. You could click the "<i>New Apache Airflow</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
zh-TW: Hertzbeat對Apache Airflow通用性能指標(airflow health、airflow version)進行採集監控。<br>您可以點擊“<i>新建 Apache Airflow</i>”並進行配寘,或者選擇“<i>更多操作</i>”,導入已有配寘。
helpLink:
zh-CN: https://hertzbeat.com/zh-cn/docs/help/airflow/
Expand Down
2 changes: 1 addition & 1 deletion manager/src/main/resources/define/app-almalinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ name:
# 监控类型的帮助描述信息
help:
zh-CN: Hertzbeat 对 AlmaLinux 通用性能指标进行采集监控。<br>您可以点击“<i>新建 AlmaLinux </i>”并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
en-US: HertzBeat monitors AlmaLinux through general performance indicators such as airflow health and airflow version. You could click the "<i>New AlmaLinux</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
en-US: HertzBeat monitors AlmaLinux through general performance metrics such as airflow health and airflow version. You could click the "<i>New AlmaLinux</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
zh-TW: Hertzbeat對AlmaLinux通用性能指標進行採集監控。<br>您可以點擊“<i>新建AlmaLinux</i>”並進行配寘,或者選擇“<i>更多操作</i>”,導入已有配寘。
helpLink:
zh-CN: https://hertzbeat.com/zh-cn/docs/help/almalinux
Expand Down
2 changes: 1 addition & 1 deletion manager/src/main/resources/define/app-centos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ name:
# 监控类型的帮助描述信息
help:
zh-CN: HertzBeat 对 CentOS 操作系统的通用性能指标(basic、cpu、memory、disk、interface、disk_free)进行采集监控。<br>您可以点击“<i>新建 CentOS 操作系统</i>”并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
en-US: HertzBeat monitors CentOS operating system through general performance indicators such as cpu and memory. You could click the "<i>New CentOS</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
en-US: HertzBeat monitors CentOS operating system through general performance metrics such as cpu and memory. You could click the "<i>New CentOS</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
zh-TW: HertzBeat對CentOS作業系統的通用性能指標(basic、cpu、memory、disk、interface、disk_free)進行採集監控。<br>您可以點擊“<i>新建CentOS作業系統</i>”並進行配寘,或者選擇“<i>更多操作</i>”,導入已有配寘。
helpLink:
zh-CN: https://hertzbeat.com/zh-cn/docs/help/centos/
Expand Down
2 changes: 1 addition & 1 deletion manager/src/main/resources/define/app-coreos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ name:
# 监控类型的帮助描述信息
help:
zh-CN: Hertzbeat 对 Fedora CoreOS 数据库通用指标进行测量监控。<br>您可以点击 “<i>新建 Fedora CoreOS</i>” 并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
en-US: Hertzbeat monitors Fedora CoreOS through general performance indicator. You could click the "<i>New Fedora CoreOS</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
en-US: Hertzbeat monitors Fedora CoreOS through general performance metric. You could click the "<i>New Fedora CoreOS</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
zh-TW: Hertzbeat對Fedora CoreOS資料庫通用名額進行量測監控。<br>您可以點擊“<i>新建Fedora CoreOS</i>”並進行配寘,或者選擇“<i>更多操作</i>”,導入已有配寘。
helpLink:
zh-CN: https://hertzbeat.com/zh-cn/docs/help/coreos
Expand Down
2 changes: 1 addition & 1 deletion manager/src/main/resources/define/app-debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ name:
# 监控类型的帮助描述信息
help:
zh-CN: Hertzbeat 对 Debian 操作系统的通用指标进行测量监控。<br>您可以点击 “<i>新建 Debian 操作系统监控</i>” 并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
en-US: Hertzbeat monitors Debian operating system through general performance indicator. You could click the "<i>New Debian Linux Monitor</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
en-US: Hertzbeat monitors Debian operating system through general performance metric. You could click the "<i>New Debian Linux Monitor</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
zh-TW: Hertzbeat對Debian作業系統的通用名額進行量測監控。<br>您可以點擊“<i>新建Debian作業系統監控</i>”並進行配寘,或者選擇“<i>更多操作</i>”,導入已有配寘。
helpLink:
zh-CN: https://hertzbeat.com/zh-cn/docs/help/debian
Expand Down
2 changes: 1 addition & 1 deletion manager/src/main/resources/define/app-dm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ name:
# 监控类型的帮助描述信息
help:
zh-CN: HertzBeat 对 DM 达梦数据库的通用性能指标(basic、status、thread)进行采集监控,支持版本为 DM8+。<br>您可以点击“<i>新建 达梦数据库</i>”并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
en-US: HertzBeat monitors DM database through basic performance indicators such as status and thread, the version we support is DM8+. You could click the "<i>New DM</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
en-US: HertzBeat monitors DM database through basic performance metrics such as status and thread, the version we support is DM8+. You could click the "<i>New DM</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
zh-TW: HertzBeat對DM達夢資料庫的通用性能指標(basic、status、thread)進行採集監控,支持版本為DM8+。<br>您可以點擊“<i>新建達夢資料庫</i>”並進行配寘,或者選擇“<i>更多操作</i>”,導入已有配寘。
helpLink:
zh-CN: https://hertzbeat.com/zh-cn/docs/help/dm
Expand Down
16 changes: 8 additions & 8 deletions manager/src/main/resources/define/app-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ name:
# 监控类型的帮助描述信息
help:
zh-CN: HertzBeat 对 Docker 容器的通用性能指标(system、containers、stats)进行采集监控 <br><span class='help_module_span'>⚠️注意:为了监控 Docker 中的容器信息,您需要打开端口,让采集请求获取到对应的信息, <a class='help_module_content' href='https://hertzbeat.com/zh-cn/docs/help/docker#%E7%9B%91%E6%8E%A7%E5%89%8D%E6%93%8D%E4%BD%9C'>点击查看开启步骤</a>。</span>
en-US: "HertzBeat monitors Docker through general performance indicators such as containers, status, <br><span class='help_module_span'>⚠️Note: In order to monitor container information of Docker, you need to enable the port so that the collection request can obtain the corresponding information.<a class='help_module_content' href='https://hertzbeat.com/docs/help/docker#%E7%9B%91%E6%8E%A7%E5%89%8D%E6%93%8D%E4%BD%9C'>Click here to view the specific steps.</a></span>"
en-US: "HertzBeat monitors Docker through general performance metrics such as containers, status, <br><span class='help_module_span'>⚠️Note: In order to monitor container information of Docker, you need to enable the port so that the collection request can obtain the corresponding information.<a class='help_module_content' href='https://hertzbeat.com/docs/help/docker#%E7%9B%91%E6%8E%A7%E5%89%8D%E6%93%8D%E4%BD%9C'>Click here to view the specific steps.</a></span>"
zh-TW: HertzBeat對Docker容器的通用性能指標(system、containers、stats)進行採集監控<br><span class='help_ module_ span'> ⚠️ 注意:為了監控Docker中的容器資訊,您需要打開埠,讓採集請求獲取到對應的資訊,<a class='help_ module_ content' href='https://hertzbeat.com/zh-cn/docs/help/docker#%E7%9B%91%E6%8E%A7%E5%89%8D%E6%93%8D%E4%BD%9C '>點擊查看開啟步驟</a>。</span>
helpLink:
zh-CN: https://hertzbeat.com/zh-cn/docs/help/docker/
Expand Down Expand Up @@ -75,10 +75,10 @@ metrics:
# 指标组调度优先级(0-127)越小优先级越高,优先级低的指标组会等优先级高的指标组采集完成后才会被调度,相同优先级的指标组会并行调度采集
# 优先级为0的指标组为可用性指标组,即它会被首先调度,采集成功才会继续调度其它指标组,采集失败则中断调度
priority: 0
# specific monitoring indicators in the indicator group
# specific monitoring metrics in the metric group
# 指标组中的具体监控指标
fields:
# Indicator information includes field name type field type: 0-number, 1-string whether instance is the primary key of the instance unit: indicator unit
# metric information includes field name type field type: 0-number, 1-string whether instance is the primary key of the instance unit: metric unit
# 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位
- field: name
type: 1
Expand Down Expand Up @@ -154,7 +154,7 @@ metrics:
# Whether to enable ssl/tls, that is, http or https, the default is false
# 是否启用ssl/tls,即是http还是https,默认false
ssl: ^_^ssl^_^
# response data analysis method: default-system rules, jsonPath-jsonPath script, website-api usability indicator monitoring
# response data analysis method: default-system rules, jsonPath-jsonPath script, website-api usability metric monitoring
# 响应数据解析方式: default-系统规则,jsonPath-jsonPath脚本,website-api可用性指标监控
parseType: default

Expand All @@ -164,10 +164,10 @@ metrics:
# 指标组调度优先级(0-127)越小优先级越高,优先级低的指标组会等优先级高的指标组采集完成后才会被调度,相同优先级的指标组会并行调度采集
# 优先级为0的指标组为可用性指标组,即它会被首先调度,采集成功才会继续调度其它指标组,采集失败则中断调度
priority: 1
# specific monitoring indicators in the indicator group
# specific monitoring metrics in the metric group
# 指标组中的具体监控指标
fields:
# Indicator information includes field name type field type: 0-number, 1-string whether instance is the primary key of the instance unit: indicator unit
# metric information includes field name type field type: 0-number, 1-string whether instance is the primary key of the instance unit: metric unit
# 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位
- field: id
type: 1
Expand Down Expand Up @@ -216,7 +216,7 @@ metrics:
# Whether to enable ssl/tls, that is, http or https, the default is false
# 是否启用ssl/tls,即是http还是https,默认false
ssl: ^_^ssl^_^
# Response data analysis method: default-system rules, jsonPath-jsonPath script, website-api usability indicator monitoring
# Response data analysis method: default-system rules, jsonPath-jsonPath script, website-api usability metric monitoring
# 响应数据解析方式: default-系统规则,jsonPath-jsonPath脚本,website-api可用性指标监控
parseType: jsonPath
parseScript: '$.*'
Expand Down Expand Up @@ -281,7 +281,7 @@ metrics:
ssl: ^_^ssl^_^
params:
stream: false
# Response data analysis method: default-system rules, jsonPath-jsonPath script, website-api usability indicator monitoring
# Response data analysis method: default-system rules, jsonPath-jsonPath script, website-api usability metric monitoring
# 响应数据解析方式: default-系统规则,jsonPath-jsonPath脚本,website-api可用性指标监控
parseType: jsonPath
parseScript: '$'
4 changes: 2 additions & 2 deletions manager/src/main/resources/define/app-doris_be.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ name:
# 监控类型的帮助描述信息
help:
zh-CN: Hertzbeat 对 DORIS 数据库FE的通用性能指标(load channel count、memtable flush total、process thread num、light work max threads等)进行采集监控,支持版本为DORIS2.0.0。<br>您可以点击 “<i>新建 Doris DatabaseBE</i>” 并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
en-US: Hertzbeat monitors Doris DatabaseBE through general performance indicator such as load channel count, memtable flush total, process thread num and light work max threads. The version we support is DORIS2.0.0. You could click the "<i>New Doris DatabaseBE Monitor</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
en-US: Hertzbeat monitors Doris DatabaseBE through general performance metric such as load channel count, memtable flush total, process thread num and light work max threads. The version we support is DORIS2.0.0. You could click the "<i>New Doris DatabaseBE Monitor</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
zh-TW: Hertzbeat對DORIS資料庫FE的通用性能指標(load channel count、memtable flush total、process thread num、light work max threads等)進行採集監控,支持版本為DORIS2.0.0。<br>您可以點擊“<i>新建Doris DatabaseBE</i>”並進行配寘,或者選擇“<i>更多操作</i>”,導入已有配寘。
helpLink:
zh-CN: https://hertzbeat.com/zh-cn/docs/help/doris_be/
Expand Down Expand Up @@ -419,4 +419,4 @@ metrics:
url: '/metrics'
timeout: ^_^timeout^_^
method: GET
parseType: prometheus
parseType: prometheus
2 changes: 1 addition & 1 deletion manager/src/main/resources/define/app-doris_fe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ name:
# 监控类型的帮助描述信息
help:
zh-CN: Hertzbeat 对 Doris 数据库FE的通用指标(doris_fe connection total、doris_fe edit log clean、doris_fe image、doris_fe rps等)进行测量监控,支持版本为DORIS2.0.0。<br>您可以点击 “<i>新建 Doris DatabaseFE</i>” 并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
en-US: Hertzbeat monitors Doris DatabaseFE through general performance indicator such as doris_fe connection total, doris_fe edit log clean, doris_fe image and doris_fe rps. The version we support is DORIS2.0.0. You could click the "<i>New Doris DatabaseFE Monitor</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
en-US: Hertzbeat monitors Doris DatabaseFE through general performance metric such as doris_fe connection total, doris_fe edit log clean, doris_fe image and doris_fe rps. The version we support is DORIS2.0.0. You could click the "<i>New Doris DatabaseFE Monitor</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
zh-TW: Hertzbeat對Doris資料庫FE的通用名額(doris_fe connection total、doris_fe edit log clean、doris_fe image、doris_fe rps等)進行量測監控,支持版本為DORIS2.0.0。<br>您可以點擊“<i>新建Doris DatabaseFE</i>”並進行配寘,或者選擇“<i>更多操作</i>”,導入已有配寘。
helpLink:
zh-CN: https://hertzbeat.com/zh-cn/docs/help/doris_fe/
Expand Down
Loading

0 comments on commit 2c12427

Please sign in to comment.