%ul.dependencies - job.dependencies.each do |dep| - dep_workflow = dep.workflow - dep_workflow ||= dep.task.workflow if dep.task - dep_workflow ||= File.basename(File.dirname(File.dirname(dep.path))) - str = [dep_workflow, dep.task_name, dep.name].compact * " - " - dep_status = "done" if dep.path.exists? - dep_status ||= dep.status - if dep.file(:progress).exists? - pgr = dep.file(:progress).yaml - if pgr[:last_percent] - pgr_str = " - " + pgr[:last_percent].to_s + "%" - else - pgr_str = " - " + pgr[:ticks].to_s - status = dep_status.to_s + pgr_str - else - status = dep_status - name = dep.name %li %span.workflow= dep_workflow %span.task= dep.task_name %span.name - if String === dep_workflow - wf ||= begin - Kernel.const_get dep_workflow - rescue - elsif Module === dep_workflow - wf = dep_workflow - if Open.remote? dep.path - url = path.split("?").first %a(href=url) #{ name } - elsif wf and wf.task_exports.include? dep.task_name.to_sym - url = "/" + [dep_workflow.to_s, dep.task_name.to_s, dep.name.to_s] * "/" %a(href=url) #{ name } - else = name %span.status(class="#{dep_status}") [#{status}] - if dep.dependencies.any? = partial_render('partials/dependencies', :job => dep)