Fork pd_web, remove everything we don't need
This commit is contained in:
1 parent
9dcdd94b3a
commit
fd5cd0bfd1
415 files changed
+146269
-120786
No files matched your search
@@ -0,0 +1,172 @@
|
||||
<script>
|
||||
import { onMount } from "svelte";
|
||||
import Euro from "util/Euro.svelte";
|
||||
import ProgressBar from "util/ProgressBar.svelte";
|
||||
|
||||
let pixeldrain_storage = 0
|
||||
let pixeldrain_egress = 0
|
||||
let pixeldrain_total = 0
|
||||
let backblaze_storage = 0
|
||||
let backblaze_egress = 0
|
||||
let backblaze_api = 0
|
||||
let backblaze_total = 0
|
||||
let wasabi_storage = 0
|
||||
let wasabi_total = 0
|
||||
let price_amazon = 0
|
||||
let price_azure = 0
|
||||
let price_google = 0
|
||||
let price_max = 0
|
||||
|
||||
let storage = 10 // TB
|
||||
let egress = 10 // TB
|
||||
let avg_file_size = 1000 // kB
|
||||
|
||||
$: {
|
||||
pixeldrain_storage = storage * 4
|
||||
pixeldrain_egress = egress * 1
|
||||
pixeldrain_total = pixeldrain_storage + pixeldrain_egress
|
||||
|
||||
// Egress at Backblaze is free up to three times the amount of storage, then
|
||||
// it's $10/TB
|
||||
backblaze_storage = storage * 6
|
||||
backblaze_egress = Math.max(egress - (storage * 3), 0) * 10
|
||||
backblaze_api = ((egress * 1e12) / (avg_file_size * 1e3)) * 0.0000004
|
||||
backblaze_total = backblaze_storage + backblaze_egress + backblaze_api
|
||||
|
||||
|
||||
// Wasabi does not have egress fees
|
||||
wasabi_storage = storage * 6.99
|
||||
wasabi_total = (egress > storage) ? 0 : wasabi_storage
|
||||
|
||||
// price_amazon = (storage * 26) + (egress * 90)
|
||||
// price_azure = (storage * 20) + (egress * 80)
|
||||
// price_google = (storage * 20) + (egress * 20)
|
||||
|
||||
price_max = Math.max(pixeldrain_total, backblaze_total, wasabi_total, price_amazon, price_azure, price_google)
|
||||
}
|
||||
|
||||
onMount(() => {})
|
||||
</script>
|
||||
|
||||
<h2>Price calculator</h2>
|
||||
<div class="inputs">
|
||||
<div>
|
||||
<div>Storage</div>
|
||||
<div><input type="number" bind:value={storage}> TB / month</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>Egress</div>
|
||||
<div><input type="number" bind:value={egress}> TB / month</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>Average file size</div>
|
||||
<div><input type="number" bind:value={avg_file_size}> kB</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bars">
|
||||
<div>
|
||||
<div>
|
||||
Pixeldrain - <Euro amount={pixeldrain_total*1e6}/> / month<br/>
|
||||
<Euro amount={pixeldrain_storage*1e6}/> storage,
|
||||
<Euro amount={pixeldrain_egress*1e6}/> egress
|
||||
<ProgressBar used={pixeldrain_total} total={price_max}/>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
Backblaze B2 - <Euro symbol="$" amount={backblaze_total*1e6}/> / month<br/>
|
||||
<Euro symbol="$" amount={backblaze_storage*1e6}/> storage,
|
||||
<Euro symbol="$" amount={backblaze_egress*1e6}/> egress,
|
||||
<Euro symbol="$" amount={backblaze_api*1e6}/> API calls
|
||||
<ProgressBar used={backblaze_total} total={price_max}/>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
Wasabi - <Euro symbol="$" amount={wasabi_total*1e6}/> / month<br/>
|
||||
<Euro symbol="$" amount={wasabi_storage*1e6}/> storage
|
||||
<ProgressBar used={wasabi_total} total={price_max}/>
|
||||
</div>
|
||||
{#if egress > storage}
|
||||
<div>
|
||||
Wasabi does not allow users to download more than their amount
|
||||
of stored data per month. For this reason Wasabi is excluded
|
||||
from price calculations when egress is higher than storage.
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<!-- <div>
|
||||
<div>
|
||||
Amazon S3: <Euro symbol="$" amount={price_amazon*1e6}/> / month
|
||||
<ProgressBar used={price_amazon} total={price_max}/>
|
||||
</div>
|
||||
<div>
|
||||
Amazon's pricing is too complicated to accurately represent here.
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
Microsoft Azure: <Euro symbol="$" amount={price_azure*1e6}/> / month
|
||||
<ProgressBar used={price_azure} total={price_max}/>
|
||||
</div>
|
||||
<div>
|
||||
Azure's pricing is too complicated to accurately represent here.
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
Google: <Euro symbol="$" amount={price_google*1e6}/> / month
|
||||
<ProgressBar used={price_google} total={price_max}/>
|
||||
</div>
|
||||
<div>
|
||||
Google's pricing is too complicated to accurately represent here.
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Note that while pixeldrain might not seem to be the cheapest option in some
|
||||
cases, most cloud providers have extra hidden costs for API calls and
|
||||
region-specific prices. This makes it very hard to accurately compare the
|
||||
pricing of these platforms. Pixeldrain includes no hidden costs, I only
|
||||
charge for storage and egress.
|
||||
</p>
|
||||
|
||||
<style>
|
||||
.inputs {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.inputs > div {
|
||||
flex: 1 1 auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
border: 2px solid var(--card_color);
|
||||
}
|
||||
.bars {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
}
|
||||
.bars > div {
|
||||
flex: 1 1 auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
border: 2px solid var(--card_color);
|
||||
}
|
||||
.bars > div > div {
|
||||
padding: 4px;
|
||||
}
|
||||
.bars > div > div:first-child {
|
||||
background: var(--card_color);
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user