Commit Graph

7808 Commits

Author SHA1 Message Date
Wilfred Asomani
b1d4763086 satellite/{web,payments}: show STORJ balance
This change adds a card to the billing overview page, which shows the
user's token balance from coinpayments.

Issue: https://github.com/storj/storj-private/issues/151

Change-Id: I11e295b48791b32b745cb7a11c5b4aad6b56618e
2023-03-10 13:01:15 +00:00
paul cannon
b98a09fa58 satellite/geoip: skip test on macOS
This is how we deal with the other tests that expect all 127.* addresses
to work locally.

Change-Id: Id62bb07a56044dfadcc87089f0f13684eeb07f3c
2023-03-10 03:08:17 +00:00
paul cannon
fd6ce6b9a5 scripts/tests: fix test-sim-rolling-upgrade.sh
This test involves a satellite with dev defaults (DistinctIP=no) being
upgraded past commit 2522ff09b6, which
means we need to run the dev-defaults-satellite-upgrade migration SQL
to avoid getting DistinctIP=yes behavior (which breaks the tests).

Change-Id: I29fb596d1ffa568dad635d98cfe9abacd3aaa48f
2023-03-09 23:35:36 +00:00
Jeremy Wharton
1d1739e187 web/satellite: update styling of pricing plan components
The styling of pricing plan components has been updated to match our
designs.

References storj/storj-private#172

Change-Id: I61a2536267c41292abd9e4860b5bd45fafb61408
2023-03-09 22:03:46 +00:00
Wilfred Asomani
31e386c607 web/satellite: add new settings page
This change implements a new account settings page for the all projects
dashboard.

Issue: https://github.com/storj/storj/issues/5514

Change-Id: Id777cd5c1efe3fa4b40234771ae2a99cc5cb9dd3
2023-03-09 20:30:49 +00:00
Wilfred Asomani
52abe8ddb4 web/satellite: add all projects onboarding
This change implements onboarding for the all projects dashboard.

Issue: https://github.com/storj/storj/issues/5514

Change-Id: If8a48c21e6df264c84d362d17bf01d770d9ca768
2023-03-09 19:55:34 +00:00
Vitalii
d6b661a412 web/satellite: fix for long names in tables
Added truncating for long names in access grant and project member tables.
Added title to all table items so that full value is displayed on hover.

Issue:
https://github.com/storj/storj/issues/5130

