Skip to content

Commit

Permalink
Merge pull request #2 from uavorg/master
Browse files Browse the repository at this point in the history
update
  • Loading branch information
zwq0317 authored Nov 10, 2017
2 parents 3d48c8a + 432c01e commit f303951
Show file tree
Hide file tree
Showing 94 changed files with 7,869 additions and 605 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# UAVStack
UAVStack是由宜信技术研发中心推出的智能化服务技术栈,是研发运维一体化的解决方案。UAV是无人机的缩写,寓意无人机翱翔蓝天,智能的,透明的完成任务。
UAVStack是智能化服务技术栈,是研发运维一体化的解决方案。UAV是无人机的缩写,寓意无人机翱翔蓝天,智能的,透明的完成任务。
它包括任务机器人(代号HIT),全维监控(代号UAV.Monitor),应用性能管理(代号UAV.APM),服务治理(代号UAV.ServiceGovern),微服务计算(代号UAV.MSCP),用户体验管理(代号UAV.UEM)等。

UAVStack is an intelligent service technology stack launched by CreditEase Technology Research and Development Center. It is a solution for integration of R & D, operation and maintenance. UAV is the abbreviation of unmanned aerial vehicle (UAV), which means that unmanned aerial vehicle flies into the sky, and completes tasks intelligently and transparently.
UAVStack is an intelligent service technology stack. It is a solution for integration of R & D, operation and maintenance. UAV is the abbreviation of unmanned aerial vehicle (UAV), which means that unmanned aerial vehicle flies into the sky, and completes tasks intelligently and transparently.

It includes AIOps Robot (HIT),full dimension monitoring (UAV.Monitor), application performance management (UAV.APM), service governance (UAV.ServiceGovern), micro-service computing (UAV.MSCP), user experience management (UAV.UEM) etc..

Expand All @@ -13,7 +13,7 @@ UAVStack Open Source series includes UAV.Monitor, UAV.APM, UAV.ServiceGovern, UA

