mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 05:00:25 +08:00 
			
		
		
		
	优化缓存策略相关界面
This commit is contained in:
		@@ -1,10 +1,10 @@
 | 
			
		||||
<second-menu>
 | 
			
		||||
	<menu-item href="/servers/components/cache">列表</menu-item>
 | 
			
		||||
	<menu-item href="/servers/components/cache">策略列表</menu-item>
 | 
			
		||||
	<span class="item">|</span>
 | 
			
		||||
	<menu-item :href="'/servers/components/cache/policy?cachePolicyId=' + cachePolicyId" code="index">{{cachePolicyName}}</menu-item>
 | 
			
		||||
	<menu-item :href="'/servers/components/cache/test?cachePolicyId=' + cachePolicyId" code="test">测试</menu-item>
 | 
			
		||||
	<menu-item :href="'/servers/components/cache/stat?cachePolicyId=' + cachePolicyId" code="stat">统计</menu-item>
 | 
			
		||||
	<menu-item :href="'/servers/components/cache/clean?cachePolicyId=' + cachePolicyId" code="clean">清理</menu-item>
 | 
			
		||||
	<!--<menu-item :href="'/servers/components/cache/clean?cachePolicyId=' + cachePolicyId" code="clean">清理</menu-item>-->
 | 
			
		||||
	<menu-item :href="'/servers/components/cache/purge?cachePolicyId=' + cachePolicyId" code="purge">刷新</menu-item>
 | 
			
		||||
	<menu-item :href="'/servers/components/cache/fetch?cachePolicyId=' + cachePolicyId" code="fetch">预热</menu-item>
 | 
			
		||||
	<menu-item :href="'/servers/components/cache/update?cachePolicyId=' + cachePolicyId" code="update">修改</menu-item>
 | 
			
		||||
 
 | 
			
		||||
@@ -38,20 +38,6 @@
 | 
			
		||||
                   <size-capacity-box :v-name="'fileMemoryCapacityJSON'" :v-count="1" :v-unit="'gb'" :key="'fileMemoryCapacityJSON'"></size-capacity-box>
 | 
			
		||||
                    <p class="comment">单个节点上作为一级缓存的内存最大容量,可以作为磁盘缓冲区和存储热点缓存内容,如果为0表示不使用内存作为一级缓存。</p>
 | 
			
		||||
                </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td class="color-border">缓存文件句柄缓存</td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <input type="text" name="fileOpenFileCacheMax" maxlength="6" value="0" style="width: 10em"/>
 | 
			
		||||
                    <p class="comment"><pro-warning-label></pro-warning-label>保持在内存中的缓存文件句柄的数量,提升缓存文件打开速度,建议数量不超过缓存文件数量的十分之一。</p>
 | 
			
		||||
                </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr v-show="teaIsPlus">
 | 
			
		||||
                <td class="color-border">开启Sendfile</td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <checkbox name="fileEnableSendfile"></checkbox>
 | 
			
		||||
                    <p class="comment"><pro-warning-label></pro-warning-label><plus-label></plus-label>使用sendfile提升发送缓存文件的效率。</p>
 | 
			
		||||
                </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
		</tbody>
 | 
			
		||||
 | 
			
		||||
@@ -76,6 +62,22 @@
 | 
			
		||||
		<tr>
 | 
			
		||||
			<td colspan="2"><more-options-indicator></more-options-indicator></td>
 | 
			
		||||
		</tr>
 | 
			
		||||
        <tbody v-show="moreOptionsVisible && policyType == 'file'">
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td class="color-border">缓存文件句柄缓存</td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <input type="text" name="fileOpenFileCacheMax" maxlength="6" value="0" style="width: 10em"/>
 | 
			
		||||
                    <p class="comment"><pro-warning-label></pro-warning-label>保持在内存中的缓存文件句柄的数量,提升缓存文件打开速度,建议数量不超过缓存文件数量的十分之一。</p>
 | 
			
		||||
                </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr v-show="teaIsPlus">
 | 
			
		||||
                <td class="color-border">开启Sendfile</td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <checkbox name="fileEnableSendfile"></checkbox>
 | 
			
		||||
                    <p class="comment"><pro-warning-label></pro-warning-label><plus-label></plus-label>使用sendfile提升发送缓存文件的效率。</p>
 | 
			
		||||
                </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
        </tbody>
 | 
			
		||||
		<tbody v-show="moreOptionsVisible">
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td>同步写入压缩缓存</td>
 | 
			
		||||
@@ -91,7 +93,7 @@
 | 
			
		||||
				</td>
 | 
			
		||||
			</tr>
 | 
			
		||||
			<tr>
 | 
			
		||||
				<td>是否启用</td>
 | 
			
		||||
				<td>启用当前策略</td>
 | 
			
		||||
				<td>
 | 
			
		||||
					<div class="ui checkbox">
 | 
			
		||||
						<input type="checkbox" name="isOn" value="1" checked="checked"/>
 | 
			
		||||
 
 | 
			
		||||
