Commit graph

106 commits

Author SHA1 Message Date
Vinicius Fortuna
6a5d6d7894 Add makePublicEvent 2020-05-12 19:31:27 -04:00
Vinicius Fortuna
36f887cc9a Convert outline-server-view to a class 2020-05-11 21:42:31 -04:00
Vinicius Fortuna
0ab6313864 Fix race condition 2020-05-08 18:12:44 -04:00
Vinicius Fortuna
f0cd3b6a78 Address comments 2020-05-08 16:02:50 -04:00
Vinicius Fortuna
291e105664 Remove log messages 2020-05-08 15:16:54 -04:00
Vinicius Fortuna
7da280c6b9 Add share dialog 2020-05-08 15:02:57 -04:00
Vinicius Fortuna
db76df98ec Fix survey 2020-05-08 14:56:18 -04:00
Vinicius Fortuna
d401dc5c49 Add l10n messages 2020-05-08 14:06:50 -04:00
Vinicius Fortuna
48756c96ba Create gallery app 2020-05-07 19:19:46 -04:00
Vinicius Fortuna
b45de5704c Fix babel and cleanup 2020-05-07 16:50:06 -04:00
Vinicius Fortuna
817bb1a20a Add support for dev server 2020-05-07 12:50:34 -04:00
Vinicius Fortuna
aef4e9b446 Create loader 2020-05-06 02:50:42 -04:00
Vinicius Fortuna
83f58e34d4 Use html-tag for style modules 2020-05-01 20:15:35 -04:00
Vinicius Fortuna
c453034d85 Tweak outline-iconset 2020-05-01 19:45:07 -04:00
Vinicius Fortuna
2b49812eb0 Fix comment 2020-05-01 19:15:05 -04:00
Vinicius Fortuna
fb1504ebef Merge branch 'master' into fortuna-webpack-polymer 2020-05-01 19:13:43 -04:00
Vinicius Fortuna
b0e821b8c6 Remove FIXME comments 2020-05-01 18:59:22 -04:00
alalamav
8c6303cfa5
Use relative paths in webpack build (#634) 2020-04-30 15:46:33 -04:00
Vinicius Fortuna
092287be6c Merge branch 'master' into fortuna-webpack-polymer 2020-04-30 15:32:47 -04:00
Vinicius Fortuna
384ef3396a Add BUILD_ENV 2020-04-30 13:14:09 -04:00
Vinicius Fortuna
6692080207 Convert to Polymer 3 2020-04-30 01:16:56 -04:00
Vinicius Fortuna
c697bae92a Merge branch 'fortuna-sentry-fix' into fortuna-webpack 2020-04-30 00:18:30 -04:00
Vinicius Fortuna
479ec972d1 Fix getSentryApiUrl 2020-04-30 00:14:01 -04:00
Vinicius Fortuna
88d171d836 Merge branch 'fortuna-sentry' into fortuna-webpack 2020-04-28 18:23:47 -04:00
Vinicius Fortuna
d206df4f8c Fix sentry 2020-04-28 18:17:28 -04:00
Vinicius Fortuna
1af45d3914 Use webpack 2020-04-28 11:20:36 -04:00
Vinicius Fortuna
769024e224 Remove unused url import 2020-04-28 01:43:02 -04:00
Vinicius Fortuna
d813eba72d Remove unused ensureString 2020-04-28 01:42:28 -04:00
Vinicius Fortuna
8238d57346 Stop depending on Node code in the browser code 2020-04-28 01:36:53 -04:00
Vinicius Fortuna
492e59c7fc Move <app-root> back to index.html 2020-04-27 15:47:10 -04:00
Vinicius Fortuna
226bd24614 Rename languagetoUse 2020-04-27 15:08:18 -04:00
Vinicius Fortuna
ede3057adf Clean up language logic
- Creates a i18n library with tests
- Moves logic out of ui component (it shouldn't be there)
- Removes another entry point from index.html
2020-04-25 20:04:56 -04:00
alalamav
c0ba8c0a5f
Data limits surveys (#612) 2020-04-09 13:38:50 -04:00
alalamav
1acf43e8a6
Remove Sentry API keys (#608) 2020-04-08 10:26:24 -04:00
mpmcroy
7545cb3466
Display server Shadowbox version (#607)
* Display server Shadowbox version

* Address review comments
2020-04-02 11:13:48 -04:00
mpmcroy
8a359a4a88
Fixes data transfer UI to always display in base 10 (GB vs GiB) (#605)
* Fixes data transfer limit calculation

* Replaces bytes library with byte-size

* Addresses review comments

* Update licenses.txt

* Fix typo
2020-04-01 13:03:57 -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
ff788e9636 Update return type for getDefaultAccessKeyPort 2019-01-04 14:05:56 -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