Skip to content

Commit

Permalink
add support link on the navbar (#282)
Browse files Browse the repository at this point in the history
Add Support link to navbar
  • Loading branch information
thinkC authored Nov 12, 2024
1 parent d9a6cf2 commit 702579d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/azimuth/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,5 +266,7 @@ class AzimuthSettings(SettingsObject):
#: URL for documentation
DOCUMENTATION_URL = Setting(default = "https://azimuth-cloud.github.io/azimuth-user-docs/")


#: URL for Support
SUPPORT_URL = Setting(default = None)

cloud_settings = AzimuthSettings("AZIMUTH")
1 change: 1 addition & 0 deletions api/azimuth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ def cloud_info(request):
"links": {
"session": request.build_absolute_uri(reverse("azimuth:session")),
"documentation": cloud_settings.DOCUMENTATION_URL,
"support": cloud_settings.SUPPORT_URL,
}
}
if cloud_settings.METRICS.CLOUD_METRICS_URL:
Expand Down
3 changes: 3 additions & 0 deletions chart/files/api/settings/02-cloud-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ AZIMUTH:
{{- with .Values.settings.documentationUrl }}
DOCUMENTATION_URL: {{ quote . }}
{{- end }}
{{- with .Values.settings.supportUrl }}
SUPPORT_URL: {{ quote . }}
{{- end }}
{{- with .Values.settings.curatedSizes }}
CURATED_SIZES: {{ toYaml . | nindent 8 }}
{{- end }}
1 change: 1 addition & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ settings:
# The URL for documentation
# By default, the standard Azimuth user documentation will be used
documentationUrl:
supportUrl:
# The name of the CSRF cookie
csrfCookieName:
# The name of the session cookie
Expand Down
7 changes: 7 additions & 0 deletions ui/src/components/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
faCloud,
faSignOutAlt,
faTachometerAlt,
faLifeRing,
} from '@fortawesome/free-solid-svg-icons';

import { sortBy, Loading } from './utils';
Expand Down Expand Up @@ -89,6 +90,12 @@ export const Navigation = ({
Documentation
</Nav.Link>
)}
{links && links.support && (
<Nav.Link href={links.support} target="_blank" active={false}>
<FontAwesomeIcon icon={faLifeRing} className="me-2" />
Support
</Nav.Link>
)}
{username ? (
<Nav.Link href={`/auth/logout/?next=/`} active={false}>
<FontAwesomeIcon icon={faSignOutAlt} className="me-2" />
Expand Down

0 comments on commit 702579d

Please sign in to comment.