Skip to content

Conversation

@zhengkunwang223
Copy link
Member

Refs #8923

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Jun 5, 2025

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

const index = ref('6');
const open = ref(false);
const runtime = ref({
name: '',
Copy link
Member

Choose a reason for hiding this comment

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

There is an inconsistency in the ref values used between the two instances of <el-tabs> sections:

Before Change:

<el-tab-pane :label="$t('website.updateConfig')" name="0">

After Change:

<el-tab-pane :label="'FPM ' + $t('website.source')" name="3">

The name attributes "0" and "3" do not match the label text "$t('php.containerConfig')". This will cause the tabs to be labeled differently from their content.

Additionally, you might consider setting default values based on certain conditions (e.g., if user preferences or data dictate a specific tab should open by default).

Optimizations could involve reducing repetition within components like <PHP>, especially since they appear twice with different types. Also, ensure that Vue's reactive references (ref) are correctly set up across all related components to maintain state consistency.

}
out, err := compose.Restart(dockerComposePath)
if err != nil {
return handleErr(install, err, out)
Copy link
Member

Choose a reason for hiding this comment

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

There is an issue with this code related to the restart operation when install.App.Key equals "openresty". The function attempts to get all websites using websiteRepo.GetBy(), which assumes there's a method like that defined on the repository interface.

Here's what needs fixing:

Replace it with the actual implementation from your website repository. Assuming you need data from a specific table or query condition, modify it accordingly:

if install.App.Key == "openresty" {
  // Replace this line with the correct API call from your database
  websites, err := websiteRepo.GetOpenRestyRelatedWebsites()
  
  if err != nil || len(websites) == 0 {
    // Handle error appropriately (e.g., log or update installation status)
    return syncAppInstallStatus(&install, true) // Indicate failure to perform the desired task    
  }

  _ = createAllWebsitesWAFConfig(websites)
}

out, err := compose.Restart(dockerComposePath)

This ensures better correctness depending on how your website retrieval logic works and prevents runtime errors caused by missing or incorrect function calls.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 5, 2025

Copy link
Member

@wanghe-fit2cloud wanghe-fit2cloud left a comment

Choose a reason for hiding this comment

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

/lgtm

@wanghe-fit2cloud
Copy link
Member

/approve

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Jun 5, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wanghe-fit2cloud

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved label Jun 5, 2025
@f2c-ci-robot f2c-ci-robot bot merged commit 7f823ec into dev-v2 Jun 5, 2025
7 checks passed
@f2c-ci-robot f2c-ci-robot bot deleted the pr@dev-v2@website branch June 5, 2025 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants