outline-server/src/shadowbox/server
Jonathan Cohen 2f2e658134
Per-Key Data Limits in the Manager (#841)
* Add per-key data limits to the UI

* Hold byte values instead of DisplayDataAmounts in OutlineServerView and OutlinePerKeyDatALimitDialog

This allows us to fix a layering issue where, at the time of converting
a server access key to a DisplayAccessKey, we couldn't compute the
'relevant transfer' for progress bar displays since we couldn't get at
the server's default data limit.

* Mayp#values() returns an Iterator, not an array

* Rename event field to defaultDataLimitBytes

* Don't reset the dialog state on failure

* Use a loop instead of Math.max in refreshTransferStats

* Unconditionally enable the default data limit in the UI after adding it to the server

Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com>

* Consistent handling of the view's default data limit state for both addition and removal

* Use callbacks to set and remove the per key data limit

* s/_showMenu/_showDataLimit/g

* Make language a public property of the dialog

* The dialog only needs the active data limit

* Use a separate method for the handler to open the dialog

* Use _activeDataLimitBytes

* We can use the ?? operator in `refreshTransferStats`

* s/dataLimitType/dataLimitUnit/g

* Rename a couple members

Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com>
2021-03-15 10:55:41 -04:00
..
mocks Improve type safety of manager service request parameters (#492) 2019-10-08 15:19:39 -04:00
api.yml Document the non-experimental API endpoint for the default data limit (#794) 2021-01-14 11:58:31 -05:00
build_action.sh Require scripts to be shellcheck-compliant 2021-02-17 11:57:32 -05:00
main.ts Per-Key Data Limits in Shadowbox (#769) 2020-12-23 13:52:50 -05:00
manager_metrics.spec.ts Server data usage timeframe (#485) 2019-09-13 18:21:09 -04:00
manager_metrics.ts Server data usage timeframe (#485) 2019-09-13 18:21:09 -04:00
manager_service.spec.ts Per-Key Data Limits in Shadowbox (#769) 2020-12-23 13:52:50 -05:00
manager_service.ts bump ssconfig version number 2021-02-11 20:29:21 -05:00
outline_shadowsocks_server.ts Fix shadowbox node run action; enable shadowbox docker on macOS (#674) 2020-06-02 18:17:06 -04:00
run_action.sh Respond to review comments 2021-02-17 16:56:37 -05:00
server_access_key.spec.ts Per-Key Data Limits in the Manager (#841) 2021-03-15 10:55:41 -04:00
server_access_key.ts Per-Key Data Limits in the Manager (#841) 2021-03-15 10:55:41 -04:00
server_config.ts Per-Key Data Limits in Shadowbox (#769) 2020-12-23 13:52:50 -05:00
shared_metrics.spec.ts Per-Key Data Limits in Shadowbox (#769) 2020-12-23 13:52:50 -05:00
shared_metrics.ts Per-Key Data Limits in Shadowbox (#769) 2020-12-23 13:52:50 -05:00