服务列表页带宽使用比特代替字节

This commit is contained in:
GoEdgeLab
2022-10-03 19:25:20 +08:00
parent bceb14cedc
commit cab36d6f68
15 changed files with 161 additions and 184 deletions

View File

@@ -731,6 +731,9 @@ var.olive {
var.dash {
border-bottom: 1px dashed grey;
}
var.normal {
font-style: normal;
}
/** checkbox **/
.checkbox label a,
.checkbox label {

File diff suppressed because one or more lines are too long

View File

@@ -752,6 +752,10 @@ var.dash {
border-bottom: 1px dashed grey;
}
var.normal {
font-style: normal;
}
/** checkbox **/
.checkbox label a, .checkbox label {
font-size: 0.9em !important;

View File

@@ -26,4 +26,10 @@
.server-name-td:hover .icon.setting {
display: inline;
}
.bandwidth-span var {
font-size: 0.8em;
}
.bandwidth-span var span {
font-size: 1.2em;
}
/*# sourceMappingURL=index.css.map */

View File

@@ -1 +1 @@
{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA,GAAG,QACF,MAAK;EACJ,kBAAA;EACA,UAAA;EACA,UAAA;;AAJF,GAAG,QAOF;EACC,kBAAA;;AAIF;EACC,gBAAA;EACA,gBAAA;;AAGD,cAAc;EACb,UAAA;;AAGD;EACC,kBAAA;;AADD,eAGC,MAAK;EACJ,aAAA;EACA,kBAAA;EACA,UAAA;EACA,QAAA;EACA,gBAAA;;AAIF,eAAe,MACd,MAAK;EACJ,eAAA","file":"index.css"}
{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA,GAAG,QACF,MAAK;EACJ,kBAAA;EACA,UAAA;EACA,UAAA;;AAJF,GAAG,QAOF;EACC,kBAAA;;AAIF;EACC,gBAAA;EACA,gBAAA;;AAGD,cAAc;EACb,UAAA;;AAGD;EACC,kBAAA;;AADD,eAGC,MAAK;EACJ,aAAA;EACA,kBAAA;EACA,UAAA;EACA,QAAA;EACA,gBAAA;;AAIF,eAAe,MACd,MAAK;EACJ,eAAA;;AAIF,eACC;EACC,gBAAA;;AAFF,eACC,IAGC;EACC,gBAAA","file":"index.css"}

View File

@@ -63,7 +63,7 @@
<th>部署集群</th>
<th>域名</th>
<th>端口</th>
<th class="center" style="width: 8em">下行带宽<tip-icon content="最近5分钟峰值带宽每5分钟更新一次"></tip-icon><sort-arrow name="trafficOutOrder"></sort-arrow></th>
<th class="center" style="width: 8em">下行带宽<tip-icon content="最近5分钟峰值带宽每5分钟更新一次,单位:比特"></tip-icon><sort-arrow name="trafficOutOrder"></sort-arrow></th>
<th class="two wide center">状态</th>
<th class="two op">操作</th>
</tr>
@@ -103,7 +103,7 @@
</div>
</td>
<td class="center">
<span v-if="server.bandwidth.length > 0">{{server.bandwidth}}/s</span>
<span v-if="server.bandwidthBits > 0" class="bandwidth-span"><bits-var :v-bits="server.bandwidthBits"></bits-var></span>
<span class="disabled" v-else>-</span>
</td>
<td class="center">

View File

@@ -35,4 +35,14 @@
.icon.setting {
display: inline;
}
}
}
.bandwidth-span {
var {
font-size: 0.8em;
span {
font-size: 1.2em;
}
}
}

View File

@@ -1,128 +0,0 @@
{$layout}
<form class="ui form" method="post" data-tea-action="$" data-tea-success="success">
<csrf-token></csrf-token>
<table class="ui table definition selectable">
<tr>
<td class="title">产品名称 *</td>
<td>
<input type="text" name="productName" v-model="config.productName" maxlength="100"/>
</td>
</tr>
<tr>
<td>用户系统名称 *</td>
<td>
<input type="text" name="userSystemName" v-model="config.userSystemName" maxlength="100"/>
</td>
</tr>
<tr>
<td>是否显示底部开源信息</td>
<td>
<checkbox name="showOpenSourceInfo" v-model="config.showOpenSourceInfo"></checkbox>
</td>
</tr>
<tr>
<td>是否显示版本号</td>
<td>
<checkbox name="showVersion" v-model="config.showVersion"></checkbox>
</td>
</tr>
<tr v-show="config.showVersion">
<td>定制版本号</td>
<td>
<input type="text" name="version" v-model="config.version" maxlength="100"/>
<p class="comment">定制自己的版本号,留空表示使用系统自带的版本号。</p>
</td>
</tr>
<tr>
<td>是否显示财务相关功能</td>
<td>
<checkbox name="showFinance" v-model="config.showFinance"></checkbox>
</td>
</tr>
<tr>
<td>浏览器图标</td>
<td>
<div v-if="config.faviconFileId > 0">
<a :href="'/ui/image/' + config.faviconFileId" target="_blank"><img :src="'/ui/image/' + config.faviconFileId" style="width:32px;border:1px #ccc solid;"/></a>
</div>
<div v-else>
<span class="disabled">还没有上传。</span>
</div>
<div style="margin-top: 0.8em">
<input type="file" name="faviconFile" accept=".png"/>
</div>
<p class="comment">在浏览器标签栏显示的图标请使用PNG格式。</p>
</td>
</tr>
<tr>
<td>Logo</td>
<td>
<div v-if="config.logoFileId > 0">
<a :href="'/ui/image/' + config.logoFileId" target="_blank"><img :src="'/ui/image/' + config.logoFileId" style="width:32px;border:1px #ccc solid;"/></a>
</div>
<div v-else>
<span class="disabled">还没有上传。</span>
</div>
<div style="margin-top: 0.8em">
<input type="file" name="logoFile" accept=".png"/>
</div>
<p class="comment">显示在系统界面上的图标请使用PNG格式。</p>
</td>
</tr>
<tr>
<td>注册设置</td>
<td>
<a href="/users/setting">修改用户注册相关设置 &raquo;</a>
</td>
</tr>
</table>
<h4>数据看板</h4>
<table class="ui table definition selectable">
<tr>
<td class="title">显示流量相关数据和图表</td>
<td><checkbox name="showTrafficCharts" v-model="config.showTrafficCharts"></checkbox></td>
</tr>
<tr>
<td class="title">显示带宽相关数据和图表</td>
<td><checkbox name="showBandwidthCharts" v-model="config.showBandwidthCharts"></checkbox></td>
</tr>
<tr>
<td class="title">带宽单位</td>
<td>
<select class="ui dropdown auto-width" name="bandwidthUnit" v-model="config.bandwidthUnit">
<option value="bit">比特</option>
<option value="byte">字节</option>
</select>
</td>
</tr>
</table>
<h4>其他</h4>
<table class="ui table definition selectable">
<tr>
<td class="title">时区</td>
<td>
<div class="ui fields inline">
<div class="ui field">
<select class="ui dropdown" v-model="timeZoneGroupCode">
<option v-for="timeZoneGroup in timeZoneGroups" :value="timeZoneGroup.code">{{timeZoneGroup.name}}</option>
</select>
</div>
<div class="ui field">
<select class="ui dropdown" name="timeZone" v-model="config.timeZone">
<option v-for="timeZoneLocation in timeZoneLocations" :value="timeZoneLocation.name" v-if="timeZoneLocation.group == timeZoneGroupCode">{{timeZoneLocation.name}} ({{timeZoneLocation.offset}})</option>
</select>
</div>
</div>
<p class="comment">显示时间使用的时区如果你的API节点是独立部署的需要手动重启API节点后生效。</p>
</td>
</tr>
</table>
<p class="comment">修改后在3分钟内生效。</p>
<submit-btn></submit-btn>
</form>

View File

@@ -1,36 +0,0 @@
Tea.context(function () {
this.success = NotifyReloadSuccess("保存成功")
// 时区
this.timeZoneGroupCode = "asia"
if (this.timeZoneLocation != null) {
this.timeZoneGroupCode = this.timeZoneLocation.group
}
let oldTimeZoneGroupCode = this.timeZoneGroupCode
let oldTimeZoneName = ""
if (this.timeZoneLocation != null) {
oldTimeZoneName = this.timeZoneLocation.name
}
this.$delay(function () {
this.$watch("timeZoneGroupCode", function (groupCode) {
if (groupCode == oldTimeZoneGroupCode && oldTimeZoneName.length > 0) {
this.config.timeZone = oldTimeZoneName
return
}
let firstLocation = null
this.timeZoneLocations.forEach(function (v) {
if (firstLocation != null) {
return
}
if (v.group == groupCode) {
firstLocation = v
}
})
if (firstLocation != null) {
this.config.timeZone = firstLocation.name
}
})
})
})