Skip to content

Commit

Permalink
Fix displaying Droplet SSD disk size (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
MattIPv4 authored Oct 3, 2024
1 parent 7fcbe3b commit e0432b8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/bandwidth-tool/templates/costs.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2022 DigitalOcean
Copyright 2024 DigitalOcean

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -195,7 +195,7 @@ limitations under the License.
ref.$props.droplet.slug,
ref.$props.droplet.cpus,
ref.$props.droplet.memory,
ref.$props.droplet.ssd.size,
ref.$props.droplet.disk.boot,
ref.$props.droplet.price.transferQuota,
ref.$props.droplet.price.monthly,
ref.$props.droplet.price.hourly,
Expand Down
8 changes: 4 additions & 4 deletions src/bandwidth-tool/templates/droplets/active_droplet.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2023 DigitalOcean
Copyright 2024 DigitalOcean

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -42,7 +42,7 @@ limitations under the License.
{{ i18n.templates.droplets.droplet[droplet.cpus === 1 ? 'cpuSingular' : 'cpuPlural'] }}
</p>
<p>{{ droplet.memory.toLocaleString() }} {{ i18n.templates.droplets.droplet.memoryUnit }}</p>
<p>{{ droplet.ssd.size.toLocaleString() }} {{ i18n.templates.droplets.droplet.diskSuffix }}</p>
<p>{{ droplet.disk.boot.toLocaleString() }} {{ i18n.templates.droplets.droplet.diskSuffix }}</p>
<p>{{ `${dropletTypes[droplet.type] || 'Legacy'}${variant}` }}</p>
<p><code>{{ droplet.slug }}</code></p>
</div>
Expand Down Expand Up @@ -210,8 +210,8 @@ limitations under the License.
},
variant() {
const variants = (this.$props.droplet.variant || []).map(camelToTitleCase)
.concat(this.$props.type === 'kubernetes' || !this.$props.droplet.ssd.variant
? [] : `${this.$props.droplet.ssd.variant}x SSD`);
.concat(this.$props.type === 'kubernetes' || !this.$props.droplet.disk.variant
? [] : `${this.$props.droplet.disk.variant}x SSD`);
return variants.length ? `: ${variants.join(', ')}` : '';
},
},
Expand Down
4 changes: 2 additions & 2 deletions src/bandwidth-tool/templates/droplets/picker_droplet.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2023 DigitalOcean
Copyright 2024 DigitalOcean

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -44,7 +44,7 @@ limitations under the License.
{{ i18n.templates.droplets.droplet[droplet.cpus === 1 ? 'cpuSingular' : 'cpuPlural'] }}
</p>
<p>{{ droplet.memory.toLocaleString() }} {{ i18n.templates.droplets.droplet.memoryUnit }}</p>
<p>{{ droplet.ssd.size.toLocaleString() }} {{ i18n.templates.droplets.droplet.diskSuffix }}</p>
<p>{{ droplet.disk.boot.toLocaleString() }} {{ i18n.templates.droplets.droplet.diskSuffix }}</p>
<p v-if="droplet.variant?.length">
{{ droplet.variant.join(', ') }}
</p>
Expand Down
4 changes: 2 additions & 2 deletions src/bandwidth-tool/templates/picker.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2023 DigitalOcean
Copyright 2024 DigitalOcean

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -195,7 +195,7 @@ limitations under the License.
return dropletsFiltered.map(droplet => ({
...droplet,
variant: (droplet.variant || []).map(camelToTitleCase)
.concat(isK8s || !droplet.ssd.variant ? [] : `${droplet.ssd.variant}x SSD`),
.concat(isK8s || !droplet.disk.variant ? [] : `${droplet.disk.variant}x SSD`),
}));
},
updateDroplets() {
Expand Down

1 comment on commit e0432b8

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been deployed to DigitalOcean Spaces for easy reviewing.

bandwidth-tool (Build Analysis Report)

Please sign in to comment.