2020-09-13 20:37:07 +08:00
|
|
|
|
{$layout}
|
|
|
|
|
|
|
2021-06-07 08:43:57 +08:00
|
|
|
|
<first-menu>
|
|
|
|
|
|
<menu-item href="/servers/components/cache" code="index">列表</menu-item>
|
|
|
|
|
|
<span class="item">|</span>
|
|
|
|
|
|
<a href="" class="item" @click.prevent="createPolicy()">[创建]</a>
|
|
|
|
|
|
</first-menu>
|
2020-10-02 17:22:24 +08:00
|
|
|
|
|
2021-06-07 08:58:54 +08:00
|
|
|
|
<!-- 搜索 -->
|
2021-06-07 08:43:57 +08:00
|
|
|
|
<div class="margin"></div>
|
|
|
|
|
|
<form class="ui form" method="get" action="/servers/components/cache">
|
|
|
|
|
|
<div class="ui fields inline">
|
|
|
|
|
|
<div class="ui field">
|
|
|
|
|
|
<input type="text" name="keyword" v-model="keyword" placeholder="策略名称..."/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="ui field">
|
|
|
|
|
|
<button type="submit" class="ui button">搜索</button>
|
2021-09-12 20:21:32 +08:00
|
|
|
|
|
|
|
|
|
|
<a :href="Tea.url('.')" v-if="keyword.length > 0">[清除条件]</a>
|
2021-06-07 08:43:57 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</form>
|
2020-10-02 17:22:24 +08:00
|
|
|
|
|
2021-06-07 08:58:54 +08:00
|
|
|
|
<!-- 列表 -->
|
2021-06-07 08:43:57 +08:00
|
|
|
|
<p class="comment" v-if="cachePolicies == null || cachePolicies.length == 0">暂时还没有缓存策略。</p>
|
|
|
|
|
|
<table class="ui table selectable celled" v-if="cachePolicies != null && cachePolicies.length > 0">
|
|
|
|
|
|
<thead>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<th>策略名称</th>
|
|
|
|
|
|
<th>策略类型</th>
|
|
|
|
|
|
<th>容量</th>
|
|
|
|
|
|
<th class="center">集群数</th>
|
|
|
|
|
|
<th class="center">状态</th>
|
|
|
|
|
|
<th class="two op">操作</th>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tr v-for="(policy, index) in cachePolicies">
|
2021-08-16 14:44:32 +08:00
|
|
|
|
<td><a :href="'/servers/components/cache/policy?cachePolicyId=' + policy.id"><keyword :v-word="keyword">{{policy.name}}</keyword></a></td>
|
2021-06-07 08:43:57 +08:00
|
|
|
|
<td>{{infos[index].typeName}} <span class="small">({{policy.type}})</span></td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<span v-if="policy.capacity != null && policy.capacity.count > 0">{{policy.capacity.count}}{{policy.capacity.unit.toUpperCase()}}</span>
|
|
|
|
|
|
<span v-else class="disabled">不限</span>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="center">{{infos[index].countClusters}}</td>
|
|
|
|
|
|
<td class="center"><label-on :v-is-on="policy.isOn"></label-on></td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<a :href="'/servers/components/cache/policy?cachePolicyId=' + policy.id">详情</a> <a href="" @click.prevent="deletePolicy(policy.id)">删除</a>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="page" v-html="page"></div>
|