1
0
Fork 0

fixed CSS, broken image and typo

This commit is contained in:
Jan Steemann 2013-05-10 17:50:07 +02:00
parent 03893bf9cd
commit 42a749dfc0
6 changed files with 11 additions and 138 deletions

View File

@ -1,6 +1,11 @@
.foxxList {
padding-top: 30px;
}
.foxxElement {
cursor: pointer;
}
.foxxDescription {
width:170px;
float: left;

View File

@ -637,7 +637,7 @@ function program11(depth0,data) {
function program13(depth0,data) {
return "\n <div class='sandbox_header'>\n <input class='submit' name='commit' type='button' value='Try it out!' />\n <a href='#' class='response_hider' style='display:none'>Hide Response</a>\n <img alt='Throbber' class='response_throbber' src='images/throbber.gif' style='display:none' />\n </div>\n ";
return "\n <div class='sandbox_header'>\n <input class='submit' name='commit' type='button' value='Try it out!' />\n <a href='#' class='response_hider' style='display:none'>Hide Response</a>\n <img alt='Throbber' class='response_throbber' src='img/swagger/throbber.gif' style='display:none' />\n </div>\n ";
}
buffer += "\n <ul class='operations' >\n <li class='";

View File

@ -1,5 +1,5 @@
<small>
<div class="plain">
<div class="plain foxxElement">
<% var appInfos = attributes.app.split(":"); %>
<h5 class="applicationName"><%= appInfos[1] %></h5>
<div class="pull-right">

View File

@ -47,7 +47,7 @@
<button id="uninstall" class="btn btn-danger pull-left">Uninstall</button>
<button id="change" class="btn btn-success pull-right" disabled>Save</button>
<%if (attributes.active) {%>
<button id="deactivate" class="btn btn-warning pull-right" style="margin-right:8px" disabled>Deactive</button>
<button id="deactivate" class="btn btn-warning pull-right" style="margin-right:8px" disabled>Deactivate</button>
<%} else {%>
<button id="activate" class="btn btn-success pull-right" style="margin-right:8px" disabled>Activate</button>
<%}%>

View File

@ -1,132 +0,0 @@
var dashboardView = Backbone.View.extend({
el: '#content',
collectionStats: {
totalCollections: 0,
loadedCollections: 0,
unloadedCollections: 0,
systemCollections: 0,
deletedCollections: 0,
newbornCollections: 0
},
init: function () {
},
template: new EJS({url: 'js/templates/dashboardView.ejs'}),
render: function() {
$.gritter.removeAll();
$(this.el).html(this.template.text);
this.updateCollectionsStats();
this.renderCollections();
return this;
},
renderCollections: function () {
var self = this;
nv.addGraph(function() {
var chart = nv.models.discreteBarChart()
.x(function(d) { return d.label })
.y(function(d) { return d.value })
.staggerLabels(false)
.tooltips(true)
.showValues(false);
d3.select("#dashboardCollectionsGraph svg")
.datum(self.formatCollectionsStats())
.transition().duration(1200)
.call(chart)
return chart;
});
$('#dashboardCollectionsText').html('');
$('#dashboardCollectionsText').append(''
+'<table>'
+'<tr>'
+'<th>Total: </th>'
+'<th>'+this.collectionStats.totalCollections+'</th>'
+'</tr>'
+'<tr>'
+'<th>Loaded: </th>'
+'<th>'+this.collectionStats.loadedCollections+'</th>'
+'</tr>'
+'<tr>'
+'<th>Unloaded: </th>'
+'<th>'+this.collectionStats.unloadedCollections+'</th>'
+'</tr>'
+'<tr>'
+'<th>System: </th>'
+'<th>'+this.collectionStats.systemCollections+'</th>'
+'</tr>'
+'</table>'
);
},
updateCollectionsStats: function () {
var self = this;
this.collectionStats.loadedCollections = 0;
this.collectionStats.unloadedCollections = 0;
this.collectionStats.deletedCollections = 0;
this.collectionStats.newbornCollections = 0;
this.collectionStats.totalCollections = this.collection.length;
this.collection.each(function (arango_collection) {
if (arango_collection.get('status') === 'new born collection') {
self.collectionStats.newbornCollections++;
}
else if (arango_collection.get('status') === 'loaded') {
self.collectionStats.loadedCollections++;
}
else if (arango_collection.get('status') === 'unloaded') {
self.collectionStats.unloadedCollections++;
}
else if (arango_collection.get('status') === 'deleted') {
self.collectionStats.deletedCollections++;
}
if (arango_collection.get('name').substr(0,1) === "_") {
self.collectionStats.systemCollections++;
}
});
},
formatCollectionsStats: function () {
return [{
key: "Collection Status",
values: [
{
"label" : "total",
"value" : this.collectionStats.totalCollections
},
{
"label" : "loaded",
"value" : this.collectionStats.loadedCollections
},
{
"label" : "unloaded",
"value" : this.collectionStats.unloadedCollections
},
{
"label" : "system",
"value" : this.collectionStats.systemCollections
},
{
"label" : "new born",
"value" : this.collectionStats.newbornCollections
},
{
"label" : "deleted",
"value" : this.collectionStats.deletedCollections
}
]
}]
},
updateSystem: function () {
},
updateClient: function () {
}
});