![Uavstack开源系列](https://uavorg.github.io/main/index/img/support/openSource.png)

# 更新公告 Project Updating Principle
# 更新模式 Project Updating Principle
* 开源系列源代码Issue更新,将与内部版本完全同步,最低频率每周一次
* 开源系列源代码相关的功能优化,将与内部版本完全同步,最低频率每周一次
* 开源系列源代码相关的新功能开放,会提前一周预告,并于下周内发布
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ private void queryNodeInfo(UAVHttpMessage data) {
HeartBeatProtocol.STORE_KEY_NODEINFO);

String resultMsg = "{}";
String filterValue = data.getRequest("appGroups"); // 多字段逗号分开
// goup过滤 begin
String filterKey = data.getRequest("fkey");
String filterValue = data.getRequest("fvalue");
// 过滤 begin
if (!StringHelper.isEmpty(filterValue)) {
Map<String, String> filterMap = new HashMap<String, String>();
String[] fValues = filterValue.split(",");
Expand All @@ -121,9 +122,9 @@ private void queryNodeInfo(UAVHttpMessage data) {
String key = String.valueOf(i.next());
String body = resultMap.get(key);

for (String group : fValues) {
String filterKey = "\"group\":\"" + group + "\",";
if (body.indexOf(filterKey) >= 0) {
for (String value : fValues) {
String groupFilter = "\"" + filterKey + "\":\"" + value + "\",";
if (body.indexOf(groupFilter) >= 0) {
filterMap.put(key, body);
break;
}
Expand Down
4 changes: 2 additions & 2 deletions com.creditease.uav.base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.0.25.Final</version>
<version>4.1.11.Final</version>
</dependency>
</dependencies>

Expand Down Expand Up @@ -57,4 +57,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public ActionContext execute(String actionId, ActionContext context) {
}
catch (Exception e) {
if (log.isTraceEnable()) {
log.err(this, "Exception occured " + e.getMessage());
log.err(this, "Exception occured " + e.getMessage(), e);
}
context.setE(e);
context.setJumpTargetActionId(null);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
app.title=基础集群管理
app.@eshead={"index":"1","title":"ES管理","file":"index.html"}
app.@jumpurl_1={"index":"2","title":"MQ管理","file":"jumpurl@http://uav.creditease.corp/rocket/cluster/list.do"}
app.@dbhead={"index":"3","title":"OpenTSDB管理","file":"index.html"}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
app.title=基础集群管理
app.@eshead={"index":"1","title":"ES管理","file":"index.html"}
app.@jumpurl_1={"index":"2","title":"MQ管理","file":"jumpurl@http://127.0.0.1:8080/rocket/cluster/list.do"}
app.@dbhead={"index":"3","title":"OpenTSDB管理","file":"index.html"}
36 changes: 36 additions & 0 deletions com.creditease.uav.console.buildComponent/config/web_pro.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,38 @@
<servlet-name>es-serlvet</servlet-name>
<url-pattern>/es/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>opentsdb-crdu-servlet</servlet-name>
<servlet-class>com.creditease.uav.opentsdb.OpenTSDBRestCRDUServlet</servlet-class>
<load-on-startup>2</load-on-startup>
<async-supported>true</async-supported>
</servlet>

<servlet-mapping>
<servlet-name>opentsdb-crdu-servlet</servlet-name>
<url-pattern>/db/*</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>opentsdb-agent-servlet</servlet-name>
<servlet-class>com.creditease.uav.opentsdb.OpenTSDBRestAgentServlet</servlet-class>
<load-on-startup>2</load-on-startup>
<async-supported>true</async-supported>
</servlet>

<servlet-mapping>
<servlet-name>opentsdb-agent-servlet</servlet-name>
<!-- <url-pattern>/db2/*</url-pattern>
<url-pattern>/s/*</url-pattern>
<url-pattern>/q/*</url-pattern> -->
<url-pattern>/db2/q</url-pattern>
<url-pattern>/db2/suggest</url-pattern>
<url-pattern>/db2/stats</url-pattern>
<url-pattern>/db2/logs</url-pattern>
<url-pattern>/db2/version</url-pattern>
<url-pattern>/db2/</url-pattern>
<url-pattern>/db2/aggregators</url-pattern>
</servlet-mapping>
<!-- jersey restful service END -->

<!-- filter START -->
Expand Down Expand Up @@ -202,6 +234,10 @@
<param-name>uav.apphub.sso.grafana.connection.info</param-name>
<param-value>{"api.url":"http://127.0.0.1:3000","web.url":"http://uav.creditease.corp/datacenter","datasource.opentsdb.url":"http://127.0.0.1:4242","datasource.elasticsearch.url":"http://127.0.0.1:9300","authorization.loginId":"apiuser","authorization.loginPwd":"Uav!630admin","authorization.register.defPwd":"1q@W3e","authorization.register.sleep.time":"2000"}</param-value>
</context-param>
<context-param>
<param-name>uav.app.opentsdb.http.client.params</param-name>
<param-value>{"max.con":50,"max.tot.con":200,"sock.time.out":10000,"con.time.out":10000,"req.time.out":10000}</param-value>
</context-param>
<context-param>
<param-name>uav.apphub.sso.white.list</param-name>
<!--
Expand Down
36 changes: 36 additions & 0 deletions com.creditease.uav.console.buildComponent/config/web_test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,38 @@
<servlet-name>es-serlvet</servlet-name>
<url-pattern>/es/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>opentsdb-crdu-servlet</servlet-name>
<servlet-class>com.creditease.uav.opentsdb.OpenTSDBRestCRDUServlet</servlet-class>
<load-on-startup>2</load-on-startup>
<async-supported>true</async-supported>
</servlet>

<servlet-mapping>
<servlet-name>opentsdb-crdu-servlet</servlet-name>
<url-pattern>/db/*</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>opentsdb-agent-servlet</servlet-name>
<servlet-class>com.creditease.uav.opentsdb.OpenTSDBRestAgentServlet</servlet-class>
<load-on-startup>2</load-on-startup>
<async-supported>true</async-supported>
</servlet>

<servlet-mapping>
<servlet-name>opentsdb-agent-servlet</servlet-name>
<!-- <url-pattern>/db2/*</url-pattern>
<url-pattern>/s/*</url-pattern>
<url-pattern>/q/*</url-pattern> -->
<url-pattern>/db2/q</url-pattern>
<url-pattern>/db2/suggest</url-pattern>
<url-pattern>/db2/stats</url-pattern>
<url-pattern>/db2/logs</url-pattern>
<url-pattern>/db2/version</url-pattern>
<url-pattern>/db2/</url-pattern>
<url-pattern>/db2/aggregators</url-pattern>
</servlet-mapping>
<!-- jersey restful service END -->

<!-- filter START -->
Expand Down Expand Up @@ -206,6 +238,10 @@
<param-name>uav.apphub.sso.grafana.connection.info</param-name>
<param-value>{"api.url":"http://127.0.0.1:3000","web.url":"http://127.0.0.1:3000","datasource.opentsdb.url":"http://127.0.0.1:4243","datasource.elasticsearch.url":"http://127.0.0.1:9200","authorization.loginId":"apiuser","authorization.loginPwd":"apiuser","authorization.register.defPwd":"1q@W3e","authorization.register.sleep.time":"2000"}</param-value>
</context-param>
<context-param>
<param-name>uav.app.opentsdb.http.client.params</param-name>
<param-value>{"max.con":50,"max.tot.con":200,"sock.time.out":10000,"con.time.out":10000,"req.time.out":10000}</param-value>
</context-param>
<context-param>
<param-name>uav.apphub.sso.white.list</param-name>
<!--
Expand Down
6 changes: 6 additions & 0 deletions com.creditease.uav.console/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@
<artifactId>aredis-api</artifactId>
<version>1.4</version>
</dependency>

<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.0.1</version>
</dependency>
</dependencies>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1027,20 +1027,29 @@ private void loadAppProfileListFromHttp(UAVHttpMessage message, final AsyncRespo
@GET
@Path("node/q/cache")
@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
public void loadUavNetworkInfo(@Suspended AsyncResponse response) {
public void loadUavNetworkInfo(@QueryParam("fkey") String fkey, @QueryParam("fvalue") String fvalue,
@Suspended AsyncResponse response) {

UAVHttpMessage message = new UAVHttpMessage();
message.setIntent("node");

String groups = getUserGroupsByFilter(request);
if ("NOMAPPING".equals(groups)) {
response.resume("{\"rs\":\"{}\"}");
}
else if ("ALL".equals(groups)) {
loadUavNetworkInfoFromHttp(message, response);
if (StringHelper.isEmpty(fkey) || StringHelper.isEmpty(fvalue)) {
String groups = getUserGroupsByFilter(request);
if ("NOMAPPING".equals(groups)) {
response.resume("{\"rs\":\"{}\"}");
}
else if ("ALL".equals(groups)) {
loadUavNetworkInfoFromHttp(message, response);
}
else {
message.putRequest("fkey", "group");
message.putRequest("fvalue", groups);
loadUavNetworkInfoFromHttp(message, response);
}
}
else {
message.putRequest("appGroups", groups);
message.putRequest("fkey", fkey);
message.putRequest("fvalue", fvalue);
loadUavNetworkInfoFromHttp(message, response);
}

Expand Down
Loading

0 comments on commit f303951

Please sign in to comment.