mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-11 18:30:25 +08:00
增加内置的统计指标
This commit is contained in:
@@ -62,6 +62,7 @@ func (this *CreatePopupAction) RunGet(params struct {
|
|||||||
itemMaps = append(itemMaps, maps.Map{
|
itemMaps = append(itemMaps, maps.Map{
|
||||||
"id": item.Id,
|
"id": item.Id,
|
||||||
"name": item.Name,
|
"name": item.Name,
|
||||||
|
"code": item.Code,
|
||||||
"isOn": item.IsOn,
|
"isOn": item.IsOn,
|
||||||
"period": item.Period,
|
"period": item.Period,
|
||||||
"periodUnit": item.PeriodUnit,
|
"periodUnit": item.PeriodUnit,
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ func (this *IndexAction) RunGet(params struct {
|
|||||||
itemMaps = append(itemMaps, maps.Map{
|
itemMaps = append(itemMaps, maps.Map{
|
||||||
"id": item.Id,
|
"id": item.Id,
|
||||||
"name": item.Name,
|
"name": item.Name,
|
||||||
|
"code": item.Code,
|
||||||
"isOn": item.IsOn,
|
"isOn": item.IsOn,
|
||||||
"period": item.Period,
|
"period": item.Period,
|
||||||
"periodUnit": item.PeriodUnit,
|
"periodUnit": item.PeriodUnit,
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ func (this *IndexAction) RunGet(params struct {
|
|||||||
itemMaps = append(itemMaps, maps.Map{
|
itemMaps = append(itemMaps, maps.Map{
|
||||||
"id": item.Id,
|
"id": item.Id,
|
||||||
"name": item.Name,
|
"name": item.Name,
|
||||||
|
"code": item.Code,
|
||||||
"isOn": item.IsOn,
|
"isOn": item.IsOn,
|
||||||
"period": item.Period,
|
"period": item.Period,
|
||||||
"periodUnit": item.PeriodUnit,
|
"periodUnit": item.PeriodUnit,
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ func InitItem(parent *actionutils.ParentAction, itemId int64) (*pb.MetricItem, e
|
|||||||
parent.Data["item"] = maps.Map{
|
parent.Data["item"] = maps.Map{
|
||||||
"id": item.Id,
|
"id": item.Id,
|
||||||
"name": item.Name,
|
"name": item.Name,
|
||||||
|
"code": item.Code,
|
||||||
"isOn": item.IsOn,
|
"isOn": item.IsOn,
|
||||||
"keys": item.Keys,
|
"keys": item.Keys,
|
||||||
"value": item.Value,
|
"value": item.Value,
|
||||||
|
|||||||
@@ -16,8 +16,9 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tr v-for="item in items">
|
<tr v-for="item in items">
|
||||||
<td>{{item.name}}
|
<td>{{item.name}}
|
||||||
<div style="margin-top: 0.3em" v-if="item.isPublic">
|
<div style="margin-top: 0.3em" v-if="item.isPublic || item.code.length > 0">
|
||||||
<span class="ui label olive tiny basic">公用</span>
|
<span class="ui label olive tiny basic" v-if="item.isPublic">公用</span>
|
||||||
|
<span class="ui label olive tiny basic" v-if="item.code.length > 0">内置</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -27,8 +27,9 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tr v-for="item in items">
|
<tr v-for="item in items">
|
||||||
<td>{{item.name}}
|
<td>{{item.name}}
|
||||||
<div style="margin-top: 0.3em" v-if="item.isPublic">
|
<div style="margin-top: 0.3em" v-if="item.isPublic || item.code.length > 0">
|
||||||
<span class="ui label olive tiny basic">公用</span>
|
<span class="ui label olive tiny basic" v-if="item.isPublic">公用</span>
|
||||||
|
<span class="ui label olive tiny basic" v-if="item.code.length > 0">内置</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -23,9 +23,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr v-for="item in items">
|
<tr v-for="item in items">
|
||||||
<td>{{item.name}}
|
<td>
|
||||||
<div style="margin-top: 0.3em" v-if="item.isPublic">
|
{{item.name}}
|
||||||
<span class="ui label olive tiny basic">公用</span>
|
<div style="margin-top: 0.3em" v-if="item.isPublic || item.code.length > 0">
|
||||||
|
<span class="ui label olive tiny basic" v-if="item.isPublic">公用</span>
|
||||||
|
<span class="ui label olive tiny basic" v-if="item.code.length > 0">内置</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -37,6 +37,13 @@
|
|||||||
<span class="disabled" v-else>非公用</span>
|
<span class="disabled" v-else>非公用</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>是否内置</td>
|
||||||
|
<td>
|
||||||
|
<span class="green" v-if="item.code.length > 0">内置</span>
|
||||||
|
<span class="disabled" v-else>自建</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<!-- 使用此指标的集群 -->
|
<!-- 使用此指标的集群 -->
|
||||||
|
|||||||
Reference in New Issue
Block a user