Skip to content

Commit ef5f694

Browse files
VitaliiShpitalStorj Robot
authored andcommitted
web/storagenode: remove Vue filters
Issue: #7687 Change-Id: I3023ab6b03436c2fcd0eec09424651a2b0b04de1
1 parent ce86a8d commit ef5f694

15 files changed

+63
-150
lines changed

web/storagenode/package-lock.json

Lines changed: 0 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"pinia": "2.0.23",
1414
"vue": "2.7.10",
1515
"vue-class-component": "7.2.6",
16-
"vue-clipboard2": "0.3.3",
1716
"vue-property-decorator": "9.1.2",
1817
"vue-router": "3.5.3",
1918
"vuex": "3.6.2"
@@ -4218,16 +4217,6 @@
42184217
"url": "https://github.com/sponsors/sindresorhus"
42194218
}
42204219
},
4221-
"node_modules/clipboard": {
4222-
"version": "2.0.11",
4223-
"resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.11.tgz",
4224-
"integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==",
4225-
"dependencies": {
4226-
"good-listener": "^1.2.2",
4227-
"select": "^1.1.2",
4228-
"tiny-emitter": "^2.0.0"
4229-
}
4230-
},
42314220
"node_modules/clipboardy": {
42324221
"version": "2.3.0",
42334222
"resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-2.3.0.tgz",
@@ -5274,11 +5263,6 @@
52745263
"url": "https://github.com/sponsors/ljharb"
52755264
}
52765265
},
5277-
"node_modules/delegate": {
5278-
"version": "3.2.0",
5279-
"resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz",
5280-
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
5281-
},
52825266
"node_modules/depd": {
52835267
"version": "2.0.0",
52845268
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
@@ -7200,14 +7184,6 @@
72007184
"integrity": "sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==",
72017185
"dev": true
72027186
},
7203-
"node_modules/good-listener": {
7204-
"version": "1.2.2",
7205-
"resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz",
7206-
"integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==",
7207-
"dependencies": {
7208-
"delegate": "^3.1.2"
7209-
}
7210-
},
72117187
"node_modules/gopd": {
72127188
"version": "1.2.0",
72137189
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
@@ -11425,11 +11401,6 @@
1142511401
"url": "https://opencollective.com/webpack"
1142611402
}
1142711403
},
11428-
"node_modules/select": {
11429-
"version": "1.1.2",
11430-
"resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz",
11431-
"integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA=="
11432-
},
1143311404
"node_modules/select-hose": {
1143411405
"version": "2.0.0",
1143511406
"resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz",
@@ -12724,11 +12695,6 @@
1272412695
"integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==",
1272512696
"dev": true
1272612697
},
12727-
"node_modules/tiny-emitter": {
12728-
"version": "2.1.0",
12729-
"resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
12730-
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
12731-
},
1273212698
"node_modules/to-regex-range": {
1273312699
"version": "5.0.1",
1273412700
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
@@ -13209,14 +13175,6 @@
1320913175
"vue": "^2.0.0"
1321013176
}
1321113177
},
13212-
"node_modules/vue-clipboard2": {
13213-
"version": "0.3.3",
13214-
"resolved": "https://registry.npmjs.org/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz",
13215-
"integrity": "sha512-aNWXIL2DKgJyY/1OOeITwAQz1fHaCIGvUFHf9h8UcoQBG5a74MkdhS/xqoYe7DNZdQmZRL+TAdIbtUs9OyVjbw==",
13216-
"dependencies": {
13217-
"clipboard": "^2.0.0"
13218-
}
13219-
},
1322013178
"node_modules/vue-eslint-parser": {
1322113179
"version": "9.0.3",
1322213180
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.0.3.tgz",
@@ -17483,16 +17441,6 @@
1748317441
"integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==",
1748417442
"dev": true
1748517443
},
17486-
"clipboard": {
17487-
"version": "2.0.11",
17488-
"resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.11.tgz",
17489-
"integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==",
17490-
"requires": {
17491-
"good-listener": "^1.2.2",
17492-
"select": "^1.1.2",
17493-
"tiny-emitter": "^2.0.0"
17494-
}
17495-
},
1749617444
"clipboardy": {
1749717445
"version": "2.3.0",
1749817446
"resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-2.3.0.tgz",
@@ -18247,11 +18195,6 @@
1824718195
"object-keys": "^1.1.1"
1824818196
}
1824918197
},
18250-
"delegate": {
18251-
"version": "3.2.0",
18252-
"resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz",
18253-
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
18254-
},
1825518198
"depd": {
1825618199
"version": "2.0.0",
1825718200
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
@@ -19694,14 +19637,6 @@
1969419637
"integrity": "sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==",
1969519638
"dev": true
1969619639
},
19697-
"good-listener": {
19698-
"version": "1.2.2",
19699-
"resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz",
19700-
"integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==",
19701-
"requires": {
19702-
"delegate": "^3.1.2"
19703-
}
19704-
},
1970519640
"gopd": {
1970619641
"version": "1.2.0",
1970719642
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
@@ -22638,11 +22573,6 @@
2263822573
"ajv-keywords": "^3.5.2"
2263922574
}
2264022575
},
22641-
"select": {
22642-
"version": "1.1.2",
22643-
"resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz",
22644-
"integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA=="
22645-
},
2264622576
"select-hose": {
2264722577
"version": "2.0.0",
2264822578
"resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz",
@@ -23632,11 +23562,6 @@
2363223562
"integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==",
2363323563
"dev": true
2363423564
},
23635-
"tiny-emitter": {
23636-
"version": "2.1.0",
23637-
"resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
23638-
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
23639-
},
2364023565
"to-regex-range": {
2364123566
"version": "5.0.1",
2364223567
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
@@ -23999,14 +23924,6 @@
2399923924
"integrity": "sha512-+eaQXVrAm/LldalI272PpDe3+i4mPis0ORiMYxF6Ae4hyuCh15W8Idet7wPUEs4N4YptgFHGys4UrgNQOMyO6w==",
2400023925
"requires": {}
2400123926
},
24002-
"vue-clipboard2": {
24003-
"version": "0.3.3",
24004-
"resolved": "https://registry.npmjs.org/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz",
24005-
"integrity": "sha512-aNWXIL2DKgJyY/1OOeITwAQz1fHaCIGvUFHf9h8UcoQBG5a74MkdhS/xqoYe7DNZdQmZRL+TAdIbtUs9OyVjbw==",
24006-
"requires": {
24007-
"clipboard": "^2.0.0"
24008-
}
24009-
},
2401023927
"vue-eslint-parser": {
2401123928
"version": "9.0.3",
2401223929
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.0.3.tgz",

web/storagenode/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"pinia": "2.0.23",
1717
"vue": "2.7.10",
1818
"vue-class-component": "7.2.6",
19-
"vue-clipboard2": "0.3.3",
2019
"vue-property-decorator": "9.1.2",
2120
"vue-router": "3.5.3",
2221
"vuex": "3.6.2"

web/storagenode/src/app/components/DiskStatChart.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,36 @@
44
<template>
55
<div class="disk-stat-area">
66
<p class="disk-stat-area__title">Total Disk Space</p>
7-
<p class="disk-stat-area__amount">{{ diskSpace.available | bytesToBase10String }}</p>
7+
<p class="disk-stat-area__amount">{{ Size.toBase10String(diskSpace.available) }}</p>
88
<DoughnutChart chart-id="disk-stat-chart" :chart-data="chartData" />
99
<div class="disk-stat-area__info-area">
1010
<div class="disk-stat-area__info-area__item">
1111
<div class="disk-stat-area__info-area__item__labels-area">
1212
<div class="disk-stat-area__info-area__item__labels-area__circle used" />
1313
<p class="disk-stat-area__info-area__item__labels-area__label">Used</p>
1414
</div>
15-
<p class="disk-stat-area__info-area__item__labels-area__amount">{{ diskSpace.used | bytesToBase10String }}</p>
15+
<p class="disk-stat-area__info-area__item__labels-area__amount">{{ Size.toBase10String(diskSpace.used) }}</p>
1616
</div>
1717
<div class="disk-stat-area__info-area__item">
1818
<div class="disk-stat-area__info-area__item__labels-area">
1919
<div class="disk-stat-area__info-area__item__labels-area__circle free" />
2020
<p class="disk-stat-area__info-area__item__labels-area__label">Free</p>
2121
</div>
22-
<p class="disk-stat-area__info-area__item__labels-area__amount">{{ free | bytesToBase10String }}</p>
22+
<p class="disk-stat-area__info-area__item__labels-area__amount">{{ Size.toBase10String(free) }}</p>
2323
</div>
2424
<div class="disk-stat-area__info-area__item">
2525
<div class="disk-stat-area__info-area__item__labels-area">
2626
<div class="disk-stat-area__info-area__item__labels-area__circle trash" />
2727
<p class="disk-stat-area__info-area__item__labels-area__label">Trash</p>
2828
</div>
29-
<p class="disk-stat-area__info-area__item__labels-area__amount">{{ diskSpace.trash | bytesToBase10String }}</p>
29+
<p class="disk-stat-area__info-area__item__labels-area__amount">{{ Size.toBase10String(diskSpace.trash) }}</p>
3030
</div>
3131
<div class="disk-stat-area__info-area__item">
3232
<div class="disk-stat-area__info-area__item__labels-area">
3333
<div class="disk-stat-area__info-area__item__labels-area__circle overused" />
3434
<p class="disk-stat-area__info-area__item__labels-area__label">Overused</p>
3535
</div>
36-
<p class="disk-stat-area__info-area__item__labels-area__amount">{{ diskSpace.overused | bytesToBase10String }}</p>
36+
<p class="disk-stat-area__info-area__item__labels-area__amount">{{ Size.toBase10String(diskSpace.overused) }}</p>
3737
</div>
3838
</div>
3939
</div>
@@ -45,6 +45,7 @@ import { ChartData } from 'chart.js';
4545
4646
import { Traffic } from '@/storagenode/sno/sno';
4747
import { useStore } from '@/app/utils/composables';
48+
import { Size } from '@/private/memory/size';
4849
4950
import DoughnutChart from '@/app/components/DoughnutChart.vue';
5051

web/storagenode/src/app/components/TotalPayoutArea.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@
66
<div class="total-payout-area__united-info-area">
77
<div class="total-payout-area__united-info-area__item">
88
<p class="total-payout-area__united-info-area__item__label">Current Month Earnings</p>
9-
<p class="total-payout-area__united-info-area__item__amount">{{ currentEarnings | centsToDollars }}</p>
9+
<p class="total-payout-area__united-info-area__item__amount">{{ centsToDollars(currentEarnings) }}</p>
1010
</div>
1111
<div class="total-payout-area__united-info-area__item align-center">
1212
<p class="total-payout-area__united-info-area__item__label">Total Earned</p>
13-
<p class="total-payout-area__united-info-area__item__amount">{{ totalEarnings | centsToDollars }}</p>
13+
<p class="total-payout-area__united-info-area__item__amount">{{ centsToDollars(totalEarnings) }}</p>
1414
</div>
1515
<div class="total-payout-area__united-info-area__item align-end">
1616
<p class="total-payout-area__united-info-area__item__label">Total Held Amount</p>
17-
<p class="total-payout-area__united-info-area__item__amount">{{ totalHeld | centsToDollars }}</p>
17+
<p class="total-payout-area__united-info-area__item__amount">{{ centsToDollars(totalHeld) }}</p>
1818
</div>
1919
</div>
2020
<div class="total-payout-area__info-area">
21-
<SingleInfo width="100%" label="Current Month Earnings" :value="currentEarnings | centsToDollars" />
22-
<SingleInfo width="100%" label="Total Earnings" :value="totalEarnings | centsToDollars" />
23-
<SingleInfo width="100%" label="Total Held Amount" :value="totalHeld | centsToDollars" />
21+
<SingleInfo width="100%" label="Current Month Earnings" :value="centsToDollars(currentEarnings)" />
22+
<SingleInfo width="100%" label="Total Earnings" :value="centsToDollars(totalEarnings)" />
23+
<SingleInfo width="100%" label="Total Held Amount" :value="centsToDollars(totalHeld)" />
2424
</div>
2525
</section>
2626
</template>
@@ -29,6 +29,7 @@
2929
import { computed } from 'vue';
3030
3131
import { useStore } from '@/app/utils/composables';
32+
import { centsToDollars } from '@/app/utils/payout';
3233
3334
import SingleInfo from '@/app/components/payments/SingleInfo.vue';
3435

web/storagenode/src/app/components/payments/EstimationArea.vue

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<p class="estimation-table-container__info-area__text">{{ item.bandwidth }}</p>
6666
</div>
6767
<div class="column justify-end column-6">
68-
<p class="estimation-table-container__info-area__text">{{ item.payout | centsToDollars }}</p>
68+
<p class="estimation-table-container__info-area__text">{{ centsToDollars(item.payout) }}</p>
6969
</div>
7070
</div>
7171
<div class="estimation-table-container__info-area">
@@ -77,20 +77,20 @@
7777
<div class="column justify-start column-4" />
7878
<div class="column justify-start column-5" />
7979
<div class="column justify-end column-6">
80-
<p class="estimation-table-container__info-area__text">{{ grossTotal | centsToDollars }}</p>
80+
<p class="estimation-table-container__info-area__text">{{ centsToDollars(grossTotal) }}</p>
8181
</div>
8282
</div>
8383
<div v-if="isHistoricalPeriod && totalPaystubForPeriod.surgePercent" class="estimation-table-container__total-area">
8484
<p class="estimation-table-container__total-area__text">Total + Surge {{ surgePercent }}</p>
85-
<p class="estimation-table-container__total-area__text">{{ totalPaystubForPeriod.grossWithSurge | centsToDollars }}</p>
85+
<p class="estimation-table-container__total-area__text">{{ centsToDollars(totalPaystubForPeriod.grossWithSurge) }}</p>
8686
</div>
8787
<div class="estimation-table-container__held-area">
8888
<p class="estimation-table-container__held-area__text">Held Back</p>
89-
<p class="estimation-table-container__held-area__text">-{{ held | centsToDollars }}</p>
89+
<p class="estimation-table-container__held-area__text">-{{ centsToDollars(held) }}</p>
9090
</div>
9191
<div v-if="isHistoricalPeriod && disposed > 0" class="estimation-table-container__held-area">
9292
<p class="estimation-table-container__held-area__text">Held returned</p>
93-
<p class="estimation-table-container__held-area__text">{{ disposed | centsToDollars }}</p>
93+
<p class="estimation-table-container__held-area__text">{{ centsToDollars(disposed) }}</p>
9494
</div>
9595
<div class="estimation-table-container__net-total-area">
9696
<div class="column justify-start column-1">
@@ -105,7 +105,7 @@
105105
<p class="estimation-table-container__net-total-area__text">{{ totalBandwidth }}</p>
106106
</div>
107107
<div class="column justify-end column-6">
108-
<p class="estimation-table-container__net-total-area__text">{{ totalPayout | centsToDollars }}</p>
108+
<p class="estimation-table-container__net-total-area__text">{{ centsToDollars(totalPayout) }}</p>
109109
</div>
110110
</div>
111111
<div v-if="!isCurrentPeriod && !isLastPeriodWithoutPaystub" class="estimation-table-container__distributed-area">
@@ -121,7 +121,7 @@
121121
</div>
122122
</div>
123123
</div>
124-
<p class="estimation-table-container__distributed-area__text">{{ totalPaystubForPeriod.distributed | centsToDollars }}</p>
124+
<p class="estimation-table-container__distributed-area__text">{{ centsToDollars(totalPaystubForPeriod.distributed) }}</p>
125125
</div>
126126
</div>
127127
<div v-if="isCurrentPeriod && !isFirstDayOfCurrentMonth" class="estimation-container__payout-area">
@@ -130,11 +130,11 @@
130130
<p class="additional-text">At the end of the month if the load keeps the same for the rest of the month.</p>
131131
</div>
132132
<div class="estimation-container__payout-area__right-area">
133-
<p class="title-text">{{ estimation.currentMonthExpectations | centsToDollars }}</p>
133+
<p class="title-text">{{ centsToDollars(estimation.currentMonthExpectations) }}</p>
134134
</div>
135135
</div>
136136
<div v-if="isPayoutNoDataState" class="no-data-container">
137-
<img class="no-data-container__image" src="@/../static/images/payments/NoData.png">
137+
<img class="no-data-container__image" src="@/../static/images/payments/NoData.png" alt="no data">
138138
<p class="no-data-container__title">No data to display</p>
139139
<p class="no-data-container__additional-text">Please note, historical data about payouts does not update immediately, it may take some time.</p>
140140
</div>
@@ -160,6 +160,7 @@ import {
160160
TotalPaystubForPeriod,
161161
} from '@/storagenode/payouts/payouts';
162162
import { useStore } from '@/app/utils/composables';
163+
import { centsToDollars } from '@/app/utils/payout';
163164
164165
import EstimationPeriodDropdown from '@/app/components/payments/EstimationPeriodDropdown.vue';
165166

web/storagenode/src/app/components/payments/HeldHistoryAllStatsTable.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
<p class="held-history-table-container--large__info-area__text">{{ item.joinedAt.toISOString().split('T')[0] }}</p>
2828
</div>
2929
<div class="column justify-end column-3">
30-
<p class="held-history-table-container--large__info-area__text">{{ item.totalHeld | centsToDollars }}</p>
30+
<p class="held-history-table-container--large__info-area__text">{{ centsToDollars(item.totalHeld) }}</p>
3131
</div>
3232
<div class="column justify-end column-4">
33-
<p class="held-history-table-container--large__info-area__text">{{ item.totalDisposed | centsToDollars }}</p>
33+
<p class="held-history-table-container--large__info-area__text">{{ centsToDollars(item.totalDisposed) }}</p>
3434
</div>
3535
</div>
3636
</div>
@@ -49,6 +49,7 @@ import { computed } from 'vue';
4949
5050
import { SatelliteHeldHistory } from '@/storagenode/payouts/payouts';
5151
import { useStore } from '@/app/utils/composables';
52+
import { centsToDollars } from '@/app/utils/payout';
5253
5354
import HeldHistoryAllStatsTableItemSmall from '@/app/components/payments/HeldHistoryAllStatsTableItemSmall.vue';
5455

0 commit comments

Comments
 (0)