[ARVADOS] updated: c00109a631beeca5a87b6073f05a13fefc69a0a1

git at public.curoverse.com git at public.curoverse.com
Fri Oct 31 15:33:43 EDT 2014


Summary of changes:
 .../_dashboard_finished_pipeline_rows.html.erb     |   2 +-
 .../app/views/projects/_show_dashboard.html.erb    |   4 +-
 .../config/environments/production.rb.example      |   2 +-
 apps/workbench/test/integration/dashboard_test.rb  | 116 +++++++++++++++++
 doc/_config.yml                                    |  11 +-
 .../create-standard-objects.html.textile.liquid    |  62 +++------
 doc/install/index.html.textile.liquid              |  21 +--
 doc/install/install-api-server.html.textile.liquid | 142 +++++++++++----------
 .../install-crunch-dispatch.html.textile.liquid    |   8 +-
 doc/install/install-keep.html.textile.liquid       |  54 --------
 doc/install/install-keepproxy.html.textile.liquid  |  84 ++++++++++++
 doc/install/install-keepstore.html.textile.liquid  |  90 +++++++++++++
 .../install-manual-overview.html.textile.liquid    |  16 +++
 ...l-manual-prerequisites-ruby.html.textile.liquid |  31 +++++
 ...nstall-manual-prerequisites.html.textile.liquid |  46 +++++++
 .../install-shell-server.html.textile.liquid       |  17 +++
 doc/install/install-sso.html.textile.liquid        |   9 +-
 .../install-workbench-app.html.textile.liquid      | 106 ++++++++++-----
 .../test/fixtures/api_client_authorizations.yml    |  18 +++
 services/api/test/fixtures/pipeline_instances.yml  |  59 +++++++++
 services/api/test/fixtures/users.yml               |  42 ++++++
 21 files changed, 705 insertions(+), 235 deletions(-)
 create mode 100644 apps/workbench/test/integration/dashboard_test.rb
 delete mode 100644 doc/install/install-keep.html.textile.liquid
 create mode 100644 doc/install/install-keepproxy.html.textile.liquid
 create mode 100644 doc/install/install-keepstore.html.textile.liquid
 create mode 100644 doc/install/install-manual-overview.html.textile.liquid
 create mode 100644 doc/install/install-manual-prerequisites-ruby.html.textile.liquid
 create mode 100644 doc/install/install-manual-prerequisites.html.textile.liquid
 create mode 100644 doc/install/install-shell-server.html.textile.liquid

       via  c00109a631beeca5a87b6073f05a13fefc69a0a1 (commit)
       via  bdd31f249bcd434089ed8eddf9f567d7218502e7 (commit)
       via  27b534ddd7d2b56ff63cd2ca100fa3119df51a2f (commit)
       via  4978c1e740700ec78c26a8046a457496fd9b974c (commit)
       via  9ac37f367da0b11971f2ecf8a80a38ae60d43a61 (commit)
       via  afc70738e8dbbc96e177f1f920b1e8e5f2598fa9 (commit)
       via  28ac1f93305968a913c394dd3d3581c4e290722d (commit)
       via  7c3f2671d43770240a834b9bd5c34ec748acdc1d (commit)
       via  d14c0c8186517176ecf182cf2555aee8ba4ede6d (commit)
       via  ed4105d0c6a0d453143849afcea33960afc22117 (commit)
      from  3042c000bd6cdd1b0a36b7dc57a8b8c969b178f9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit c00109a631beeca5a87b6073f05a13fefc69a0a1
Merge: bdd31f2 27b534d
Author: radhika <radhika at curoverse.com>
Date:   Fri Oct 31 15:33:35 2014 -0400

    Merge branch 'master' into 4024-scroll-dashboard-recent-pipelines


commit bdd31f249bcd434089ed8eddf9f567d7218502e7
Author: radhika <radhika at curoverse.com>
Date:   Fri Oct 31 15:32:37 2014 -0400

    4024: add integration tests to dashboard finished pipelines panel.

