-
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
Conversation
…ab, but fail to retrieve asset data.
@@ -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 comment
The 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.
@@ -29,7 +29,7 @@ export default { | |||
return { | |||
tableConfig: { | |||
category: 'all', | |||
url: `/api/v1/assets/assets/?domain=${this.$route.params.id}&is_gateway=0`, | |||
url: `/api/v1/assets/assets/?domain=${this.object.id}&is_gateway=0`, | |||
tableConfig: { | |||
columns: ['name', 'address', 'platform', 'actions'], | |||
columnsMeta: { |
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:
- The
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:
- It's unclear why you've defined two separate arrays with different names for "columns", when they contain nearly identical information. If there isn't any specific need for this redundancy, it could be streamlined into having one array that includes all columns metadata.
- The
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.
@@ -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 comment
The 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 和其后续代码以便我为您分析。
|
fix: Zone list: Click on the details page, then click on the Assets tab, but fail to retrieve asset data.