extract redis_status into APKPM::Model
[APKPM.git] / public / redis.html
1 <!doctype html>
2 <html xmlns:ng="http://angularjs.org">
3  <script src="http://code.angularjs.org/angular-0.9.12.min.js" ng:autobind></script>
4  <style type="text/css">
5  th { text-align: right }
6  </style>
7  <body>
8   <script>
9     function RedisCntl($xhr,$defer) {
10       var self = this;
11    
12       this.fetch = function() {
13         self.url = '/_redis' + '?callback=JSON_CALLBACK';
14         $xhr('JSON', self.url, function(code, response) {
15           self.code = code;
16           self.response = response;
17         });
18         $defer( self.fetch, 5000 ); // 5s
19       };
20       this.fetch();
21     }
22     RedisCntl.$inject = ['$xhr','$defer'];
23   </script>
24   <div ng:controller="RedisCntl">
25 <h1>ADSL</h1>
26 {{response.status['poll.start']}} -
27 {{response.status['poll.finish']}}
28 <table>
29 <tr><th colspan=2>queued</th><td>{{response.status['poll.queued']}}</td></tr>
30 <tr><th rowspan=2>ping</th><th>OK</th><td>{{response.status['poll.ping.ok']}}</td></tr>
31 <tr><th>ERROR</th><td>{{response.status['poll.ping.error']}}</td></tr>
32 <tr><th colspan=2>ADSL</th><td>{{response.status['poll.adsl.ok']}}</td></tr>
33 </table>
34
35 <h1>ZTEDSLAM</h1>
36 {{response.status['ZTEDSLAM.poll.start']}} -
37 {{response.status['ZTEDSLAM.poll.finish']}}
38 <pre>{{response.status.poll.ZTEDSLAM}}</pre>
39
40 <h1>ZTEMSAN</h1>
41 {{response.status['ZTEMSAN.poll.start']}} -
42 {{response.status['ZTEMSAN.poll.finish']}}
43 <pre>{{response.status.poll.ZTEMSAN}}</pre>
44
45     <p><input type=checkbox name=debug>
46     <pre ng:show="debug">
47 url={{url}}
48 code={{code}}
49 response={{response}}
50     </pre>
51   </div>
52  </body>
53 </html>