-
Notifications
You must be signed in to change notification settings - Fork 789
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
Data limits UI #554
Data limits UI #554
Conversation
alalamav
commented
Jan 9, 2020
- Implements the user interface to configure access key data transfer limits on the Outline Manager app. The feature is currently an experiment, which is why we have a new section in the server settings.
- When data limits are enabled, the access key usage display becomes relative to the limit. Displays a tooltip on hover. Re-styles the data usage progress bar.
- Displays a notification to direct the user to the feature for existing servers upon updating the app, or when opening the app for a second time for new servers.
- Minor improvements: whitespace removal, turns nested Promise code into async/await, re-styles the help bubbles.
paper-input, paper-textarea, paper-dropdown-menu { | ||
--paper-input-container-focus-color: var(--primary-green); | ||
paper-dropdown-menu { | ||
width: 100%; |
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.
Why did we switch this with the definition in cloud-install-styles?
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 only want width: 100%
on the feedback form dropdowns, not the one I'm adding for data limit units.
src/server_manager/web_app/app.ts
Outdated
console.error(`Failed to set access key data limit: ${error}`); | ||
this.appRoot.showError(this.appRoot.localize('error-set-data-limit')); | ||
serverView.accessKeyDataLimit = this.dataLimitToDisplayDataAmount( | ||
previousLimit || await this.computeDefaultAccessKeyDataLimit(this.selectedServer)); |
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.
IMO it's cleaner if we call this.computeDefaultAccessKeyDataLimit(this.selectedServer, await this.selectedServer.listAccessKeys())
here and make the second parameter required. Or alternatively get rid of the second parameter completely and call listAccessKeys()
twice above
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.
UI and initial feature looks great and I look forward to testing~ |
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.
Thanks for adding the feature!!
@JonathanDCohen, I merged your changes (63748f4). Tested that the hostname and data limits features are working as intended. Fixed a small UI issue where non-editable hostnames were getting cropped (b1e295b): 5206d2f and 33eedf1 were UI/UX fixes that resulted from a bug bash with the design team. Please take a quick look so I can merge. |
The strings LGTM. |
It looks awesome. Thank you. |