2 <html xmlns:ng="http://angularjs.org">
3 <script src="http://code.angularjs.org/angular-0.9.12.min.js" ng:autobind></script>
6 function PingCntl($xhr) {
9 this.fetch = function() {
11 self.url = '/g/' + self.function_name + '/' + self.args + '?callback=JSON_CALLBACK';
12 $xhr('JSON', self.url, function(code, response) {
14 self.response = response;
18 this.clear = function() {
24 PingCntl.$inject = ['$xhr'];
26 <div ng:controller="PingCntl">
27 <input type="hidden" name="function_name" value="CRM_search" size="20"/>
28 <input type="text" name="args" value="test" size="10"/>
29 <button ng:click="fetch()">fetch</button>
30 <button ng:click="clear()">clear</button>
31 <b ng:show="url && ! code">loading {{url}}</b>
32 <b ng:show="response">{{response.length}} results</b>
33 <table ng:show="response">
38 <th>IP_MANAGEMENT</th>
43 <tr ng:repeat="u in response">
44 <td>{{u.USERNAME}}</td>
47 <td>{{u.IP_MANAGEMENT}}</td>
48 <td>{{u.IP_VOICE}}</td>
49 <td>{{u.KOLOKACIJA}}</td>
53 <input type=checkbox name=debug value=1>