feat(desktop): traffic rate monitor support #1796
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
If you have any questions, you can refer to the Contributing Guide
What is the current behavior?
24-hour fixed data query.
What is the new behavior?
This pull request introduces a new
TimeRangeSelect
component and integrates it into theTrafficMonitor
view to allow users to select custom time ranges for monitoring traffic data. Additionally, it includes various style updates for the date-picker elements and translations for new time range labels.New Component Integration:
src/components/TimeRangeSelect.vue
: Added a newTimeRangeSelect
component to allow users to select custom time ranges for traffic monitoring.Style Updates:
src/assets/scss/element/element-reset.scss
: Added styles for the date-picker elements, including background colors, borders, and text colors for different states and components.View Updates:
src/views/viewer/TrafficMonitor.vue
: Integrated theTimeRangeSelect
component into theTrafficMonitor
view, updated methods to handle time range changes, and reset traffic statistics accordingly. [1] [2] [3] [4] [5]Translation Updates:
src/lang/common.ts
: Added translations for new time range labels such as "Last 5 Minutes", "Last 30 Minutes", "Last 1 Hour", "Start Time", and "End Time".Utility Updates:
src/utils/element.ts
: Enabled theDatePicker
component in the Vue instance. [1] [2]