Commit Graph

86 Commits

Author SHA1 Message Date
Lizzy Thomson
87f2da92b1 web/satellite: replace instances of bandwidth and download to egress
Improve consistency of UI to use the term egress instead of bandwidth
or download

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

Change-Id: I898ab5d55e5ad8a2d2dd0420c8496d57bc2ecb61
2023-05-31 09:18:58 -06:00
Clement Sam
8a206f0aee web/multinode: fix wrong undistributed payout amount
Resolves https://github.com/storj/storj/issues/5849

Change-Id: I074f6ca9f9ac1e8ffa62649188a6059d9bcd4c25
2023-05-04 10:36:10 +00:00
Clement Sam
162af1e836 web/multinode: fix bandwidth graph disappearing on state change
Resolves https://github.com/storj/storj/issues/5847

Change-Id: I6731e7a39cd3ffedaff76b307c141a9e94d9b71f
2023-05-04 10:36:10 +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
430b9646dc web/{satellite, storagenode, multinode}: more linter fixes
Added rule to restrict trailing white spaces.
Added rule to always use '===' instead of '=='.
Added rule to have correct spacing around commas.
Added rule to have spaces around '=>'.
Added rule to not have spaces in parentheses.
Added rule to have space before blocks '{}'.

Change-Id: Ibdbd204d591f0356e0745d89672e0e0579b59ce1
2023-02-27 12:37:32 +00:00
Clement Sam
7461ffe148 {storagenode,web/multinode}: fix storage usage db/cache retrieval queries
The query changes we did while fixing the usage graph led to wrong
payout calculations directly linked to disk space.

This change:

- avoids converting from Bh to B directly in the query
- returns the at_rest_total in the original bytes*hour value
- returns at_rest_total_bytes as the calculated disk spaced used in bytes
- uses the at_rest_total_bytes only for the disk space graph
- return summary_bytes as the average disk space used within the specified date
- updates the disk space graph header to "average disk space used this month"

The total disk used in the month is also displayed in B not B*day

Resolves https://github.com/storj/storj/issues/5355

Change-Id: I2cfefb0fe711f9c59de2adb547c4ab50b05c7cbb
2022-12-09 11:07:33 +00:00
Vitalii
a342edd1c2 web/multinode: fixed linter
Fixed web linter

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

Change-Id: Ibc0b8e9f241e77e833645d9fa114bf5742c9f81c
2022-11-04 19:06:21 +00:00
Clement Sam
d625eb85fd storagenode: use bytes instead of bytes*hour unit for used space graph
Closes https://github.com/storj/storj/issues/5146

Change-Id: I1b135da81a68193b5b50c761088d79471ca3a2fe
2022-10-28 18:42:45 +00:00
Egon Elbre
a8edeb7814 web: create valid go.mod stubs
Some tools like check-downgrades doesn't like invalid go.mod files.

Change-Id: I5a773e98f821adcbaa373a474d9420ba7447f5f7
2022-09-26 17:11:10 +03:00
Wilfred Asomani
5572a79a4a web/{storagenode,multinode}: Upgrade to Vue 2.7
2.7 natively supports the Composition API, which makes transitioning to
Vue 3 easier to do step-by-step.

see: https://github.com/storj/storj/issues/5145

Change-Id: I34e13b4e4c07176f73a89ef00e3dcd6767694554
2022-09-21 07:50:24 +00:00
Márton Elek
96b88e286e build: fix conditional run of web builds
Jenkins doesn't do a very good job with identifying what has been changed.

While it has a syntax to defined patterns, it compares the current build with the previous build (in case of git-verify it can be a totally different branch) instead of checking the HEAD commit.

This patch introduces shell scripts to do this better:
 * It doesn't depend on Jenkins any more
 * It can be executed locally
 * It can detect web changes properly (see the relation change as an example).

Change-Id: I9d37775e3818c08c4aa96ffb78f84d57f28a2c95
2022-08-11 14:34:44 +00:00
Márton Elek
bed2af3e87 web: use fixed version from eslint-storj
eslint-plugin-storj is uploaded to the main npm registry.

