mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-07 07:10:27 +08:00
修复一个指标图表无法显示时间的Bug
This commit is contained in:
@@ -17,7 +17,8 @@ Vue.component("metric-chart", {
|
|||||||
stats.push({
|
stats.push({
|
||||||
keys: ["其他"],
|
keys: ["其他"],
|
||||||
value: stats[0].total - sum,
|
value: stats[0].total - sum,
|
||||||
total: stats[0].total
|
total: stats[0].total,
|
||||||
|
time: stats[0].time
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -324,6 +325,9 @@ Vue.component("metric-chart", {
|
|||||||
document.getElementById(this.chartId).innerHTML = table
|
document.getElementById(this.chartId).innerHTML = table
|
||||||
},
|
},
|
||||||
formatTime: function (time) {
|
formatTime: function (time) {
|
||||||
|
if (time == null) {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
switch (this.vPeriodUnit) {
|
switch (this.vPeriodUnit) {
|
||||||
case "month":
|
case "month":
|
||||||
return time.substring(0, 4) + "-" + time.substring(4, 6)
|
return time.substring(0, 4) + "-" + time.substring(4, 6)
|
||||||
|
|||||||
@@ -27,41 +27,11 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td :class="{'color-border':action == 'go_group' || action == 'go_set'}">动作</td>
|
<td>执行动作 *</td>
|
||||||
<td>
|
<td>
|
||||||
<select class="ui dropdown auto-width" name="action" v-model="action">
|
<http-firewall-actions-box :v-actions="actions" :v-firewall-policy="firewallPolicy" :v-action-configs="actionConfigs"></http-firewall-actions-box>
|
||||||
<option v-for="a in actions" :value="a.code">{{a.name}}({{a.code.toUpperCase()}})</option>
|
</td>
|
||||||
</select>
|
</tr>
|
||||||
<p class="comment">匹配当前规则集后要执行的动作。</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr v-if="action == 'go_group'">
|
|
||||||
<td class="color-border">下一个规则分组</td>
|
|
||||||
<td>
|
|
||||||
<select class="ui dropdown" name="action_groupId" style="width:12em" v-model="actionGroupId">
|
|
||||||
<option v-for="g in firewallPolicy.inbound.groups" :value="g.id">{{g.name}}</option>
|
|
||||||
</select>
|
|
||||||
<p class="comment">当动作为"跳到下一个规则分组"时出现此选择。</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr v-if="action == 'go_set'">
|
|
||||||
<td class="color-border">下一个规则分组</td>
|
|
||||||
<td>
|
|
||||||
<select class="ui dropdown" name="action_groupId" style="width:12em" v-model="actionGroupId">
|
|
||||||
<option v-for="g in firewallPolicy.inbound.groups" :value="g.id">{{g.name}}</option>
|
|
||||||
</select>
|
|
||||||
<p class="comment">当动作为"跳到下一个规则集"时出现此选择。</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr v-if="action == 'go_set'">
|
|
||||||
<td class="color-border">下一个规则集</td>
|
|
||||||
<td>
|
|
||||||
<select class="ui dropdown" name="action_setId" style="width:12em" v-model="actionSetId">
|
|
||||||
<option v-for="r in groupSets(actionGroupId)" :value="r.id">{{r.name}}</option>
|
|
||||||
</select>
|
|
||||||
<p class="comment">当动作为"跳到下一个规则集"时出现此选择。</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
<submit-btn></submit-btn>
|
<submit-btn></submit-btn>
|
||||||
</form>
|
</form>
|
||||||
@@ -11,7 +11,8 @@ Tea.context(function () {
|
|||||||
this.$post("$")
|
this.$post("$")
|
||||||
.params({
|
.params({
|
||||||
serverId: this.serverId,
|
serverId: this.serverId,
|
||||||
requestId: this.requestId
|
requestId: this.requestId,
|
||||||
|
keyword: this.keyword
|
||||||
})
|
})
|
||||||
.success(function (resp) {
|
.success(function (resp) {
|
||||||
this.accessLogs = resp.data.accessLogs.concat(this.accessLogs)
|
this.accessLogs = resp.data.accessLogs.concat(this.accessLogs)
|
||||||
|
|||||||
Reference in New Issue
Block a user