Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improve] clean up home webapp unused code #1915

Merged
merged 21 commits into from
May 5, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1799,6 +1799,24 @@
"contributions": [
"doc"
]
},
{
"login": "Aias00",
"name": "aias00",
"avatar_url": "https://avatars.githubusercontent.com/u/25810623?v=4",
"profile": "https://github.com/Aias00",
"contributions": [
"code"
]
},
{
"login": "westboy",
"name": "Jin",
"avatar_url": "https://avatars.githubusercontent.com/u/6385565?v=4",
"profile": "https://github.com/westboy",
"contributions": [
"doc"
]
}
],
"contributorsPerLine": 7,
Expand Down
1 change: 1 addition & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ header:
- '.helmignore'
- 'web-app/src/app/core/**'
- 'web-app/src/app/layout/**'
- 'web-app/src/app/routes/exception/**'
- 'web-app/src/app/routes/routes.module.ts'
- 'web-app/src/app/routes/routes-routing.module.ts'
- 'web-app/src/app/shared/json-schema/**'
Expand Down
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ These files from https://github.com/ng-alain/ng-alain

web-app/src/app/core/**
web-app/src/app/layout/**
web-app/src/app/routes/exception/**
web-app/src/app/routes/routes.module.ts
web-app/src/app/routes/routes-routing.module.ts
web-app/src/app/shared/json-schema/**
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,8 @@ Thanks to these wonderful people, welcome to join us:
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/LLP2333"><img src="https://avatars.githubusercontent.com/u/61670545?v=4?s=100" width="100px;" alt="llp2333"/><br /><sub><b>llp2333</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=LLP2333" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/HeartLinked"><img src="https://avatars.githubusercontent.com/u/78212101?v=4?s=100" width="100px;" alt="feiyang li"/><br /><sub><b>feiyang li</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=HeartLinked" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Aias00"><img src="https://avatars.githubusercontent.com/u/25810623?v=4?s=100" width="100px;" alt="aias00"/><br /><sub><b>aias00</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=Aias00" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/westboy"><img src="https://avatars.githubusercontent.com/u/6385565?v=4?s=100" width="100px;" alt="Jin"/><br /><sub><b>Jin</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=westboy" title="Documentation">📖</a></td>
</tr>
</tbody>
</table>
Expand Down
2 changes: 2 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,8 @@ Thanks these wonderful people, welcome to join us:
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/LLP2333"><img src="https://avatars.githubusercontent.com/u/61670545?v=4?s=100" width="100px;" alt="llp2333"/><br /><sub><b>llp2333</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=LLP2333" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/HeartLinked"><img src="https://avatars.githubusercontent.com/u/78212101?v=4?s=100" width="100px;" alt="feiyang li"/><br /><sub><b>feiyang li</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=HeartLinked" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Aias00"><img src="https://avatars.githubusercontent.com/u/25810623?v=4?s=100" width="100px;" alt="aias00"/><br /><sub><b>aias00</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=Aias00" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/westboy"><img src="https://avatars.githubusercontent.com/u/6385565?v=4?s=100" width="100px;" alt="Jin"/><br /><sub><b>Jin</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=westboy" title="Documentation">📖</a></td>
</tr>
</tbody>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.apache.hertzbeat.common.util;

import com.aliyun.dysmsapi20170525.Client;
import com.aliyun.dysmsapi20170525.models.SendSmsRequest;
import com.aliyun.dysmsapi20170525.models.SendSmsResponse;
import com.aliyun.teaopenapi.models.Config;
Expand All @@ -25,28 +26,28 @@

/**
* Alibaba cloud send SMS util
* Refer from <a href="https://github.com/alibaba/aliyun-spring-boot/blob/master/aliyun-spring-boot-docs/asciidoc/sms.adoc">alibaba aliyun-spring-boot</a>
*/
public class AliYunSendSmsUtil {

public static com.aliyun.dysmsapi20170525.Client createClient(String accessKeyId, String accessKeySecret) throws Exception {
private static Client createClient(String accessKeyId, String accessKeySecret) throws Exception {
Config config = new Config();
config.accessKeyId = accessKeyId;
config.accessKeySecret = accessKeySecret;
return new com.aliyun.dysmsapi20170525.Client(config);
return new Client(config);
}

/**
* Method for sending SMS messages: Enter the map format
*/
public static SendSmsResponse send(Map<String, Object> map, String singName, String templateCode, String phone, String accessKeyId, String accessKeySecret) throws Exception {
com.aliyun.dysmsapi20170525.Client client = AliYunSendSmsUtil.createClient(accessKeyId, accessKeySecret);
public static SendSmsResponse send(Map<String, Object> map, String singName, String templateCode, String phone,
String accessKeyId, String accessKeySecret) throws Exception {
Client client = createClient(accessKeyId, accessKeySecret);
SendSmsRequest sendReq = new SendSmsRequest()
.setPhoneNumbers(phone)//The phone number that received the text message
.setSignName(singName)//SMS signature
.setTemplateCode(templateCode)//SMS Template Code
.setTemplateParam(new ObjectMapper().writeValueAsString(map)); //The actual value of the SMS template variable
SendSmsResponse sendResp = client.sendSms(sendReq);
return sendResp;

.setPhoneNumbers(phone)
.setSignName(singName)
.setTemplateCode(templateCode)
.setTemplateParam(new ObjectMapper().writeValueAsString(map));
return client.sendSms(sendReq);
}
}
}
1 change: 1 addition & 0 deletions e2e/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# specific language governing permissions and limitations
# under the License.

# Derived from Api Testing https://github.com/LinuxSuRen/api-testing/blob/master/e2e/start.sh

file=$1
if [ "$file" == "" ]
Expand Down
3 changes: 0 additions & 3 deletions home/docs/help/issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ The hertzbeat installed and deployed by the installation package is not availabl
> When you install HertzBeat via DockerDocker root is enabled by default. No such problem.
> See https://stackoverflow.com/questions/11506321/how-to-ping-an-ip-address

4. If the history chart on the monitoring page is not displayed,popup [please configure dependency service on TDengine time series database]
> As shown in the popup window,the premise of history chart display is that you need install and configure hertzbeat's dependency service - TDengine database.
> Installation and initialization this database refers to [TDengine Installation and Initialization](../start/tdengine-init).

### Docker Deployment common issues

Expand Down
8 changes: 1 addition & 7 deletions home/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,5 @@ module.exports = {
},
],
],
themes: ['@docusaurus/theme-live-codeblock'],
scripts: [
{
src: 'https://hm.baidu.com/hm.js?77fb03ed1c6c1267119fec6d84dd88f3',
async: true,
},
],
themes: ['@docusaurus/theme-live-codeblock']
}
2 changes: 1 addition & 1 deletion home/i18n/en/docusaurus-plugin-content-docs/current.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"message": "Community",
"description": "The label for category Community in sidebar docs"
},
"sidebar.docs.category.Network": {
"sidebar.docs.category.network": {
"message": "Network",
"description": "The label for category Network in sidebar docs"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"message": "发布指南",
"description": "The label for category release in sidebar docs"
},
"sidebar.docs.category.Network": {
"sidebar.docs.category.network": {
"message": "网络",
"description": "The label for category Network in sidebar docs"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,13 @@ sidebar_label: 常见问题
> docker安装默认启用无此问题
> 详见 https://stackoverflow.com/questions/11506321/how-to-ping-an-ip-address

4. 监控页面历史图表不显示,弹出 [无法提供历史图表数据,请配置依赖服务TDengine时序数据库]
> 如弹窗所示,历史图表展示的前提是需要安装配置hertzbeat的依赖服务 - TDengine数据库
> 安装初始化此数据库参考 [TDengine安装初始化](../start/tdengine-init)

5. 配置了k8s监控,但是实际监控时间并未按照正确间隔时间执行
4. 配置了k8s监控,但是实际监控时间并未按照正确间隔时间执行
请参考下面几点排查问题:
> 一:首先查看hertzbeat的错误日志,如果出现了'desc: SQL statement too long, check maxSQLLength config',信息
> 二:需要调整tdengine配置文件,可在服务器创建taos.cfg文件,调整# max length of an SQL : maxSQLLength 654800,然后重启tdengine,需要加入配置文件的挂载
> 三:如果遇到了重启tdengine失败,需要调整挂载数据文件中的配置,见 .../taosdata/dnode/dnodeEps.json,中dnodeFqdn调整为启动失败的dockerId即可,然后docker restart tdengine
6.配置http api监控,用于进行业务接口探测,确保业务可以用,另外接口有进行token鉴权校验,"Authorization:Bearer eyJhbGciOiJIUzI1....",配置后测试,提示“StatusCode 401”。服务端应用收到的token为"Authorization:Bearer%20eyJhbGciOiJIUzI1....",hertzbeat对空格进行转义为“%20”,服务器没有转义导致鉴权失败,建议转义功能作为可选项。

5. 配置http api监控,用于进行业务接口探测,确保业务可以用,另外接口有进行token鉴权校验,"Authorization:Bearer eyJhbGciOiJIUzI1....",配置后测试,提示“StatusCode 401”。服务端应用收到的token为"Authorization:Bearer%20eyJhbGciOiJIUzI1....",hertzbeat对空格进行转义为“%20”,服务器没有转义导致鉴权失败,建议转义功能作为可选项。


### Docker部署常见问题
Expand Down
14 changes: 7 additions & 7 deletions home/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,13 @@
"help/kubernetes"
]
},
{
"type": "category",
"label": "network",
"items": [
"help/huawei_switch"
]
},
{
"type": "category",
"label": "threshold",
Expand All @@ -270,13 +277,6 @@
"help/alert_smn"
]
},
{
"type": "category",
"label": "Network",
"items": [
"help/huawei_switch"
]
},
"help/issue"
]
},
Expand Down
11 changes: 0 additions & 11 deletions home/src/CdnTransfer.js

This file was deleted.

2 changes: 1 addition & 1 deletion home/src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const features = [

export const usersLink = [
{
img: 'tancloud_logo.svg',
img: 'tancloud-logo.svg',
alt: 'tancloud',
}
]
3 changes: 0 additions & 3 deletions home/src/css/buttons.css

This file was deleted.

Loading
Loading