Commit graph

99 commits

Author SHA1 Message Date
Jonathan Cohen
8fdd8d7273
Pass the id of the server to remove to event listeners (#855)
* Pass the id of the server to be removed from the manager to the event listener

* Correctly reset appRoot state after destroying a server

* Rename to forgetServer

* Remove stray logging

* Apply suggestions from code review

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

* Further suggested changes

Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com>
2021-03-24 15:04:09 -04:00
mpmcroy
b9222fe75c
Adds GCP OAuth (#838)
* gitignore

* Adds GCP token to CloudAccounts

* Checkpoint

* Checkpoint

* Refactors cloud accounts

* Addresses comments

* Auto-formatting

* Reverts gallery webpack GCP local server

* Reverts webpack config change

* Minor cleanup

* Removes unused class

* Reverts initial feature flag implementation

* Removes unneeded logging

* Adds credentials getters to CloudAccounts and updates tests

* Auto-format

* Adds FakeCloudAccounts

* Removes credentialsGetter from CloudAccounts

* Removes account factories from CloudAccounts

* Addresses review comments

* Addresses review commetns

* Auto-formatting

* Auto-format

* Replace OAuth config client id

* Remove account from CloudAccounts
2021-03-23 15:52:25 -04:00
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
mpmcroy
b193850304
Rename adminEmail to digitalOceanAccountName (#839)
* Renames adminEmail to digitalOceanAccountName

* Minor typo
2021-03-04 16:59:04 -05:00
mpmcroy
f5e9652ab2
Fixes unresponsive outline-do-oauth-step (#837)
* Fixes return statement

* Disconnect account and show intro when DigitalOcean OAuth is cancelled through the Outline Manager
2021-03-02 10:32:19 -05:00
mpmcroy
78407ddc69
Removes unnecessary logging statement (#830)
* Removes unnecessary logging
2021-02-22 09:47:54 -05:00
mpmcroy
c36afbcbbb
Repurposes TokenManager as CloudAccounts (#827)
* gitignore

* Converts ManagedServerRepository into Account

* Adds CloudAccounts

* Moves token manager to cloud accounts

* Auto-format

* Newline

* Oops wrong year

* Addresses review commetns

* Addresses review comments

* Addresses review comments

* Addresses review commetns
2021-02-19 16:30:54 -05:00
Vinicius Fortuna
f0928afbd1 Fix DataUsageByAccessKey and ServerConfig 2021-02-05 14:49:40 -05:00
Jonathan Cohen
1c5b563d0d
Internationalize units and currency (#780)
* Internationalize data transfer amounts

* Internationalize units and currency

This required updating to Typescript 4 and adding compiler changes for the server manager in order to support newer features of `Intl`.

This change also fixes it so that the server city, creation date, and data limits no longer are stuck to the old language ater changing languages.

* Remove stray log

* Respond to review comments

* Remove byte-size

* Move to `web_app`

This code is only intended to be run in a web environment, not in Node.

* Respond to review comments

* Use property binding to the app language

* Respond to review comments

* Respond to review comments

* s/get/format

* Error out on Node

* Set the persisted app language before starting the app to prevent issues with undefined language at startup

* Respond to review comments and broaden covered languages
2021-02-04 18:47:45 -05:00
mpmcroy
14d3c49660
Adds id to server and updated serverId to metricsId (#799)
* Adds id to server and updated serverId to metricsId

* Fixes test

* Addresses review comments
2021-01-27 13:03:15 -05:00
mpmcroy
3878f443c5
Moves the "server progress view" to the "create server" flow (#790)
* Moves server progress view to outline-server-view

* Stops progress view animation; small refactor

* Auto-format

* Updates app tests

* Addresses review comments

* Addresses review comments

* Addresses review comments

* Addresses review comments

* Explicitly renders the server view dom-repeat to ensure view is added to the DOM

* Makes showServer synchronous
2021-01-15 12:08:53 -05:00
Jonathan Cohen
93ab615466
Remove unneeded casts (#789) 2021-01-12 12:51:29 -05:00
Vinicius Fortuna
b3b2d9886f Fix test 2021-01-08 17:02:30 -05:00
Vinicius Fortuna
59e6a90e26 Use updateServerEntry 2021-01-08 11:31:42 -05:00
Vinicius Fortuna
d3cf951dff Add return types 2021-01-06 18:35:14 -05:00
Vinicius Fortuna
24dcd36141 Add comment 2021-01-06 18:26:01 -05:00
Vinicius Fortuna
d25ed1a279 Rename variables 2021-01-06 18:25:17 -05:00
Vinicius Fortuna
da73af5f32 Remove TODOs 2021-01-06 18:16:53 -05:00
Vinicius Fortuna
b4a2cfb5bd Fix account connection flow. 2021-01-05 19:46:51 -05:00
Vinicius Fortuna
bc7c1b8946 Add some errors 2020-12-30 00:40:27 -05:00
Vinicius Fortuna
8aca943c83 Fix more tests 2020-12-29 21:55:46 -05:00
Vinicius Fortuna
d959bad07e Fix tests 2020-12-29 21:39:16 -05:00
Vinicius Fortuna
9887f4a80b Make addServer semi-synchronous 2020-12-29 20:59:18 -05:00
Vinicius Fortuna
50c58d23de Rename and move DisplayServer 2020-12-29 19:59:06 -05:00
Vinicius Fortuna
193f208d57 Add server cancellation 2020-12-29 19:46:54 -05:00
Vinicius Fortuna
abf88e68af Fix server loading 2020-12-29 17:19:53 -05:00
Vinicius Fortuna
160db60d25 Update server view on creation completed 2020-12-29 14:07:51 -05:00
Vinicius Fortuna
43594d9481 Merge branch 'fortuna-clean' into fortuna-display 2020-12-29 10:45:52 -05:00
Vinicius Fortuna
767af362bc Call await for serverUnreachable 2020-12-29 10:42:48 -05:00
Vinicius Fortuna
d713ba3701 Fix server creation 2020-12-28 18:18:08 -05:00
Vinicius Fortuna
d7790e0647 Remove commented out code 2020-12-28 17:41:12 -05:00
Vinicius Fortuna
2f304551f3 Remove unnecessary use of this.selectedServer 2020-12-28 17:31:03 -05:00
Vinicius Fortuna
7df13a2ff1 Replace appRoot.selectedServer server Id 2020-12-28 17:19:47 -05:00
Vinicius Fortuna
64b9a3fb35 More cleanup 2020-12-28 16:58:52 -05:00
Vinicius Fortuna
8df249535f Simplify app 2020-12-28 11:34:15 -05:00
Vinicius Fortuna
d274d4ba98 Replace promises with async 2020-12-23 17:44:13 -05:00
Vinicius Fortuna
603ff0ca34 Clean up show server logic 2020-12-23 17:00:46 -05:00
Vinicius Fortuna
a1bbfdc7c8 Clean up some async code 2020-12-23 16:39:53 -05:00
mpmcroy
cfdcfa8c30
Outline Region Picker refactor (#714)
* Updates region picker to Polymer 3

* commit hook

* Update region picker to LitElement (Typescript)

* Auto-formatting

* Auto-formatting

* Formatting

* Refactor

* Addresses review comments

* Addresses review comments

* Exports cloud-install-styles for LitElement components

* Fixes LitElement CSS registration

* Makes region card CSS rtl friendly
2020-08-18 13:18:13 -04:00
alalamav
b63606e90c
Make data limits a permanent feature (#698) 2020-07-20 17:32:29 -04:00
mpmcroy
fb1255e6f5
Adds app language selection picker (#696)
* Adds application language selector to side drawer

* Auto-formatting

* Revert unused message strings

* Minor fixes

* Rename function

* Addresses review comments

* Addresses review comments

* Addresses review comment

* Addresses review comments

* Auto-formatting

* Addresses review comments

* Filter out duplicate language from language picker

* Removes zh language code and associated messages file

* Adds jsdoc type information for outline-language-picker
2020-06-23 14:24:18 -04:00
alalamav
e3c5df3001
Fire metrics request only on user interaction (#689) 2020-06-11 12:59:32 -04:00
Vinicius Fortuna
0d0f7c1fa8 Move DisplayDataAmount to server view 2020-05-19 19:29:53 -04:00
Vinicius Fortuna
84a36d7edb Reshuffle types 2020-05-19 16:57:12 -04:00
Vinicius Fortuna
e152d80f6d Add types to Javascript 2020-05-18 15:24:14 -04:00
Vinicius Fortuna
d206df4f8c Fix sentry 2020-04-28 18:17:28 -04:00
Vinicius Fortuna
8238d57346 Stop depending on Node code in the browser code 2020-04-28 01:36:53 -04:00
alalamav
c0ba8c0a5f
Data limits surveys (#612) 2020-04-09 13:38:50 -04:00
mpmcroy
7545cb3466
Display server Shadowbox version (#607)
* Display server Shadowbox version

* Address review comments
2020-04-02 11:13:48 -04:00
alalamav
35074c58e1
Restore master branch (#582) 2020-02-20 12:29:18 -05:00