1
0
mirror of https://github.com/newnius/YAO-portal.git synced 2025-12-13 09:06:43 +00:00
This commit is contained in:
2019-04-23 16:57:15 +08:00
parent dbfe0c5bb7
commit 75657a7d6d
18 changed files with 396 additions and 123 deletions

View File

@@ -1,5 +1,14 @@
function register_events_job() {
$('#btn-job-add').click(function (e) {
cb = function (workspaces) {
$('#form-job-workspace').children().remove();
$.each(workspaces, function (i, workspace) {
var newGroupOption = '<option value="' + workspace.git_repo + '">' + workspace.name + '</option>';
$('#form-job-workspace').append(newGroupOption);
});
};
wordspace_gets(null, cb);
$('#modal-job').modal('show');
});
@@ -158,7 +167,7 @@ var workspaceFormatter = function (workspace) {
};
var clusterFormatter = function (cluster) {
return cluster;
return 'default';
};
var priorityFormatter = function (status) {
@@ -219,8 +228,9 @@ function jobOperateFormatter(value, row, index) {
window.jobOperateEvents = {
'click .config': function (e, value, row, index) {
row.tasks = JSON.parse(row.tasks);
var formattedData = JSON.stringify(row, null, '\t');
var tmp = jQuery.extend(true, {}, row);
tmp.tasks = JSON.parse(tmp.tasks);
var formattedData = JSON.stringify(tmp, null, '\t');
$('#modal-job-description-content').text(formattedData);
$('#modal-job-description').modal('show');
},