Skip to content

Commit

Permalink
Add system status to navigation bar (#3567)
Browse files Browse the repository at this point in the history
* add systemstatus to navbar

* allow systemstatus route to be disabled
  • Loading branch information
ashton22305 authored May 31, 2024
1 parent 06870bf commit 3939de2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions apps/dashboard/config/configuration_singleton.rb
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,10 @@ def can_access_projects?
can_access_core_app? 'projects'
end

def can_access_systemstatus?
can_access_core_app? 'systemstatus'
end

# Maximum file upload size that nginx will allow from clients in bytes
#
# @example No maximum upload size supplied.
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
delete '/activejobs' => 'active_jobs#delete_job', :as => 'delete_job'
end

get '/systemstatus', to: 'system_status#index', as: 'system_status'
get '/systemstatus', to: 'system_status#index', as: 'system_status' if Configuration.can_access_systemstatus?

get '/jobs/info/:cluster/:id' => 'jobs#info', :defaults => { :format => 'json' }, :as => 'jobs_info'

Expand Down
8 changes: 8 additions & 0 deletions apps/systemstatus/manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: System Status
description: |-
The Open OnDemand System Status App
category: Clusters
icon: fa://tachometer
url: systemstatus
new_window: false
2 changes: 2 additions & 0 deletions packaging/rpm/ondemand.spec
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ echo "%{git_tag}" > %{buildroot}/opt/ood/VERSION
%__mv %{buildroot}/opt/ood/apps/shell %{buildroot}%{_localstatedir}/www/ood/apps/sys/shell
%__mv %{buildroot}/opt/ood/apps/files %{buildroot}%{_localstatedir}/www/ood/apps/sys/files
%__mv %{buildroot}/opt/ood/apps/projects %{buildroot}%{_localstatedir}/www/ood/apps/sys/projects
%__mv %{buildroot}/opt/ood/apps/systemstatus %{buildroot}%{_localstatedir}/www/ood/apps/sys/systemstatus
%__mv %{buildroot}/opt/ood/apps/file-editor %{buildroot}%{_localstatedir}/www/ood/apps/sys/file-editor
%__mv %{buildroot}/opt/ood/apps/activejobs %{buildroot}%{_localstatedir}/www/ood/apps/sys/activejobs
%__mv %{buildroot}/opt/ood/apps/myjobs %{buildroot}%{_localstatedir}/www/ood/apps/sys/myjobs
Expand Down Expand Up @@ -286,6 +287,7 @@ touch %{_localstatedir}/www/ood/apps/sys/myjobs/tmp/restart.txt
%{_localstatedir}/www/ood/apps/sys/projects
%dir %attr(700, root, root) %{_localstatedir}/www/ood/apps/sys/projects
%{_localstatedir}/www/ood/apps/sys/projects/manifest.yml
%{_localstatedir}/www/ood/apps/sys/systemstatus
%{_localstatedir}/www/ood/apps/sys/bc_desktop
%exclude %{_localstatedir}/www/ood/apps/sys/*/tmp/*

Expand Down

0 comments on commit 3939de2

Please sign in to comment.