Skip to content

--story=135438311 服务、配置、分组、脚本&模板等项目&环境改造#617

Merged
luofann merged 6 commits into
TencentBlueKing:add-project-envfrom
LivySara:livy-0716
Jul 16, 2026
Merged

--story=135438311 服务、配置、分组、脚本&模板等项目&环境改造#617
luofann merged 6 commits into
TencentBlueKing:add-project-envfrom
LivySara:livy-0716

Conversation

@LivySara

Copy link
Copy Markdown
Contributor

No description provided.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

res = await importNonTemplateConfigFile(
props.bkBizId!,
props.appId!,
option.file,

P2 Badge Use project/env endpoint for local config imports

When importing non-template config files while viewing a non-default environment, this branch still calls importNonTemplateConfigFile with only biz/app IDs, which posts to the legacy /biz/{biz}/apps/{app}/config_item/import/... route. The server's legacy route resolves the default project/env, while the rest of this dialog now operates on the selected project/env, so the conflict preview can classify files against the wrong environment and the subsequent add can fail or create the wrong set of items. Pass the current projectId and envId through this branch and update the API helper to use the v2 import URL.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const appId = ref(Number(route.params.appId));
const appDataLoading = ref(true);
const env = ref<IEnvItem>();
const envId = computed(() => String(route.params.envId));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Treat missing envId as absent

When a service detail URL does not include the new optional envId segment, String(route.params.envId) becomes the literal 'undefined', which is truthy. That makes the immediate watcher call getAppDetail(..., envId='undefined', ...), and the env selector also refuses to fall back to the first environment because its model value is non-empty. This affects old/bookmarked service URLs and any internal link that still only passes spaceId/appId/versionId, so those pages request /envs/undefined instead of selecting a real environment.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已改成必填了

@LivySara
LivySara force-pushed the livy-0716 branch 2 times, most recently from 5fd9719 to 1c194b0 Compare July 16, 2026 02:40
@luofann
luofann merged commit 70fe4ec into TencentBlueKing:add-project-env Jul 16, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants