}
});
+App.ShowNatMapsRoute = Ember.Route.extend({
+ setupController: function(controller) {
+ App.showNatMapsController.load();
+ }
+});
+
App.ShowChatsRoute = Ember.Route.extend({
setupController: function(controller) {
App.showChatsController.load();
this.route("showAliases");
this.route("showCompletes");
this.route("showManagements");
+ this.route("showNatMaps");
this.route("showSays");
this.route("showChats");
this.route("showInterfaces");
}
});
+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(){
</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}} |