diff --git a/apps/workbench/app/views/application/_dashboard_finished_pipeline_rows.html.erb b/apps/workbench/app/views/application/_dashboard_finished_pipeline_rows.html.erb
index 1249449..4b4decd 100644
--- a/apps/workbench/app/views/application/_dashboard_finished_pipeline_rows.html.erb
+++ b/apps/workbench/app/views/application/_dashboard_finished_pipeline_rows.html.erb
@@ -1,5 +1,5 @@
   <% @finished_pipelines.andand.results.each do |p| %>
-    <tr class="filterable"
+    <tr class="filterable arv-dashboard-finished-pipeline-row"
         data-object-uuid="<%= p.uuid %>"
         data-kind="<%= p.kind %>"
         data-object-created-at="<%= p.created_at %>"
diff --git a/apps/workbench/app/views/projects/_show_dashboard.html.erb b/apps/workbench/app/views/projects/_show_dashboard.html.erb
index e5cb0c5..55ce9c5 100644
--- a/apps/workbench/app/views/projects/_show_dashboard.html.erb
+++ b/apps/workbench/app/views/projects/_show_dashboard.html.erb
@@ -20,7 +20,7 @@
         <% _running_pipelines = running_pipelines %>
         <% lookup = preload_objects_for_dataclass PipelineTemplate, (_running_pipelines.map(&:pipeline_template_uuid)) %>
 
-        <div class="panel-body">
+        <div class="panel-body arv-dashboard-running-pipelines">
           <% if _running_pipelines.empty? %>
             No pipelines are currently running.
           <% else %>
@@ -119,7 +119,7 @@
             <% end %>
           </span>
         </div>
-        <div class="panel-body">
+        <div class="panel-body arv-dashboard-recent-collections">
           <% r = recent_collections(8) %>
           <% r[:collections].each do |p| %>
             <div class="dashboard-panel-info-row">
