-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: hubin6 <[email protected]>
- Loading branch information
hubin6
committed
Nov 9, 2017
1 parent
d5c9d19
commit daf5da4
Showing
15 changed files
with
211 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
spring.velocity.cache=false | ||
spring.devtools.remote.restart.enabled=false | ||
spring.datasource.url=jdbc:h2:mem:dev_db;MODE=MySQL | ||
spring.datasource.username= | ||
spring.datasource.password= | ||
spring.datasource.driver-class-name=org.h2.Driver | ||
# spring.datasource.url=jdbc:mysql://192.168.99.100:3306/dev?characterEncoding=utf8&useSSL=false | ||
# spring.datasource.username=root | ||
# spring.datasource.password=root | ||
# spring.datasource.driver-class-name=com.mysql.jdbc.Driver | ||
#spring.datasource.url=jdbc:h2:mem:dev_db;MODE=MySQL | ||
#spring.datasource.username= | ||
#spring.datasource.password= | ||
#spring.datasource.driver-class-name=org.h2.Driver | ||
spring.datasource.url=jdbc:mysql://192.168.99.100:3306/dev?characterEncoding=utf8&useSSL=false | ||
spring.datasource.username=root | ||
spring.datasource.password=root | ||
spring.datasource.driver-class-name=com.mysql.jdbc.Driver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SELECT '14,300' as v1, 8.8 as v2, -4.3 as v3 | ||
SELECT '在库SKU数'as f1, '14,300' as v1, '昨日环比'as f2, 8.8 as v2, '上周同比'as f3, -4.3 as v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 38 additions & 6 deletions
44
dashboard-web/src/main/resources/metrics/sample1/model.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,55 @@ | ||
{ | ||
"charts": [ | ||
{ | ||
"name": "chart1", | ||
"sql": "e.sql" | ||
"name": "day", | ||
"sql": "e.sql", | ||
"params": [ | ||
{ | ||
"name": "dateCycle", | ||
"value": "天" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "week", | ||
"sql": "e.sql", | ||
"params": [ | ||
{ | ||
"name": "dateCycle", | ||
"value": "周" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "month", | ||
"sql": "e.sql", | ||
"params": [ | ||
{ | ||
"name": "dateCycle", | ||
"value": "月" | ||
} | ||
] | ||
} | ||
], | ||
"name": "sample1", | ||
"values": [ | ||
"description": [ | ||
{ | ||
"name": "day", | ||
"sql": "a.sql" | ||
"text": "just a test 日维度" | ||
}, | ||
{ | ||
"name": "week", | ||
"sql": "b.sql" | ||
"text": "just a test 周维度" | ||
}, | ||
{ | ||
"name": "month", | ||
"sql": "c.sql" | ||
"text": "just a test 月维度" | ||
} | ||
], | ||
"values": [ | ||
{ | ||
"name": "day", | ||
"sql": "a.sql" | ||
} | ||
] | ||
} |
56 changes: 56 additions & 0 deletions
56
dashboard-web/src/main/resources/metrics/sample1/month.option
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
tooltip: { | ||
trigger: 'axis', | ||
axisPointer: { | ||
animation: false | ||
}, | ||
formatter:function(params) { | ||
return '<span style="font-size:12px; color: #00D7FB">' + params[0].name + ' : ' + params[0].value + '</span><br>' + | ||
'<span style="font-size:12px; color: #6E88AC">' + addDate(params[0].name, -7) + ' : ' + params[1].value + '</span>' | ||
} | ||
}, | ||
xAxis: { | ||
type: 'category', | ||
splitLine: { | ||
show: false | ||
}, | ||
axisLine: { | ||
lineStyle: { | ||
color: '#6E88AC' | ||
} | ||
}, | ||
data: res.stat_date.slice(-7) | ||
}, | ||
yAxis: { | ||
type: 'value', | ||
boundaryGap: [0, '100%'], | ||
splitLine: { | ||
show: false | ||
}, | ||
axisLine: { | ||
lineStyle: { | ||
color: '#6E88AC' | ||
} | ||
} | ||
}, | ||
series: [{ | ||
type: 'bar', | ||
itemStyle: { | ||
normal: { | ||
color: '#00D7FB', | ||
width: 1 | ||
} | ||
}, | ||
data: res.func_value.slice(-7) | ||
}, | ||
{ | ||
type: 'bar', | ||
itemStyle: { | ||
normal: { | ||
color: '#6E88AC', | ||
width: 1 | ||
} | ||
}, | ||
data: res.func_value.slice(0,7) | ||
}] | ||
} |
22 changes: 11 additions & 11 deletions
22
dashboard-web/src/main/resources/metrics/sample1/number.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
dashboard-web/src/main/resources/metrics/sample1/week.option
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
tooltip: { | ||
trigger: 'axis', | ||
axisPointer: { | ||
animation: false | ||
}, | ||
formatter:function(params) { | ||
return '<span style="font-size:12px; color: #00D7FB">' + params[0].name + ' : ' + params[0].value + '</span><br>' + | ||
'<span style="font-size:12px; color: #6E88AC">' + addDate(params[0].name, -7) + ' : ' + params[1].value + '</span>' | ||
} | ||
}, | ||
xAxis: { | ||
type: 'category', | ||
splitLine: { | ||
show: false | ||
}, | ||
axisLine: { | ||
lineStyle: { | ||
color: '#6E88AC' | ||
} | ||
}, | ||
data: res.stat_date.slice(-7) | ||
}, | ||
yAxis: { | ||
type: 'value', | ||
boundaryGap: [0, '100%'], | ||
splitLine: { | ||
show: false | ||
}, | ||
axisLine: { | ||
lineStyle: { | ||
color: '#6E88AC' | ||
} | ||
} | ||
}, | ||
series: [{ | ||
type: 'line', | ||
itemStyle: { | ||
normal: { | ||
color: '#00D7FB', | ||
width: 1 | ||
} | ||
}, | ||
data: res.func_value.slice(-7) | ||
}, | ||
{ | ||
type: 'bar', | ||
itemStyle: { | ||
normal: { | ||
color: '#6E88AC', | ||
width: 1 | ||
} | ||
}, | ||
data: res.func_value.slice(0,7) | ||
}] | ||
} |