add show complete
This commit is contained in:
parent
68f1d34dfc
commit
d92074233c
|
@ -136,6 +136,12 @@ App.ShowAliasesRoute = Ember.Route.extend({
|
|||
}
|
||||
});
|
||||
|
||||
App.ShowCompletesRoute = Ember.Route.extend({
|
||||
setupController: function(controller) {
|
||||
App.showCompletesController.load();
|
||||
}
|
||||
});
|
||||
|
||||
App.ShowManagementsRoute = Ember.Route.extend({
|
||||
setupController: function(controller) {
|
||||
App.showManagementsController.load();
|
||||
|
@ -195,6 +201,7 @@ App.Router.map(function(){
|
|||
this.route("showFiles");
|
||||
this.route("showAPIs");
|
||||
this.route("showAliases");
|
||||
this.route("showCompletes");
|
||||
this.route("showManagements");
|
||||
this.route("showSays");
|
||||
this.route("showChats");
|
||||
|
@ -509,6 +516,23 @@ App.showAliasesController = Ember.ArrayController.create({
|
|||
}
|
||||
});
|
||||
|
||||
App.showCompletesController = Ember.ArrayController.create({
|
||||
content: [],
|
||||
init: function(){
|
||||
},
|
||||
load: function() {
|
||||
var me = this;
|
||||
$.getJSON("/txtapi/show?complete%20as%20json", function(data){
|
||||
me.set('total', data.row_count);
|
||||
me.content.clear();
|
||||
if (data.row_count == 0) return;
|
||||
|
||||
me.pushObjects(data.rows);
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
App.showManagementsController = Ember.ArrayController.create({
|
||||
content: [],
|
||||
init: function(){
|
||||
|
|
|
@ -299,6 +299,44 @@
|
|||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-handlebars" data-template-name="showCompletes">
|
||||
<h1>Aliases</h1>
|
||||
<div>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>Sticky</th>
|
||||
<th>A1</th>
|
||||
<th>A2</th>
|
||||
<th>A3</th>
|
||||
<th>A4</th>
|
||||
<th>A5</th>
|
||||
<th>A6</th>
|
||||
<th>A7</th>
|
||||
<th>A8</th>
|
||||
<th>A9</th>
|
||||
<th>A10</th>
|
||||
<th>Hostname</th>
|
||||
</tr>
|
||||
{{#each App.showCompletesController.content}}
|
||||
<tr>
|
||||
<td>{{ sticky }}</td>
|
||||
<td>{{ a1 }}</td>
|
||||
<td>{{ a2 }}</td>
|
||||
<td>{{ a3 }}</td>
|
||||
<td>{{ a4 }}</td>
|
||||
<td>{{ a5 }}</td>
|
||||
<td>{{ a6 }}</td>
|
||||
<td>{{ a7 }}</td>
|
||||
<td>{{ a8 }}</td>
|
||||
<td>{{ a9 }}</td>
|
||||
<td>{{ a10 }}</td>
|
||||
<td>{{ hostname }}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</table>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-handlebars" data-template-name="showManagements">
|
||||
<h1>Say</h1>
|
||||
<div>
|
||||
|
@ -451,8 +489,7 @@
|
|||
{{#linkTo "showFiles"}} Files {{/linkTo}} |
|
||||
{{#linkTo "showAPIs"}} APIs {{/linkTo}} |
|
||||
{{#linkTo "showAliases"}} Aliases {{/linkTo}} |
|
||||
|
||||
Complete |
|
||||
{{#linkTo "showCompletes"}} Complete {{/linkTo}} |
|
||||
{{#linkTo "showChats"}} Chat {{/linkTo}} |
|
||||
{{#linkTo "showManagements"}} Management {{/linkTo}} |
|
||||
Nat_map |
|
||||
|
|
Loading…
Reference in New Issue