update cron->ajaxExec method to support params

This commit is contained in:
aaronchen2k
2020-01-15 20:18:03 +08:00
parent 4d3f2abc90
commit e7e9f8a86a
5 changed files with 15 additions and 8 deletions
+1 -1
View File
@@ -77,4 +77,4 @@ CREATE TABLE `zt_cibuild` (
) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;
INSERT INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`, `lastTime`) VALUES
('*/5', '*', '*', '*', '*', 'moduleName=ci&methodName=checkCibuild', '同步Jenkins任务状态', 'zentao', 1, 'normal', '0000-00-00 00:00:00');
('*/5', '*', '*', '*', '*', 'moduleName=ci&methodName=checkCibuild', '同步Jenkins任务状态', 'zentao', -1, 'normal', '0000-00-00 00:00:00');
+4 -6
View File
@@ -293,10 +293,6 @@ class ci extends control
*/
public function editCitask($id)
{
// $pattern = $this->config->repo->commitCommands['entity'];
// $matches = array();
// preg_match($pattern, 'fix bug #123',$matches);
$citask = $this->ci->getCitaskByID($id);
if($_POST)
{
@@ -427,7 +423,8 @@ class ci extends control
$this->view->users = $this->loadModel('user')->getPairs('noletter|noempty|nodeleted');
$this->view->credentialList = $this->ci->listCredentialForSelection("type='sshKey' or type='account'");
$this->view->module = 'repo';
$this->view->tips = str_replace("{user}",exec('whoami'), $this->lang->repo->tips);
$this->view->module = 'repo';
$this->display();
}
@@ -466,7 +463,8 @@ class ci extends control
$this->view->users = $this->loadModel('user')->getPairs('noletter|noempty|nodeleted');
$this->view->credentialList = $this->ci->listCredentialForSelection("type='sshKey' or type='account'");
$this->view->module = 'repo';
$this->view->tips = str_replace("{user}", exec('whoami'), $this->lang->repo->tips);
$this->view->module = 'repo';
$this->display();
}
+2 -1
View File
@@ -156,7 +156,8 @@ $lang->repo->error->output = "执行命令:%s\n错误结果(%s): %s\n
$lang->repo->error->clientVersion = "客户端版本过低,请升级或更换SVN客户端";
$lang->repo->error->encoding = "编码可能错误,请更换编码重试。";
$lang->repo->scmList['Subversion'] = 'Subversion';
//$lang->repo->scmList['Subversion'] = 'Subversion';
$lang->repo->scmList['Git'] = 'Git';
$lang->repo->tips = '请使用系统用户<strong class="text-blue">{user}</strong>签出代码,以便于获取后续的操作权限。如:<strong class="text-blue">sudo -u {user} git clone git_rep_address</strong>';
$lang->repo->watchList['1'] = '';
+4
View File
@@ -26,6 +26,10 @@
</div>
<form id='repoForm' method='post' class='form-ajax'>
<table class='table table-form'>
<tr>
<th class='thWidth'></th>
<td colspan="2"><?php echo $tips; ?></td>
</tr>
<tr>
<th class='thWidth'><?php echo $lang->repo->type; ?></th>
<td style="width:550px"><?php echo html::select('SCM', $lang->repo->scmList, 'git', "class='form-control'"); ?></td>
+4
View File
@@ -26,6 +26,10 @@
</div>
<form id='repoForm' method='post' class='form-ajax'>
<table class='table table-form'>
<tr>
<th class='thWidth'></th>
<td colspan="2"><?php echo $tips; ?></td>
</tr>
<tr>
<th class='thWidth'><?php echo $lang->repo->type; ?></th>
<td style="width:550px"><?php echo html::select('SCM', $lang->repo->scmList, $repo->SCM, "class='form-control'"); ?></td>