// }
});
+App.ShowRegistrationsRoute = Ember.Route.extend({
+ setupController: function(controller) {
+ // Set the Controller's `title`
+ controller.set('title', "ShowRegistrations");
+ App.registrationsController.load();
+ }//,
+ // renderTemplate: function() {
+ // this.render('calls');
+ // }
+});
+
App.ShowEndpointsRoute = Ember.Route.extend({
setupController: function(controller) {
// Set the Controller's `title`
App.Router.map(function(){
this.route("calls");
this.route("channels");
+ this.route("showRegistrations");
this.route("showApplications");
this.route("showEndpoints");
this.route("showCodecs");
});
+App.registrationsController = Ember.ArrayController.create({
+ content: [],
+ init: function(){
+ },
+ load: function() {
+ var me = this;
+ $.getJSON("/txtapi/show?registrations%20as%20json", function(data){
+ // var channels = JSON.parse(data);
+ console.log(data.row_count);
+ me.set('total', data.row_count);
+ me.content.clear();
+ if (data.row_count == 0) return;
+
+ me.pushObjects(data.rows);
+
+ });
+ }
+});
+
App.applicationsController = Ember.ArrayController.create({
content: [],
init: function(){
<div id="serverStatus"></div>
</script>
+ <script type="text/x-handlebars" data-template-name="showRegistrations">
+ <h1>Registrations</h1>
+ <div>
+ <table class="table">
+ <tr>
+ <th>Reg User</th>
+ <th>Realm</th>
+ <th>Expires</th>
+ <th>Network IP</th>
+ <th>Network Port</th>
+ <th>Network Proto</th>
+ <th>Hostname</th>
+ <th>Metadata</th>
+ <th>Token / Url</th>
+ </tr>
+ {{#each App.registrationsController.content}}
+ <tr>
+ <td>{{ reg_user }}</td>
+ <td>{{ realm }}</td>
+ <td>{{ expires }}</td>
+ <td>{{ network_ip }}</td>
+ <td>{{ network_port }}</td>
+ <td>{{ network_proto }}</td>
+ <td>{{ hostname }}</td>
+ <td>{{ metadata }}</td>
+ <td>{{ token }}<br>{{ url }}</td>
+ </tr>
+ {{/each}}
+ </table>
+ </div>
+ </script>
+
<script type="text/x-handlebars" data-template-name="showApplications">
<h1>Applications</h1>
<div>
<script type="text/x-handlebars" data-template-name="show">
<h1>Show</h1>
+ {{#linkTo "showRegistrations"}} Registrations {{/linkTo}} |
{{#linkTo "showApplications"}} Applications {{/linkTo}} |
{{#linkTo "showEndpoints"}} Endpoints {{/linkTo}} |
{{#linkTo "showCodecs"}} Codecs {{/linkTo}} |