-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
123 lines (115 loc) · 4.44 KB
/
index.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Blockchain</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.6.0/dist/chart.min.js"></script>
</head>
<body>
<header>Blockchain</header>
<!-- Automatisches erstellen des folgendem mit: section*2>h2-->
<div class="col-1400">
<section class="width-25">
<h2>Blöcke</h2>
<div class="card">Hier kommen Block Infos rein</div>
</section>
<section class="col">
<div class="col-850">
<section>
<h2>Transaktionen</h2>
<div class="mb-16">
<select name="from" id="from" class="mr-16">
<option value="" disabled>Von</option>
<option value="BlackDragon">BlackDragon</option>
<option value="Walter">Walter</option>
<option value="Jessica">Jessica</option>
<option value="Werner">Werner</option>
</select>
<select name="to" id="to">
<option value="" disabled>An</option>
<option value="BlackDragon">BlackDragon</option>
<option value="Walter">Walter</option>
<option value="Jessica">Jessica</option>
<option value="Werner">Werner</option>
</select>
</div>
<div>
<input type="number" min="1" placeholder="Betrag" id="amount" class="mr-16">
<button onclick="sendMoney()">Abschicken</button>
</div>
</section>
<section>
<h2>Nodes</h2>
<div class="row mb-16">
<div class="play-btn" id="n0" onclick="startNode0()"></div>
Node 0 - BlackDragon
</div>
<div class="row">
<div class="play-btn" id="n1" onclick="startNode1()"></div>
Node 1 - Jessica
</div>
</section>
</div>
<div class="col-850 fill-rest">
<section id="transactionContainer">
</section>
<section>
<h2>Daten</h2>
<canvas id="myChart"></canvas>
</section>
<section>
<h2>Logs</h2>
<div id="logs">
</div>
</section>
</div>
</section>
</div>
<script src="broadcaster.js"></script>
<script src="sha256.js"></script>
<script src="block.class.js"></script>
<script src="blockchain.class.js"></script>
<script src="mining-node.class.js"></script>
<script src="script.js"></script>
<script>
const ctx = document.getElementById('myChart').getContext('2d');
const myChart = new Chart(ctx, {
type: 'bar',
data: {
labels: CHART_DATA.labels,
datasets: [{
label: '# of Votes',
data: CHART_DATA.amounts,
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)'
],
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
],
borderWidth: 1
}]
},
options: {
scales: {
y: {
beginAtZero: true
}
}
}
});
</script>
</body>
</html>