7 this.fetch = function() {
9 self.url = '/g/' + self.function_name + '/' + self.args + '?callback=JSON_CALLBACK';
10 $xhr('JSON', self.url, function(code, response) {
12 self.response = response;
16 this.clear = function() {
24 CRM.$inject = ['$xhr'];
26 <div ng:controller="CRM">
27 <input type="hidden" name="function_name" value="CRM_search" size="20"/>
28 <label for="args">username:
29 <input type="text" name="args" value="test" size="10"/>
31 <button ng:click="fetch()">fetch</button>
32 <button ng:click="clear()">clear</button>
33 <b ng:show="url && ! code">loading {{url}}</b>
34 <b ng:show="response">{{response.length}} results</b>
35 <table ng:show="response">
40 <th>IP_MANAGEMENT</th>
45 <tr ng:repeat="u in response">
46 <td>{{u.USERNAME}}</td>
49 <td>{{u.IP_MANAGEMENT}}</td>
50 <td>{{u.IP_VOICE}}</td>
51 <td>{{u.KOLOKACIJA}}</td>
55 <input type=checkbox name=debug value=1>