From d6ac3b92504d6b1c067f24e88871dcb9ac1c54c2 Mon Sep 17 00:00:00 2001 From: Seven Du Date: Tue, 16 Jul 2013 10:45:45 +0800 Subject: [PATCH] finally found a router supporting uPnP --- htdocs/portal/assets/js/fsportal.js | 24 ++++++++++++++++++++++++ htdocs/portal/index.html | 24 +++++++++++++++++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/htdocs/portal/assets/js/fsportal.js b/htdocs/portal/assets/js/fsportal.js index 32c3b24703..618b3d5004 100644 --- a/htdocs/portal/assets/js/fsportal.js +++ b/htdocs/portal/assets/js/fsportal.js @@ -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(){ diff --git a/htdocs/portal/index.html b/htdocs/portal/index.html index 47270e6814..8771a8f09e 100644 --- a/htdocs/portal/index.html +++ b/htdocs/portal/index.html @@ -357,6 +357,28 @@ + +