diff --git a/physionet-django/console/navbar.py b/physionet-django/console/navbar.py index 25c7968423..00ab1a0843 100644 --- a/physionet-django/console/navbar.py +++ b/physionet-django/console/navbar.py @@ -154,6 +154,10 @@ def get_menu_items(self, request): NavLink(_('Storage'), 'storage_requests', 'cube'), + NavSubmenu(_('Cloud'), 'cloud', 'cloud', [ + NavLink(_('Mirrors'), 'cloud_mirrors'), + ]), + NavSubmenu(_('Identity check'), 'identity', 'hand-paper', [ NavLink(_('Processing'), 'credential_processing'), NavLink(_('All Applications'), 'credential_applications', diff --git a/physionet-django/console/static/console/css/cloud-mirrors.css b/physionet-django/console/static/console/css/cloud-mirrors.css new file mode 100644 index 0000000000..d01bc8fc12 --- /dev/null +++ b/physionet-django/console/static/console/css/cloud-mirrors.css @@ -0,0 +1,91 @@ +.table-cloud-status { + table-layout: fixed; + width: 100%; +} + +.table-cloud-status .col-project-version { + width: 7rem; +} +.table-cloud-status .col-project-site-status, +.table-cloud-status .col-project-cloud-status { + width: 3rem; + text-align: center; + overflow-x: hidden; +} + +.project-site-status-title, +.project-cloud-status-title { + font-size: 0; +} +.project-site-status-title::before, +.project-cloud-status-title::before { + font-size: 1rem; + display: inline-block; + width: 1.25em; + font-family: "Font Awesome 5 Free"; + font-weight: 900; +} +.project-site-status-title::before { + content: "\f019"; /* download */ +} +.project-cloud-status-title::before { + content: "\f381"; /* cloud-download-alt */ +} +.col-gcp .project-cloud-status-title::before { + font-family: "Font Awesome 5 Brands"; + font-weight: 400; + content: "\f1a0"; /* google */ +} +.col-aws .project-cloud-status-title::before { + font-family: "Font Awesome 5 Brands"; + font-weight: 400; + content: "\f375"; /* aws */ +} + +.project-site-status-open, +.project-site-status-restricted, +.project-site-status-embargo, +.project-site-status-forbidden, +.project-cloud-status-public, +.project-cloud-status-private, +.project-cloud-status-pending, +.project-cloud-status-none { + font-size: 0; +} +.project-site-status-open::before, +.project-site-status-restricted::before, +.project-site-status-embargo::before, +.project-site-status-forbidden::before, +.project-cloud-status-public::before, +.project-cloud-status-private::before, +.project-cloud-status-pending::before, +.project-cloud-status-none::before { + font-size: 1rem; + display: inline-block; + width: 1.25em; + font-family: "Font Awesome 5 Free"; + font-weight: 900; +} +.project-site-status-open::before, +.project-cloud-status-public::before { + content: "\f058"; /* check-circle */ + color: #0a0; +} +.project-site-status-restricted::before, +.project-cloud-status-private::before { + content: "\f2bd"; /* user-circle */ + color: #50f; +} +.project-site-status-embargo::before { + content: "\f28b"; /* pause-circle */ + color: #fa0; +} +.project-site-status-forbidden::before { + content: "\f057"; /* times-circle */ + color: #c00; +} +.project-cloud-status-pending::before { + content: "\f017"; /* clock */ + font-weight: 400; + color: #888; +} diff --git a/physionet-django/console/templates/console/cloud_mirrors.html b/physionet-django/console/templates/console/cloud_mirrors.html new file mode 100644 index 0000000000..eafa471146 --- /dev/null +++ b/physionet-django/console/templates/console/cloud_mirrors.html @@ -0,0 +1,96 @@ +{% extends "console/base_console.html" %} + +{% load static %} + +{% block title %}Cloud Mirrors{% endblock %} + +{% block local_css %} + +{% endblock %} + +{% block content %} +
Project | +Version | ++ + {{ SITE_NAME }} + + | + {% for platform in cloud_platforms %} ++ + {{ platform.name }} + + | + {% endfor %} +
---|---|---|---|
+ + {{ project.title }} + + | +{{ project.version }} | ++ {% if project.deprecated_files %} + Deprecated + {% elif not project.allow_file_downloads %} + Forbidden + {% elif project.embargo_active %} + + {% elif project.access_policy != AccessPolicy.OPEN %} + Restricted + {% else %} + Open + {% endif %} + | + {% for platform_mirror in mirrors %} ++ {% if not platform_mirror %} + + {% elif not platform_mirror.sent_files %} + Pending + {% elif platform_mirror.is_private %} + Private + {% else %} + Public + {% endif %} + | + {% endfor %} +