]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
show tasks
authorSeven Du <dujinfang@gmail.com>
Tue, 4 Jun 2013 01:32:38 +0000 (09:32 +0800)
committerTravis Cross <tc@traviscross.com>
Fri, 7 Jun 2013 04:57:44 +0000 (04:57 +0000)
htdocs/portal/assets/js/fsportal.js
htdocs/portal/index.html

index 9b65e68bf447467240dea70ca48dc1df7938d544..818a8bf5c836579ce44887e6c5e39397e0c54d09 100644 (file)
@@ -142,6 +142,12 @@ App.ShowChatsRoute = Ember.Route.extend({
        }
 });
 
+App.ShowTasksRoute = Ember.Route.extend({
+       setupController: function(controller) {
+               App.showTasksController.load();
+       }
+});
+
 App.ShowLimitsRoute = Ember.Route.extend({
        setupController: function(controller) {
                App.showLimitsController.load();
@@ -167,6 +173,7 @@ App.Router.map(function(){
        this.route("showSays");
        this.route("showChats");
        this.route("showInterfaces");
+       this.route("showTasks");
        this.route("showLimits");
        this.route("show");
        this.route("users");
@@ -509,6 +516,23 @@ App.showInterfacesController = Ember.ArrayController.create({
        }
 });
 
+App.showTasksController = Ember.ArrayController.create({
+       content: [],
+       init: function(){
+       },
+       load: function() {
+               var me = this;
+               $.getJSON("/txtapi/show?tasks%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(){
index 0f8c4a16eeaec13ed23aebb55751912e942f6b3f..257aaa057c6d8a065f0134796de47ad8038b44f9 100644 (file)
                </div>
        </script>
 
+       <script type="text/x-handlebars" data-template-name="showTasks">
+               <h1>Tasks</h1>
+               <div>
+                       <table class="table">
+                       <tr>
+                               <th>ID</th>
+                               <th>Description</th>
+                               <th>Group</th>
+                               <th>SQL Manager</th>
+                               <th>Hostname</th>
+                       </tr>
+                       {{#each App.showTasksController.content}}
+                       <tr>
+                               <td>{{ task_id }}</td>
+                               <td>{{ task_desc }}</td>
+                               <td>{{ task_group }}</td>
+                               <td>{{ task_sql_manager }}</td>
+                               <td>{{ hostname }}</td>
+                       </tr>
+                       {{/each}}
+                       </table>
+               </div>
+       </script>
+
        <script type="text/x-handlebars" data-template-name="showLimits">
                <h1>Limits</h1>
                <div>
                {{#linkTo "showSays"}} Say {{/linkTo}} |
                {{#linkTo "showInterfaces"}} Interfaces {{/linkTo}} |
                Interface_types |
-               Tasks |
+               {{#linkTo "showTasks"}} Taskss {{/linkTo}} |
                {{#linkTo "showLimits"}} Limits {{/linkTo}}
 
        </script>