diff --git a/apps/workbench/test/integration/dashboard_test.rb b/apps/workbench/test/integration/dashboard_test.rb
new file mode 100644
index 0000000..dfdb729
--- /dev/null
+++ b/apps/workbench/test/integration/dashboard_test.rb
@@ -0,0 +1,116 @@
+require 'integration_helper'
+require 'selenium-webdriver'
+require 'headless'
+
+class DashboardTest < ActionDispatch::IntegrationTest
+  setup do
+    headless = Headless.new
+    headless.start
+    Capybara.current_driver = :selenium
+  end
+
+  # verify active and finished pipelines, and collections in the dashboard
+  def verify_dashboard user, num_finished, num_running, num_collections, exact_counts
+    verify_active_pipelines_panel num_running, exact_counts
+    verify_finished_pipelines_panel num_finished, exact_counts
+    verify_recent_collections_panel num_collections, exact_counts
+  end
+
+  # verify recently finished pipelines panel in dashboard
+  def verify_finished_pipelines_panel num_finished, exact_counts
+    assert(page.has_text?('Recently finished pipelines'), 'Recently finished pipelines - not found on dashboard')
+
+    # The recently finished pipelines panel pulls in 8 pipelines at a time
+    num_pages = num_finished/8 + 1
+    (0..num_pages).each do |i|
+      within('.arv-recently-finished-pipelines') do
+        page.execute_script "window.scrollBy(0,999000)"
+        begin
+          wait_for_ajax
+        rescue
+        end
+      end
+    end
+
+    expected_names = []
+    (0..num_finished-1).each do |i|
+      expected_names << "pipeline_#{i.to_s}"
+    end
+
+    found_names = []
+    found_obj_count = 0
+    within('.arv-recently-finished-pipelines') do
+      objs_found = page.all('tr[data-kind="arvados#pipelineInstance"]')
+      found_obj_count = objs_found.count
+
+      (0..found_obj_count-1).each do |i|
+        name = objs_found[i].text.split[0]
+        found_names << name
+      end
+    end
+
+    assert_equal true, (found_names - expected_names).empty?,
+                 "did not find all names: #{found_names - expected_names}"
+
+    if exact_counts
+      assert_equal num_finished, found_obj_count,
+          "Expected #{num_finished} but found #{found_obj_count} finished pipelines"
+    else
+      assert_equal true, (found_obj_count >= num_finished),
+          "Expected at least #{num_finished} but found #{found_obj_count} finished pipelines"
+    end
+  end
+
+  # verify active pipelines panel in dashboard
+  def verify_active_pipelines_panel num_running, exact_counts
+    assert(page.has_text?('Active pipelines'), 'Active pipelines - not found on dashboard')
+
+    found_obj_count = 0
+    within('.arv-dashboard-running-pipelines') do
+      objs_found = page.all('div[class="dashboard-panel-info-row"]')
+      found_obj_count = objs_found.count
+    end
+
+    if exact_counts
+      assert_equal num_running, found_obj_count,
+          "Expected #{num_running} but found #{found_obj_count} running pipelines"
+    else
+      assert_equal true, (found_obj_count >= num_running),
+          "Expected at least #{num_running} but found #{found_obj_count} running pipelines"
+    end
+  end
+
+  # verify recent collections panel in dashboard
+  def verify_recent_collections_panel num_collections, exact_counts
+    assert(page.has_text?('Recent collections'), 'Recent collections - not found on dashboard')
+
+    found_obj_count = 0
+    within('.arv-dashboard-recent-collections') do
+      objs_found = page.all('div[class="dashboard-panel-info-row"]')
+      found_obj_count = objs_found.count
+    end
+
+    if exact_counts
+      assert_equal num_collections, found_obj_count,
+          "Expected #{num_collections} but found #{found_obj_count} recent collections"
+    else
+      assert_equal true, (found_obj_count >= num_collections),
+          "Expected at least #{num_collections} but found #{found_obj_count} recent collections"
+    end
+  end
+
+  [
+    ['user_with_no_objs', 0, 0, 0, true],
+    ['user_with_5_finished_pipelines', 5, 0, 0, true],
+    ['user_with_1_running_25_finished_pipelines', 25, 1, 0, true],
+    ['active', 0, 1, 6, false],
+    ['admin', 35, 2, 8, true],
+  ].each do |user, num_finished, num_running, num_collections, exact_counts|
+    test "dashboard recently finished pipelines panel for #{user} with #{num_finished} finished,
+          #{num_running} running, #{num_collections} collections, #{exact_counts}" do
+      visit page_with_token(user)
+      wait_for_ajax
+      verify_dashboard user, num_finished, num_running, num_collections, exact_counts
+    end
+  end
+end
diff --git a/services/api/test/fixtures/api_client_authorizations.yml b/services/api/test/fixtures/api_client_authorizations.yml
index 3b5df37..068cc99 100644
--- a/services/api/test/fixtures/api_client_authorizations.yml
+++ b/services/api/test/fixtures/api_client_authorizations.yml
@@ -192,3 +192,21 @@ user1_with_load:
   user: user1_with_load
   api_token: 1234k6lzmp9kj5cpkcoxie963cmvjahbt2fod9zru30k1jqdmi
   expires_at: 2038-01-01 00:00:00
+
+user_with_no_objs:
+  api_client: untrusted
+  user: user_with_no_objs
+  api_token: 1234k6lzmp9kj5cpkcoxie963cmvjahbt0123456u30k1jqdmi
+  expires_at: 2038-01-01 00:00:00
+
+user_with_5_finished_pipelines:
+  api_client: untrusted
+  user: user_with_5_finished_pipelines
+  api_token: 1234k6lzmp9kj5abcdefgh963cmvjahbt0123456u30k1jqdmi
+  expires_at: 2038-01-01 00:00:00
+
+user_with_1_running_25_finished_pipelines:
+  api_client: untrusted
+  user: user_with_1_running_25_finished_pipelines
+  api_token: 1234k6lzmp9kj5abcdefgh12345678hbt0123456u30k1jqdmi
+  expires_at: 2038-01-01 00:00:00
diff --git a/services/api/test/fixtures/pipeline_instances.yml b/services/api/test/fixtures/pipeline_instances.yml
index 3444264..fc761c7 100644
--- a/services/api/test/fixtures/pipeline_instances.yml
+++ b/services/api/test/fixtures/pipeline_instances.yml
@@ -215,4 +215,63 @@ pipeline_<%=i%>_of_25:
           title: foo instance input
 <% end %>
 
