Commit graph

80 commits

Author SHA1 Message Date
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
Jonathan Cohen
dbd1bb522f Correctly internationalize new UI access key placeholder name (#574)
* Correctly internationalize new UI access key placeholder name

* Add back the keyID for non-English languages

This simply replicates the existing messages so we can release the Data
Limits UI without waiting for these strings to be translated.

* Specify that keyId will be a number
2020-02-19 16:13:09 -05:00
alalamav
b1454f1bbb
Settings page improvements (#567) 2020-02-04 17:00:29 -05:00
alalamav
e1a772eea1
Data limits UI (#554) 2020-02-03 16:21:37 -05:00
Jonathan Cohen
dafa1f5bc2
Allow users to change the hostname for new access keys (#565)
* Create an endpoint to change the server's hostname.

This is the backend only, and does not check if the hostname exists or points to a Shadowbox
server.  Users have the responsibility of double checking that the
hostname and DNS if necessary are properly set up and specified.

* Updates

Changes validation to use regex.

Gets rid of a bad test

Uses paramtereized tests for better test output

Adds setHostname to AccessKeyRepository and calls it in the endpoint

* Integration tests

Also fixes missing dependency on ip-regex

* Remove validator from lockfile

* Ensure we correctly use Python 2 for Cloud SDK

* API for the new endpoint to change the server hostname. (#534)

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* Remove 404 and 406 error states.  Checking for a functioning Shadowbox
server requires knowledge of the API prefix, which creates layering
challenges.  The UI will be able to make these checks, but users who
call the API directly will have to be careful not to put in an incorrect
hostname.  The consequence of this would be that newly made access keys
won't work.

* Clarify API, change name, add validation errors

* Clarify description

* Remove the API response corresponding to a failed check against the new
hostname that it points to the same server

* Respond to review comments

* Rename endpoint and related functions

From the server's perspective, this does change the hostname for
existing access keys since on server load time (in the Server Manager)
we recalculate access key hostnames from the key repository.

* Respond to review comments

* Use version 1.2.0 since data limits is taking 1.1.0

* Fix update_mmdb and the Docker image to work on Alpine (#559)

* Fix the for loop in update_mmdb to be `dash` compatible

for x in {a..b} is bash-only, and alpine's default shell is `dash`.

* Fix other issues related to using musl/Busybox/dash

* Use `[[` instead of `((` for the branch
* Make sure to update to GNU coreutils in the image in order to use
`date --date`

* Respond to review comments

* UI for setting the hostname for access key invitations (#553)

* Increase Shadowbox version for data limits experiment (#544)

* Return the port for new access keys from GET /server.  (#552)

This was accidentally removed in #537.

* UI for setting the hostname for access key invitations

This also includes some random typo fixes and QOL improvements.

To test, you can use

    export SB_IMAGE=cohenjongoogle/shadowbox:latest
    yarn do shadowbox/docker/run

then in a different terminal

    yarn do server_manager/electron_app/run

and add the server

* Add back in new files

Also fixes a backward compatibility issues for servers which don't
support changing the hostname

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Use DB-IP's Geolocation database instead of MaxMind's (#557)

* Use DB-IP's free IP-to-Country database instead of MaxMind's

This avoids the necesseity to either (1) bundle MaxMind's database in
our docker image or (2) require server admins to individually create
MaxMind accounts due to the new requirements for using GeoLite2
databases.  See https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases/

* Add attribution to DB-IP for the GeoIP database

* Make sure that we deal with lag between the changeover of the current
month and release of new versions of the DB-IP database

* Respond to review comments

* Attribute DB-IP in the update script

* Respond to review comments

* Respond to review comments

* Fix update_mmdb and the Docker image to work on Alpine (#559)

* Fix the for loop in update_mmdb to be `dash` compatible

for x in {a..b} is bash-only, and alpine's default shell is `dash`.

* Fix other issues related to using musl/Busybox/dash

* Use `[[` instead of `((` for the branch
* Make sure to update to GNU coreutils in the image in order to use
`date --date`

* Respond to review comments

* Update to Typescript 3.7 (#558)

See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html for more information.  Among the nice new features are optional chainging and null coalescing, and assertion functions, as well as some additional safety checks in the compiler

* Create an endpoint to change the server's hostname.

This is the backend only, and does not check if the hostname exists or points to a Shadowbox
server.  Users have the responsibility of double checking that the
hostname and DNS if necessary are properly set up and specified.

* Updates

Changes validation to use regex.

Gets rid of a bad test

Uses paramtereized tests for better test output

Adds setHostname to AccessKeyRepository and calls it in the endpoint

* Integration tests

Also fixes missing dependency on ip-regex

* Remove validator from lockfile

* Ensure we correctly use Python 2 for Cloud SDK

* API for the new endpoint to change the server hostname. (#534)

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* Remove 404 and 406 error states.  Checking for a functioning Shadowbox
server requires knowledge of the API prefix, which creates layering
challenges.  The UI will be able to make these checks, but users who
call the API directly will have to be careful not to put in an incorrect
hostname.  The consequence of this would be that newly made access keys
won't work.

* Clarify API, change name, add validation errors

* Clarify description

* Remove the API response corresponding to a failed check against the new
hostname that it points to the same server

* Respond to review comments

* Rename endpoint and related functions

From the server's perspective, this does change the hostname for
existing access keys since on server load time (in the Server Manager)
we recalculate access key hostnames from the key repository.

* Respond to review comments

* Use version 1.2.0 since data limits is taking 1.1.0

* Fix update_mmdb and the Docker image to work on Alpine (#559)

* Fix the for loop in update_mmdb to be `dash` compatible

for x in {a..b} is bash-only, and alpine's default shell is `dash`.

* Fix other issues related to using musl/Busybox/dash

* Use `[[` instead of `((` for the branch
* Make sure to update to GNU coreutils in the image in order to use
`date --date`

* Respond to review comments

* UI for setting the hostname for access key invitations

This also includes some random typo fixes and QOL improvements.

To test, you can use

    export SB_IMAGE=cohenjongoogle/shadowbox:latest
    yarn do shadowbox/docker/run

then in a different terminal

    yarn do server_manager/electron_app/run

and add the server

* Add back in new files

Also fixes a backward compatibility issues for servers which don't
support changing the hostname

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Fix messed up rebase

* merge

* Clear merge markers

Co-authored-by: alalamav <2132122+alalamav@users.noreply.github.com>

* Create an endpoint to change the server's hostname.

This is the backend only, and does not check if the hostname exists or points to a Shadowbox
server.  Users have the responsibility of double checking that the
hostname and DNS if necessary are properly set up and specified.

* Updates

Changes validation to use regex.

Gets rid of a bad test

Uses paramtereized tests for better test output

Adds setHostname to AccessKeyRepository and calls it in the endpoint

* Integration tests

Also fixes missing dependency on ip-regex

* Remove validator from lockfile

* Ensure we correctly use Python 2 for Cloud SDK

* API for the new endpoint to change the server hostname. (#534)

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* Remove 404 and 406 error states.  Checking for a functioning Shadowbox
server requires knowledge of the API prefix, which creates layering
challenges.  The UI will be able to make these checks, but users who
call the API directly will have to be careful not to put in an incorrect
hostname.  The consequence of this would be that newly made access keys
won't work.

* Clarify API, change name, add validation errors

* Clarify description

* Remove the API response corresponding to a failed check against the new
hostname that it points to the same server

* Respond to review comments

* Rename endpoint and related functions

From the server's perspective, this does change the hostname for
existing access keys since on server load time (in the Server Manager)
we recalculate access key hostnames from the key repository.

* Respond to review comments

* Use version 1.2.0 since data limits is taking 1.1.0

* UI for setting the hostname for access key invitations (#553)

* Increase Shadowbox version for data limits experiment (#544)

* Return the port for new access keys from GET /server.  (#552)

This was accidentally removed in #537.

* UI for setting the hostname for access key invitations

This also includes some random typo fixes and QOL improvements.

To test, you can use

    export SB_IMAGE=cohenjongoogle/shadowbox:latest
    yarn do shadowbox/docker/run

then in a different terminal

    yarn do server_manager/electron_app/run

and add the server

* Add back in new files

Also fixes a backward compatibility issues for servers which don't
support changing the hostname

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Use DB-IP's Geolocation database instead of MaxMind's (#557)

* Use DB-IP's free IP-to-Country database instead of MaxMind's

This avoids the necesseity to either (1) bundle MaxMind's database in
our docker image or (2) require server admins to individually create
MaxMind accounts due to the new requirements for using GeoLite2
databases.  See https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases/

* Add attribution to DB-IP for the GeoIP database

* Make sure that we deal with lag between the changeover of the current
month and release of new versions of the DB-IP database

* Respond to review comments

* Attribute DB-IP in the update script

* Respond to review comments

* Respond to review comments

* Fix update_mmdb and the Docker image to work on Alpine (#559)

* Fix the for loop in update_mmdb to be `dash` compatible

for x in {a..b} is bash-only, and alpine's default shell is `dash`.

* Fix other issues related to using musl/Busybox/dash

* Use `[[` instead of `((` for the branch
* Make sure to update to GNU coreutils in the image in order to use
`date --date`

* Respond to review comments

* Update to Typescript 3.7 (#558)

See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html for more information.  Among the nice new features are optional chainging and null coalescing, and assertion functions, as well as some additional safety checks in the compiler

* Create an endpoint to change the server's hostname.

This is the backend only, and does not check if the hostname exists or points to a Shadowbox
server.  Users have the responsibility of double checking that the
hostname and DNS if necessary are properly set up and specified.

* Updates

Changes validation to use regex.

Gets rid of a bad test

Uses paramtereized tests for better test output

Adds setHostname to AccessKeyRepository and calls it in the endpoint

* Integration tests

Also fixes missing dependency on ip-regex

* Remove validator from lockfile

* Ensure we correctly use Python 2 for Cloud SDK

* API for the new endpoint to change the server hostname. (#534)

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* Remove 404 and 406 error states.  Checking for a functioning Shadowbox
server requires knowledge of the API prefix, which creates layering
challenges.  The UI will be able to make these checks, but users who
call the API directly will have to be careful not to put in an incorrect
hostname.  The consequence of this would be that newly made access keys
won't work.

* Clarify API, change name, add validation errors

* Clarify description

* Remove the API response corresponding to a failed check against the new
hostname that it points to the same server

* Respond to review comments

* Rename endpoint and related functions

From the server's perspective, this does change the hostname for
existing access keys since on server load time (in the Server Manager)
we recalculate access key hostnames from the key repository.

* Respond to review comments

* Use version 1.2.0 since data limits is taking 1.1.0

* Fix update_mmdb and the Docker image to work on Alpine (#559)

* Fix the for loop in update_mmdb to be `dash` compatible

for x in {a..b} is bash-only, and alpine's default shell is `dash`.

* Fix other issues related to using musl/Busybox/dash

* Use `[[` instead of `((` for the branch
* Make sure to update to GNU coreutils in the image in order to use
`date --date`

* Respond to review comments

* UI for setting the hostname for access key invitations

This also includes some random typo fixes and QOL improvements.

To test, you can use

    export SB_IMAGE=cohenjongoogle/shadowbox:latest
    yarn do shadowbox/docker/run

then in a different terminal

    yarn do server_manager/electron_app/run

and add the server

* Add back in new files

Also fixes a backward compatibility issues for servers which don't
support changing the hostname

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Fix messed up rebase

* merge

* Clear merge markers

Co-authored-by: alalamav <2132122+alalamav@users.noreply.github.com>

Co-authored-by: alalamav <2132122+alalamav@users.noreply.github.com>
2020-01-30 15:22:57 -05:00
Jonathan Cohen
3d323d8224
Allow the port for new access keys to be editable from the UI. (#505)
* Allow the port fo rnew access keys to be changed from the UI

* Remove old TODOs

* Use correct log levels

* CSS formatting

* Use Number.isNan

* short circuit on no change and kill dead code

* Implement fakes, fix display bug

* fix typo

* Respond to code review

* Fix underline coloring

* Limit to numerical input

* Respond to review comments

* Review comments

* Disable editing key port for old servers (#513)

* Disable editing key port for old servers

* Use -1 instead of the current port number, nits

* Be more conservative with the response code check

* Use on-tap instead of on-click for the keys port input

* Rename "toggleFoo" to "setFoo"

* Use 1.0.0 instead of 0.2.0

* Respond to review comments.  Also fixes a bug where, if the input was
invalid due to a server-side error, hitting Enter did nothing except
show a valid state

* Correct the previous bugfix
2019-10-22 13:04:35 -04:00
alalamav
e956c94df4
i18n: mirror UI for RTL languages, detect user locale (#463) 2019-08-28 11:11:13 -04:00
Jonathan Cohen
0445af0a95
Clear unused imports and variables (#473)
* Clear unused imports and variables

* Add trailing newline
2019-08-21 14:21:30 -04:00
Jonathan Cohen
710320ec3e
Fix a bug where blurring the server name after changing the name changed (#471)
the UI to the Connections tab
2019-08-20 15:15:00 -04:00
alalamav
34b2c708be
i18n: extract strings (#446) 2019-06-20 17:38:49 -04:00
fortuna
a54d6134b0 Rename defaultAccessKeyPort 2019-01-04 14:13:48 -05:00
fortuna
488cad54c5 Show default port and api 2019-01-03 17:37:13 -05:00
alalamav
86146f66b0 Re-implement broken tests, write tests for new functionality (#314) 2018-12-04 17:05:35 -05:00
alalamav
5dd8bb31ad Handle managed server deletion outside the application (#313) 2018-12-04 17:05:35 -05:00
alalamav
f5875b754c Enable multiple server support (#306) 2018-12-04 17:05:35 -05:00
alalamav
d1c896627c Re-style manager UI (#273) 2018-12-04 17:05:35 -05:00
trevj
f03daef191
validate manual server URLs before entry, leniently (#315) 2018-11-20 12:03:31 -05:00
alalamav
ecf7d09b62
Feedback form improvements (#255) 2018-09-24 14:53:39 -04:00
trevj
69cf89c48e
switch to sentry-electron (#232) 2018-08-17 17:15:54 -04:00
trevj
9ac89e7d90
refactor preload.ts, remove some unnecessary events (#220) 2018-08-13 15:26:25 -04:00