Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

B-06172 Host Console update bandwidth to data transfer #116

Merged
merged 3 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion mock-hpos-api/defaultResponse.js
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,13 @@ const holoNixpkgs = {
}
}

const mockKycData = {
"kyc": 'holo_kyc_2'
}

const mockHostPreferences = {
}

// NB: both /api and /holochain-api calls are mocked here
const data = {
get: {
Expand All @@ -544,7 +551,9 @@ const data = {
'/holochain-api/v1/host_earnings': earnings,
'/holochain-api/v1/core_app_version': coreAppVersion,
'/holochain-api/v1/host_invoices': mockPaidInvoicesData,
'/holochain-api/v1/redemptions': mockRedemptionHistoryData
'/holochain-api/v1/host_preferences': mockHostPreferences,
'/holochain-api/v1/redemptions': mockRedemptionHistoryData,
'/holochain-api/v1/kyc': mockKycData
},
put: {
'/api/v1/config': (args) => args,
Expand Down
8 changes: 6 additions & 2 deletions src/components/dashboard/UsageCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const isError = computed((): boolean => isErrorPredicate(props.data) && !!props.
</span>
</div>

<div class="info-row daily-row inactive">
<div class="info-row daily-row inactive hidden">
<span class="daily-label">
{{ $t('$.storage') }}
</span>
Expand All @@ -78,7 +78,7 @@ const isError = computed((): boolean => isErrorPredicate(props.data) && !!props.
</div>
<div class="info-row daily-row">
<span class="daily-label">
{{ $t('$.bandwidth') }}
{{ $t('$.data_transfer') }}
</span>
<span class="bold">{{ presentBytes(props.data ? props.data.totalUsage?.bandwidth : 0) }}
</span>
Expand Down Expand Up @@ -121,6 +121,10 @@ const isError = computed((): boolean => isErrorPredicate(props.data) && !!props.
margin: 0 0 20px;
}

.hidden {
display: none;
}

@media screen and (max-width: 1050px) {
/* Hiding hosting preferences link in mobile view as dictated in the designs */
.hosting-preferences {
Expand Down
9 changes: 1 addition & 8 deletions src/components/settings/hostingPreferences/PricesSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,7 @@ const prices = computed((): PriceItem[] => [
isDisabled: true
},
{
label: t('$.storage'),
value: props.data.storage ? formatPrice(props.data.storage).value : 0,
unit: props.data.storage ? formatPrice(props.data.storage).unit : '',
prop: 'storage',
isDisabled: true
},
{
label: t('$.bandwidth'),
label: t('$.data_transfer'),
value: props.data.bandwidth ? formatPrice(props.data.bandwidth).value : 0,
unit: props.data.bandwidth ? formatPrice(props.data.bandwidth).unit : '',
prop: 'bandwidth',
Expand Down