@@ -84,6 +84,105 @@ <h1 class="page-title text-balance">{{ title }}</h1>
8484 </ div >
8585{% endmacro %}
8686
87+ {% macro org_tab_nav(organization, active='') %}
88+ {% set org_slug = organization.slug %}
89+ < div class ="app-content-padded !py-0 ">
90+ < div class ="tab-bar " data-tabs >
91+ < a href ="{{ url_for('user.organization', org_slug=org_slug) }} "
92+ title ="Projects "
93+ class ="tab-item {% if active == 'projects' %}tab-active{% endif %} "> {{ icon('folder', 'w-4 h-4') }} < span class ="tab-label "> Projects</ span > </ a >
94+ < a href ="{{ url_for('user.organization_members', org_slug=org_slug) }} "
95+ title ="Members "
96+ class ="tab-item {% if active == 'members' %}tab-active{% endif %} "> {{ icon('users', 'w-4 h-4') }} < span class ="tab-label "> Members</ span > </ a >
97+ < div class ="dropdown dropdown-hover ">
98+ < div tabindex ="0 " role ="button "
99+ class ="tab-item {% if active in ('observe', 'audit') %}tab-active{% endif %} ">
100+ {{ icon('search', 'w-4 h-4') }}
101+ < span class ="tab-label "> Observe {{ icon('chevron-down', 'w-3 h-3 opacity-40') }}</ span >
102+ </ div >
103+ < ul tabindex ="0 " class ="menu menu-md dropdown-content bg-base-100 rounded-box z-50 mt-1 w-48 p-2 shadow-lg border border-base-300 ">
104+ {% if config.MIMIR_URL %}
105+ < li > < a href ="{{ url_for('user.organization_observe', org_slug=org_slug) }} "
106+ class ="{% if active == 'observe' %}active{% endif %} "> {{ icon('bar-chart', 'w-3.5 h-3.5') }} Metrics</ a > </ li >
107+ {% else %}
108+ < li class ="disabled opacity-30 "> < span > {{ icon('bar-chart', 'w-3.5 h-3.5') }} Metrics</ span > </ li >
109+ {% endif %}
110+ < li > < a href ="{{ url_for('user.organization_audit_log', org_slug=org_slug) }} "
111+ class ="{% if active == 'audit' %}active{% endif %} "> {{ icon('clock', 'w-3.5 h-3.5') }} Audit Log</ a > </ li >
112+ </ ul >
113+ </ div >
114+ < a href ="{{ url_for('user.organization_settings', org_slug=org_slug) }} "
115+ title ="Settings "
116+ class ="tab-item {% if active == 'settings' %}tab-active{% endif %} "> {{ icon('settings', 'w-4 h-4') }} < span class ="tab-label "> Settings</ span > </ a >
117+ </ div >
118+ </ div >
119+ {% endmacro %}
120+
121+ {% macro env_tab_nav(project, environment, active='') %}
122+ {% set org_slug = project.organization.slug %}
123+ {% set project_slug = project.slug %}
124+ {% set env_slug = environment.slug %}
125+ < div class ="app-content-padded !py-0 ">
126+ < div class ="tab-bar " data-tabs >
127+ < a href ="{{ url_for('user.project_environment', org_slug=org_slug, project_slug=project_slug, env_slug=env_slug) }} "
128+ title ="Overview "
129+ class ="tab-item {% if active == 'overview' %}tab-active{% endif %} "> {{ icon('activity', 'w-4 h-4') }} < span class ="tab-label "> Overview</ span > </ a >
130+ < div class ="dropdown dropdown-hover ">
131+ < div tabindex ="0 " role ="button "
132+ class ="tab-item {% if active in ('observe', 'audit') %}tab-active{% endif %} ">
133+ {{ icon('search', 'w-4 h-4') }}
134+ < span class ="tab-label "> Observe {{ icon('chevron-down', 'w-3 h-3 opacity-40') }}</ span >
135+ </ div >
136+ < ul tabindex ="0 " class ="menu menu-md dropdown-content bg-base-100 rounded-box z-50 mt-1 w-48 p-2 shadow-lg border border-base-300 ">
137+ {% if config.MIMIR_URL %}
138+ < li > < a href ="{{ url_for('user.environment_observe', org_slug=org_slug, project_slug=project_slug, env_slug=env_slug) }} "
139+ class ="{% if active == 'observe' %}active{% endif %} "> {{ icon('bar-chart', 'w-3.5 h-3.5') }} Metrics</ a > </ li >
140+ {% else %}
141+ < li class ="disabled opacity-30 "> < span > {{ icon('bar-chart', 'w-3.5 h-3.5') }} Metrics</ span > </ li >
142+ {% endif %}
143+ < li > < a href ="{{ url_for('user.environment_audit_log', org_slug=org_slug, project_slug=project_slug, env_slug=env_slug) }} "
144+ class ="{% if active == 'audit' %}active{% endif %} "> {{ icon('clock', 'w-3.5 h-3.5') }} Audit Log</ a > </ li >
145+ </ ul >
146+ </ div >
147+ < a href ="{{ url_for('user.project_environment_settings', org_slug=org_slug, project_slug=project_slug, env_slug=env_slug) }} "
148+ title ="Settings "
149+ class ="tab-item {% if active == 'settings' %}tab-active{% endif %} "> {{ icon('settings', 'w-4 h-4') }} < span class ="tab-label "> Settings</ span > </ a >
150+ </ div >
151+ </ div >
152+ {% endmacro %}
153+
154+ {% macro project_tab_nav(project, active='') %}
155+ {% set org_slug = project.organization.slug %}
156+ {% set project_slug = project.slug %}
157+ < div class ="app-content-padded !py-0 ">
158+ < div class ="tab-bar " data-tabs >
159+ < a href ="{{ url_for('user.project', org_slug=org_slug, project_slug=project_slug) }} "
160+ title ="Overview "
161+ class ="tab-item {% if active == 'overview' %}tab-active{% endif %} "> {{ icon('activity', 'w-4 h-4') }} < span class ="tab-label "> Overview</ span > </ a >
162+ < div class ="dropdown dropdown-hover ">
163+ < div tabindex ="0 " role ="button "
164+ class ="tab-item {% if active in ('observe', 'audit') %}tab-active{% endif %} ">
165+ {{ icon('search', 'w-4 h-4') }}
166+ < span class ="tab-label "> Observe {{ icon('chevron-down', 'w-3 h-3 opacity-40') }}</ span >
167+ </ div >
168+ < ul tabindex ="0 " class ="menu menu-md dropdown-content bg-base-100 rounded-box z-50 mt-1 w-48 p-2 shadow-lg border border-base-300 ">
169+ {% if config.MIMIR_URL %}
170+ < li > < a href ="{{ url_for('user.project_observe', org_slug=org_slug, project_slug=project_slug) }} "
171+ class ="{% if active == 'observe' %}active{% endif %} "> {{ icon('bar-chart', 'w-3.5 h-3.5') }} Metrics</ a > </ li >
172+ {% else %}
173+ < li class ="disabled opacity-30 "> < span > {{ icon('bar-chart', 'w-3.5 h-3.5') }} Metrics</ span > </ li >
174+ {% endif %}
175+ < li > < a href ="{{ url_for('user.project_audit_log', org_slug=org_slug, project_slug=project_slug) }} "
176+ class ="{% if active == 'audit' %}active{% endif %} "> {{ icon('clock', 'w-3.5 h-3.5') }} Audit Log</ a > </ li >
177+ </ ul >
178+ </ div >
179+ < a href ="{{ url_for('user.project_settings', org_slug=org_slug, project_slug=project_slug) }} "
180+ title ="Settings "
181+ class ="tab-item {% if active == 'settings' %}tab-active{% endif %} "> {{ icon('settings', 'w-4 h-4') }} < span class ="tab-label "> Settings</ span > </ a >
182+ </ div >
183+ </ div >
184+ {% endmacro %}
185+
87186{% macro app_tab_nav(application, active='', env=none) %}
88187 {% set org_slug = application.project.organization.slug %}
89188 {% set project_slug = application.project.slug %}
@@ -116,6 +215,8 @@ <h1 class="page-title text-balance">{{ title }}</h1>
116215 < li class ="disabled opacity-30 "> < span > {{ icon('file-text', 'w-3.5 h-3.5') }} Logs</ span > </ li >
117216 {% endif %}
118217 < li class ="disabled opacity-30 "> < span > {{ icon('bar-chart-2', 'w-3.5 h-3.5') }} Pipeline < span class ="text-[0.6rem] opacity-40 "> (Soon)</ span > </ span > </ li >
218+ < li > < a href ="{{ url_for('user.application_audit_log', org_slug=org_slug, project_slug=project_slug, app_slug=app_slug, env_slug=env_slug) }} "
219+ class ="{% if active == 'audit' %}active{% endif %} "> {{ icon('clock', 'w-3.5 h-3.5') }} Audit Log</ a > </ li >
119220 </ ul >
120221 </ div >
121222 < a href ="{{ url_for('user.application_images', org_slug=org_slug, project_slug=project_slug, app_slug=app_slug, env_slug=env_slug) }} "
0 commit comments