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
NAS-128386 / 24.10 / Port WidgetNetworkComponent to new dashboard #10014
Conversation
# Conflicts: # src/app/pages/dashboard/dashboard.module.ts
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #10014 +/- ##
==========================================
+ Coverage 73.65% 73.67% +0.02%
==========================================
Files 1505 1509 +4
Lines 52924 53032 +108
Branches 6329 6342 +13
==========================================
+ Hits 38980 39071 +91
- Misses 13944 13961 +17 ☔ View full report in Codecov by Sentry. |
# Conflicts: # src/app/pages/dashboard/types/widget.interface.ts
src/app/pages/dashboard/widgets/network/widget-network/widget-network.component.ts
Outdated
Show resolved
Hide resolved
# Conflicts: # src/app/pages/dashboard/types/widget.interface.ts # src/app/pages/dashboard/widgets/all-widgets.constant.ts
|
||
networkInterfaceUpdate(interfaceName: string): Observable<ReportingData[]> { | ||
return this.serverTime$.pipe( | ||
skipWhile(() => !interfaceName), |
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.
Don't think this will work when interfaceName
is null/empty string. string is passed by value so that variable will never update and this observable will keep skipping emits because of the skipWhile
.
Also, I think computing time values on the spot are a better approach. We don't need this information all the time. Just when making the calls. Why keep timers on when they are not needed.
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.
Yeah, that's right. It looks like leftover since we are switching to networkInterfaceUpdate
once the interface is loaded
}; | ||
}); | ||
|
||
protected chartOptions: ChartOptions<'line'> = { |
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.
We should break this large object down into smaller chunks stored in variables with declarative names so it's more readable what we're doing.
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.
src/app/pages/dashboard/widgets/network/widget-network/widget-network.utils.ts
Outdated
Show resolved
Hide resolved
src/app/pages/dashboard/widgets/network/widget-network/widget-network.utils.ts
Outdated
Show resolved
Hide resolved
src/app/pages/dashboard/widgets/network/widget-network/widget-network.utils.ts
Outdated
Show resolved
Hide resolved
src/app/pages/dashboard/widgets/network/widget-network/widget-network.utils.ts
Outdated
Show resolved
Hide resolved
src/app/pages/dashboard/widgets/network/widget-network/widget-network.utils.ts
Outdated
Show resolved
Hide resolved
This PR has been merged and conversations have been locked. |
Check network widget at new dashboard