Change-Id: I7f81d88c8ff4db606bdfeb15406ba3ee3fcec968
2023-03-09 17:58:14 +00:00
Antonio Franco (He/Him)
3613bfe1af
testsuite/playwright: copys files to storj repo (#5648)
* testsuite/playwright: copys files to storj repo
This PR copies all the playwright ui tests to the storj repository.

* CI: Jenkinsfile.ui
Jenkinsfile.ui builds all necessary items for running storj binaries, installs all items for playwright ui tests and executes the test. Note that we aren't running regular unit tests and we are not linting the code as this is occuring in the public instance. Furthermore, we still need to implement the starting of storj services as well as typescript linters for the playwright tests.

* testsuite: playwright ui tests
This PR copies all playwright ui tests files from the qa repo.

* testsuite: playwright ui tests
This PR copies all playwright ui tests files from the qa repo.
2023-03-09 11:59:45 -05:00
Michal Niewrzal
0c177ef91f satellite: cleanup orders dependencies
Only API peer needs access to order DB (and rollups cache) because it's
only place where we are creating orders for PUT and GET operations. For
other peers like auditor and repairer we can set noop implementation to
reduce number of dependencies needed for them.

Change-Id: Ic32d1879f0b97ffc4516f401898e31e95ae892e4
2023-03-09 13:34:21 +00:00
Márton Elek
ffaf15a3b0 satellite/overlay: remove unused mail service from overlay
It was surprising that `satellite auditor` complained about SMTP mail settings, even if it's not supposed to sending any mail.

Looks like we can remove the mail service dependency, as it's not a hard requirement for overlay.Service.

Change-Id: I29a52eeff3f967ddb2d74a09458dc0ee2f051bd7
2023-03-09 12:17:35 +00:00
Márton Elek
788f5fde01 satellite/peer: better error handling for SMTP parameters
I tried to configure a satellite service and got this error:

```
DEBUG   process/exec_conf.go:408        Unrecoverable error     {"error": "missing port in address"}
```

It took some time to realize that I forgot to set the SMTPServerAddress.

This patch makes it easier to detect similar problem (detailed error message), and makes SMTP parameters optional if no real mail sending is used (simulated or nomail)

Change-Id: I32535a7c8d6529e19e4d919806f42ba430d074a5
2023-03-09 11:29:07 +00:00
Stefan Benten
4788b9ea3b
scripts/draft-release.sh: update to python3
Change-Id: Iabdf9283f77c1a8518f2373d39157d10e1daab6d
2023-03-09 10:59:31 +01:00
paul cannon
2522ff09b6 satellite/overlay: configurable meaning of last_net
Up to now, we have been implementing the DistinctIP preference with code
in two places:

 1. On check-in, the last_net is determined by taking the /24 or /64
    (in ResolveIPAndNetwork()) and we store it with the node record.
 2. On node selection, a preference parameter defines whether to return
    results that are distinct on last_net.

It can be observed that we have never yet had the need to switch from
DistinctIP to !DistinctIP, or from !DistinctIP to DistinctIP, on the
same satellite, and we will probably never need to do so in an automated
way. It can also be observed that this arrangement makes tests more
complicated, because we often have to arrange for test nodes to have IP
addresses in different /24 networks (a particular pain on macOS).

Those two considerations, plus some pending work on the repair framework
that will make repair take last_net into consideration, motivate this
change.

With this change, in the #2 place, we will _always_ return results that
are distinct on last_net. We implement the DistinctIP preference, then,
by making the #1 place (ResolveIPAndNetwork()) more flexible. When
DistinctIP is enabled, last_net will be calculated as it was before. But
when DistinctIP is _off_, last_net can be the same as address (IP and
port). That will effectively implement !DistinctIP because every
record will have a distinct last_net already.

As a side effect, this flexibility will allow us to change the rules
about last_net construction arbitrarily. We can do tests where last_net
is set to the source IP, or to a /30 prefix, or a /16 prefix, etc., and
be able to exercise the production logic without requiring a virtual
network bridge.

This change should be safe to make without any migration code, because
all known production satellite deployments use DistinctIP, and the
associated last_net values will not change for them. They will only
change for satellites with !DistinctIP, which are mostly test
deployments that can be recreated trivially. For those satellites which
are both permanent and !DistinctIP, node selection will suddenly start
acting as though DistinctIP is enabled, until the operator runs a single
SQL update "UPDATE nodes SET last_net = last_ip_port". That can be done
either before or after deploying software with this change.

I also assert that this will not hurt performance for production
deployments. It's true that adding the distinct requirement to node
selection makes things a little slower, but the distinct requirement is
already present for all production deployments, and they will see no
change.

Refs: https://github.com/storj/storj/issues/5391
Change-Id: I0e7e92498c3da768df5b4d5fb213dcd2d4862924
2023-03-09 02:20:12 +00:00
Michal Niewrzal
67ad792d1a satellite/rangedloop: migrate segments verification from segment loop
Segments loop have build-in sanity check to verify if number of segments
processed by loop is roughly fine. We want to have the same verification
for ranged loop.

https://github.com/storj/storj/issues/5544

Change-Id: Ia19edc0fb4aa8dc45993498a8e6a4eb5928485e9
2023-03-08 17:00:11 +00:00
Cameron
f4ea730e69 satellite/console: use custom session duration
If the session_minutes column in user_settings is not null, use this
value to determine the expiration when creating or refreshing a session.

github issue: https://github.com/storj/storj/issues/5487

Change-Id: I1f777f7ffcd4018b0c40f0b26c8a50de85a31909
2023-03-08 14:55:02 +00:00
Erik van Velzen
464ceb1c0e satellite/gc: improve comments
Change-Id: I9e71c9bee3447f78365ba1593e4a4ef55b28356f
2023-03-08 13:15:13 +00:00
Sembeth
0408997e6c
cmd/multinode: Removes dependency on deprecated identity-dir flag, code and documentation. (#5646)
* The Multinode Dashboard no longer requires the identity files.

* Removed deprecated code that used the identity-dir.
2023-03-08 13:56:15 +01:00
Vitalii
e3cbbd4d80 web/satellite: migrated StorageChart to use composition API
Migrated component to use SFC composition API.

Change-Id: I7328b76ce6e3b038877232e2c76814d7583bbf66
2023-03-07 15:20:36 +00:00
Vitalii
28f08405f4 web/satellite: migrate BandwidthChart to use composition API
Migrated component to use SFC composition API.

Change-Id: I987781a2b6741a903800a21964bdfd992f4221b5
2023-03-07 15:19:43 +00:00
Vitalii
0b58657914 web/satellite: migrated dashboard InfoContainer component to use composition API
Migrated component to use SFC composition API.

Change-Id: Ibc985f8e81d941dd83fecd065873be1610f40767
2023-03-07 15:18:51 +00:00
Vitalii
43da70556a web/satellite: migrated DateRangeSelection component to use composition API
Migrated component to use SFC composition API.

Change-Id: I224fffc827f8be53aa8e0389334224b367b7ee71
2023-03-07 15:17:58 +00:00
Vitalii
52f142e3fc web/satellite: resolve some build warnings
Resolved some of the build warnings which are code-related.

Change-Id: I05f7981eacbaa61280ac111046fcc78025560a34
2023-03-07 17:13:42 +02:00
Vitalii
a01d47b3ed satellite:{console, web}: remove old project dashboard
Removed old project dashboard along with a feature flag.

Change-Id: I9292b19caf101a84042d8c3006c27bc44db8d6b5
2023-03-07 13:34:59 +02:00
Vitalii
b6721633f1 satellite/payments: return public project ID for project charges
We should return public project id instead of regular one when quering project charges so that it is consistent on a client side.
This is a fix for an issue with displaying project name on a Billing screen.

Issue:
https://github.com/storj/storj/issues/5641

Change-Id: Ic0c544dbe7369aa88f3a7c97a2f5de5bc854e1fd
2023-03-06 22:50:21 +00:00
JT Olio
d0408ee89b cmd/uplink: stop using transport.SetConnector
quic is still configurable based on the quic rollout
environment variables in storj.io/common. this stops
using a method removed in:
https://review.dev.storj.io/c/storj/uplink/+/9815

Change-Id: Ibfe28cfb19e5672630970b9e2c8c6ac0c98d4822
2023-03-06 21:48:26 +00:00
JT Olio
5b0cada4b3 repairer: monitor non-nil limit amount
Change-Id: I1a7b7a4a6716783449704cd8a7823090109a14de
2023-03-06 20:39:45 +00:00
Vitalii
f834622a01 web: remove sanitizing dependency and restrict v-html
We decided to remove sanitizing dependency and restrict v-html with 2 exceptions for web/satellite (we control the content in those cases)

Issue:
https://github.com/storj/storj-private/issues/148

Change-Id: Ic6b2e894d20e7f0553f759ede51845a10831e890
2023-03-06 19:58:27 +00:00
Vitalii
d843666606 web/satellite: divide file browser error tracking into 2 separate events
Divide single error event into 2 separate events.
Those are list objects event and change route event.

Issue:
https://github.com/storj/storj-private/issues/164

Change-Id: I3efe0f2d14fceb5841b6d0ff6db685540351281a
2023-03-06 18:53:25 +00:00
JT Olio
ade808375c storagenode/piecestore: be more flexible with bandwidth usage max
this is to prepare for https://review.dev.storj.io/c/storj/uplink/+/9814

Change-Id: Ib74fd63a352a0ae4cc1f8b66fb70df649844c33a
2023-03-06 18:00:17 +00:00
Vitalii
41efebeebd web/satellite: migrated AddCouponCodeInput to use SFC composition api
Migrated component to use composition API.

Change-Id: Ia39ef0f7c2226821f055856db1adcccc8b70e7e6
2023-03-06 16:57:51 +00:00
Michal Niewrzal
bc8f8f62b5 satellite/orders: cleanup after altering primary key
We changed primary key for bucket_bandwidth_rollups table. Now we
need to do some cleanup in places like structs, sorting methods or SQL
queries.

Change-Id: Ida4f874f161356df193379a53507602e04db1668
2023-03-06 16:03:11 +00:00
Vitalii
45a47f654e web/satellite: disable buckets checkbox if all buckets are selected
Disable buckets checkbox if all buckets option is selected for new access grant flow.
This would disallow unchecking all buckets checkbox if none of the specific buckets is selected.

Change-Id: I81a9f03d49d2cde862fd0afbc2fde0abeb0b31ce
2023-03-06 14:45:55 +02:00
Márton Elek
6737d427e4
cmd/uplink: better usability for date specification
I use `uplink share` command but I always fail to set the --not-before parameter.

 * Usually I try +2d when I see in the help that +2h is possible --> fail
 * When it fails, I try to set explicit date, like 2012-12-23 --> fail

This patch makes it possible to use:

 * day duration (like +3d)
 * shorter date definition (like `2023-12-12` or `2023-12-12T12:40`)

Change-Id: I2243b36f59c8929eb0473c4bb4fed19220890c71
2023-03-06 13:07:27 +01:00
Egon Elbre
63fa386b0a satellite/payments/stripecoinpayments: avoid mock cross-talk in tests
The tests were using global variables for keeping the mock state, which
was indexed by the satellite ID. However, the satellite ID-s are
deterministic and it's possible for two tests end up using the same
mocks.

Instead make the mock creation not depend on the satellite ID and
instead require it being configured via paymentsconfig.

This fixes TestAutoFreezeChore failure.

Change-Id: I531d3550a934fbb36cff2973be96fd43b7edc44a
2023-03-03 20:20:48 +02:00
Michal Niewrzal
d54ccfa92b satellite/satellitedb: change bucket_bandwidth_rollups primary key
In the past we set incorrect primary key for bucket_bandwidth_rollups
table and bucket name was first column of key instead of project id.
This change fixes this problem.

We will alter primary key manually for production satellites. That's
why migration code is checking if change was already applied.

https://github.com/storj/storj/issues/5332

Change-Id: I7dd555eb0c2f6fda1c90eaed08fa847b7f273bc7
2023-03-03 16:25:35 +00:00
Moby von Briesen
e9628c133d satellite/console: Add comments to generated api
Clarify that this functionality is not currently implemented within the
Satellite UI

Change-Id: I94096ab9b4d8f00195b55f5e875d76930de848e4
2023-03-03 09:29:11 -05:00
Michal Niewrzal
5a9577bb43 satellite/metabase/rangedloop: test loop boundaries
Fixes https://github.com/storj/storj/issues/5620

Change-Id: Ibf23e8866c1a8a8e78281c3d07e81ffc7db30fcf
2023-03-03 09:56:01 +00:00
Jeremy Wharton
662e916194 web/satellite: skip pricing plan step if no available packages
The pricing plan selection step of the onboarding tour is skipped if
there are no pricing packages configured for a user's partner.

Change-Id: I14bacbfaa10acf4cb97db04724749111a73e3928
2023-03-03 09:09:15 +00:00
Wilfred Asomani
0676a4ca89 web/satellite: use correct table icons
This change uses the corresponding icons for different types of files
in the file browser.

Issue: https://github.com/storj/storj/issues/5477

Change-Id: I8b10ac4ece03563a465c7823a1e7482244a324b9
2023-03-03 08:14:51 +00:00
Jeremy Wharton
3b37a23d7b satellite/console/consoleweb: add pricing package availability endpoint
An endpoint has been added that returns whether a pricing package is
available for a user to purchase. This will be used to conditionally
skip the pricing plan selection step of the onboarding tour.

Change-Id: I8c02a4e474e5f0f80778453b7daf674c8da64306
2023-03-02 23:51:09 +00:00
Cameron
fb471d7d8d satellite/console: delete password recovery token when password is changed
If a user changes password while a password recovery token exists,
delete the token so the reset password email doesn't work.

github issue: https://github.com/storj/storj-private/issues/149

Change-Id: Ibb0c13076e182c46501c1d7ac92d3fecc7d5ee58
2023-03-02 22:47:55 +00:00
Wilfred Asomani
172fcc4f66 web/satellite: add project ownership tag
This change adds a tag to the project dashboard indicating if the user
is the owner of the project.
It also adds the project limit notification to the all projects dashboard

Issue: https://github.com/storj/storj/issues/5485

Change-Id: Ie2f446966459c160408fb5614ac1701179092cd5
2023-03-02 20:55:50 +00:00
Wilfred Asomani
418a0639cd web/satellite: fix project item alignment
The content alignment of project items that have descriptions and those
that don't differ. This change fixes that. It also adds some text style
changes.

Change-Id: Ic7bb348bdafee463a00faec7faa7af2d814416f8
2023-03-02 12:37:05 +00:00
Lizzy Thomson
54f0f47839 satellite/satellitedb: add passphrase_prompt column to user_settings
Add passphrase_prompt column to user_settings table to store a boolean
whether a user would like to be prompted to enter a passphrase when
entering a new project.

Issue https://github.com/storj/storj/issues/5613

Change-Id: I5d086df277aff458453343c7c38a379e7b1b8bf9
2023-03-01 14:53:18 -07:00
Michal Niewrzal
b46c0fb78f satellite/orders: don't cancel flushing bandwidth orders
Earlier we made a change to not cancel flushing orders when flushing
was triggered by orders endpoint method but we missed a case
where it can be also triggered (and canceled) by metainfo endpoints
method. This change moves ignoring context cancellation deeper.

Change-Id: Id43176f552efc3167345783f73aab885411ac247
2023-03-01 17:10:05 +00:00
Vitalii
eab83ee7fa web/satellite: fix locked files number if there are folders
Right now there is a problem that we list objects inside object browser using Delimiter param which helps us to define if bucket includes folders.
If we set Delimiter to '/' then in response we get a list of plain objects called Contents and another list called CommonPrefixes which includes 'folder' keys.
So this approach makes it impossible to know the exact object count because we don't know a number of objects behind folder keys.
So to correctly calculate objects count we have to make another list request without Delimeter param.
By doing this we get a single Contents list which includes plain objects and objects containing folder Prefix.

Example of Contents response without Delimiter param:
['object', 'object1', 'folder/object2', 'folder1/object3']

Change-Id: Id23f26bed369d2063bdbae96e7d915168c6c9bdd
2023-03-01 18:02:04 +02:00
Egon Elbre
71e42ac2a6 storagnode/storagenodedb: fix database queries
Change-Id: Ic5036c30aed7f68b9c28d6190650028461503465
2023-03-01 15:57:08 +02:00
Wilfred Asomani
faeea88265 satellite/{db,analytics,payments}: add chore for auto account freeze
This change adds a new chore that will check for failed invoices and
potentially freeze corresponding accounts.
It makes slight modifications to stripemock.go and invoices.go (adding
stripe CustomerID to the Invoice struct).

Issue: https://github.com/storj/storj-private/issues/140

Change-Id: I161f4037881222003bd231559c75f43360509894
2023-03-01 09:31:27 +00:00
Jeremy Wharton
31ec4fae9e web/satellite: add pricing plan selection to onboarding tour
A pricing plan selection step for users with a recognized partner has
been added to the beginning of the onboarding tour. Once visited, users
have the option of purchasing the pricing plan associated with their
partner or proceeding as a paid or free tier user.

Resolves storj-private#118
Resolves storj-private#126

Change-Id: I3b423194d96deaf87cf9807a766bf4d04fbcf86d
2023-02-28 20:49:59 -06:00
Vitalii
cd192164d2 web/satellite: confirm details step for new access grant flow
Added extra step for new access grant flow where user can confirm all selected caveats (except passphrase).

Change-Id: I9ac603d588016f30a95d4b578b3752e256a496da
2023-02-28 23:14:29 +00:00