Merge branch 'zenops_liyuchun_executionnode' into 'zenops_46'
* Finish task #68711. See merge request easycorp/zentaopms!5399
This commit is contained in:
+53
-50
@@ -248,8 +248,9 @@ define('TABLE_TESTRESULT', '`' . $config->db->prefix . 'testresult`');
|
||||
define('TABLE_USERTPL', '`' . $config->db->prefix . 'usertpl`');
|
||||
define('TABLE_ZAHOST', '`' . $config->db->prefix . 'host`');
|
||||
|
||||
if(!defined('TABLE_ASSET')) define('TABLE_ASSET', '`' . $config->db->prefix . 'asset`');
|
||||
if(!defined('TABLE_VMTEMPLATE')) define('TABLE_VMTEMPLATE', '`' . $config->db->prefix . 'vmtemplate`');
|
||||
if(!defined('TABLE_ASSET')) define('TABLE_ASSET', '`' . $config->db->prefix . 'asset`');
|
||||
if(!defined('TABLE_VMTEMPLATE')) define('TABLE_VMTEMPLATE', '`' . $config->db->prefix . 'vmtemplate`');
|
||||
if(!defined('TABLE_VM')) define('TABLE_VM', '`' . $config->db->prefix . 'vm`');
|
||||
|
||||
define('TABLE_PRODUCT', '`' . $config->db->prefix . 'product`');
|
||||
define('TABLE_BRANCH', '`' . $config->db->prefix . 'branch`');
|
||||
@@ -343,54 +344,56 @@ define('TABLE_CHART', '`' . $config->db->prefix . 'chart`');
|
||||
define('TABLE_DASHBOARD', '`' . $config->db->prefix . 'dashboard`');
|
||||
define('TABLE_DATASET', '`' . $config->db->prefix . 'dataset`');
|
||||
|
||||
$config->objectTables['product'] = TABLE_PRODUCT;
|
||||
$config->objectTables['productplan'] = TABLE_PRODUCTPLAN;
|
||||
$config->objectTables['story'] = TABLE_STORY;
|
||||
$config->objectTables['requirement'] = TABLE_STORY;
|
||||
$config->objectTables['release'] = TABLE_RELEASE;
|
||||
$config->objectTables['program'] = TABLE_PROJECT;
|
||||
$config->objectTables['project'] = TABLE_PROJECT;
|
||||
$config->objectTables['execution'] = TABLE_PROJECT;
|
||||
$config->objectTables['task'] = TABLE_TASK;
|
||||
$config->objectTables['build'] = TABLE_BUILD;
|
||||
$config->objectTables['bug'] = TABLE_BUG;
|
||||
$config->objectTables['case'] = TABLE_CASE;
|
||||
$config->objectTables['testcase'] = TABLE_CASE;
|
||||
$config->objectTables['testtask'] = TABLE_TESTTASK;
|
||||
$config->objectTables['testsuite'] = TABLE_TESTSUITE;
|
||||
$config->objectTables['testreport'] = TABLE_TESTREPORT;
|
||||
$config->objectTables['user'] = TABLE_USER;
|
||||
$config->objectTables['api'] = TABLE_API;
|
||||
$config->objectTables['doc'] = TABLE_DOC;
|
||||
$config->objectTables['doclib'] = TABLE_DOCLIB;
|
||||
$config->objectTables['todo'] = TABLE_TODO;
|
||||
$config->objectTables['custom'] = TABLE_LANG;
|
||||
$config->objectTables['branch'] = TABLE_BRANCH;
|
||||
$config->objectTables['module'] = TABLE_MODULE;
|
||||
$config->objectTables['caselib'] = TABLE_TESTSUITE;
|
||||
$config->objectTables['entry'] = TABLE_ENTRY;
|
||||
$config->objectTables['webhook'] = TABLE_WEBHOOK;
|
||||
$config->objectTables['stakeholder'] = TABLE_STAKEHOLDER;
|
||||
$config->objectTables['job'] = TABLE_JOB;
|
||||
$config->objectTables['team'] = TABLE_TEAM;
|
||||
$config->objectTables['pipeline'] = TABLE_PIPELINE;
|
||||
$config->objectTables['mr'] = TABLE_MR;
|
||||
$config->objectTables['kanban'] = TABLE_KANBAN;
|
||||
$config->objectTables['kanbanspace'] = TABLE_KANBANSPACE;
|
||||
$config->objectTables['kanbanregion'] = TABLE_KANBANREGION;
|
||||
$config->objectTables['kanbancolumn'] = TABLE_KANBANCOLUMN;
|
||||
$config->objectTables['kanbanlane'] = TABLE_KANBANLANE;
|
||||
$config->objectTables['kanbanorder'] = TABLE_KANBANORDER;
|
||||
$config->objectTables['kanbangroup'] = TABLE_KANBANGROUP;
|
||||
$config->objectTables['kanbancard'] = TABLE_KANBANCARD;
|
||||
$config->objectTables['sonarqube'] = TABLE_PIPELINE;
|
||||
$config->objectTables['gitea'] = TABLE_PIPELINE;
|
||||
$config->objectTables['gogs'] = TABLE_PIPELINE;
|
||||
$config->objectTables['gitlab'] = TABLE_PIPELINE;
|
||||
$config->objectTables['jebkins'] = TABLE_PIPELINE;
|
||||
$config->objectTables['stage'] = TABLE_STAGE;
|
||||
$config->objectTables['apistruct'] = TABLE_APISTRUCT;
|
||||
$config->objectTables['repo'] = TABLE_REPO;
|
||||
$config->objectTables['product'] = TABLE_PRODUCT;
|
||||
$config->objectTables['productplan'] = TABLE_PRODUCTPLAN;
|
||||
$config->objectTables['story'] = TABLE_STORY;
|
||||
$config->objectTables['requirement'] = TABLE_STORY;
|
||||
$config->objectTables['release'] = TABLE_RELEASE;
|
||||
$config->objectTables['program'] = TABLE_PROJECT;
|
||||
$config->objectTables['project'] = TABLE_PROJECT;
|
||||
$config->objectTables['execution'] = TABLE_PROJECT;
|
||||
$config->objectTables['task'] = TABLE_TASK;
|
||||
$config->objectTables['build'] = TABLE_BUILD;
|
||||
$config->objectTables['bug'] = TABLE_BUG;
|
||||
$config->objectTables['case'] = TABLE_CASE;
|
||||
$config->objectTables['testcase'] = TABLE_CASE;
|
||||
$config->objectTables['testtask'] = TABLE_TESTTASK;
|
||||
$config->objectTables['testsuite'] = TABLE_TESTSUITE;
|
||||
$config->objectTables['testreport'] = TABLE_TESTREPORT;
|
||||
$config->objectTables['user'] = TABLE_USER;
|
||||
$config->objectTables['api'] = TABLE_API;
|
||||
$config->objectTables['doc'] = TABLE_DOC;
|
||||
$config->objectTables['doclib'] = TABLE_DOCLIB;
|
||||
$config->objectTables['todo'] = TABLE_TODO;
|
||||
$config->objectTables['custom'] = TABLE_LANG;
|
||||
$config->objectTables['branch'] = TABLE_BRANCH;
|
||||
$config->objectTables['module'] = TABLE_MODULE;
|
||||
$config->objectTables['caselib'] = TABLE_TESTSUITE;
|
||||
$config->objectTables['entry'] = TABLE_ENTRY;
|
||||
$config->objectTables['webhook'] = TABLE_WEBHOOK;
|
||||
$config->objectTables['stakeholder'] = TABLE_STAKEHOLDER;
|
||||
$config->objectTables['job'] = TABLE_JOB;
|
||||
$config->objectTables['team'] = TABLE_TEAM;
|
||||
$config->objectTables['pipeline'] = TABLE_PIPELINE;
|
||||
$config->objectTables['mr'] = TABLE_MR;
|
||||
$config->objectTables['kanban'] = TABLE_KANBAN;
|
||||
$config->objectTables['kanbanspace'] = TABLE_KANBANSPACE;
|
||||
$config->objectTables['kanbanregion'] = TABLE_KANBANREGION;
|
||||
$config->objectTables['kanbancolumn'] = TABLE_KANBANCOLUMN;
|
||||
$config->objectTables['kanbanlane'] = TABLE_KANBANLANE;
|
||||
$config->objectTables['kanbanorder'] = TABLE_KANBANORDER;
|
||||
$config->objectTables['kanbangroup'] = TABLE_KANBANGROUP;
|
||||
$config->objectTables['kanbancard'] = TABLE_KANBANCARD;
|
||||
$config->objectTables['sonarqube'] = TABLE_PIPELINE;
|
||||
$config->objectTables['gitea'] = TABLE_PIPELINE;
|
||||
$config->objectTables['gogs'] = TABLE_PIPELINE;
|
||||
$config->objectTables['gitlab'] = TABLE_PIPELINE;
|
||||
$config->objectTables['jebkins'] = TABLE_PIPELINE;
|
||||
$config->objectTables['stage'] = TABLE_STAGE;
|
||||
$config->objectTables['apistruct'] = TABLE_APISTRUCT;
|
||||
$config->objectTables['repo'] = TABLE_REPO;
|
||||
$config->objectTables['zahost'] = TABLE_ZAHOST;
|
||||
$config->objectTables['executionnode'] = TABLE_VM;
|
||||
|
||||
$config->newFeatures = array('introduction', 'tutorial', 'youngBlueTheme', 'visions');
|
||||
|
||||
|
||||
@@ -10,3 +10,4 @@ ALTER TABLE `zt_vmtemplate` ADD `createdBy` varchar(30) NOT NULL;
|
||||
ALTER TABLE `zt_vmtemplate` ADD `createdDate` datetime NOT NULL;
|
||||
ALTER TABLE `zt_vmtemplate` ADD `editedBy` varchar(30) NOT NULL;
|
||||
ALTER TABLE `zt_vmtemplate` ADD `editedDate` datetime NOT NULL;
|
||||
ALTER TABLE `zt_vm` ADD `osVersion` varchar(50) NOT NULL DEFAULT '' AFTER `osCategory`;
|
||||
|
||||
@@ -7483,6 +7483,7 @@ CREATE TABLE IF NOT EXISTS `zt_vm` (
|
||||
`hostID` int(10) unsigned NOT NULL DEFAULT 0,
|
||||
`name` varchar(255) NOT NULL DEFAULT '',
|
||||
`osCategory` varchar(50) NOT NULL DEFAULT '',
|
||||
`osVersion` varchar(50) NOT NULL DEFAULT '',
|
||||
`osType` varchar(50) NOT NULL DEFAULT '',
|
||||
`osArch` varchar(50) NOT NULL DEFAULT '',
|
||||
`osLang` varchar(50) NOT NULL DEFAULT '',
|
||||
|
||||
+50
-49
@@ -1,53 +1,54 @@
|
||||
<?php
|
||||
$config->action->objectNameFields['product'] = 'name';
|
||||
$config->action->objectNameFields['story'] = 'title';
|
||||
$config->action->objectNameFields['requirement'] = 'title';
|
||||
$config->action->objectNameFields['productplan'] = 'title';
|
||||
$config->action->objectNameFields['release'] = 'name';
|
||||
$config->action->objectNameFields['program'] = 'name';
|
||||
$config->action->objectNameFields['project'] = 'name';
|
||||
$config->action->objectNameFields['execution'] = 'name';
|
||||
$config->action->objectNameFields['task'] = 'name';
|
||||
$config->action->objectNameFields['build'] = 'name';
|
||||
$config->action->objectNameFields['bug'] = 'title';
|
||||
$config->action->objectNameFields['testcase'] = 'title';
|
||||
$config->action->objectNameFields['case'] = 'title';
|
||||
$config->action->objectNameFields['testtask'] = 'name';
|
||||
$config->action->objectNameFields['user'] = 'account';
|
||||
$config->action->objectNameFields['api'] = 'title';
|
||||
$config->action->objectNameFields['doc'] = 'title';
|
||||
$config->action->objectNameFields['doclib'] = 'name';
|
||||
$config->action->objectNameFields['todo'] = 'name';
|
||||
$config->action->objectNameFields['branch'] = 'name';
|
||||
$config->action->objectNameFields['module'] = 'name';
|
||||
$config->action->objectNameFields['testsuite'] = 'name';
|
||||
$config->action->objectNameFields['caselib'] = 'name';
|
||||
$config->action->objectNameFields['testreport'] = 'title';
|
||||
$config->action->objectNameFields['entry'] = 'name';
|
||||
$config->action->objectNameFields['webhook'] = 'name';
|
||||
$config->action->objectNameFields['risk'] = 'name';
|
||||
$config->action->objectNameFields['issue'] = 'title';
|
||||
$config->action->objectNameFields['design'] = 'name';
|
||||
$config->action->objectNameFields['stakeholder'] = 'user';
|
||||
$config->action->objectNameFields['budget'] = 'name';
|
||||
$config->action->objectNameFields['job'] = 'name';
|
||||
$config->action->objectNameFields['team'] = 'name';
|
||||
$config->action->objectNameFields['pipeline'] = 'name';
|
||||
$config->action->objectNameFields['mr'] = 'title';
|
||||
$config->action->objectNameFields['reviewcl'] = 'title';
|
||||
$config->action->objectNameFields['kanbancolumn'] = 'name';
|
||||
$config->action->objectNameFields['kanbanlane'] = 'name';
|
||||
$config->action->objectNameFields['kanbanspace'] = 'name';
|
||||
$config->action->objectNameFields['kanbanregion'] = 'name';
|
||||
$config->action->objectNameFields['kanban'] = 'name';
|
||||
$config->action->objectNameFields['kanbancard'] = 'name';
|
||||
$config->action->objectNameFields['sonarqube'] = 'name';
|
||||
$config->action->objectNameFields['gitlab'] = 'name';
|
||||
$config->action->objectNameFields['gitea'] = 'name';
|
||||
$config->action->objectNameFields['gogs'] = 'name';
|
||||
$config->action->objectNameFields['stage'] = 'name';
|
||||
$config->action->objectNameFields['apistruct'] = 'name';
|
||||
$config->action->objectNameFields['repo'] = 'name';
|
||||
$config->action->objectNameFields['product'] = 'name';
|
||||
$config->action->objectNameFields['story'] = 'title';
|
||||
$config->action->objectNameFields['requirement'] = 'title';
|
||||
$config->action->objectNameFields['productplan'] = 'title';
|
||||
$config->action->objectNameFields['release'] = 'name';
|
||||
$config->action->objectNameFields['program'] = 'name';
|
||||
$config->action->objectNameFields['project'] = 'name';
|
||||
$config->action->objectNameFields['execution'] = 'name';
|
||||
$config->action->objectNameFields['task'] = 'name';
|
||||
$config->action->objectNameFields['build'] = 'name';
|
||||
$config->action->objectNameFields['bug'] = 'title';
|
||||
$config->action->objectNameFields['testcase'] = 'title';
|
||||
$config->action->objectNameFields['case'] = 'title';
|
||||
$config->action->objectNameFields['testtask'] = 'name';
|
||||
$config->action->objectNameFields['user'] = 'account';
|
||||
$config->action->objectNameFields['api'] = 'title';
|
||||
$config->action->objectNameFields['doc'] = 'title';
|
||||
$config->action->objectNameFields['doclib'] = 'name';
|
||||
$config->action->objectNameFields['todo'] = 'name';
|
||||
$config->action->objectNameFields['branch'] = 'name';
|
||||
$config->action->objectNameFields['module'] = 'name';
|
||||
$config->action->objectNameFields['testsuite'] = 'name';
|
||||
$config->action->objectNameFields['caselib'] = 'name';
|
||||
$config->action->objectNameFields['testreport'] = 'title';
|
||||
$config->action->objectNameFields['entry'] = 'name';
|
||||
$config->action->objectNameFields['webhook'] = 'name';
|
||||
$config->action->objectNameFields['risk'] = 'name';
|
||||
$config->action->objectNameFields['issue'] = 'title';
|
||||
$config->action->objectNameFields['design'] = 'name';
|
||||
$config->action->objectNameFields['stakeholder'] = 'user';
|
||||
$config->action->objectNameFields['budget'] = 'name';
|
||||
$config->action->objectNameFields['job'] = 'name';
|
||||
$config->action->objectNameFields['team'] = 'name';
|
||||
$config->action->objectNameFields['pipeline'] = 'name';
|
||||
$config->action->objectNameFields['mr'] = 'title';
|
||||
$config->action->objectNameFields['reviewcl'] = 'title';
|
||||
$config->action->objectNameFields['kanbancolumn'] = 'name';
|
||||
$config->action->objectNameFields['kanbanlane'] = 'name';
|
||||
$config->action->objectNameFields['kanbanspace'] = 'name';
|
||||
$config->action->objectNameFields['kanbanregion'] = 'name';
|
||||
$config->action->objectNameFields['kanban'] = 'name';
|
||||
$config->action->objectNameFields['kanbancard'] = 'name';
|
||||
$config->action->objectNameFields['sonarqube'] = 'name';
|
||||
$config->action->objectNameFields['gitlab'] = 'name';
|
||||
$config->action->objectNameFields['gitea'] = 'name';
|
||||
$config->action->objectNameFields['gogs'] = 'name';
|
||||
$config->action->objectNameFields['stage'] = 'name';
|
||||
$config->action->objectNameFields['apistruct'] = 'name';
|
||||
$config->action->objectNameFields['repo'] = 'name';
|
||||
$config->action->objectNameFields['executionnode'] = 'name';
|
||||
|
||||
$config->action->commonImgSize = 870;
|
||||
|
||||
|
||||
@@ -113,6 +113,7 @@ $lang->action->objectTypes['testtask'] = 'Test Build';
|
||||
$lang->action->objectTypes['testreport'] = 'Berichte';
|
||||
$lang->action->objectTypes['zahost'] = 'Host';
|
||||
$lang->action->objectTypes['vmtemplate'] = 'Virtual Host Template';
|
||||
$lang->action->objectTypes['executionnode'] = 'Execution Node';
|
||||
$lang->action->objectTypes['doc'] = 'Dok';
|
||||
$lang->action->objectTypes['api'] = 'Interface';
|
||||
$lang->action->objectTypes['doclib'] = 'Dok Bibliothek';
|
||||
@@ -225,6 +226,10 @@ $lang->action->desc->reopen = '$date, reopened by <strong>$actor</
|
||||
$lang->action->desc->merged = '$date, merged by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->submitreview = '$date, submitted for review by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->ganttmove = '$date, sort by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->suspend = '$date, the execution node is suspended by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->resume = '$date, the execution node is resumed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->reboot = '$date, the execution node is reboot by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->destroy = '$date, the execution node is destroyed by <strong>$actor</strong> .' . "\n";
|
||||
|
||||
/* Used to describe the history of operations related to parent-child tasks. */
|
||||
$lang->action->desc->createchildren = '$date, <strong>$actor</strong> created a child task <strong>$extra</strong>。' . "\n";
|
||||
@@ -392,6 +397,10 @@ $lang->action->label->tolib = 'imported';
|
||||
$lang->action->label->updatetolib = 'updated';
|
||||
$lang->action->label->ganttmove = 'sorted';
|
||||
$lang->action->label->submitreview = 'submitted';
|
||||
$lang->action->label->suspend = 'suspended';
|
||||
$lang->action->label->resume = 'resumed';
|
||||
$lang->action->label->reboot = 'reboot';
|
||||
$lang->action->label->destroy = 'destroyed';
|
||||
|
||||
/* Dynamic information is grouped by object. */
|
||||
$lang->action->dynamicAction = new stdclass;
|
||||
@@ -617,6 +626,12 @@ $lang->action->dynamicAction->zahost['created'] = 'Create Host';
|
||||
|
||||
$lang->action->dynamicAction->vmtemplate['created'] = 'Create Virtual Host Template';
|
||||
|
||||
$lang->action->dynamicAction->executionnode['created'] = 'Create Execution Node';
|
||||
$lang->action->dynamicAction->executionnode['suspend'] = 'Suspend Execution Node';
|
||||
$lang->action->dynamicAction->executionnode['resume'] = 'Resume Execution Node';
|
||||
$lang->action->dynamicAction->executionnode['reboot'] = 'Reboot Execution Node';
|
||||
$lang->action->dynamicAction->executionnode['destroy'] = 'Destory Execution Node';
|
||||
|
||||
$lang->action->dynamicAction->doclib['created'] = 'Create Doc Library';
|
||||
$lang->action->dynamicAction->doclib['edited'] = 'Edit Doc Library';
|
||||
$lang->action->dynamicAction->doclib['deleted'] = 'Delete Doc Library';
|
||||
|
||||
@@ -113,6 +113,7 @@ $lang->action->objectTypes['testtask'] = 'Test Build';
|
||||
$lang->action->objectTypes['testreport'] = 'Report';
|
||||
$lang->action->objectTypes['zahost'] = 'Host';
|
||||
$lang->action->objectTypes['vmtemplate'] = 'Virtual Host Template';
|
||||
$lang->action->objectTypes['executionnode'] = 'Execution Node';
|
||||
$lang->action->objectTypes['doc'] = 'Document';
|
||||
$lang->action->objectTypes['api'] = 'Interface';
|
||||
$lang->action->objectTypes['doclib'] = 'Document Library';
|
||||
@@ -225,6 +226,10 @@ $lang->action->desc->reopen = '$date, reopened by <strong>$actor</
|
||||
$lang->action->desc->merged = '$date, merged by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->submitreview = '$date, submitted for review by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->ganttmove = '$date, sort by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->suspend = '$date, the execution node is suspended by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->resume = '$date, the execution node is resumed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->reboot = '$date, the execution node is reboot by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->destroy = '$date, the execution node is destroyed by <strong>$actor</strong> .' . "\n";
|
||||
|
||||
/* Used to describe the history of operations related to parent-child tasks. */
|
||||
$lang->action->desc->createchildren = '$date, <strong>$actor</strong> created a child task <strong>$extra</strong>。' . "\n";
|
||||
@@ -392,6 +397,10 @@ $lang->action->label->tolib = 'imported';
|
||||
$lang->action->label->updatetolib = 'updated';
|
||||
$lang->action->label->ganttmove = 'sorted';
|
||||
$lang->action->label->submitreview = 'submitted';
|
||||
$lang->action->label->suspend = 'suspended';
|
||||
$lang->action->label->resume = 'resumed';
|
||||
$lang->action->label->reboot = 'reboot';
|
||||
$lang->action->label->destroy = 'destroyed';
|
||||
|
||||
/* Dynamic information is grouped by object. */
|
||||
$lang->action->dynamicAction = new stdclass;
|
||||
@@ -617,6 +626,12 @@ $lang->action->dynamicAction->zahost['created'] = 'Create Host';
|
||||
|
||||
$lang->action->dynamicAction->vmtemplate['created'] = 'Create Virtual Host Template';
|
||||
|
||||
$lang->action->dynamicAction->executionnode['created'] = 'Create Execution Node';
|
||||
$lang->action->dynamicAction->executionnode['suspend'] = 'Suspend Execution Node';
|
||||
$lang->action->dynamicAction->executionnode['resume'] = 'Resume Execution Node';
|
||||
$lang->action->dynamicAction->executionnode['reboot'] = 'Reboot Execution Node';
|
||||
$lang->action->dynamicAction->executionnode['destroy'] = 'Destory Execution Node';
|
||||
|
||||
$lang->action->dynamicAction->doclib['created'] = 'Create Doc Library';
|
||||
$lang->action->dynamicAction->doclib['edited'] = 'Edit Doc Library';
|
||||
$lang->action->dynamicAction->doclib['deleted'] = 'Delete Doc Library';
|
||||
|
||||
@@ -112,6 +112,7 @@ $lang->action->objectTypes['testsuite'] = 'Cahier recette';
|
||||
$lang->action->objectTypes['testtask'] = 'Recette';
|
||||
$lang->action->objectTypes['testreport'] = 'Edition';
|
||||
$lang->action->objectTypes['zahost'] = 'Host';
|
||||
$lang->action->objectTypes['executionnode'] = 'Execution Node';
|
||||
$lang->action->objectTypes['doc'] = 'Document';
|
||||
$lang->action->objectTypes['api'] = 'Interface';
|
||||
$lang->action->objectTypes['doclib'] = 'Répertoire Documents';
|
||||
@@ -224,6 +225,10 @@ $lang->action->desc->reopen = '$date, reopened by <strong>$actor</
|
||||
$lang->action->desc->merged = '$date, merged by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->submitreview = '$date, submitted for review by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->ganttmove = '$date, sort by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->suspend = '$date, the execution node is suspended by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->resume = '$date, the execution node is resumed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->reboot = '$date, the execution node is reboot by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->destroy = '$date, the execution node is destroyed by <strong>$actor</strong> .' . "\n";
|
||||
|
||||
/* Used to describe the history of operations related to parent-child tasks. */
|
||||
$lang->action->desc->createchildren = '$date, <strong>$actor</strong> a créé un sous-tâche <strong>$extra</strong>。' . "\n";
|
||||
@@ -391,6 +396,10 @@ $lang->action->label->tolib = 'Importé';
|
||||
$lang->action->label->updatetolib = 'MàJ';
|
||||
$lang->action->label->ganttmove = 'sorted';
|
||||
$lang->action->label->submitreview = 'submitted';
|
||||
$lang->action->label->suspend = 'suspended';
|
||||
$lang->action->label->resume = 'resumed';
|
||||
$lang->action->label->reboot = 'reboot';
|
||||
$lang->action->label->destroy = 'destroyed';
|
||||
|
||||
/* Dynamic information is grouped by object. */
|
||||
$lang->action->dynamicAction = new stdclass();
|
||||
@@ -616,6 +625,12 @@ $lang->action->dynamicAction->zahost['created'] = 'Create Host';
|
||||
|
||||
$lang->action->dynamicAction->vmtemplate['created'] = 'Create Virtual Host Template';
|
||||
|
||||
$lang->action->dynamicAction->executionnode['created'] = 'Create Execution Node';
|
||||
$lang->action->dynamicAction->executionnode['suspend'] = 'Suspend Execution Node';
|
||||
$lang->action->dynamicAction->executionnode['resume'] = 'Resume Execution Node';
|
||||
$lang->action->dynamicAction->executionnode['reboot'] = 'Reboot Execution Node';
|
||||
$lang->action->dynamicAction->executionnode['destroy'] = 'Destory Execution Node';
|
||||
|
||||
$lang->action->dynamicAction->doclib['created'] = 'Créer Doc Library';
|
||||
$lang->action->dynamicAction->doclib['edited'] = 'Editer Doc Library';
|
||||
$lang->action->dynamicAction->doclib['deleted'] = 'Delete Doc Library';
|
||||
|
||||
@@ -90,6 +90,7 @@ $lang->action->objectTypes['testtask'] = 'Test bản dựng';
|
||||
$lang->action->objectTypes['testreport'] = 'Báo cáo';
|
||||
$lang->action->objectTypes['zahost'] = 'Host';
|
||||
$lang->action->objectTypes['vmtemplate'] = 'Virtual Host Template';
|
||||
$lang->action->objectTypes['executionnode'] = 'Execution Node';
|
||||
$lang->action->objectTypes['doc'] = 'Tài liệu';
|
||||
$lang->action->objectTypes['doclib'] = 'Thư viện tài liệu';
|
||||
$lang->action->objectTypes['todo'] = 'Việc làm';
|
||||
@@ -186,6 +187,10 @@ $lang->action->desc->syncexecution = '$date, starting the task sets the execut
|
||||
$lang->action->desc->reopen = '$date, reopened by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->merged = '$date, merged by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->submitreview = '$date, submitted for review by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->suspend = '$date, the execution node is suspended by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->resume = '$date, the execution node is resumed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->reboot = '$date, the execution node is reboot by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->destroy = '$date, the execution node is destroyed by <strong>$actor</strong> .' . "\n";
|
||||
|
||||
/* Used to describe the history of operations related to parent-child tasks. */
|
||||
$lang->action->desc->createchildren = '$date, <strong>$actor</strong> created a child task <strong>$extra</strong>。' . "\n";
|
||||
@@ -308,6 +313,10 @@ $lang->action->label->syncproject = 'start';
|
||||
$lang->action->label->syncexecution = 'start';
|
||||
$lang->action->label->startProgram = '(The start of the project sets the status of the program as Ongoing)';
|
||||
$lang->action->label->submitreview = 'submitted';
|
||||
$lang->action->label->suspend = 'suspended';
|
||||
$lang->action->label->resume = 'resumed';
|
||||
$lang->action->label->reboot = 'reboot';
|
||||
$lang->action->label->destroy = 'destroyed';
|
||||
|
||||
/* Dynamic information is grouped by object. */
|
||||
$lang->action->dynamicAction = new stdclass;
|
||||
@@ -478,6 +487,12 @@ $lang->action->dynamicAction->zahost['created'] = 'Create Host';
|
||||
|
||||
$lang->action->dynamicAction->vmtemplate['created'] = 'Create Virtual Host Template';
|
||||
|
||||
$lang->action->dynamicAction->executionnode['created'] = 'Create Execution Node';
|
||||
$lang->action->dynamicAction->executionnode['suspend'] = 'Suspend Execution Node';
|
||||
$lang->action->dynamicAction->executionnode['resume'] = 'Resume Execution Node';
|
||||
$lang->action->dynamicAction->executionnode['reboot'] = 'Reboot Execution Node';
|
||||
$lang->action->dynamicAction->executionnode['destroy'] = 'Destory Execution Node';
|
||||
|
||||
$lang->action->dynamicAction->doclib['created'] = 'Tạo Doc thư viện';
|
||||
$lang->action->dynamicAction->doclib['edited'] = 'Sửa Doc thư viện';
|
||||
$lang->action->dynamicAction->doclib['deleted'] = 'Delete Doc Library';
|
||||
|
||||
@@ -113,6 +113,7 @@ $lang->action->objectTypes['testtask'] = '测试单';
|
||||
$lang->action->objectTypes['testreport'] = '报告';
|
||||
$lang->action->objectTypes['zahost'] = '宿主机';
|
||||
$lang->action->objectTypes['vmtemplate'] = '虚拟机模板';
|
||||
$lang->action->objectTypes['executionnode'] = '执行节点';
|
||||
$lang->action->objectTypes['doc'] = '文档';
|
||||
$lang->action->objectTypes['api'] = '接口';
|
||||
$lang->action->objectTypes['doclib'] = '文档库';
|
||||
@@ -225,6 +226,10 @@ $lang->action->desc->reopen = '$date, 由 <strong>$actor</strong>
|
||||
$lang->action->desc->merged = '$date, 由 <strong>$actor</strong> 合并。' . "\n";
|
||||
$lang->action->desc->submitreview = '$date, 由 <strong>$actor</strong> 提交评审。' . "\n";
|
||||
$lang->action->desc->ganttmove = '$date, 由 <strong>$actor</strong> 排序。' . "\n";
|
||||
$lang->action->desc->suspend = '$date, 由 <strong>$actor</strong> 暂停。' . "\n";
|
||||
$lang->action->desc->resume = '$date, 由 <strong>$actor</strong> 恢复。' . "\n";
|
||||
$lang->action->desc->reboot = '$date, 由 <strong>$actor</strong> 重启。' . "\n";
|
||||
$lang->action->desc->destroy = '$date, 由 <strong>$actor</strong> 销毁。' . "\n";
|
||||
|
||||
/* 用来描述和父子任务相关的操作历史记录。*/
|
||||
$lang->action->desc->createchildren = '$date, 由 <strong>$actor</strong> 创建子任务 <strong>$extra</strong>。' . "\n";
|
||||
@@ -392,6 +397,10 @@ $lang->action->label->tolib = '导入了';
|
||||
$lang->action->label->updatetolib = '更新了';
|
||||
$lang->action->label->ganttmove = '排序了';
|
||||
$lang->action->label->submitreview = '提交了评审';
|
||||
$lang->action->label->suspend = '暂停了';
|
||||
$lang->action->label->resume = '恢复了';
|
||||
$lang->action->label->reboot = '重启了';
|
||||
$lang->action->label->destroy = '销毁了';
|
||||
|
||||
/* 动态信息按照对象分组 */
|
||||
$lang->action->dynamicAction = new stdclass();
|
||||
@@ -617,6 +626,12 @@ $lang->action->dynamicAction->zahost['created'] = '创建宿主机';
|
||||
|
||||
$lang->action->dynamicAction->vmtemplate['created'] = '创建虚拟机模板';
|
||||
|
||||
$lang->action->dynamicAction->executionnode['created'] = '创建执行节点';
|
||||
$lang->action->dynamicAction->executionnode['suspend'] = '暂停执行节点';
|
||||
$lang->action->dynamicAction->executionnode['resume'] = '恢复执行节点';
|
||||
$lang->action->dynamicAction->executionnode['reboot'] = '重启执行节点';
|
||||
$lang->action->dynamicAction->executionnode['destroy'] = '销毁执行节点';
|
||||
|
||||
$lang->action->dynamicAction->doclib['created'] = '创建文档库';
|
||||
$lang->action->dynamicAction->doclib['edited'] = '编辑文档库';
|
||||
$lang->action->dynamicAction->doclib['deleted'] = '删除文档库';
|
||||
|
||||
+11
-11
@@ -651,17 +651,17 @@ $lang->navGroup->api = 'doc';
|
||||
|
||||
$lang->navGroup->report = 'report';
|
||||
|
||||
$lang->navGroup->qa = 'qa';
|
||||
$lang->navGroup->bug = 'qa';
|
||||
$lang->navGroup->testcase = 'qa';
|
||||
$lang->navGroup->testtask = 'qa';
|
||||
//$lang->navGroup->automation = 'qa';
|
||||
$lang->navGroup->zahost = 'qa';
|
||||
$lang->navGroup->testreport = 'qa';
|
||||
$lang->navGroup->testcase = 'qa';
|
||||
$lang->navGroup->testtask = 'qa';
|
||||
$lang->navGroup->testsuite = 'qa';
|
||||
$lang->navGroup->caselib = 'qa';
|
||||
$lang->navGroup->qa = 'qa';
|
||||
$lang->navGroup->bug = 'qa';
|
||||
$lang->navGroup->testcase = 'qa';
|
||||
$lang->navGroup->testtask = 'qa';
|
||||
$lang->navGroup->zahost = 'qa';
|
||||
$lang->navGroup->executionnode = 'qa';
|
||||
$lang->navGroup->testreport = 'qa';
|
||||
$lang->navGroup->testcase = 'qa';
|
||||
$lang->navGroup->testtask = 'qa';
|
||||
$lang->navGroup->testsuite = 'qa';
|
||||
$lang->navGroup->caselib = 'qa';
|
||||
|
||||
$lang->navGroup->devops = 'devops';
|
||||
$lang->navGroup->repo = 'devops';
|
||||
|
||||
Executable
+69
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
$config->executionnode->create = new stdClass();
|
||||
$config->executionnode->edit = new stdClass();
|
||||
$config->executionnode->create->requiredFields = 'name,hostID,templateID,osCpu,osMemory,osDisk';
|
||||
$config->executionnode->edit->requiredFields = '';
|
||||
|
||||
$config->executionnode->defaultPort = '8086';
|
||||
|
||||
$config->executionnode->os = new stdClass();
|
||||
$config->executionnode->os->list = array();
|
||||
$config->executionnode->os->list['windows'] = 'Windows';
|
||||
$config->executionnode->os->list['linux'] = 'Linux';
|
||||
|
||||
$config->executionnode->os->cpu = array();
|
||||
$config->executionnode->os->cpu['1'] = '1';
|
||||
$config->executionnode->os->cpu['2'] = '2';
|
||||
$config->executionnode->os->cpu['4'] = '4';
|
||||
$config->executionnode->os->cpu['6'] = '6';
|
||||
$config->executionnode->os->cpu['8'] = '8';
|
||||
$config->executionnode->os->cpu['12'] = '12';
|
||||
$config->executionnode->os->cpu['16'] = '16';
|
||||
|
||||
$config->executionnode->os->memory = array();
|
||||
$config->executionnode->os->memory['512'] = '512MB';
|
||||
$config->executionnode->os->memory['1024'] = '1GB';
|
||||
$config->executionnode->os->memory['2048'] = '2GB';
|
||||
$config->executionnode->os->memory['4096'] = '4GB';
|
||||
$config->executionnode->os->memory['9120'] = '8GB';
|
||||
$config->executionnode->os->memory['16384'] = '16GB';
|
||||
|
||||
$config->executionnode->os->disk = array();
|
||||
$config->executionnode->os->disk['10240'] = '10GB';
|
||||
$config->executionnode->os->disk['20480'] = '20GB';
|
||||
$config->executionnode->os->disk['40960'] = '40GB';
|
||||
$config->executionnode->os->disk['61440'] = '60GB';
|
||||
$config->executionnode->os->disk['81920'] = '80GB';
|
||||
$config->executionnode->os->disk['102400'] = '100GB';
|
||||
$config->executionnode->os->disk['204800'] = '200GB';
|
||||
$config->executionnode->os->disk['307200'] = '300GB';
|
||||
|
||||
$config->executionnode->os->type = array();
|
||||
$config->executionnode->os->type['windows']['winServer'] = 'Windows Server';
|
||||
$config->executionnode->os->type['windows']['win11'] = 'Windows 11';
|
||||
$config->executionnode->os->type['windows']['win10'] = 'Windows 10';
|
||||
$config->executionnode->os->type['windows']['win7'] = 'Windows 7';
|
||||
$config->executionnode->os->type['windows']['winxp'] = 'Windows XP';
|
||||
$config->executionnode->os->type['linux']['ubuntu'] = 'Ubuntu';
|
||||
$config->executionnode->os->type['linux']['centos'] = 'CentOS';
|
||||
$config->executionnode->os->type['linux']['debian'] = 'Debian';
|
||||
|
||||
global $lang;
|
||||
$config->executionnode->search['module'] = 'vm';
|
||||
$config->executionnode->search['fields']['name'] = $lang->executionnode->name;
|
||||
$config->executionnode->search['fields']['osType'] = $lang->executionnode->osType;
|
||||
$config->executionnode->search['fields']['osVersion'] = $lang->executionnode->osVersion;
|
||||
$config->executionnode->search['fields']['hostID'] = $lang->executionnode->hostName;
|
||||
$config->executionnode->search['fields']['status'] = $lang->executionnode->status;
|
||||
$config->executionnode->search['fields']['osCpu'] = $lang->executionnode->cpu;
|
||||
$config->executionnode->search['fields']['osMemory'] = $lang->executionnode->memory;
|
||||
$config->executionnode->search['fields']['osDisk'] = $lang->executionnode->disk;
|
||||
$config->executionnode->search['fields']['macAddress'] = $lang->executionnode->macAddress;
|
||||
$config->executionnode->search['fields']['publicIP'] = $lang->executionnode->ip;
|
||||
$config->executionnode->search['params']['name'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
|
||||
$config->executionnode->search['params']['osType'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $config->executionnode->os->type['windows'] + $config->executionnode->os->type['linux']);
|
||||
$config->executionnode->search['params']['hostID'] = array('operator' => '=', 'control' => 'select', 'values' => '');
|
||||
$config->executionnode->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $lang->executionnode->statusList);
|
||||
$config->executionnode->search['params']['osCpu'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $config->executionnode->os->cpu);
|
||||
$config->executionnode->search['params']['osMemory'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $config->executionnode->os->memory);
|
||||
$config->executionnode->search['params']['osDisk'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $config->executionnode->os->disk);
|
||||
Executable
+207
@@ -0,0 +1,207 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of execution node of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2022 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author liyuchun <liyuchun@easycorp.ltd>
|
||||
* @package qa
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class executionnode extends control
|
||||
{
|
||||
|
||||
/**
|
||||
* Browse execution node page.
|
||||
*
|
||||
* @param string $browseType
|
||||
* @param string $param
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browse($browseType = 'all', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$browseType = strtolower($browseType);
|
||||
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
|
||||
|
||||
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
|
||||
$pager = pager::init($recTotal, $recPerPage, $pageID);
|
||||
$nodeList = $this->executionnode->getListByQuery($browseType, $queryID, $orderBy, $pager);
|
||||
$hosts = $this->loadModel('zahost')->getPairs('host');
|
||||
|
||||
/* Build the search form. */
|
||||
$actionURL = $this->createLink('executionnode', 'browse', "browseType=bySearch&queryID=myQueryID");
|
||||
$this->config->executionnode->search['actionURL'] = $actionURL;
|
||||
$this->config->executionnode->search['queryID'] = $queryID;
|
||||
$this->config->executionnode->search['onMenuBar'] = 'no';
|
||||
$this->config->executionnode->search['params']['hostID']['values'] = array('' => '') + $hosts;
|
||||
$this->loadModel('search')->setSearchParams($this->config->executionnode->search);
|
||||
|
||||
$this->view->title = $this->lang->executionnode->common;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|nodeleted');
|
||||
$this->view->nodeList = $nodeList;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->param = $param;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->browseType = $browseType;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create node page.
|
||||
*
|
||||
* @param int $templateID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->executionnode->create();
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse')));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->executionnode->create;
|
||||
$this->view->hostPairs = $this->loadModel('zahost')->getPairs('host');
|
||||
|
||||
return $this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* View VM.
|
||||
*
|
||||
* @param int $id
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function view($id)
|
||||
{
|
||||
$this->view->title = $this->lang->executionnode->view;
|
||||
$this->view->node = $this->executionnode->getVMByID($id);
|
||||
$this->view->actions = $this->loadModel('action')->getList('executionnode', $id);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Suspend VM.
|
||||
*
|
||||
* @param int $nodeID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function suspend($nodeID)
|
||||
{
|
||||
$this->handleVM($nodeID, 'suspend');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reboot VM.
|
||||
*
|
||||
* @param int $nodeID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function reboot($nodeID)
|
||||
{
|
||||
$this->handleVM($nodeID, 'reboot');
|
||||
}
|
||||
|
||||
/**
|
||||
* Resume VM.
|
||||
*
|
||||
* @param int $nodeID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function resume($nodeID)
|
||||
{
|
||||
$this->handleVM($nodeID, 'resume');
|
||||
}
|
||||
|
||||
/**
|
||||
* Boot node.
|
||||
*
|
||||
* @param int $nodeID
|
||||
* @param string $type
|
||||
* @return void
|
||||
*/
|
||||
public function handleVM($nodeID, $type)
|
||||
{
|
||||
$error = $this->executionnode->handleVM($nodeID, $type);
|
||||
|
||||
if($error)
|
||||
{
|
||||
return print(js::error($error));
|
||||
}
|
||||
else
|
||||
{
|
||||
return print(js::alert($this->lang->executionnode->actionSuccess) . js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Desctroy node.
|
||||
*
|
||||
* @param int $nodeID
|
||||
* @return void
|
||||
*/
|
||||
public function destroy($nodeID)
|
||||
{
|
||||
$error = $this->executionnode->destroy($nodeID);
|
||||
|
||||
if($error)
|
||||
{
|
||||
return print(js::alert($error));
|
||||
}
|
||||
else
|
||||
{
|
||||
if(isonlybody()) return print(js::alert($this->lang->executionnode->actionSuccess) . js::reload('parent.parent'));
|
||||
return print(js::alert($this->lang->executionnode->actionSuccess) . js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get template pairs by api.
|
||||
*
|
||||
* @param int $hostID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetTemplates($hostID)
|
||||
{
|
||||
$templatePairs = $this->loadModel('zahost')->getTemplatePairs($hostID);
|
||||
return print(html::select('templateID', $templatePairs, '', "class='form-control chosen'"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get template info.
|
||||
*
|
||||
* @param int $templateID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetTemplateInfo($templateID)
|
||||
{
|
||||
$template = $this->loadModel('zahost')->getTemplateByID($templateID);
|
||||
if($template)
|
||||
{
|
||||
$template->osCategoryName = zget($this->config->zahost->os->list, $template->osCategory);
|
||||
$template->osTypeName = zget($this->config->zahost->os->type[$template->osCategory], $template->osType);
|
||||
$template->osVersionName = zget($this->lang->zahost->versionList[$template->osType], $template->osVersion);
|
||||
$template->osLangName = zget($this->lang->zahost->langList, $template->osLang);
|
||||
}
|
||||
return print(json_encode($template));
|
||||
}
|
||||
}
|
||||
Executable
Executable
+33
@@ -0,0 +1,33 @@
|
||||
$(function()
|
||||
{
|
||||
if(config.currentMethod == 'create') $('#hostID').change();
|
||||
|
||||
$('#hostID').change(function()
|
||||
{
|
||||
var hostID = $('#hostID').val();
|
||||
var link = createLink('executionnode', 'ajaxGetTemplates', 'hostID=' + hostID);
|
||||
$.get(link, function(data)
|
||||
{
|
||||
$('#template').html('').append(data);
|
||||
$('#templateID').chosen().trigger("chosen:updated");
|
||||
$('#templateID').change();
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on("change", '#templateID', function()
|
||||
{
|
||||
var templateID = $('#templateID').val();
|
||||
var link = createLink('executionnode', 'ajaxGetTemplateInfo', 'templateID=' + templateID);
|
||||
$.get(link, function(data)
|
||||
{
|
||||
data = JSON.parse(data);
|
||||
console.log(data);
|
||||
$('#osCategory').val(data.osCategoryName);
|
||||
$('#osType').val(data.osTypeName);
|
||||
$('#osVersion').val(data.osVersionName);
|
||||
$('#osLang').val(data.osLangName);
|
||||
});
|
||||
});
|
||||
|
||||
if(typeof templateID == 'undefined' || !templateID) $('#osCategory').change();
|
||||
})
|
||||
Executable
+96
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
$lang->executionnode->common = 'Execution Node';
|
||||
$lang->executionnode->browse = 'Execution Node List';
|
||||
$lang->executionnode->create = 'Create Execution Node';
|
||||
$lang->executionnode->view = 'View Execution Node';
|
||||
$lang->executionnode->suspend = 'Suspend Execution Node';
|
||||
$lang->executionnode->destroy = 'Destroy Execution Node';
|
||||
$lang->executionnode->handleVM = 'Restart Execution Node';
|
||||
$lang->executionnode->boot = 'Start Execution Node';
|
||||
$lang->executionnode->reboot = 'Restart Execution Node';
|
||||
$lang->executionnode->shutdown = 'Shutdown Execution Node';
|
||||
$lang->executionnode->resume = 'Resume Execution Node';
|
||||
$lang->executionnode->getVNC = 'Remote management';
|
||||
$lang->executionnode->all = 'All';
|
||||
$lang->executionnode->byQuery = 'Search';
|
||||
$lang->executionnode->osCategory = 'System';
|
||||
$lang->executionnode->osType = 'Os Version';
|
||||
$lang->executionnode->osVersion = 'Os Version No';
|
||||
$lang->executionnode->vmTemplate = 'VM Template';
|
||||
$lang->executionnode->name = 'Name';
|
||||
$lang->executionnode->start = 'Start After Created';
|
||||
$lang->executionnode->hostName = 'Host Name';
|
||||
$lang->executionnode->ip = 'IP';
|
||||
$lang->executionnode->osArch = 'Arch';
|
||||
$lang->executionnode->osLang = 'Language';
|
||||
$lang->executionnode->cpu = 'CPU Cores';
|
||||
$lang->executionnode->memory = 'Memory Size';
|
||||
$lang->executionnode->disk = 'Disk Size';
|
||||
$lang->executionnode->status = 'Status';
|
||||
$lang->executionnode->macAddress = 'MAC';
|
||||
$lang->executionnode->vnc = 'VNC Port';
|
||||
$lang->executionnode->destroyAt = 'Destroy Time';
|
||||
$lang->executionnode->creater = 'Creator';
|
||||
$lang->executionnode->createdDate = 'Create Date';
|
||||
$lang->executionnode->template = 'Template';
|
||||
$lang->executionnode->templateID = 'VM Template';
|
||||
$lang->executionnode->templateList = 'TemplateList';
|
||||
$lang->executionnode->confirmDelete = "Are you sure about destroying the execution node?";
|
||||
$lang->executionnode->confirmBoot = "Are you sure to start the execution node?";
|
||||
$lang->executionnode->confirmReboot = "Are you sure to restart the execution node?";
|
||||
$lang->executionnode->confirmShutdown = "Are you sure to shutdown the execution node?";
|
||||
$lang->executionnode->confirmSuspend = "Are you sure to suspend the execution node?";
|
||||
$lang->executionnode->confirmResume = "Are you sure to resume the execution node?";
|
||||
$lang->executionnode->actionSuccess = 'Success';
|
||||
|
||||
$lang->executionnode->notFoundAgent = 'No Agent service is found';
|
||||
$lang->executionnode->createVmFail = 'Failed to create a execution node';
|
||||
$lang->executionnode->noVncPort = 'Failed to get vnc port';
|
||||
$lang->executionnode->nameValid = "The name can only be letters, numbers, '-', '_', '.', and cannot start with a symbol";
|
||||
|
||||
$lang->executionnode->empty = 'No Execution Node';
|
||||
$lang->executionnode->templateEmpty = 'No Template';
|
||||
|
||||
$lang->executionnode->publicList[0] = 'Private';
|
||||
$lang->executionnode->publicList[1] = 'Public';
|
||||
|
||||
$lang->executionnode->statusList['created'] = 'Created';
|
||||
$lang->executionnode->statusList['launch'] = 'Launch';
|
||||
$lang->executionnode->statusList['ready'] = 'Ready';
|
||||
$lang->executionnode->statusList['running'] = 'Running';
|
||||
$lang->executionnode->statusList['suspend'] = 'Suspend';
|
||||
$lang->executionnode->statusList['destroy'] = 'Destroyed';
|
||||
$lang->executionnode->statusList['destroy_fail'] = 'Destroy Fail';
|
||||
|
||||
$lang->executionnode->versionList = array();
|
||||
$lang->executionnode->versionList['winxp']['all'] = 'Windows XP';
|
||||
$lang->executionnode->versionList['win7']['home'] = 'Home Basic';
|
||||
$lang->executionnode->versionList['win7']['professional'] = 'Professional';
|
||||
$lang->executionnode->versionList['win7']['enterprise'] = 'Enterprise';
|
||||
$lang->executionnode->versionList['win7']['ultimate'] = 'Ultimate';
|
||||
$lang->executionnode->versionList['win10']['home'] = 'Home Basic';
|
||||
$lang->executionnode->versionList['win10']['professional'] = 'Professional';
|
||||
$lang->executionnode->versionList['win10']['enterprise'] = 'Enterprise';
|
||||
$lang->executionnode->versionList['win10']['ultimate'] = 'Ultimate';
|
||||
$lang->executionnode->versionList['win11']['home'] = 'Home Basic';
|
||||
$lang->executionnode->versionList['win11']['professional'] = 'Professional';
|
||||
$lang->executionnode->versionList['win11']['enterprise'] = 'Enterprise';
|
||||
$lang->executionnode->versionList['win11']['ultimate'] = 'Ultimate';
|
||||
$lang->executionnode->versionList['winServer']['2008'] = '2008';
|
||||
$lang->executionnode->versionList['winServer']['2012'] = '2012';
|
||||
$lang->executionnode->versionList['winServer']['2016'] = '2016';
|
||||
$lang->executionnode->versionList['winServer']['2019'] = '2019';
|
||||
$lang->executionnode->versionList['debian']['9'] = '9';
|
||||
$lang->executionnode->versionList['debian']['10'] = '10';
|
||||
$lang->executionnode->versionList['debian']['11'] = '11';
|
||||
$lang->executionnode->versionList['ubuntu']['16'] = '16';
|
||||
$lang->executionnode->versionList['ubuntu']['18'] = '18';
|
||||
$lang->executionnode->versionList['ubuntu']['20'] = '20';
|
||||
$lang->executionnode->versionList['centos']['6'] = '6';
|
||||
$lang->executionnode->versionList['centos']['7'] = '7';
|
||||
$lang->executionnode->versionList['centos']['8'] = '8';
|
||||
|
||||
$lang->executionnode->langList = array();
|
||||
$lang->executionnode->langList['zh_cn'] = 'Simplified Chinese';
|
||||
$lang->executionnode->langList['zh_tw'] = 'Traditional Chinese';
|
||||
$lang->executionnode->langList['en_us'] = 'American English';
|
||||
Executable
+96
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
$lang->executionnode->common = 'Execution Node';
|
||||
$lang->executionnode->browse = 'Execution Node List';
|
||||
$lang->executionnode->create = 'Create Execution Node';
|
||||
$lang->executionnode->view = 'View Execution Node';
|
||||
$lang->executionnode->suspend = 'Suspend Execution Node';
|
||||
$lang->executionnode->destroy = 'Destroy Execution Node';
|
||||
$lang->executionnode->handleVM = 'Restart Execution Node';
|
||||
$lang->executionnode->boot = 'Start Execution Node';
|
||||
$lang->executionnode->reboot = 'Restart Execution Node';
|
||||
$lang->executionnode->shutdown = 'Shutdown Execution Node';
|
||||
$lang->executionnode->resume = 'Resume Execution Node';
|
||||
$lang->executionnode->getVNC = 'Remote management';
|
||||
$lang->executionnode->all = 'All';
|
||||
$lang->executionnode->byQuery = 'Search';
|
||||
$lang->executionnode->osCategory = 'System';
|
||||
$lang->executionnode->osType = 'Os Version';
|
||||
$lang->executionnode->osVersion = 'Os Version No';
|
||||
$lang->executionnode->vmTemplate = 'VM Template';
|
||||
$lang->executionnode->name = 'Name';
|
||||
$lang->executionnode->start = 'Start After Created';
|
||||
$lang->executionnode->hostName = 'Host Name';
|
||||
$lang->executionnode->ip = 'IP';
|
||||
$lang->executionnode->osArch = 'Arch';
|
||||
$lang->executionnode->osLang = 'Language';
|
||||
$lang->executionnode->cpu = 'CPU Cores';
|
||||
$lang->executionnode->memory = 'Memory Size';
|
||||
$lang->executionnode->disk = 'Disk Size';
|
||||
$lang->executionnode->status = 'Status';
|
||||
$lang->executionnode->macAddress = 'MAC';
|
||||
$lang->executionnode->vnc = 'VNC Port';
|
||||
$lang->executionnode->destroyAt = 'Destroy Time';
|
||||
$lang->executionnode->creater = 'Creator';
|
||||
$lang->executionnode->createdDate = 'Create Date';
|
||||
$lang->executionnode->template = 'Template';
|
||||
$lang->executionnode->templateID = 'VM Template';
|
||||
$lang->executionnode->templateList = 'TemplateList';
|
||||
$lang->executionnode->confirmDelete = "Are you sure about destroying the execution node?";
|
||||
$lang->executionnode->confirmBoot = "Are you sure to start the execution node?";
|
||||
$lang->executionnode->confirmReboot = "Are you sure to restart the execution node?";
|
||||
$lang->executionnode->confirmShutdown = "Are you sure to shutdown the execution node?";
|
||||
$lang->executionnode->confirmSuspend = "Are you sure to suspend the execution node?";
|
||||
$lang->executionnode->confirmResume = "Are you sure to resume the execution node?";
|
||||
$lang->executionnode->actionSuccess = 'Success';
|
||||
|
||||
$lang->executionnode->notFoundAgent = 'No Agent service is found';
|
||||
$lang->executionnode->createVmFail = 'Failed to create a execution node';
|
||||
$lang->executionnode->noVncPort = 'Failed to get vnc port';
|
||||
$lang->executionnode->nameValid = "The name can only be letters, numbers, '-', '_', '.', and cannot start with a symbol";
|
||||
|
||||
$lang->executionnode->empty = 'No Execution Node';
|
||||
$lang->executionnode->templateEmpty = 'No Template';
|
||||
|
||||
$lang->executionnode->publicList[0] = 'Private';
|
||||
$lang->executionnode->publicList[1] = 'Public';
|
||||
|
||||
$lang->executionnode->statusList['created'] = 'Created';
|
||||
$lang->executionnode->statusList['launch'] = 'Launch';
|
||||
$lang->executionnode->statusList['ready'] = 'Ready';
|
||||
$lang->executionnode->statusList['running'] = 'Running';
|
||||
$lang->executionnode->statusList['suspend'] = 'Suspend';
|
||||
$lang->executionnode->statusList['destroy'] = 'Destroyed';
|
||||
$lang->executionnode->statusList['destroy_fail'] = 'Destroy Fail';
|
||||
|
||||
$lang->executionnode->versionList = array();
|
||||
$lang->executionnode->versionList['winxp']['all'] = 'Windows XP';
|
||||
$lang->executionnode->versionList['win7']['home'] = 'Home Basic';
|
||||
$lang->executionnode->versionList['win7']['professional'] = 'Professional';
|
||||
$lang->executionnode->versionList['win7']['enterprise'] = 'Enterprise';
|
||||
$lang->executionnode->versionList['win7']['ultimate'] = 'Ultimate';
|
||||
$lang->executionnode->versionList['win10']['home'] = 'Home Basic';
|
||||
$lang->executionnode->versionList['win10']['professional'] = 'Professional';
|
||||
$lang->executionnode->versionList['win10']['enterprise'] = 'Enterprise';
|
||||
$lang->executionnode->versionList['win10']['ultimate'] = 'Ultimate';
|
||||
$lang->executionnode->versionList['win11']['home'] = 'Home Basic';
|
||||
$lang->executionnode->versionList['win11']['professional'] = 'Professional';
|
||||
$lang->executionnode->versionList['win11']['enterprise'] = 'Enterprise';
|
||||
$lang->executionnode->versionList['win11']['ultimate'] = 'Ultimate';
|
||||
$lang->executionnode->versionList['winServer']['2008'] = '2008';
|
||||
$lang->executionnode->versionList['winServer']['2012'] = '2012';
|
||||
$lang->executionnode->versionList['winServer']['2016'] = '2016';
|
||||
$lang->executionnode->versionList['winServer']['2019'] = '2019';
|
||||
$lang->executionnode->versionList['debian']['9'] = '9';
|
||||
$lang->executionnode->versionList['debian']['10'] = '10';
|
||||
$lang->executionnode->versionList['debian']['11'] = '11';
|
||||
$lang->executionnode->versionList['ubuntu']['16'] = '16';
|
||||
$lang->executionnode->versionList['ubuntu']['18'] = '18';
|
||||
$lang->executionnode->versionList['ubuntu']['20'] = '20';
|
||||
$lang->executionnode->versionList['centos']['6'] = '6';
|
||||
$lang->executionnode->versionList['centos']['7'] = '7';
|
||||
$lang->executionnode->versionList['centos']['8'] = '8';
|
||||
|
||||
$lang->executionnode->langList = array();
|
||||
$lang->executionnode->langList['zh_cn'] = 'Simplified Chinese';
|
||||
$lang->executionnode->langList['zh_tw'] = 'Traditional Chinese';
|
||||
$lang->executionnode->langList['en_us'] = 'American English';
|
||||
Executable
+98
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
$lang->executionnode->common = 'Execution Node';
|
||||
$lang->executionnode->browse = 'Execution Node List';
|
||||
$lang->executionnode->create = 'Create Execution Node';
|
||||
$lang->executionnode->view = 'View Execution Node';
|
||||
$lang->executionnode->suspend = 'Suspend Execution Node';
|
||||
$lang->executionnode->destroy = 'Destroy Execution Node';
|
||||
$lang->executionnode->handleVM = 'Restart Execution Node';
|
||||
$lang->executionnode->boot = 'Start Execution Node';
|
||||
$lang->executionnode->reboot = 'Restart Execution Node';
|
||||
$lang->executionnode->shutdown = 'Shutdown Execution Node';
|
||||
$lang->executionnode->resume = 'Resume Execution Node';
|
||||
$lang->executionnode->getVNC = 'Remote management';
|
||||
$lang->executionnode->all = 'All';
|
||||
$lang->executionnode->byQuery = 'Search';
|
||||
$lang->executionnode->osCategory = 'System';
|
||||
$lang->executionnode->osType = 'Os Version';
|
||||
$lang->executionnode->osVersion = 'Os Version No';
|
||||
$lang->executionnode->vmTemplate = 'VM Template';
|
||||
$lang->executionnode->name = 'Name';
|
||||
$lang->executionnode->start = 'Start After Created';
|
||||
$lang->executionnode->hostName = 'Host Name';
|
||||
$lang->executionnode->ip = 'IP';
|
||||
$lang->executionnode->osArch = 'Arch';
|
||||
$lang->executionnode->osLang = 'Language';
|
||||
$lang->executionnode->cpu = 'CPU Cores';
|
||||
$lang->executionnode->memory = 'Memory Size';
|
||||
$lang->executionnode->disk = 'Disk Size';
|
||||
$lang->executionnode->status = 'Status';
|
||||
$lang->executionnode->macAddress = 'MAC';
|
||||
$lang->executionnode->vnc = 'VNC Port';
|
||||
$lang->executionnode->destroyAt = 'Destroy Time';
|
||||
$lang->executionnode->creater = 'Creator';
|
||||
$lang->executionnode->createdDate = 'Create Date';
|
||||
$lang->executionnode->template = 'Template';
|
||||
$lang->executionnode->templateID = 'VM Template';
|
||||
$lang->executionnode->templateList = 'TemplateList';
|
||||
$lang->executionnode->createTemplate = 'Create Template';
|
||||
$lang->executionnode->editTemplate = 'Edit Template';
|
||||
$lang->executionnode->confirmDelete = "Are you sure about destroying the execution node?";
|
||||
$lang->executionnode->confirmBoot = "Are you sure to start the execution node?";
|
||||
$lang->executionnode->confirmReboot = "Are you sure to restart the execution node?";
|
||||
$lang->executionnode->confirmShutdown = "Are you sure to shutdown the execution node?";
|
||||
$lang->executionnode->confirmSuspend = "Are you sure to suspend the execution node?";
|
||||
$lang->executionnode->confirmResume = "Are you sure to resume the execution node?";
|
||||
$lang->executionnode->actionSuccess = 'Success';
|
||||
|
||||
$lang->executionnode->notFoundAgent = 'No Agent service is found';
|
||||
$lang->executionnode->createVmFail = 'Failed to create a execution node';
|
||||
$lang->executionnode->noVncPort = 'Failed to get vnc port';
|
||||
$lang->executionnode->nameValid = "The name can only be letters, numbers, '-', '_', '.', and cannot start with a symbol";
|
||||
|
||||
$lang->executionnode->empty = 'No Execution Node';
|
||||
$lang->executionnode->templateEmpty = 'No Template';
|
||||
|
||||
$lang->executionnode->publicList[0] = 'Private';
|
||||
$lang->executionnode->publicList[1] = 'Public';
|
||||
|
||||
$lang->executionnode->statusList['created'] = 'Created';
|
||||
$lang->executionnode->statusList['launch'] = 'Launch';
|
||||
$lang->executionnode->statusList['ready'] = 'Ready';
|
||||
$lang->executionnode->statusList['running'] = 'Running';
|
||||
$lang->executionnode->statusList['suspend'] = 'Suspend';
|
||||
$lang->executionnode->statusList['destroy'] = 'Destroyed';
|
||||
$lang->executionnode->statusList['destroy_fail'] = 'Destroy Fail';
|
||||
|
||||
$lang->executionnode->versionList = array();
|
||||
$lang->executionnode->versionList['winxp']['all'] = 'Windows XP';
|
||||
$lang->executionnode->versionList['win7']['home'] = 'Home Basic';
|
||||
$lang->executionnode->versionList['win7']['professional'] = 'Professional';
|
||||
$lang->executionnode->versionList['win7']['enterprise'] = 'Enterprise';
|
||||
$lang->executionnode->versionList['win7']['ultimate'] = 'Ultimate';
|
||||
$lang->executionnode->versionList['win10']['home'] = 'Home Basic';
|
||||
$lang->executionnode->versionList['win10']['professional'] = 'Professional';
|
||||
$lang->executionnode->versionList['win10']['enterprise'] = 'Enterprise';
|
||||
$lang->executionnode->versionList['win10']['ultimate'] = 'Ultimate';
|
||||
$lang->executionnode->versionList['win11']['home'] = 'Home Basic';
|
||||
$lang->executionnode->versionList['win11']['professional'] = 'Professional';
|
||||
$lang->executionnode->versionList['win11']['enterprise'] = 'Enterprise';
|
||||
$lang->executionnode->versionList['win11']['ultimate'] = 'Ultimate';
|
||||
$lang->executionnode->versionList['winServer']['2008'] = '2008';
|
||||
$lang->executionnode->versionList['winServer']['2012'] = '2012';
|
||||
$lang->executionnode->versionList['winServer']['2016'] = '2016';
|
||||
$lang->executionnode->versionList['winServer']['2019'] = '2019';
|
||||
$lang->executionnode->versionList['debian']['9'] = '9';
|
||||
$lang->executionnode->versionList['debian']['10'] = '10';
|
||||
$lang->executionnode->versionList['debian']['11'] = '11';
|
||||
$lang->executionnode->versionList['ubuntu']['16'] = '16';
|
||||
$lang->executionnode->versionList['ubuntu']['18'] = '18';
|
||||
$lang->executionnode->versionList['ubuntu']['20'] = '20';
|
||||
$lang->executionnode->versionList['centos']['6'] = '6';
|
||||
$lang->executionnode->versionList['centos']['7'] = '7';
|
||||
$lang->executionnode->versionList['centos']['8'] = '8';
|
||||
|
||||
$lang->executionnode->langList = array();
|
||||
$lang->executionnode->langList['zh_cn'] = 'Simplified Chinese';
|
||||
$lang->executionnode->langList['zh_tw'] = 'Traditional Chinese';
|
||||
$lang->executionnode->langList['en_us'] = 'American English';
|
||||
Executable
+96
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
$lang->executionnode->common = '执行节点';
|
||||
$lang->executionnode->browse = '执行节点列表';
|
||||
$lang->executionnode->create = '创建执行节点';
|
||||
$lang->executionnode->view = '执行节点详情';
|
||||
$lang->executionnode->suspend = '暂停执行节点';
|
||||
$lang->executionnode->destroy = '销毁执行节点';
|
||||
$lang->executionnode->handleVM = '重启执行节点';
|
||||
$lang->executionnode->boot = '启动执行节点';
|
||||
$lang->executionnode->reboot = '重启执行节点';
|
||||
$lang->executionnode->shutdown = '关闭执行节点';
|
||||
$lang->executionnode->resume = '恢复执行节点';
|
||||
$lang->executionnode->getVNC = '远程管理';
|
||||
$lang->executionnode->all = '所有';
|
||||
$lang->executionnode->byQuery = '搜索';
|
||||
$lang->executionnode->osCategory = '操作系统平台';
|
||||
$lang->executionnode->osType = '操作系统版本';
|
||||
$lang->executionnode->osVersion = '操作系统版本号';
|
||||
$lang->executionnode->vmTemplate = '虚拟机模板';
|
||||
$lang->executionnode->name = '执行节点名称';
|
||||
$lang->executionnode->start = '创建后自动开启';
|
||||
$lang->executionnode->hostName = '所属宿主机';
|
||||
$lang->executionnode->ip = 'IP';
|
||||
$lang->executionnode->osArch = '架构';
|
||||
$lang->executionnode->osLang = '系统语言';
|
||||
$lang->executionnode->cpu = 'CPU核心数';
|
||||
$lang->executionnode->memory = '内存';
|
||||
$lang->executionnode->disk = '硬盘';
|
||||
$lang->executionnode->status = '状态';
|
||||
$lang->executionnode->macAddress = 'MAC地址';
|
||||
$lang->executionnode->vnc = 'VNC端口';
|
||||
$lang->executionnode->destroyAt = '销毁时间';
|
||||
$lang->executionnode->creater = '创建人';
|
||||
$lang->executionnode->createdDate = '创建日期';
|
||||
$lang->executionnode->template = '模板';
|
||||
$lang->executionnode->templateID = '虚拟机模板';
|
||||
$lang->executionnode->templateList = '模板列表';
|
||||
$lang->executionnode->confirmDelete = "您确定销毁执行节点吗?";
|
||||
$lang->executionnode->confirmBoot = "您确定启动执行节点吗?";
|
||||
$lang->executionnode->confirmReboot = "您确定重启执行节点吗?";
|
||||
$lang->executionnode->confirmShutdown = "您确定关闭执行节点吗?";
|
||||
$lang->executionnode->confirmSuspend = "您确定暂停执行节点吗?";
|
||||
$lang->executionnode->confirmResume = "您确定恢复执行节点吗?";
|
||||
$lang->executionnode->actionSuccess = '操作成功';
|
||||
|
||||
$lang->executionnode->notFoundAgent = '没有发现Agent服务';
|
||||
$lang->executionnode->createVmFail = '创建执行节点失败';
|
||||
$lang->executionnode->noVncPort = '无法获取执行节点端口';
|
||||
$lang->executionnode->nameValid = "名称只能是字母、数字,'-','_','.',且不能以符号开头";
|
||||
|
||||
$lang->executionnode->empty = '暂时没有执行节点';
|
||||
$lang->executionnode->templateEmpty = '暂时没有模板';
|
||||
|
||||
$lang->executionnode->publicList[0] = '不共享';
|
||||
$lang->executionnode->publicList[1] = '共享';
|
||||
|
||||
$lang->executionnode->statusList['created'] = '已创建';
|
||||
$lang->executionnode->statusList['launch'] = '启动中';
|
||||
$lang->executionnode->statusList['ready'] = '运行中';
|
||||
$lang->executionnode->statusList['running'] = '运行中';
|
||||
$lang->executionnode->statusList['suspend'] = '暂停';
|
||||
$lang->executionnode->statusList['destroy'] = '已销毁';
|
||||
$lang->executionnode->statusList['destroy_fail'] = '销毁失败';
|
||||
|
||||
$lang->executionnode->versionList = array();
|
||||
$lang->executionnode->versionList['winxp']['all'] = 'Windows XP';
|
||||
$lang->executionnode->versionList['win7']['home'] = '家庭版';
|
||||
$lang->executionnode->versionList['win7']['professional'] = '专业版';
|
||||
$lang->executionnode->versionList['win7']['enterprise'] = '企业版';
|
||||
$lang->executionnode->versionList['win7']['ultimate'] = '旗舰版';
|
||||
$lang->executionnode->versionList['win10']['home'] = '家庭版';
|
||||
$lang->executionnode->versionList['win10']['professional'] = '专业版';
|
||||
$lang->executionnode->versionList['win10']['enterprise'] = '企业版';
|
||||
$lang->executionnode->versionList['win10']['ultimate'] = '旗舰版';
|
||||
$lang->executionnode->versionList['win11']['home'] = '家庭版';
|
||||
$lang->executionnode->versionList['win11']['professional'] = '专业版';
|
||||
$lang->executionnode->versionList['win11']['enterprise'] = '企业版';
|
||||
$lang->executionnode->versionList['win11']['ultimate'] = '旗舰版';
|
||||
$lang->executionnode->versionList['winServer']['2008'] = '2008';
|
||||
$lang->executionnode->versionList['winServer']['2012'] = '2012';
|
||||
$lang->executionnode->versionList['winServer']['2016'] = '2016';
|
||||
$lang->executionnode->versionList['winServer']['2019'] = '2019';
|
||||
$lang->executionnode->versionList['debian']['9'] = '9';
|
||||
$lang->executionnode->versionList['debian']['10'] = '10';
|
||||
$lang->executionnode->versionList['debian']['11'] = '11';
|
||||
$lang->executionnode->versionList['ubuntu']['16'] = '16';
|
||||
$lang->executionnode->versionList['ubuntu']['18'] = '18';
|
||||
$lang->executionnode->versionList['ubuntu']['20'] = '20';
|
||||
$lang->executionnode->versionList['centos']['6'] = '6';
|
||||
$lang->executionnode->versionList['centos']['7'] = '7';
|
||||
$lang->executionnode->versionList['centos']['8'] = '8';
|
||||
|
||||
$lang->executionnode->langList = array();
|
||||
$lang->executionnode->langList['zh_cn'] = '简体中文';
|
||||
$lang->executionnode->langList['zh_tw'] = '繁体中文';
|
||||
$lang->executionnode->langList['en_us'] = '美式英语';
|
||||
Executable
+522
@@ -0,0 +1,522 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of vm module of ZenTaoCMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author xiawenlong <xiawenlong@cnezsoft.com>
|
||||
* @package ops
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class executionnodemodel extends model
|
||||
{
|
||||
|
||||
const STATUS_CREATED = 'created';
|
||||
const STATUS_LAUNCH = 'launch';
|
||||
const STATUS_FAIL_CREATE = 'vm_fail_create';
|
||||
const STATUS_RUNNING = 'running';
|
||||
const STATUS_SHUTOFF = 'shutoff';
|
||||
const STATUS_BUSY = 'busy';
|
||||
const STATUS_READY = 'ready';
|
||||
const STATUS_UNKNOWN = 'unknown';
|
||||
const STATUS_DESTROY = 'destroy';
|
||||
const STATUS_DESTROY_FAIL = 'vim_destroy_fail';
|
||||
|
||||
const KVM_CREATE_PATH = '/api/v1/kvm/create';
|
||||
const KVM_TOKEN_PATH = '/api/v1/vnc/getToken';
|
||||
|
||||
|
||||
/**
|
||||
* Create an VM.
|
||||
*
|
||||
* @param object $data
|
||||
* @param int $templateID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data = fixer::input('post')->get();
|
||||
|
||||
/* Batch check fields. */
|
||||
$this->lang->vm = $this->lang->executionnode;
|
||||
$this->dao->update(TABLE_VM)->data($data)
|
||||
->batchCheck($this->config->executionnode->create->requiredFields, 'notempty')
|
||||
->check('name', 'unique');
|
||||
if(dao::isError()) return false;
|
||||
|
||||
if(!preg_match("/^(?!_)(?!-)(?!\.)[a-zA-Z0-9\_\.\-]+$/", $data->name))
|
||||
{
|
||||
dao::$errors[] = $this->lang->executionnode->nameValid;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Get Vmtemplate. */
|
||||
$vmTemplate = $this->getVmTemplateByID($data->templateID);
|
||||
$data->osCategory = $vmTemplate->osCategory;
|
||||
$data->osType = $vmTemplate->osType;
|
||||
$data->osVersion = $vmTemplate->osVersion;
|
||||
$data->osLang = $vmTemplate->osLang;
|
||||
|
||||
/* Get host info. */
|
||||
$host = $this->getHostByID($vmTemplate->hostID);
|
||||
|
||||
/* Gen mac address */
|
||||
$macAddress = $this->genMacAddress();
|
||||
|
||||
/* Prepare create params. */
|
||||
$agnetUrl = 'http://' . $host->publicIP . ':' . $this->config->executionnode->defaultPort;
|
||||
$param = array(
|
||||
'vmMacAddress' => $macAddress,
|
||||
'osCategory' => $vmTemplate->osCategory,
|
||||
'osType' => $vmTemplate->osType,
|
||||
'osLang' => $data->osLang,
|
||||
'osVersion' => $vmTemplate->osVersion,
|
||||
'vmTemplate' => $vmTemplate->imageName,
|
||||
'vmUniqueName' => $data->name,
|
||||
'vmCpu' => (int)$data->osCpu,
|
||||
'vmDiskSize' => (int)$data->osDisk,
|
||||
'vmMemorySize' => (int)$data->osMemory,
|
||||
);
|
||||
|
||||
$result = json_decode(commonModel::http($agnetUrl . static::KVM_CREATE_PATH, json_encode($param), null));
|
||||
|
||||
if(empty($result))
|
||||
{
|
||||
dao::$errors[] = $this->lang->executionnode->notFoundAgent;
|
||||
return false;
|
||||
}
|
||||
if($result->code != 200)
|
||||
{
|
||||
dao::$errors[] = $this->lang->executionnode->createVmFail;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Prepare create execution node data. */
|
||||
$data->templateID = $data->templateID;
|
||||
$data->hostID = $host->id;
|
||||
$data->macAddress = $macAddress;
|
||||
$data->status = static::STATUS_RUNNING;
|
||||
$data->createdBy = $this->app->user->account;
|
||||
$data->createdDate = helper::now();
|
||||
$data->osCategory = $vmTemplate->osCategory;
|
||||
$data->osType = $vmTemplate->osType;
|
||||
$data->osArch = $vmTemplate->osArch;
|
||||
$data->vncPort = (int)$result->data->vncPort;
|
||||
|
||||
/* Save execution node. */
|
||||
$this->dao->insert(TABLE_VM)->data($data)->autoCheck()->exec();
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$nodeID = $this->dao->lastInsertID();
|
||||
|
||||
/* update action log. */
|
||||
$this->loadModel('action')->create('executionnode', $nodeID, 'Created');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Action VM.
|
||||
*
|
||||
* @param int $id
|
||||
* @param string $type
|
||||
* @return string
|
||||
*/
|
||||
public function handleVM($id, $type)
|
||||
{
|
||||
$node = $this->getVMByID($id);
|
||||
$host = $this->getHostByID($node->hostID);
|
||||
|
||||
/* Prepare create params. */
|
||||
$agnetUrl = 'http://' . $host->publicIP . ':' . $this->config->executionnode->defaultPort;
|
||||
$path = '/api/v1/kvm/' . $node->name . '/' . $type;
|
||||
$param = array('vmUniqueName' => $node->name);
|
||||
|
||||
$result = commonModel::http($agnetUrl . $path, $param);
|
||||
$data = json_decode($result, true);
|
||||
if(empty($data)) return $this->lang->executionnode->notFoundAgent;
|
||||
|
||||
if($data['code'] != 200) return $data['message'];
|
||||
|
||||
if($type != 'reboot')
|
||||
{
|
||||
$status = $type == 'suspend' ? 'suspend' : 'running';
|
||||
$this->dao->update(TABLE_VM)->set('status')->eq($status)->where('id')->eq($id)->exec();
|
||||
}
|
||||
|
||||
$this->loadModel('action')->create('executionnode', $id, ucfirst($type));
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy VM.
|
||||
*
|
||||
* @param int $id
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
$node = $this->getVMByID($id);
|
||||
$host = $this->getHostByID($node->hostID);
|
||||
|
||||
$req = array( 'vmUniqueName' => $node->name );
|
||||
|
||||
/* Prepare create params. */
|
||||
if($host)
|
||||
{
|
||||
$agnetUrl = 'http://' . $host->publicIP . ':' . $this->config->executionnode->defaultPort;
|
||||
$result = commonModel::http($agnetUrl . '/api/v1/kvm/' . $node->name . '/destroy', json_encode($req));
|
||||
|
||||
$data = json_decode($result, true);
|
||||
if(empty($data)) return $this->lang->executionnode->notFoundAgent;
|
||||
|
||||
if($data['code'] != 200) return $data['message'];
|
||||
}
|
||||
|
||||
/* delete execution node. */
|
||||
$this->dao->update(TABLE_VM)
|
||||
->set('deleted')->eq(1)
|
||||
->set('destroyAt')->eq(helper::now())
|
||||
->where('id')->eq($id)
|
||||
->exec();
|
||||
$this->loadModel('action')->create('executionnode', $id, 'destroy');
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get execution node created action record by node ID.
|
||||
*
|
||||
* @param int $id
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getNodeCreateActionByID($id)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_ACTION)
|
||||
->where('objectType')->eq('executionnode')
|
||||
->andWhere('objectID')->eq($id)
|
||||
->andWhere('action')->eq('created')
|
||||
->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback update host data.
|
||||
*
|
||||
* @access public
|
||||
* @return mixed
|
||||
*/
|
||||
public function updateHostByCallback()
|
||||
{
|
||||
$data = array();
|
||||
$data['status'] = isset($_POST['status']) ? $_POST['status'] : '';
|
||||
$data['agentPort'] = isset($_POST['port']) ? $_POST['port'] : '';
|
||||
$ip = isset($_POST['ip']) ? $_POST['ip'] : '';
|
||||
|
||||
if(empty($ip)) return false;
|
||||
|
||||
$host = $this->getHostByIP($ip);
|
||||
if(empty($host)) return 'Not Found';
|
||||
|
||||
$this->dao->update(TABLE_ZAHOST)->data($data)
|
||||
->where('id')->eq($host->id)
|
||||
->exec();
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update VM attribute.
|
||||
*
|
||||
* @param int $id
|
||||
* @param array $data
|
||||
* @return void
|
||||
*/
|
||||
public function update($id, $data)
|
||||
{
|
||||
$this->dao->update(TABLE_VM)->data($data)
|
||||
->where('id')->eq($id)
|
||||
->exec();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set vm name.
|
||||
*
|
||||
* @param array $vm
|
||||
* @param int $id
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function setVmName($vm, $id)
|
||||
{
|
||||
$name = sprintf('test-%s-%s-%s-%s-%d', $vm['osCategory'], $vm['osType'], $vm['osArch'], $vm['osLang'], $id);
|
||||
$this->dao->update(TABLE_VM)->data(array('name' => $name))
|
||||
->where('id')->eq($id)
|
||||
->exec();
|
||||
$vm['name'] = $name;
|
||||
return $vm;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get vm list.
|
||||
*
|
||||
* @param string $browseType
|
||||
* @param int $param
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @return void
|
||||
*/
|
||||
public function getListByQuery($browseType = 'all', $param = 0, $orderBy = 'id_desc', $pager = null)
|
||||
{
|
||||
$query = '';
|
||||
if($browseType == 'bysearch')
|
||||
{
|
||||
if($param)
|
||||
{
|
||||
$query = $this->loadModel('search')->getQuery($param);
|
||||
if($query)
|
||||
{
|
||||
$this->session->set('vmQuery', $query->sql);
|
||||
$this->session->set('vmForm', $query->form);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->session->set('vmQuery', ' 1 = 1');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if($this->session->vmQuery == false) $this->session->set('vmQuery', ' 1 = 1');
|
||||
}
|
||||
$query = $this->session->vmQuery;
|
||||
$query = str_replace('`id`', 't1.`id`', $query);
|
||||
$query = str_replace('`name`', 't1.`name`', $query);
|
||||
$query = str_replace('`status`', 't1.`status`', $query);
|
||||
$query = str_replace('`osCategory`', 't1.`osCategory`', $query);
|
||||
$query = str_replace('`osType`', 't1.`osType`', $query);
|
||||
$query = str_replace('`hostID`', 't1.`hostID`', $query);
|
||||
$query = str_replace('`osVersion`', 't4.`osVersion`', $query);
|
||||
}
|
||||
|
||||
return $this->dao->select('t1.*, t3.name as hostName, t2.publicIP as hostIP,t4.osVersion')->from(TABLE_VM)->alias('t1')
|
||||
->leftJoin(TABLE_ZAHOST)->alias('t2')->on('t1.hostID = t2.id')
|
||||
->leftJoin(TABLE_ASSET)->alias('t3')->on('t3.id = t2.assetID')
|
||||
->leftJoin(TABLE_VMTEMPLATE)->alias('t4')->on('t4.id = t1.templateID')
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere("((t1.public = 1) OR (t1.createdBy = '{$this->app->user->account}'))")
|
||||
->beginIF($query)->andWhere($query)->fi()
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get Host by id.
|
||||
*
|
||||
* @param int $id
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getHostByID($id)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_ZAHOST)
|
||||
->where('id')->eq($id)
|
||||
->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Host by IP.
|
||||
*
|
||||
* @param string $ip
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getHostByIP($ip)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_ZAHOST)
|
||||
->where('publicIP')->eq($ip)
|
||||
->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get BaseImage by name.
|
||||
*
|
||||
* @param int $id
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getBaseImageByID($id)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_BASEIMAGE)
|
||||
->where('id')->eq($id)
|
||||
->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get VM template.
|
||||
*
|
||||
* @param int $id
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getVmTemplateByID($id)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_VMTEMPLATE)
|
||||
->where('id')->eq($id)
|
||||
->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get os list by osCategory.
|
||||
*
|
||||
* @param stirng $osCategory
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getOsByOsType($osCategory)
|
||||
{
|
||||
$list = array();
|
||||
foreach($this->lang->vm->osTypeList as $item)
|
||||
{
|
||||
if($osCategory == $item['osType'])
|
||||
{
|
||||
$list[$item['value']] = $item['label'];
|
||||
}
|
||||
}
|
||||
return $list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get baseImage list by params.
|
||||
*
|
||||
* @param string $osCategory
|
||||
* @param string $osType
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getBaseImageList($osCategory = '', $osType = '')
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_BASEIMAGE)
|
||||
->where('osCategory')->eq($osCategory)
|
||||
->andwhere('osType')->eq($osType)
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get VM template list.
|
||||
*
|
||||
* @param string $orderBy
|
||||
* @param int $pager
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getVmTemplateList($orderBy = 'id_desc', $pager = null)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_VMTEMPLATE)->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Vm Templaete pairs.
|
||||
*
|
||||
* @param string $osCategory
|
||||
* @param string $osType
|
||||
* @param string $osVersion
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getVmTemplatePairs($osCategory = '', $osType = '', $osVersion = '')
|
||||
{
|
||||
return $this->dao->select('id,name')->from(TABLE_VMTEMPLATE)
|
||||
->where('osCategory')->eq($osCategory)
|
||||
->andwhere('osType')->eq($osType)
|
||||
->andwhere('osVersion')->eq($osVersion)
|
||||
->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get VM by id.
|
||||
*
|
||||
* @param int $id
|
||||
* @return object
|
||||
*/
|
||||
public function getVMByID($id)
|
||||
{
|
||||
return $this->dao->select('t1.*, t3.name as hostName, t2.publicIP as ip,t4.osVersion')->from(TABLE_VM)->alias('t1')
|
||||
->leftJoin(TABLE_ZAHOST)->alias('t2')->on('t1.hostID = t2.id')
|
||||
->leftJoin(TABLE_ASSET)->alias('t3')->on('t3.id = t2.assetID')
|
||||
->leftJoin(TABLE_VMTEMPLATE)->alias('t4')->on('t4.id = t1.templateID')
|
||||
->where('t1.id')->eq($id)
|
||||
->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get VM by mac address.
|
||||
*
|
||||
* @param string $mac
|
||||
* @return object
|
||||
*/
|
||||
public function getVMByMac($mac)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_VM)
|
||||
->where('macAddress')->eq($mac)
|
||||
->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Generage unique mac address.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function genMacAddress()
|
||||
{
|
||||
$buf = array(
|
||||
0x1C,
|
||||
0x1C,
|
||||
0x1C,
|
||||
mt_rand(0x00, 0x7f),
|
||||
mt_rand(0x00, 0xff),
|
||||
mt_rand(0x00, 0xff)
|
||||
);
|
||||
$mac = join(':',array_map(function($v)
|
||||
{
|
||||
return sprintf("%02X",$v);
|
||||
},$buf));
|
||||
|
||||
$VM = $this->getVMByMac($mac);
|
||||
if(empty($VM))
|
||||
{
|
||||
return $mac;
|
||||
}
|
||||
$this->genMacAddress();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get vnc url.
|
||||
*
|
||||
* @param int $vmID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getVncUrl($vmID)
|
||||
{
|
||||
$vm = $this->getVMByID($vmID);
|
||||
if(empty($vm) or empty($vm->hostID) or empty($vm->vncPort)) return false;
|
||||
|
||||
$host = $this->getHostByID($vm->hostID);
|
||||
if(empty($host)) return false;
|
||||
|
||||
$agnetUrl = 'http://' . $host->publicIP . ':' . $host->agentPort . static::KVM_TOKEN_PATH;
|
||||
$result = json_decode(commonModel::http("$agnetUrl?port={$vm->vncPort}"));
|
||||
|
||||
if(empty($result) or $result->code != 200) return false;
|
||||
|
||||
$returnData = new stdClass();
|
||||
$returnData->hostIP = $host->publicIP;
|
||||
$returnData->agentPort = $host->agentPort;
|
||||
$returnData->vncPort = $vm->vncPort;
|
||||
$returnData->token = $result->data->token;
|
||||
return $returnData;
|
||||
}
|
||||
}
|
||||
Executable
+97
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
/**
|
||||
* The browse view file of executionnode module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author xiawenlong <xiawenlong@cnezsoft.com>
|
||||
* @package executionnode
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
|
||||
<?php js::set('confirmDelete', $lang->executionnode->confirmDelete)?>
|
||||
<?php js::set('confirmBoot', $lang->executionnode->confirmBoot)?>
|
||||
<?php js::set('confirmReboot', $lang->executionnode->confirmReboot)?>
|
||||
<?php js::set('confirmShutdown', $lang->executionnode->confirmShutdown)?>
|
||||
<?php js::set('actionSuccess', $lang->executionnode->actionSuccess)?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='pull-left btn-toolbar'>
|
||||
<?php echo html::a($this->createLink('executionnode', 'browse'), "<span class='text'>{$lang->executionnode->all}</span>", '', "class='btn btn-link btn-active-text'");?>
|
||||
<a href='#' id='bysearchTab' class='btn btn-link querybox-toggle'><i class='icon-search icon'></i> <?php echo $lang->executionnode->byQuery;?></a>
|
||||
</div>
|
||||
|
||||
<?php if(common::hasPriv('executionnode', 'create')):?>
|
||||
<div class="btn-toolbar pull-right" id='createActionMenu'>
|
||||
<?php
|
||||
$misc = "class='btn btn-primary' data-width='600px'";
|
||||
$link = $this->createLink('executionnode', 'create');
|
||||
echo html::a($link, "<i class='icon icon-plus'></i>" . $lang->executionnode->create, '', $misc);
|
||||
?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div id='queryBox' class='cell <?php if($browseType =='bysearch') echo 'show';?>' data-module='executionnode'></div>
|
||||
<div id='mainContent' class='main-table'>
|
||||
<?php $vars = "browseType=$browseType¶m=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
|
||||
<div class="table-responsive">
|
||||
<?php if(empty($nodeList)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->executionnode->empty;?></span>
|
||||
<?php if(common::hasPriv('executionnode', 'create')) common::printLink('executionnode', 'create', '', '<i class="icon icon-plus"></i> ' . $lang->executionnode->create, '', 'class="btn btn-info"');?>
|
||||
</p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<table class='table has-sort-head table-fixed' id='nodeList'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-60px'><?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th class='w-200px'><?php common::printOrderLink('name', $orderBy, $vars, $lang->executionnode->name);?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('hostID', $orderBy, $vars, $lang->executionnode->hostName);?>
|
||||
<th class='w-120px'><?php common::printOrderLink('osType', $orderBy, $vars, $lang->executionnode->osType);?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('osCpu', $orderBy, $vars, $lang->executionnode->cpu);?></th>
|
||||
<th class='w-60px'><?php common::printOrderLink('osMemory', $orderBy, $vars, $lang->executionnode->memory);?></th>
|
||||
<th class='w-60px'><?php common::printOrderLink('osDisk', $orderBy, $vars, $lang->executionnode->disk);?></th>
|
||||
<th class='w-80px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->executionnode->status);?></th>
|
||||
<th class='w-80px'><?php common::printOrderLink('createdBy', $orderBy, $vars, $lang->executionnode->creater);?></th>
|
||||
<th class='c-actions-5'><?php echo $lang->actions?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($nodeList as $node):?>
|
||||
<tr>
|
||||
<td><?php echo $node->id;?></td>
|
||||
<td title="<?php echo $node->name;?>"><?php echo html::a($this->inlink('view', "id=$node->id", 'html', true), $node->name, '',"class='iframe'");?></td>
|
||||
<td title="<?php echo $node->hostName;?>"><?php echo $node->hostName;?></td>
|
||||
<?php $osType = $config->executionnode->os->type[$node->osCategory][$node->osType] . ' ' . $lang->executionnode->versionList[$node->osType][$node->osVersion];?>
|
||||
<td title="<?php echo $osType;?>"><?php echo $osType;?></td>
|
||||
<td><?php echo zget($config->executionnode->os->cpu, $node->osCpu);?></td>
|
||||
<td><?php echo zget($config->executionnode->os->memory, $node->osMemory);?></td>
|
||||
<td><?php echo zget($config->executionnode->os->disk, $node->osDisk);?></td>
|
||||
<td><?php echo zget($lang->executionnode->statusList, $node->status);?></td>
|
||||
<td><?php echo zget($users, $node->createdBy);?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
$startClass = $node->status == 'running' ? 'disabled' : '';
|
||||
$stopClass = $node->status == 'suspend' ? 'disabled' : '';
|
||||
common::printLink('executionnode', 'suspend', "executionnodeID={$node->id}", "<i class='icon icon-pause'></i> ", '', "title='{$lang->executionnode->suspend}' class='btn btn-primary' {$stopClass} target='hiddenwin' onclick='if(confirm(\"{$lang->executionnode->confirmSuspend}\")==false) return false;'");
|
||||
common::printLink('executionnode', 'resume', "executionnodeID={$node->id}", "<i class='icon icon-back'></i> ", '', "title='{$lang->executionnode->resume}' class='btn btn-primary' {$startClass} target='hiddenwin' onclick='if(confirm(\"{$lang->executionnode->confirmResume}\")==false) return false;'");
|
||||
common::printLink('executionnode', 'reboot', "executionnodeID={$node->id}", "<i class='icon icon-restart'></i> ", '', "title='{$lang->executionnode->reboot}' class='btn btn-primary' {$stopClass} target='hiddenwin' onclick='if(confirm(\"{$lang->executionnode->confirmReboot}\")==false) return false;'");
|
||||
common::printLink('executionnode', 'destroy', "executionnodeID={$node->id}", "<i class='icon icon-trash'></i> ", '', "title='{$lang->executionnode->destroy}' class='btn btn-primary' target='hiddenwin' onclick='if(confirm(\"{$lang->executionnode->confirmDelete}\")==false) return false;'");
|
||||
common::printIcon('executionnode', 'getVNC', "executionnodeID={$node->id}", '', 'list', 'link', 'hiddenwin', $stopClass);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class='table-footer'>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
Executable
+71
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* The create view file of vm module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author xiawenlong <xiawenlong@cnezsoft.com>
|
||||
* @package host
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->executionnode->create;?></h2>
|
||||
</div>
|
||||
<form method='post' target='hiddenwin' id='ajaxForm' class="load-indicator main-form form-ajax">
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $lang->executionnode->name;?></th>
|
||||
<td><?php echo html::input('name', '', "class='form-control' placeholder=\"{$lang->executionnode->nameValid}\"");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->executionnode->hostName;?></th>
|
||||
<td><?php echo html::select('hostID', $hostPairs, '', "class='form-control chosen'")?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->executionnode->vmTemplate;?></th>
|
||||
<td id="template"><?php echo html::select('templateID', '', '', "class='form-control chosen'")?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->executionnode->cpu;?></th>
|
||||
<td><?php echo html::select('osCpu', $config->executionnode->os->cpu, '', "class='form-control chosen'")?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->executionnode->memory;?></th>
|
||||
<td><?php echo html::select('osMemory', $config->executionnode->os->memory, '', "class='form-control chosen'")?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->executionnode->disk;?></th>
|
||||
<td><?php echo html::select('osDisk', $config->executionnode->os->disk, '', "class='form-control chosen'")?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->executionnode->osCategory;?></th>
|
||||
<td><?php echo html::input('osCategory', '', "class='form-control' readonly")?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->executionnode->osType;?></th>
|
||||
<td><?php echo html::input('osType', '', "class='form-control' readonly")?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->executionnode->osVersion;?></th>
|
||||
<td><?php echo html::input('osVersion', '', "class='form-control' readonly")?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->executionnode->osLang;?></th>
|
||||
<td><?php echo html::input('osLang', '', "class='form-control' readonly")?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::a(inlink('browse'), $lang->goback, '', "class='btn btn-wide btn-back'");?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* The file of vnc to vm of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Yanyi Cao <caoyanyi@easycorp.ltd>
|
||||
* @package vm
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.lite.html.php';?>
|
||||
<div class='clearfix'>
|
||||
<?php echo "<iframe width='100%' id='urlIframe' src='{$config->webRoot}js/vnc/vnc_lite.html?host=$host&port=6080&path=websockify/?token=$token&password=pass'></iframe>";?>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
var defaultHeight = window.screen.height - 160;
|
||||
$('#urlIframe').height(defaultHeight);
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* The view view file of vm module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author xiawenlong <xiawenlong@cnezsoft.com>
|
||||
* @package host
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
|
||||
<?php js::set('confirmDelete', $lang->vm->confirmDelete)?>
|
||||
<?php js::set('confirmBoot', $lang->vm->confirmBoot)?>
|
||||
<?php js::set('confirmReboot', $lang->vm->confirmReboot)?>
|
||||
<?php js::set('confirmShutdown', $lang->vm->confirmShutdown)?>
|
||||
<?php js::set('actionSuccess', $lang->vm->actionSuccess)?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->vm->view;?></h2>
|
||||
</div>
|
||||
<div class='main'>
|
||||
<div class='detail'>
|
||||
<table class='table table-striped'>
|
||||
<tr>
|
||||
<th class='thWidth'><?php echo $lang->vm->name;?></th>
|
||||
<td><?php echo $vm->name;?></td>
|
||||
<th></th><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->vm->osType;?></th>
|
||||
<td><?php echo $config->vm->os->type[$vm->osCategory][$vm->osType];?></td>
|
||||
<th><?php echo $lang->vm->osCategory;?></th>
|
||||
<td><?php echo $config->vm->os->list[$vm->osCategory];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->vm->osVersion;?></th>
|
||||
<td><?php echo $lang->vm->versionList[$vm->osType][$vm->osVersion];?></td>
|
||||
<th><?php echo $lang->vm->osLang;?></th>
|
||||
<td><?php echo $lang->vm->langList[$vm->osLang];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->vm->ip;?></th>
|
||||
<td><?php echo $vm->ip;?></td>
|
||||
<th><?php echo $lang->vm->macAddress;?></th>
|
||||
<td><?php echo $vm->macAddress;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->vm->vnc;?></th>
|
||||
<td><?php echo $vm->vncPort;?></td>
|
||||
<th><?php echo $lang->vm->status;?></th>
|
||||
<td><?php echo zget($lang->vm->statusList, $vm->status);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->vm->createdDate;?></th>
|
||||
<td><?php echo $vm->createdDate;?></td>
|
||||
<th><?php echo $lang->vm->destroyAt;?></th>
|
||||
<td><?php echo $vm->destroyAt;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php include $app->getModuleRoot() . 'common/view/action.html.php'?>
|
||||
</div>
|
||||
<div id='mainActions' class='main-actions'>
|
||||
<nav class='container'></nav>
|
||||
<div class='btn-toolbar'>
|
||||
<?php
|
||||
if(empty($vm->destroyAt))
|
||||
{
|
||||
common::printLink('vm', 'reboot', "vmID={$vm->id}", "<i class='icon icon-restart'></i> ". $lang->vm->reboot, '', "title='{$lang->vm->reboot}' class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->vm->confirmReboot}\")==false) return false;'");
|
||||
common::printLink('vm', 'destroy', "vmID={$vm->id}", "<i class='icon icon-trash'></i> " . $lang->vm->destroy, '', "title='{$lang->vm->destroy}' class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->vm->confirmDelete}\")==false) return false;'");
|
||||
}
|
||||
if(!isonlybody()) common::printLink('vm', 'browse', "", "<i class='icon-goback icon-back'></i> " . $lang->goback, '', "class='btn'");
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
@@ -40,6 +40,7 @@ $lang->moduleOrder[90] = 'testsuite';
|
||||
$lang->moduleOrder[95] = 'testreport';
|
||||
$lang->moduleOrder[100] = 'caselib';
|
||||
$lang->moduleOrder[105] = 'zahost';
|
||||
$lang->moduleOrder[108] = 'executionnode';
|
||||
|
||||
$lang->moduleOrder[110] = 'doc';
|
||||
$lang->moduleOrder[115] = 'report';
|
||||
@@ -1210,6 +1211,23 @@ $lang->zahost->methodOrder[25] = 'createTemplate';
|
||||
$lang->zahost->methodOrder[30] = 'editTemplate';
|
||||
$lang->zahost->methodOrder[35] = 'deleteTemplate';
|
||||
|
||||
$lang->resource->executionnode = new stdclass();
|
||||
$lang->resource->executionnode->browse = 'browse';
|
||||
$lang->resource->executionnode->create = 'create';
|
||||
$lang->resource->executionnode->destroy = 'destroy';
|
||||
$lang->resource->executionnode->reboot = 'reboot';
|
||||
$lang->resource->executionnode->suspend = 'suspend';
|
||||
$lang->resource->executionnode->resume = 'resume';
|
||||
$lang->resource->executionnode->getVNC = 'getVNC';
|
||||
|
||||
$lang->executionnode->methodOrder[5] = 'browse';
|
||||
$lang->executionnode->methodOrder[10] = 'create';
|
||||
$lang->executionnode->methodOrder[15] = 'destroy';
|
||||
$lang->executionnode->methodOrder[20] = 'reboot';
|
||||
$lang->executionnode->methodOrder[35] = 'suspend';
|
||||
$lang->executionnode->methodOrder[30] = 'resume';
|
||||
$lang->executionnode->methodOrder[35] = 'getVNC';
|
||||
|
||||
$lang->resource->repo = new stdclass();
|
||||
$lang->resource->repo->browse = 'browseAction';
|
||||
$lang->resource->repo->view = 'view';
|
||||
|
||||
@@ -370,9 +370,9 @@ $config->delete['17_2'][] = 'extension/lite/workflowrelation/ext/view/admin.flow
|
||||
$config->delete['17_2'][] = 'extension/lite/extension/lite/workflowrule/ext/view/browse.flow.html.hook.php';
|
||||
$config->delete['17_2'][] = 'extension/lite/extension/lite/workflowrule/ext/view/view.flow.html.hook.php';
|
||||
|
||||
$config->upgrade->openModules = array('action', 'admin', 'api', 'automation', 'backup', 'block', 'branch', 'budget', 'bug', 'build', 'caselib', 'ci', 'client', 'common', 'company', 'compile', 'convert', 'cron', 'custom', 'datatable', 'dept', 'design', 'dev', 'doc', 'durationestimation', 'entry', 'execution', 'extension', 'file', 'git', 'gitlab', 'group', 'holiday', 'im', 'index', 'index.html', 'install', 'issue', 'jenkins', 'job', 'kanban', 'license', 'mail', 'message', 'misc', 'mr', 'my', 'personnel', 'pipeline', 'product', 'productplan', 'productset', 'program', 'programplan', 'project', 'projectbuild', 'projectrelease', 'projectstory', 'qa', 'release', 'repo', 'report', 'risk', 'score', 'search', 'setting', 'sonarqube', 'sso', 'stage', 'stakeholder', 'story', 'subject', 'svn', 'task', 'testcase', 'testreport', 'testsuite', 'testtask', 'todo', 'tree', 'tutorial', 'upgrade', 'user', 'webhook', 'weekly', 'workestimation', 'gitea', 'gogs', 'port');
|
||||
$config->upgrade->openModules = array('action', 'admin', 'api', 'automation', 'backup', 'block', 'branch', 'budget', 'bug', 'build', 'caselib', 'ci', 'client', 'common', 'company', 'compile', 'convert', 'cron', 'custom', 'datatable', 'dept', 'design', 'dev', 'doc', 'durationestimation', 'entry', 'execution', 'executionnode', 'extension', 'file', 'git', 'gitlab', 'group', 'gitea', 'gogs', 'holiday', 'im', 'index', 'index.html', 'install', 'issue', 'jenkins', 'job', 'kanban', 'license', 'mail', 'message', 'misc', 'mr', 'my', 'personnel', 'pipeline', 'product', 'productplan', 'productset', 'program', 'programplan', 'project', 'projectbuild', 'projectrelease', 'projectstory', 'qa', 'release', 'repo', 'report', 'risk', 'score', 'search', 'setting', 'sonarqube', 'sso', 'stage', 'stakeholder', 'story', 'subject', 'svn', 'task', 'testcase', 'testreport', 'testsuite', 'testtask', 'todo', 'tree', 'tutorial', 'upgrade', 'user', 'webhook', 'weekly', 'workestimation', 'port', 'zahost');
|
||||
|
||||
$config->upgrade->unsetModules = array('design', 'program', 'programplan', 'projectbuild', 'projectrelease', 'stage', 'stakeholder', 'product', 'branch', 'productplan', 'release', 'build', 'qa', 'bug', 'testcase', 'testtask', 'testreport', 'testsuite', 'caselib', 'automation', 'repo', 'ci', 'compile', 'jenkins', 'job', 'svn', 'gitlab', 'sonarqube', 'mr', 'git', 'report', 'sqlbuilder', 'feedback', 'faq', 'attend', 'holiday', 'leave', 'makeup', 'overtime', 'lieu', 'ops', 'host', 'serverroom', 'account', 'domain', 'service', 'deploy', 'conference', 'traincourse', 'pssp', 'baseline', 'classify', 'cm', 'cmcl', 'auditcl', 'reviewcl', 'process', 'activity', 'zoutput', 'auditplan', 'nc', 'subject', 'weekly', 'workestimation', 'issue', 'durationestimation', 'risk', 'opportunity', 'trainplan', 'gapanalysis', 'researchplan', 'researchreport', 'meeting', 'meetingroom', 'budget', 'reviewissue', 'reviewsetting', 'review', 'milestone', 'measurement', 'measrecord', 'assetlib', 'setting', 'im', 'client', 'ldap', 'dev', 'api', 'gitea', 'gogs');
|
||||
$config->upgrade->unsetModules = array('design', 'program', 'programplan', 'projectbuild', 'projectrelease', 'stage', 'stakeholder', 'product', 'branch', 'productplan', 'release', 'build', 'qa', 'bug', 'testcase', 'testtask', 'testreport', 'testsuite', 'caselib', 'automation', 'repo', 'ci', 'compile', 'jenkins', 'job', 'svn', 'gitlab', 'sonarqube', 'mr', 'git', 'report', 'sqlbuilder', 'feedback', 'faq', 'attend', 'holiday', 'leave', 'makeup', 'overtime', 'lieu', 'ops', 'host', 'serverroom', 'account', 'domain', 'service', 'deploy', 'conference', 'traincourse', 'pssp', 'baseline', 'classify', 'cm', 'cmcl', 'auditcl', 'reviewcl', 'process', 'activity', 'zoutput', 'auditplan', 'nc', 'subject', 'weekly', 'workestimation', 'issue', 'durationestimation', 'risk', 'opportunity', 'trainplan', 'gapanalysis', 'researchplan', 'researchreport', 'meeting', 'meetingroom', 'budget', 'reviewissue', 'reviewsetting', 'review', 'milestone', 'measurement', 'measrecord', 'assetlib', 'setting', 'im', 'client', 'ldap', 'dev', 'api', 'gitea', 'gogs', 'executionnode', 'zahost');
|
||||
|
||||
global $lang;
|
||||
$config->upgrade->defaultActions = array();
|
||||
|
||||
Reference in New Issue
Block a user