-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
236 lines (202 loc) · 6.76 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<html>
<head>
<title>Dynatrace Demo App</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<link rel="icon" type="image/png" href="favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="favicon-16x16.png" sizes="16x16" />
<style>
body {
color: #ffffff;
font-family: Arial, sans-serif;
font-size: 14px;
-moz-transition-property: text-shadow;
-moz-transition-duration: 4s;
-webkit-transition-property: text-shadow;
-webkit-transition-duration: 4s;
text-shadow: none;
}
body.blurry {
-moz-transition-property: text-shadow;
-moz-transition-duration: 4s;
-webkit-transition-property: text-shadow;
-webkit-transition-duration: 4s;
text-shadow: #fff 0px 0px 25px;
}
a {
color: white;
font-size: 125%;
}
.textColumn, .linksColumn {
padding: 2em;
}
.textColumn {
/* background-color: #73A53E; */
/*background-color: #EEA53E; */
color: black;
background-color: BACKGROUND-COLOR;
position: absolute;
top: 0px;
right: 75%;
bottom: 0px;
left: 0px;
text-align: left;
padding-top: 7em;
}
.textColumn p {
width: 75%;
float: left;
}
.linksColumn {
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
left: 25%;
background-color: black;
}
h1 {
color: #33342D;
font-size: 500%;
font-weight: normal;
margin-bottom: 0em;
}
h2 {
font-size: 200%;
font-weight: normal;
margin-bottom: 0em;
}
ul {
padding-left: 1em;
margin: 0px;
}
li {
margin: 1em 0em;
}
td {
vertical-align: top;
text-align: left;
}
th {
vertical-align: top;
text-align: left;
}
</style>
</head>
<body>
<div class="textColumn">
<h2>Running FEATURE_NUMBER</h2>
<br>
<br>
<br>
<div>
<h3>Here are the "problems" simulated. </h3>
<table style="color:black">
<tr><th>#</th><th>Feature Number</th></tr>
<tr><td>1. </td><td>no problem</td></tr>
<tr><td>2. </td><td>50% of /api/invoke requests return HTTP 500 Status Code</td></tr>
<tr><td>3. </td><td>Higher response times all requests</td></tr>
</table>
</div>
<!--
<div>
<br>
<br>
<h2>Learn more about Dynatrace & Cloud Automation</h2>
<div style="padding:12px;">
<ul>
<li><a href="https://www.dynatrace.com">Dynatrace</a></li>
<li><a href="https://keptn.sh">Keptn</a></li>
</ul>
</div>
</div>
-->
</div>
<div class="linksColumn">
<img width="800px" height="300px" src="BANNER_IMAGE" />
<table>
<tr>
<td>
<br>
<br>
<!--<h2>Lets trace some code!</h2>-->
<div style="padding:12px;">
Say Something : <input style="width:300px;" type="textbox" id="SayText" value="Just say whatever you want"></input>
<button id="Echo">Echo</button>
</div>
<div style="padding:12px;">
Invoke Server Side URL : <input style="width:250px;" type="textbox" id="RemoteURL" value="https://www.dynatrace.com"></input>
<button id="Invoke">Invoke</button>
</div>
<div style="padding:12px;">
Override sleep time for requests (in ms): <input style="width:50px;" type="textbox" id="SleepTime" value="1000"></input>
</div>
<div style="display: SET_FEATURE_DISPLAY;">
<div style="padding:12px;">
<button id="Feature">GET CURRENT FEATURE ID</button>
</div>
<div style="padding:12px;">
Set Feature: <input style="width:50px;" type="textbox" id="NewFeature" value="1"></input>
<button id="SetFeature">Set Feature</button>
<ul>
<li>Once set feature, refresh the page</li>
<li>Features can also be adjusted on the fly by calling "/api/feature?newFeatureNumber=1"</li>
</ul>
</div>
</div>
<!--<div style="padding:12px;" id="loginarea">
Your Username (for user tagging) : <input type="textbox" id="Username" value="Joe Mueller"></input>
<button id="Login">LOG ME IN</button>
</div>-->
<div>
<hr>
<p id="result">Results will show up here</p>
</div>
</td>
</tr>
</table>
</div>
<script>
function getRESTEndpoint() {
return window.location.href;
}
function executeCall(requestString, sleep) {
var sleepTime = $('#SleepTime').val();
var fullURL = getRESTEndpoint() + requestString;
if(fullURL.indexOf("?") > 0) fullURL = fullURL + "&sleep=" + sleepTime;
else fullURL = fullURL + "?sleep=" + sleepTime;
$.ajax({
url: fullURL
}).success(function(data) {
$('#result').text(data);
}).fail(function() {
$('#result').text("invoke failed!");
});
}
$("#Echo").click(function () {
var text = $('#SayText').val();
executeCall("api/echo?text=" + text);
});
$("#SetFeature").click(function () {
var theFeatureNumber = $('#NewFeature').val();
executeCall("api/feature?newFeatureNumber=" + theFeatureNumber);
});
$("#Invoke").click(function () {
var text = $('#RemoteURL').val();
executeCall("api/invoke?url=" + text);
});
$("#Feature").click(function () {
executeCall("api/feature");
});
$("#Login").click(function () {
var username = $('#Username').val();
var loggedinusername = $("#loggedinusername");
if(loggedinusername.length <= 0) {
$("<div id=\"usrhelparea\">You are now Logged in as user: <p id=\"loggedinusername\">" + username + "</p></div>").appendTo("#loginarea")
} else {
loggedinusername.text(username);
}
executeCall("api/login?username=" + username);
});
</script>
</body>
</html>