Commit 93c72ea1 authored by Candy Tsai's avatar Candy Tsai

update UI

parent 647690e1
Pipeline #48473 passed with stage
in 10 minutes and 6 seconds
......@@ -23,25 +23,35 @@
<label for="package">Package Name</label>
<input class="form-control" id="package" name="package">
<button id="submit" type="submit" class="btn btn-default">Submit</button>
<button type="button" id="submit" data-loading-text="Submitting..." class="btn btn-default" autocomplete="off">
<% content_for :javascript do %>
$('#submit').on('click', function () {
$this = $(this);
$this.prop('disabled', true);
$btn = $(this).button('loading');
const suite = $('#suite').val();
const arch = $('#arch').val();
const name = $('#package').val();
.done(() => {
alert(`submit test ${suite}/${arch}/${name} success, will redirect to home`);
`<div class="alert alert-success" role="alert">submit test ${suite}/${arch}/${name} success</div>`
.fail(() => {
alert(`submit test ${suite}/${arch}/${name} failed, please try again`);
$this.prop('disabled', false);
`<div class="alert alert-danger" role="alert">submit test ${suite}/${arch}/${name} failed, please try again</div>`
.always(() => {
$('.alert').delay(4000).slideUp(200, function () {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment