mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-16 03:07:06 +02:00
46 lines
1.2 KiB
Plaintext
46 lines
1.2 KiB
Plaintext
.card
|
|
.card-header
|
|
= t('.update_title', title: fluentd_ui_title)
|
|
.card-body
|
|
#processing
|
|
= icon('fa-lg fa-gear fa-spin')
|
|
= t('.updating')
|
|
#finished{style: "display: none"}
|
|
= icon('fa-lg fa-check')
|
|
= t('.update_finish')
|
|
%p= link_to t('misc.information.page_title'), misc_information_path
|
|
#failed{style: "display: none"}
|
|
= icon('fa-lg fa-exclamation-circle')
|
|
= t('.failed', title: fluentd_ui_title)
|
|
%p= link_to t('misc.information.page_title'), misc_information_path
|
|
|
|
:javascript
|
|
var CURRENT_PID = "#{@current_pid}";
|
|
|
|
function ping() {
|
|
setTimeout(function(){
|
|
jQuery.ajax({
|
|
url: "#{misc_upgrading_status_path}",
|
|
type: "GET",
|
|
data: { old_pid: CURRENT_PID }
|
|
})
|
|
.fail(ping)
|
|
.done(function(status){
|
|
switch(status) {
|
|
case "updating":
|
|
ping();
|
|
break;
|
|
case "failed":
|
|
jQuery('#processing').hide();
|
|
jQuery('#failed').show();
|
|
break;
|
|
case "finished":
|
|
jQuery('#processing').hide();
|
|
jQuery('#finished').show();
|
|
break;
|
|
}
|
|
});
|
|
}, 3000);
|
|
}
|
|
ping();
|