Commit Graph

8121 Commits

Author SHA1 Message Date
Vitalii
d8ac6889ab web/satellite: introduce objects pinia module
Added new module to replace old Vuex module

Change-Id: Id0c4ff41c89137e15eb78c8666ad995e909a1695
2023-04-03 12:18:48 +00:00
Vitalii
2557b9a72f web/satellite: introduce files pinia module
Added new module to replace old Vuex module

Change-Id: I220769ca6c53e9d9b10f84eaf147f2904bbd5500
2023-04-03 11:13:10 +00:00
Michal Niewrzal
d8724d67f3 satellite/metainfo: add metric about download range type
Change-Id: I8f0d589664232f6cedbf3f41212872735e7f4ac5
2023-04-03 10:04:03 +00:00
Ivan Fraixedes
d17b41d027
satellite/admin: Fix response code for Get bucket
Get bucket was returning a "bad request" HTTP status code when the
bucket doesn't exists.

We have to return HTTP "Not found" status code.

Change-Id: If717d99276b02a1e59a9b71ebc909bd6d8d9390b
2023-04-03 10:22:22 +02:00
Sean Harvey
60444d145c
cmd/uplink: minor text fixes for "uplink share"
updates flag descriptions with correct punctuation, and fix errors
to not be capitalized.

Updates #5623

Change-Id: I9c6ef6d9888b2fb90b17db8775cc6abe803e102f
2023-04-03 11:34:35 +12:00
Moby von Briesen
4caa248c56 web/satellite: Slight update to pro account details in upgrade modal
Use more precise wording to describe limits/pricing for pro accounts.

https://github.com/storj/storj-private/issues/215

Change-Id: I505ea97684c76fc46c1a1e13dde22f33ba840ba7
2023-04-01 01:14:33 +00:00
Vitalii
124f340fa9 web/satellite: migrate EditProfileModal component to use SFC composition api
Change-Id: I9da0c63483ffa7f7a9ac9e4343d751564366ac34
2023-04-01 00:16:16 +00:00
Vitalii
634ae73466 web/satellite: migrate CreateProjectPromptModal component to use SFC composition api
Change-Id: I13dd344ef1b4467953522866ef4eaa94f37b1816
2023-03-31 23:27:18 +00:00
Cameron
c2cd213c4f satellite/console: purchase package grants credit
Instead of granting a coupon when purchasing a package, grant credit.
This changes paymentsconfig.PackagePlan to use credit amount rather than
coupon ID. Add additional check to see if a paid invoice with the
description exists. If so, don't create and pay another invoice.

Change-Id: I81df24984c519c773db5fc8e9070bd7797070ec2
2023-03-31 22:29:54 +00:00
Cameron
a2e3247471 satellite/payments: add Balances interface
Add and implement interface to manage customer balances. Adds ability to
add credit to a user's balance, list balance transactions, and get the
balance.

Change-Id: I7fd65d07868bb2b7489d1141a5e9049514d6984e
2023-03-31 21:51:37 +00:00
Vitalii
709dc63d42 web/satellite: introduce appStore pinia module
Added new module to replace old Vuex module

Change-Id: I82f2cb038ccefc24a622afcd808d3a492a2a87b4
2023-03-31 20:56:49 +00:00
Vitalii
b3969618f9 web/satellite: migrate CreateProjectModal to use SFC composition api
Change-Id: I8da5c3e034ebdd72c07a036d13a1e31a1d706cf6
2023-03-31 19:50:43 +00:00
Vitalii
0acb28181f web/satellite: migrate AddTokenCardNative component to use SFC composition api
Change-Id: I0d99308738dd051f35478c86da956010233dc413
2023-03-31 19:00:50 +00:00
Vitalii
34460ebd7a web/satellite: migrated PaymentMethods component to use SFC composition api
Change-Id: I498e178fc08c4af55fa1dfb7c262f87cd10c395e
2023-03-31 18:21:00 +00:00
Jeremy Wharton
e0bb410192 satellite/payments/stripecoinpayments: parallelize invoice methods
Invoicing-related payment service methods have been modified to send
Stripe API requests in parallel.

