diff --git a/Makefile b/Makefile index 013929513..4e7ccca98 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ DEVELOPMENT_MODE ?= 0 TIMEOUT ?= 10m -CAPELLA_DOCKERIMAGES = $(MAKE) -C capella-dockerimages PUSH_IMAGES=1 DOCKER_REGISTRY=$(DOCKER_REGISTRY) +CAPELLA_DOCKERIMAGES = $(MAKE) -C capella-dockerimages PUSH_IMAGES=1 DOCKER_REGISTRY=$(CAPELLACOLLAB_SESSIONS_REGISTRY) # Adds support for msys export MSYS_NO_PATHCONV := 1 diff --git a/backend/capellacollab/__main__.py b/backend/capellacollab/__main__.py index f26c124ee..a96820ea4 100644 --- a/backend/capellacollab/__main__.py +++ b/backend/capellacollab/__main__.py @@ -15,7 +15,6 @@ import capellacollab.projects.toolmodels.backups.runs.interface as pipeline_runs_interface import capellacollab.sessions.metrics as sessions_metrics import capellacollab.settings.modelsources.t4c.license_server.metrics as t4c_metrics -from capellacollab import core # This import statement is required and should not be removed! (Alembic will not work otherwise) from capellacollab.config import config @@ -42,12 +41,9 @@ handlers=[stream_handler, timed_rotating_file_handler], ) -ALLOW_ORIGINS = ( - [f"{config.general.scheme}//{config.general.host}:{config.general.port}"] - + ["http://localhost:4200", "http://127.0.0.1:4200"] - if core.DEVELOPMENT_MODE - else [] -) +ALLOW_ORIGINS = [ + f"{config.general.scheme}://{config.general.host}:{config.general.port}" +] async def startup(): diff --git a/backend/capellacollab/alembic/versions/7683b08b00ba_add_environment_and_connection_info_to_.py b/backend/capellacollab/alembic/versions/7683b08b00ba_add_environment_and_connection_info_to_.py index 7399452ad..e83bf3b33 100644 --- a/backend/capellacollab/alembic/versions/7683b08b00ba_add_environment_and_connection_info_to_.py +++ b/backend/capellacollab/alembic/versions/7683b08b00ba_add_environment_and_connection_info_to_.py @@ -112,11 +112,9 @@ def get_eclipse_configuration(): { "type": "guacamole", "id": "guacamole", - "name": "Classic (Guacamole)", + "name": "Guacamole", "description": ( - "Old connection method using Guacamole. " - "If it has worked fine previously, keep using it. " - "In case of issues, try the Xpra connection method." + "Guacamole doesn't support session sharing." ), "ports": {"metrics": 9118, "rdp": 3389}, "environment": {"CONNECTION_METHOD": "xrdp"}, @@ -124,11 +122,8 @@ def get_eclipse_configuration(): { "type": "http", "id": "xpra", - "name": "Experimental (Xpra)", - "description": ( - "Experimental connection method using Xpra. " - "It's intended for those users who have issues with the Guacamole connection method." - ), + "name": "Xpra", + "description": "Xpra supports session sharing.", "ports": {"http": 10000, "metrics": 9118}, "environment": { "CONNECTION_METHOD": "xpra", diff --git a/backend/capellacollab/config/models.py b/backend/capellacollab/config/models.py index fdb199bd7..95424f8ea 100644 --- a/backend/capellacollab/config/models.py +++ b/backend/capellacollab/config/models.py @@ -192,7 +192,7 @@ class GeneralConfig(BaseConfig): examples=["localhost", "capella.example.com"], ) port: int | str = pydantic.Field( - default=8000, + default=4200, description="The port the application should run on.", examples=[8000, 443, 8080], ) diff --git a/backend/capellacollab/core/database/migration.py b/backend/capellacollab/core/database/migration.py index 050d7563b..c781289f3 100644 --- a/backend/capellacollab/core/database/migration.py +++ b/backend/capellacollab/core/database/migration.py @@ -11,7 +11,6 @@ from alembic import migration from sqlalchemy import orm -from capellacollab import core from capellacollab.config import config from capellacollab.core import database from capellacollab.events import crud as events_crud @@ -143,31 +142,20 @@ def get_eclipse_session_configuration() -> ( methods=[ tools_models.GuacamoleConnectionMethod( id="guacamole", - name="Classic (Guacamole)", - description=( - "Old connection method using Guacamole. " - "If it has worked fine previously, keep using it. " - "In case of issues, try the Xpra connection method." - ), + name="Guacamole", + description="Guacamole doesn't support session sharing.", ports=tools_models.RDPPorts(metrics=9118, rdp=3389), environment={"CONNECTION_METHOD": "xrdp"}, ), tools_models.HTTPConnectionMethod( id="xpra", - name="Experimental (Xpra)", - description=( - "Experimental connection method using Xpra. " - "It's intended for those users who have issues with the Guacamole connection method." - ), + name="Xpra", + description="Xpra supports session sharing.", ports=tools_models.HTTPPorts(http=10000, metrics=9118), environment={ "CONNECTION_METHOD": "xpra", "XPRA_SUBPATH": "{CAPELLACOLLAB_SESSIONS_BASE_PATH}", - "XPRA_CSP_ORIGIN_HOST": ( - "http://localhost:4200" - if core.DEVELOPMENT_MODE - else "{CAPELLACOLLAB_ORIGIN_BASE_URL}" - ), + "XPRA_CSP_ORIGIN_HOST": "{CAPELLACOLLAB_ORIGIN_BASE_URL}", }, redirect_url="{CAPELLACOLLAB_SESSIONS_SCHEME}://{CAPELLACOLLAB_SESSIONS_HOST}:{CAPELLACOLLAB_SESSIONS_PORT}{CAPELLACOLLAB_SESSIONS_BASE_PATH}/?floating_menu=0&sharing=1&path={CAPELLACOLLAB_SESSIONS_BASE_PATH}/", cookies={ @@ -197,7 +185,7 @@ def create_capella_tool(db: orm.Session) -> tools_models.DatabaseTool: ) capella_database = tools_crud.create_tool(db, capella) - for capella_version_name in ("5.0.0", "5.2.0", "6.0.0", "6.1.0"): + for capella_version_name in ("5.0.0", "5.2.0", "6.0.0", "6.1.0", "7.0.0"): if "localhost" in registry: docker_tag = f"{capella_version_name}-latest" else: @@ -206,8 +194,8 @@ def create_capella_tool(db: orm.Session) -> tools_models.DatabaseTool: capella_version = tools_models.CreateToolVersion( name=capella_version_name, config=tools_models.ToolVersionConfiguration( - is_recommended=capella_version_name == "6.1.0", - is_deprecated=capella_version_name == "5.0.0", + is_recommended=capella_version_name == "7.0.0", + is_deprecated=capella_version_name in ("5.0.0", "5.2.0"), sessions=tools_models.SessionToolConfiguration( persistent=tools_models.PersistentSessionToolConfiguration( image=(f"{registry}/capella/remote:{docker_tag}"), @@ -284,11 +272,7 @@ def create_jupyter_tool(db: orm.Session) -> tools_models.DatabaseTool: environment={ "JUPYTER_PORT": "8888", "JUPYTER_TOKEN": "{CAPELLACOLLAB_SESSION_TOKEN}", - "CSP_ORIGIN_HOST": ( - "http://localhost:4200" - if core.DEVELOPMENT_MODE - else "{CAPELLACOLLAB_ORIGIN_BASE_URL}" - ), + "CSP_ORIGIN_HOST": "{CAPELLACOLLAB_ORIGIN_BASE_URL}", "JUPYTER_BASE_URL": "{CAPELLACOLLAB_SESSIONS_BASE_PATH}", }, connection=tools_models.ToolSessionConnection( diff --git a/backend/tests/test_feedback.py b/backend/tests/test_feedback.py index 62c254f03..b8fac1bc5 100644 --- a/backend/tests/test_feedback.py +++ b/backend/tests/test_feedback.py @@ -100,7 +100,7 @@ def test_send_feedback_with_session( "warnings": [], "connection_method": { "id": "xpra", - "name": "Experimental (Xpra)", + "name": "Xpra", }, } ], diff --git a/docs/docs/admin/tools/configuration.md b/docs/docs/admin/tools/configuration.md index 919489889..e60f844c3 100644 --- a/docs/docs/admin/tools/configuration.md +++ b/docs/docs/admin/tools/configuration.md @@ -341,11 +341,8 @@ To help you configure your tools, we provide some examples as part of our methods: - id: guacamole type: guacamole - name: Classic (Guacamole) - description: Old connection method using Guacamole. If - it has worked fine previously, keep using it. - In case of issues, try the Xpra connection - method. + name: Guacamole + description: Guacamole doesn't support session sharing. ports: metrics: 9118 rdp: 3389 @@ -353,10 +350,8 @@ To help you configure your tools, we provide some examples as part of our CONNECTION_METHOD: xrdp - id: xpra type: http - name: Experimental (Xpra) - description: Experimental connection method using Xpra. - It's intended for those users who have issues - with the Guacamole connection method. + name: Xpra + description: Xpra supports session sharing. ports: metrics: 9118 http: 10000