diff --git a/backend/capellacollab/settings/configuration/models.py b/backend/capellacollab/settings/configuration/models.py index 5dbb91d2c9..f07eafc62b 100644 --- a/backend/capellacollab/settings/configuration/models.py +++ b/backend/capellacollab/settings/configuration/models.py @@ -69,40 +69,40 @@ class CustomNavbarLink(NavbarLink): class NavbarConfiguration(core_pydantic.BaseModelStrict): - external_links: list[BuiltInNavbarLink | CustomNavbarLink] = ( - pydantic.Field( - default=( + external_links: ( + list[BuiltInNavbarLink] | list[BuiltInNavbarLink | CustomNavbarLink] + ) = pydantic.Field( + default=( + [ + BuiltInNavbarLink( + name="Grafana", + service=BuiltInLinkItem.GRAFANA, + role=users_models.Role.ADMIN, + ), + BuiltInNavbarLink( + name="Prometheus", + service=BuiltInLinkItem.PROMETHEUS, + role=users_models.Role.ADMIN, + ), + BuiltInNavbarLink( + name="Documentation", + service=BuiltInLinkItem.DOCUMENTATION, + role=users_models.Role.USER, + ), + ] + + ( [ BuiltInNavbarLink( - name="Grafana", - service=BuiltInLinkItem.GRAFANA, - role=users_models.Role.ADMIN, - ), - BuiltInNavbarLink( - name="Prometheus", - service=BuiltInLinkItem.PROMETHEUS, - role=users_models.Role.ADMIN, - ), - BuiltInNavbarLink( - name="Documentation", - service=BuiltInLinkItem.DOCUMENTATION, + name="SMTP Mock", + service=BuiltInLinkItem.SMTP_MOCK, role=users_models.Role.USER, - ), + ) ] - + ( - [ - BuiltInNavbarLink( - name="SMTP Mock", - service=BuiltInLinkItem.SMTP_MOCK, - role=users_models.Role.USER, - ) - ] - if core.DEVELOPMENT_MODE - else [] - ) - ), - description="Links to display in the navigation bar.", - ) + if core.DEVELOPMENT_MODE + else [] + ) + ), + description="Links to display in the navigation bar.", ) diff --git a/backend/capellacollab/tools/models.py b/backend/capellacollab/tools/models.py index b45a12a579..1d3b889bb3 100644 --- a/backend/capellacollab/tools/models.py +++ b/backend/capellacollab/tools/models.py @@ -64,7 +64,7 @@ class ToolSessionEnvironment(core_pydantic.BaseModel): ), ) value: str = pydantic.Field( - default={"RMT_PASSWORD": "{CAPELLACOLLAB_SESSION_TOKEN}"}, + default='"RMT_PASSWORD": "{CAPELLACOLLAB_SESSION_TOKEN}"', description=( "Environment variables, which are mounted into session containers. " "You can use f-strings to reference other environment variables in the value. " diff --git a/frontend/src/app/openapi/.openapi-generator/FILES b/frontend/src/app/openapi/.openapi-generator/FILES index 048a44bf5c..8cde92038a 100644 --- a/frontend/src/app/openapi/.openapi-generator/FILES +++ b/frontend/src/app/openapi/.openapi-generator/FILES @@ -60,6 +60,8 @@ model/diagram-metadata.ts model/environment-value.ts model/environment-value1.ts model/event-type.ts +model/external-links-any-of-inner.ts +model/external-links.ts model/feedback-configuration-input.ts model/feedback-configuration-output.ts model/feedback-interval-configuration-input.ts @@ -100,7 +102,6 @@ model/minimal-tool.ts model/model-artifact-status.ts model/model-provisioning.ts model/models.ts -model/navbar-configuration-input-external-links-inner.ts model/navbar-configuration-input.ts model/navbar-configuration-output.ts model/notice-level.ts diff --git a/frontend/src/app/openapi/model/navbar-configuration-input-external-links-inner.ts b/frontend/src/app/openapi/model/external-links-any-of-inner.ts similarity index 86% rename from frontend/src/app/openapi/model/navbar-configuration-input-external-links-inner.ts rename to frontend/src/app/openapi/model/external-links-any-of-inner.ts index a25552cc03..a48965cb5c 100644 --- a/frontend/src/app/openapi/model/navbar-configuration-input-external-links-inner.ts +++ b/frontend/src/app/openapi/model/external-links-any-of-inner.ts @@ -15,7 +15,7 @@ import { CustomNavbarLink } from './custom-navbar-link'; import { BuiltInLinkItem } from './built-in-link-item'; -export interface NavbarConfigurationInputExternalLinksInner { +export interface ExternalLinksAnyOfInner { name: string; /** * Role required to see this link. @@ -30,7 +30,7 @@ export interface NavbarConfigurationInputExternalLinksInner { */ href: string; } -export namespace NavbarConfigurationInputExternalLinksInner { +export namespace ExternalLinksAnyOfInner { } diff --git a/frontend/src/app/openapi/model/external-links.ts b/frontend/src/app/openapi/model/external-links.ts new file mode 100644 index 0000000000..b4290897ff --- /dev/null +++ b/frontend/src/app/openapi/model/external-links.ts @@ -0,0 +1,21 @@ +/* + * SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors + * SPDX-License-Identifier: Apache-2.0 + * + * Capella Collaboration + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit the class manually. + + To generate a new version, run `make openapi` in the root directory of this repository. + */ + +import { BuiltInNavbarLink } from './built-in-navbar-link'; +import { ExternalLinksAnyOfInner } from './external-links-any-of-inner'; + + +/** + * Links to display in the navigation bar. + */ +export interface ExternalLinks { +} + diff --git a/frontend/src/app/openapi/model/models.ts b/frontend/src/app/openapi/model/models.ts index adbdbd36d1..245e13fdd4 100644 --- a/frontend/src/app/openapi/model/models.ts +++ b/frontend/src/app/openapi/model/models.ts @@ -36,6 +36,8 @@ export * from './diagram-metadata'; export * from './environment-value'; export * from './environment-value1'; export * from './event-type'; +export * from './external-links'; +export * from './external-links-any-of-inner'; export * from './feedback'; export * from './feedback-configuration-input'; export * from './feedback-configuration-output'; @@ -76,7 +78,6 @@ export * from './minimal-tool-version-with-tool'; export * from './model-artifact-status'; export * from './model-provisioning'; export * from './navbar-configuration-input'; -export * from './navbar-configuration-input-external-links-inner'; export * from './navbar-configuration-output'; export * from './notice-level'; export * from './notice-response'; diff --git a/frontend/src/app/openapi/model/navbar-configuration-input.ts b/frontend/src/app/openapi/model/navbar-configuration-input.ts index bda864ba26..5d1757c2b2 100644 --- a/frontend/src/app/openapi/model/navbar-configuration-input.ts +++ b/frontend/src/app/openapi/model/navbar-configuration-input.ts @@ -9,13 +9,10 @@ + To generate a new version, run `make openapi` in the root directory of this repository. */ -import { NavbarConfigurationInputExternalLinksInner } from './navbar-configuration-input-external-links-inner'; +import { ExternalLinks } from './external-links'; export interface NavbarConfigurationInput { - /** - * Links to display in the navigation bar. - */ - external_links?: Array; + external_links?: ExternalLinks; } diff --git a/frontend/src/app/openapi/model/navbar-configuration-output.ts b/frontend/src/app/openapi/model/navbar-configuration-output.ts index ac7d084085..1eff2323c5 100644 --- a/frontend/src/app/openapi/model/navbar-configuration-output.ts +++ b/frontend/src/app/openapi/model/navbar-configuration-output.ts @@ -9,13 +9,10 @@ + To generate a new version, run `make openapi` in the root directory of this repository. */ -import { NavbarConfigurationInputExternalLinksInner } from './navbar-configuration-input-external-links-inner'; +import { ExternalLinks } from './external-links'; export interface NavbarConfigurationOutput { - /** - * Links to display in the navigation bar. - */ - external_links: Array; + external_links: ExternalLinks; }