Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Side by Side Diff: samples/total/client/Adminz.js

Issue 10635015: Delete proxy and total samples, which have bit-rotted. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « samples/total/bin/start-total ('k') | samples/total/client/CSVReader.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 var restartz = document.getElementById("restartServer");
6 restartz.onclick = restartServer;
7
8 var stopz = document.getElementById("stopServer");
9 stopz.onclick = stopServer;
10
11 var adminzReq;
12 var adminzStatus = document.getElementById("adminzStatus");
13
14 var statuzTimer;
15
16 function showStatus() {
17 if (adminzReq.readyState == 4) {
18 if (adminzReq.status == 200) {
19 adminzStatus.value = adminzReq.responseText;
20 } else {
21 adminzStatus.value = "Error " + adminzReq.status;
22 }
23 }
24 clearTimer();
25 statuzTimer = window.setTimeout("adminzStatus.value=''", 2000);
26 }
27
28 function clearTimer() {
29 if (statuzTimer) {
30 window.clearTimeout(statuzTimer);
31 statuzTimer = null;
32 }
33 }
34
35 function restartServer(event) {
36 clearTimer();
37 adminzReq = new XMLHttpRequest();
38 adminzReq.onreadystatechange = showStatus;
39 adminzReq.open("POST", "/adm/restart");
40 adminzStatus.value = "Restarting...";
41 adminzReq.send();
42 }
43
44 function stopServer(event) {
45 clearTimer();
46 adminzReq = new XMLHttpRequest();
47 adminzReq.onreadystatechange = showStatus;
48 adminzReq.open("POST", "/adm/stop");
49 adminzStatus.value = "Stopping...";
50 adminzReq.send();
51 }
OLDNEW
« no previous file with comments | « samples/total/bin/start-total ('k') | samples/total/client/CSVReader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698