changes for original repo and ci models combination

This commit is contained in:
aaronchen2k
2020-01-31 20:51:27 +08:00
parent b6d68f10b7
commit 57b0bd7c6a
9 changed files with 23 additions and 22 deletions
+1 -1
View File
@@ -60,4 +60,4 @@ CREATE TABLE `zt_cibuild` (
) ENGINE=MyISAM AUTO_INCREMENT=75 DEFAULT CHARSET=utf8;
INSERT INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`, `lastTime`) VALUES
('*/5', '*', '*', '*', '*', 'moduleName=citask&methodName=checkBuildStatus', '同步Jenkins任务状态', 'zentao', -1, 'normal', '0000-00-00 00:00:00');
('*/5', '*', '*', '*', '*', 'moduleName=ci&methodName=checkBuildStatus', '同步Jenkins任务状态', 'zentao', -1, 'normal', '0000-00-00 00:00:00');
+1 -1
View File
@@ -165,7 +165,7 @@ class ci extends control
{
error_log("===exeJob " . $id);
$this->ci->exe($id);
$this->ci->exeJob($id);
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->send(array('result' => 'success'));
+3 -3
View File
@@ -3,8 +3,8 @@ $(function()
triggerTypeChanged(triggerType);
});
function exeCijob(id) {
var link = createLink('cijob', 'exe', 'id=' + id);
function exeJob(id) {
var link = createLink('ci', 'exeJob', 'id=' + id);
console.log(link);
$.ajax({
type:"POST",
@@ -12,7 +12,7 @@ function exeCijob(id) {
data: {},
datatype: "json",
success:function(str){
$('.exe-cijob-button').tooltip('show', '发送执行请求成功!');
$('.exe-job-button').tooltip('show', '发送执行请求成功!');
}
});
}
+1
View File
@@ -1,6 +1,7 @@
<?php
$lang->ci->common = '持续集成';
$lang->ci->de = '的';
$lang->ci->at = '于';
$lang->ci->jenkins = 'Jenkins';
$lang->ci->repo = '代码库';
+1 -1
View File
@@ -193,7 +193,7 @@ class ciModel extends model
$buildUrl = sprintf('%s/job/%s/build/api/json', $jenkinsServer, $po->jenkinsJob);
$po->queueItem = $this->sendBuildRequest($buildUrl);
$this->saveCibuild($po);
$this->saveBuild($po);
return !dao::isError();
}
+1 -1
View File
@@ -49,7 +49,7 @@
<td class='text' title='<?php echo $lang->job->triggerTypeList[$job->triggerType]; ?>'>
<?php echo $lang->job->triggerTypeList[$job->triggerType]; ?></td>
<td class='text' title='<?php echo $lang->job->lastBuild; ?>'>
<?php echo $lang->job->buildStatusList[$job->lastStatus] . ' ' . $job->lastExec; ?>
<?php if ($job->lastStatus) echo $lang->job->buildStatusList[$job->lastStatus] . $lang->ci->at . $job->lastExec; ?>
</td>
<td class='c-actions text-right'>
+1 -1
View File
@@ -104,7 +104,7 @@
<?php echo html::submitButton(); ?>
<?php echo html::backButton(); ?>
&nbsp;
<?php echo html::commonButton($lang->job->exeNow, "onclick=exeCijob($job->id) data-tip-class='tooltip-success'", "btn btn-info exe-job-button"); ?>
<?php echo html::commonButton($lang->job->exeNow, "onclick=exeJob($job->id) data-tip-class='tooltip-success'", "btn btn-info exe-job-button"); ?>
</td>
</tr>
</table>
+7 -7
View File
@@ -49,20 +49,20 @@
<td class='required'><?php echo html::input('client', '', "class='form-control'")?></td>
<td class='muted'><?php echo $lang->repo->example->client;?></td>
</tr>
<tr>
<th><?php echo $lang->repo->account;?></th>
<td><?php echo html::input('account', '', "class='form-control'");?></td>
<!--<tr>
<th><?php /*echo $lang->repo->account;*/?></th>
<td><?php /*echo html::input('account', '', "class='form-control'");*/?></td>
</tr>
<tr>
<th><?php echo $lang->repo->password;?></th>
<th><?php /*echo $lang->repo->password;*/?></th>
<td>
<div class='input-group'>
<?php echo html::password('password', '', "class='form-control'");?>
<?php /*echo html::password('password', '', "class='form-control'");*/?>
<span class='input-group-addon fix-border fix-padding'></span>
<?php echo html::select('encrypt', $lang->repo->encryptList, 'base64', "class='form-control'");?>
<?php /*echo html::select('encrypt', $lang->repo->encryptList, 'base64', "class='form-control'");*/?>
</div>
</td>
</tr>
</tr>-->
<tr>
<th><?php echo $lang->repo->acl;?></th>
+7 -7
View File
@@ -49,20 +49,20 @@
<td class='required'><?php echo html::input('client', $repo->client, "class='form-control'")?></td>
<td class='muted'><?php echo $lang->repo->example->client;?></td>
</tr>
<tr>
<th><?php echo $lang->repo->account;?></th>
<td><?php echo html::input('account', '', "class='form-control'");?></td>
<!--<tr>
<th><?php /*echo $lang->repo->account;*/?></th>
<td><?php /*echo html::input('account', '', "class='form-control'");*/?></td>
</tr>
<tr>
<th><?php echo $lang->repo->password;?></th>
<th><?php /*echo $lang->repo->password;*/?></th>
<td>
<div class='input-group'>
<?php echo html::password('password', '', "class='form-control'");?>
<?php /*echo html::password('password', '', "class='form-control'");*/?>
<span class='input-group-addon fix-border fix-padding'></span>
<?php echo html::select('encrypt', $lang->repo->encryptList, 'base64', "class='form-control'");?>
<?php /*echo html::select('encrypt', $lang->repo->encryptList, 'base64', "class='form-control'");*/?>
</div>
</td>
</tr>
</tr>-->
<tr>
<th><?php echo $lang->repo->acl;?></th>