提交 4db32183 authored 作者: Seven Du's avatar Seven Du

implement show modules

上级 03892b55
...@@ -68,23 +68,33 @@ App.ChannelsRoute = Ember.Route.extend({ ...@@ -68,23 +68,33 @@ App.ChannelsRoute = Ember.Route.extend({
}); });
App.ShowApplicationsRoute = Ember.Route.extend({ App.ShowRegistrationsRoute = Ember.Route.extend({
setupController: function(controller) { setupController: function(controller) {
// Set the Controller's `title` // Set the Controller's `title`
controller.set('title', "ShowApplications"); controller.set('title', "ShowRegistrations");
console.log("showApplications"); App.registrationsController.load();
App.applicationsController.load(); }//,
// renderTemplate: function() {
// this.render('calls');
// }
});
App.ShowModulesRoute = Ember.Route.extend({
setupController: function(controller) {
// Set the Controller's `title`
App.showModulesController.load();
}//, }//,
// renderTemplate: function() { // renderTemplate: function() {
// this.render('calls'); // this.render('calls');
// } // }
}); });
App.ShowRegistrationsRoute = Ember.Route.extend({ App.ShowApplicationsRoute = Ember.Route.extend({
setupController: function(controller) { setupController: function(controller) {
// Set the Controller's `title` // Set the Controller's `title`
controller.set('title', "ShowRegistrations"); controller.set('title', "ShowApplications");
App.registrationsController.load(); console.log("showApplications");
App.applicationsController.load();
}//, }//,
// renderTemplate: function() { // renderTemplate: function() {
// this.render('calls'); // this.render('calls');
...@@ -131,6 +141,7 @@ App.Router.map(function(){ ...@@ -131,6 +141,7 @@ App.Router.map(function(){
this.route("calls"); this.route("calls");
this.route("channels"); this.route("channels");
this.route("showRegistrations"); this.route("showRegistrations");
this.route("showModules");
this.route("showApplications"); this.route("showApplications");
this.route("showEndpoints"); this.route("showEndpoints");
this.route("showCodecs"); this.route("showCodecs");
...@@ -408,6 +419,24 @@ App.showAPIsController = Ember.ArrayController.create({ ...@@ -408,6 +419,24 @@ App.showAPIsController = Ember.ArrayController.create({
} }
}); });
App.showModulesController = Ember.ArrayController.create({
content: [],
init: function(){
},
load: function() {
var me = this;
$.getJSON("/txtapi/show?module%20as%20json", function(data){
me.set('total', data.row_count);
me.content.clear();
console.log(data);
if (data.row_count == 0) return;
me.pushObjects(data.rows);
});
}
});
App.usersController = Ember.ArrayController.create({ App.usersController = Ember.ArrayController.create({
content: [], content: [],
init: function(){ init: function(){
......
...@@ -150,6 +150,28 @@ ...@@ -150,6 +150,28 @@
</div> </div>
</script> </script>
<script type="text/x-handlebars" data-template-name="showModules">
<h1>Modules</h1>
<div>
<table class="table">
<tr>
<th>Type</th>
<th>Name</th>
<th>iKey</th>
<th>Fileame</th>
</tr>
{{#each App.showModulesController.content}}
<tr>
<td>{{ type }}</td>
<td>{{ name }}</td>
<td>{{ ikey }}</td>
<td>{{ filename }}</td>
</tr>
{{/each}}
</table>
</div>
</script>
<script type="text/x-handlebars" data-template-name="showApplications"> <script type="text/x-handlebars" data-template-name="showApplications">
<h1>Applications</h1> <h1>Applications</h1>
<div> <div>
...@@ -258,6 +280,7 @@ ...@@ -258,6 +280,7 @@
<script type="text/x-handlebars" data-template-name="show"> <script type="text/x-handlebars" data-template-name="show">
<h1>Show</h1> <h1>Show</h1>
{{#linkTo "showRegistrations"}} Registrations {{/linkTo}} | {{#linkTo "showRegistrations"}} Registrations {{/linkTo}} |
{{#linkTo "showModules"}} Modules {{/linkTo}} |
{{#linkTo "showApplications"}} Applications {{/linkTo}} | {{#linkTo "showApplications"}} Applications {{/linkTo}} |
{{#linkTo "showEndpoints"}} Endpoints {{/linkTo}} | {{#linkTo "showEndpoints"}} Endpoints {{/linkTo}} |
{{#linkTo "showCodecs"}} Codecs {{/linkTo}} | {{#linkTo "showCodecs"}} Codecs {{/linkTo}} |
...@@ -268,7 +291,6 @@ ...@@ -268,7 +291,6 @@
Complete | Complete |
Chat | Chat |
Management | Management |
Modules |
Nat_map | Nat_map |
Say | Say |
Interfaces | Interfaces |
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论