- @reload_page = true :sass span.progress_time color: grey .wait.ui.segment overflow: auto text-overflow: ellipsis .wait.ui.segment.info.message %h3.ui.header Waiting on #{format_name File.basename(job.name)} %span.ui.basic.segment.content.status= job.status - if job.file(:progress).exists? .footer.ui.basic.segment - progress = job.file(:progress).yaml - if progress[:last_percent] - start = progress[:start] - last_time = progress[:last_time] - if progress[:last_percent].to_i > 0 - ellapsed = last_time - start - if progress[:mean] - missing = progress[:max].to_f - progress[:ticks].to_f - eta = missing / progress[:mean].to_f - else - ratio = progress[:ticks].to_f/progress[:max].to_f - eta = ellapsed * (1 - ratio) - eta = Misc.format_seconds(eta) - ellapsed = Misc.format_seconds(ellapsed) - else - ellapsed = '?' - eta = '?' .ui.teal.step.percent.progress.indicating.meta(data-percent="#{progress[:last_percent]}" data-total=100) .bar .progress .label = progress[:desc] - if progress[:last_percent].to_i > 0 %span.progress_time (#{ eta } ⇒ #{ellapsed}) :deferjs $('.step.progress').progress() - else - ticks = progress[:ticks] - max_ticks = ticks * 1.2 .ui.teal.step.progress.meta(data-value=ticks data-total=max_ticks data-percent="#{ticks.to_f * 100.0 / max_ticks}") .bar .progress .label= progress[:desc] :deferjs $('.step.progress').progress({label: 'ratio',text:{ratio: '{value}'}}) %hr - if defined? job.info_file and File.exists? job.info_file and request.env["REQUEST_URI"].include? job.name - clean_url = add_GET_param(remove_GET_param(request.env["REQUEST_URI"], "_layout"), "_update", "clean") %a.ui.button.blue.clean(href=clean_url) Clean - else - clean_url = add_GET_param(remove_GET_param(request.env["REQUEST_URI"], "_layout"), "_update", "reload") %a.ui.blue.button.reload(href=clean_url) Reload - info_url = request.env["REQUEST_URI"].sub(/\?.*/,'') + '/info' - if request.env["REQUEST_URI"].include? job.name %a.ui.blue.button.reload(href=info_url) Info - if job.files.any? and request.env["REQUEST_URI"].include? job.name - files_url = request.env["REQUEST_URI"].sub(/\?.*/,'') + '/files' %a.ui.blue.button.reload(href=files_url) Files .ui.segment %h3.ui.header Log %ul.step_messages.clean_list - job.messages.reverse.each do |line| - next if line.nil? or line.strip.empty? %li= line - if job.dependencies.any? .ui.segment %h3.ui.header Dependencies .content = partial_render('partials/dependencies', :job => job)