-
Notifications
You must be signed in to change notification settings - Fork 4
/
incident.html
180 lines (120 loc) · 5.87 KB
/
incident.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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<!doctype html>
<html lang="en">
<head>
<!----favicon-->
<link rel="apple-touch-icon" sizes="57x57" href="favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="favicon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="favicon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="favicon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="favicon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="favicon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="favicon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="favicon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="favicon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
<link rel="manifest" href="favicon/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="favicon/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<!----favicon end-->
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<title>Incident Page</title>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Varela+Round&display=swap" rel="stylesheet">
<link rel="stylesheet" href="CSS/incident.css">
<link rel="favicon" href="favicon.png">
</head>
<body >
<nav id="nav" class="navbar navbar-expand-lg navbar-light bg-warning">
<a class="navbar-brand" href="index.html">Status Page</a>
<button id="navbtn" class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="index.html">JustInClicks.com <span class="sr-only">(current)</span></a>
</li>
</ul>
<img onclick="night();" src="favicon/night-mode.svg" id="btn">
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-success my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
</nav>
<br>
<section class="container-fluid bg">
<section class="row justify-content-center">
<section class="col-12 col-sm-10 col-md-10">
<h4>Reported Incidents</h4>
<br>
<div id="no-incidents" style="display: none;">No Incidents were Reported yet.</div>
<div id="accordion">
</div>
<br>
</section>
</section>
</section>
<br><br>
<!----footer-->
<footer id="ftr" class="footer bg-warning py-3">
<div class="container">
<span class="black">Copyright © 2021 |</span>
<a class="black " href="https://www.justinclicks.com"> FREE Status Page by JustInClicks.com</a>
</div>
</footer>
<!---footer-->
<script type="text/javascript">
var url_string = window.location.href;
var url = new URL(url_string);
var c = url.searchParams.get("n");
var d=c;
var srcM='incidents/'+d+'.json';
var accordion=document.getElementById("accordion");
var request = new XMLHttpRequest();
request.open('GET', srcM, true);
request.onload = function(){
if (request.status >= 200 && request.status < 400) {
// Success!
var data = JSON.parse(request.responseText);
console.log(accordion.innerHTML);
for (var i=0;i<data.length;i++)
{
var innerHTML="<div class=card>";
innerHTML+="<div class=card-header id=headingOne>";
innerHTML+= "<h5 class=mb-0>";
innerHTML+="<button class=btn btn-link data-toggle=collapse data-target=#collapse"+i+" aria-expanded=true aria-controls=collapse"+i+">";
innerHTML+= data[i]['incident_name'];
innerHTML+="</button></h5></div>";
innerHTML+="<div id=collapse"+i+" class=collapse hide aria-labelledby=headingOne data-parent=#accordion>";
innerHTML+="<div class=card-body>";
innerHTML+= data[i]['description'];
innerHTML+=" </div> </div> </div><br>";
accordion.innerHTML+=innerHTML;
}
} else {
document.getElementById("no-incidents").style.display="block";
}
};
request.onerror = function() {
// There was a connection error of some sort
};
request.send();
</script>
<script src="JS/incidents.js" type="text/javascript" ></script>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
</body>
</html>