While we have no clear proof that it causes the random freeze of npm install, it can be fater anyway as fixed version can be cached safely.

Change-Id: Ie74d93c7c4863e46121a9ab6c4e6b787fa3899b3
2022-08-03 12:32:01 +00:00
Egon Elbre
15dc797efd web/{multinode,satellite,storagenode}: revert go.mod
Adding go.mod into node_modules is not sufficient, because npm install
wipes them quite often out. Similarly, when running npm install locally
it will remove it, causing the git state to be dirty.

Rather than having them committed, add them after running npm install.

Change-Id: Iaf21a9c6e198dc31fe50345ec5dee85b44617176
2022-07-08 19:51:51 +03:00
Egon Elbre
97e6e5a6a3 build: improve npm build
Add go.mod to node_modules folder, that way Go compiler doesn't
need to scan the node_module directories for any Go code.

Change-Id: I747909416490c847d6b4bfa3438fea66660fcd53
2022-07-01 10:51:53 +00:00
Jeremy Wharton
4e0acba9ba web/{multinode,satellite,storagenode}: Fix SVG styling
Our SVG loader was recently reworked so that snapshots of UI tests
are smaller, but this broke some SVG styles because SVG paths no longer
contain a scoped CSS attribute. This change adds deep selectors where
appropriate to repair the broken styles.

A scoped CSS attribute is added by Vue Loader to elements of components
with scoped styles to identify which component the element belongs to
and restrict CSS rules accordingly. Paths within imported SVGs no longer
contain this type of attribute, so the deep selector must be used to
style the SVG as if it were a child component.

Change-Id: If4beb903fa3b40aa208efa549b8fe23ccf2a547b
2022-06-08 21:54:59 +00:00
Egon Elbre
0ba454da55 web/: bump eslint dependencies
Change-Id: Icf7a48f732c73b4b954de05e0bb9955ad4d9a609
2022-05-05 18:35:31 +00:00
Egon Elbre
ff64e9ffb3 web/{multinode,storagenode,satellite}: update stylelint
Also reset package-lock.json files to workaround issue
of npm auto-updating storj eslint plugin dependency to ssh.

Change-Id: Iaba102d713dc596d5814bdc4cc54c9b911398d64
2022-05-05 15:47:44 +03:00
Egon Elbre
37ad60b89b web/{multinode,storagenode}: fix callback default props
The default property for callbacks needs to be a func that returns
the appropriate callback.

Change-Id: Ia36222e600db41b3ddc79a25686ae998d1daf221
2022-05-05 14:33:52 +03:00
Óscar de Arriba
bbe7c30936
web/multinode: fix My Nodes in multinode dashboard menu
It is currently spelled as `MyNodes` whereas it should be `My Nodes`.
2022-05-05 14:23:46 +03:00
Egon Elbre
37c18bf790 web/multinode: components must not have constructor
Per https://class-component.vuejs.org/guide/caveats.html we always
must use lifecycle hooks intead of constructor. Otherwise some
of the props might not be initialized.

Change-Id: Ic6242cae61cd0775c3b0295850c267ee875cb0e0
2022-05-02 09:06:36 +00:00
Egon Elbre
e10eabe30b web/storagenode: update dependencies
Also pin all web/multinode dependencies, which was missing from
the other change.

Change-Id: Id78749076af6d80e59949efd73c1e10f5b52589c
2022-04-07 07:50:22 +00:00
Egon Elbre
9d3c886f35 web/multinode: update dependencies
Change-Id: If575d8d9b481476203cc08c80d95d49273d45c29
2022-04-06 14:48:21 +00:00
Egon Elbre
1f1f777d06 satellite/admin/ui,web/{multinode,storagenode}: build without embedding
Embedded files significantly increase the binary size for linking.
Add a tag that allows disabling embedding the build npm code.