+# pipelines for user_with_0_collections_0_running_5_finished_pipelines
+<% for i in 0..4 do %>
+pipeline_<%=i%>_of_5:
+  name: pipeline_<%=i%>
+  state: Failed
+  uuid: zzzzz-d1hrv-05finishedpi<%= i.to_s.rjust(3, '0') %>
+  owner_uuid: zzzzz-tpzed-user005finished
+  created_at: <%= i.hour.ago.to_s(:db) %>
+  started_at: <%= i.hour.ago.to_s(:db) %>
+  finished_at: <%= i.minute.ago.to_s(:db) %>
+  components:
+    foo:
+      script: foo
+      script_version: master
+      script_parameters:
+        input:
+          required: true
+          dataclass: Collection
+          title: foo instance input
+<% end %>
+
+# Finished pipelines for user_with_1_running_25_finished_pipelines
+<% for i in 0..24 do %>
+pipeline_<%=i%>_of_25:
+  name: pipeline_<%=i%>
+  state: Failed
+  uuid: zzzzz-d1hrv-25finishedpi<%= i.to_s.rjust(3, '0') %>
+  owner_uuid: zzzzz-tpzed-user025finished
+  created_at: <%= i.hour.ago.to_s(:db) %>
+  started_at: <%= i.hour.ago.to_s(:db) %>
+  finished_at: <%= i.minute.ago.to_s(:db) %>
+  components:
+    foo:
+      script: foo
+      script_version: master
+      script_parameters:
+        input:
+          required: true
+          dataclass: Collection
+          title: foo instance input
+<% end %>
+# Running pipeline for user_with_1_running_25_finished_pipelines
+running_pipeline_for_user_with_1_running_25_finished_pipelines:
+  name: pipeline_running
+  state: RunningOnServer
+  uuid: zzzzz-d1hrv-kjrnrunningpinh
+  owner_uuid: zzzzz-tpzed-user025finished
+  created_at: <%= i.hour.ago.to_s(:db) %>
+  started_at: <%= i.hour.ago.to_s(:db) %>
+  components:
+    foo:
+      script: foo
+      script_version: master
+      script_parameters:
+        input:
+          required: true
+          dataclass: Collection
+          title: foo instance input
+
 # Do not add your fixtures below this line as the rest of this file will be trimmed by test_helper
diff --git a/services/api/test/fixtures/users.yml b/services/api/test/fixtures/users.yml
index 17ae82e..b0b4b95 100644
--- a/services/api/test/fixtures/users.yml
+++ b/services/api/test/fixtures/users.yml
@@ -228,3 +228,45 @@ user1_with_load:
     profile:
       organization: example.com
       role: IT
+
+user_with_no_objs:
+  owner_uuid: zzzzz-tpzed-000000000000000
+  uuid: zzzzz-tpzed-usernoneobjects
+  email: user_with_no_objs at arvados.local
+  first_name: user_with_no_objs
+  last_name: User
+  identity_url: https://user_with_no_objs.openid.local
+  is_active: true
+  is_admin: false
+  prefs:
+    profile:
+      organization: example.com
+      role: IT
+
+user_with_5_finished_pipelines:
+  owner_uuid: zzzzz-tpzed-000000000000000
+  uuid: zzzzz-tpzed-user005finished
+  email: user_with_5_finished at arvados.local
+  first_name: user_with_5_finished
+  last_name: User
+  identity_url: https://user_with_5_finished.openid.local
+  is_active: true
+  is_admin: false
+  prefs:
+    profile:
+      organization: example.com
+      role: IT
+
+user_with_1_running_25_finished_pipelines:
+  owner_uuid: zzzzz-tpzed-000000000000000
+  uuid: zzzzz-tpzed-user025finished
+  email: user_with_25_finished at arvados.local
+  first_name: user_with_1_finished
+  last_name: User
+  identity_url: https://user_with_25_finished.openid.local
+  is_active: true
+  is_admin: false
+  prefs:
+    profile:
+      organization: example.com
+      role: IT

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list