]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add show aliases, management, interface_types
authorSeven Du <dujinfang@gmail.com>
Tue, 4 Jun 2013 01:47:45 +0000 (09:47 +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 710e33f2ce6402924183d3df9b8bb99ac5f7c70a..445960b8b66c57adc31cf740f088fba97615d008 100644 (file)
@@ -127,7 +127,19 @@ App.ShowFilesRoute = Ember.Route.extend({
 App.ShowAPIsRoute = Ember.Route.extend({
        setupController: function(controller) {
                App.showAPIsController.load();
-       }
+       }
+});
+
+App.ShowAliasesRoute = Ember.Route.extend({
+       setupController: function(controller) {
+               App.showAliasesController.load();
+       }
+});
+
+App.ShowManagementsRoute = Ember.Route.extend({
+       setupController: function(controller) {
+               App.showManagementsController.load();
+       }
 });
 
 App.ShowSaysRoute = Ember.Route.extend({
@@ -148,6 +160,12 @@ App.ShowInterfacesRoute = Ember.Route.extend({
        }
 });
 
+App.ShowInterfaceTypesRoute = Ember.Route.extend({
+       setupController: function(controller) {
+               App.showInterfaceTypesController.load();
+       }
+});
+
 App.ShowTasksRoute = Ember.Route.extend({
        setupController: function(controller) {
                App.showTasksController.load();
@@ -176,9 +194,12 @@ App.Router.map(function(){
        this.route("showCodecs");
        this.route("showFiles");
        this.route("showAPIs");
+       this.route("showAliases");
+       this.route("showManagements");
        this.route("showSays");
        this.route("showChats");
        this.route("showInterfaces");
+       this.route("showInterfaceTypes");
        this.route("showTasks");
        this.route("showLimits");
        this.route("show");
@@ -471,6 +492,40 @@ App.showModulesController = Ember.ArrayController.create({
        }
 });
 
+App.showAliasesController = Ember.ArrayController.create({
+       content: [],
+       init: function(){
+       },
+       load: function() {
+               var me = this;
+               $.getJSON("/txtapi/show?aliases%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(){
+       },
+       load: function() {
+               var me = this;
+               $.getJSON("/txtapi/show?management%20as%20json", function(data){
+                       me.set('total', data.row_count);
+                       me.content.clear();
+                       if (data.row_count == 0) return;
+
+                       me.pushObjects(data.rows);
+
+               });
+       }
+});
+
 App.showSaysController = Ember.ArrayController.create({
        content: [],
        init: function(){
@@ -522,6 +577,23 @@ App.showInterfacesController = Ember.ArrayController.create({
        }
 });
 
+App.showInterfaceTypesController = Ember.ArrayController.create({
+       content: [],
+       init: function(){
+       },
+       load: function() {
+               var me = this;
+               $.getJSON("/txtapi/show?interface_types%20as%20json", function(data){
+                       me.set('total', data.row_count);
+                       me.content.clear();
+                       if (data.row_count == 0) return;
+
+                       me.pushObjects(data.rows);
+
+               });
+       }
+});
+
 App.showTasksController = Ember.ArrayController.create({
        content: [],
        init: function(){
index bea05b57fc228a35fa699c9554d5c010417db71f..a9248a4a660e8e927a1c8be03b0269a2a07562b9 100644 (file)
                </div>
        </script>
 
+       <script type="text/x-handlebars" data-template-name="showAliases">
+               <h1>Aliases</h1>
+               <div>
+                       <table class="table">
+                       <tr>
+                               <th>Sticky</th>
+                               <th>Alias</th>
+                               <th>Command</th>
+                               <th>Hostname</th>
+                       </tr>
+                       {{#each App.showAliasesController.content}}
+                       <tr>
+                               <td>{{ sticky }}</td>
+                               <td>{{ alias }}</td>
+                               <td>{{ command }}</td>
+                               <td>{{ hostname }}</td>
+                       </tr>
+                       {{/each}}
+                       </table>
+               </div>
+       </script>
+
+       <script type="text/x-handlebars" data-template-name="showManagements">
+               <h1>Say</h1>
+               <div>
+                       <table class="table">
+                       <tr>
+                               <th>Type</th>
+                               <th>Name</th>
+                               <th>iKey</th>
+                       </tr>
+                       {{#each App.showManagementsController.content}}
+                       <tr>
+                               <td>{{ type }}</td>
+                               <td>{{ name }}</td>
+                               <td>{{ ikey }}</td>
+                       </tr>
+                       {{/each}}
+                       </table>
+               </div>
+       </script>
+
        <script type="text/x-handlebars" data-template-name="showSays">
                <h1>Say</h1>
                <div>
                </div>
        </script>
 
-               <script type="text/x-handlebars" data-template-name="showChats">
+       <script type="text/x-handlebars" data-template-name="showChats">
                <h1>Chat</h1>
                <div>
                        <table class="table">
                </div>
        </script>
 
+       <script type="text/x-handlebars" data-template-name="showInterfaceTypes">
+               <h1>Interface Types</h1>
+               <div>
+                       <table class="table">
+                       <tr>
+                               <th>Type</th>
+                               <th>Total</th>
+                       </tr>
+                       {{#each App.showInterfaceTypesController.content}}
+                       <tr>
+                               <td>{{ type }}</td>
+                               <td>{{ total }}</td>
+                       </tr>
+                       {{/each}}
+                       </table>
+               </div>
+       </script>
+
        <script type="text/x-handlebars" data-template-name="showTasks">
                <h1>Tasks</h1>
                <div>
                {{#linkTo "showCodecs"}} Codecs {{/linkTo}} |
                {{#linkTo "showFiles"}} Files {{/linkTo}} |
                {{#linkTo "showAPIs"}} APIs {{/linkTo}} |
+               {{#linkTo "showAliases"}} Aliases {{/linkTo}} |
 
-               Aliases |
                Complete |
                {{#linkTo "showChats"}} Chat {{/linkTo}} |
-               Management |
+               {{#linkTo "showManagements"}} Management {{/linkTo}} |
                Nat_map |
                {{#linkTo "showSays"}} Say {{/linkTo}} |
                {{#linkTo "showInterfaces"}} Interfaces {{/linkTo}} |
-               Interface_types |
+               {{#linkTo "showInterfaceTypes"}} InterfaceTypes {{/linkTo}} |
                {{#linkTo "showTasks"}} Tasks {{/linkTo}} |
                {{#linkTo "showLimits"}} Limits {{/linkTo}}