-
Notifications
You must be signed in to change notification settings - Fork 1
/
snowflake_cost.html
64 lines (62 loc) · 2.15 KB
/
snowflake_cost.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html>
<html>
<head>
<title>Snowflake Usage</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body>
<div class="container mt-4">
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link active" id="cost-tab" data-toggle="tab" href="#cost">Snowflake costs</a>
</li>
<li class="nav-item">
<a class="nav-link" id="tables-tab" data-toggle="tab" href="#tables">Most expensive tables</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane fade show active" id="cost">
<div class="tab-pane fade show active" id="cost">
<canvas id="costChart"></canvas>
</div>
</div>
<div class="tab-pane fade" id="tables">
<div class="tab-pane fade" id="tables">
<ul>
<li>Table 1: 10 Snowflake credits</li>
<li>Table 2: 20 Snowflake credits</li>
<li>Table 3: 30 Snowflake credits</li>
<!-- Add more tables as needed -->
</ul>
</div>
</div>
</div>
</div>
</body>
<script>
var ctx = document.getElementById('costChart').getContext('2d');
var chart = new Chart(ctx, {
type: 'line',
data: {
labels: ['Day 1', 'Day 2', 'Day 3', 'Day 4', 'Day 5', 'Day 6', 'Day 7'], // Update with actual days
datasets: [{
label: 'Cost',
data: [12, 19, 3, 5, 2, 3, 12], // Update with actual costs
backgroundColor: 'rgba(75, 192, 192, 0.2)',
borderColor: 'rgba(75, 192, 192, 1)',
borderWidth: 1
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}
});
</script>
</html>