netproxy / src / Netproxy.Web / wwwroot / Default.htm
Code · 100 lines · 3048 bytes
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<!doctype html>
<html lang="en">
<head>
	<title>netproxy demo</title>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />

	<link href="css/netproxyspinner.css" rel="stylesheet" />
	<script src="scripts/macros.js" defer></script>
	<script src="scripts/netproxy.js" defer></script>
	<script src="scripts/errorhandler.js" defer></script>

	<link href="Default.css" rel="stylesheet" />
	<script src="Default.js" defer></script>
</head>
<body>
	<img src="images/netproxyspinner.gif" id="netproxyspinner" />

	<div id="output"></div>

	<div><span id="HelloWorld" class="ui-btn">HelloWorld (post)</span></div>

	<div><span id="SomePostAsync" class="ui-btn">SomePostAsync (post)</span></div>

	<div><span id="TestLongRunningAsync" class="ui-btn">TestLongRunningAsync (get)</span></div>

	<fieldset>
		<legend>CLient Handled (try catched)</legend>
		<div><span id="ReturnServerErrorAsync" class="ui-btn">ReturnServerErrorAsync (get)</span></div>

		<div><span id="MakeServerErrorAsync" class="ui-btn">MakeServerErrorAsync (get)</span></div>

		<div><span id="NotFoundAsync" class="ui-btn">NotFoundAsync (get)</span></div>
	</fieldset>

	<fieldset>
		<legend>Client UnHandled</legend>
		<div><span id="ReturnServerError2Async" class="ui-btn">ReturnServerError2Async (get)</span></div>

		<div><span id="MakeServerError2Async" class="ui-btn">MakeServerError2Async (get)</span></div>

		<div><span id="NotFound2Async" class="ui-btn">NotFound2Async (get)</span></div>
	</fieldset>

	<div><span id="Coordinates" class="ui-btn">Coordinates (post)</span></div>

	<div><span id="NullContentAsync" class="ui-btn">NullContent (get)</span></div>
	<div><span id="EmptyContentAsync" class="ui-btn">EmptyContent (get)</span></div>

	<div id="UploadExample">
		<label class="UploadImage ui-btn" for="UploadImage">Upload a File</label>
		<input type="file" id="UploadImage" />
		<div id="progress"></div>
	</div>

	<div><span id="ClientError" class="ui-btn">ClientError (reports to server)</span></div>

	<div><span id="ListErrors" class="ui-btn">List Errors</span></div>

	<script type="text/template" id="templateerrors">
		<table class="errortable">
			<thead>
				<tr>
					<th>Time</th>
					<th>Code</th>
					<th>ErrorMessage</th>
					<th>ErrorStack</th>
					<th>Event</th>
					<th>Path</th>
					<th>Source</th>
					<th>IpAddress</th>
					<th>Referer</th>
					<th>UserAgent</th>
					<th>SessionId</th>
				</tr>
			</thead>
			<tbody>
				{{ for(i=0;i<this.List.length;i++) { }}
				{{ var item = this.List[i]; }}
				<tr data-id="{{=item.Id}}">
					<td>{{=item.Time}}</td>
					<td>{{=item.ErrorCode}}</td>
					<td>{{=item.ErrorMessage}}</td>
					<td>{{=item.ErrorStack}}</td>
					<td>{{=item.Event}}</td>
					<td>{{=item.Path}}</td>
					<td>{{=item.Source}}</td>
					<td>{{=item.IpAddress}}</td>
					<td>{{=item.Referer}}</td>
					<td>{{=item.UserAgent}}</td>
					<td>{{=item.SessionId}}</td>
				</tr>
				{{ } }}
			</tbody>
		</table>
	</script>

	<pre id="preoutput"></pre>
</body>
</html>