Skip to content

Commit

Permalink
[improve] clean up home webapp unused code (#1915)
Browse files Browse the repository at this point in the history
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: 铁甲小宝 <2922035952@qq.com>
  • Loading branch information
tomsun28 and TJxiaobao authored May 5, 2024
1 parent 6c08ab7 commit 30eeed0
Show file tree
Hide file tree
Showing 60 changed files with 377 additions and 1,914 deletions.
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
20 changes: 20 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

/home export-ignore
.gitattributes export-ignore
.gitignore export-ignore
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
Loading

0 comments on commit 30eeed0

Please sign in to comment.