优化界面

This commit is contained in:
刘祥超
2021-08-16 14:44:32 +08:00
parent 1da5d1094f
commit c2576f4c62
24 changed files with 25 additions and 28 deletions

View File

@@ -13,7 +13,7 @@
</tr> </tr>
</thead> </thead>
<tr v-for="admin in admins"> <tr v-for="admin in admins">
<td :class="{disabled:!admin.isOn}">{{admin.username}} <td :class="{disabled:!admin.isOn}"><a :href="'/admins/admin?adminId=' + admin.id">{{admin.username}}</a>
<div v-if="admin.isSuper" style="margin-top: 0.5em"> <div v-if="admin.isSuper" style="margin-top: 0.5em">
<tiny-basic-label class="olive">超级管理员</tiny-basic-label> <tiny-basic-label class="olive">超级管理员</tiny-basic-label>
</div> </div>

View File

@@ -20,7 +20,7 @@
</tr> </tr>
</thead> </thead>
<tr v-for="recipient in recipients"> <tr v-for="recipient in recipients">
<td>{{recipient.admin.fullname}} <span class="small grey">{{recipient.admin.username}}</span> <link-icon :href="'/admins/admin?adminId=' + recipient.admin.id"></link-icon></td> <td><a :href="'/admins/recipients/recipient?recipientId=' + recipient.id">{{recipient.admin.fullname}}</a> <span class="small grey">{{recipient.admin.username}}</span> <link-icon :href="'/admins/admin?adminId=' + recipient.admin.id"></link-icon></td>
<td>{{recipient.instance.name}}</td> <td>{{recipient.instance.name}}</td>
<td> <td>
<span v-if="recipient.user.length > 0">{{recipient.user}}</span> <span v-if="recipient.user.length > 0">{{recipient.user}}</span>

View File

@@ -21,7 +21,7 @@
</tr> </tr>
</thead> </thead>
<tr v-for="node in nodes"> <tr v-for="node in nodes">
<td>{{node.name}}</td> <td><a :href="'/api/node?nodeId=' + node.id">{{node.name}}</a></td>
<td> <td>
<div v-if="node.accessAddrs != null && node.accessAddrs.length > 0"> <div v-if="node.accessAddrs != null && node.accessAddrs.length > 0">
<div v-for="addr in node.accessAddrs"> <div v-for="addr in node.accessAddrs">

View File

@@ -66,7 +66,7 @@
</tr> </tr>
</thead> </thead>
<tr v-for="node in nodes"> <tr v-for="node in nodes">
<td>{{node.name}} <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"> <div style="margin-top: 0.5em" v-if="node.region != null">
<tiny-basic-label class="olive">区域:{{node.region.name}}</tiny-basic-label> <tiny-basic-label class="olive">区域:{{node.region.name}}</tiny-basic-label>
</div> </div>

View File

@@ -30,7 +30,7 @@
</tr> </tr>
</thead> </thead>
<tr v-for="grant in grants"> <tr v-for="grant in grants">
<td>{{grant.name}}</td> <td><a :href="'/clusters/grants/grant?grantId=' + grant.id">{{grant.name}}</a></td>
<td> <td>
<span class="ui label tiny basic">{{grant.method.name}}</span> <span class="ui label tiny basic">{{grant.method.name}}</span>
</td> </td>

View File

@@ -1,4 +0,0 @@
table a span {
text-decoration: underline;
}
/*# sourceMappingURL=index.css.map */

View File

