* Adjust codes.

This commit is contained in:
caoyanyi
2022-01-12 07:00:14 +00:00
parent 9da6e4b9c0
commit 0046f0289e
4 changed files with 12 additions and 27 deletions

View File

@@ -8,10 +8,10 @@ $(document).ready(function()
{
$('#frameBox .input-group').empty();
$('#frameBox .input-group').append("<div class='load-indicator loading'></div>");
html = "<select id='frame' name='frame' class='form-control chosen'>";
for(code in frameList)
var html = "<select id='frame' name='frame' class='form-control chosen'>";
for(frame in frameList)
{
if(engine == 'jenkins' || code != 'sonarqube') html += "<option value='" + code + "'>" + frameList[code] + "</option>";
if(engine == 'jenkins' || frame != 'sonarqube') html += "<option value='" + frame + "'>" + frameList[frame] + "</option>";
}
html += '</select>';
@@ -186,6 +186,7 @@ $(document).ready(function()
$('#jenkinsServerTR #jkTask').chosen({drop_direction: 'auto'});
})
/* There has been a problem with handling the prompt label. */
$('#jkTaskLabel').remove();
})
@@ -216,7 +217,6 @@ $(document).ready(function()
{
$('#sonarProject .loading').remove();
$('#sonarProject .input-group').append(html);
$('#sonarProject #projectKey').chosen({drop_direction: 'auto'});
})
})

View File

@@ -8,14 +8,14 @@ $(document).ready(function()
{
$('#frameBox .input-group').empty();
$('#frameBox .input-group').append("<div class='load-indicator loading'></div>");
html = "<select id='frame' name='frame' class='form-control chosen'>";
for(code in frameList)
var html = "<select id='frame' name='frame' class='form-control chosen'>";
for(frame in frameList)
{
if(job.engine == 'jenkins' || code != 'sonarqube')
if(job.engine == 'jenkins' || frame != 'sonarqube')
{
html += "<option value='" + code + "'";
if(code == job.frame) html += " selected";
html += ">" + frameList[code] + "</option>";
html += "<option value='" + frame + "'";
if(frame == job.frame) html += " selected";
html += ">" + frameList[frame] + "</option>";
}
}
html += '</select>';
@@ -174,6 +174,7 @@ $(document).ready(function()
$('#jenkinsServerTR #jkTask').val(jkTask).chosen();
})
/* There has been a problem with handling the prompt label. */
$('#jkTaskLabel').remove();
})
@@ -204,7 +205,6 @@ $(document).ready(function()
{
$('#sonarProject .loading').remove();
$('#sonarProject .input-group').append(html);
$('#sonarProject #projectKey').chosen({drop_direction: 'auto'});
})
})

View File

@@ -590,9 +590,7 @@ class jobModel extends model
->where('deleted')->eq('0')
->andWhere('frame')->eq('sonarqube')
->andWhere('repo')->in($repoIDList)
->beginIF($jobID > 0)
->andWhere('id')->ne($jobID)
->fi()
->beginIF($jobID > 0)->andWhere('id')->ne($jobID)->fi()
->fetchAll('repo');
}
}