1
0
Fork 0

Merge branch 'devel' of github.com:triAGENS/ArangoDB into devel

This commit is contained in:
Michael Hackstein 2013-05-23 11:00:06 +02:00
commit 153e356693
10 changed files with 307 additions and 75 deletions

View File

@ -527,7 +527,7 @@ void ApplicationV8::setupOptions (map<string, basics::ProgramOptionsDescription>
("javascript.gc-frequency", &_gcFrequency, "JavaScript time-based garbage collection frequency (each x seconds)")
("javascript.action-directory", &_actionPath, "path to the JavaScript action directory")
("javascript.app-path", &_appPath, "one directory for applications")
("javascript.dev-app-path", &_devAppPath, "one directory for dev aaplications")
("javascript.dev-app-path", &_devAppPath, "one directory for dev applications")
("javascript.modules-path", &_modulesPath, "one or more directories separated by semi-colons")
("javascript.package-path", &_packagePath, "one or more directories separated by semi-colons")
("javascript.startup-directory", &_startupPath, "path to the directory containing alternate JavaScript startup scripts")

View File

@ -27,13 +27,14 @@
margin-right: 7px !important;
}
.db-zoom, .db-minimize, .db-hide, .db-info {
.db-zoom, .db-minimize, .db-hide, .db-info, #db-collectionMinimize {
float: right;
margin-top: -4px !important;
margin-right: 4px !important;
}
.db-zoom:hover, .db-minimize:hover, .db-hide, .db-info:hover, .group-close:hover, .group-open:hover {
.db-zoom:hover, .db-minimize:hover, .db-hide, .db-info:hover, .group-close:hover, .group-open:hover,
#db-collectionMinimize:hover {
cursor:pointer;
}
@ -81,17 +82,21 @@
.statClient {
float: left;
height: 120px;
width: 205px;
width: 203px;
margin-left: 9px;
margin-bottom: 15px;
margin-bottom: 12px;
border: 1px solid black;
border-radius: 2px 2px 2px 2px;
background-color: #F4F3F3;
box-shadow: 0 0 3px #333333;
}
.statChart {
margin-left: -15px !important;
#detailGraphChart {
margin-left: -10px !important;
}
.statGroups .statChart {
margin-left: -45px !important;
}
.nv-axislabel {
@ -102,11 +107,16 @@
font: 10px sans-serif;
}
.svgCollections {
height: 300px;
width: 300px;
}
.svgClass {
margin-top: 0 !important;
padding-top: 0 !important;
height: 140px;
width: 220px;
width: 255px;
}
.svgDetailClass {
@ -128,6 +138,7 @@
}
.statsHeader {
margin-top: 12px;
margin-left: -10px;
width: 940px;
background-color: #686766;
@ -161,3 +172,83 @@
.nv-point {
display: none;
}
/*Dashboard Dropdown*/
.dropdown-menu li > a {
padding: 0px 20px !important;
}
.checkboxLabel {
margin-top: 4px;
padding-left: 0;
}
.svgClass .nv-axisMaxMin text {
visibility: hidden;
}
.svgClass .major text {
visibility: hidden;
}
.svgClass .nv-axislabel {
visibility: hidden;
}
/*Dashboard Checkbox*/
input[type=checkbox].css-checkbox {
display:none;
}
input[type=checkbox].css-checkbox + label.css-label {
padding-left:20px;
margin-top: 0px;
margin-bottom: -0px;
height:15px;
display:inline-block;
line-height:15px;
background-repeat:no-repeat;
background-position: 0 0;
font-size:15px;
vertical-align:middle;
cursor:pointer;
}
input[type=checkbox].css-checkbox:checked + label.css-label {
background-position: 0 -15px;
}
.css-label {
background-image:url(../img/dark-check-green.png);
}
/*Dashboard Radio */
.dropdown-menu .radio {
margin-left: -21px;
}
input[type="radio"] {
display:none;
}
input[type="radio"] + label {
/*color:#f2f2f2;*/
/*font-family:Arial, sans-serif;
font-size:14px;*/
}
input[type="radio"] + label span {
display:inline-block;
width:19px;
height:19px;
margin:-1px 4px 0 0;
vertical-align:middle;
background:url(../img/check_radio_sheet.png) -38px top no-repeat;
cursor:pointer;
}
input[type="radio"]:checked + label span {
background:url(../img/check_radio_sheet.png) -57px top no-repeat;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -17,6 +17,9 @@ window.arangoCollections = Backbone.Collection.extend({
},
translateStatus : function (status) {
if (status == 0) {
return 'corrupted';
}
if (status == 1) {
return 'new born collection';
}

View File

@ -8,17 +8,66 @@
<ul class="dropdown-menu">
<li class="nav-header">Type</li>
<li><a href="#"><label class="checkbox"><input type="checkbox" id="checkSystem">System</label></a></li>
<li><a href="#"><label class="checkbox"><input type="checkbox" id="checkDocument">Document</label></a></li>
<li><a href="#"><label class="checkbox"><input type="checkbox" id="checkEdge">Edge</label></a></li>
<li><a href="#">
<label class="checkbox checkboxLabel">
<input class="css-checkbox" type="checkbox" id="checkSystem">
<label class="css-label"></label>System
</label>
</a></li>
<li><a href="#">
<label class="checkbox checkboxLabel">
<input class="css-checkbox" type="checkbox" id="checkDocument">
<label class="css-label"></label>Document
</label>
</a></li>
<li><a href="#">
<label class="checkbox checkboxLabel">
<input class="css-checkbox" type="checkbox" id="checkEdge">
<label class="css-label"></label>Edge
</label>
</a></li>
<li class="divider"></li>
<li class="nav-header">Status</li>
<li><a href="#"><label class="checkbox"><input type="checkbox" id="checkLoaded">Loaded</label></a></li>
<li><a href="#"><label class="checkbox"><input type="checkbox" id="checkUnloaded">Unloaded</label></a></li>
<li><a href="#">
<label class="checkbox checkboxLabel">
<input class="css-checkbox" type="checkbox" id="checkLoaded">
<label class="css-label"></label>Loaded
</label>
</a></li>
<li><a href="#">
<label class="checkbox checkboxLabel">
<input class="css-checkbox" type="checkbox" id="checkUnloaded">
<label class="css-label"></label>Unloaded
</label>
</a></li>
<li class="nav-header">Sorting</li>
<li><a href="#"><label class="radio"><input type="radio" id="sortName">Sort by name</label></a></li>
<li><a href="#"><label class="radio"><input type="radio" id="sortType">Sort by type</label></a></li>
<li><a href="#"><label class="checkbox"><input type="checkbox" id="sortOrder">Sort descending</label></a></li>
<li><a href="#">
<label class="radio">
<input type="radio" id="sortName">
<label><span></span>Sort by name</label>
</label>
</a></li>
<li><a href="#">
<label class="radio">
<input type="radio" id="sortType">
<label><span></span>Sort by type</label>
</label>
</a></li>
<li><a href="#">
<label class="checkbox checkboxLabel">
<input class="css-checkbox" type="checkbox" id="sortOrder">
<label class="css-label"></label>Sort descending
</label>
</a></li>
</ul>
</div>
<!-- /btn-group -->

View File

@ -22,11 +22,11 @@
<ul class="dropdown-menu interval-dropdown">
<li class="nav-header">Update every:</li>
<li><a><label class="radio"><input type="radio" name="updateInterval" id="every5seconds" value="5">5 seconds</label></a></li>
<li><a><label class="radio"><input type="radio" name="updateInterval" id="every15seconds" value="15">15 seconds</label></a></li>
<li><a><label class="radio"><input type="radio" name="updateInterval" id="every30seconds" value="30">30 seconds</label></a></li>
<li><a><label class="radio"><input type="radio" name="updateInterval" id="every60seconds" value="60">60 seconds</label></a></li>
<li><a><label class="radio"><input type="radio" name="updateInterval" id="every120seconds" value="120">120 seconds</label></a></li>
<li><a><label class="radio"><input type="radio" name="updateInterval" id="every5seconds" value="5"><label><span></span>5 seconds</label></label></a></li>
<li><a><label class="radio"><input type="radio" name="updateInterval" id="every15seconds" value="15"><label><span></span>15 seconds</label></label></a></li>
<li><a><label class="radio"><input type="radio" name="updateInterval" id="every30seconds" value="30"><label><span></span>30 seconds</label></label></a></li>
<li><a><label class="radio"><input type="radio" name="updateInterval" id="every60seconds" value="60"><label><span></span>60 seconds</label></label></a></li>
<li><a><label class="radio"><input type="radio" name="updateInterval" id="every120seconds" value="120"><label><span></span>120 seconds</label></label></a></li>
</ul>
</div>
<!-- /btn-group -->
@ -35,6 +35,16 @@
</ul>
<ul class="thumbnails">
<li id="detailCollections" class="statSingleClient" style="margin-bottom: 13px !important;">
<div class="boxHeader">
<h6 id="detailCollectionsHeader" class="dashboardH6">Collections</h6>
<i id="db-collectionMinimize" class="icon-white icon-minus"></i>
</div>
<div id="detailCollectionsChart" class="statChart">
<svg class="svgCollections"/>
</div>
</li>
<li id="detailGraph" class="statSingleClient">
<div class="boxHeader">
<h6 id="detailGraphHeader" class="dashboardH6">User Time</h6>

View File

@ -1,27 +1,44 @@
var dashboardView = Backbone.View.extend({
el: '#content',
updateInterval: 1000, // 1 second, constant
updateInterval: 500, // 0.5 second, constant
updateFrequency: 5, // the actual update rate (5 s)
updateCounter: 0,
arraySize: 20, // how many values will we keep per figure?
seriesData: {},
charts: {},
units: [],
updateNOW: false,
collectionsStats: {
"corrupted": 0,
"new born collection" : 0,
"unloaded" : 0,
"loaded" : 0,
"in the process of being unloaded" : 0,
"deleted" : 0
},
detailGraph: "userTime",
initialize: function () {
var self = this;
this.initUnits();
self.addCustomCharts();
this.collection.fetch({
success: function() {
self.countCollections();
self.calculateSeries();
self.renderCharts();
window.setInterval(function() {
self.updateCounter++;
if (self.updateNOW === true) {
self.calculateSeries();
self.renderCharts();
self.updateNOW = false;
}
if (self.updateCounter < self.updateFrequency) {
return false;
}
@ -57,12 +74,22 @@ var dashboardView = Backbone.View.extend({
template: new EJS({url: 'js/templates/dashboardView.ejs'}),
countCollections: function() {
var self = this;
$.each(window.arangoCollectionsStore.models, function(k,v) {
if ( self.collectionsStats[this.attributes.status] === undefined ) {
self.collectionsStats[this.attributes.status] = 0;
}
self.collectionsStats[this.attributes.status]++;
});
},
render: function() {
var self = this;
$(this.el).html(this.template.text);
//Client calculated charts
self.genCustomCategories();
/*self.genCustomCategories();
self.genCustomChartDescription(
"userTime + systemTime",
"custom",
@ -70,11 +97,10 @@ var dashboardView = Backbone.View.extend({
"Total Time (User+System)",
"accumulated",
"seconds"
);
);*/
var counter = 1;
$.each(this.options.description.models[0].attributes.groups, function () {
console.log(this);
$('.thumbnails').append(
'<ul class="statGroups" id="' + this.group + '">' +
'<i class="group-close icon-minus icon-white"></i>' +
@ -112,45 +138,45 @@ var dashboardView = Backbone.View.extend({
}
return this;
},
//generate function for all custom categories
genCustomCategories: function () {
this.genCustomCategory("Client calculated charts", "custom", "Customized Charts");
},
//generate a custom category
genCustomCategory: function(description, group, name) {
this.options.description.models[0].attributes.groups.push({
"description":description,
"group":group,
"name":name
});
},
//generate a custom description
genCustomChartDescription: function (description, group, identifier, name, type, units) {
var figure = {
"description" : description,
"group" : group,
"identifier" : identifier,
"name" : name,
"type" : type,
"units" : units
};
this.options.description.models[0].attributes.figures.push(figure);
this.renderFigure(figure);
},
//calculate customized chart value functions here
updateCustomChartValues: function () {
this.totalTime2();
},
//custom chart value calculation for totalTime2
totalTime2: function () {
var val1 = this.collection.models[0].attributes.system.userTime;
var val2 = this.collection.models[0].attributes.system.systemTime;
var totalTime2Value = val1+val2;
this.collection.models[0].attributes["custom"] = {"totalTime2":totalTime2Value};
addCustomCharts: function () {
var self = this;
var figure = {
"description" : "my custom chart",
"group" : "custom",
"identifier" : "custom1",
"name" : "Custom1",
"type" : "accumulated",
"units" : "seconds",
"exec" : function () {
var val1 = self.collection.models[0].attributes.system.userTime;
var val2 = self.collection.models[0].attributes.system.systemTime;
var totalTime2Value = val1+val2;
return totalTime2Value;
}
};
var addGroup = true;
$.each(this.options.description.models[0].attributes.groups, function(k, v) {
if (self.options.description.models[0].attributes.groups[k].group === figure.group) {
addGroup = false;
}
});
if (addGroup == true) {
self.options.description.models[0].attributes.groups.push({
"description" : "custom",
"group" : "custom",
"name" : "custom"
});
}
this.options.description.models[0].attributes.figures.push(figure);
},
checkInterval: function (a) {
var self = this;
this.updateFrequency = a.target.value;
self.calculateSeries();
self.renderCharts();
@ -243,20 +269,56 @@ var dashboardView = Backbone.View.extend({
$.each(this.options.description.models[0].attributes.figures, function () {
if(this.identifier === self.detailGraph) {
$('#detailGraphHeader').text(this.name);
self.calculateSeries();
self.renderCharts();
$("html, body").animate({ scrollTop: 0 }, "slow");
$('#detailGraphChart').show();
$('#detailGraph').height(300);
$('#dbHideSwitch').addClass('icon-minus');
$('#dbHideSwitch').removeClass('icon-plus');
self.updateNOW = true;
self.calculateSeries();
self.renderCharts();
}
});
},
renderCollectionsChart: function () {
var self = this;
nv.addGraph(function() {
var chart = nv.models.pieChart()
.x(function(d) { return d.label })
.y(function(d) { return d.value })
.showLabels(true);
d3.select("#detailCollectionsChart svg")
.datum(self.convertCollections())
.transition().duration(1200)
.call(chart);
return chart;
});
},
convertCollections: function () {
var self = this;
var collValues = [];
$.each(self.collectionsStats, function(k,v) {
collValues.push({
"label" : k,
"value" : v,
});
});
return [{
key: "Collections Status",
values: collValues
}];
},
renderCharts: function () {
var self = this;
$('#every'+self.updateFrequency+'seconds').prop('checked',true);
self.renderCollectionsChart();
$.each(self.options.description.models[0].attributes.figures, function () {
var figure = this;
@ -305,22 +367,25 @@ var dashboardView = Backbone.View.extend({
}
if (self.detailGraph === identifier) {
d3.select("#detailGraphChart svg")
.call(chart)
.datum([ { values: self.seriesData[identifier].values, key: identifier, color: "#8AA051" } ])
.transition().duration(500);
}
d3.select("#" + identifier + "Chart svg")
.call(chart)
.datum([ { values: self.seriesData[identifier].values, key: identifier, color: "#8AA051" } ])
.transition().duration(500);
}
else {
}
//disable ticks for small charts
//disable label for small charts
d3.select("#" + identifier + "Chart svg")
.call(chart)
.datum([ { values: self.seriesData[identifier].values, key: identifier, color: "#8AA051" } ])
.transition().duration(500);
});
},
calculateSeries: function (flush) {
var self = this;
self.updateCustomChartValues();
var timeStamp = Math.round(new Date() * 10);
@ -341,7 +406,14 @@ var dashboardView = Backbone.View.extend({
return;
}
var responseValue = self.collection.models[0].attributes[figure.group][identifier];
var responseValue;
if (figure.exec) {
responseValue = figure.exec();
}
else {
responseValue = self.collection.models[0].attributes[figure.group][identifier];
}
if (responseValue !== undefined && responseValue !== null) {
if (responseValue.sum !== undefined) {
@ -402,8 +474,10 @@ var dashboardView = Backbone.View.extend({
);
$('#' + figure.group + 'Divider').before(
'<li><a><label class="checkbox">'+
'<input type="checkbox" id=' + figure.identifier + 'Checkbox checked>' + figure.name + '</label></a></li>'
'<li><a><label class="checkbox checkboxLabel">'+
'<input class="css-checkbox" type="checkbox" id=' + figure.identifier + 'Checkbox checked/>' +
'<label class="css-label"/>' +
figure.name + '</label></a></li>'
);
$('.db-info').tooltip({
placement: "top"

View File

@ -230,8 +230,8 @@ void ApplicationEndpointServer::setupOptions (map<string, ProgramOptionsDescript
("server.cafile", &_cafile, "file containing the CA certificates of clients")
("server.ssl-protocol", &_sslProtocol, "1 = SSLv2, 2 = SSLv23, 3 = SSLv3, 4 = TLSv1")
("server.ssl-cache", &_sslCache, "use SSL session caching")
("server.ssl-options", &_sslOptions, "ssl options, see OpenSSL documentation")
("server.ssl-cipher-list", &_sslCipherList, "ssl cipher list, see OpenSSL documentation")
("server.ssl-options", &_sslOptions, "SSL options, see OpenSSL documentation")
("server.ssl-cipher-list", &_sslCipherList, "SSL cipher list, see OpenSSL documentation")
;
}

View File

@ -21,6 +21,11 @@
#ifndef _ZLIBIOAPI64_H
#define _ZLIBIOAPI64_H
#ifdef _Z_OF
#undef OF
#define OF _Z_OF
#endif
#if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__))
// Linux needs this to support file operation on files larger then 4+GB