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 core-registry-ui for the latest version refactor #398

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion cadt-ui/templates/colors.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"leftNavBg": "{{ cadt_ui_leftNavBg }}",
"leftNavText": "{{ cadt_ui_leftNavText }}",
"leftNavItemActive": "{{ cadt_ui_leftNavItemActive }}"
}
}
3 changes: 1 addition & 2 deletions climate-nginx-base/templates/climate-apps.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ map $sent_http_content_type $expires {
~image/ max;
~font/ max;
}

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
Expand Down Expand Up @@ -38,5 +38,4 @@ server {
include /etc/nginx/{{ climate_apps_domains | first }}_ui_includes/*.inc;

try_files $uri $uri/ =404;

}
12 changes: 12 additions & 0 deletions core-registry-ui/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,15 @@ basic_authentication: false

# True or false if Nginx will be proxying the CADT API
core_registry_api_proxy: true

# Default to blank which will set UI to not autopopulate host field.
# Override in playbook with full URL including path and scheme.
core_registry_cadt_api_url: ""
core_registry_tokenization_api_url: ""
core_registry_explorer_api_url: ""

# Set to "true" to use the colors.json custom color configuration
core_registry_custom_colors: false
core_registry_leftNavBg: "rgb(0, 242, 245)"
core_registry_leftNavText: "#ff0005"
core_registry_leftNavItemActive: "blue"
22 changes: 22 additions & 0 deletions core-registry-ui/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,25 @@
when: core_registry_ui_hosting == "local"
tags: core-registry-ui
notify: Reload-nginx

- name: Upload Core Registry UI config for auto connect to API
become: true
ansible.builtin.template:
src: config.json.j2
dest: /var/www/{{ climate_apps_domains | first }}/core-registry-ui/build/config.json
mode: '0644'
owner: "{{ user }}"
group: "{{ group }}"
when: core-registry-ui == "local" and core_registry_cadt_api_url != "" and core_registry_tokenization_api_url != "" and core_registry_explorer_api_url != ""
tags: core-registry-ui

- name: Upload Core Registry UI config for custom colors
become: true
ansible.builtin.template:
src: colors.json.j2
dest: /var/www/{{ climate_apps_domains | first }}/core-registry-ui/build/colors.json
mode: '0644'
owner: "{{ user }}"
group: "{{ group }}"
when: core_registry_ui_hosting == "local" and core_registry_ui_custom_colors == "true"
tags: core-registry-ui
5 changes: 5 additions & 0 deletions core-registry-ui/templates/colors.json.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"leftNavBg": "{{ core_registry_ui_leftNavBg }}",
"leftNavText": "{{ core_registry_ui_leftNavText }}",
"leftNavItemActive": "{{ core_registry_ui_leftNavItemActive }}"
}
5 changes: 5 additions & 0 deletions core-registry-ui/templates/config.json.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cadtApiHost": "{{ core_registry_cadt_api_url }}",
"tokenizationApiHost": "{{ core_registry_tokenization_api_url }}",
"explorerApiHost": "{{ core_registry_explorer_api_url }}"
}
1 change: 1 addition & 0 deletions core-registry-ui/templates/core_registry_ui.inc.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
location / {
alias /var/www/{{ climate_apps_domains | first }}/core-registry-ui/build/;
try_files $uri /index.html;
}
2 changes: 0 additions & 2 deletions sqlite_web/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,3 @@
enabled: true
state: started
tags: sqlite_web


Loading