优化界面

This commit is contained in:
刘祥超
2021-09-15 19:22:54 +08:00
parent 6e36528f35
commit 0f28df51f1
9 changed files with 32 additions and 21 deletions

View File

@@ -67,13 +67,13 @@
</thead>
<tr v-for="node in nodes">
<td><a :href="'/clusters/cluster/node?clusterId=' + clusterId + '&nodeId=' + node.id">{{node.name}}</a>
<div style="margin-top: 0.5em" v-if="node.region != null">
<span class="ui label tiny grey basic">区域:{{node.region.name}}</span>
<div v-if="node.region != null">
<grey-label>区域:{{node.region.name}}</grey-label>
</div>
<div style="margin-top: 0.5em" v-if="node.group != null">
<span class="ui label tiny grey basic">分组:{{node.group.name}}</span>
<div v-if="node.group != null">
<grey-label>分组:{{node.group.name}}</grey-label>
</div>
<div style="margin-top: 0.5em" v-if="node.secondaryClusters != null && node.secondaryClusters.length > 0">
<div v-if="node.secondaryClusters != null && node.secondaryClusters.length > 0">
<node-clusters-labels :v-primary-cluster="node.cluster" :v-secondary-clusters="node.secondaryClusters" size="tiny"></node-clusters-labels>
</div>
</td>

View File

@@ -4,6 +4,7 @@ h4 a {
font-weight: normal;
}
.chart-box {
width: 30em;
height: 20em;
}
/*# sourceMappingURL=index.css.map */

View File

@@ -1 +1 @@
{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA,EACC;EACC,gBAAA;EACA,kBAAA;EACA,mBAAA;;AAKF;EACC,YAAA","file":"index.css"}
{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA,EACC;EACC,gBAAA;EACA,kBAAA;EACA,mBAAA;;AAKF;EACC,WAAA;EACA,YAAA","file":"index.css"}

View File

@@ -56,5 +56,6 @@
<div v-if="results.length > 0">
<div class="margin"></div>
<h4>区域监控 <a :href="Tea.url('.reports', {addrId: addr.id})"><span>[详情]</span></a></h4>
<div class="ui segment chart-box" id="reports-chart-box"></div>
<div class="ui divider"></div>
<div class="chart-box" id="reports-chart-box"></div>
</div>

View File

@@ -63,16 +63,18 @@ Tea.context(function () {
}
let chart = teaweb.initChart(chartBox)
chart.setOption({
radar: {
splitNumber: 4,
indicator: this.results.map(function (result) {
return {
name: result.node.name,
color: result.color,
max: 5000
}
})
},
radar: [
{
splitNumber: 4,
indicator: this.results.map(function (result) {
return {
name: result.node.name,
color: result.color,
max: 5000
}
})
}
],
series: [{
name: '',
type: 'radar',

View File

@@ -8,5 +8,6 @@ h4 {
.chart-box {
width: 30em;
height: 20em;
}

View File

@@ -41,7 +41,7 @@
<tr v-for="reporter in reporters">
<td>
<a :href="Tea.url('.reporter', {reporterId: reporter.id})"><keyword :v-word="keyword">{{reporter.name}}</keyword></a>
<div v-if="reporter.groups.length > 0" style="margin-top: 0.5em">
<div v-if="reporter.groups.length > 0">
<grey-label v-for="group in reporter.groups">{{group.name}}</grey-label>
</div>
<div v-if="reporter.shouldUpgrade">