]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add show complete
authorSeven Du <dujinfang@gmail.com>
Tue, 4 Jun 2013 01:52:14 +0000 (09:52 +0800)
committerTravis Cross <tc@traviscross.com>
Fri, 7 Jun 2013 04:57:46 +0000 (04:57 +0000)
htdocs/portal/assets/js/fsportal.js
htdocs/portal/index.html

index 445960b8b66c57adc31cf740f088fba97615d008..32c3b24703e482a628c7fe16661180af86215508 100644 (file)
@@ -136,6 +136,12 @@ App.ShowAliasesRoute = Ember.Route.extend({
        }
 });
 
+App.ShowCompletesRoute = Ember.Route.extend({
+       setupController: function(controller) {
+               App.showCompletesController.load();
+       }
+});
+
 App.ShowManagementsRoute = Ember.Route.extend({
        setupController: function(controller) {
                App.showManagementsController.load();
@@ -195,6 +201,7 @@ App.Router.map(function(){
        this.route("showFiles");
        this.route("showAPIs");
        this.route("showAliases");
+       this.route("showCompletes");
        this.route("showManagements");
        this.route("showSays");
        this.route("showChats");
@@ -509,6 +516,23 @@ App.showAliasesController = Ember.ArrayController.create({
        }
 });
 
+App.showCompletesController = Ember.ArrayController.create({
+       content: [],
+       init: function(){
+       },
+       load: function() {
+               var me = this;
+               $.getJSON("/txtapi/show?complete%20as%20json", function(data){
+                       me.set('total', data.row_count);
+                       me.content.clear();
+                       if (data.row_count == 0) return;
+
+                       me.pushObjects(data.rows);
+
+               });
+       }
+});
+
 App.showManagementsController = Ember.ArrayController.create({
        content: [],
        init: function(){
index a9248a4a660e8e927a1c8be03b0269a2a07562b9..9fbcef29636ad233c1bae3675bf3790f655f1fcc 100644 (file)
                </div>
        </script>
 
+       <script type="text/x-handlebars" data-template-name="showCompletes">
+               <h1>Aliases</h1>
+               <div>
+                       <table class="table">
+                       <tr>
+                               <th>Sticky</th>
+                               <th>A1</th>
+                               <th>A2</th>
+                               <th>A3</th>
+                               <th>A4</th>
+                               <th>A5</th>
+                               <th>A6</th>
+                               <th>A7</th>
+                               <th>A8</th>
+                               <th>A9</th>
+                               <th>A10</th>
+                               <th>Hostname</th>
+                       </tr>
+                       {{#each App.showCompletesController.content}}
+                       <tr>
+                               <td>{{ sticky }}</td>
+                               <td>{{ a1 }}</td>
+                               <td>{{ a2 }}</td>
+                               <td>{{ a3 }}</td>
+                               <td>{{ a4 }}</td>
+                               <td>{{ a5 }}</td>
+                               <td>{{ a6 }}</td>
+                               <td>{{ a7 }}</td>
+                               <td>{{ a8 }}</td>
+                               <td>{{ a9 }}</td>
+                               <td>{{ a10 }}</td>
+                               <td>{{ hostname }}</td>
+                       </tr>
+                       {{/each}}
+                       </table>
+               </div>
+       </script>
+
        <script type="text/x-handlebars" data-template-name="showManagements">
                <h1>Say</h1>
                <div>
                {{#linkTo "showFiles"}} Files {{/linkTo}} |
                {{#linkTo "showAPIs"}} APIs {{/linkTo}} |
                {{#linkTo "showAliases"}} Aliases {{/linkTo}} |
-
-               Complete |
+               {{#linkTo "showCompletes"}} Complete {{/linkTo}} |
                {{#linkTo "showChats"}} Chat {{/linkTo}} |
                {{#linkTo "showManagements"}} Management {{/linkTo}} |
                Nat_map |