Change-Id: I9d1fd7376d1fa035965c33d259faaa6c4770dfe1
2022-03-29 13:18:04 +03:00
Marlon Spangenberg
7609bb9515
web/multinode: UI clarification to also add port (#4602)
Add "port" to the placeholder text because it accepts and addresses with port.
2022-03-14 18:49:11 +01:00
Egon Elbre
28c9403702 multinode,web/multinode: use go:embed for assets
Go can now directly embed files without relying on external tools.
This makes code use go:embed and avoid the external tooling.

go:embed requires files to be present in the embedded directory,
hence we need to add .keep to "dist" folder. We also add one to
public/.keep, such that it won't be deleted when building multinode.

Change-Id: I53ac3d5ac76e44f740d95221acf0da99fc256d42
2022-03-11 11:10:37 +02:00
Egon Elbre
5f39f20766 web/: add check for change to eslint import
Change-Id: Idf94c8e0c92d34e840db549e9e704eb3373762ac
2021-12-21 15:59:23 +00:00
nadimhq
a04b9ce372
testsuite/ui/multinode: adding more UI tests (#4301)
added tests for add node (check modal, cancel with separate buttons, add new node, add node that already exists) and more options (change display name, delete node(&cancel delete), copy node ID).
2021-12-20 14:30:48 -05:00
Khushal Shah
4535da96ee
web/multinode: removed conversion for Expectations (#4216)
What: 
Removed the `convertToCents` methods from the `Expectation` class, since the expectations were already in cents.

Why:
Fixes https://github.com/storj/storj/issues/4202
The `/expectations` endpoint already returns the amounts for `currentMonthEstimation` and `undistributed` in cents. So there is no need to convert them again to cents before the dollar conversion.

This change removes the `convertToCents` from the `Expectation` class.
2021-10-14 12:12:24 +00:00
Egon Elbre
bc6d8c06e3 web: optimize builds
Stylelint and eslint should be run separately and not part of the build
process.

Add a flag STORJ_DEBUG_BUNDLE_SIZE to debug compiled bundle size.

Reduce the number of chunks, it's far from ideal. Once we reduce the
images and browser size, we probably can drop chunking altogether.

Change-Id: I5bdf35ceb140e2c47a30df8d319606d05bfb30dd
2021-10-12 11:29:37 +00:00
Egon Elbre
bb55c30594 web: move eslint-storj to separate repo
For some reason our build process cannot handle relative path packages,
it's easier to create a new repository than to figure out,
why npm/docker etc. don't like it.

Change-Id: I94b7cb9611f453246b596f97114fe5c54d9a4008
2021-10-05 12:08:44 +00:00
Egon Elbre
84539f5798 web/: disallow warnings and errors in tests
* all: fix missing Vue.use(Router)
* multinode: having same state and module names is not allowed
* multinode: simplify store definition
* storagenode: add or fix any annotations

Change-Id: If8a63ae46049fc77fc6cd7a7ad912d4ad74d23ac
2021-09-07 13:43:26 +00:00
Egon Elbre
e5977ec849 web/: add custom linter for requiring @vue/component
Also ignore coverage folder for linting. I had to add a new
.stylelintignore file, because ignoreFiles property was not properly
working.

Change-Id: Iadd99b64eadd9c4103f750519263113ae8780ce1
2021-09-01 13:56:37 +00:00
Egon Elbre
7d5d555264 web/: disallow unregistered and unused components
The components used in templates should always be included in the
component declaration. Similarly, it shouldn't contain extra components
to avoid compiling in components that aren't needed.

Change-Id: I8c47ceffa8bcbcca223ac0f538f9e30d1e849829
2021-08-31 21:25:49 +03:00
Egon Elbre
0889866b17 web/: add @vue/component annotations
Some linters do not work properly without those annotations.
This was done with a batch replace.

Also needed to turn off two lint rules, they will be re-enabled in the
followup change. This way the batch change can be clearly separated from
manual modifications.

Change-Id: I891ae09689520edaba5588c1f2206766db2d2b90
2021-08-31 21:25:49 +03:00
Clement Sam
d0596c060d web/multinode: remove links to empty pages from navigation panel
The navigation panel on the multinode dashboard contains links to reputations and notifications pages which are empty and not ready yet.
This change removes the links to these empty pages from the navigation panel

Change-Id: I4cd386a143ace257904161d76402cd5f66daed7d
2021-08-30 08:46:04 +00:00
NickolaiYurchenko
1e02504be6 web/multinode: satellite, node, and usage request handling fix
Change-Id: Ica315fa9b78bd8e4d2d0db0f4f05f295b8991053
2021-08-20 21:33:26 +00:00
Egon Elbre
e43af5eb3d web/: enable more vue eslint rules
Fixes two things:

All button tags must have type field specified, otherwise it defaults to
submit, which is mostly not correct for our site.

Disallows unused refs.

Change-Id: I28bb44aab9c153f83fec16fc4023a453444c3926
2021-08-12 16:56:37 +03:00
Egon Elbre
5d8cbf0871 web/multinode: enable vue/recommended linting
Change-Id: Ice51a66d8c73596133e10aa969a6ca973441e46e
2021-08-11 11:10:51 +03:00
Egon Elbre
6b153192a3 web/satellite: fix lint issues
After migrating to eslint some errors were disabled to make it easier to
migrate.

This enables all the lint rules and treats all warnings as a build
failure. Similarly, CI won't automatically try to fix mistakes.

Change-Id: I80f808af026fc51bed90421b3b24737994a52094
2021-08-10 09:22:19 +00:00
Egon Elbre
a3e78491b9 web/multinode: fix lint issues
After migrating to eslint some errors were disabled to make it easier to
migrate.

This enables all the lint rules and treats all warnings as a build
failure. Similarly, CI won't automatically try to fix mistakes.

Change-Id: I6d5ef39d476a38dd9a6ab98e3fb94da4c3ab2e57
2021-08-04 17:00:00 +03:00
Egon Elbre
5e24060b25 web/multinode: switch to eslint
tslint has been deprecated so it's nice to switch to eslint.
Currently this uses a minimal eslint, to get things up and running.

Change-Id: If0ca6413b534b0aa15f6130a0a809e002d817356
2021-08-03 13:00:15 +03:00
Egon Elbre
df52e72fe5 web/multinode: fix package versions
Change-Id: I2848f2dbb6a9eb943e2d5d813fefd98b59d312f4
2021-08-02 19:07:50 +03:00
Egon Elbre
2118c89e9a web/multinode: bump node-sass, webpack and lockfile
Change-Id: I7007b2cdd57ab0120d8e039ae6571649a6e536ca
2021-07-30 07:47:55 +00:00
Egon Elbre
96291a3999 web/{satellite,storagenode}: bump lockfile version
Change-Id: Idc842efb3e49b633e317a0cfe3540f5a05cd81da
2021-07-30 07:47:19 +00:00
NickolaiYurchenko
8c052048b6 web/multinode: redirect fix before route enters dashboard
makink node/infos request if trying to reach protected routes

Change-Id: I34af0437437f8c670ac2a6eb61902fbc9114e540
2021-07-08 19:08:24 +03:00
NickolaiYurchenko
f8eebbc115 web/multinode: npm packages version audit & update
Change-Id: Ib0c2b5c50bdd6d1284ba732ead2b20a5b187f53e
2021-07-08 07:58:22 +00:00
crawter
0495703848 web/multinode: reputation domain and api created
Change-Id: I9bf92015f32cdec1ef15f8d4a02b94987de12462
2021-07-07 16:07:47 +00:00
Yaroslav Vorobiov
818f6c6ea6 multinode/console: add summary to storage usage API
Change-Id: Ia8a1e598d667f25461f73f1626da22113cb7caeb
2021-07-07 15:00:05 +03:00
NickolaiYurchenko
4d418c13c3 web/multinode: routes restriction in no node added
checks if there is a try to navigate to some of internal route and no nodes added so far.
redirects to add first node screen if so.

Change-Id: Ibde47c5b81ae33462afe00f2fd7a54e8b295933a
2021-07-06 15:52:46 +00:00
crawter
b8e6e5c6c8 web/multinode/nodes: status calculation placed to backend
Change-Id: Id3ee876155d64485e115458a079617ac2db5310a
2021-07-06 15:06:56 +00:00