-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Zone list: Click on the details page, then click on the Assets tab, but fail to retrieve asset data. #4707
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ export default { | |
data() { | ||
return { | ||
tableConfig: { | ||
url: `/api/v1/assets/gateways/?domain=${this.$route.params.id}`, | ||
url: `/api/v1/assets/gateways/?domain=${this.object.id}`, | ||
columnsExclude: [ | ||
'info', 'spec_info', 'auto_config' | ||
], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm sorry but you haven't provided any code to work with. Please share the specific code段落 39 和其后续代码以便我为您分析。 |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,7 @@ export default { | |
} | ||
}, | ||
data() { | ||
const vm = this | ||
return { | ||
formConfig: { | ||
getUrl: () => { | ||
|
@@ -53,7 +54,7 @@ export default { | |
createSuccessMsg: this.$t('AddSuccessMsg'), | ||
updateSuccessNextRoute: { | ||
name: 'ZoneDetail', | ||
params: { id: this.$route.params.id } | ||
params: { id: this.object.id } | ||
}, | ||
fields: ['gateways'], | ||
fieldsMeta: { | ||
|
@@ -73,7 +74,7 @@ export default { | |
cleanFormValue(values) { | ||
const data = [] | ||
values.gateways.forEach(item => { | ||
const d = { id: item.pk, domain: this.$route.params.id } | ||
const d = { id: item.pk, domain: vm.object.id } | ||
data.push(d) | ||
}) | ||
return data | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. None of the provided code is present to analyze. Please provide an actual piece of JavaScript or React component that needs analysis. |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above code is missing the "extends" key at the beginning of each definition block to properly define them as objects.
In terms of differences:
category
field seems redundant since both the current object and its parent have an inherited category (all
). The code does not explicitly mention this, so we can just use a single value for both properties (e.g.,"tableConfig"
).In terms of issues/optimization suggestions based on these details:
url
variable references@@
instead of directly providing values from$route.params.id
, which might cause issues if $route params depend on other routes and should not affect the main app state like this within this function. You may want to ensure consistency or make necessary adjustments here.So overall, these appear to be minor formatting and structure variations without significant errors/warnings in their content logic but improvements regarding proper implementation practices could still be made across multiple areas mentioned above for clarity enhancement and adherence to standard coding conventions.