Merge branch 'zenops_46' into zenops_46_wangjianhua_68266

This commit is contained in:
wangjianhua
2022-09-15 20:24:19 +08:00
10 changed files with 305 additions and 292 deletions
+87 -86
View File
@@ -1,90 +1,91 @@
<?php
$lang->common = new stdclass();
$lang->index = new stdclass();
$lang->my = new stdclass();
$lang->todo = new stdclass();
$lang->program = new stdclass();
$lang->programplan = new stdclass();
$lang->product = new stdclass();
$lang->project = new stdclass();
$lang->design = new stdclass();
$lang->stage = new stdclass();
$lang->scrum = new stdclass();
$lang->waterfall = new stdclass();
$lang->execution = new stdclass();
$lang->kanban = new stdclass();
$lang->story = new stdclass();
$lang->requirement = new stdclass();
$lang->release = new stdclass();
$lang->branch = new stdclass();
$lang->productplan = new stdclass();
$lang->measurement = new stdclass();
$lang->review = new stdclass();
$lang->milestone = new stdclass();
$lang->qa = new stdclass();
$lang->doc = new stdclass();
$lang->system = new stdclass();
$lang->testcase = new stdclass();
$lang->testtask = new stdclass();
$lang->testreport = new stdclass();
$lang->score = new stdclass();
$lang->auditplan = new stdclass();
$lang->cm = new stdclass();
$lang->nc = new stdclass();
$lang->pssp = new stdclass();
$lang->stakeholder = new stdclass();
$lang->task = new stdclass();
$lang->build = new stdclass();
$lang->bug = new stdclass();
$lang->company = new stdclass();
$lang->dept = new stdclass();
$lang->group = new stdclass();
$lang->user = new stdclass();
$lang->report = new stdclass();
$lang->repo = new stdclass();
$lang->jenkins = new stdclass();
$lang->gitlab = new stdclass();
$lang->gitea = new stdclass();
$lang->gogs = new stdclass();
$lang->mr = new stdclass();
$lang->compile = new stdclass();
$lang->job = new stdclass();
$lang->svn = new stdclass();
$lang->git = new stdclass();
$lang->subject = new stdclass();
$lang->company = new stdclass();
$lang->admin = new stdclass();
$lang->convert = new stdclass();
$lang->upgrade = new stdclass();
$lang->action = new stdclass();
$lang->backup = new stdclass();
$lang->extension = new stdclass();
$lang->custom = new stdclass();
$lang->mail = new stdclass();
$lang->cron = new stdclass();
$lang->dev = new stdclass();
$lang->entry = new stdclass();
$lang->webhook = new stdclass();
$lang->message = new stdclass();
$lang->search = new stdclass();
$lang->devops = new stdclass();
$lang->team = new stdclass();
$lang->automation = new stdclass();
$lang->zahost = new stdclass();
$lang->personnel = new stdclass();
$lang->mail = new stdclass();
$lang->testsuite = new stdclass();
$lang->caselib = new stdclass();
$lang->ci = new stdclass();
$lang->datatable = new stdclass();
$lang->tree = new stdclass();
$lang->api = new stdclass();
$lang->file = new stdclass();
$lang->misc = new stdclass();
$lang->acl = new stdclass();
$lang->curd = new stdclass();
$lang->sonarqube = new stdclass();
$lang->app = new stdclass();
$lang->common = new stdclass();
$lang->index = new stdclass();
$lang->my = new stdclass();
$lang->todo = new stdclass();
$lang->program = new stdclass();
$lang->programplan = new stdclass();
$lang->product = new stdclass();
$lang->project = new stdclass();
$lang->design = new stdclass();
$lang->stage = new stdclass();
$lang->scrum = new stdclass();
$lang->waterfall = new stdclass();
$lang->execution = new stdclass();
$lang->kanban = new stdclass();
$lang->story = new stdclass();
$lang->requirement = new stdclass();
$lang->release = new stdclass();
$lang->branch = new stdclass();
$lang->productplan = new stdclass();
$lang->measurement = new stdclass();
$lang->review = new stdclass();
$lang->milestone = new stdclass();
$lang->qa = new stdclass();
$lang->doc = new stdclass();
$lang->system = new stdclass();
$lang->testcase = new stdclass();
$lang->testtask = new stdclass();
$lang->testreport = new stdclass();
$lang->score = new stdclass();
$lang->auditplan = new stdclass();
$lang->cm = new stdclass();
$lang->nc = new stdclass();
$lang->pssp = new stdclass();
$lang->stakeholder = new stdclass();
$lang->task = new stdclass();
$lang->build = new stdclass();
$lang->bug = new stdclass();
$lang->company = new stdclass();
$lang->dept = new stdclass();
$lang->group = new stdclass();
$lang->user = new stdclass();
$lang->report = new stdclass();
$lang->repo = new stdclass();
$lang->jenkins = new stdclass();
$lang->gitlab = new stdclass();
$lang->gitea = new stdclass();
$lang->gogs = new stdclass();
$lang->mr = new stdclass();
$lang->compile = new stdclass();
$lang->job = new stdclass();
$lang->svn = new stdclass();
$lang->git = new stdclass();
$lang->subject = new stdclass();
$lang->company = new stdclass();
$lang->admin = new stdclass();
$lang->convert = new stdclass();
$lang->upgrade = new stdclass();
$lang->action = new stdclass();
$lang->backup = new stdclass();
$lang->extension = new stdclass();
$lang->custom = new stdclass();
$lang->mail = new stdclass();
$lang->cron = new stdclass();
$lang->dev = new stdclass();
$lang->entry = new stdclass();
$lang->webhook = new stdclass();
$lang->message = new stdclass();
$lang->search = new stdclass();
$lang->devops = new stdclass();
$lang->team = new stdclass();
$lang->automation = new stdclass();
$lang->zahost = new stdclass();
$lang->executionnode = new stdclass();
$lang->personnel = new stdclass();
$lang->mail = new stdclass();
$lang->testsuite = new stdclass();
$lang->caselib = new stdclass();
$lang->ci = new stdclass();
$lang->datatable = new stdclass();
$lang->tree = new stdclass();
$lang->api = new stdclass();
$lang->file = new stdclass();
$lang->misc = new stdclass();
$lang->acl = new stdclass();
$lang->curd = new stdclass();
$lang->sonarqube = new stdclass();
$lang->app = new stdclass();
$lang->projectbuild = new stdclass();
$lang->projectrelease = new stdclass();
+47 -46
View File
@@ -156,52 +156,53 @@ $lang->code = 'Code';
$lang->pri = 'Priority';
$lang->delayed = 'Delayed';
$lang->common->common = 'Standard Module';
$lang->my->common = 'My';
$lang->program->common = 'Program';
$lang->product->common = 'Product';
$lang->project->common = 'Project';
$lang->execution->common = $config->systemMode == 'new' ? 'Execution' : $lang->executionCommon;
$lang->kanban->common = 'Kanban';
$lang->qa->common = 'QA';
$lang->devops->common = 'DevOps';
$lang->doc->common = 'Doc';
$lang->repo->common = 'Code';
$lang->report->common = 'Statistic';
$lang->system->common = 'System';
$lang->admin->common = 'Admin';
$lang->story->common = 'Story';
$lang->task->common = 'Task';
$lang->bug->common = 'Bug';
$lang->testcase->common = 'Testcase';
$lang->testtask->common = 'Request';
$lang->score->common = 'Score';
$lang->build->common = 'Build';
$lang->testreport->common = 'Report';
$lang->automation->common = 'Automation';
$lang->zahost->common = 'ZAhost';
$lang->team->common = 'Team';
$lang->user->common = 'User';
$lang->custom->common = 'Custom';
$lang->extension->common = 'Extension';
$lang->company->common = 'Company';
$lang->dept->common = 'Dept';
$lang->upgrade->common = 'Update';
$lang->program->list = 'Program List';
$lang->program->kanban = 'Program Kanban';
$lang->design->common = 'Design';
$lang->design->HLDS = 'HLDS';
$lang->design->DDS = 'DDS';
$lang->design->DBDS = 'DBDS';
$lang->design->ADS = 'ADS';
$lang->stage->common = 'Stage';
$lang->stage->list = 'Stage List';
$lang->execution->list = "{$lang->executionCommon} List";
$lang->kanban->common = 'Kanban';
$lang->backup->common = 'Backup';
$lang->action->trash = 'Recycle';
$lang->app->common = 'APP';
$lang->app->serverLink = 'Server Link';
$lang->common->common = 'Standard Module';
$lang->my->common = 'My';
$lang->program->common = 'Program';
$lang->product->common = 'Product';
$lang->project->common = 'Project';
$lang->execution->common = $config->systemMode == 'new' ? 'Execution' : $lang->executionCommon;
$lang->kanban->common = 'Kanban';
$lang->qa->common = 'QA';
$lang->devops->common = 'DevOps';
$lang->doc->common = 'Doc';
$lang->repo->common = 'Code';
$lang->report->common = 'Statistic';
$lang->system->common = 'System';
$lang->admin->common = 'Admin';
$lang->story->common = 'Story';
$lang->task->common = 'Task';
$lang->bug->common = 'Bug';
$lang->testcase->common = 'Testcase';
$lang->testtask->common = 'Request';
$lang->score->common = 'Score';
$lang->build->common = 'Build';
$lang->testreport->common = 'Report';
$lang->automation->common = 'Automation';
$lang->zahost->common = 'ZAhost';
$lang->executionnode->common = 'Execution Node';
$lang->team->common = 'Team';
$lang->user->common = 'User';
$lang->custom->common = 'Custom';
$lang->extension->common = 'Extension';
$lang->company->common = 'Company';
$lang->dept->common = 'Dept';
$lang->upgrade->common = 'Update';
$lang->program->list = 'Program List';
$lang->program->kanban = 'Program Kanban';
$lang->design->common = 'Design';
$lang->design->HLDS = 'HLDS';
$lang->design->DDS = 'DDS';
$lang->design->DBDS = 'DBDS';
$lang->design->ADS = 'ADS';
$lang->stage->common = 'Stage';
$lang->stage->list = 'Stage List';
$lang->execution->list = "{$lang->executionCommon} List";
$lang->kanban->common = 'Kanban';
$lang->backup->common = 'Backup';
$lang->action->trash = 'Recycle';
$lang->app->common = 'APP';
$lang->app->serverLink = 'Server Link';
$lang->personnel->common = 'Member';
$lang->personnel->invest = 'Investment';
+47 -46
View File
@@ -156,52 +156,53 @@ $lang->code = 'Code';
$lang->pri = 'Priority';
$lang->delayed = 'Delayed';
$lang->common->common = 'Common Module';
$lang->my->common = 'My';
$lang->program->common = 'Program';
$lang->product->common = 'Product';
$lang->project->common = 'Project';
$lang->execution->common = $config->systemMode == 'new' ? 'Execution' : $lang->executionCommon;
$lang->kanban->common = 'Kanban';
$lang->qa->common = 'QA';
$lang->devops->common = 'DevOps';
$lang->doc->common = 'Doc';
$lang->repo->common = 'Code';
$lang->report->common = 'Statistic';
$lang->system->common = 'System';
$lang->admin->common = 'Admin';
$lang->story->common = 'Story';
$lang->task->common = 'Task';
$lang->bug->common = 'Bug';
$lang->testcase->common = 'Testcase';
$lang->testtask->common = 'Request';
$lang->score->common = 'Score';
$lang->build->common = 'Build';
$lang->testreport->common = 'Report';
$lang->automation->common = 'Automation';
$lang->zahost->common = 'ZAhost';
$lang->team->common = 'Team';
$lang->user->common = 'User';
$lang->custom->common = 'Custom';
$lang->extension->common = 'Extension';
$lang->company->common = 'Company';
$lang->dept->common = 'Dept';
$lang->upgrade->common = 'Update';
$lang->program->list = 'Program List';
$lang->program->kanban = 'Program Kanban';
$lang->design->common = 'Design';
$lang->design->HLDS = 'Preliminary Design';
$lang->design->DDS = 'Detailed Design';
$lang->design->DBDS = 'Database Design';
$lang->design->ADS = 'Interface Design';
$lang->stage->common = 'Stage';
$lang->stage->list = 'Stage List';
$lang->execution->list = "{$lang->executionCommon} List";
$lang->kanban->common = 'Kanban';
$lang->backup->common = 'Backup';
$lang->action->trash = 'Recycle';
$lang->app->common = 'APP';
$lang->app->serverLink = 'Server Link';
$lang->common->common = 'Common Module';
$lang->my->common = 'My';
$lang->program->common = 'Program';
$lang->product->common = 'Product';
$lang->project->common = 'Project';
$lang->execution->common = $config->systemMode == 'new' ? 'Execution' : $lang->executionCommon;
$lang->kanban->common = 'Kanban';
$lang->qa->common = 'QA';
$lang->devops->common = 'DevOps';
$lang->doc->common = 'Doc';
$lang->repo->common = 'Code';
$lang->report->common = 'Statistic';
$lang->system->common = 'System';
$lang->admin->common = 'Admin';
$lang->story->common = 'Story';
$lang->task->common = 'Task';
$lang->bug->common = 'Bug';
$lang->testcase->common = 'Testcase';
$lang->testtask->common = 'Request';
$lang->score->common = 'Score';
$lang->build->common = 'Build';
$lang->testreport->common = 'Report';
$lang->automation->common = 'Automation';
$lang->zahost->common = 'ZAhost';
$lang->executionnode->common = 'Execution Node';
$lang->team->common = 'Team';
$lang->user->common = 'User';
$lang->custom->common = 'Custom';
$lang->extension->common = 'Extension';
$lang->company->common = 'Company';
$lang->dept->common = 'Dept';
$lang->upgrade->common = 'Update';
$lang->program->list = 'Program List';
$lang->program->kanban = 'Program Kanban';
$lang->design->common = 'Design';
$lang->design->HLDS = 'Preliminary Design';
$lang->design->DDS = 'Detailed Design';
$lang->design->DBDS = 'Database Design';
$lang->design->ADS = 'Interface Design';
$lang->stage->common = 'Stage';
$lang->stage->list = 'Stage List';
$lang->execution->list = "{$lang->executionCommon} List";
$lang->kanban->common = 'Kanban';
$lang->backup->common = 'Backup';
$lang->action->trash = 'Recycle';
$lang->app->common = 'APP';
$lang->app->serverLink = 'Server Link';
$lang->personnel->common = 'Member';
$lang->personnel->invest = 'Investment';
+47 -46
View File
@@ -156,52 +156,53 @@ $lang->code = 'Code';
$lang->pri = 'Priority';
$lang->delayed = 'Delayed';
$lang->common->common = 'Module Commun';
$lang->my->common = 'My';
$lang->program->common = 'Program';
$lang->product->common = 'Product';
$lang->project->common = 'Project';
$lang->execution->common = $config->systemMode == 'new' ? 'Execution' : $lang->executionCommon;
$lang->kanban->common = 'Kanban';
$lang->qa->common = 'QA';
$lang->devops->common = 'DevOps';
$lang->doc->common = 'Doc';
$lang->repo->common = 'Code';
$lang->report->common = 'Statistic';
$lang->system->common = 'System';
$lang->admin->common = 'Admin';
$lang->story->common = 'Story';
$lang->task->common = 'Task';
$lang->bug->common = 'Bug';
$lang->testcase->common = 'Testcase';
$lang->testtask->common = 'Request';
$lang->score->common = 'Score';
$lang->build->common = 'Build';
$lang->testreport->common = 'Report';
$lang->automation->common = 'Automation';
$lang->zahost->common = 'ZAhost';
$lang->team->common = 'Team';
$lang->user->common = 'User';
$lang->custom->common = 'Custom';
$lang->extension->common = 'Extension';
$lang->company->common = 'Company';
$lang->dept->common = 'Dept';
$lang->upgrade->common = 'Update';
$lang->program->list = 'Program List';
$lang->program->kanban = 'Program Kanban';
$lang->design->common = 'Design';
$lang->design->HLDS = 'HLDS';
$lang->design->DDS = 'DDS';
$lang->design->DBDS = 'DBDS';
$lang->design->ADS = 'ADS';
$lang->stage->common = 'Stage';
$lang->stage->list = 'Stage List';
$lang->execution->list = "{$lang->executionCommon} List";
$lang->kanban->common = 'Kanban';
$lang->backup->common = 'Backup';
$lang->action->trash = 'Recycle';
$lang->app->common = 'APP';
$lang->app->serverLink = 'Server Link';
$lang->common->common = 'Module Commun';
$lang->my->common = 'My';
$lang->program->common = 'Program';
$lang->product->common = 'Product';
$lang->project->common = 'Project';
$lang->execution->common = $config->systemMode == 'new' ? 'Execution' : $lang->executionCommon;
$lang->kanban->common = 'Kanban';
$lang->qa->common = 'QA';
$lang->devops->common = 'DevOps';
$lang->doc->common = 'Doc';
$lang->repo->common = 'Code';
$lang->report->common = 'Statistic';
$lang->system->common = 'System';
$lang->admin->common = 'Admin';
$lang->story->common = 'Story';
$lang->task->common = 'Task';
$lang->bug->common = 'Bug';
$lang->testcase->common = 'Testcase';
$lang->testtask->common = 'Request';
$lang->score->common = 'Score';
$lang->build->common = 'Build';
$lang->testreport->common = 'Report';
$lang->automation->common = 'Automation';
$lang->zahost->common = 'ZAhost';
$lang->executionnode->common = 'Execution Node';
$lang->team->common = 'Team';
$lang->user->common = 'User';
$lang->custom->common = 'Custom';
$lang->extension->common = 'Extension';
$lang->company->common = 'Company';
$lang->dept->common = 'Dept';
$lang->upgrade->common = 'Update';
$lang->program->list = 'Program List';
$lang->program->kanban = 'Program Kanban';
$lang->design->common = 'Design';
$lang->design->HLDS = 'HLDS';
$lang->design->DDS = 'DDS';
$lang->design->DBDS = 'DBDS';
$lang->design->ADS = 'ADS';
$lang->stage->common = 'Stage';
$lang->stage->list = 'Stage List';
$lang->execution->list = "{$lang->executionCommon} List";
$lang->kanban->common = 'Kanban';
$lang->backup->common = 'Backup';
$lang->action->trash = 'Recycle';
$lang->app->common = 'APP';
$lang->app->serverLink = 'Server Link';
$lang->personnel->common = 'Member';
$lang->personnel->invest = 'Investment';
+2 -1
View File
@@ -397,7 +397,8 @@ $lang->qa->menuOrder[40] = 'caselib';
$lang->qa->menuOrder[45] = 'zahost';
$lang->qa->menu->zahost['subMenu'] = new stdclass();
$lang->qa->menu->zahost['subMenu']->browse = array('link' => "{$lang->zahost->common}|zahost|browse", 'subModule' => 'zahost');
$lang->qa->menu->zahost['subMenu']->browse = array('link' => "{$lang->zahost->common}|zahost|browse", 'subModule' => 'zahost');
$lang->qa->menu->zahost['subMenu']->executionnode = array('link' => "{$lang->executionnode->common}|executionnode|browse", 'subModule' => 'executionnode');
// $lang->qa->menu->automation['subMenu'] = new stdclass();
// $lang->qa->menu->automation['subMenu']->browse = array('link' => "{$lang->automation->common}|zahost|browse", 'alias' => 'create');
+47 -46
View File
@@ -156,52 +156,53 @@ $lang->code = '代号';
$lang->pri = '优先级';
$lang->delayed = '已延期';
$lang->common->common = '公有模块';
$lang->my->common = '地盘';
$lang->program->common = '项目集';
$lang->product->common = '产品';
$lang->project->common = '项目';
$lang->execution->common = $config->systemMode == 'new' ? '执行' : $lang->executionCommon;
$lang->kanban->common = '看板';
$lang->qa->common = '测试';
$lang->devops->common = 'DevOps';
$lang->doc->common = '文档';
$lang->repo->common = '代码';
$lang->report->common = '统计';
$lang->system->common = '组织';
$lang->admin->common = '后台';
$lang->story->common = $lang->SRCommon;
$lang->task->common = '任务';
$lang->bug->common = 'Bug';
$lang->testcase->common = '用例';
$lang->testtask->common = '测试单';
$lang->score->common = '我的积分';
$lang->build->common = '版本';
$lang->testreport->common = '测试报告';
$lang->automation->common = '自动化';
$lang->zahost->common = '宿主机';
$lang->team->common = '团队';
$lang->user->common = '用户';
$lang->custom->common = '自定义';
$lang->extension->common = '插件';
$lang->company->common = '公司';
$lang->dept->common = '部门';
$lang->upgrade->common = '升级';
$lang->program->list = '项目集列表';
$lang->program->kanban = '项目集看板';
$lang->design->common = '设计';
$lang->design->HLDS = '概要设计';
$lang->design->DDS = '详细设计';
$lang->design->DBDS = '数据库设计';
$lang->design->ADS = '接口设计';
$lang->stage->common = '阶段';
$lang->stage->list = '阶段列表';
$lang->execution->list = "{$lang->executionCommon}列表";
$lang->kanban->common = '看板';
$lang->backup->common = '备份';
$lang->action->trash = '回收站';
$lang->app->common = '应用';
$lang->app->serverLink = '服务器链接';
$lang->common->common = '公有模块';
$lang->my->common = '地盘';
$lang->program->common = '项目集';
$lang->product->common = '产品';
$lang->project->common = '项目';
$lang->execution->common = $config->systemMode == 'new' ? '执行' : $lang->executionCommon;
$lang->kanban->common = '看板';
$lang->qa->common = '测试';
$lang->devops->common = 'DevOps';
$lang->doc->common = '文档';
$lang->repo->common = '代码';
$lang->report->common = '统计';
$lang->system->common = '组织';
$lang->admin->common = '后台';
$lang->story->common = $lang->SRCommon;
$lang->task->common = '任务';
$lang->bug->common = 'Bug';
$lang->testcase->common = '用例';
$lang->testtask->common = '测试单';
$lang->score->common = '我的积分';
$lang->build->common = '版本';
$lang->testreport->common = '测试报告';
$lang->automation->common = '自动化';
$lang->zahost->common = '宿主机';
$lang->executionnode->common = '执行节点';
$lang->team->common = '团队';
$lang->user->common = '用户';
$lang->custom->common = '自定义';
$lang->extension->common = '插件';
$lang->company->common = '公司';
$lang->dept->common = '部门';
$lang->upgrade->common = '升级';
$lang->program->list = '项目集列表';
$lang->program->kanban = '项目集看板';
$lang->design->common = '设计';
$lang->design->HLDS = '概要设计';
$lang->design->DDS = '详细设计';
$lang->design->DBDS = '数据库设计';
$lang->design->ADS = '接口设计';
$lang->stage->common = '阶段';
$lang->stage->list = '阶段列表';
$lang->execution->list = "{$lang->executionCommon}列表";
$lang->kanban->common = '看板';
$lang->backup->common = '备份';
$lang->action->trash = '回收站';
$lang->app->common = '应用';
$lang->app->serverLink = '服务器链接';
$lang->personnel->common = '人员';
$lang->personnel->invest = '投入人员';
+4 -1
View File
@@ -3,8 +3,11 @@ $config->zahost->create = new stdclass();
$config->zahost->create->requiredFields = 'name,hostType,publicIP,cpuCores,memory,diskSize,virtualSoftware,instanceNum';
$config->zahost->create->ipFields = 'publicIP';
$config->zahost->edit = new stdclass();
$config->zahost->edit->requiredFields = 'name,hostType,cpuCores,memory,diskSize,virtualSoftware,instanceNum';
$config->zahost->createtemplate = new stdclass();
$config->zahost->createtemplate->requiredFields = 'name,cpuCoreNum,memorySize,diskSize,osCategory,osType,osVersion,osLang,imageName';
$config->zahost->createtemplate->requiredFields = 'name,cpuCoreNum,memorySize,diskSize,osCategory,osType,osVersion,osLang';
$config->zahost->os = new stdClass();
$config->zahost->os->list = array();
+17 -4
View File
@@ -87,13 +87,12 @@ class zahostModel extends model
$oldHost = $this->getById($hostID);
$hostInfo = fixer::input('post')->get();
$this->dao->update(TABLE_HOST)->data($hostInfo)
$this->dao->update(TABLE_ZAHOST)->data($hostInfo)
->batchCheck($this->config->zahost->create->requiredFields, 'notempty')
->batchCheck('diskSize,memory', 'float');
if(dao::isError()) return false;
$assetInfo['name'] = $hostInfo->name;
$assetInfo['group'] = $hostInfo->group;
$assetInfo['editedBy'] = $this->app->user->account;
$assetInfo['editedDate'] = helper::now();
@@ -103,7 +102,10 @@ class zahostModel extends model
->exec();
if(dao::isError()) return false;
$this->dao->update(TABLE_HOST)->data($hostInfo, 'name')->autoCheck()->where('id')->eq($hostID)->exec();
$this->dao->update(TABLE_HOST)->data($hostInfo, 'name')->autoCheck()
->batchCheck('cpuCores,diskSize,instanceNum', 'gt', 0)
->batchCheck('diskSize,memory', 'float')
->where('id')->eq($hostID)->exec();
return common::createChanges($oldHost, $hostInfo);
}
@@ -281,11 +283,22 @@ class zahostModel extends model
$query = $this->session->vmTemplateQuery;
}
return $this->dao->select('*')->from(TABLE_VMTEMPLATE)
$templateList = $this->dao->select('*')->from(TABLE_VMTEMPLATE)
->where('hostID')->eq($hostID)
->beginIF($query)->andWhere($query)->fi()
->orderBy($orderBy)
->page($pager)
->fetchAll();
foreach($templateList as $template)
{
$template->unit = zget($this->lang->zahost->unitList, 'MB');
if($template->diskSize > 1024)
{
$template->diskSize = round($template->diskSize / 1024);
$template->unit = zget($this->lang->zahost->unitList, 'GB');
}
}
return $templateList;
}
}
+4 -13
View File
@@ -34,7 +34,7 @@
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->zahost->empty;?></span>
<?php if(common::hasPriv('host', 'create')) common::printLink('host', 'create', '', '<i class="icon icon-plus"></i> ' . $lang->zahost->create, '', 'class="btn btn-info"');?>
<?php if(common::hasPriv('zahost', 'create')) common::printLink('zahost', 'create', '', '<i class="icon icon-plus"></i> ' . $lang->zahost->create, '', 'class="btn btn-info"');?>
</p>
</div>
<?php else:?>
@@ -59,9 +59,9 @@
<tbody>
<?php foreach($hostList as $host):?>
<tr class='text-left'>
<td><?php printf('%03d', $host->id);?></td>
<td title='<?php echo $host->name?>'><?php echo common::hasPriv('zahost', 'browsetemplate') ? html::a($this->inlink('browsetemplate', "id=$host->id"), $host->name) : $host->name;?></td>
<td><?php echo zget($lang->zahost->zaHostType, $host->hostType);?></td>
<td><?php printf('%03d', $host->hostID);?></td>
<td title='<?php echo $host->name?>'><?php echo common::hasPriv('zahost', 'browsetemplate') ? html::a($this->inlink('browsetemplate', "id=$host->hostID"), $host->name) : $host->name;?></td>
<td><?php echo zget($lang->zahost->zaHostTypeList, $host->hostType);?></td>
<td><?php echo $host->publicIP;?></td>
<td><?php echo $host->cpuCores;?></td>
<td><?php echo $host->memory . $lang->zahost->unitList['GB'];?></td>
@@ -82,13 +82,4 @@
<?php endif;?>
</div>
</div>
<script>
$(function()
{
<?php if($browseType == 'bymodule'):?>
$('#module<?php echo $param?>').closest('li').addClass('active');
<?php endif;?>
if(browseType == 'bysearch') $.toggleQueryBox(true);
})
</script>
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
+3 -3
View File
@@ -27,7 +27,7 @@
</div>
<div id='queryBox' class='cell <?php if($browseType =='bysearch') echo 'show';?>' data-module='vmTemplate'></div>
<div id='mainContent' class='main-table'>
<?php $vars = "hostID=$hostID&browseType=all&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
<?php $vars = "hostID=$hostID&browseType=all&param=0&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
<?php if(empty($templateList)):?>
<div class="table-empty-tip">
<p>
@@ -56,8 +56,8 @@
<td><?php echo $template->id;?></td>
<td title="<?php echo $template->name;?>"><?php echo $template->name;?></td>
<td><?php echo $template->cpuCoreNum;?></td>
<td><?php echo $template->memorySize;?></td>
<td><?php echo $template->diskSize;?></td>
<td><?php echo $template->memorySize . zget($this->lang->zahost->unitList, 'GB');?></td>
<td><?php echo $template->diskSize . $template->unit;?></td>
<td><?php echo zget($config->zahost->os->list, $template->osCategory);?></td>
<td><?php echo zget($config->zahost->os->type[$template->osCategory], $template->osType);?></td>
<td><?php echo zget($lang->zahost->versionList[$template->osType], $template->osVersion);?></td>