* Modify trash data tips.
This commit is contained in:
@@ -426,10 +426,10 @@ class job extends control
|
||||
*/
|
||||
public function ajaxCheckSonarqubeLink($repoID, $jobID = 0)
|
||||
{
|
||||
$repo = $this->loadModel('job')->getSonarqubeByRepo(array($repoID), $jobID);
|
||||
$repo = $this->loadModel('job')->getSonarqubeByRepo(array($repoID), $jobID, true);
|
||||
if(!empty($repo))
|
||||
{
|
||||
$message = sprintf($this->lang->job->repoExists, $repo[$repoID]->id . '-' . $repo[$repoID]->name);
|
||||
$message = $repo[$repoID]->deleted ? $this->lang->job->jobIsDeleted : sprintf($this->lang->job->repoExists, $repo[$repoID]->id . '-' . $repo[$repoID]->name);
|
||||
$this->send(array('result' => 'fail', 'message' => $message));
|
||||
}
|
||||
$this->send(array('result' => 'success', 'message' => ''));
|
||||
|
||||
@@ -59,6 +59,7 @@ $lang->job->invalidName = 'The parameter name should be letters, numbers or u
|
||||
$lang->job->repoExists = 'This repository has a build task associated with it『%s』';
|
||||
$lang->job->projectExists = 'This SonarQube Project has a build task associated with it『%s』';
|
||||
$lang->job->mustUseJenkins = 'SonarQube frame is only used if the build engine is JenKins.';
|
||||
$lang->job->jobIsDeleted = 'This repository is associated with a build task, please view the data from the recycle bin';
|
||||
|
||||
$lang->job->buildTypeList['build'] = 'Only Build';
|
||||
$lang->job->buildTypeList['buildAndDeploy'] = 'Build And Deploy';
|
||||
|
||||
@@ -59,6 +59,7 @@ $lang->job->invalidName = '参数名称应该是英文字母、数字或下
|
||||
$lang->job->repoExists = '此版本库已关联构建任务『%s』';
|
||||
$lang->job->projectExists = '此SonarQube项目已关联构建任务『%s』';
|
||||
$lang->job->mustUseJenkins = 'SonarQube工具/框架仅在构建引擎为JenKins的情况下使用';
|
||||
$lang->job->jobIsDeleted = '此版本库已关联构建任务,请从回收站查看数据';
|
||||
|
||||
$lang->job->buildTypeList['build'] = '仅构建';
|
||||
$lang->job->buildTypeList['buildAndDeploy'] = '构建部署';
|
||||
|
||||
@@ -603,15 +603,17 @@ class jobModel extends model
|
||||
* Get sonarqube by RepoID.
|
||||
*
|
||||
* @param array $repoIDList
|
||||
* @param int $jobID
|
||||
* @param bool $showDeleted
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getSonarqubeByRepo($repoIDList, $jobID = 0)
|
||||
public function getSonarqubeByRepo($repoIDList, $jobID = 0, $showDeleted = false)
|
||||
{
|
||||
return $this->dao->select('id,name,repo')->from(TABLE_JOB)
|
||||
->where('deleted')->eq('0')
|
||||
->andWhere('frame')->eq('sonarqube')
|
||||
return $this->dao->select('id,name,repo,deleted')->from(TABLE_JOB)
|
||||
->where('frame')->eq('sonarqube')
|
||||
->andWhere('repo')->in($repoIDList)
|
||||
->beginIF(!$showDeleted)->andWhere('deleted')->eq('0')->fi()
|
||||
->beginIF($jobID > 0)->andWhere('id')->ne($jobID)->fi()
|
||||
->fetchAll('repo');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user