优化集群没有节点时的提示
This commit is contained in:
7
web/public/js/components/common/not-found-box.js
Normal file
7
web/public/js/components/common/not-found-box.js
Normal file
@@ -0,0 +1,7 @@
|
||||
Vue.component("not-found-box", {
|
||||
props: ["message"],
|
||||
template: `<div style="text-align: center; margin-top: 5em;">
|
||||
<div style="font-size: 2em; margin-bottom: 1em"><i class="icon exclamation triangle large grey"></i></div>
|
||||
<p class="comment">{{message}}</p>
|
||||
</div>`
|
||||
})
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
{$template "menu"}
|
||||
|
||||
<form class="ui form" action="/clusters/cluster">
|
||||
<form class="ui form" action="/clusters/cluster" v-show="countAll > 0">
|
||||
<input type="hidden" name="clusterId" :value="clusterId"/>
|
||||
<div class="ui fields inline">
|
||||
<div class="ui field" v-if="regions.length > 0">
|
||||
@@ -40,7 +40,12 @@
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p class="comment" v-if="nodes.length == 0">暂时还没有节点。</p>
|
||||
<div v-if="countAll == 0">
|
||||
<not-found-box message="当前集群下还没有节点,至少添加一个节点后才能提供服务。"></not-found-box>
|
||||
</div>
|
||||
<div v-if="countAll > 0">
|
||||
<p class="comment" v-if="nodes.length == 0">暂时还没有节点。</p>
|
||||
</div>
|
||||
|
||||
<table class="ui table selectable celled" v-if="nodes.length > 0">
|
||||
<thead>
|
||||
|
||||
Reference in New Issue
Block a user