\ No newline at end of file
diff --git a/config/local/app_overrides/views/widgets/metrics/_metric_summary.html.erb b/config/local/app_overrides/views/widgets/metrics/_metric_details.html.erb
similarity index 100%
rename from config/local/app_overrides/views/widgets/metrics/_metric_summary.html.erb
rename to config/local/app_overrides/views/widgets/metrics/_metric_details.html.erb
diff --git a/config/local/app_overrides/views/widgets/metrics/_metrics.html.erb b/config/local/app_overrides/views/widgets/metrics/_metrics.html.erb
index eb6afb82..3b9da8d4 100644
--- a/config/local/app_overrides/views/widgets/metrics/_metrics.html.erb
+++ b/config/local/app_overrides/views/widgets/metrics/_metrics.html.erb
@@ -1,17 +1,9 @@
<%
- cluster = Configuration.job_clusters.select(&:slurm?).first
- metrics_cache = SlurmMetrics::MetricsCache.new
- from_text, to_text, summary = metrics_cache.get_metrics
- if summary.blank?
- from = Time.now - 7.days
- to = Time.now
- last_7_days = cluster.job_adapter.metrics(from: from.strftime('%Y-%m-%dT00:00:00'), to: to.strftime('%Y-%m-%dT23:59:59'))
- processor = SlurmMetrics::MetricsProcessor.new
- summary = processor.calculate_metrics(last_7_days)
- from_text = from.strftime('%Y-%m-%d')
- to_text = to.strftime('%Y-%m-%d')
- metrics_cache.set_metrics(from_text, to_text, summary)
- end
+ metrics_service = SlurmMetrics::MetricsService.new
+ summary = metrics_service.read_metrics
+
+ from_text = summary.from.strftime('%Y-%m-%d')
+ to_text = summary.to.strftime('%Y-%m-%d')
%>
-<% if summary %>
-
<%= cluster.metadata.title %> Metrics
-
- <%= render(partial: '/widgets/metrics/fairshare') %>
- <%= render(partial: '/widgets/metrics/jobs_summary', locals: { title: 'CPU Jobs by State', subtitle: "Period: #{from_text} to #{to_text}", total: summary.ntotal_cpu, completed: summary.ncd_cpu, timeout: summary.nto_cpu, canceled: summary.nca_cpu, memory: summary.noom_cpu, failed: summary.nf_cpu } ) %>
- <%= render(partial: '/widgets/metrics/jobs_summary', locals: { title: 'GPU Jobs by State', subtitle: "Period: #{from_text} to #{to_text}", total: summary.ntotal_gpu, completed: summary.ncd_gpu, timeout: summary.nto_gpu, canceled: summary.nca_gpu, memory: summary.noom_gpu, failed: summary.nf_gpu } ) %>
-
-
-
-
-
- <%= render(partial: '/widgets/metrics/metric_summary',
- locals: { id: 'cpu-metric-summary',
- title: 'CPU Efficiency:',
- efficiency: summary.ave_cpu_eff.round(1),
- items: [['Average Used', "#{summary.ave_cpu_use.ceil(1)} CPU Hrs"],
- ['Average Allocated', "#{summary.ave_cpu_req.ceil(1)} CPU Hrs"],
- ['Total Walltime', "#{summary.tot_cpu_walltime.ceil(1)} CPU Hrs"]] } ) %>
- <%= render(partial: '/widgets/metrics/metric_summary',
- locals: { id: 'gpu-metric-summary',
- title: 'GPU Efficiency:',
- items: [['Average Allocated', "#{summary.ave_gpu_req.ceil(1)} CPU Hrs"],
- ['Total Walltime', "#{summary.tot_gpu_hours.ceil(1)} CPU Hrs"]] } ) %>
- <%= render(partial: '/widgets/metrics/metric_summary',
- locals: { id: 'memory-metric-summary',
- title: 'Memory Efficiency:',
- efficiency: summary.ave_mem_eff.ceil(1),
- items: [['Average Used', "#{summary.ave_mem_use.ceil(1)}G"],
- ['Average Allocated', "#{summary.ave_mem_req.ceil(1)}G"],
- ['Total Used', "#{summary.tot_mem_use.ceil(1)}G"]] } ) %>
- <%= render(partial: '/widgets/metrics/metric_summary',
- locals: { id: 'time-metric-summary',
- title: 'Time Efficiency:',
- efficiency: summary.ave_time_eff.ceil(1),
- items: [['Average Used', "#{summary.ave_mem_use.ceil(1)}H"],
- ['Average Allocated', "#{summary.ave_mem_req.ceil(1)}H"],
- ['Average Waiting Time', "#{summary.ave_wait_time.ceil(1)}H"]] } ) %>
-
-
+
<%= metrics_service.cluster.metadata.title %> Metrics
+
+ <%= render(partial: '/widgets/metrics/fairshare') %>
+
+ <%= render(partial: '/widgets/metrics/jobs_summary', locals: { title: 'CPU Jobs by State', subtitle: "Period: #{from_text} to #{to_text}", total: summary.ntotal_cpu, completed: summary.ncd_cpu, timeout: summary.nto_cpu, canceled: summary.nca_cpu, memory: summary.noom_cpu, failed: summary.nf_cpu } ) %>
+ <%= render(partial: '/widgets/metrics/jobs_summary', locals: { title: 'GPU Jobs by State', subtitle: "Period: #{from_text} to #{to_text}", total: summary.ntotal_gpu, completed: summary.ncd_gpu, timeout: summary.nto_gpu, canceled: summary.nca_gpu, memory: summary.noom_gpu, failed: summary.nf_gpu } ) %>
+
+ <%= render(partial: '/widgets/metrics/metrics_summary', locals: { summary: summary, from_text: from_text, to_text: to_text } ) %>
-<% end %>
diff --git a/config/local/app_overrides/views/widgets/metrics/_metrics_summary.html.erb b/config/local/app_overrides/views/widgets/metrics/_metrics_summary.html.erb
new file mode 100644
index 00000000..caef5d17
--- /dev/null
+++ b/config/local/app_overrides/views/widgets/metrics/_metrics_summary.html.erb
@@ -0,0 +1,45 @@
+<%
+ summary = local_assigns.fetch(:summary, nil)
+ from_text = local_assigns.fetch(:from_text, nil)
+ to_text = local_assigns.fetch(:to_text, nil)
+%>
+
+
\ No newline at end of file
diff --git a/config/local/ondemand.d/fasrc.yml b/config/local/ondemand.d/fasrc.yml
index d650142f..9af6d3d5 100644
--- a/config/local/ondemand.d/fasrc.yml
+++ b/config/local/ondemand.d/fasrc.yml
@@ -17,8 +17,13 @@ profiles:
dashboard_layout:
rows:
- columns:
- - width: 10
+ - width: 8
widgets:
- - "saved_settings"
+ - "metrics/metrics"
- "pinned_apps"
- - "motd"
\ No newline at end of file
+ - "motd"
+ - width: 4
+ widgets:
+ - "metrics/metrics"
+ - "xdmod_widget_job_efficiency"
+ - "xdmod_widget_jobs"
diff --git a/config/local/ondemand.d/root.yml b/config/local/ondemand.d/root.yml
index 175862a1..77e02a2e 100644
--- a/config/local/ondemand.d/root.yml
+++ b/config/local/ondemand.d/root.yml
@@ -8,11 +8,22 @@ jobs_app_alpha: true
bc_dynamic_js: true
bc_saved_settings: true
cancel_session_enabled: true
+sessions_poll_delay: 900000
+status_delay: 900000
navbar_type: dark
default_profile: fasrc
+globus_endpoints:
+ - path: "/home"
+ endpoint: "716de4ac-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+ endpoint_path: "/home"
+
+ - path: "/var/www/ood/apps/sys/dataverse"
+ endpoint: "9f1fe759-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+ endpoint_path: "/demo/dataverse"
+
help_menu:
- group: "Docs"
- title: "Documentation"
diff --git a/config/local/ondemand.d/sid.yml b/config/local/ondemand.d/sid.yml
index b14aa1ab..ed7613bb 100644
--- a/config/local/ondemand.d/sid.yml
+++ b/config/local/ondemand.d/sid.yml
@@ -59,7 +59,6 @@ profiles:
custom_pages:
docs:
- layout:
rows:
- columns:
- width: 12
diff --git a/ondemand b/ondemand
index eb9ce2ec..2485ad0d 160000
--- a/ondemand
+++ b/ondemand
@@ -1 +1 @@
-Subproject commit eb9ce2eca0de45fb7720bb3a839438d4528979cc
+Subproject commit 2485ad0d87bc039fb7a06dc07b34ab6e30d2bf6d