});
});
+ $(document).on('click', '.compute-detail', function(e) {
+ $(e.target).collapse('hide');
+ });
+
+ $(document).on('click', '.compute-node-summary', function(e) {
+ $(e.target.href).collapse('toggle');
+ });
+
});
+jQuery(function($){
$(document).on('ajax:complete arv:pane:loaded ready', function() {
$('[data-utc-date]').each(function(i, elm) {
- var re = /(\d\d\d\d)-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d) UTC/;
- var v = $(elm).attr('data-utc-date').match(re);
+ console.log("woble!");
+ var v = $(elm).attr('data-utc-date').match(/(\d\d\d\d)-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d) UTC/);
+ if (!v) {
+ v = $(elm).attr('data-utc-date').match(/(\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)Z/);
+ }
+
if (v) {
var ts = new Date(Date.UTC(v[1], v[2]-1, v[3], v[4], v[5], v[6]));
- $(elm).text(ts.toLocaleTimeString() + " " + ts.toLocaleDateString());
+ if ($(elm).attr('data-utc-date-opts') && $(elm).attr('data-utc-date-opts').match(/noseconds/)) {
+ $(elm).text((ts.getHours() > 12 ? (ts.getHours()-12) : ts.getHours())
+ + ":" + (ts.getMinutes() < 10 ? '0' : '') + ts.getMinutes()
+ + (ts.getHours() > 12 ? " PM " : " AM ")
+ + ts.toLocaleDateString());
+ } else {
+ $(elm).text(ts.toLocaleTimeString() + " " + ts.toLocaleDateString());
+ }
}
});
});
+});
height: 20em;
overflow-y: scroll;
}
+
+.compute-summary {
+ margin: 0.15em 0em 0.15em 0em;
+ display: inline-block;
+}
+
+.compute-summary-head {
+ margin-left: 0.3em;
+}
+
+.compute-detail {
+ border: 1px solid;
+ border-color: #DDD;
+ border-radius: 3px;
+ padding: 0.2em;
+ position: absolute;
+ z-index: 1;
+ background: white;
+}
+
+.compute-detail:hover {
+ cursor: pointer;
+}
+
+.compute-node-summary:hover {
+ cursor: pointer;
+}
+
+.compute-summary-numbers .panel {
+ margin-bottom: 0px;
+}
+
+.compute-summary-numbers table {
+ width: 100%;
+ td,th {
+ text-align: center;
+ }
+}
+
+.compute-summary-nodelist {
+ margin-bottom: 10px
+}
+
+.dashboard-panel-info-row {
+ padding: .5em;
+ border-radius: .3em;
+}
+
+.x-ellip {
+ overflow-x: hide;
+ text-overflow: ellipsis;
+}
+
+.dashboard-panel-info-row:hover {
+ background-color: #D9EDF7;
+}
\ No newline at end of file
end.reverse
end
+ helper_method :running_pipelines
+ def running_pipelines
+ PipelineInstance.order(["started_at asc", "created_at asc"]).filter([["state", "in", ["RunningOnServer", "RunningOnClient"]]])
+ end
+
+ helper_method :finished_pipelines
+ def finished_pipelines lim
+ PipelineInstance.limit(lim).order(["finished_at desc"]).filter([["state", "in", ["Complete", "Failed", "Paused"]], ["finished_at", "!=", nil]])
+ end
+
+ helper_method :recent_collections
+ def recent_collections lim
+ c = Collection.limit(lim).order(["modified_at desc"]).filter([["owner_uuid", "is_a", "arvados#group"]])
+ own = {}
+ Group.filter([["uuid", "in", c.map(&:owner_uuid)]]).each do |g|
+ own[g[:uuid]] = g
+ end
+ {collections: c, owners: own}
+ end
+
helper_method :my_project_tree
def my_project_tree
build_project_trees
arvados_api_client.api "jobs/#{self.uuid}/", "cancel", {}
end
+ def self.queue_size
+ arvados_api_client.api("jobs/", "queue_size", {"_method"=> "GET"})[:queue_size] rescue 0
+ end
+
def self.state job
if job.respond_to? :state and job.state
return job.state
<span class="label label-danger">failed</span>
<% elsif p.state == 'RunningOnServer' || p.state == 'RunningOnClient' %>
<span class="label label-info">running</span>
+<% elsif p.state == 'Paused' %>
+ <span class="label label-default">paused</span>
<% else %>
<% if not p.components.values.any? { |c| c[:job] rescue false } %>
<span class="label label-default">not started</span>
<% pipelines = PipelineInstance.filter([["components", "like", "%#{@object.uuid}%"]]).each do |pipeline| %>
<% pipeline.components.each do |cname, c| %>
<% if c[:output_uuid] == @object.uuid %>
- <b><%= cname %></b> component of pipeline <b><%= link_to_if_arvados_object(pipeline, friendly_name: true) %></b>
+ <b><%= cname %></b> component of <b><%= link_to_if_arvados_object(pipeline, friendly_name: true) %></b>
<% if c.andand[:job].andand[:finished_at] %>
- <b>finished at <%= c[:job][:finished_at] %></b>
+ finished at <span class="utc-date"
+ data-utc-date="<%= c[:job][:finished_at] %>"><%= c[:job][:finished_at] %></span>
<% end %>
+ <br>
<% end %>
<% end %>
<% end %>
<p>
<% if @object.started_at %>
- Started at <span data-utc-date="<%= @object.started_at %>"><%= @object.started_at %></span> and
- <% else %>
- Has not started.
+ Started at <span data-utc-date="<%= @object.started_at %>"><%= @object.started_at %></span>.
<% end %>
<% if @object.state == 'Complete' %>
- completed in
+ Completed in
<% elsif @object.state == 'Failed' %>
- failed after
- <% elsif @object.started_at %>
- has been active for
+ Failed after
+ <% else %>
+ Has been active for
<% end %>
<% walltime = if @object.started_at
<div class="row">
<div class="col-md-3">
<h4 class="panel-title">
- <a data-toggle="collapse" data-parent="#accordion" href="#collapse<%= i %>">
+ <a data-toggle="collapse" href="#collapse<%= i %>">
<%= pj[:name] %> <span class="caret"></span>
</a>
</h4>
<div class="col-md-5">
<% queuetime = Time.now - current_job[:created_at] %>
Queued for <%= runtime(queuetime, true) %>.
+ <% begin %>
<% if current_job.queue_position == 0 %>
This job is next in the queue to run.
<% elsif current_job.queue_position == 1 %>
<% else %>
There are <%= current_job.queue_position %> jobs in the queue ahead of this one.
<% end %>
+ <% rescue %>
+ <% end %>
</div>
<% end %>
<% else %>
--- /dev/null
+
+<div class="compute-summary-nodelist">
+ <% nodes.sort_by { |n| n.hostname || "" }.each do |n| %>
+ <% if n.crunch_worker_state.in? ["busy", "idle"] %>
+ <div class="compute-summary">
+ <a data-toggle="collapse" href="#detail_<%= n.hostname %>" class="compute-summary-head label label-<%= if n.crunch_worker_state == 'busy' then 'primary' else 'default' end %>">
+ <%= n.hostname %>
+ </a>
+ <div id="detail_<%= n.hostname %>" class="collapse compute-detail">
+ state: <%= n.crunch_worker_state %><br>
+ <% [:total_cpu_cores, :total_ram_mb, :total_scratch_mb].each do |i| %>
+ <%= i.to_s.gsub '_', ' ' %>: <%= n.info[i] %><br>
+ <% end %>
+ </div>
+ </div>
+ <% end %>
+ <% end %>
+</div>
--- /dev/null
+<div class="compute-summary-numbers">
+ <table>
+ <colgroup>
+ <col width="25%">
+ <col width="25%">
+ <col width="25%">
+ <col width="25%">
+
+ </colgroup>
+ <tr>
+ <td><%= Job.queue_size %></td>
+ <td><%= nodes.select {|n| n.crunch_worker_state.in? ["busy", "idle"] }.size %></td>
+ <td><%= nodes.select {|n| n.crunch_worker_state == "busy" }.size %></td>
+ <td><%= nodes.select {|n| n.crunch_worker_state == "idle" }.size %></td>
+ </tr>
+ <tr>
+ <th>Queue</th>
+ <th>Nodes</th>
+ <th>Busy</th>
+ <th>Idle</th>
+ </tr>
+ </table>
+</div>
--- /dev/null
+
+ <div class="row">
+ <div class="col-md-6">
+ <div class="panel panel-default">
+ <div class="panel-heading"><span class="panel-title">Active pipelines</span>
+ <span class="pull-right">
+ <%= link_to(
+ choose_pipeline_templates_path(
+ title: 'Choose a pipeline to run:',
+ action_name: 'Next: choose inputs <i class="fa fa-fw fa-arrow-circle-right"></i>',
+ action_href: pipeline_instances_path,
+ action_method: 'post',
+ action_data: {'selection_param' => 'pipeline_instance[pipeline_template_uuid]', 'pipeline_instance[owner_uuid]' => current_user.uuid, 'success' => 'redirect-to-created-object'}.to_json),
+ { class: "btn btn-primary btn-xs", remote: true, method: 'get' }) do %>
+ <i class="fa fa-fw fa-gear"></i> Run a pipeline...
+ <% end %>
+ </span>
+ </div>
+
+ <div class="panel-body">
+ <% if running_pipelines.empty? %>
+ No pipelines are currently running.
+ <% end %>
+ <% running_pipelines.each do |p| %>
+ <div class="dashboard-panel-info-row">
+ <div class="clearfix">
+ <%= link_to_if_arvados_object p, friendly_name: true %>
+
+ <div class="pull-right" style="width: 40%">
+ <div class="progress" style="margin-bottom: 0px">
+ <% running = [] %>
+ <% failed = [] %>
+ <% completed = [] %>
+ <% queued = [] %>
+ <% p.components.each do |k, v| %>
+ <% if v.is_a? Hash and v[:job] %>
+ <% if Job::state(v[:job]) == "Running" %>
+ <% running << k %>
+ <% elsif Job::state(v[:job]) == "Failed" or Job::state(v[:job]) == "Canceled" %>
+ <% failed << k %>
+ <% elsif Job::state(v[:job]) == "Completed" %>
+ <% completed << k %>
+ <% elsif Job::state(v[:job]) == "Queued" %>
+ <% queued << k %>
+ <% end %>
+ <% end %>
+ <% end %>
+ <% completed_pct = (completed.size * 100) / p.components.size %>
+ <% failed_pct = (failed.size * 100) / p.components.size %>
+ <% running_pct = (running.size * 100) / p.components.size %>
+ <% queued_pct = (queued.size * 100) / p.components.size %>
+
+ <div class="progress-bar progress-bar-success" style="width: <%= completed_pct %>%">
+ <span class="sr-only"></span>
+ </div>
+ <div class="progress-bar progress-bar-warning" style="width: <%= failed_pct %>%">
+ <span class="sr-only"></span>
+ </div>
+ <div class="progress-bar progress-bar-primary" style="width: <%= running_pct %>%">
+ <span class="sr-only"></span>
+ </div>
+ <div class="progress-bar progress-bar-default" style="width: <%= queued_pct %>%">
+ <span class="sr-only"></span>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="clearfix">
+ Started at <span class="utc-date" data-utc-date="<%= p[:started_at] || p[:created_at] %>"
+ data-utc-date-opts="noseconds"><%= p[:created_at] %></span>.
+ <% pipeline_time = Time.now - (p[:started_at] || p[:created_at]) %>
+ Active for <%= runtime(pipeline_time, false) %>.
+
+ <div class="pull-right">
+ <% running.each do |k| %>
+ <span class="label label-primary"><%= k %></span>
+ <% end %>
+ <% queued.each do |k| %>
+ <span class="label label-default"><%= k %></span>
+ <% end %>
+ </div>
+ </div>
+ </div>
+ <% end %>
+ </div>
+ </div>
+
+ <div class="panel panel-default">
+ <div class="panel-heading"><span class="panel-title">Recently finished pipelines</span></div>
+ <div class="panel-body">
+ <% finished_pipelines(8).each do |p| %>
+ <div class="dashboard-panel-info-row">
+ <div class="row">
+ <div class="col-md-6 x-ellip">
+ <%= link_to_if_arvados_object p, friendly_name: true %>
+ </div>
+ <div class="col-md-2">
+ <%= render partial: "pipeline_status_label", locals: {p: p}%>
+ </div>
+ <div class="col-md-4">
+ <span class="utc-date" data-utc-date="<%= p[:finished_at] || p[:modified_at] %>"
+ data-utc-date-opts="noseconds"><%= p[:modified_at] %></span>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-md-12">
+ <% if p[:started_at] and p[:finished_at] %>
+ <% pipeline_time = p[:finished_at] - p[:started_at] %>
+ Active for <%= runtime(pipeline_time, false) %>
+ <% end %>
+
+ <span class="pull-right">
+ <% outputs = [] %>
+ <% p.components.each do |k, c| %>
+ <% outputs << c[:output_uuid] if c[:output_uuid] %>
+ <% end %>
+ <% if outputs.size == 0 %>
+ No output.
+ <% elsif outputs.size == 1 %>
+ <i class="fa fa-fw fa-archive"></i> <%= link_to_if_arvados_object outputs[0], friendly_name: true %>
+ <% else %>
+ <a href="#<%= p[:uuid] %>" data-toggle="collapse">Outputs <span class="caret"></span></a>
+ <% end %>
+ </span>
+ </div>
+ </div>
+
+ <div class="row collapse" id="<%= p[:uuid] %>" >
+ <div class="col-md-offset-3 col-md-10">
+ <% outputs.each do |out| %>
+ <div>
+ <i class="fa fa-fw fa-archive"></i> <%= link_to_if_arvados_object out, friendly_name: true %>
+ </div>
+ <% end %>
+ </div>
+ </div>
+
+ </div>
+ <% end %>
+ </div>
+ </div>
+ </div>
+
+ <div class="col-md-6">
+ <% nodes = Node.all %>
+ <div class="panel panel-default">
+ <div class="panel-heading"><span class="panel-title"><a data-toggle="collapse" href="#compute_node_status">Compute node status <span class="caret"></span></a></span></div>
+ <div class="panel-body">
+ <div class="compute-node-summary" data-toggle="collapse" href="#compute_node_status">
+ <%= render partial: 'compute_node_summary', locals: {nodes: nodes} %>
+ </div>
+ <div id="compute_node_status" class="collapse">
+ <%= render partial: 'compute_node_status', locals: {nodes: nodes} %>
+ </div>
+ </div>
+ </div>
+ <div class="panel panel-default">
+ <div class="panel-heading"><span class="panel-title">Recent collections</span></div>
+ <div class="panel-body">
+ <% r = recent_collections(8) %>
+ <% r[:collections].each do |p| %>
+ <div class="dashboard-panel-info-row">
+ <div>
+ <i class="fa fa-fw fa-folder-o"></i><%= link_to_if_arvados_object r[:owners][p[:owner_uuid]], friendly_name: true %>/
+ <span class="pull-right"><span class="utc-date"
+ data-utc-date="<%= p[:modified_at] %>"
+ data-utc-date-opts="noseconds"><%= p[:modified_at]%></span></span>
+ </div>
+ <div class="x-ellip" style="margin-left: 1em"><%= link_to_if_arvados_object p, friendly_name: true %>
+ </div>
+ </div>
+ <% end %>
+ </div>
+ </div>
+ </div>
+ </div>
+
+</div>
-<div>
- <div class="row">
- <div class="col-sm-6">
- <% if my_projects.empty? %>
- <div class="panel panel-info">
- <div class="panel-heading">
- <h3 class="panel-title">
- Welcome to <b><%= Rails.configuration.site_name %></b>.
- </h3>
- </div>
- <div class="panel-body">
- <img src="/favicon.ico" class="pull-right" alt="" style="opacity: 0.3"/>
- <p>
- This site runs Arvados, the open source biomedical analysis platform. <a href="https://arvados.org" target="_blank">Learn more…</a>
- </p>
- <p>
- <b>To get started,</b> create a project using the "Add new project" button below.
- </p>
- </div>
- </div>
- <% end %>
- <div class="panel panel-default">
- <div class="panel-heading">
- <div class="pull-right">
- <%= button_to projects_path(method: 'post'), class: 'btn btn-xs btn-primary' do %>
- <i class="fa fa-fw fa-plus"></i>
- Add new project
- <% end %>
- </div>
- <h3 class="panel-title">
- My projects
- </h3>
- </div>
- <div class="panel-body scroll-20em">
- <%= render partial: 'index_projects', locals: {tree: my_project_tree, show_root_node: true} %>
- </div>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="panel panel-default">
- <div class="panel-heading">
- <h3 class="panel-title">
- Projects shared with me
- </h3>
- </div>
- <div class="panel-body scroll-20em">
- <%= render partial: 'index_projects', locals: {tree: shared_project_tree, show_root_node: false} %>
- </div>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-sm-12">
- <div class="panel panel-default">
- <div class="panel-heading">
- <div class="pull-right">
- <%= link_to jobs_path, class: 'btn btn-default btn-xs' do %>
- All jobs <i class="fa fa-fw fa-arrow-circle-right"></i>
- <% end %>
- <%= link_to pipeline_instances_path, class: 'btn btn-default btn-xs' do %>
- All pipelines <i class="fa fa-fw fa-arrow-circle-right"></i>
- <% end %>
- </div>
- <h3 class="panel-title">
- Recent jobs and pipelines
- </h3>
- </div>
- <div class="panel-body">
- <%= render partial: 'index_jobs_and_pipelines' %>
- </div>
- </div>
- </div>
+<% content_for :js do %>
+ setInterval(function(){
+ $('#dashboard-content').trigger('arv:pane:reload');
+ }, 15000);
+<% end %>
+
+<div id="dashboard-content"
+ class="pane-anchor loaded"
+ href="#dashboard-content-pane"
+ data-pane-content-url="<%= root_url tab_pane: "dashboard" %>"
+ >
+ <div id="dashboard-content-pane" class="active">
+ <%= render partial: 'show_dashboard' %>
</div>
</div>
if profile_config && !has_profile
assert page.has_text?('Save profile'), 'No text - Save profile'
else
- assert page.has_text?('My projects'), 'Not found text - My projects'
+ assert page.has_link?("Projects"), 'Not found link - Projects'
+ page.find("#projects-menu").click
assert page.has_text?('Projects shared with me'), 'Not found text - Project shared with me'
end
elsif invited
assert page.has_text? 'Textile description for job'
assert page.has_link? 'Go to dashboard'
click_link 'Go to dashboard'
- assert page.has_text? 'My projects'
- assert page.has_text? 'Projects shared with me'
+ assert page.has_text? 'Active pipelines'
end
end
test "login with api_token works after redirect" do
visit page_with_token('active_trustedclient')
- assert page.has_text?('Recent jobs'), "Missing 'Recent jobs' from page"
+ assert page.has_text?('Active pipelines'), "Missing 'Active pipelines' from page"
assert_no_match(/\bapi_token=/, current_path)
end
# Add this collection to the project
visit '/projects'
- find('.arv-project-list a,button', text: 'A Project').click
+ find("#projects-menu").click
+ find('.dropdown-menu a,button', text: 'A Project').click
find('.btn', text: 'Add data').click
within('.modal-dialog') do
wait_for_ajax
# Add this collection to the project using collections menu from top nav
visit '/projects'
- find('.arv-project-list a,button', text: 'A Project').click
+ find("#projects-menu").click
+ find('.dropdown-menu a,button', text: 'A Project').click
find('.btn', text: 'Add data').click
within('.modal-dialog') do
wait_for_ajax
assert page.has_text? 'Textile description for pipeline template'
assert page.has_link? 'Go to dashboard'
click_link 'Go to dashboard'
- assert page.has_text? 'My projects'
- assert page.has_text? 'Projects shared with me'
+ assert page.has_text? 'Active pipelines'
# again visit recent templates page and verify edited description
visit page_with_token("active", "/pipeline_templates")
test 'Find a project and edit its description' do
visit page_with_token 'active', '/'
- find('.arv-project-list a,button', text: 'A Project').
- click
+ find("#projects-menu").click
+ find(".dropdown-menu a", text: "A Project").click
within('.container-fluid', text: api_fixture('groups')['aproject']['name']) do
find('span', text: api_fixture('groups')['aproject']['name']).click
within('.arv-description-as-subtitle') do
test 'Find a project and edit description to textile description' do
visit page_with_token 'active', '/'
- find('.arv-project-list a,button', text: 'A Project').
- click
+ find("#projects-menu").click
+ find(".dropdown-menu a", text: "A Project").click
within('.container-fluid', text: api_fixture('groups')['aproject']['name']) do
find('span', text: api_fixture('groups')['aproject']['name']).click
within('.arv-description-as-subtitle') do
click_link 'take me home'
# now in dashboard
- assert(page.has_text?('My projects'), 'My projects - not found on dashboard')
- assert(page.has_text?('Projects shared with me'), 'Projects shared with me - not found on dashboard')
- assert(page.has_text?('Textile description for A project'), "Project description not found")
- assert(page.has_no_text?('*Textile description for A project*'), "Project description is not rendered properly in dashboard")
- assert(page.has_no_text?('And a new paragraph in description'), "Project description is not truncated after first paragraph")
+ assert(page.has_text?('Active pipelines'), 'Active pipelines - not found on dashboard')
end
test 'Find a project and edit description to html description' do
visit page_with_token 'active', '/'
- find('.arv-project-list a,button', text: 'A Project').
- click
+ find("#projects-menu").click
+ find(".dropdown-menu a", text: "A Project").click
within('.container-fluid', text: api_fixture('groups')['aproject']['name']) do
find('span', text: api_fixture('groups')['aproject']['name']).click
within('.arv-description-as-subtitle') do
"Textile description is displayed with uninterpreted formatting characters")
assert(page.has_link?("take me home"),"link not found in description")
click_link 'take me home'
- assert page.has_text?('My projects')
- assert page.has_text?('Projects shared with me')
+ assert page.has_text?('Active pipelines')
end
test 'Find a project and edit description to textile description with link to object' do
visit page_with_token 'active', '/'
- find('.arv-project-list a,button', text: 'A Project').
- click
+ find("#projects-menu").click
+ find(".dropdown-menu a", text: "A Project").click
within('.container-fluid', text: api_fixture('groups')['aproject']['name']) do
find('span', text: api_fixture('groups')['aproject']['name']).click
within('.arv-description-as-subtitle') do
test 'Create a project and move it into a different project' do
visit page_with_token 'active', '/projects'
- find('.btn', text: "Add new project").click
+ find("#projects-menu").click
+ find(".dropdown-menu a", text: "Home").click
+ find('.btn', text: "Add a subproject").click
# within('.editable', text: 'New project') do
within('h2') do
wait_for_ajax
visit '/projects'
- find('.btn', text: "Add new project").click
+ find("#projects-menu").click
+ find(".dropdown-menu a", text: "Home").click
+ find('.btn', text: "Add a subproject").click
within('h2') do
find('.fa-pencil').click
find('.editable-input input').set('Project 5678')
when 'Copy'
assert page.has_text?(my_collection['name']), 'Collection not found in src project after copy'
visit page_with_token 'active', '/'
- find('.arv-project-list a,button', text: dest['name']).click
+ find("#projects-menu").click
+ find(".dropdown-menu a", text: dest['name']).click
assert page.has_text?(my_collection['name']), 'Collection not found in dest project after copy'
# now remove it from destination project to restore to original state
when 'Move'
assert page.has_no_text?(my_collection['name']), 'Collection still found in src project after move'
visit page_with_token 'active', '/'
- find('.arv-project-list a,button', text: dest['name']).click
+ find("#projects-menu").click
+ find(".dropdown-menu a", text: dest['name']).click
assert page.has_text?(my_collection['name']), 'Collection not found in dest project after move'
# move it back to src project to restore to original state
when 'Remove'
assert page.has_no_text?(my_collection['name']), 'Collection still found in src project after remove'
visit page_with_token 'active', '/'
- find('.arv-project-list a,button', text: 'Home').click
+ find("#projects-menu").click
+ find(".dropdown-menu a", text: "Home").click
assert page.has_text?(my_collection['name']), 'Collection not found in home project after remove'
end
end
def perform_selection_action src, dest, item, action
visit page_with_token 'active', '/'
- find('.arv-project-list a,button', text: src['name']).click
+ find("#projects-menu").click
+ find(".dropdown-menu a", text: src['name']).click
assert page.has_text?(item['name']), 'Collection not found in src project'
within('tr', text: item['name']) do
# verify that selection options are disabled on the project until an item is selected
visit page_with_token 'active', '/'
- find('.arv-project-list a,button', text: my_project['name']).click
+ find("#projects-menu").click
+ find(".dropdown-menu a", text: my_project['name']).click
click_button 'Selection...'
within('.selection-action-container') do
# select collection and verify links are enabled
visit page_with_token 'active', '/'
- find('.arv-project-list a,button', text: my_project['name']).click
+ find("#projects-menu").click
+ find(".dropdown-menu a", text: my_project['name']).click
assert page.has_text?(my_collection['name']), 'Collection not found in project'
within('tr', text: my_collection['name']) do
# select subproject and verify that copy action is disabled
visit page_with_token 'active', '/'
- find('.arv-project-list a,button', text: my_project['name']).click
+ find("#projects-menu").click
+ find(".dropdown-menu a", text: my_project['name']).click
click_link 'Subprojects'
assert page.has_text?(my_subproject['name']), 'Subproject not found in project'
# select subproject and a collection and verify that copy action is still disabled
visit page_with_token 'active', '/'
- find('.arv-project-list a,button', text: my_project['name']).click
+ find("#projects-menu").click
+ find(".dropdown-menu a", text: my_project['name']).click
click_link 'Subprojects'
assert page.has_text?(my_subproject['name']), 'Subproject not found in project'
my_collection = api_fixture('collections')['collection_to_move_around_in_aproject']
visit page_with_token 'active', '/'
- find('.arv-project-list a,button', text: my_project['name']).click
+ find("#projects-menu").click
+ find(".dropdown-menu a", text: my_project['name']).click
assert page.has_text?(my_collection['name']), 'Collection not found in project'
within('tr', text: my_collection['name']) do
assert page.has_text?('Save profile'), 'No text - Save profile'
add_profile user
else
- assert page.has_text?('My projects'), 'Not found text - My projects'
+ assert page.has_text?('Active pipelines'), 'Not found text - Active pipelines'
assert page.has_no_text?('Save profile'), 'Found text - Save profile'
end
elsif invited
click_link 'Back to work!'
# profile saved and in home page now
- assert page.has_text?('My projects'), 'No text - My projects'
- assert page.has_text?('Projects shared with me'), 'No text - Projects shared with me'
+ assert page.has_text?('Active pipelines'), 'No text - My projects'
end
[
def queue_size
# Users may not be allowed to see all the jobs in the queue, so provide a
- # method to get the actual queue length.
+ # method to get just the queue size in order to get a gist of how busy the
+ # cluster is.
render :json => {:queue_size => Job.queue.size}
end