Files
EdgeAdmin/web/views/@default/servers/components/cache/policy.html
2021-05-24 09:02:55 +08:00

95 lines
3.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{$layout}
{$template "policy_menu"}
<table class="ui table definition selectable">
<tr>
<td class="title">策略名称</td>
<td>{{cachePolicy.name}}</td>
</tr>
<tr>
<td>状态</td>
<td><label-on :v-is-on="cachePolicy.isOn"></label-on></td>
</tr>
<tr>
<td class="color-border">缓存类型</td>
<td>
{{typeName}}<span class="small">{{cachePolicy.type}}</span>
</td>
</tr>
<!-- 文件缓存选项 -->
<tbody v-if="cachePolicy.type == 'file'">
<tr>
<td class="color-border">缓存目录</td>
<td>
{{cachePolicy.options.dir}}
<p class="comment">存放文件缓存的目录,通常填写绝对路径。</p>
</td>
</tr>
<tr>
<td class="color-border">文件目录最大容量</td>
<td>
<size-capacity-view :v-value="cachePolicy.capacity" :v-default-text="'不限'"></size-capacity-view>
<p class="comment">作为二级缓存的文件目录允许缓存的最大容量如果为0表示没有限制。</p>
</td>
</tr>
<tr v-if="cachePolicy.options.memoryPolicy != null && cachePolicy.options.memoryPolicy.capacity != null && cachePolicy.options.memoryPolicy.capacity.count > 0">
<td class="color-border">内存最大容量</td>
<td>
<size-capacity-view :v-value="cachePolicy.options.memoryPolicy.capacity"></size-capacity-view>
<p class="comment">作为一级缓存的内存最大容量如果为0表示不使用内存作为一级缓存。</p>
</td>
</tr>
</tbody>
<tbody v-if="cachePolicy.type != 'file'">
<tr>
<td>缓存最大容量</td>
<td>
<size-capacity-view :v-value="cachePolicy.capacity" :v-default-text="'不限'"></size-capacity-view>
<p class="comment">允许缓存的最大容量如果为0表示没有限制。</p>
</td>
</tr>
</tbody>
<tr>
<td colspan="2"><more-options-indicator></more-options-indicator></td>
</tr>
<tbody v-show="moreOptionsVisible">
<tr>
<td>最大内容长度</td>
<td>
<size-capacity-view :v-value="cachePolicy.maxSize" :v-default-text="'不限'"></size-capacity-view>
<p class="comment">允许缓存的最大内容长度如果为0表示没有限制。</p>
</td>
</tr>
<tr>
<td>容纳Key数量</td>
<td>
<span v-if="cachePolicy.maxKeys > 0">{{cachePolicy.maxKeys}}</span>
<span v-else>不限</span>
<p class="comment">可以容纳多少数量的Key0表示不限制。</p>
</td>
</tr>
<tr>
<td>描述</td>
<td>
<span v-if="cachePolicy.description.length > 0">{{cachePolicy.description}}</span>
<span v-else class="disabled">暂时还没有描述。</span>
</td>
</tr>
</tbody>
</table>
<!-- 默认缓存条件 -->
<h4>默认缓存条件</h4>
<http-cache-refs-box :v-cache-refs="cachePolicy.cacheRefs"></http-cache-refs-box>
<!-- 使用此策略的集群 -->
<h4>使用此策略的集群</h4>
<p class="comment" v-if="clusters.length == 0">暂时还没有集群使用此策略。</p>
<table class="ui table selectable" v-if="clusters.length > 0">
<tr v-for="cluster in clusters">
<td>{{cluster.name}}<link-icon :href="'/clusters/cluster?clusterId=' + cluster.id"></link-icon></td>
</tr>
</table>