]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
finally found a router supporting uPnP
authorSeven Du <dujinfang@gmail.com>
Tue, 16 Jul 2013 02:45:45 +0000 (10:45 +0800)
committerSeven Du <dujinfang@gmail.com>
Tue, 16 Jul 2013 02:47:18 +0000 (10:47 +0800)
htdocs/portal/assets/js/fsportal.js
htdocs/portal/index.html

index 32c3b24703e482a628c7fe16661180af86215508..618b3d5004906d048aa6dc8a168ff20b0a0e1bb4 100644 (file)
@@ -154,6 +154,12 @@ App.ShowSaysRoute = Ember.Route.extend({
        }
 });
 
+App.ShowNatMapsRoute = Ember.Route.extend({
+       setupController: function(controller) {
+               App.showNatMapsController.load();
+       }
+});
+
 App.ShowChatsRoute = Ember.Route.extend({
        setupController: function(controller) {
                App.showChatsController.load();
@@ -203,6 +209,7 @@ App.Router.map(function(){
        this.route("showAliases");
        this.route("showCompletes");
        this.route("showManagements");
+       this.route("showNatMaps");
        this.route("showSays");
        this.route("showChats");
        this.route("showInterfaces");
@@ -550,6 +557,23 @@ App.showManagementsController = Ember.ArrayController.create({
        }
 });
 
+App.showNatMapsController = Ember.ArrayController.create({
+       content: [],
+       init: function(){
+       },
+       load: function() {
+               var me = this;
+               $.getJSON("/txtapi/show?nat_map%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(){
index 47270e6814cb2a7940cb2b8b26f0c915e09e9da6..8771a8f09efb8ccbdc927ce9e27646127588c0ba 100644 (file)
                </div>
        </script>
 
+       <script type="text/x-handlebars" data-template-name="showNatMaps">
+               <h1>Nat Maps</h1>
+               <div>
+                       <table class="table">
+                       <tr>
+                               <th>Port</th>
+                               <th>Protocol</th>
+                               <th>Protocol Number</th>
+                               <th>Sticky</th>
+                       </tr>
+                       {{#each App.showNatMapsController.content}}
+                       <tr>
+                               <td>{{ port }}</td>
+                               <td>{{ proto }}</td>
+                               <td>{{ proto_num }}</td>
+                               <td>{{ sticky }}</td>
+                       </tr>
+                       {{/each}}
+                       </table>
+               </div>
+       </script>
+
        <script type="text/x-handlebars" data-template-name="showSays">
                <h1>Say</h1>
                <div>
                {{#linkTo "showCompletes"}} Complete {{/linkTo}} |
                {{#linkTo "showChats"}} Chat {{/linkTo}} |
                {{#linkTo "showManagements"}} Management {{/linkTo}} |
-               Nat_map |
+               {{#linkTo "showNatMaps"}} Nat Map {{/linkTo}} |
                {{#linkTo "showSays"}} Say {{/linkTo}} |
                {{#linkTo "showInterfaces"}} Interfaces {{/linkTo}} |
                {{#linkTo "showInterfaceTypes"}} InterfaceTypes {{/linkTo}} |