* Add loading style for ajaxGetServiceStatus.

This commit is contained in:
tanghucheng
2023-01-03 09:44:18 +08:00
parent caa5450c97
commit fe30731334
6 changed files with 19 additions and 9 deletions
+2 -1
View File
@@ -13,6 +13,7 @@
.fail{color:red;}
.dot-symbol{padding-right:10px;}
#statusContainer{margin:0px 0px 10px 0px;}
#checkServiceStatus{background-color:unset;}
#checkServiceStatus{background-color: #ffffff;}
#checkServiceStatus:hover{background-color: #f0fdfb;}
.service-check{margin-top: 0px;}
.checkStatus{color: #313c52;}
+5
View File
@@ -1,6 +1,7 @@
ajaxGetServiceStatus();
function ajaxGetServiceStatus()
{
$('#serviceContent').addClass('loading');
$.get(createLink('zahost', 'ajaxGetServiceStatus', 'hostID=' + hostID), function(response)
{
var resultData = JSON.parse(response);
@@ -31,6 +32,10 @@ function ajaxGetServiceStatus()
$('.result .init-fail').addClass('hide')
$('.result .init-success').removeClass('hide')
}
setTimeout(function() {
$('#serviceContent').removeClass('loading');
}, 500);
});
return
+1 -1
View File
@@ -102,7 +102,7 @@
<?php echo $lang->zahost->init->statusTitle;?>
<button type='button' id='checkServiceStatus' class='btn btn-info'><i class="icon icon-refresh"></i> <span class='checkStatus'><?php echo $lang->zahost->init->checkStatus;?></span></button>
</div>
<div class="detail-content article-content">
<div class="detail-content article-content load-indicator" id='serviceContent'>
<div class="main-row">
<div id="statusContainer">
<div class="text-kvm"><span class="dot-symbol fail"> ●</span><span>KVM</span></div>
+3 -2
View File
@@ -12,6 +12,7 @@
.service-status{margin-top: 10px;}
.vnc-detail{height: 60vh;min-height: 550px;}
.vnc-mask{width: 100%;height:100%;background-color: rgba(0,0,0,0);position: absolute;z-index: 1;}
#checkServiceStatus{background-color:unset;}
#checkServiceStatus{background-color: #ffffff;}
#checkServiceStatus:hover{background-color: #f0fdfb;}
.checkStatus{color: #313c52;}
.node-not-wrap{white-space: nowrap;}
.node-not-wrap{white-space: nowrap;}
+5 -1
View File
@@ -2,6 +2,7 @@ var checkInterval;
var intervalTimes = 0;
$('#checkServiceStatus').click(function(){
$('#serviceContent').addClass('loading');
$.get(createLink('zanode', 'ajaxGetServiceStatus', 'nodeID=' + nodeID), function(response)
{
var resultData = JSON.parse(response);
@@ -91,6 +92,9 @@ $('#checkServiceStatus').click(function(){
$('.init-success').show();
// $('.init-fail').hide();
}
setTimeout(function() {
$('#serviceContent').removeClass('loading');
}, 500);
});
return
})
@@ -161,4 +165,4 @@ $(function(){
}
$('#checkServiceStatus').trigger("click")
}, 2000);
})
})
+3 -4
View File
@@ -110,7 +110,7 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou
</div>
</div>
</div>
<?php
$canBeChanged = common::canBeChanged('zanode', $zanode);
if ($canBeChanged) $actionFormLink = $this->createLink('action', 'comment', "objectType=zanode&objectID=$zanode->id");
@@ -122,7 +122,7 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou
<?php echo $lang->zanode->init->statusTitle; ?>
<button type='button' id='checkServiceStatus' class='btn btn-info'><i class="icon icon-refresh"></i> <span class='checkStatus'><?php echo $lang->zanode->init->checkStatus;?></span></button>
</div>
<div class="detail-content statusContainer">
<div class="detail-content statusContainer load-indicator" id='serviceContent'>
<div class="service-status">
<span class='dot-symbol dot-zenagent text-danger'>●</span>
<span>&nbsp;&nbsp;ZenAgent &nbsp;
@@ -139,7 +139,6 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou
<div class="status-notice">
<span class='init-success hide'><?php echo sprintf($lang->zanode->init->initSuccessNoticeTitle, "<a href='https://www.zentao.net/book/zentaopms/971.html'>{$lang->zanode->manual}</a>", html::a(helper::createLink('testcase', 'automation', "", '', true), $lang->zanode->automation, '', "class='iframe' title='{$lang->zanode->automation}' data-width='50%'", '')); ?></span>
<span class='init-fail hide'><?php echo $lang->zanode->init->initFailNoticeTitle . '<br/>' . $lang->zanode->init->initFailNoticeDesc;?></span>
</div>
</div>
</div>
@@ -200,4 +199,4 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou
<div id='mainActions' class='main-actions'>
<?php common::printPreAndNext($browseLink); ?>
</div>
<?php include '../../common/view/footer.html.php'; ?>
<?php include '../../common/view/footer.html.php'; ?>