Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update uab UI #109

Merged
merged 10 commits into from
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,15 @@
s3_shibboleth_object_name: UAB_SHIB_OBJECT

#UAB UI customize
navbar_inverse_bg: "rgb(0,99,65)"
ood_dashboard_title: "UAB Research Computing"
ood_dashboard_logo_filename: "cheaha-logo.svg"
ood_dashboard_logo_height: 157
brand_bg_color: "rgb(0,99,65)"
project_path: "/data/project"
scratch_path: "/data/scratch"
user_data_path: "/data/user"
local_scratch_path: "/scratch"
docs_url: "https://uabrc.github.io"

# User Registration
enable_user_reg: true
Expand Down
5 changes: 2 additions & 3 deletions roles/ood_easter_egg/files/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ en:
dashboard:
welcome_html: |
<div style="position:relative;">
<img alt="logo" height="85" style="margin-bottom: 10px" src="/public/logo.png">
%{logo_img_tag}
<a href="https://tinyurl.com/cheahaAL" target="_blank">
<div style="float:left;position:absolute;display:block;left:310px;top:-6px;padding:10px 20px;"> </div>
<div style="float:left;position:absolute;display:block;left:100px;top:-6px;padding:10px 20px;"> </div>
</a>
</div>
<p class="lead">OnDemand provides an integrated, single access point for all of your HPC resources.</p>
motd_title: "Message of the Day"
2 changes: 1 addition & 1 deletion roles/ood_matlab/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
backup: yes
with_items:
- { regexp: '^.*This app will launch a .*[Owens Cluster].*$', replace: ' This app will launch a [MATLAB] GUI on the [Cheaha cluster]. You will be able' }
- { regexp: '^.*\[Owens cluster\]:.*supercomputers\/owens$', replace: ' [Cheaha cluster]: https://docs.uabgrid.uab.edu/wiki/cheaha' }
- { regexp: '^.*\[Owens cluster\]:.*supercomputers\/owens$', replace: ' [Cheaha cluster]: {{ docs_url }}' }
Binary file removed roles/ood_uab_ui/files/cheaha-logo.png
Binary file not shown.
1 change: 1 addition & 0 deletions roles/ood_uab_ui/files/cheaha-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 12 additions & 28 deletions roles/ood_uab_ui/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,32 @@
app_name: "{{ item }}"
with_items:
- dashboard
- activejobs
- myjobs
- shell

- name: Add initializers folder
file:
path: /etc/ood/config/apps/dashboard/initializers
state: directory

- name: Add shared directories into files menu
template:
src: dashboard/ood_rb.j2
dest: /var/www/ood/apps/sys/dashboard/config/initializers/ood.rb
dest: /etc/ood/config/apps/dashboard/initializers/ood.rb

- name: Add cheaha logo image
copy:
src: cheaha-logo.png
dest: /var/www/ood/apps/sys/dashboard/app/assets/images/cheaha-logo.png

- name: Check if cheaha logo has been set
shell: grep cheaha-logo.png /var/www/ood/apps/sys/dashboard/app/helpers/dashboard_helper.rb
ignore_errors: yes
register: cheaha_logo
src: "{{ ood_dashboard_logo_filename }}"
dest: "/var/www/ood/public"

- name: Add cheaha logo to Dashboard
replace:
path: /var/www/ood/apps/sys/dashboard/app/helpers/dashboard_helper.rb
regexp: '(image_tag\("[^"]*)OpenOnDemand_stack_RGB.svg(.*)$'
replace: '\1cheaha-logo.png\2'
backup: yes
when: cheaha_logo.stdout == ""

- name: Rebuild assets for apps and force apps to restart
- name: Restart apps to pickup new settings
shell: |
scl enable git19 rh-ruby22 nodejs010 -- bin/rake assets:clobber RAILS_ENV=production
scl enable git19 rh-ruby22 nodejs010 -- bin/rake assets:precompile RAILS_ENV=production
touch tmp/restart.txt
args:
chdir: "/var/www/ood/apps/sys/{{ app_name }}"
vars:
app_name: "{{ item }}"
touch /var/www/ood/apps/sys/{{ app_name }}/tmp/restart.txt
with_items:
- dashboard
- activejobs
- myjobs

