-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathminio.skeleton
156 lines (156 loc) · 3.73 KB
/
minio.skeleton
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
{
name: `MinIO`,
description: `High Performance Object Storage compatible with Amazon's S3.`,
image: `minio/minio`,
uuid: `8994692D-BB01-4320-AE45-B3DD27A6DF8F`,
tags: [
`Storage`
],
actions: [
{
type: `Header`,
title: `Configure`
},
{
type: `SelectDirectory`,
name: `/data`,
description: `Select storage directory`
},
{
type: `EditEnvironment`,
name: `MINIO_ACCESS_KEY`,
description: `Access Key (3 or more characters)`
},
{
type: `EditEnvironment`,
name: `MINIO_SECRET_KEY`,
description: `Secret Key (8 or more characters)`
},
{
type: `Header`,
title: `Network`
},
{
type: `Text`,
text: `Select which network this application will use. You probably want <b>home</b> unless this application is being used on a private network.`
},
{
type: `SelectNetwork`,
name: `primary`,
description: `Select network`
}
],
properties: [
{
type: `Arguments`,
value: [
`server`,
`/data`
]
},
{
type: `Directory`,
name: `/data`,
style: `store`
},
{
type: `Environment`,
name: `MINIO_ACCESS_KEY`
},
{
type: `Environment`,
name: `MINIO_SECRET_KEY`
},
{
type: `Environment`,
name: `MINIO_UPDATE`,
value: `off`
},
{
type: `Environment`,
name: `MINIO_ACCESS_KEY_FILE`,
value: `access_key`
},
{
type: `Environment`,
name: `MINIO_SECRET_KEY_FILE`,
value: `secret_key`
},
{
type: `Environment`,
name: `MINIO_KMS_MASTER_KEY_FILE`,
value: `kms_master_key`
},
{
type: `Environment`,
name: `MINIO_SSE_MASTER_KEY_FILE`,
value: `sse_master_key`
},
{
type: `Port`,
name: `9000/tcp`,
port: 9000,
protocol: `TCP`,
web: {
tab: `newtab`,
widget: `newtab`,
path: `/`
}
},
{
type: `Network`,
name: `primary`,
value: `home`
}
],
monitor: {
cmd: `cd /data;du -d0 *`,
init: `
<div style="min-width: 400px; height: 250px">
<canvas style="position: absolute" id="{{ID}}"></canvas>
</div>
<script>
(function(){
const chart = new Chart(document.getElementById("{{ID}}").getContext("2d"), {
type: 'horizontalBar',
data: {
datasets: [{
backgroundColor: [ '#fd0a1a', '#ffd73e', '#278b30', '#b12427', '#808020', '#fd471f', '#41b376', '#fd1a91', '#88cce7', '#19196b', '#efad5a', '#d85452' ],
data: []
}],
labels: [],
},
options: {
animation: { duration: 1000, easing: 'linear' },
maintainAspectRatio: false,
adaptive: true,
legend: { display: false },
title: { display: true, text: 'Bucket Sizes (GB)' },
scales: {
xAxes: [{
ticks: {
precision: 2,
beginAtZero: true
}
}]
}
}
});
window.monitor("{{ID}}", 3600, (input) => {
const lines = input.split('\\n');
let c = 0;
for (let i = 0; i < lines.length && lines[i]; i++) {
const p = lines[i].split(/\\t+/);
chart.data.labels[c] = p[1];
chart.data.datasets[0].data[c] = parseInt(p[0]) / 1000000;
c++;
}
chart.data.labels.length = c;
chart.data.datasets[0].data.length = c;
chart.update();
});
})();
</script>
`
}
}