-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
157 lines (143 loc) · 4.39 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
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
157
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>OpenActive Infrastructure Build and Dependency Monitor</title>
<style>
html,
body {
height: 100%;
margin: 0px;
}
#diagram {
font-family: "trebuchet ms", verdana, arial;
width: 100%;
height: 100%;
}
.loader {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.sk-chase {
width: 40px;
height: 40px;
position: relative;
animation: sk-chase 2.5s infinite linear both;
}
.sk-chase-dot {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
animation: sk-chase-dot 2.0s infinite ease-in-out both;
}
.sk-chase-dot:before {
content: '';
display: block;
width: 25%;
height: 25%;
background-color: rgb(34, 53, 130);
border-radius: 100%;
animation: sk-chase-dot-before 2.0s infinite ease-in-out both;
}
.sk-chase-dot:nth-child(1) { animation-delay: -1.1s; }
.sk-chase-dot:nth-child(2) { animation-delay: -1.0s; }
.sk-chase-dot:nth-child(3) { animation-delay: -0.9s; }
.sk-chase-dot:nth-child(4) { animation-delay: -0.8s; }
.sk-chase-dot:nth-child(5) { animation-delay: -0.7s; }
.sk-chase-dot:nth-child(6) { animation-delay: -0.6s; }
.sk-chase-dot:nth-child(1):before { animation-delay: -1.1s; }
.sk-chase-dot:nth-child(2):before { animation-delay: -1.0s; }
.sk-chase-dot:nth-child(3):before { animation-delay: -0.9s; }
.sk-chase-dot:nth-child(4):before { animation-delay: -0.8s; }
.sk-chase-dot:nth-child(5):before { animation-delay: -0.7s; }
.sk-chase-dot:nth-child(6):before { animation-delay: -0.6s; }
@keyframes sk-chase {
100% { transform: rotate(360deg); }
}
@keyframes sk-chase-dot {
80%, 100% { transform: rotate(360deg); }
}
@keyframes sk-chase-dot-before {
50% {
transform: scale(0.4);
} 100%, 0% {
transform: scale(1.0);
}
}
</style>
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://unpkg.com/mermaid@8.6.4/dist/mermaid.js"></script>
<script>
mermaid.initialize({
startOnLoad:false,
"theme": "default",
"securityLevel": "loose",
"flowchart": {
"useMaxWidth": true,
"htmlLabels": true,
"curve": "cardinal"
}
});
</script>
<script>
var preloadImages = function(pictureUrls, callback) {
var i,
j,
loaded = 0;
for (i = 0, j = pictureUrls.length; i < j; i++) {
(function (img, src) {
var countOne = function () {
if (++loaded == pictureUrls.length && callback) {
callback();
}
};
var countError = function () {
console.log('Error preloading image: ' + src);
countOne();
}
img.onload = countOne;
// Use the following callback methods to debug
// in case of an unexpected behavior.
img.onerror = countError;
img.onabort = countError;
img.src = src;
} (new Image(), pictureUrls[i]));
}
};
</script>
<script>
$(function(){
$.get('https://openactive.io/infrastructure-monitor/infrastructure.mermaid', function ( graphDefinition ) {
// Extract all images
const images = [...graphDefinition.matchAll(/img src='(.*)'/g)].map(x => x[1]);
// Preload images to ensure diagram is rendered correctly
preloadImages(images, function() {
mermaid.mermaidAPI.render('diagram', graphDefinition, g => {
// If this function doesn't throw an error, then the diagram doesn't render (?)
throw "Bug in Mermaid: This error must be thrown for the diagram to render";
});
});
});
});
</script>
</head>
<body>
<div id="diagram">
<div class="loader">
<div class="sk-chase">
<div class="sk-chase-dot"></div>
<div class="sk-chase-dot"></div>
<div class="sk-chase-dot"></div>
<div class="sk-chase-dot"></div>
<div class="sk-chase-dot"></div>
<div class="sk-chase-dot"></div>
</div>
</div>
</div>
</body>
</html>