Additionally, randomness has been added to the Stripe backend wrapper's
exponential backoff strategy in order to reduce the effects of the
thundering herd problem, which arises when executing many simultaneous
API calls.

Resolves #5156

Change-Id: I568f933284f4229ef41c155377ca0cc33f0eb5a4
2023-03-31 17:14:22 +00:00
Cameron
21249e6c00 Revert "satellite/payments: add partnered field to coupon struct"
We are changing package plans to use credits instead of coupons.

This reverts commit 73ff35f160.

Change-Id: I1a5bc27a3a198e1aa09afbb06670dde776f66f36
2023-03-31 16:03:48 +00:00
Cameron
549732228d satellite/satellitedb: add package info to customers db
Add columns package_plan and purchased_package_at to stripe_customers
table and add methods to update and select these values from console
service and payments accounts.

Change-Id: I1e89909055cc3054bfb7baa33c9dca3dfdc7336e
2023-03-31 15:51:30 +00:00
Andrew Harding
f5e110f2aa satellite/satellitedb: support insert for many billing txs in one db tx
Implementing https://github.com/storj/storj/issues/5702 means adding a
bonus billing transaction for each storjscan transaction being recorded.
To do this idempotently, we need to the ability to for both the
storjscan and bonus transaction to be committed together.

This change updates the billing database to allow multiple billing
transactions to be inserted under the same database transaction.

Change-Id: I941864f47fc64d65aab076eec2e96fd04fcc7aac
2023-03-31 14:48:17 +00:00
Vitalii
c95f552b72 web/satellite: fix for object browser locked objects
This is a fix for locked objects count to not update after some action (upload, delete etc.)

Although the issue is still there if user deletes file, navigates outside object browser and navigates back to the same bucket.
In this case we would refetch objects count both from satellite API and our gateway.
So bucket tally wouldn't be triggered that fast and object browser would still show locked objects.
Anyway it's better than it is now.

Also reworked weird object browser initialization which triggered some routing error so this event would be displayed in hubspot as a UI error

Change-Id: I545ab925b135fe3ef2740d17aaece6d43b731c96
2023-03-31 13:53:37 +00:00
Vitalii
2966b70498 web/satellite: migrate EnableMFAModal component to use SFC composition api
Change-Id: I5b75ec6464cee73f39421a8d4ede95af9d5df984
2023-03-31 12:37:56 +00:00
Lizzy Thomson
d8a4ca62b8 satellite/accounting: update GetProjectSegmentLimit to fix bug
Update GetProjectSegmentLimit to reflect segment limit instead of
usage limit.

Fixes https://github.com/storj/storj/issues/5713

Change-Id: If4dfc5b45227595f3ae2b3ac7d267ea541fd748a
2023-03-31 11:47:21 +00:00
Vitalii
9d49145570 web/satellite: migrate AddCouponCodeModal to use SFC composition api
Change-Id: I9d1b938c391a3df778a64609685873260317cbd7
2023-03-31 11:06:50 +00:00
Moby von Briesen
277612f4ff satellite/console: Update onboarding logic
A row in the new `user_settings` table does not always exist for a user,
even if they have been around for a while.
Since `user_settings` is now what defines the state of a user's
onboarding flow, prior to this fix, even old users would receive the
onboarding flow again.
This change appropriately updates `user_settings` for users who already
have projects, and thus have already gone through the onboarding flow. A
brand new user will still be navigated to the beginning of onboarding.

Change-Id: Ie745d280f6b8094ec60c200c2dca8d018d51f7d1
2023-03-31 05:51:31 -04:00
Egon Elbre
a1e920bbdf cmd/tools/segment-verify: satisfy wastedassign linter
The assignemnt to `err = nil` is not used in the rest of the code,
however, this was a protective err = nil assignment.

Change-Id: Id70fb2a2e68b91e2481952d865334e603ca41188
2023-03-31 08:52:46 +00:00
Moby von Briesen
f3bf45aa56 web/satellite: Update exit paths for pricing plan modal
* There was one bug where all projects dashboard was enabled, and the
  actual path was not being passed to the router
* There was another bug where all projects dashboard was disabled, and
  the user was directed to the projects dashboard rather than the next
  step of the onboarding flow, meaning that upon refresh, the user would
  be prompted for package selection again