- name: Put motd in place
copy:
src: motd
template:
src: motd.j2
dest: /etc/ood/motd
4 changes: 0 additions & 4 deletions roles/ood_uab_ui/templates/activejobs/env_local.j2

This file was deleted.

9 changes: 5 additions & 4 deletions roles/ood_uab_ui/templates/dashboard/env_local.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
RAILS_RELATIVE_URL_ROOT="/pun/sys/{{ app_name }}"
OOD_DASHBOARD_TITLE="UAB Research Computing"
OOD_DASHBOARD_DOCS_URL="https://docs.uabgrid.uab.edu/wiki/Cheaha_GettingStarted"
BOOTSTRAP_NAVBAR_INVERSE_BG="{{ navbar_inverse_bg }}"
OOD_DASHBOARD_TITLE="{{ ood_dashboard_title }}"
OOD_DASHBOARD_DOCS_URL="{{ docs_url }}"
OOD_DASHBOARD_LOGO="/public/{{ ood_dashboard_logo_filename }}"
OOD_DASHBOARD_LOGO_HEIGHT="{{ ood_dashboard_logo_height }}"
OOD_BRAND_BG_COLOR="{{ brand_bg_color }}"
OOD_PORTAL="ondemand"
OOD_DATAROOT="{{ user_data_path }}/$USER/$OOD_PORTAL"
DISABLE_SAFARI_BASIC_AUTH_WARNING=1
Expand Down
16 changes: 4 additions & 12 deletions roles/ood_uab_ui/templates/dashboard/ood_rb.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,15 @@
OodFilesApp.candidate_favorite_paths.tap do |paths|
# add project space directories
projects = User.new.groups.map(&:name).grep(/^P./)
paths.concat projects.map { |p| Pathname.new("{{ project_path }}/#{p}") }
paths.concat projects.map { |p| FavoritePath.new("{{ project_path }}/#{p}") }

# add scratch space directories
paths << Pathname.new("{{ scratch_path }}/#{User.new.name}")
paths << FavoritePath.new("{{ scratch_path }}/#{User.new.name}")

# add user data directories
paths << Pathname.new("{{ user_data_path }}/#{User.new.name}")
paths << FavoritePath.new("{{ user_data_path }}/#{User.new.name}", title: "Data")

# add local scratch directory
paths << Pathname.new("{{ local_scratch_path }}/#{User.new.name}")
paths << FavoritePath.new("{{ local_scratch_path }}/#{User.new.name}")

end


# don't show develop dropdown unless you are setup for app sharing
#NavConfig.show_develop_dropdown = ENV['OOD_APP_SHARING'].present? && UsrRouter.base_path.directory?
#NavConfig.show_develop_dropdown = UsrRouter.base_path.directory?

# uncomment if you want to revert to the old menu
# NavConfig.categories = ["Files", "Jobs", "Clusters", "Desktops", "Desktop Apps"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ If you encounter any issues, please contact support@listserv.uab.edu with **OOD*

Use of this resource is governed by the [UAB Acceptable Use Policy for Computer and Network Resources](https://www.uab.edu/policies/content/Pages/UAB-IT-POL-0000004.aspx)

For more information on Cheaha and the tools available to support research please review the documentation: http://docs.uabgrid.uab.edu/wiki/Cheaha
For more information on Cheaha and the tools available to support research please review the documentation: {{ docs_url }}

------------------- Available Slurm Partitions --------------------------

Expand Down
5 changes: 2 additions & 3 deletions roles/ood_uab_ui/templates/myjobs/env_local.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
RAILS_RELATIVE_URL_ROOT="/pun/sys/myjobs"
OOD_DASHBOARD_TITLE="UAB Research Computing"
BOOTSTRAP_NAVBAR_INVERSE_BG="{{ navbar_inverse_bg }}"
OOD_DASHBOARD_TITLE="{{ ood_dashboard_title }}"
OOD_BRAND_BG_COLOR="{{ navbar_inverse_bg }}"
OOD_PORTAL="ondemand"
2 changes: 1 addition & 1 deletion roles/ood_uab_ui/templates/shell/env_local.j2
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DEFAULT_SSHHOST="{{ ood_shell_default_host }}"
OOD_SSHHOST_ALLOWLIST="c0[0-9][0-9][0-9]"