mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/arangodb/arangodb into devel
This commit is contained in:
commit
881f13e13b
|
@ -405,7 +405,6 @@ bool RestEdgesHandler::readEdgesForMultipleVertices() {
|
||||||
VPackBuilder resultDocument;
|
VPackBuilder resultDocument;
|
||||||
resultDocument.openObject();
|
resultDocument.openObject();
|
||||||
|
|
||||||
#warning Proper babies implementation required here
|
|
||||||
for (auto const& it : VPackArrayIterator(body)) {
|
for (auto const& it : VPackArrayIterator(body)) {
|
||||||
if (it.isString()) {
|
if (it.isString()) {
|
||||||
std::string vertexString(it.copyString());
|
std::string vertexString(it.copyString());
|
||||||
|
|
|
@ -142,7 +142,9 @@
|
||||||
collection: this.arangoCollectionsStore
|
collection: this.arangoCollectionsStore
|
||||||
});
|
});
|
||||||
|
|
||||||
this.footerView = new window.FooterView();
|
this.footerView = new window.FooterView({
|
||||||
|
collection: self.coordinatorCollection
|
||||||
|
});
|
||||||
this.notificationList = new window.NotificationCollection();
|
this.notificationList = new window.NotificationCollection();
|
||||||
|
|
||||||
this.currentDB.fetch({
|
this.currentDB.fetch({
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
<script id="helpUsView.ejs" type="text/template">
|
||||||
|
|
||||||
|
<div class="helpUs">
|
||||||
|
<div class="_form_87"></div><script src="https://arangodb.activehosted.com/f/embed.php?id=87" type="text/javascript" charset="utf-8"></script>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</script>
|
|
@ -1,6 +1,7 @@
|
||||||
<script id="navigationView.ejs" type="text/template">
|
<script id="navigationView.ejs" type="text/template">
|
||||||
<ul class="navlist arango-collection-ul" id="arangoCollectionUl">
|
<ul class="navlist arango-collection-ul" id="arangoCollectionUl">
|
||||||
<% if (isCluster) { %>
|
<% if (isCluster) { %>
|
||||||
|
<li class="navbar-spacer big"></li>
|
||||||
<li class="cluster-menu"><a id="cluster" class="tab" href="#cluster"><i class="fa fa-circle-o"></i>Cluster</a></li>
|
<li class="cluster-menu"><a id="cluster" class="tab" href="#cluster"><i class="fa fa-circle-o"></i>Cluster</a></li>
|
||||||
<li class="nodes-menu"><a id="nodes" class="tab" href="#nodes"><i class="fa fa-server"></i>Nodes</a></li>
|
<li class="nodes-menu"><a id="nodes" class="tab" href="#nodes"><i class="fa fa-server"></i>Nodes</a></li>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
|
|
|
@ -150,7 +150,7 @@
|
||||||
|
|
||||||
rerenderValues: function(data) {
|
rerenderValues: function(data) {
|
||||||
|
|
||||||
// TODO cache value state like graph data
|
//TODO cache value state like graph data
|
||||||
|
|
||||||
//Connections
|
//Connections
|
||||||
this.renderValue('#clusterConnections', Math.round(data.clientConnectionsCurrent));
|
this.renderValue('#clusterConnections', Math.round(data.clientConnectionsCurrent));
|
||||||
|
@ -160,12 +160,9 @@
|
||||||
var totalMem = data.physicalMemory;
|
var totalMem = data.physicalMemory;
|
||||||
var usedMem = data.residentSizeCurrent;
|
var usedMem = data.residentSizeCurrent;
|
||||||
this.renderValue('#clusterRam', [usedMem, totalMem]);
|
this.renderValue('#clusterRam', [usedMem, totalMem]);
|
||||||
|
|
||||||
//NODES
|
|
||||||
this.renderValue('#clusterNodes', this.statCollectCoord.size());
|
|
||||||
},
|
},
|
||||||
|
|
||||||
renderValue: function(id, value) {
|
renderValue: function(id, value, error) {
|
||||||
if (typeof value === 'number') {
|
if (typeof value === 'number') {
|
||||||
$(id).html(value);
|
$(id).html(value);
|
||||||
}
|
}
|
||||||
|
@ -175,11 +172,60 @@
|
||||||
var percent = 1 / (b/a) * 100;
|
var percent = 1 / (b/a) * 100;
|
||||||
$(id).html(percent.toFixed(1) + ' %');
|
$(id).html(percent.toFixed(1) + ' %');
|
||||||
}
|
}
|
||||||
|
else if (typeof value === 'string') {
|
||||||
|
$(id).html(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (error) {
|
||||||
|
$(id).addClass('negative');
|
||||||
|
$(id).removeClass('positive');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$(id).addClass('positive');
|
||||||
|
$(id).removeClass('negative');
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
updateValues: function() {
|
updateValues: function() {
|
||||||
this.renderValue('#clusterNodes', this.statCollectCoord.size());
|
var self = this;
|
||||||
this.renderValue('#clusterRam', [1024, 4096]);
|
|
||||||
|
this.coordinators.fetch({
|
||||||
|
success: function() {
|
||||||
|
self.renderNode(true);
|
||||||
|
},
|
||||||
|
error: function() {
|
||||||
|
self.renderNode(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//this.renderValue('#clusterRam', [1024, 4096]);
|
||||||
|
},
|
||||||
|
|
||||||
|
renderNode: function(connection) {
|
||||||
|
var ok = 0, error = 0;
|
||||||
|
|
||||||
|
if (connection) {
|
||||||
|
this.coordinators.each(function(value) {
|
||||||
|
if (value.toJSON().status === 'ok') {
|
||||||
|
ok++;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
error++;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (error > 0) {
|
||||||
|
var total = error + ok;
|
||||||
|
this.renderValue('#clusterNodes', ok + '/' + total, true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.renderValue('#clusterNodes', ok);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.renderValue('#clusterNodes', 'OFFLINE', true);
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
initValues: function() {
|
initValues: function() {
|
||||||
|
@ -446,7 +492,6 @@
|
||||||
|
|
||||||
var mergeHistory = function(data) {
|
var mergeHistory = function(data) {
|
||||||
|
|
||||||
|
|
||||||
var onetime = ['times'];
|
var onetime = ['times'];
|
||||||
var values = [
|
var values = [
|
||||||
'physicalMemory',
|
'physicalMemory',
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
initialize: function () {
|
initialize: function () {
|
||||||
//also server online check
|
//also server online check
|
||||||
var self = this;
|
var self = this;
|
||||||
window.setInterval(function(){
|
window.setInterval(function() {
|
||||||
self.getVersion();
|
self.getVersion();
|
||||||
}, 15000);
|
}, 15000);
|
||||||
self.getVersion();
|
self.getVersion();
|
||||||
|
@ -32,6 +32,8 @@
|
||||||
template: templateEngine.createTemplate("footerView.ejs"),
|
template: templateEngine.createTemplate("footerView.ejs"),
|
||||||
|
|
||||||
showServerStatus: function(isOnline) {
|
showServerStatus: function(isOnline) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
if (!window.App.isCluster) {
|
if (!window.App.isCluster) {
|
||||||
if (isOnline === true) {
|
if (isOnline === true) {
|
||||||
$('#healthStatus').removeClass('negative');
|
$('#healthStatus').removeClass('negative');
|
||||||
|
@ -46,6 +48,55 @@
|
||||||
$('.health-icon').html('<i class="fa fa-exclamation-circle"></i>');
|
$('.health-icon').html('<i class="fa fa-exclamation-circle"></i>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
self.collection.fetch({
|
||||||
|
success: function() {
|
||||||
|
self.renderClusterState(true);
|
||||||
|
},
|
||||||
|
error: function() {
|
||||||
|
self.renderClusterState(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
renderClusterState: function(connection) {
|
||||||
|
var ok = 0, error = 0;
|
||||||
|
|
||||||
|
if (connection) {
|
||||||
|
this.collection.each(function(value) {
|
||||||
|
if (value.toJSON().status === 'ok') {
|
||||||
|
ok++;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
error++;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (error > 0) {
|
||||||
|
$('#healthStatus').removeClass('positive');
|
||||||
|
$('#healthStatus').addClass('negative');
|
||||||
|
if (error === 1) {
|
||||||
|
$('.health-state').html(error + ' NODE ERROR');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('.health-state').html(error + ' NODES ERROR');
|
||||||
|
}
|
||||||
|
$('.health-icon').html('<i class="fa fa-exclamation-circle"></i>');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('#healthStatus').removeClass('negative');
|
||||||
|
$('#healthStatus').addClass('positive');
|
||||||
|
$('.health-state').html('NODES OK');
|
||||||
|
$('.health-icon').html('<i class="fa fa-check-circle"></i>');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('#healthStatus').removeClass('positive');
|
||||||
|
$('#healthStatus').addClass('negative');
|
||||||
|
$('.health-state').html(window.location.host + ' OFFLINE');
|
||||||
|
$('.health-icon').html('<i class="fa fa-exclamation-circle"></i>');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
showShortcutModal: function() {
|
showShortcutModal: function() {
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*jshint browser: true */
|
||||||
|
/*jshint unused: false */
|
||||||
|
/*global arangoHelper, Backbone, templateEngine, $, window*/
|
||||||
|
(function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
window.HelpUsView = Backbone.View.extend({
|
||||||
|
|
||||||
|
el: "#content",
|
||||||
|
|
||||||
|
template: templateEngine.createTemplate("helpUsView.ejs"),
|
||||||
|
|
||||||
|
render: function () {
|
||||||
|
this.$el.html(this.template.render({}));
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}());
|
|
@ -34,17 +34,16 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
breadcrumb: function(name) {
|
breadcrumb: function(name) {
|
||||||
console.log("yes");
|
|
||||||
$('#subNavigationBar .breadcrumb').html("Node: " + name);
|
$('#subNavigationBar .breadcrumb').html("Node: " + name);
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
console.log(1);
|
|
||||||
this.$el.html(this.template.render({coords: []}));
|
this.$el.html(this.template.render({coords: []}));
|
||||||
|
|
||||||
var callback = function() {
|
var callback = function() {
|
||||||
this.continueRender();
|
this.continueRender();
|
||||||
this.breadcrumb(this.coordname);
|
this.breadcrumb(this.coordname);
|
||||||
|
$(window).trigger('resize');
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
|
|
||||||
if (!this.initDone) {
|
if (!this.initDone) {
|
||||||
|
@ -58,6 +57,8 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
continueRender: function() {
|
continueRender: function() {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
this.dashboards[this.coordinator.get('name')] = new window.DashboardView({
|
this.dashboards[this.coordinator.get('name')] = new window.DashboardView({
|
||||||
dygraphConfig: window.dygraphConfig,
|
dygraphConfig: window.dygraphConfig,
|
||||||
database: window.App.arangoDatabase,
|
database: window.App.arangoDatabase,
|
||||||
|
@ -69,6 +70,9 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.dashboards[this.coordinator.get('name')].render();
|
this.dashboards[this.coordinator.get('name')].render();
|
||||||
|
window.setTimeout(function() {
|
||||||
|
self.dashboards[self.coordinator.get('name')].resize();
|
||||||
|
}, 100);
|
||||||
},
|
},
|
||||||
|
|
||||||
waitForCoordinators: function(callback) {
|
waitForCoordinators: function(callback) {
|
||||||
|
|
|
@ -58,7 +58,6 @@
|
||||||
|
|
||||||
continueRender: function() {
|
continueRender: function() {
|
||||||
var coords = this.coordinators.toJSON();
|
var coords = this.coordinators.toJSON();
|
||||||
console.log(coords);
|
|
||||||
this.$el.html(this.template.render({
|
this.$el.html(this.template.render({
|
||||||
coords: coords
|
coords: coords
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -17,11 +17,21 @@
|
||||||
border: 1px solid $c-content-border;
|
border: 1px solid $c-content-border;
|
||||||
margin-left: -1px;
|
margin-left: -1px;
|
||||||
margin-top: -1px;
|
margin-top: -1px;
|
||||||
|
padding: {
|
||||||
|
bottom: 10px;
|
||||||
|
left: 20px;
|
||||||
|
right: 20px;
|
||||||
|
top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.nv-controlsWrap {
|
.nv-controlsWrap {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nv-legendWrap {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
height: 250px;
|
height: 250px;
|
||||||
margin-left: -17px;
|
margin-left: -17px;
|
||||||
|
@ -42,10 +52,19 @@
|
||||||
margin-top: -1px;
|
margin-top: -1px;
|
||||||
|
|
||||||
.value {
|
.value {
|
||||||
color: $c-positive;
|
color: $c-black;
|
||||||
font-size: 24pt;
|
font-size: 24pt;
|
||||||
line-height: 150px;
|
line-height: 150px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
&.positive {
|
||||||
|
color: $c-positive;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.negative {
|
||||||
|
color: $c-negative;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
div:first-child {
|
div:first-child {
|
||||||
|
|
Loading…
Reference in New Issue