@@ -47,9 +47,13 @@
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr v-if="cachePolicy.options.openFileCache != null && cachePolicy.options.openFileCache.isOn && cachePolicy.options.openFileCache.max > 0">
 | 
			
		||||
            <td>缓存文件句柄缓存</td>
 | 
			
		||||
            <td class="color-border">缓存文件句柄缓存</td>
 | 
			
		||||
            <td>{{cachePolicy.options.openFileCache.max}}</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr v-if="cachePolicy.options.enableSendfile">
 | 
			
		||||
            <td class="color-border">开启Sendfile</td>
 | 
			
		||||
            <td><span v-if="cachePolicy.options.enableSendfile" class="green">Y</span><span v-else class="disabled">N</span></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
    </tbody>
 | 
			
		||||
 | 
			
		||||
   <tbody v-if="cachePolicy.type != 'file'">
 | 
			
		||||
 
 | 
			
		||||
@@ -47,20 +47,6 @@
 | 
			
		||||
                        <size-capacity-box :v-name="'fileMemoryCapacityJSON'" :v-count="0" :v-unit="'gb'"></size-capacity-box>
 | 
			
		||||
                        <p class="comment">作为一级缓存的内存最大容量,可以作为磁盘缓冲区和存储热点缓存内容,如果为0表示不使用内存作为一级缓存。</p>
 | 
			
		||||
                    </td>
 | 
			
		||||
                </tr>
 | 
			
		||||
                <tr>
 | 
			
		||||
                    <td class="color-border">缓存文件句柄缓存</td>
 | 
			
		||||
                    <td>
 | 
			
		||||
                        <input type="text" name="fileOpenFileCacheMax" v-model="fileOpenFileCacheMax" maxlength="6" value="0" style="width: 10em"/>
 | 
			
		||||
                        <p class="comment"><pro-warning-label></pro-warning-label>保持在内存中的缓存文件句柄的数量,提升缓存文件打开速度,建议数量不超过缓存文件数量的十分之一。</p>
 | 
			
		||||
                    </td>
 | 
			
		||||
                </tr>
 | 
			
		||||
                <tr v-show="teaIsPlus">
 | 
			
		||||
                    <td class="color-border">开启Sendfile</td>
 | 
			
		||||
                    <td>
 | 
			
		||||
                        <checkbox name="fileEnableSendfile" v-model="cachePolicy.options.enableSendfile"></checkbox>
 | 
			
		||||
                        <p class="comment"><pro-warning-label></pro-warning-label><plus-label></plus-label>使用sendfile提升发送缓存文件的效率。</p>
 | 
			
		||||
                    </td>
 | 
			
		||||
                </tr>
 | 
			
		||||
			</tbody>
 | 
			
		||||
 | 
			
		||||
@@ -83,6 +69,22 @@
 | 
			
		||||
			<tr>
 | 
			
		||||
				<td colspan="2"><more-options-indicator></more-options-indicator></td>
 | 
			
		||||
			</tr>
 | 
			
		||||
            <tbody v-show="moreOptionsVisible && policyType == 'file'">
 | 
			
		||||
                <tr>
 | 
			
		||||
                    <td class="color-border">缓存文件句柄缓存</td>
 | 
			
		||||
                    <td>
 | 
			
		||||
                        <input type="text" name="fileOpenFileCacheMax" v-model="fileOpenFileCacheMax" maxlength="6" value="0" style="width: 10em"/>
 | 
			
		||||
                        <p class="comment"><pro-warning-label></pro-warning-label>保持在内存中的缓存文件句柄的数量,提升缓存文件打开速度,建议数量不超过缓存文件数量的十分之一。</p>
 | 
			
		||||
                    </td>
 | 
			
		||||
                </tr>
 | 
			
		||||
                <tr v-show="teaIsPlus">
 | 
			
		||||
                    <td class="color-border">开启Sendfile</td>
 | 
			
		||||
                    <td>
 | 
			
		||||
                        <checkbox name="fileEnableSendfile" v-model="cachePolicy.options.enableSendfile"></checkbox>
 | 
			
		||||
                        <p class="comment"><pro-warning-label></pro-warning-label><plus-label></plus-label>使用sendfile提升发送缓存文件的效率。</p>
 | 
			
		||||
                    </td>
 | 
			
		||||
                </tr>
 | 
			
		||||
            </tbody>
 | 
			
		||||
			<tbody v-show="moreOptionsVisible">
 | 
			
		||||
                <tr>
 | 
			
		||||
                    <td>同步写入压缩缓存</td>
 | 
			
		||||
@@ -98,7 +100,7 @@
 | 
			
		||||
					</td>
 | 
			
		||||
				</tr>
 | 
			
		||||
				<tr>
 | 
			
		||||
					<td>是否启用</td>
 | 
			
		||||
					<td>启用当前策略</td>
 | 
			
		||||
					<td>
 | 
			
		||||
						<div class="ui checkbox">
 | 
			
		||||
							<input type="checkbox" name="isOn" value="1" v-model="cachePolicy.isOn"/>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user