* Finish task #3337,3338,3357,3358,3365,3366,3367.
This commit is contained in:
+2
-2
@@ -621,7 +621,7 @@ CREATE TABLE IF NOT EXISTS `zt_taskestimate` (
|
||||
`consumed` float unsigned NOT NULL,
|
||||
`account` char(30) NOT NULL default '',
|
||||
`work` text,
|
||||
PRIMARY KEY (`id`),
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `task` (`task`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_team`;
|
||||
@@ -638,7 +638,7 @@ CREATE TABLE IF NOT EXISTS `zt_team` (
|
||||
`consumed` DECIMAL(12,2) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`left` DECIMAL(12,2) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`order` TINYINT(3) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`project`, `task`, `account`)
|
||||
PRIMARY KEY (`project`, `task`, `account`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_testreport`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_testreport` (
|
||||
|
||||
@@ -433,15 +433,24 @@ $lang->error->noData = 'No Data';
|
||||
$lang->error->editedByOther = 'This record might have been changed. Please refresh and try to edit again!';
|
||||
$lang->error->tutorialData = 'No data can be imported in tutorial mode. Please exit tutorial first!';
|
||||
|
||||
if(!defined('PARAM_CODE_MISSING')) define('PARAM_CODE_MISSING', 301);
|
||||
if(!defined('PARAM_TOKEN_MISSING')) define('PARAM_TOKEN_MISSING', 302);
|
||||
if(!defined('INVALID_ENTRY')) define('INVALID_ENTRY', 311);
|
||||
if(!defined('EMPTY_KEY')) define('EMPTY_KEY', 312);
|
||||
if(!defined('IP_DENIED')) define('IP_DENIED', 321);
|
||||
if(!defined('INVALID_TOKEN')) define('INVALID_TOKEN', 331);
|
||||
if(!defined('SESSION_CODE_MISSING')) define('SESSION_CODE_MISSING', 341);
|
||||
if(!defined('SESSION_VERIFY_FAILED')) define('SESSION_VERIFY_FAILED', 342);
|
||||
|
||||
$lang->error->entry = array();
|
||||
$lang->error->entry['301'] = 'Param code not set.';
|
||||
$lang->error->entry['302'] = 'Param token not set.';
|
||||
$lang->error->entry['311'] = 'Entry not exist.';
|
||||
$lang->error->entry['312'] = 'Key of entry not set.';
|
||||
$lang->error->entry['321'] = 'IP denied.';
|
||||
$lang->error->entry['331'] = 'Invalid token.';
|
||||
$lang->error->entry['341'] = 'Session code not set.';
|
||||
$lang->error->entry['342'] = 'Session verify failed.';
|
||||
$lang->error->entry['PARAM_CODE_MISSING'] = 'Param code not set.';
|
||||
$lang->error->entry['PARAM_TOKEN_MISSING'] = 'Param token not set.';
|
||||
$lang->error->entry['INVALID_ENTRY'] = 'Entry not exist.';
|
||||
$lang->error->entry['EMPTY_KEY'] = 'Key of entry not set.';
|
||||
$lang->error->entry['IP_DENIED'] = 'IP denied.';
|
||||
$lang->error->entry['INVALID_TOKEN'] = 'Invalid token.';
|
||||
$lang->error->entry['SESSION_CODE_MISSING'] = 'Session code not set.';
|
||||
$lang->error->entry['SESSION_VERIFY_FAILED'] = 'Session verify failed.';
|
||||
|
||||
/* 分页信息。*/
|
||||
$lang->pager = new stdclass();
|
||||
|
||||
@@ -433,15 +433,24 @@ $lang->error->noData = '没有数据';
|
||||
$lang->error->editedByOther = '该记录可能已经被改动。请刷新页面重新编辑!';
|
||||
$lang->error->tutorialData = '新手模式下不会插入数据,请退出新手模式操作';
|
||||
|
||||
if(!defined('PARAM_CODE_MISSING')) define('PARAM_CODE_MISSING', 301);
|
||||
if(!defined('PARAM_TOKEN_MISSING')) define('PARAM_TOKEN_MISSING', 302);
|
||||
if(!defined('INVALID_ENTRY')) define('INVALID_ENTRY', 311);
|
||||
if(!defined('EMPTY_KEY')) define('EMPTY_KEY', 312);
|
||||
if(!defined('IP_DENIED')) define('IP_DENIED', 321);
|
||||
if(!defined('INVALID_TOKEN')) define('INVALID_TOKEN', 331);
|
||||
if(!defined('SESSION_CODE_MISSING')) define('SESSION_CODE_MISSING', 341);
|
||||
if(!defined('SESSION_VERIFY_FAILED')) define('SESSION_VERIFY_FAILED', 342);
|
||||
|
||||
$lang->error->entry = array();
|
||||
$lang->error->entry['301'] = '缺少code参数';
|
||||
$lang->error->entry['302'] = '缺少token参数';
|
||||
$lang->error->entry['311'] = '应用不存在';
|
||||
$lang->error->entry['312'] = '应用未设置密钥';
|
||||
$lang->error->entry['321'] = '该IP访问被限制访问';
|
||||
$lang->error->entry['331'] = '不合法的token参数';
|
||||
$lang->error->entry['341'] = '缺少session code';
|
||||
$lang->error->entry['342'] = 'session验证失败';
|
||||
$lang->error->entry['PARAM_CODE_MISSING'] = '缺少code参数';
|
||||
$lang->error->entry['PARAM_TOKEN_MISSING'] = '缺少token参数';
|
||||
$lang->error->entry['INVALID_ENTRY'] = '应用不存在';
|
||||
$lang->error->entry['EMPTY_KEY'] = '应用未设置密钥';
|
||||
$lang->error->entry['IP_DENIED'] = '该IP访问被限制访问';
|
||||
$lang->error->entry['INVALID_TOKEN'] = '不合法的token参数';
|
||||
$lang->error->entry['SESSION_CODE_MISSING'] = '缺少session code';
|
||||
$lang->error->entry['SESSION_VERIFY_FAILED'] = 'session验证失败';
|
||||
|
||||
/* 分页信息。*/
|
||||
$lang->pager = new stdclass();
|
||||
|
||||
@@ -433,15 +433,24 @@ $lang->error->noData = '沒有數據';
|
||||
$lang->error->editedByOther = '該記錄可能已經被改動。請刷新頁面重新編輯!';
|
||||
$lang->error->tutorialData = '新手模式下不會插入數據,請退出新手模式操作';
|
||||
|
||||
if(!defined('PARAM_CODE_MISSING')) define('PARAM_CODE_MISSING', 301);
|
||||
if(!defined('PARAM_TOKEN_MISSING')) define('PARAM_TOKEN_MISSING', 302);
|
||||
if(!defined('INVALID_ENTRY')) define('INVALID_ENTRY', 311);
|
||||
if(!defined('EMPTY_KEY')) define('EMPTY_KEY', 312);
|
||||
if(!defined('IP_DENIED')) define('IP_DENIED', 321);
|
||||
if(!defined('INVALID_TOKEN')) define('INVALID_TOKEN', 331);
|
||||
if(!defined('SESSION_CODE_MISSING')) define('SESSION_CODE_MISSING', 341);
|
||||
if(!defined('SESSION_VERIFY_FAILED')) define('SESSION_VERIFY_FAILED', 342);
|
||||
|
||||
$lang->error->entry = array();
|
||||
$lang->error->entry['301'] = '缺少code參數';
|
||||
$lang->error->entry['302'] = '缺少token參數';
|
||||
$lang->error->entry['311'] = '應用不存在';
|
||||
$lang->error->entry['312'] = '應用未設置密鑰';
|
||||
$lang->error->entry['321'] = '該IP訪問被限制訪問';
|
||||
$lang->error->entry['331'] = '不合法的token參數';
|
||||
$lang->error->entry['341'] = '缺少session code';
|
||||
$lang->error->entry['342'] = 'session驗證失敗';
|
||||
$lang->error->entry['PARAM_CODE_MISSING'] = '缺少code參數';
|
||||
$lang->error->entry['PARAM_TOKEN_MISSING'] = '缺少token參數';
|
||||
$lang->error->entry['INVALID_ENTRY'] = '應用不存在';
|
||||
$lang->error->entry['EMPTY_KEY'] = '應用未設置密鑰';
|
||||
$lang->error->entry['IP_DENIED'] = '該IP訪問被限制訪問';
|
||||
$lang->error->entry['INVALID_TOKEN'] = '不合法的token參數';
|
||||
$lang->error->entry['SESSION_CODE_MISSING'] = '缺少session code';
|
||||
$lang->error->entry['SESSION_VERIFY_FAILED'] = 'session驗證失敗';
|
||||
|
||||
/* 分頁信息。*/
|
||||
$lang->pager = new stdclass();
|
||||
|
||||
+23
-29
@@ -1156,7 +1156,17 @@ class commonModel extends model
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function hasDBPriv($object, $module = null, $method = null)
|
||||
/**
|
||||
* Check db priv.
|
||||
*
|
||||
* @param object $object
|
||||
* @param string $module
|
||||
* @param string $method
|
||||
* @static
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public static function hasDBPriv($object, $module = '', $method = '')
|
||||
{
|
||||
global $app;
|
||||
|
||||
@@ -1203,14 +1213,15 @@ class commonModel extends model
|
||||
/**
|
||||
* Check whether IP in white list.
|
||||
*
|
||||
* @param string $ipWhiteList
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function checkIP()
|
||||
public function checkIP($ipWhiteList = '')
|
||||
{
|
||||
$ip = $this->server->remote_addr;
|
||||
|
||||
$ipWhiteList = $this->config->ipWhiteList;
|
||||
if(!$ipWhiteList) $ipWhiteList = $this->config->ipWhiteList;
|
||||
|
||||
/* If the ip white list is '*'. */
|
||||
if($ipWhiteList == '*') return true;
|
||||
@@ -1363,42 +1374,25 @@ class commonModel extends model
|
||||
{
|
||||
if($this->session->valid_entry)
|
||||
{
|
||||
if(!$this->session->entry_code) $this->response(341);
|
||||
if($this->session->valid_entry != md5(md5($this->get->code) . $this->server->remote_addr)) $this->response(342);
|
||||
if(!$this->session->entry_code) $this->response(SESSION_CODE_MISSING);
|
||||
if($this->session->valid_entry != md5(md5($this->get->code) . $this->server->remote_addr)) $this->response(SESSION_VERIFY_FAILED);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(!$this->get->code) $this->response(301);
|
||||
if(!$this->get->token) $this->response(302);
|
||||
if(!$this->get->code) $this->response(PARAM_CODE_MISSING);
|
||||
if(!$this->get->token) $this->response(PARAM_TOKEN_MISSING);
|
||||
|
||||
$entry = $this->loadModel('entry')->getByCode($this->get->code);
|
||||
if(!$entry) $this->response(311);
|
||||
if(!$entry->key) $this->response(312);
|
||||
|
||||
$this->checkEntryIP($entry->ip);
|
||||
$this->checkEntryToken($entry->key);
|
||||
if(!$entry) $this->response(INVALID_ENTRY);
|
||||
if(!$entry->key) $this->response(EMPTY_KEY);
|
||||
if(!$this->checkIP($entry->ip)) $this->response(IP_DENIED);
|
||||
if(!$this->checkEntryToken($entry->key)) $this->response(INVALID_TOKEN);
|
||||
|
||||
$this->session->set('ENTRY_CODE', $this->get->code);
|
||||
$this->session->set('VALID_ENTRY', md5(md5($this->get->code) . $this->server->remote_addr));
|
||||
$this->loadModel('entry')->saveLog($entry->id, $this->server->request_uri);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check ip of an entry.
|
||||
*
|
||||
* @param string $ip
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function checkEntryIP($ip)
|
||||
{
|
||||
$ipWhiteList = $this->config->ipWhiteList;
|
||||
$this->config->ipWhiteList = $ip;
|
||||
$result = $this->checkIP();
|
||||
$this->config->ipWhiteList = $ipWhiteList;
|
||||
if(!$result) $this->response(321);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check token of an entry.
|
||||
*
|
||||
@@ -1411,7 +1405,7 @@ class commonModel extends model
|
||||
parse_str($this->server->query_String, $queryString);
|
||||
unset($queryString['token']);
|
||||
$queryString = http_build_query($queryString);
|
||||
if($_GET['token'] != md5(md5($queryString) . $key)) $this->response(331);
|
||||
return $this->get->token == md5(md5($queryString) . $key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+23
-12
@@ -26,10 +26,12 @@ class entry extends control
|
||||
$pager = $this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
$this->view->title = $this->lang->entry->api . $this->lang->colon . $this->lang->entry->list;
|
||||
$this->view->entries = $this->entry->getList($orderBy, $pager);
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->title = $this->lang->entry->api . $this->lang->colon . $this->lang->entry->list;
|
||||
$this->view->entries = $this->entry->getList($orderBy, $pager);
|
||||
$this->view->position[] = html::a(inlink('browse'), $this->lang->entry->api);
|
||||
$this->view->position[] = $this->lang->entry->common;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -50,7 +52,10 @@ class entry extends control
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->entry->saveSuccess, 'locate' => inlink('browse')));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->entry->api . $this->lang->colon . $this->lang->entry->create;
|
||||
$this->view->title = $this->lang->entry->api . $this->lang->colon . $this->lang->entry->create;
|
||||
$this->view->position[] = html::a(inlink('browse'), $this->lang->entry->api);
|
||||
$this->view->position[] = html::a(inlink('browse'), $this->lang->entry->common);
|
||||
$this->view->position[] = $this->lang->entry->create;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -77,8 +82,11 @@ class entry extends control
|
||||
}
|
||||
|
||||
$entry = $this->entry->getById($id);
|
||||
$this->view->title = $this->lang->entry->edit . $this->lang->colon . $entry->name;
|
||||
$this->view->entry = $entry;
|
||||
$this->view->title = $this->lang->entry->edit . $this->lang->colon . $entry->name;
|
||||
$this->view->position[] = html::a(inlink('browse'), $this->lang->entry->api);
|
||||
$this->view->position[] = html::a(inlink('browse'), $this->lang->entry->common);
|
||||
$this->view->position[] = $this->lang->entry->edit;
|
||||
$this->view->entry = $entry;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -114,11 +122,14 @@ class entry extends control
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
$entry = $this->entry->getByID($id);
|
||||
$this->view->title = $this->lang->entry->log . $this->lang->colon . $entry->name;
|
||||
$this->view->logs = $this->entry->getLogList($id, $orderBy, $pager);
|
||||
$this->view->entry = $entry;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->title = $this->lang->entry->log . $this->lang->colon . $entry->name;
|
||||
$this->view->logs = $this->entry->getLogList($id, $orderBy, $pager);
|
||||
$this->view->position[] = html::a(inlink('browse'), $this->lang->entry->api);
|
||||
$this->view->position[] = html::a(inlink('browse'), $this->lang->entry->common);
|
||||
$this->view->position[] = $this->lang->entry->log;
|
||||
$this->view->entry = $entry;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
.help {margin-left: 10px;}
|
||||
@@ -0,0 +1 @@
|
||||
.help {margin-left: 10px;}
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
$lang->entry->common = '應用';
|
||||
$lang->entry->list = '應用列表';
|
||||
$lang->entry->api = '介面';
|
||||
$lang->entry->webhook = 'webhook';
|
||||
$lang->entry->log = '日誌';
|
||||
$lang->entry->common = '應用';
|
||||
$lang->entry->list = '應用列表';
|
||||
$lang->entry->api = '介面';
|
||||
$lang->entry->webhook = 'Webhook';
|
||||
$lang->entry->log = '日誌';
|
||||
|
||||
$lang->entry->browse = '瀏覽應用';
|
||||
$lang->entry->create = '添加應用';
|
||||
|
||||
@@ -53,16 +53,15 @@
|
||||
<td><?php echo html::textarea('desc', '', "rows='3' class='form-control'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->entry->help;?></th>
|
||||
<td colspan='2'><?php echo html::a($config->entry->help, '', "target='_blank'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td><?php echo html::submitButton();?></td>
|
||||
<td>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::a($config->entry->help, $lang->entry->help, '_blank', "class='help'");?>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -53,16 +53,15 @@
|
||||
<td><?php echo html::textarea('desc', $entry->desc, "rows='3' class='form-control'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->entry->help;?></th>
|
||||
<td colspan='2'><?php echo html::a($config->entry->help, '', "target='_blank'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td><?php echo html::submitButton();?></td>
|
||||
<td>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::a($config->entry->help, $lang->entry->help, '_blank', "class='help'");?>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -81,9 +81,9 @@ $lang->score->methods['search']['saveQuery'] = '保存搜索條件';
|
||||
$lang->score->methods['search']['saveQueryAdvanced'] = '使用高級搜索';
|
||||
|
||||
$lang->score->extended = new stdClass();
|
||||
$lang->score->extended->userchangePassword = '密碼強度中的,額外獲得#changePassword,strength,1#個積分,強的,額外獲得#changePassword,strength,2#個積分。';
|
||||
$lang->score->extended->userchangePassword = '密碼強度為中,額外獲得#changePassword,strength,1#個積分;為強,額外獲得#changePassword,strength,2#個積分。';
|
||||
$lang->score->extended->projectclose = '項目經理增加#projectClose,manager,close#個積分,項目成員增加#projectClose,member,close#個積分。按期或者提前完成,項目經理額外增加#projectClose,manager,in#個積分,項目成員額外增加#projectClose,member,in#個積分。';
|
||||
$lang->score->extended->bugresolve = 'Bug解決後,額外增加嚴重程度積分:s1 + #bugResolve,severity,3#, s2 + #bugResolve,severity,2#, s3 + #bugResolve,severity,1#。';
|
||||
$lang->score->extended->bugconfirmBug = 'Bug確認後,額外增加嚴重程度積分:s1 + #bugConfirmBug,severity,3#, s2 + #bugConfirmBug,severity,2#, s3 + #bugConfirmBug,severity,1#。';
|
||||
$lang->score->extended->taskfinish = '額外增加工時積分 round(工時 /10 * 預計 / 消耗) + 優先順序積分(p1 #taskFinish,pri,1#, p2, #taskFinish,pri,2#)。';
|
||||
$lang->score->extended->storyclose = '需求的創建者額外增加#storyClose,createID#分';
|
||||
$lang->score->extended->taskfinish = '額外增加工時積分 round(工時 / 10 * 預計 / 消耗) + 優先順序積分(p1 #taskFinish,pri,1#, p2 #taskFinish,pri,2#)。';
|
||||
$lang->score->extended->storyclose = '需求的創建者額外增加#storyClose,createID#分';
|
||||
|
||||
@@ -176,9 +176,8 @@ $lang->task->error->left = '請填寫"剩餘"';
|
||||
$lang->task->error->work = '"備註"必須小於%d個字元';
|
||||
$lang->task->error->skipClose = '任務:%s 不是“已完成”或“已取消”狀態,確定要關閉嗎?';
|
||||
$lang->task->error->consumed = '任務:%s工時不能小於0,忽略該任務工時的改動';
|
||||
$lang->task->error->isFinish = '已完成任務,勿重複提交';
|
||||
|
||||
/* 統計報表。*/
|
||||
/* Report. */
|
||||
$lang->task->report = new stdclass();
|
||||
$lang->task->report->common = '報表';
|
||||
$lang->task->report->select = '請選擇報表類型';
|
||||
|
||||
@@ -52,18 +52,18 @@ $lang->testreport->legacyBugs = '遺留的Bug';
|
||||
$lang->testreport->bugConfirmedRate = '有效Bug率 (方案為已解決或延期 / 狀態為已解決或已關閉)';
|
||||
$lang->testreport->bugCreateByCaseRate = '用例發現Bug率 (用例創建的Bug / 時間區間中新增的Bug)';
|
||||
|
||||
$lang->testreport->caseSummary = '共有<strong>%s</strong>個用例,共執行<strong>%s</strong>個用例,產生了<strong>%s</strong>個結果,失敗的用例有<strong>%s</strong>個。';
|
||||
$lang->testreport->buildSummary = '共測試了<strong>%s</strong>個版本。';
|
||||
$lang->testreport->confirmDelete = '是否刪除該報告?';
|
||||
$lang->testreport->moreNotice = '更多功能可以參考禪道擴展機制進行擴展,也可以聯繫我們進行定製。';
|
||||
$lang->testreport->exportNotice = "由<a href='http://www.zentao.net' target='_blank' style='color:grey'>禪道項目管理軟件</a>導出";
|
||||
$lang->testreport->noReport = "報表還沒有生成,請稍候查看。";
|
||||
$lang->testreport->foundBugTip = "影響版本在測試輪次內,並且創建時間在測試時間範圍內產生的Bug數。";
|
||||
$lang->testreport->legacyBugTip = "Bug狀態是激活,或Bug的解決時間在測試結束時間之後。";
|
||||
$lang->testreport->fromCaseBugTip= "測試時間範圍內,用例執行失敗後創建的Bug";
|
||||
$lang->testreport->errorTrunk = "主幹版本不能創建測試報告,請修改關聯版本!";
|
||||
$lang->testreport->caseSummary = '共有<strong>%s</strong>個用例,共執行<strong>%s</strong>個用例,產生了<strong>%s</strong>個結果,失敗的用例有<strong>%s</strong>個。';
|
||||
$lang->testreport->buildSummary = '共測試了<strong>%s</strong>個版本。';
|
||||
$lang->testreport->confirmDelete = '是否刪除該報告?';
|
||||
$lang->testreport->moreNotice = '更多功能可以參考禪道擴展機制進行擴展,也可以聯繫我們進行定製。';
|
||||
$lang->testreport->exportNotice = "由<a href='http://www.zentao.net' target='_blank' style='color:grey'>禪道項目管理軟件</a>導出";
|
||||
$lang->testreport->noReport = "報表還沒有生成,請稍候查看。";
|
||||
$lang->testreport->foundBugTip = "影響版本在測試輪次內,並且創建時間在測試時間範圍內產生的Bug數。";
|
||||
$lang->testreport->legacyBugTip = "Bug狀態是激活,或Bug的解決時間在測試結束時間之後。";
|
||||
$lang->testreport->fromCaseBugTip = "測試時間範圍內,用例執行失敗後創建的Bug";
|
||||
$lang->testreport->errorTrunk = "主幹版本不能創建測試報告,請修改關聯版本!";
|
||||
|
||||
$lang->testreport->bugSummary = <<<EOD
|
||||
$lang->testreport->bugSummary = <<<EOD
|
||||
共發現<strong>%s</strong>個Bug <a data-toggle='tooltip' class='text-warning' title='{$lang->testreport->foundBugTip}'><i class='icon-info-sign'></i></a>,
|
||||
遺留<strong>%s</strong>個Bug <a data-toggle='tooltip' class='text-warning' title='{$lang->testreport->legacyBugTip}'><i class='icon-info-sign'></i></a>。
|
||||
用例執行產生<strong>%s</strong>個Bug <a data-toggle='tooltip' class='text-warning' title='{$lang->testreport->fromCaseBugTip}'><i class='icon-info-sign'></i></a>。
|
||||
|
||||
@@ -26,10 +26,12 @@ class webhook extends control
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
$this->view->title = $this->lang->webhook->api . $this->lang->colon . $this->lang->webhook->list;
|
||||
$this->view->webhooks = $this->webhook->getList($orderBy, $pager);
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->title = $this->lang->webhook->api . $this->lang->colon . $this->lang->webhook->list;
|
||||
$this->view->webhooks = $this->webhook->getList($orderBy, $pager);
|
||||
$this->view->position[] = html::a(inlink('browse'), $this->lang->webhook->api);
|
||||
$this->view->position[] = $this->lang->webhook->common;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -54,6 +56,9 @@ class webhook extends control
|
||||
$this->view->projects = $this->loadModel('project')->getPairs();
|
||||
$this->view->objectTypes = $this->webhook->getObjectTypes();
|
||||
$this->view->objectActions = $this->webhook->getObjectActions();
|
||||
$this->view->position[] = html::a(inlink('browse'), $this->lang->webhook->api);
|
||||
$this->view->position[] = html::a(inlink('browse'), $this->lang->webhook->common);
|
||||
$this->view->position[] = $this->lang->webhook->create;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -80,6 +85,9 @@ class webhook extends control
|
||||
$this->view->projects = $this->loadModel('project')->getPairs();
|
||||
$this->view->objectTypes = $this->webhook->getObjectTypes();
|
||||
$this->view->objectActions = $this->webhook->getObjectActions();
|
||||
$this->view->position[] = html::a(inlink('browse'), $this->lang->webhook->api);
|
||||
$this->view->position[] = html::a(inlink('browse'), $this->lang->webhook->common);
|
||||
$this->view->position[] = $this->lang->webhook->edit;
|
||||
$this->view->webhook = $webhook;
|
||||
$this->display();
|
||||
}
|
||||
@@ -116,11 +124,14 @@ class webhook extends control
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
$webhook = $this->webhook->getByID($id);
|
||||
$this->view->title = $this->lang->webhook->log . $this->lang->colon . $webhook->name;
|
||||
$this->view->logs = $this->webhook->getLogList($id, $orderBy, $pager);
|
||||
$this->view->webhook = $webhook;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->title = $this->lang->webhook->log . $this->lang->colon . $webhook->name;
|
||||
$this->view->logs = $this->webhook->getLogList($id, $orderBy, $pager);
|
||||
$this->view->position[] = html::a(inlink('browse'), $this->lang->webhook->api);
|
||||
$this->view->position[] = html::a(inlink('browse'), $this->lang->webhook->common);
|
||||
$this->view->position[] = $this->lang->webhook->log;
|
||||
$this->view->webhook = $webhook;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ $lang->webhook->name = 'Name';
|
||||
$lang->webhook->url = 'Webhook Address';
|
||||
$lang->webhook->contentType = 'Content Type';
|
||||
$lang->webhook->sendType = 'Send Type';
|
||||
$lang->webhook->product = 'Product';
|
||||
$lang->webhook->project = 'Project';
|
||||
$lang->webhook->product = "{$lang->productCommon}";
|
||||
$lang->webhook->project = "{$lang->projectCommon}";
|
||||
$lang->webhook->params = 'Params';
|
||||
$lang->webhook->action = 'Action';
|
||||
$lang->webhook->desc = 'Desc';
|
||||
@@ -39,8 +39,8 @@ $lang->webhook->sendTypeList['async'] = 'Asynchronous';
|
||||
|
||||
$lang->webhook->paramsList['objectType'] = 'Object Type';
|
||||
$lang->webhook->paramsList['objectID'] = 'Object ID';
|
||||
$lang->webhook->paramsList['product'] = 'Product';
|
||||
$lang->webhook->paramsList['project'] = 'Project';
|
||||
$lang->webhook->paramsList['product'] = "{$lang->productCommon}";
|
||||
$lang->webhook->paramsList['project'] = "{$lang->projectCommon}";
|
||||
$lang->webhook->paramsList['action'] = 'Action';
|
||||
$lang->webhook->paramsList['actor'] = 'Actor';
|
||||
$lang->webhook->paramsList['date'] = 'Date';
|
||||
@@ -54,9 +54,12 @@ $lang->webhook->trimWords = '';
|
||||
|
||||
$lang->webhook->note = new stdClass();
|
||||
$lang->webhook->note->async = 'If the send type is asynchronous, need open cron.';
|
||||
$lang->webhook->note->product = 'All actions will trigger the hook if the product is empty, else only actions of the product will trigger it.';
|
||||
$lang->webhook->note->project = 'All actions will trigger the hook if the project is empty, else only actions of the project will trigger it.';
|
||||
$lang->webhook->note->product = "All actions will trigger the hook if the {$lang->productCommon} is empty, else only actions of the {$lang->productCommon} will trigger it.";
|
||||
$lang->webhook->note->project = "All actions will trigger the hook if the {$lang->projectCommon} is empty, else only actions of the {$lang->projectCommon} will trigger it.";
|
||||
|
||||
$lang->webhook->note->typeList['bearychat'] = 'Add a zentao bot in bearychat and get the webhook address.';
|
||||
$lang->webhook->note->typeList['dingding'] = 'Add a customed bot in dingding and get the webhook address.';
|
||||
$lang->webhook->note->typeList['default'] = 'Get webhook address from others';
|
||||
|
||||
$lang->webhook->error = new stdclass();
|
||||
$lang->webhook->error->curl = 'Load php-curl in php.ini.';
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<?php
|
||||
$lang->webhook->common = 'Webhook';
|
||||
$lang->webhook->list = '钩子列表';
|
||||
$lang->webhook->list = 'Webhook列表';
|
||||
$lang->webhook->api = '接口';
|
||||
$lang->webhook->entry = '应用';
|
||||
$lang->webhook->log = '日志';
|
||||
$lang->webhook->assigned = '指派给';
|
||||
|
||||
$lang->webhook->browse = '浏览钩子';
|
||||
$lang->webhook->create = '添加钩子';
|
||||
$lang->webhook->edit = '编辑钩子';
|
||||
$lang->webhook->delete = '删除钩子';
|
||||
$lang->webhook->browse = '浏览Webhook';
|
||||
$lang->webhook->create = '添加Webhook';
|
||||
$lang->webhook->edit = '编辑Webhook';
|
||||
$lang->webhook->delete = '删除Webhook';
|
||||
|
||||
$lang->webhook->id = 'ID';
|
||||
$lang->webhook->type = '类型';
|
||||
@@ -17,8 +17,8 @@ $lang->webhook->name = '名称';
|
||||
$lang->webhook->url = 'Hook地址';
|
||||
$lang->webhook->contentType = '内容类型';
|
||||
$lang->webhook->sendType = '发送方式';
|
||||
$lang->webhook->product = '关联产品';
|
||||
$lang->webhook->project = '关联项目';
|
||||
$lang->webhook->product = "关联{$lang->productCommon}";
|
||||
$lang->webhook->project = "关联{$lang->projectCommon}";
|
||||
$lang->webhook->params = '参数';
|
||||
$lang->webhook->action = '触发动作';
|
||||
$lang->webhook->desc = '描述';
|
||||
@@ -39,8 +39,8 @@ $lang->webhook->sendTypeList['async'] = '异步';
|
||||
|
||||
$lang->webhook->paramsList['objectType'] = '对象类型';
|
||||
$lang->webhook->paramsList['objectID'] = '对象ID';
|
||||
$lang->webhook->paramsList['product'] = '所属产品';
|
||||
$lang->webhook->paramsList['project'] = '所属项目';
|
||||
$lang->webhook->paramsList['product'] = "所属{$lang->productCommon}";
|
||||
$lang->webhook->paramsList['project'] = "所属{$lang->projectCommon}";
|
||||
$lang->webhook->paramsList['action'] = '动作';
|
||||
$lang->webhook->paramsList['actor'] = '操作者';
|
||||
$lang->webhook->paramsList['date'] = '操作日期';
|
||||
@@ -54,9 +54,12 @@ $lang->webhook->trimWords = '了';
|
||||
|
||||
$lang->webhook->note = new stdClass();
|
||||
$lang->webhook->note->async = '异步需要打开计划任务';
|
||||
$lang->webhook->note->product = '此项为空时所有产品的动作都会触发钩子,否则只有关联产品的动作才会触发。';
|
||||
$lang->webhook->note->project = '此项为空时所有项目的动作都会触发钩子,否则只有关联项目的动作才会触发。';
|
||||
$lang->webhook->note->product = "此项为空时所有{$lang->productCommon}的动作都会触发钩子,否则只有关联{$lang->productCommon}的动作才会触发。";
|
||||
$lang->webhook->note->project = "此项为空时所有{$lang->projectCommon}的动作都会触发钩子,否则只有关联{$lang->projectCommon}的动作才会触发。";
|
||||
|
||||
$lang->webhook->note->typeList['bearychat'] = '请在倍洽中添加一个禅道机器人,并将其webhook填写到此处。';
|
||||
$lang->webhook->note->typeList['dingding'] = '请在钉钉中添加一个自定义机器人,并将其webhook填写到此处。';
|
||||
$lang->webhook->note->typeList['default'] = '从第三方系统获取webhook并填写到此处。';
|
||||
|
||||
$lang->webhook->error = new stdclass();
|
||||
$lang->webhook->error->curl = '需要加载php-curl扩展。';
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<?php
|
||||
$lang->webhook->common = 'webhook';
|
||||
$lang->webhook->list = '鈎子列表';
|
||||
$lang->webhook->common = 'Webhook';
|
||||
$lang->webhook->list = 'Webhook列表';
|
||||
$lang->webhook->api = '介面';
|
||||
$lang->webhook->entry = '應用';
|
||||
$lang->webhook->log = '日誌';
|
||||
$lang->webhook->assigned = '指派給';
|
||||
|
||||
$lang->webhook->browse = '瀏覽鈎子';
|
||||
$lang->webhook->create = '添加鈎子';
|
||||
$lang->webhook->edit = '編輯鈎子';
|
||||
$lang->webhook->delete = '刪除鈎子';
|
||||
$lang->webhook->browse = '瀏覽Webhook';
|
||||
$lang->webhook->create = '添加Webhook';
|
||||
$lang->webhook->edit = '編輯Webhook';
|
||||
$lang->webhook->delete = '刪除Webhook';
|
||||
|
||||
$lang->webhook->id = 'ID';
|
||||
$lang->webhook->type = '類型';
|
||||
@@ -17,8 +17,8 @@ $lang->webhook->name = '名稱';
|
||||
$lang->webhook->url = 'Hook地址';
|
||||
$lang->webhook->contentType = '內容類型';
|
||||
$lang->webhook->sendType = '發送方式';
|
||||
$lang->webhook->product = '關聯產品';
|
||||
$lang->webhook->project = '關聯項目';
|
||||
$lang->webhook->product = "關聯{$lang->productCommon}";
|
||||
$lang->webhook->project = "關聯{$lang->projectCommon}";
|
||||
$lang->webhook->params = '參數';
|
||||
$lang->webhook->action = '觸發動作';
|
||||
$lang->webhook->desc = '描述';
|
||||
@@ -39,8 +39,8 @@ $lang->webhook->sendTypeList['async'] = '非同步';
|
||||
|
||||
$lang->webhook->paramsList['objectType'] = '對象類型';
|
||||
$lang->webhook->paramsList['objectID'] = '對象ID';
|
||||
$lang->webhook->paramsList['product'] = '所屬產品';
|
||||
$lang->webhook->paramsList['project'] = '所屬項目';
|
||||
$lang->webhook->paramsList['product'] = "所屬{$lang->productCommon}";
|
||||
$lang->webhook->paramsList['project'] = "所屬{$lang->projectCommon}";
|
||||
$lang->webhook->paramsList['action'] = '動作';
|
||||
$lang->webhook->paramsList['actor'] = '操作者';
|
||||
$lang->webhook->paramsList['date'] = '操作日期';
|
||||
@@ -54,9 +54,12 @@ $lang->webhook->trimWords = '了';
|
||||
|
||||
$lang->webhook->note = new stdClass();
|
||||
$lang->webhook->note->async = '非同步需要打開計劃任務';
|
||||
$lang->webhook->note->product = '此項為空時所有產品的動作都會觸發鈎子,否則只有關聯產品的動作才會觸發。';
|
||||
$lang->webhook->note->project = '此項為空時所有項目的動作都會觸發鈎子,否則只有關聯項目的動作才會觸發。';
|
||||
$lang->webhook->note->product = "此項為空時所有{$lang->productCommon}的動作都會觸發鈎子,否則只有關聯{$lang->productCommon}的動作才會觸發。";
|
||||
$lang->webhook->note->project = "此項為空時所有{$lang->projectCommon}的動作都會觸發鈎子,否則只有關聯{$lang->projectCommon}的動作才會觸發。";
|
||||
|
||||
$lang->webhook->note->typeList['bearychat'] = '請在倍洽中添加一個禪道機器人,並將其webhook填寫到此處。';
|
||||
$lang->webhook->note->typeList['dingding'] = '請在釘釘中添加一個自定義機器人,並將其webhook填寫到此處。';
|
||||
$lang->webhook->note->typeList['default'] = '從第三方系統獲取webhook並填寫到此處。';
|
||||
|
||||
$lang->webhook->error = new stdclass();
|
||||
$lang->webhook->error->curl = '需要加載php-curl擴展。';
|
||||
|
||||
@@ -399,6 +399,8 @@ class webhookModel extends model
|
||||
*/
|
||||
public function fetchHook($webhook, $sendData)
|
||||
{
|
||||
if(!extension_loaded('curl')) die(helper::jsonEncode($this->lang->webhook->error->curl));
|
||||
|
||||
$header[] = "Content-Type: {$webhook->contentType};charset=utf-8";
|
||||
|
||||
$ch = curl_init();
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
<table class='table table-bordered'>
|
||||
<?php foreach($config->webhook->objectTypes as $objectType => $actions):?>
|
||||
<tr>
|
||||
<td class='w-90px'>
|
||||
<th class='w-80px'>
|
||||
<label class='checkbox-inline'>
|
||||
<input type='checkbox' class='objectType'><strong><?php echo $objectTypes[$objectType];?></strong>
|
||||
</label>
|
||||
</td>
|
||||
</th>
|
||||
<td class='labelWidth'><?php echo html::checkbox("actions[$objectType]", $objectActions[$objectType]);?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
@@ -93,4 +93,4 @@
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
<table class='table table-bordered'>
|
||||
<?php foreach($config->webhook->objectTypes as $objectType => $actions):?>
|
||||
<tr>
|
||||
<td class='w-90px'>
|
||||
<td class='w-80px'>
|
||||
<label class='checkbox-inline'>
|
||||
<?php $checked = isset($webhook->actions->$objectType) ? "checked='checked'" : '';?>
|
||||
<input type='checkbox' <?php echo $checked;?> class='objectType'><strong><?php echo $objectTypes[$objectType];?></strong>
|
||||
@@ -92,4 +92,4 @@
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='featurebar'>
|
||||
<ul class='nav'>
|
||||
<li id='entry'><?php //common::printLink('entry', 'browse', '', $lang->webhook->entry);?></li>
|
||||
<li id='entry'><?php common::printLink('entry', 'browse', '', $lang->webhook->entry);?></li>
|
||||
<li id='webhook' class='active'><?php common::printLink('webhook', 'browse', '', $lang->webhook->common);?></li>
|
||||
</ul>
|
||||
<div class='actions'>
|
||||
|
||||
Reference in New Issue
Block a user