Change-Id: I388f04c3af9d03b84b4dd3af6de29e6b82b10531
2023-03-31 08:52:28 +00:00
Sean Harvey
33c3e3176f
cmd/uplink: add --tls flag to share command
adds an additional flag to return an additional TXT record that will
enable TLS on custom domains with Linksharing.

Closes #5623

Change-Id: I941616362d7dcd9aec20dfd10346e483021516a4
2023-03-31 20:30:22 +13:00
Vitalii
b44852bb02 web/satellite: migrate TokenTransactionItem component to use SFC composition api
Change-Id: Iab6b76ab852f13128f652b640f19b3a5b6cf9e29
2023-03-31 00:10:56 +00:00
Vitalii
cb947cc217 web/satellite: migrate AddTokenCard component to use SFC composition api
Change-Id: Ife383607c0874a2f9f022fe5174e5a5c4eda8969
2023-03-30 23:16:57 +00:00
Clement Sam
e5c43722dc storagenode/pieces: introduce FileWalker
FileWalker implements methods to walk over pieces in
in a storage directory.

This is just a refactor to separate filewalker functions
from pieces.Store. This is needed to simplify the work
to create a separate filewalker subprocess and reduce the
number of config flags passed to the subprocess.

You might want to check https://review.dev.storj.io/c/storj/storj/+/9773

Change-Id: I4e9567024e54fc7c0bb21a7c27182ef745839fff
2023-03-30 18:33:52 +00:00
Moby von Briesen
f8e8f3a4cc web/satellite: Implement coupon code billing UI enabled flag
This flag was previously implemented, but when we reworked the billing
UI, we forgot to re-implement it with the new screens.

This change fixes that.

Change-Id: Ifad2b82f1080928b72d7e572796fcf4287e5ed3f
2023-03-30 11:44:42 -04:00
Michal Niewrzal
dc9cbe36ae satellite/metabase: sort stats by creation time not number of entries
By accident query to get latest table stats was ordered by 'row_count'
column instead 'create'. We need latest stats so we need ordering by
creation time.

Change-Id: I9d0a0edda8bab59c3d96b7a15cd6502ed51633fc
2023-03-30 12:31:45 +00:00
Márton Elek
00420b5904 storagenode/piecestore: better monkit metric for download
Download is server from two goroutines:

 * one is waiting for the orders (and updates the actual limit)
 * other one sends the valuable bytes back to the client (in case the actual order is big enough)

These two tasks are syncrhonized with the help of a `sync2.NewThrottle()`

But all of these happens in the same method, therefore we have no idea how much time is spent on waiting for next orders
 (throttle can wait until we receive new orderlimit), and how much time is spent with actual work.

This patch moves the actual work (after sending routine is waked up) to a separated method to have better visibility and measure the actual work (read data + send it).

Change-Id: Ia5068c544560a53bc2fcea6cb6fce85cfacbd95b
2023-03-30 10:46:18 +00:00
Vitalii
bef60f879f web/satellite: introduce notifications pinia module
Add new module to replace old Vuex module

Change-Id: I4d12c0a13ef9768719a156eb0af543971e775939
2023-03-30 08:34:43 +00:00
Vitalii
7921add393 web/satellite: make pinia modules more independent
Make pinia modules not to depent on other pinia modules where possible.

Change-Id: I2bcc473936a3e294eed58fafd977d447c7feef91
2023-03-30 08:34:28 +00:00
Vitalii
1480b5b9a0 web/satellite: migrated AGName component to use SFC composition api
Change-Id: I3158a759db15922a3598cf7f5a519ca4df194f28
2023-03-30 08:33:46 +00:00
Vitalii
0da9430462 web/satellite: migrated PermissionsSelect component to use SFC composition api
Change-Id: I6c1701107d9bdcb75492efd0f7b5e54d1e79cd54
2023-03-29 21:36:17 +00:00
Vitalii
cd51044216 web/satellite: migrated UploadFile component to use SFC composition api
Change-Id: Ie5dd3edc9bf769d48b669db84e4264a885df83d3
2023-03-29 20:57:46 +00:00
Vitalii
102db3d010 web/satellite: migrated ProjectSelection component to use SFC composition api
Change-Id: I2f9f5e642dc7a5f23df71c79fae25c37048bd107
2023-03-29 20:04:20 +00:00
JT Olio
bd238819b6 go.mod: bump storj.io/drpc
this includes improved connection reset error handling

