// }
});
-
App.ShowRegistrationsRoute = Ember.Route.extend({
setupController: function(controller) {
// Set the Controller's `title`
}
});
+App.ShowSaysRoute = Ember.Route.extend({
+ setupController: function(controller) {
+ App.showSaysController.load();
+ }
+});
+
+App.ShowChatsRoute = Ember.Route.extend({
+ setupController: function(controller) {
+ App.showChatsController.load();
+ }
+});
+
+App.ShowLimitsRoute = Ember.Route.extend({
+ setupController: function(controller) {
+ App.showLimitsController.load();
+ }
+});
+
App.UsersRoute = Ember.Route.extend({
setupController: function(controller) {
App.usersController.load();
- }
+ }
});
App.Router.map(function(){
this.route("showCodecs");
this.route("showFiles");
this.route("showAPIs");
+ this.route("showSays");
+ this.route("showChats");
+ this.route("showInterfaces");
+ this.route("showLimits");
this.route("show");
this.route("users");
this.route("about", { path: "/about" });
}
});
+App.showSaysController = Ember.ArrayController.create({
+ content: [],
+ init: function(){
+ },
+ load: function() {
+ var me = this;
+ $.getJSON("/txtapi/show?say%20as%20json", function(data){
+ me.set('total', data.row_count);
+ me.content.clear();
+ if (data.row_count == 0) return;
+
+ me.pushObjects(data.rows);
+
+ });
+ }
+});
+
+App.showChatsController = Ember.ArrayController.create({
+ content: [],
+ init: function(){
+ },
+ load: function() {
+ var me = this;
+ $.getJSON("/txtapi/show?chat%20as%20json", function(data){
+ me.set('total', data.row_count);
+ me.content.clear();
+ if (data.row_count == 0) return;
+
+ me.pushObjects(data.rows);
+
+ });
+ }
+});
+
+App.showInterfacesController = Ember.ArrayController.create({
+ content: [],
+ init: function(){
+ },
+ load: function() {
+ var me = this;
+ $.getJSON("/txtapi/show?interfaces%20as%20json", function(data){
+ me.set('total', data.row_count);
+ me.content.clear();
+ if (data.row_count == 0) return;
+
+ me.pushObjects(data.rows);
+
+ });
+ }
+});
+
+App.showLimitsController = Ember.ArrayController.create({
+ content: [],
+ init: function(){
+ },
+ load: function() {
+ var me = this;
+ $.getJSON("/txtapi/show?limit%20as%20json", function(data){
+ me.set('total', data.row_count);
+ me.content.clear();
+ if (data.row_count == 0) return;
+
+ me.pushObjects(data.rows);
+
+ });
+ }
+});
+
+
App.usersController = Ember.ArrayController.create({
content: [],
init: function(){
</div>
</script>
+ <script type="text/x-handlebars" data-template-name="showSays">
+ <h1>Limits</h1>
+ <div>
+ <table class="table">
+ <tr>
+ <th>Type</th>
+ <th>Name</th>
+ <th>iKey</th>
+ </tr>
+ {{#each App.showSaysController.content}}
+ <tr>
+ <td>{{ type }}</td>
+ <td>{{ name }}</td>
+ <td>{{ ikey }}</td>
+ </tr>
+ {{/each}}
+ </table>
+ </div>
+ </script>
+
+ <script type="text/x-handlebars" data-template-name="showChats">
+ <h1>Limits</h1>
+ <div>
+ <table class="table">
+ <tr>
+ <th>Type</th>
+ <th>Name</th>
+ <th>iKey</th>
+ </tr>
+ {{#each App.showChatsController.content}}
+ <tr>
+ <td>{{ type }}</td>
+ <td>{{ name }}</td>
+ <td>{{ ikey }}</td>
+ </tr>
+ {{/each}}
+ </table>
+ </div>
+ </script>
+
+ <script type="text/x-handlebars" data-template-name="showInterfaces">
+ <h1>Limits</h1>
+ <div>
+ <table class="table">
+ <tr>
+ <th>Type</th>
+ <th>Name</th>
+ <th>iKey</th>
+ </tr>
+ {{#each App.showInterfacesController.content}}
+ <tr>
+ <td>{{ type }}</td>
+ <td>{{ name }}</td>
+ <td>{{ ikey }}</td>
+ </tr>
+ {{/each}}
+ </table>
+ </div>
+ </script>
+
+ <script type="text/x-handlebars" data-template-name="showLimits">
+ <h1>Limits</h1>
+ <div>
+ <table class="table">
+ <tr>
+ <th>Type</th>
+ <th>Name</th>
+ <th>iKey</th>
+ </tr>
+ {{#each App.showLimitsController.content}}
+ <tr>
+ <td>{{ type }}</td>
+ <td>{{ name }}</td>
+ <td>{{ ikey }}</td>
+ </tr>
+ {{/each}}
+ </table>
+ </div>
+ </script>
+
<script type="text/x-handlebars" data-template-name="show">
<h1>Show</h1>
{{#linkTo "showRegistrations"}} Registrations {{/linkTo}} |
Aliases |
Complete |
- Chat |
+ {{#linkTo "showChats"}} Chat {{/linkTo}} |
Management |
Nat_map |
- Say |
- Interfaces |
+ {{#linkTo "showSays"}} Say {{/linkTo}} |
+ {{#linkTo "showInterfaces"}} Interfaces {{/linkTo}} |
Interface_types |
Tasks |
- Limits
+ {{#linkTo "showLimits"}} Limits {{/linkTo}}
</script>