diff --git a/.circleci/config.yml b/.circleci/config.yml index ebcf86415..57fdc36fd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -372,11 +372,6 @@ workflows: - get-version - publish-approval - - update-helm-documentation: - filters: *filters-publish - requires: - - publish-helm-chart - - publish-npm: filters: tags: @@ -1110,21 +1105,6 @@ jobs: name: Publish Helm Chart command: ./.circleci/publish_helm_chart.sh - update-helm-documentation: - <<: *docker-node-image - working_directory: *work-dir - steps: - - checkout - - attach_workspace: - at: /tmp/ci/workspace - - run: cat workspace/env-vars >> $BASH_ENV - - add_ssh_keys: - fingerprints: - - '4d:68:70:66:49:97:ba:8b:8c:55:96:df:3d:be:6e:05' - - run: - name: Update Helm Documentation - command: ./.circleci/update_helm_documentation.sh - publish-viewer-sandbox-cloudflare-pages: <<: *docker-node-image working_directory: *work-dir diff --git a/.circleci/update_helm_documentation.sh b/.circleci/update_helm_documentation.sh deleted file mode 100755 index dcd971ffd..000000000 --- a/.circleci/update_helm_documentation.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -if ! command -v node &> /dev/null -then - echo "๐Ÿ›‘ node could not be found. Please install node (and ensure it is in your PATH) before trying again." - exit 1 -fi - -if ! command -v git &> /dev/null -then - echo "๐Ÿ›‘ git could not be found. Please install git (and ensure it is in your PATH) before trying again." - exit 1 -fi - -GIT_ROOT="$(git rev-parse --show-toplevel)" - -README_GENERATOR_DIR="${GIT_ROOT}/../readme-generator-for-helm" -HELM_DIR="${GIT_ROOT}/../speckle-helm" -HELM_GIT_TARGET_BRANCH="gh-pages" - -if [ ! -d "${README_GENERATOR_DIR}" ]; then - echo "๐Ÿ”ญ Could not find 'readme-generator-for-helm' in a sibling directory" - echo "๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง Proceeding with cloning readme-generator-for-helm to a sibling directory, 'readme-generator-for-helm'" - git clone git@github.com:bitnami-labs/readme-generator-for-helm.git "${README_GENERATOR_DIR}" -fi - -if [ -n "${CI}" ]; then - git config --global user.email "devops+circleci@speckle.systems" - git config --global user.name "CI" -fi - -pushd "${README_GENERATOR_DIR}" - echo "โœจ Updating to the latest version of readme-generator-for-helm" - git switch main - git pull origin main - npm install -popd - -if [ ! -d "${HELM_DIR}" ]; then - echo "๐Ÿ”ญ Could not find Speckle Helm in a sibling directory (named 'speckle-helm')" - echo "๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง Proceeding with cloning Speckle's helm repository to a sibling directory, 'speckle-helm'" - git clone git@github.com:specklesystems/helm.git "${HELM_DIR}" -fi - -pushd "${HELM_DIR}" - echo "โœจ Updating to the latest version of Speckle helm" - git switch main - git pull origin main - echo "๐Ÿฝ Preparing gh-pages branch for updates" - git switch "${HELM_GIT_TARGET_BRANCH}" - git pull origin "${HELM_GIT_TARGET_BRANCH}" -popd - -pushd "${GIT_ROOT}" - echo "๐Ÿ— Generating the documentation" - node "${README_GENERATOR_DIR}/bin/index.js" \ - --config "${GIT_ROOT}/utils/helm/.helm-readme-configuration.json" \ - --values "${GIT_ROOT}/utils/helm/speckle-server/values.yaml" \ - --readme "${HELM_DIR}/README.md" -popd - -pushd "${HELM_DIR}" - echo "๐ŸŒณ Preparing commit to branch '${HELM_GIT_TARGET_BRANCH}' for Helm README..." - if [[ $(git status --porcelain) ]]; then - git add README.md - git commit -m "Updating README with revised parameters from values.yaml of Helm Chart." - git push --set-upstream origin "${HELM_GIT_TARGET_BRANCH}" - fi -popd - -echo "โœ… All done ๐ŸŽ‰" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 96c42f5c0..cfa71703e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,14 +36,14 @@ repos: args: - --ignore=E501 # ignoring error about lines that are too long - # - repo: local - # hooks: - # - id: helm-documentation - # name: Helm Json Schema - # language: system - # files: utils\/helm\/speckle\-server\/values\.yaml - # entry: utils/helm/update-schema-json.sh - # description: If this fails it is because the values.yaml file was updated. Or has missing or incorrect documentation. + - repo: local + hooks: + - id: helm-documentation + name: Helm Json Schema + language: system + files: utils\/helm\/speckle\-server\/values\.yaml + entry: utils/helm/update-schema-json.sh + description: If this fails it is because the values.yaml file was updated. Or has missing or incorrect documentation. # helmlint should occur after the json schema is updated - repo: https://github.com/gruntwork-io/pre-commit diff --git a/packages/frontend-2/components/viewer/PreSetupWrapper.vue b/packages/frontend-2/components/viewer/PreSetupWrapper.vue index 9620a4c58..74217a9b6 100644 --- a/packages/frontend-2/components/viewer/PreSetupWrapper.vue +++ b/packages/frontend-2/components/viewer/PreSetupWrapper.vue @@ -126,6 +126,7 @@ import { useFilterUtilities } from '~/lib/viewer/composables/ui' import { projectsRoute, workspaceRoute } from '~~/lib/common/helpers/route' import { useMixpanel } from '~/lib/core/composables/mp' import { writableAsyncComputed } from '~/lib/common/composables/async' +import { parseUrlParameters, resourceBuilder } from '@speckle/shared/viewer/route' graphql(` fragment ModelPageProject on Project { @@ -197,15 +198,20 @@ const limitsDialogType = ref<'version' | 'comment' | 'federated'>('version') // Check for missing referencedObject in url referenced versions (out of plan limits) const hasMissingReferencedObject = computed(() => { - const resourceIds = resourceIdString.value.split(',') + const resources = parseUrlParameters(resourceIdString.value) const result = modelsAndVersionIds.value.some((item) => { - const version = item.model?.versions?.items?.find((v) => v.id === item.versionId) + const version = item.model?.loadedVersion?.items?.find( + (v) => v.id === item.versionId + ) - if (version && version.referencedObject === null) { - // Check if this model+version is in the URL (latest version always available) - const modelVersionString = `${item.model.id}@${item.versionId}`.toLowerCase() - const isInUrl = resourceIds.some((r) => r.toLowerCase() === modelVersionString) + if (!version || version.referencedObject === null) { + const modelVersionString = resourceBuilder() + .addModel(item.model.id, item.versionId) + .toString() + const isInUrl = resources.some( + (r) => r.toString().toLowerCase() === modelVersionString + ) return isInUrl } @@ -298,18 +304,11 @@ watch( } showLimitsDialog.value = true return - } - - // If no workspace and no missing objects, don't show dialog - if (!project.value?.workspace) { - showLimitsDialog.value = false - return - } - - // Only show comment dialog if it's a federated view AND we have a missing referenced object - if (missingThread && isFederated.value && hasMissingReferencedObject.value) { + } else if (missingThread && isFederated.value && hasMissingReferencedObject.value) { limitsDialogType.value = 'comment' showLimitsDialog.value = true + } else { + showLimitsDialog.value = false } }, { immediate: true } diff --git a/packages/frontend-2/pages/book-a-demo.vue b/packages/frontend-2/pages/book-a-demo.vue index 5280b8964..92b81da2d 100644 --- a/packages/frontend-2/pages/book-a-demo.vue +++ b/packages/frontend-2/pages/book-a-demo.vue @@ -20,11 +20,13 @@

- +