Commit Graph

77 Commits

Author SHA1 Message Date
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
NickolaiYurchenko
1230cde317 web/multinode: disk space usage and stat charts
Change-Id: Ib2b1d6f2b78d57bd43ae1152921d98a1d6c31243
2021-07-01 14:21:08 +00:00
NickolaiYurchenko
8686267e06 web/multinode: storage api, service and store module created
Change-Id: Ieb3dbcd9c967388315f5203598ff56a848477476
2021-07-01 12:32:09 +00:00
NickolaiYurchenko
55754df110 web/multinode: bandwidth related unit tests
Change-Id: If8da681e15db9e6f9f333bacdeab7670c48f2dfb
2021-07-01 12:32:04 +00:00
NickolaiYurchenko
cece8e4110 web/multinode: bandwidth charts added
bandwidth/egress/ingress chart and api/vuex connection

Change-Id: I16ba2bb82854a1d198384b3b8e6ffc4e58d8bb91
2021-07-01 12:31:58 +00:00
NickolaiYurchenko
cc5de4288b web/multinode: bandwidth api and store module created
Change-Id: I5a280f836d73ca9c34bab7dd5371bf1dce5a3974
2021-07-01 12:31:53 +00:00
crawter
a89e20895d web/multinode/operator: wallets features type changed to support null
Change-Id: I4e5a3aed9488747d10cd795e81d52e689fd08be0
2021-06-15 19:54:23 +03:00
Yaroslav Vorobiov
b23a782c6b multinode/console: held amount summary use satellite address
Change-Id: I7816a263579831eaaeb808e3cdd49b3b7b0a07b8
2021-06-10 15:55:43 +03:00
crawter
962f81433f web/multinode: operator entity extended with nodeID and undistributed amount
Change-Id: I683e53bc4c669728caae3521597a5fd2d6372921
2021-06-09 08:51:15 +00:00
crawter
be16f4b68b web/multinode: wallets logic
Change-Id: Ib9b469cb968978acb784252022e94d619f88e7a0
2021-06-08 16:39:11 +00:00