Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/285

This commit is contained in:
tianshujie
2023-02-15 08:19:27 +08:00
56 changed files with 309 additions and 221 deletions
+3 -1
View File
@@ -1,3 +1,5 @@
ALTER TABLE `zt_project` drop COLUMN `product`, drop COLUMN `statge`, drop COLUMN `storyConcept`;
ALTER TABLE `zt_project` drop COLUMN `product`;
ALTER TABLE `zt_project` drop COLUMN `statge`;
ALTER TABLE `zt_project` drop COLUMN `storyConcept`;
ALTER TABLE `zt_product` drop COLUMN `storyConcept`;
UPDATE zt_todo SET assignedTo=account,assignedBy=account,assignedDate=`date` WHERE assignedTo='';
File diff suppressed because one or more lines are too long
+87
View File
@@ -125,3 +125,90 @@ REPLACE INTO `zt_chart` (`id`, `name`, `dimension`, `type`, `group`, `dataset`,
(1081,'年度新增-执行年度新增和完成趋势图',1,'line',0,'','','{\r\n \"xaxis\":[{\"field\":\"month\",\"name\":\"月份\",\"group\":\"value\"}],\r\n \"yaxis\":[{\"type\":\"value\",\"field\":\"newExecution\",\"agg\":\"value\",\"name\":\"新增执行数\",\"valOrAgg\":\"value\"},\r\n {\"type\":\"value\",\"field\":\"closedExecution\",\"agg\":\"value\",\"name\":\"完成执行数\",\"valOrAgg\":\"value\"}\r\n]}','',NULL,'SELECT t1.year, CONCAT(t1.month, \'月\') AS `month`, IFNULL(t2.execution, 0) AS newExecution, IFNULL(t3.execution, 0) AS closedExecution\r\nFROM (SELECT DISTINCT YEAR(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\r\nLEFT JOIN (SELECT YEAR(openedDate) AS `year`, MONTH(openedDate) AS `month`, COUNT(1) AS execution FROM zt_project WHERE deleted = \'0\' AND type IN (\'sprint\', \'stage\', \'kanban\') AND multiple = \'1\' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\r\nLEFT JOIN (SELECT YEAR(closedDate) AS `year`, MONTH(closedDate) AS `month`, COUNT(1) AS execution FROM zt_project WHERE deleted = \'0\' AND type IN (\'sprint\', \'stage\', \'kanban\') AND status = \'closed\' AND multiple = \'1\' GROUP BY `year`, `month`) AS t3 ON t1.year = t3.year AND t1.month = t3.month\r\nORDER BY `year`, t1.month',1,'','','0000-00-00 00:00:00','','0000-00-00 00:00:00',0),
(1082,'年度新增-产品发布次数年度趋势图',1,'line',0,'','','{\r\n \"xaxis\":[{\"field\":\"month\",\"name\":\"月份\",\"group\":\"value\"}],\r\n \"yaxis\":[{\"type\":\"value\",\"field\":\"release\",\"agg\":\"value\",\"name\":\"发布次数\",\"valOrAgg\":\"value\"}\r\n]}','',NULL,'SELECT t1.year, CONCAT(t1.month, \'月\') AS `month`, IFNULL(t2.release, 0) AS `release`\r\nFROM (SELECT DISTINCT Year(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\r\nLEFT JOIN (SELECT YEAR(createdDate) AS `year`, MONTH(createdDate) AS `month`, COUNT(1) AS `release` FROM zt_release WHERE deleted = \'0\' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\r\nORDER BY `year`, t1.month',1,'','','0000-00-00 00:00:00','','0000-00-00 00:00:00',0),
(1083,'年度新增-年度投入产出比',1,'line',0,'','','{\r\n \"xaxis\":[{\"field\":\"month\",\"name\":\"月份\",\"group\":\"value\"}],\r\n \"yaxis\":[{\"type\":\"value\",\"field\":\"ratio\",\"agg\":\"value\",\"name\":\"投入产出比\",\"valOrAgg\":\"value\"},\r\n{\"type\":\"value\",\"field\":\"story\",\"agg\":\"value\",\"name\":\"需求交付\",\"valOrAgg\":\"value\"},\r\n{\"type\":\"value\",\"field\":\"consumed\",\"agg\":\"value\",\"name\":\"工时消耗\",\"valOrAgg\":\"value\"}\r\n]}','',NULL,'SELECT t1.`year`, CONCAT(t1.`month`, \'月\') AS `month`, IFNULL(t2.story, 0) AS story, IFNULL(t3.consumed, 0) AS consumed, ROUND(IF(IFNULL(t3.consumed, 0) = 0, 0, IFNULL(t2.story, 0) / IFNULL(t3.consumed, 0)), 2) AS ratio\r\nFROM (SELECT YEAR(`date`) AS \'year\', MONTH(`date`) AS \'month\' FROM zt_action GROUP BY `year`,`month`) AS t1\r\nLEFT JOIN (SELECT ROUND(SUM(estimate)) AS story, YEAR(`closedDate`) AS \'year\', MONTH(`closedDate`) AS \'month\' FROM zt_story WHERE deleted = \'0\' AND closedReason = \'done\' AND status = \'closed\' GROUP BY `year`,`month`) AS t2 ON t1.`year` = t2.`year` AND t1.`month` = t2.`month`\r\nLEFT JOIN (SELECT ROUND(SUM(consumed)) as consumed, YEAR(`date`) as \'year\', MONTH(`date`) AS \'month\' FROM zt_effort WHERE deleted = \'0\' GROUP BY `year`,`month`) AS t3 ON t1.`year` = t3.`year` AND t1.`month` = t3.`month`',1,'','','0000-00-00 00:00:00','','0000-00-00 00:00:00',0);
REPLACE INTO `zt_workflow` (`parent`, `child`, `type`, `navigator`, `app`, `position`, `module`, `table`, `name`, `flowchart`, `js`, `css`, `order`, `buildin`, `administrator`, `desc`, `version`, `status`, `approval`, `vision`, `createdBy`, `createdDate`, `editedBy`, `editedDate`, `titleField`, `contentField`) VALUES
('', '', 'flow', 'secondary', 'feedback', '', 'ticket', 'zt_ticket', '工单', '', '', '', 0, 1, '', '', '1.0', 'normal', 'disabled', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', '', ''),
('', '', 'flow', 'secondary', 'feedback', '', 'ticket', 'zt_ticket', '工单', '', '', '', 0, 1, '', '', '1.0', 'normal', 'disabled', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', '', '');
REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `control`, `expression`, `options`, `default`, `rules`, `placeholder`, `canExport`, `canSearch`, `isValue`, `order`, `searchOrder`, `exportOrder`, `buildin`, `role`, `desc`, `readonly`, `createdBy`, `createdDate`, `editedBy`, `editedDate`) VALUES
('ticket', 'id', 'mediumint', '8', '编号', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'product', 'mediumint', '8', '所属产品', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'module', 'mediumint', '8', '所属模块', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'title', 'varchar', '255', '标题', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'type', 'varchar', '30', '类型', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'desc', 'text', '', '描述', 'textarea', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'openedBuild', 'varchar', '255', '影响版本', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'feedback', 'mediumint', '8', '来源反馈', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'assignedTo', 'varchar', '255', '指派给', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'assignedDate', 'datetime', '', '指派日期', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'realStarted', 'datetime', '', '实际开始', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'startedBy', 'varchar', '255', '由谁开始', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'startedDate', 'datetime', '', '开始日期', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'deadline', 'date', '', '截止日期', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'pri', 'tinyint', '3', '优先级', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'estimate', 'float', '', '最初预计', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'left', 'float', '', '预计剩余', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'status', 'varchar', '255', '状态', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'subStatus', 'varchar', '30', '子状态', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 0, 'buildin', '', '0', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'openedBy', 'varchar', '30', '由谁创建', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'openedDate', 'datetime', '', '创建日期', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'activatedCount', 'int', '10', '激活次数', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'activatedBy', 'varchar', '30', '由谁激活', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'activatedDate', 'datetime', '', '激活日期', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'closedBy', 'varchar', '30', '由谁关闭', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'closedDate', 'datetime', '', '关闭日期', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'closedReason', 'varchar', '30', '关闭原因', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'finishedBy', 'varchar', '30', '由谁完成', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'finishedDate', 'datetime', '', '完成日期', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'resolvedBy', 'varchar', '30', '由谁解决', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'resolvedDate', 'datetime', '', '解决日期', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'resolution', 'varchar', '1000', '解决方案', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'editedBy', 'varchar', '30', '由谁编辑', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'editedDate', 'datetime', '', '编辑日期', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'keywords', 'varchar', '255', '关键词', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'repeatTicket', 'mediumint', '8', '重复工单', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'mailto', 'varchar', '255', '抄送给', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'consumed', 'float', '', '消耗', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('ticket', 'deleted', 'enum', '', '是否删除', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00');
REPLACE INTO `zt_workflowaction` (`module`, `action`, `name`, `type`, `batchMode`, `extensionType`, `open`, `position`, `layout`, `show`, `order`, `buildin`, `role`, `virtual`, `conditions`, `verifications`, `hooks`, `linkages`, `js`, `css`, `toList`, `blocks`, `desc`, `status`, `vision`, `createdBy`, `createdDate`, `editedBy`, `editedDate`, `method`) VALUES
('ticket', 'browse', '浏览工单', 'batch', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'browse'),
('ticket', 'create', '创建工单', 'single', 'different', 'none', 'normal', 'browse', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'create'),
('ticket', 'edit', '编辑工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'edit'),
('ticket', 'batchedit', '批量编辑', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
('ticket', 'start', '开始工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
('ticket', 'finish', '完成工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
('ticket', 'activate', '激活工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
('ticket', 'assign', '指派工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
('ticket', 'close', '关闭工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
('ticket', 'view', '工单详情', 'single', 'different', 'none', 'normal', 'browse', 'side', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'view'),
('ticket', 'browse', '浏览工单', 'batch', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'browse'),
('ticket', 'create', '创建工单', 'single', 'different', 'none', 'normal', 'browse', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'create'),
('ticket', 'edit', '编辑工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'edit'),
('ticket', 'batchedit', '批量编辑', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
('ticket', 'start', '开始工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
('ticket', 'finish', '完成工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
('ticket', 'activate', '激活工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
('ticket', 'assign', '指派工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
('ticket', 'close', '关闭工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
('ticket', 'view', '工单详情', 'single', 'different', 'none', 'normal', 'browse', 'side', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'view');
UPDATE `zt_workflowfield` SET `name` = '类型' WHERE `module` = 'feedback' and `field` = 'type';
UPDATE `zt_workflowfield` SET `name` = '创建者' WHERE `module` = 'feedback' and `field` = 'openedBy';
UPDATE `zt_workflowfield` SET `name` = '创建时间' WHERE `module` = 'feedback' and `field` = 'openedDate';
UPDATE `zt_workflowfield` SET `name` = '反馈邮箱' WHERE `module` = 'feedback' and `field` = 'notifyEmail';
UPDATE `zt_workflowfield` SET `name` = '最后操作' WHERE `module` = 'feedback' and `field` = 'editedBy';
UPDATE `zt_workflowfield` SET `name` = '最后操作时间' WHERE `module` = 'feedback' and `field` = 'editedDate';
REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `control`, `expression`, `options`, `default`, `rules`, `placeholder`, `canExport`, `canSearch`, `isValue`, `order`, `searchOrder`, `exportOrder`, `buildin`, `role`, `desc`, `readonly`, `createdBy`, `createdDate`, `editedBy`, `editedDate`) VALUES
('feedback', 'pri', 'tinyint', '3', '优先级', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('feedback', 'source', 'varchar', '30', '来源公司', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('feedback', 'repeatFeedback', 'varchar', '30', '重复反馈', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('feedback', 'activatedBy', 'varchar', '30', '由谁激活', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
('feedback', 'activatedDate', 'datetime', '', '激活时间', 'datetime', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00');
REPLACE INTO `zt_workflowaction` (`module`, `action`, `name`, `type`, `batchMode`, `extensionType`, `open`, `position`, `layout`, `show`, `order`, `buildin`, `role`, `virtual`, `conditions`, `verifications`, `hooks`, `linkages`, `js`, `css`, `toList`, `blocks`, `desc`, `status`, `vision`, `createdBy`, `createdDate`, `editedBy`, `editedDate`, `method`) VALUES
('feedback', 'activate', '激活反馈', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'activate'),
('feedback', 'import', '导入', 'single', 'different', 'none', 'normal', 'browse', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'import'),
('feedback', 'exporttemplate', '导出模板', 'single', 'different', 'none', 'normal', 'browse', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'exporttemplate'),
('feedback', 'batchclose', '批量关闭', 'batch', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'batchclose');
+22 -22
View File
@@ -851,7 +851,7 @@ class baseJS
$message = str_replace("\\'", "'", $message);
$message = str_replace("'", "\\'", $message);
return self::start($full) . "alert('" . $message . "')" . self::end() . self::resetForm();
return static::start($full) . "alert('" . $message . "')" . static::end() . static::resetForm();
}
/**
@@ -864,7 +864,7 @@ class baseJS
*/
static public function close()
{
return self::start() . "window.close()" . self::end();
return static::start() . "window.close()" . static::end();
}
/**
@@ -903,7 +903,7 @@ class baseJS
{
$alertMessage = $message;
}
return self::alert($alertMessage, $full);
return static::alert($alertMessage, $full);
}
/**
@@ -916,7 +916,7 @@ class baseJS
*/
static public function resetForm()
{
return self::start() . 'if(window.parent) window.parent.$.enableForm();' . self::end();
return static::start() . 'if(window.parent) window.parent.$.enableForm();' . static::end();
}
/**
@@ -954,7 +954,7 @@ class baseJS
return json_encode($output);
}
$js = self::start();
$js = static::start();
$confirmAction = '';
if(strtolower($okURL) == "back")
@@ -1001,7 +1001,7 @@ EOT;
$js .= $confirmAction;
}
$js .= self::end();
$js .= static::end();
return $js;
}
@@ -1038,7 +1038,7 @@ EOT;
return json_encode($output);
}
$js = self::start();
$js = static::start();
if(strtolower($url) == "back")
{
$js .= "history.back(-1);\n";
@@ -1053,7 +1053,7 @@ EOT;
if(strpos($url, '#app=') !== false) $url = substr($url, 0, strpos($url, '#app='));
$js .= "$target.location='$url';\n";
}
return $js . self::end();
return $js . static::end();
}
/**
@@ -1066,7 +1066,7 @@ EOT;
*/
static public function closeWindow()
{
return self::start(). "window.close();" . self::end();
return static::start(). "window.close();" . static::end();
}
/**
@@ -1082,9 +1082,9 @@ EOT;
*/
static public function refresh($url, $target = "self", $time = 3000)
{
$js = self::start();
$js = static::start();
$js .= "setTimeout(\"$target.location='$url'\", $time);";
$js .= self::end();
$js .= static::end();
return $js;
}
@@ -1099,7 +1099,7 @@ EOT;
*/
static public function reload($window = 'self')
{
$js = self::start();
$js = static::start();
// See bug #2379 http://pms.zentao.net/bug-view-2379.html
if($window !== 'self' && $window !== 'window')
{
@@ -1109,7 +1109,7 @@ EOT;
{
$js .= "$window.location.reload(true);\n";
}
$js .= self::end();
$js .= static::end();
return $js;
}
@@ -1125,7 +1125,7 @@ EOT;
*/
static public function closeColorbox($window = 'self')
{
return self::closeModal($window);
return static::closeModal($window);
}
/**
@@ -1141,10 +1141,10 @@ EOT;
*/
static public function closeModal($window = 'self', $location = 'this', $callback = 'null')
{
$js = self::start();
$js = static::start();
$js .= "if($window.location.href == self.location.href){ $window.window.close();}";
$js .= "else{ $window.$.cookie('selfClose', 1);$window.$.closeModal($callback, '$location');}";
$js .= self::end();
$js .= static::end();
return $js;
}
@@ -1201,10 +1201,10 @@ EOT;
$jsLang->expand = isset($lang->expand) ? $lang->expand : '';
$jsLang->timeout = isset($lang->timeout) ? $lang->timeout : '';
$js = self::start(false);
$js = static::start(false);
$js .= 'window.config=' . json_encode($jsConfig) . ";\n";
$js .= 'window.lang=' . json_encode($jsLang) . ";\n";
$js .= self::end();
$js .= static::end();
echo $js;
}
@@ -1219,9 +1219,9 @@ EOT;
*/
static public function execute($code)
{
$js = self::start($full = false);
$js = static::start($full = false);
$js .= $code;
$js .= self::end();
$js .= static::end();
echo $js;
}
@@ -1241,7 +1241,7 @@ EOT;
$prefix = (isset($config->framework->jsWithPrefix) and $config->framework->jsWithPrefix == false) ? '' : 'v.';
static $viewOBJOut;
$js = self::start(false);
$js = static::start(false);
if(!$viewOBJOut and $prefix)
{
$js .= 'if(typeof(v) != "object") v = {};';
@@ -1278,7 +1278,7 @@ EOT;
$value = addslashes($value);
$js .= "{$prefix}{$key} = '{$value}';";
}
$js .= self::end($newline = false);
$js .= static::end($newline = false);
echo $js;
}
}
+36 -1
View File
@@ -404,7 +404,42 @@ class js extends baseJS
*/
static public function openEntry($app, $url)
{
return self::start() . "$.apps.open('$url', '$app')" . self::end();
return static::start() . "$.apps.open('$url', '$app')" . static::end();
}
/**
* Generate the start of a js block, injects code for zentao client.
*
* @param bool $full
* @static
* @access public
* @return string
*/
static public function start($full = true)
{
if($full)
{
$document = "<html><meta charset='utf-8'/><style>body{background:white}</style><script>";
if(strpos($_SERVER['HTTP_USER_AGENT'], 'xuanxuan') != false)
{
/* Inject handler for confirm, prompt and alert. */
$document .= <<<EOT
window.confirm = function() {
console.warn('\"window.confirm\" is disabled in webview.');
return true;
};
window.prompt = function() {
console.warn('\"window.prompt\" is disabled in webview.');
};
window.alert = function(msg) {
const win = window.parent ? window.parent : window;
win.open(`xxc://webview/alert/\${encodeURIComponent(msg)}`, '_blank');
};
EOT;
}
return $document;
}
return '<script>';
}
}
+2 -1
View File
@@ -780,13 +780,14 @@ class gitlab
}
else
{
$response = commonModel::http($api);
list($response, $httpCode) = commonModel::http($api, null, array(), array(), 'data', 'Post', 30, true);
if(!empty(commonModel::$requestErrors))
{
commonModel::$requestErrors = array();
return array();
}
if($httpCode == 500) return array();
return json_decode($response);
}
}
+2 -2
View File
@@ -135,8 +135,8 @@ $lang->admin->safe->modeList[0] = 'N/A';
$lang->admin->safe->modeList[1] = 'Medium';
$lang->admin->safe->modeList[2] = 'Stark';
$lang->admin->safe->modeRuleList[1] = 'Beinhaltet Groß und Kleinbuchstaben sowie Ziffern. Länge >= 6.';
$lang->admin->safe->modeRuleList[2] = 'Beinhaltet Groß und Kleinbuchstaben, Ziffern sowie Sonderzeichen. Länge >= 10.';
$lang->admin->safe->modeRuleList[1] = 'Beinhaltet Groß und Kleinbuchstaben sowie Ziffern. Länge ≥ 6.';
$lang->admin->safe->modeRuleList[2] = ' ≥ 10 letters, combination of uppercase, lowercase letters, numbers, and special symbols.';
$lang->admin->safe->reasonList['weak'] = 'Bekannte Schwache Passwörter';
$lang->admin->safe->reasonList['account'] = 'Entspricht ihrem Konto';
+2 -2
View File
@@ -135,8 +135,8 @@ $lang->admin->safe->modeList[0] = 'I don\'t care.';
$lang->admin->safe->modeList[1] = 'Medium';
$lang->admin->safe->modeList[2] = 'Strong';
$lang->admin->safe->modeRuleList[1] = ' >= 6 upper and lower case, and numbers.';
$lang->admin->safe->modeRuleList[2] = ' >= 10 upper and lower case, numbers and special characters.';
$lang->admin->safe->modeRuleList[1] = ' ≥ 6 upper and lower case, and numbers.';
$lang->admin->safe->modeRuleList[2] = ' ≥ 10 letters, combination of uppercase, lowercase letters, numbers, and special symbols.';
$lang->admin->safe->reasonList['weak'] = 'Common Weak Password';
$lang->admin->safe->reasonList['account'] = 'Same as account';
+2 -2
View File
@@ -135,8 +135,8 @@ $lang->admin->safe->modeList[0] = "Contrôle Modéré";
$lang->admin->safe->modeList[1] = 'Contrôle Moyen';
$lang->admin->safe->modeList[2] = 'Contrôle Fort';
$lang->admin->safe->modeRuleList[1] = ' >= 6 Majuscules, minuscules et chiffres.';
$lang->admin->safe->modeRuleList[2] = ' >= 10 Majuscules, minuscules, chiffres et caractères spéciaux.';
$lang->admin->safe->modeRuleList[1] = ' ≥ 6 Majuscules, minuscules et chiffres.';
$lang->admin->safe->modeRuleList[2] = ' ≥ 10 letters, combination of uppercase, lowercase letters, numbers, and special symbols.';
$lang->admin->safe->reasonList['weak'] = 'Mots de passe faibles courants';
$lang->admin->safe->reasonList['account'] = 'Identique au compte';
+1 -1
View File
@@ -136,7 +136,7 @@ $lang->admin->safe->modeList[1] = '中';
$lang->admin->safe->modeList[2] = '强';
$lang->admin->safe->modeRuleList[1] = '6位及以上,包含大小写字母,数字。';
$lang->admin->safe->modeRuleList[2] = '10位及以上,包含字母,数字,特殊字符。';
$lang->admin->safe->modeRuleList[2] = '10位及以上,包含大小写字母,数字,特殊字符。';
$lang->admin->safe->reasonList['weak'] = '常用弱口令';
$lang->admin->safe->reasonList['account'] = '与帐号相同';
+1 -1
View File
@@ -166,7 +166,7 @@ class blockModel extends model
{
$data = array();
$tasks = $this->dao->select("count(t1.id) as tasks, count(if(t1.status = 'done', 1, null)) as doneTasks")->from(TABLE_TASK)->alias('t1')
$tasks = $this->dao->select("count(distinct t1.id) as tasks, count(distinct if(t1.status = 'done', 1, null)) as doneTasks")->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on("t1.project = t2.id")
->leftJoin(TABLE_EXECUTION)->alias('t3')->on("t1.execution = t3.id")
->leftJoin(TABLE_TASKTEAM)->alias('t4')->on("t4.task = t1.id and t4.account = '{$this->app->user->account}'")
+2 -2
View File
@@ -10,7 +10,7 @@
</div>
<style>
.flow-chart-row {display: flex; gap: 5px; margin-bottom: 9px; width: 100%;}
.flow-item {background: url('/static/svg/arrow-blue.svg') center no-repeat; background-size: contain; text-align: center; margin: 0; padding-right: 15px; flex:0 1 16%; position: relative; padding: 5px 0 5px 8px; white-space:nowrap; overflow: hidden; color: #3c4353; display: flex; align-items: center; text-align: center; padding-right: 10px;}
.flow-item {background: url('static/svg/arrow-blue.svg') center no-repeat; background-size: cover; text-align: center; margin: 0; padding-right: 15px; flex:0 1 15%; position: relative; padding: 5px 0 5px 8px; white-space:nowrap; overflow: hidden; color: #3c4353; display: flex; align-items: center; text-align: center; padding-right: 10px;}
.ie-8 .flow-item > div:before {display: none}
.flow-item > div:before {border-left-color: #fff; z-index: 1}
.flow-item > div > div {display: flow-root; overflow: hidden;}
@@ -22,7 +22,7 @@
.flow-item-2,
.flow-item-3,
.flow-item-4,
.flow-item-5 {background-image: url('/static/svg/arrow-white.svg'); }
.flow-item-5 {background-image: url('static/svg/arrow-white.svg'); }
.block-sm .flow-item {padding-right: 5px}
.block-sm .flow-item > div:before, .block-sm .flow-item > div:after {border-width: 15px 0 15px 6px;}
+1 -1
View File
@@ -288,7 +288,7 @@ class bug extends control
}
$project = $this->loadModel('project')->getByShadowProduct($productID);
if(!$project->multiple) unset($this->lang->bug->report->charts['bugsPerExecution']);
if(!empty($project) and !$project->multiple) unset($this->lang->bug->report->charts['bugsPerExecution']);
$this->qa->setMenu($this->products, $productID, $branchID);
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->common . $this->lang->colon . $this->lang->bug->reportChart;
+1
View File
@@ -224,6 +224,7 @@ $lang->bug->tplResult = "<p>[Results]</p><br/>";
$lang->bug->tplExpect = "<p>[Expectations]</p><br/>";
/* Value list for each field. */
$lang->bug->severityList[0] = '';
$lang->bug->severityList[1] = '1';
$lang->bug->severityList[2] = '2';
$lang->bug->severityList[3] = '3';
+1
View File
@@ -224,6 +224,7 @@ $lang->bug->tplResult = "<p>[Results]</p><br/>";
$lang->bug->tplExpect = "<p>[Expectations]</p><br/>";
/* Value list for each field. */
$lang->bug->severityList[0] = '';
$lang->bug->severityList[1] = '1';
$lang->bug->severityList[2] = '2';
$lang->bug->severityList[3] = '3';
+1
View File
@@ -224,6 +224,7 @@ $lang->bug->tplResult = "<p>[Résultats]</p><br/>";
$lang->bug->tplExpect = "<p>[Résultats attendus]</p><br/>";
/* Value list for each field. */
$lang->bug->severityList[0] = '';
$lang->bug->severityList[1] = '1';
$lang->bug->severityList[2] = '2';
$lang->bug->severityList[3] = '3';
+1
View File
@@ -194,6 +194,7 @@ $lang->bug->tplResult = "<p>[Kết quả]</p><br/>";
$lang->bug->tplExpect = "<p>[Kỳ vọng]</p><br/>";
/* Value list for each field. */
$lang->bug->severityList[0] = '';
$lang->bug->severityList[1] = '1';
$lang->bug->severityList[2] = '2';
$lang->bug->severityList[3] = '3';
+1
View File
@@ -224,6 +224,7 @@ $lang->bug->tplResult = "<p>[结果]</p><br/>";
$lang->bug->tplExpect = "<p>[期望]</p><br/>";
/* 各个字段取值列表。*/
$lang->bug->severityList[0] = '';
$lang->bug->severityList[1] = '1';
$lang->bug->severityList[2] = '2';
$lang->bug->severityList[3] = '3';
+1
View File
@@ -209,6 +209,7 @@ $lang->bug->tplResult = "<p>[結果]</p><br/>";
$lang->bug->tplExpect = "<p>[期望]</p><br/>";
/* 各個欄位取值列表。*/
$lang->bug->severityList[0] = '';
$lang->bug->severityList[1] = '1';
$lang->bug->severityList[2] = '2';
$lang->bug->severityList[3] = '3';
+1
View File
@@ -209,6 +209,7 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
$hasCustomSeverity = false;
foreach($lang->bug->severityList as $severityKey => $severityValue)
{
if(empty($severityValue)) unset($lang->bug->severityList[$severityKey]);
if(!empty($severityKey) and (string)$severityKey != (string)$severityValue)
{
$hasCustomSeverity = true;
+1 -1
View File
@@ -65,7 +65,7 @@ class buildModel extends model
{
return $this->dao->select('t1.*, t2.name as executionName, t2.id as executionID, t2.deleted as executionDeleted, t3.name as productName')
->from(TABLE_BUILD)->alias('t1')
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.execution = t2.id')
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.execution = 0 or t1.execution = t2.id')
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product = t3.id')
->where('t1.deleted')->eq(0)
->andWhere('t1.project')->ne(0)
+13 -5
View File
@@ -1219,8 +1219,9 @@ class commonModel extends model
}
else
{
$subModule = isset($dropMenuItem['subModule']) ? explode(',', $dropMenuItem['subModule']) : array();
if($subModule and in_array($currentModule, $subModule) and strpos(",$exclude,", ",$currentModule-$currentMethod,") === false) $activeMainMenu = true;
$subModule = isset($dropMenuItem['subModule']) ? explode(',', $dropMenuItem['subModule']) : array();
$subExclude = isset($dropMenuItem['exclude']) ? $dropMenuItem['exclude'] : $exclude;
if($subModule and in_array($currentModule, $subModule) and strpos(",$subExclude,", ",$currentModule-$currentMethod,") === false) $activeMainMenu = true;
}
if($activeMainMenu)
@@ -2662,7 +2663,11 @@ EOD;
if($this->app->user->account == $program->openedBy or $this->app->user->account == $program->PM) $program->auth = 'extend';
if($program->auth == 'extend') $this->app->user->rights['rights'] = array_merge_recursive($programRightGroup, $rights);
if($program->auth == 'extend')
{
$this->app->user->rights['rights'] = array_merge_recursive($programRightGroup, $rights);
$this->session->set('user', $this->app->user);
}
if($program->auth == 'reset')
{
/* If priv way is reset, unset common program priv, and cover by program priv. */
@@ -3207,11 +3212,13 @@ EOD;
* @param array $headers Set request headers.
* @param string $dataType
* @param string $method POST|PATCH|PUT
* @param int $timeout
* @param bool $httpCode
* @static
* @access public
* @return string
*/
public static function http($url, $data = null, $options = array(), $headers = array(), $dataType = 'data', $method = 'POST', $timeout = 30)
public static function http($url, $data = null, $options = array(), $headers = array(), $dataType = 'data', $method = 'POST', $timeout = 30, $httpCode = false)
{
global $lang, $app;
if(!extension_loaded('curl'))
@@ -3258,6 +3265,7 @@ EOD;
$response = curl_exec($curl);
$errors = curl_error($curl);
if($httpCode) $httpCode = curl_getinfo($curl,CURLINFO_HTTP_CODE);
curl_close($curl);
$logFile = $app->getLogRoot() . 'saas.'. date('Ymd') . '.log.php';
@@ -3276,7 +3284,7 @@ EOD;
if($errors) commonModel::$requestErrors[] = $errors;
return $response;
return $httpCode ? array($response, $httpCode) : $response;
}
/**
+2 -2
View File
@@ -159,13 +159,13 @@ class gitModel extends model
$lastInDB = $this->repo->getLatestCommit($repo->id);
/* Ignore unsynced branch. */
if(empty($lastInDB))
if($repo->synced != 1)
{
if($printLog) $this->printLog("Please init repo {$repo->name}");
continue;
}
$version = (int)$lastInDB->commit + 1;
$version = isset($lastInDB->commit) ? (int)$lastInDB->commit + 1 : 1;
$logs = $this->repo->getUnsyncedCommits($repo);
$objects = array();
if(!empty($logs))
+3 -3
View File
@@ -1879,7 +1879,7 @@ class mrModel extends model
$relation->BID = $storyID;
$this->dao->replace(TABLE_RELATION)->data($relation)->exec();
$this->action->create('story', $linkID, 'createmr', '', $MRCreateAction);
$this->action->create('story', $storyID, 'createmr', '', $MRCreateAction);
}
foreach($bugs as $bugID)
@@ -1893,7 +1893,7 @@ class mrModel extends model
$relation->BID = $bugID;
$this->dao->replace(TABLE_RELATION)->data($relation)->exec();
$this->action->create('bug', $linkID, 'createmr', '', $MRCreateAction);
$this->action->create('bug', $bugID, 'createmr', '', $MRCreateAction);
}
foreach($tasks as $taskID)
@@ -1907,7 +1907,7 @@ class mrModel extends model
$relation->BID = $taskID;
$this->dao->replace(TABLE_RELATION)->data($relation)->exec();
$this->action->create('task', $linkID, 'createmr', '', $MRCreateAction);
$this->action->create('task', $taskID, 'createmr', '', $MRCreateAction);
}
}
-7
View File
@@ -69,13 +69,6 @@ $(function()
infoShowed = true;
}
if(href !== '')
{
type = href == '#stories' ? 'story' : (href == '#bugs' ? 'bug' : 'planInfo');
var viewLink = createLink('productplan', 'view', 'planID=' + planID + '&type=' + type + (typeof(param) == 'undefined' ? '' : param) + (typeof(orderBy) == 'undefined' ? '' : "&orderBy=" + orderBy));
if(type == 'planInfo') viewLink = createLink('productplan', 'view', 'planID=' + planID + '&type=' + type);
self.location.href = viewLink;
}
});
$('#storyList').on('sort.sortable', function(e, data)
+4 -2
View File
@@ -114,10 +114,12 @@ class productplanModel extends model
$productplanQuery = $this->session->productplanQuery;
$date = date('Y-m-d');
$plans = $this->dao->select('*')->from(TABLE_PRODUCTPLAN)
$date = date('Y-m-d');
$products = (strpos($param, 'noproduct') !== false and empty($product)) ? $this->loadModel('product')->getList() : array(0);
$plans = $this->dao->select('*')->from(TABLE_PRODUCTPLAN)
->where('deleted')->eq(0)
->beginIF(strpos($param, 'noproduct') === false or !empty($product))->andWhere('product')->eq($product)->fi()
->beginIF(strpos($param, 'noproduct') !== false and empty($product))->andWhere('product')->in(array_keys($products))->fi()
->beginIF(!empty($branch) and $branch != 'all')->andWhere('branch')->eq($branch)->fi()
->beginIF(strpos(',all,undone,bySearch,review,', ",$browseType,") === false)->andWhere('status')->eq($browseType)->fi()
->beginIF($browseType == 'undone')->andWhere('status')->in('wait,doing')->fi()
+2 -2
View File
@@ -162,7 +162,7 @@
</div>
</td>
<td class='<?php echo $hideAttribute?> <?php echo zget($visibleFields, 'attribute', ' hidden') . zget($requiredFields, 'attribute', '', ' required');?>'><?php echo html::select("attributes[$i]", $lang->stage->typeList, '', "class='form-control'");?></td>
<td <?php echo zget($visibleFields, 'acl', ' hidden') . zget($requiredFields, 'acl', '', ' required');?>><?php echo html::select("acl[$i]", $lang->execution->aclList, 'open', "class='form-control' $class");?></td>
<td <?php echo zget($visibleFields, 'acl', ' hidden') . zget($requiredFields, 'acl', '', ' required');?>><?php echo html::select("acl[$i]", $lang->execution->aclList, empty($programPlan) ? 'open' : $programPlan->acl, "class='form-control' $class");?></td>
<td class='text-center' <?php echo zget($visibleFields, 'milestone', ' hidden') . zget($requiredFields, 'milestone', '', ' required');?>><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, 0);?></td>
<td><input type='text' name='begin[<?php echo $i;?>] ' id='begin<?php echo $i;?>' value='' class='form-control form-date' /></td>
<td><input type='text' name='end[<?php echo $i;?>]' id='end<?php echo $i;?>' value='' class='form-control form-date' /></td>
@@ -207,7 +207,7 @@
</div>
</td>
<td class='<?php echo $hideAttribute?> <?php echo zget($visibleFields, 'attribute', ' hidden') . zget($requiredFields, 'attribute', '', ' required');?>'><?php echo html::select("attributes[$i]", $lang->stage->typeList, '', "class='form-control'");?></td>
<td <?php echo zget($visibleFields, 'acl', ' hidden') . zget($requiredFields, 'acl', '', ' required');?>><?php echo html::select("acl[$i]", $lang->execution->aclList, 'open', "class='form-control' $class");?></td>
<td <?php echo zget($visibleFields, 'acl', ' hidden') . zget($requiredFields, 'acl', '', ' required');?>><?php echo html::select("acl[$i]", $lang->execution->aclList, empty($programPlan) ? 'open' : $programPlan->acl, "class='form-control' $class");?></td>
<td class='text-center' <?php echo zget($visibleFields, 'milestone', ' hidden') . zget($requiredFields, 'milestone', '', ' required');?>><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, 0);?></td>
<td><input type='text' name='<?php echo "begin[$i]";?>' id='begin<?php echo $i;?>' class='form-control form-date' /></td>
<td><input type='text' name='<?php echo "end[$i]";?>' id='end<?php echo $i;?>' class='form-control form-date' /></td>
-21
View File
@@ -68,26 +68,5 @@ $(function()
infoShowed = true;
}
if(href !== '')
{
switch(href)
{
case '#stories':
type = 'story';
break;
case '#bugs':
type = 'bug';
break;
case '#leftBugs':
type = 'leftBug';
break;
case '#releaseInfo':
type = 'releaseInfo';
break;
}
var viewLink = createLink('release', 'view', 'releaseID=' + releaseID + '&type=' + type + '&link=' + link + (typeof(param) == 'undefined' ? '' : param) + (typeof(orderBy) == 'undefined' ? '' : "&orderBy=" + orderBy));
if(type == 'releaseInfo') viewLink = createLink('release', 'view', 'releaseID=' + releaseID + '&type=' + type);
self.location.href = viewLink;
}
});
})
+36 -18
View File
@@ -1247,15 +1247,8 @@ class storyModel extends model
if(empty($childrenStatus)) return $this->dao->update(TABLE_STORY)->set('parent')->eq('0')->where('id')->eq($parentID)->exec();
$status = $oldParentStory->status;
if(count($childrenStatus) == 1)
{
$status = current($childrenStatus);
if($status == 'draft' or $status == 'changing') $status = 'active';
}
elseif(count($childrenStatus) != 1 and $oldParentStory->status == 'closed')
{
$status = 'active';
}
if(count($childrenStatus) == 1 and current($childrenStatus) == 'closed') $status = current($childrenStatus); // Close parent story.
if($oldParentStory->status == 'closed') $status = $this->getActivateStatus($parentID); // Activate parent story.
if($status and $oldParentStory->status != $status)
{
@@ -1263,7 +1256,7 @@ class storyModel extends model
$story = new stdclass();
$story->status = $status;
$story->stage = 'wait';
if($status == 'active')
if(strpos('active,changing,draft', $status) !== false)
{
$story->assignedTo = $oldParentStory->openedBy;
$story->assignedDate = $now;
@@ -1293,13 +1286,21 @@ class storyModel extends model
if(!$createAction) return $story;
$newParentStory = $this->dao->select('*')->from(TABLE_STORY)->where('id')->eq($parentID)->fetch();
$changes = common::createChanges($oldParentStory, $newParentStory);
$action = '';
if($status == 'active') $action = 'Activated';
if($status == 'closed') $action = 'closedbysystem';
$changes = common::createChanges($oldParentStory, $newParentStory);
$action = '';
$preStatus = '';
if(strpos('active,draft,changing', $status) !== false) $action = 'Activated';
if($status == 'closed')
{
/* Record the status before closed. */
$action = 'closedbysystem';
$preStatus = $oldParentStory->status;
$isChanged = $oldParentStory->changedBy ? true : false;
if($preStatus == 'reviewing') $preStatus = $isChanged ? 'changing' : 'draft';
}
if($action)
{
$actionID = $this->loadModel('action')->create('story', $parentID, $action, '', '', '', false);
$actionID = $this->loadModel('action')->create('story', $parentID, $action, '', $preStatus, '', false);
$this->action->logHistory($actionID, $changes);
}
@@ -3025,7 +3026,7 @@ class storyModel extends model
if($moduleIdList)
{
$moduleInfo = $this->loadModel('tree')->getByID($moduleIdList);
$moduleIdList = $moduleInfo->type == 'bug' ? 0 : $moduleIdList;
$moduleIdList = (isset($moduleInfo->type) and $moduleInfo->type == 'bug') ? 0 : $moduleIdList;
}
$stories = $this->dao->select('t1.id, t1.title, t1.module, t1.pri, t1.estimate, t2.name AS product')
->from(TABLE_STORY)->alias('t1')->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')
@@ -6410,7 +6411,8 @@ class storyModel extends model
public function getActivateStatus($storyID, $hasTwins = true)
{
$status = 'active';
$action = $hasTwins ? 'closed,reviewrejected,synctwins' : 'closed,reviewrejected';
$action = 'closed,reviewrejected,closedbysystem';
$action = $hasTwins ? $action . ',synctwins' : $action;
$lastRecord = $this->dao->select('action,extra')->from(TABLE_ACTION)
->where('objectType')->eq('story')
->andWhere('objectID')->eq($storyID)
@@ -6419,11 +6421,27 @@ class storyModel extends model
->fetch();
$lastAction = $lastRecord->action;
if(strpos('closed,reviewrejected', $lastAction) !== false)
if(strpos(',closed,reviewrejected,', ",$lastAction,") !== false)
{
$status = strpos($lastRecord->extra, '|') !== false ? substr($lastRecord->extra, strpos($lastRecord->extra, '|') + 1) : 'active';
}
/* Activate parent story. */
if($lastAction == 'closedbysystem')
{
$status = $lastRecord->extra ? $lastRecord->extra : 'active';
if($status == 'active')
{
/* If the parent story is not reviewed before closing, it will be activated to the status in changing. */
$hasNotReviewed = $this->dao->select('t1.*')->from(TABLE_STORYREVIEW)->alias('t1')
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id and t2.version = t1.version')
->where('t1.story')->eq($storyID)
->andWhere('t1.result')->eq('')
->fetchAll();
if(!empty($hasNotReviewed)) $status = 'changing';
}
}
/* When activating twin story, you need to check the status of the twin story selected when closing. */
if($lastAction == 'synctwins')
{
+1
View File
@@ -2621,6 +2621,7 @@ class taskModel extends model
{
if(!$this->loadModel('common')->checkField(TABLE_TASK, $type)) return array();
$orderBy = str_replace('pri_', 'priOrder_', $orderBy);
$orderBy = str_replace('project_', 't1.project_', $orderBy);
$tasks = $this->dao->select("t1.*, t4.id as project, t2.id as executionID, t2.name as executionName, t4.name as projectName, t2.multiple as executionMultiple, t2.type as executionType, t3.id as storyID, t3.title as storyTitle, t3.status AS storyStatus, t3.version AS latestStoryVersion, IF(t1.`pri` = 0, {$this->config->maxPriValue}, t1.`pri`) as priOrder")
->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_EXECUTION)->alias('t2')->on("t1.execution = t2.id")
+2
View File
@@ -30,3 +30,5 @@ tbody > tr > td .icon-share {font-size: 9px;}
#mainMenu .pull-left .dividing-line {margin: 7px 5px 0 0;}
.btn-toolbar>.btn, .btn-toolbar>.btn-group, .btn-toolbar>.dropdown {margin-right: 5px;}
#mainMenu > .btn-toolbar > .checkbox-primary{float: left;}
+1 -1
View File
@@ -264,6 +264,6 @@ $lang->testcase->featureBar['browse']['wait'] = 'Wartend';
$lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm;
$lang->testcase->featureBar['browse']['group'] = 'Group View';
$lang->testcase->featureBar['browse']['zerocase'] = 'Zero Case Story';
$lang->testcase->featureBar['browse']['autocase'] = $lang->testcase->showAutoCase;
$lang->testcase->featureBar['browse']['suite'] = 'Suite';
$lang->testcase->featureBar['browse']['autocase'] = $lang->testcase->showAutoCase;
$lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse'];
+1 -1
View File
@@ -264,6 +264,6 @@ $lang->testcase->featureBar['browse']['wait'] = 'Waiting';
$lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm;
$lang->testcase->featureBar['browse']['group'] = 'Group View';
$lang->testcase->featureBar['browse']['zerocase'] = 'Zero Case Story';
$lang->testcase->featureBar['browse']['autocase'] = $lang->testcase->showAutoCase;
$lang->testcase->featureBar['browse']['suite'] = 'Suite';
$lang->testcase->featureBar['browse']['autocase'] = $lang->testcase->showAutoCase;
$lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse'];
+1 -1
View File
@@ -264,6 +264,6 @@ $lang->testcase->featureBar['browse']['wait'] = 'En Attente';
$lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm;
$lang->testcase->featureBar['browse']['group'] = 'Group View';
$lang->testcase->featureBar['browse']['zerocase'] = 'Zero Case Story';
$lang->testcase->featureBar['browse']['autocase'] = $lang->testcase->showAutoCase;
$lang->testcase->featureBar['browse']['suite'] = 'Suite';
$lang->testcase->featureBar['browse']['autocase'] = $lang->testcase->showAutoCase;
$lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse'];
+1 -1
View File
@@ -264,6 +264,6 @@ $lang->testcase->featureBar['browse']['wait'] = '待评审';
$lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm;
$lang->testcase->featureBar['browse']['group'] = '分组查看';
$lang->testcase->featureBar['browse']['zerocase'] = "零用例{$lang->SRCommon}";
$lang->testcase->featureBar['browse']['autocase'] = $lang->testcase->showAutoCase;
$lang->testcase->featureBar['browse']['suite'] = '套件';
$lang->testcase->featureBar['browse']['autocase'] = $lang->testcase->showAutoCase;
$lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse'];
+1 -1
View File
@@ -176,7 +176,7 @@ class testcaseModel extends model
$data[$i] = new stdclass();
$data[$i]->product = $productID;
if($this->app->tab == 'project') $data[$i]->project = $this->session->project;
$data[$i]->branch = $cases->branch[$i];
$data[$i]->branch = isset($cases->branch[$i]) ? $cases->branch[$i] : '0';
$data[$i]->module = $cases->module[$i];
$data[$i]->type = $cases->type[$i];
$data[$i]->pri = $cases->pri[$i];
+1 -1
View File
@@ -18,7 +18,7 @@
<div class='center-block'>
<div class='main-header'>
<h2>
<span title='<?php echo $lang->zanode->automation;?>'><?php echo $lang->zanode->automation;?></span>
<span title='<?php echo $lang->zanode->automation;?>'><?php echo $lang->zanode->automation;?>&nbsp;<icon class='icon icon-help' data-toggle='popover' data-trigger='focus hover' data-placement='bottom' data-tip-class='text-muted popover-sm' data-content="<?php echo $lang->zanode->automationTips;?>"></icon></span>
</h2>
</div>
<form method='post' target='hiddenwin'>
+8 -8
View File
@@ -194,15 +194,9 @@
<?php if(!isonlybody()):?>
<div class='btn-toolbar pull-right'>
<?php if(!empty($productID)): ?>
<div class='btn-group'>
<?php common::printLink('testcase', 'automation', "productID=$productID", "<i class='icon-wrench muted'> </i>" . $lang->testcase->automation, '', "class='btn btn-link iframe' data-width='50%'", true, true)?>
<?php if(common::hasPriv('testcase', 'automation')):?>
<icon class='icon icon-help' data-toggle='popover' data-trigger='focus hover' data-placement='bottom' data-tip-class='text-muted popover-sm' data-content="<?php echo $lang->zanode->automationTips;?>"></icon>
<?php endif;?>
</div>
<div class='btn-group'>
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown'>
<i class='icon icon-export muted'></i> <?php echo $lang->export ?>
<i class='icon icon-export muted'></i>
<span class='caret'></span>
</button>
<ul class='dropdown-menu pull-right' id='exportActionMenu'>
@@ -223,7 +217,7 @@
<?php if(empty($productID) or common::canModify('product', $product)):?>
<?php if(!empty($productID) and (common::hasPriv('testcase', 'import') or common::hasPriv('testcase', 'importFromLib'))): ?>
<div class='btn-group'>
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown' id='importAction'><i class='icon icon-import muted'></i> <?php echo $lang->import ?><span class='caret'></span></button>
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown' id='importAction'><i class='icon icon-import muted'></i> <span class='caret'></span></button>
<ul class='dropdown-menu pull-right' id='importActionMenu'>
<?php
if(common::hasPriv('testcase', 'import')) echo "<li>" . html::a($this->createlink('testcase', 'import', "productID=$productID&branch=$branch"), $lang->testcase->fileImport, '', "class='export' data-app={$app->tab}") . "</li>";
@@ -234,6 +228,12 @@
</ul>
</div>
<?php endif;?>
<?php if(!empty($productID)): ?>
<div class='btn-group'>
<?php common::printLink('testcase', 'automation', "productID=$productID", "<i class='icon-wrench muted'> </i>" . $lang->testcase->automation, '', "class='btn btn-link iframe' data-width='50%'", true, true)?>
</div>
<?php endif;?>
<?php $initModule = isset($moduleID) ? (int)$moduleID : 0;?>
<div class='btn-group dropdown'>
<?php
+12 -2
View File
@@ -603,7 +603,7 @@ class transferModel extends model
$values = $valuePairs;
if(reset($values))
{
if(current($values) or (current($values) == 0)) $values = [0 => ''] + $values;
if(current($values) or (current($values) == 0)) $values = array('');
}
}
@@ -852,10 +852,20 @@ class transferModel extends model
{
$productID = array();
foreach($stories as $values) $productID[] = $values->product;
$product = array_unique($productID);
$storyDatas = end($stories);
$lastBranch = $storyDatas->branch;
$lastType = $storyDatas->type;
$stories = $this->loadModel('story')->mergePlanTitle($productID , $stories, $lastBranch, $lastType);
if($storyDatas->type == 'requirement')
{
$stories = $this->loadModel('story')->mergePlanTitle($productID , $stories, $lastBranch, $lastType);
}
elseif($storyDatas->type == 'story')
{
return $stories;
}
return $stories;
}
+1 -1
View File
@@ -118,7 +118,7 @@ if($viewType == 'doc' or $viewType == 'api')
<?php if($viewType == 'story' and $allProduct and $canBeChanged):?>
<div class="panel-actions btn-toolbar"><?php echo html::a('javascript:toggleCopy()', $lang->tree->syncFromProduct, '', "class='btn btn-sm btn-primary'")?></div>
<?php elseif($viewType == 'feedback' and common::hasPriv('feedback', 'syncProduct') and !isset($syncConfig[$rootID])):?>
<div class="panel-actions btn-toolbar"><?php echo html::a($this->createLink('feedback', 'syncProduct', "productID=$rootID&parent=$parent", '', true), $lang->tree->syncProductModule, '', "class='btn btn-sm btn-primary iframe' data-width='40%'");?></div>
<div class="panel-actions btn-toolbar"><?php echo html::a($this->createLink('feedback', 'syncProduct', "productID=$rootID&module=feedback&parent=$parent", '', true), $lang->tree->syncProductModule, '', "class='btn btn-sm btn-primary iframe' data-width='40%'");?></div>
<?php elseif($viewType == 'ticket' and common::hasPriv('ticket', 'syncProduct') and !isset($syncConfig[$rootID])):?>
<div class="panel-actions btn-toolbar"><?php echo html::a($this->createLink('ticket', 'syncProduct', "productID=$rootID&parent=$parent", '', true), $lang->tree->syncProductModule, '', "class='btn btn-sm btn-primary iframe' data-width='40%'");?></div>
<?php endif;?>
+18 -3
View File
@@ -5910,13 +5910,28 @@ class upgradeModel extends model
if(empty($moduleBranchPairs)) return true;
$storyModulePairs = $this->dao->select('module')->from(TABLE_STORY)->where('module')->in(array_keys($moduleBranchPairs))->andWhere('branch')->eq(0)->fetchPairs();
foreach($storyModulePairs as $moduleID) $this->dao->update(TABLE_STORY)->set('`branch`')->eq($moduleBranchPairs[$moduleID])->where('module')->eq($moduleID)->exec();
foreach($storyModulePairs as $moduleID)
{
if(!isset($moduleBranchPairs[$moduleID])) continue;
$this->dao->update(TABLE_STORY)->set('`branch`')->eq($moduleBranchPairs[$moduleID])->where('module')->eq($moduleID)->exec();
}
$bugModulePairs = $this->dao->select('module')->from(TABLE_BUG)->where('module')->in(array_keys($moduleBranchPairs))->andWhere('branch')->eq(0)->fetchPairs();
foreach($bugModulePairs as $moduleID) $this->dao->update(TABLE_BUG)->set('`branch`')->eq($moduleBranchPairs[$moduleID])->where('module')->eq($moduleID)->exec();
foreach($bugModulePairs as $moduleID)
{
if(!isset($moduleBranchPairs[$moduleID])) continue;
$this->dao->update(TABLE_BUG)->set('`branch`')->eq($moduleBranchPairs[$moduleID])->where('module')->eq($moduleID)->exec();
}
$caseModulePairs = $this->dao->select('module')->from(TABLE_CASE)->where('module')->in(array_keys($moduleBranchPairs))->andWhere('branch')->eq(0)->fetchPairs();
foreach($caseModulePairs as $moduleID) $this->dao->update(TABLE_CASE)->set('`branch`')->eq($moduleBranchPairs[$moduleID])->where('module')->eq($moduleID)->exec();
foreach($caseModulePairs as $moduleID)
{
if(!isset($moduleBranchPairs[$moduleID])) continue;
$this->dao->update(TABLE_CASE)->set('`branch`')->eq($moduleBranchPairs[$moduleID])->where('module')->eq($moduleID)->exec();
}
return true;
}
+3 -1
View File
@@ -20,8 +20,10 @@ include '../../common/view/header.lite.html.php';
<?php
if($denyType == 'nopriv')
{
$this->app->loadLang('group');
$groupPriv = isset($lang->resource->$module->$method) ? $lang->resource->$module->$method : $method;
$moduleName = isset($lang->$module->common) ? $lang->$module->common : $module;
$methodName = isset($lang->$module->$method) ? $lang->$module->$method : $method;
$methodName = isset($lang->$module->$groupPriv) ? $lang->$module->$groupPriv : $method;
if($module == 'execution' && $method == 'gantt') $methodName = $methodName->common;
+2 -2
View File
@@ -7,13 +7,13 @@ $('#hostList tr[data-status="wait"]').hover(function(){
if(showFeature)
{
var encodedHelpPageUrl = encodeURIComponent('https://www.zentao.net/book/zentaopms/978.html?fullScreen=zentao');
var urlForNewTab = window.location.origin + '#app=help&url=' + encodedHelpPageUrl;
var urlForNewTab = webRoot + '#app=help&url=' + encodedHelpPageUrl;
window.open(urlForNewTab)
}
$('#helpTab').click(function()
{
var encodedHelpPageUrl = encodeURIComponent('https://www.zentao.net/book/zentaopms/978.html?fullScreen=zentao');
var urlForNewTab = window.location.origin + '#app=help&url=' + encodedHelpPageUrl;
var urlForNewTab = webRoot + '#app=help&url=' + encodedHelpPageUrl;
window.open(urlForNewTab)
})
+1
View File
@@ -34,6 +34,7 @@ function updateProgress() {
$('.image-download-' + imageID).addClass('disabled');
$('.image-cancel-' + imageID).addClass('disabled');
$('.image-cancel-' + imageID).attr('href', '#');
$('.image-progress-' + imageID).text("100%");
}
else
{
+1
View File
@@ -14,6 +14,7 @@
<?php js::set('confirmDelete', $lang->zahost->confirmDelete)?>
<?php js::set('browseType', $browseType);?>
<?php js::set('showFeature', $showFeature);?>
<?php js::set('webRoot', getWebRoot());?>
<div id='mainMenu' class='clearfix'>
<div class='pull-left btn-toolbar'>
<a href='#' class='btn btn-link querybox-toggle' id='bysearchTab'><i class='icon-search icon'></i> <?php echo $lang->zahost->byQuery;?></a>
+3 -1
View File
@@ -469,7 +469,9 @@ class zanode extends control
if(dao::isError())
{
return print(js::alert(dao::getError()) . js::reload('parent'));
$errors = dao::getError();
if(is_array($errors)) $errors = implode($errors, ',');
return print(js::alert($errors) . js::reload('parent'));
}
else
{
+2 -2
View File
@@ -1,13 +1,13 @@
if(showFeature)
{
var encodedHelpPageUrl = encodeURIComponent('https://www.zentao.net/book/zentaopms/978.html?fullScreen=zentao');
var urlForNewTab = window.location.origin + '#app=help&url=' + encodedHelpPageUrl;
var urlForNewTab = webRoot + '#app=help&url=' + encodedHelpPageUrl;
window.open(urlForNewTab)
}
$('#helpTab').click(function()
{
var encodedHelpPageUrl = encodeURIComponent('https://www.zentao.net/book/zentaopms/978.html?fullScreen=zentao');
var urlForNewTab = window.location.origin + '#app=help&url=' + encodedHelpPageUrl;
var urlForNewTab = webRoot + '#app=help&url=' + encodedHelpPageUrl;
window.open(urlForNewTab)
})
+1 -1
View File
@@ -180,7 +180,7 @@ $('.btn-pwd-show').live('click', function()
$('#jumpManual').click(function()
{
var encodedHelpPageUrl = encodeURIComponent('https://www.zentao.net/book/zentaopms/974.html?fullScreen=zentao');
var urlForNewTab = window.location.origin + '#app=help&url=' + encodedHelpPageUrl;
var urlForNewTab = webRoot + '#app=help&url=' + encodedHelpPageUrl;
window.open(urlForNewTab)
})
+3 -2
View File
@@ -101,8 +101,9 @@ $lang->zanode->imageNameEmpty = 'Name can not be empty.';
$lang->zanode->runTimeout = 'Network connection timeout, please check the host and execution node status.';
$lang->zanode->apiError['-10100'] = 'ZenAgent Node not found.';
$lang->zanode->apiError['fail'] = 'Connection timeout, Please check the host and execution node status.';
$lang->zanode->apiError['-10100'] = 'ZenAgent Node not found.';
$lang->zanode->apiError['fail'] = 'Connection timeout, Please check the host and execution node status.';
$lang->zanode->apiError['notRunning'] = 'Please check the execution node status.';
$lang->zanode->publicList[0] = 'Private';
$lang->zanode->publicList[1] = 'Public';
+3 -2
View File
@@ -105,8 +105,9 @@ $lang->zanode->snapRestoring = 'Snapshot is restoring.';
$lang->zanode->runTimeout = 'Network connection timeout, please check the host and execution node status.';
$lang->zanode->apiError['-10100'] = 'ZenAgent Node not found.';
$lang->zanode->apiError['fail'] = 'Connection timeout, Please check the host and execution node status.';
$lang->zanode->apiError['-10100'] = 'ZenAgent Node not found.';
$lang->zanode->apiError['fail'] = 'Connection timeout, Please check the host and execution node status.';
$lang->zanode->apiError['notRunning'] = 'Please check the execution node status.';
$lang->zanode->publicList[0] = 'Private';
$lang->zanode->publicList[1] = 'Public';
+3 -2
View File
@@ -101,8 +101,9 @@ $lang->zanode->imageNameEmpty = 'Name can not be empty.';
$lang->zanode->runTimeout = 'Network connection timeout, please check the host and execution node status.';
$lang->zanode->apiError['-10100'] = 'ZenAgent Node not found.';
$lang->zanode->apiError['fail'] = 'Connection timeout, Please check the host and execution node status.';
$lang->zanode->apiError['-10100'] = 'ZenAgent Node not found.';
$lang->zanode->apiError['fail'] = 'Connection timeout, Please check the host and execution node status.';
$lang->zanode->apiError['notRunning'] = 'Please check the execution node status.';
$lang->zanode->publicList[0] = 'Private';
$lang->zanode->publicList[1] = 'Public';
+3 -2
View File
@@ -106,8 +106,9 @@ $lang->zanode->snapRestoring = '快照正在还原中';
$lang->zanode->runTimeout = '自动执行失败,请检查宿主机和执行节点状态';
$lang->zanode->apiError['-10100'] = '执行节点不存在';
$lang->zanode->apiError['fail'] = '执行失败,请检查宿主机和执行节点状态';
$lang->zanode->apiError['-10100'] = '执行节点不存在';
$lang->zanode->apiError['fail'] = '执行失败,请检查宿主机和执行节点状态';
$lang->zanode->apiError['notRunning'] = '请检查执行节点状态';
$lang->zanode->publicList[0] = '不共享';
$lang->zanode->publicList[1] = '共享';
+3
View File
@@ -187,6 +187,9 @@ class zanodemodel extends model
$node = $this->getNodeByID($zanodeID);
if($node->status != 'running') dao::$errors['name'] = $this->lang->zanode->apiError['notRunning'];
if(dao::isError()) return false;
$newSnapshot = new stdClass();
$newSnapshot->host = $node->id;
$newSnapshot->name = $data->name;
+1
View File
@@ -18,6 +18,7 @@
<?php js::set('confirmShutdown', $lang->zanode->confirmShutdown) ?>
<?php js::set('actionSuccess', $lang->zanode->actionSuccess) ?>
<?php js::set('showFeature', $showFeature);?>
<?php js::set('webRoot', getWebRoot());?>
<div id='mainMenu' class='clearfix'>
<div class='pull-left btn-toolbar'>
<?php echo html::a($this->createLink('zanode', 'browse'), "<span class='text'>{$lang->zanode->all}</span>", '', "class='btn btn-link btn-active-text'"); ?>
+2 -2
View File
@@ -40,10 +40,10 @@
$editAttr = $snapshot->status == 'failed' ? 'class="btn disabled"' : "title={$lang->zanode->editSnapshot} onclick='window.parent.editSnapshot(\"" . $this->createLink('zanode', 'editSnapshot', "snapshotID={$snapshot->id}") . "\")' class='btn'";
$restoreAttr = "title='{$lang->zanode->restoreSnapshot}' target='hiddenwin'";
$restoreAttr .= ($node->status !='running' or $snapshot->status == 'restoring' or $snapshot->status == 'failed') ? ' class="btn disabled"' : 'class="btn"';
$restoreAttr .= ($node->status !='running' or in_array($snapshot->status, array('creating', 'failed', 'restoring'))) ? ' class="btn disabled"' : 'class="btn"';
$deleteAttr = "title='{$lang->zanode->deleteSnapshot}' target='hiddenwin'";
$deleteAttr .= (($snapshot->status == 'restoring' and (time() - strtotime($snapshot->restoreDate)) <= 600) or $snapshot->status == 'failed') ? ' class="btn disabled"' : 'class="btn"';
$deleteAttr .= ($snapshot->status == 'restoring' or $snapshot->status == 'creating') ? ' class="btn disabled"' : 'class="btn"';
?>
<td title="<?php echo $snapshot->name;?>"><?php echo $snapshot->localName ? $snapshot->localName : $snapshot->name;?></td>
<td class='<?php echo $snapshot->status;?>'><?php echo zget($lang->zanode->snapshot->statusList, $snapshot->status, '');?></td>
+1
View File
@@ -21,6 +21,7 @@
<?php js::set('nodeID', $zanode->id) ?>
<?php js::set('zanodeLang', $lang->zanode); ?>
<?php js::set('nodeStatus', $zanode->status); ?>
<?php js::set('webRoot', getWebRoot());?>
<?php $browseLink = $this->session->zanodeList ? $this->session->zanodeList : $this->createLink('zanode', 'browse', ""); ?>
<?php
$vars = "id={$zanode->id}&orderBy=%s";