@@ -1 +1 @@
{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA,KAAM,EAAE;EACP,0BAAA","file":"index.css"} undefined

View File

@@ -41,7 +41,7 @@
</tr> </tr>
</thead> </thead>
<tr v-for="cluster in clusters"> <tr v-for="cluster in clusters">
<td><keyword :v-word="keyword">{{cluster.name}}</keyword></td> <td><a :href="'/clusters/cluster?clusterId=' + cluster.id"><keyword :v-word="keyword">{{cluster.name}}</keyword></a></td>
<td class="center"> <td class="center">
<a :href="'/clusters/cluster/nodes?clusterId=' + cluster.id" v-if="cluster.countAllNodes > 0"><span :class="{red:cluster.countAllNodes > cluster.countActiveNodes}">{{cluster.countAllNodes}}</span></a> <a :href="'/clusters/cluster/nodes?clusterId=' + cluster.id" v-if="cluster.countAllNodes > 0"><span :class="{red:cluster.countAllNodes > cluster.countActiveNodes}">{{cluster.countAllNodes}}</span></a>
<span class="disabled" v-else="">-</span> <span class="disabled" v-else="">-</span>
@@ -91,7 +91,7 @@
</tr> </tr>
</thead> </thead>
<tr v-for="node in nodes"> <tr v-for="node in nodes">
<td><keyword :v-word="keyword">{{node.name}}</keyword> <td><a :href="'/clusters/cluster/node?clusterId=' + node.cluster.id + '&nodeId=' + node.id"><keyword :v-word="keyword">{{node.name}}</keyword></a>
<div style="margin-top: 0.5em"> <div style="margin-top: 0.5em">
<node-clusters-labels :v-primary-cluster="node.cluster" :v-secondary-clusters="node.secondaryClusters" size="tiny"></node-clusters-labels> <node-clusters-labels :v-primary-cluster="node.cluster" :v-secondary-clusters="node.secondaryClusters" size="tiny"></node-clusters-labels>
</div> </div>

View File

@@ -1,3 +1,2 @@
table a span { table a span {
text-decoration: underline;
} }

View File

@@ -15,7 +15,7 @@
</thead> </thead>
<tr v-for="cluster in clusters"> <tr v-for="cluster in clusters">
<td> <td>
{{cluster.name}}<link-icon :href="'/clusters/cluster?clusterId=' + cluster.id"></link-icon> <a :href="'/dns/clusters/cluster?clusterId=' + cluster.id">{{cluster.name}}</a><link-icon :href="'/clusters/cluster?clusterId=' + cluster.id"></link-icon>
</td> </td>
<td> <td>
<span v-if="cluster.dnsName.length > 0 && cluster.domainName.length > 0"><em class="italic">{{cluster.dnsName}}</em>.{{cluster.domainName}}</span> <span v-if="cluster.dnsName.length > 0 && cluster.domainName.length > 0"><em class="italic">{{cluster.dnsName}}</em>.{{cluster.domainName}}</span>

View File

@@ -16,7 +16,7 @@
</tr> </tr>
</thead> </thead>
<tr v-for="(provider, index) in providers"> <tr v-for="(provider, index) in providers">
<td>{{provider.name}}</td> <td><a :href="'/dns/providers/provider?providerId=' + provider.id">{{provider.name}}</a></td>
<td>{{provider.typeName}}</td> <td>{{provider.typeName}}</td>
<td class="center"> <td class="center">
<span v-if="provider.countDomains == 0" class="disabled">0</span> <span v-if="provider.countDomains == 0" class="disabled">0</span>

View File

@@ -52,7 +52,7 @@
</tr> </tr>
</thead> </thead>
<tr v-for="node in nodes"> <tr v-for="node in nodes">
<td><keyword :v-word="keyword">{{node.name}}</keyword></td> <td><a :href="'/ns/clusters/cluster/node?clusterId=' + clusterId + '&nodeId=' + node.id"><keyword :v-word="keyword">{{node.name}}</keyword></a></td>
<td> <td>
<span v-if="node.ipAddresses.length == 0" class="disabled">-</span> <span v-if="node.ipAddresses.length == 0" class="disabled">-</span>
<div v-else class="address-box"> <div v-else class="address-box">

View File

@@ -14,7 +14,7 @@
</tr> </tr>
</thead> </thead>
<tr v-for="cluster in clusters"> <tr v-for="cluster in clusters">
<td>{{cluster.name}}</td> <td><a :href="'/ns/clusters/cluster?clusterId=' + cluster.id">{{cluster.name}}</a></td>
<td class="center"> <td class="center">
<a :href="'/ns/clusters/cluster?clusterId=' + cluster.id" v-if="cluster.countAllNodes > 0"><span :class="{red:cluster.countAllNodes > cluster.countActiveNodes}">{{cluster.countAllNodes}}</span></a> <a :href="'/ns/clusters/cluster?clusterId=' + cluster.id" v-if="cluster.countAllNodes > 0"><span :class="{red:cluster.countAllNodes > cluster.countActiveNodes}">{{cluster.countAllNodes}}</span></a>
<span class="disabled" v-else="">-</span> <span class="disabled" v-else="">-</span>

View File

@@ -42,7 +42,9 @@
</tr> </tr>
</thead> </thead>
<tr v-for="domain in domains"> <tr v-for="domain in domains">
<td><keyword :v-word="keyword">{{domain.name}}</keyword></td> <td>
<a :href="'/ns/domains/domain?domainId=' + domain.id"><keyword :v-word="keyword">{{domain.name}}</keyword></a>
</td>
<td> <td>
{{domain.cluster.name}}<link-icon :href="'/ns/clusters/cluster?clusterId=' + domain.cluster.id"></link-icon> {{domain.cluster.name}}<link-icon :href="'/ns/clusters/cluster?clusterId=' + domain.cluster.id"></link-icon>
</td> </td>

View File

@@ -14,7 +14,7 @@
</tr> </tr>
</thead> </thead>
<tr v-for="policy in policies"> <tr v-for="policy in policies">
<td>{{policy.name}} <td><a :href="Tea.url('.policy', {policyId: policy.id})">{{policy.name}}</a>
<div style="margin-top: 0.3em" v-if="policy.isPublic"> <div style="margin-top: 0.3em" v-if="policy.isPublic">
<span class="ui label olive tiny basic">公用</span> <span class="ui label olive tiny basic">公用</span>
</div> </div>

View File

@@ -33,7 +33,7 @@
</tr> </tr>
</thead> </thead>
<tr v-for="(policy, index) in cachePolicies"> <tr v-for="(policy, index) in cachePolicies">
<td><keyword :v-word="keyword">{{policy.name}}</keyword></td> <td><a :href="'/servers/components/cache/policy?cachePolicyId=' + policy.id"><keyword :v-word="keyword">{{policy.name}}</keyword></a></td>
<td>{{infos[index].typeName}} <span class="small">{{policy.type}}</span></td> <td>{{infos[index].typeName}} <span class="small">{{policy.type}}</span></td>
<td> <td>
<span v-if="policy.capacity != null && policy.capacity.count > 0">{{policy.capacity.count}}{{policy.capacity.unit.toUpperCase()}}</span> <span v-if="policy.capacity != null && policy.capacity.count > 0">{{policy.capacity.count}}{{policy.capacity.unit.toUpperCase()}}</span>

View File

@@ -34,7 +34,7 @@
</tr> </tr>
</thead> </thead>
<tr v-for="policy in policies"> <tr v-for="policy in policies">
<td><keyword :v-word="keyword">{{policy.name}}</keyword></td> <td><a :href="'/servers/components/waf/policy?firewallPolicyId=' + policy.id"><keyword :v-word="keyword">{{policy.name}}</keyword></a></td>
<td class="center">{{policy.countInbound}}</td> <td class="center">{{policy.countInbound}}</td>
<td class="center">{{policy.countOutbound}}</td> <td class="center">{{policy.countOutbound}}</td>
<td class="center">{{policy.countClusters}}</td> <td class="center">{{policy.countClusters}}</td>

View File

@@ -79,7 +79,7 @@
</tr> </tr>
</thead> </thead>
<tr v-for="server in servers"> <tr v-for="server in servers">
<td><keyword :v-word="keyword">{{server.name}}</keyword> <td><a :href="'/servers/server?serverId=' + server.id"><keyword :v-word="keyword">{{server.name}}</keyword></a>
<div style="margin-top:0.4em"> <div style="margin-top:0.4em">
<tiny-basic-label>{{server.serverTypeName}}</tiny-basic-label> <tiny-basic-label>{{server.serverTypeName}}</tiny-basic-label>
</div> </div>

View File

@@ -18,7 +18,7 @@
</thead> </thead>
<tr v-for="list in lists"> <tr v-for="list in lists">
<td class="center">{{list.id}}</td> <td class="center">{{list.id}}</td>
<td>{{list.name}}</td> <td><a :href="'/servers/iplists/list?listId=' + list.id">{{list.name}}</a></td>
<td class="center"> <td class="center">
<span v-if="list.type == 'black'">黑名单</span> <span v-if="list.type == 'black'">黑名单</span>
<span v-if="list.type == 'white'">白名单</span> <span v-if="list.type == 'white'">白名单</span>

View File

@@ -24,7 +24,7 @@
</thead> </thead>
<tr v-for="item in items"> <tr v-for="item in items">
<td> <td>
{{item.name}} <a :href="'/servers/metrics/item?itemId=' + item.id">{{item.name}}</a>
<div style="margin-top: 0.3em" v-if="item.isPublic || item.code.length > 0"> <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.isPublic">公用</span>
<span class="ui label olive tiny basic" v-if="item.code.length > 0">内置</span> <span class="ui label olive tiny basic" v-if="item.code.length > 0">内置</span>

View File

@@ -19,7 +19,7 @@
</tr> </tr>
</thead> </thead>
<tr v-for="node in nodes"> <tr v-for="node in nodes">
<td>{{node.name}}</td> <td><a :href="'/settings/authority/nodes/node?nodeId=' + node.id">{{node.name}}</a></td>
<td class="center"> <td class="center">
<span v-if="node.status.buildVersion.length > 0">v{{node.status.buildVersion}}</span> <span v-if="node.status.buildVersion.length > 0">v{{node.status.buildVersion}}</span>
<span v-else class="disabled">-</span> <span v-else class="disabled">-</span>

View File

@@ -18,7 +18,7 @@
</tr> </tr>
</thead> </thead>
<tr v-for="node in nodes"> <tr v-for="node in nodes">
<td>{{node.name}}</td> <td><a :href="'/settings/monitorNodes/node?nodeId=' + node.id">{{node.name}}</a></td>
<td class="center"> <td class="center">
<span v-if="node.status.buildVersion.length > 0">v{{node.status.buildVersion}}</span> <span v-if="node.status.buildVersion.length > 0">v{{node.status.buildVersion}}</span>
<span v-else class="disabled">-</span> <span v-else class="disabled">-</span>

View File

@@ -19,7 +19,7 @@
</tr> </tr>
</thead> </thead>
<tr v-for="node in nodes"> <tr v-for="node in nodes">
<td>{{node.name}}</td> <td><a :href="'/settings/userNodes/node?nodeId=' + node.id">{{node.name}}</a></td>
<td> <td>
<div v-if="node.accessAddrs != null && node.accessAddrs.length > 0"> <div v-if="node.accessAddrs != null && node.accessAddrs.length > 0">
<span class="ui label tiny basic" v-for="addr in node.accessAddrs">{{addr}}</span> <span class="ui label tiny basic" v-for="addr in node.accessAddrs">{{addr}}</span>

View File

@@ -18,7 +18,7 @@
</tr> </tr>
</thead> </thead>
<tr v-for="user in users"> <tr v-for="user in users">
<td :class="{disabled:!user.isOn}">{{user.username}}</td> <td :class="{disabled:!user.isOn}"><a :href="'/users/user?userId=' + user.id">{{user.username}}</a></td>
<td :class="{disabled:!user.isOn}">{{user.fullname}}</td> <td :class="{disabled:!user.isOn}">{{user.fullname}}</td>
<td> <td>
<span v-if="user.cluster != null">{{user.cluster.name}} <link-icon :href="'/clusters/cluster?clusterId=' + user.cluster.id"></link-icon></span> <span v-if="user.cluster != null">{{user.cluster.name}} <link-icon :href="'/clusters/cluster?clusterId=' + user.cluster.id"></link-icon></span>