Skip to content

Commit

Permalink
Merge pull request #116 from Holo-Host/b06172-bandwidth2dataxfer
Browse files Browse the repository at this point in the history
B-06172 Host Console update bandwidth to data transfer
  • Loading branch information
Paterick authored Oct 23, 2023
2 parents 8e70a9e + 1acae9f commit 2419008
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
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

0 comments on commit 2419008

Please sign in to comment.