Authored by 陈峰

Merge branch 'feature/hideModule' into 'master'

隐藏模块



See merge request !1
... ... @@ -23,12 +23,12 @@
</header>
<div class="gragh-box">
<section class="sct-s-p">
<section class="sct-s-p srv-item">
<h4>服务器列表</h4>
<div id="srvList" class="box srv-list-box">
</div>
</section>
<section class="sct-s-p">
<section class="sct-s-p pure-item">
<h4>服务器单项指标</h4>
<div class="pure-form top-box">
<select name="" id="srvTimeSelect">
... ...
{{#each .}}
<option value="{{.}}">{{.}}</option>
{{#if cluster}}
<option value="{{cluster}}" data-type="{{showDetail}}">{{cluster}}</option>
{{else}}
<option value="{{.}}" data-type="">{{.}}</option>
{{/if}}
{{/each}}
... ...
... ... @@ -128,8 +128,14 @@ class RedisLive extends Page {
if (this.hasRedisCluster) {
this.srvChange = true;
await this.srvListRender();
await this.srvGraphRender();
if (this.redisClusterType == false) {
$('.srv-item, .pure-item').slideUp();
} else {
$('.srv-item, .pure-item').slideDown();
await this.srvListRender();
await this.srvGraphRender();
}
this.cpRender();
this.mcRender();
this.epRender();
... ... @@ -175,7 +181,8 @@ class RedisLive extends Page {
if (redisClusterData && redisClusterData.length > 0) {
this.hasRedisCluster = true;
this.redisCluster = redisClusterData[0];
this.redisCluster = redisClusterData[0].cluster;
this.redisClusterType = redisClusterData[0].showDetail;
$('#clusterSelect').html(topSelectHbs(redisClusterData));
} else {
this.hasRedisCluster = false;
... ... @@ -448,7 +455,8 @@ class RedisLive extends Page {
this.hasRedisCluster = false;
}
this.redisCluster = redisClusterData[0];
this.redisCluster = redisClusterData[0].cluster;
this.redisClusterType = redisClusterData[0].showDetail;
$('#clusterSelect').html(topSelectHbs(redisClusterData));
this.srvChange = true;
... ... @@ -460,6 +468,7 @@ class RedisLive extends Page {
*/
clusterSelectChange() {
this.redisCluster = this.selector.clusterSelect.val();
this.redisClusterType = $("#clusterSelect option:selected").data('type');
this.srvChange = true;
this.refreshGraph();
}
... ... @@ -481,7 +490,7 @@ class RedisLive extends Page {
if (this.cloud) {
resResut = this.ajax({
url: '/redismonitor/getRedisCluster',
url: '/redismonitor/getRedisClusterNew',
data: {
cloud: this.cloud
}
... ... @@ -700,8 +709,14 @@ class RedisLive extends Page {
* 集中刷新数据
*/
async refreshGraph(srvChange) {
await this.srvListRender();
await this.srvGraphRender();
if (this.redisClusterType == false) {
$('.srv-item, .pure-item').slideUp();
} else {
$('.srv-item, .pure-item').slideDown();
await this.srvListRender();
await this.srvGraphRender();
}
this.cpRender();
this.mcRender();
this.epRender();
... ...