Change-Id: I211221493b5dd3f4b95d4db44bf022302352f050
2023-03-29 19:27:57 +00:00
Lizzy Thomson
9b3eefbd51 web/satellite: update hard coded free account limits to be dynamic
Fixes https://github.com/storj/storj-private/issues/195

Change-Id: I8b0d565eecca979e5bf092cade2891c2719b4329
2023-03-29 18:39:53 +00:00
Vitalii
a6323c59c2 web/satellite: migrated DurationSelection component to use SFC composition api
Change-Id: I3d67b9f7eaa108c60be45279c847d7e75e70e7e5
2023-03-29 17:47:15 +00:00
Vitalii
5d94ea4b78 web/satellite: migrated DurationPicker component to use SFC composition api
Change-Id: Ic77c1a15f65bc5054541de9563d01b1ed2c4fd72
2023-03-29 17:11:48 +00:00
Lizzy Thomson
63533c628b Satellite/console: Reduce free account limits
Update free account limits to segments(10k), storage(25gb), and
bandwidth(25gb)

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

Change-Id: I59250fc9f1eebc812bc85ecfbc2924f8c4369064
2023-03-29 15:24:24 +00:00
Michal Niewrzal
54b6e1614a satellite/metainfo: drop MultipleVersions config flag
This flag was in general one time switch to enable versions internally.
New we can remove it as it makes code more complex.

Change-Id: I740b6e8fae80d5fac51d9425793b02678357490e
2023-03-29 13:45:09 +00:00
paul cannon
ae5947327b satellite/accounting: Use metabase.AliasPiece with tally observer
We want to eliminate usages of LoopSegmentEntry.Pieces, because it is
costing a lot of cpu time to look up node IDs with every piece of every
segment we read.

In this change, we are eliminating use of LoopSegmentEntry.Pieces in the
node tally observer (both the ranged loop and segments loop variants).
It is not necessary to have a fully resolved nodeID until it is time to
store totals in the database. We can use NodeAliases as the map key
instead, and resolve NodeIDs just before storing totals.

Refs: https://github.com/storj/storj/issues/5622
Change-Id: Iec12aa393072436d7c22cc5a4ae1b63966cbcc18
2023-03-29 12:24:05 +00:00
Wilfred Asomani
e750f6f145 satellite/accountfreeze: change price threshold default
The default price threshold has been changed to 10000 cents. The help
text has also been modified to clarify that this value is in cents.

Change-Id: I3b605056c860a3afef7202950180bc8b863fe16a
2023-03-28 16:05:08 +00:00
Wilfred Asomani
fd1a94a84d satellite/accountfreeze: add debug logs
A debug log has been added to the autofreeze chore to show numbers of
invoices, users involved, users frozen, users warned and users bypassed
due to larger than config amount owed.

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

Change-Id: I4e628606fe234b6d239b76167a4781ca9e276308
2023-03-28 15:30:31 +00:00
Wilfred Asomani
ed70a03844 satellite/{console,db,analytics}: better warning handling
This handles cases where a user is warned and triggers payment for their
account. Previously, only a frozen account will trigger this payment,
and will be unfrozen on successful payment. Now, accounts in warning
state trigger payments and are removed from that state on successful payment.

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

Change-Id: Icc2107f5d256657d176d8b0dd0a43a470eb01277
2023-03-28 14:30:38 +00:00
Vitalii
d407408f24 web/satellite: migrated BucketsSelection component to use SFC composition api
Change-Id: Ie7ec220ac021fe11b640f61aad0c648f53cc3071
2023-03-28 14:35:48 +03:00
Vitalii
174308f60e web/satellite: migrated BucketsDropdown component to use SFC composition api
Change-Id: I58f1c9b160a8b90912dd7288259073dcbc5b2954
2023-03-28 10:03:41 +00:00