-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[POC] Trigger os-autoinst-distri-example tests from fresh openQA
With this PR a logged in user can trigger a job via a form, providing settings, git repo and a scenarion definition. User doesnt need to have special role. Keep in mind that NEEDLES_DIR doesnt need for os-autoinst-distri-example. Things which stayed out of this PR are: - The UI design - Posibility to upload the yaml definition - Some way to return data to the webUI, like the job id - Input validation - Additional error handling (maybe) https://progress.opensuse.org/issues/162899 Signed-off-by: ybonatakis <[email protected]>
- Loading branch information
Showing
8 changed files
with
110 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
function runExample(form) { | ||
let data = $(form).serialize(); | ||
console.log('Ser data ' + data + '<<'); | ||
let postUrl = form.dataset.postUrl; | ||
$.ajax({ | ||
url: postUrl, | ||
method: 'POST', | ||
data: data, | ||
success: function (response) { | ||
console.log(response.ids); | ||
for (newjobid in response.ids) { | ||
console.log('id ' + response.ids[newjobid]); | ||
alert('job runs on localhost/tests/' + response.ids[newjobid]); | ||
} | ||
//fetchHtmlEntry(rowUrl + response.id, targetElement); | ||
}, | ||
error: function (xhr, ajaxOptions, thrownError) { | ||
console.log(ajaxOptions); | ||
console.log(xhr); | ||
|
||
if (xhr.responseJSON.error) { | ||
console.log(xhr.responseJSON.error); | ||
} else { | ||
console.log(thrownError); | ||
} | ||
} | ||
}); | ||
event.preventDefault(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,3 +129,7 @@ | |
background-color: $default-bg-color-dark; | ||
} | ||
} | ||
|
||
label.form-label { | ||
font-weight: bold; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters