1
0
mirror of https://github.com/newnius/YAO-portal.git synced 2025-12-13 09:06:43 +00:00

update, add virtual cluster management

This commit is contained in:
2019-08-01 09:48:20 +08:00
parent e80c7f37f2
commit 8aa7c6dd26
3 changed files with 68 additions and 31 deletions

View File

@@ -1,11 +1,7 @@
function register_events_job() {
$('#btn-job-add').click(function (e) {
cb = function (workspaces) {
var cb = function (workspaces) {
$('#form-job-workspace').children().remove();
var newGroupOption = '<option value="" selected>None</option>';
$('#form-job-workspace').append(newGroupOption);
$.each(workspaces, function (i, workspace) {
var newGroupOption = '<option value="' + workspace.git_repo + '">' + workspace.name + '</option>';
$('#form-job-workspace').append(newGroupOption);
@@ -13,6 +9,15 @@ function register_events_job() {
};
wordspace_gets(null, cb);
var cb_cluster = function (clusters) {
$('#form-job-cluster').children().remove();
$.each(clusters, function (i, cluster) {
var newGroupOption = '<option value="' + cluster.name + '">' + cluster.name + '</option>';
$('#form-job-cluster').append(newGroupOption);
});
};
cluster_gets(cb_cluster);
$('#form-job-name').val('');
$('#form-job-priority').val(25);
$('#form-job-cluster').val(1);