* Finish task #79050.

This commit is contained in:
tanghucheng
2022-12-06 13:40:26 +08:00
parent b135baf56c
commit ee2fed7a28
12 changed files with 50 additions and 10 deletions
+2
View File
@@ -1,3 +1,5 @@
.c-ip {width: 100px;}
.c-memory, .c-diskSize, .c-status, .c-cpuCores, .c-software, .c-instanceNum {width: 90px;}
.c-datetime {width: 150px;}
.status-wait {color: #f00;}
.c-actions {overflow: visible!important;}
+5
View File
@@ -0,0 +1,5 @@
$('#hostList tr[data-status="wait"]').hover(function(){
$(this).find('.inithost').tooltip('toggle');
},function(){
$(this).find('.inithost').tooltip('hide');
});
+1
View File
@@ -96,6 +96,7 @@ $lang->zahost->image->cancelDownloadSuccess = 'Successed to cancel image task';
$lang->zahost->empty = 'No Host';
$lang->zahost->statusList['wait'] = 'Wait';
$lang->zahost->statusList['ready'] = 'Ready';
$lang->zahost->statusList['online'] = 'Online';
+2 -1
View File
@@ -88,7 +88,7 @@ $lang->zahost->image->statusList['inprogress'] = 'Inprogress';
$lang->zahost->image->statusList['completed'] = 'Completed';
$lang->zahost->image->statusList['failed'] = 'Failed';
$lang->zahost->image->imageEmpty = 'No Image';
$lang->zahost->image->imageEmpty = 'No Image';
$lang->zahost->image->downloadImageFail = 'Failed to create image task';
$lang->zahost->image->downloadImageSuccess = 'Successed to create image task';
$lang->zahost->image->cancelDownloadFail = 'Failed to cancel image task';
@@ -96,6 +96,7 @@ $lang->zahost->image->cancelDownloadSuccess = 'Successed to cancel image task';
$lang->zahost->empty = 'No Host';
$lang->zahost->statusList['wait'] = 'Wait';
$lang->zahost->statusList['ready'] = 'Ready';
$lang->zahost->statusList['online'] = 'Online';
+3 -2
View File
@@ -6,12 +6,12 @@ $lang->zahost->create = 'Add Host';
$lang->zahost->view = 'Host View';
$lang->zahost->init = 'Init Host';
$lang->zahost->edit = 'Éditer';
$lang->zahost->editAction = 'Edit Host';
$lang->zahost->delete = 'Delete';
$lang->zahost->cancel = "Cancel";
$lang->zahost->editAction = 'Éditer Hôte';
$lang->zahost->delete = 'Supprimer';
$lang->zahost->deleteAction = 'Supprimer Hôte';
$lang->zahost->byQuery = 'Recherche';
$lang->zahost->all = 'Tous les hôtes';
$lang->zahost->browseNode = 'ZAnode Browse';
$lang->zahost->deleted = "Deleted";
@@ -96,6 +96,7 @@ $lang->zahost->image->cancelDownloadSuccess = 'Successed to cancel image task';
$lang->zahost->empty = 'No Host';
$lang->zahost->statusList['wait'] = 'Wait';
$lang->zahost->statusList['ready'] = 'Ready';
$lang->zahost->statusList['online'] = 'Online';
+1
View File
@@ -96,6 +96,7 @@ $lang->zahost->image->cancelDownloadSuccess = '取消下载镜像任务成功';
$lang->zahost->empty = '暂时没有宿主机';
$lang->zahost->statusList['wait'] = '待初始化';
$lang->zahost->statusList['ready'] = '准备中';
$lang->zahost->statusList['online'] = '已上架';
+1
View File
@@ -37,6 +37,7 @@ class zahostModel extends model
$this->dao->table = 'zahost';
$hostInfo->type = 'zahost';
$hostInfo->status = 'wait';
$hostInfo->createdBy = $this->app->user->account;
$hostInfo->createdDate = helper::now();
$hostInfo->secret = md5($hostInfo->name . time());
+4 -4
View File
@@ -38,7 +38,7 @@
</p>
</div>
<?php else:?>
<table class='table has-sort-head table-fixed'>
<table class='table has-sort-head table-fixed' id='hostTable'>
<thead>
<tr>
<?php $vars = "browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
@@ -57,7 +57,7 @@
</thead>
<tbody>
<?php foreach($hostList as $host):?>
<tr class='text-left'>
<tr class='text-left' data-status="<?php echo $host->status;?>">
<td><?php printf('%03d', $host->hostID);?></td>
<td title='<?php echo $host->name?>'><?php echo html::a($this->inlink('view', "id=$host->hostID"), $host->name, '', "");?></td>
<td><?php echo zget($lang->zahost->zaHostTypeList, $host->hostType);?></td>
@@ -66,7 +66,7 @@
<td><?php echo $host->memory . $lang->zahost->unitList['GB'];?></td>
<td><?php echo $host->diskSize . $lang->zahost->unitList['GB'];?></td>
<td><?php echo $host->vsoft;?></td>
<td><?php echo zget($lang->host->statusList, $host->status);?></td>
<td class="status-<?php echo $host->status;?>"><?php echo zget($lang->host->statusList, $host->status);?></td>
<td><?php echo helper::isZeroDate($host->heartbeat) ? '' : $host->heartbeat;?></td>
<td class='c-actions'>
<?php $disabled = !empty($nodeList[$host->hostID]) ? '' : 'disabled';?>
@@ -74,7 +74,7 @@
<?php if(common::hasPriv('zahost', 'edit')) common::printIcon('zahost', 'edit', "hostID={$host->hostID}", $host, 'list');?>
<?php if(common::hasPriv('zahost', 'delete')) echo html::a($this->createLink('zahost', 'delete', "hostID={$host->id}"), '<i class="icon-trash"></i>', 'hiddenwin', "title='$title' class='btn $disabled'");;?>
<?php if(common::hasPriv('zahost', 'browseImage')) common::printIcon('zahost', 'browseImage', "hostID={$host->hostID}", $host, 'list', 'file', '', 'iframe', true, "data-width='60%'", $lang->zahost->image->list);?>
<?php if(common::hasPriv('zahost', 'initHost')) common::printIcon('zahost', 'initHost', "hostID={$host->hostID}", $host, 'list', 'info', '', '', false, '', $lang->zahost->initHost->title);?>
<?php if(common::hasPriv('zahost', 'initHost')) common::printIcon('zahost', 'initHost', "hostID={$host->hostID}", $host, 'list', 'info', '', ' inithost', false, "data-placement='bottom'", $lang->zahost->initHost->title);?>
</td>
</tr>
<?php endforeach;?>