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;
|
||||
resultDocument.openObject();
|
||||
|
||||
#warning Proper babies implementation required here
|
||||
for (auto const& it : VPackArrayIterator(body)) {
|
||||
if (it.isString()) {
|
||||
std::string vertexString(it.copyString());
|
||||
|
|
|
@ -142,7 +142,9 @@
|
|||
collection: this.arangoCollectionsStore
|
||||
});
|
||||
|
||||
this.footerView = new window.FooterView();
|
||||
this.footerView = new window.FooterView({
|
||||
collection: self.coordinatorCollection
|
||||
});
|
||||
this.notificationList = new window.NotificationCollection();
|
||||
|
||||
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">
|
||||
<ul class="navlist arango-collection-ul" id="arangoCollectionUl">
|
||||
<% 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="nodes-menu"><a id="nodes" class="tab" href="#nodes"><i class="fa fa-server"></i>Nodes</a></li>
|
||||
<% } else { %>
|
||||
|
|
|
@ -160,12 +160,9 @@
|
|||
var totalMem = data.physicalMemory;
|
||||
var usedMem = data.residentSizeCurrent;
|
||||
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') {
|
||||
$(id).html(value);
|
||||
}
|
||||
|
@ -175,11 +172,60 @@
|
|||
var percent = 1 / (b/a) * 100;
|
||||
$(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() {
|
||||
this.renderValue('#clusterNodes', this.statCollectCoord.size());
|
||||
this.renderValue('#clusterRam', [1024, 4096]);
|
||||
var self = this;
|
||||
|
||||
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() {
|
||||
|
@ -446,7 +492,6 @@
|
|||
|
||||
var mergeHistory = function(data) {
|
||||
|
||||
|
||||
var onetime = ['times'];
|
||||
var values = [
|
||||
'physicalMemory',
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
template: templateEngine.createTemplate("footerView.ejs"),
|
||||
|
||||
showServerStatus: function(isOnline) {
|
||||
var self = this;
|
||||
|
||||
if (!window.App.isCluster) {
|
||||
if (isOnline === true) {
|
||||
$('#healthStatus').removeClass('negative');
|
||||
|
@ -46,6 +48,55 @@
|
|||
$('.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() {
|
||||
|
|
|
@ -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) {
|
||||
console.log("yes");
|
||||
$('#subNavigationBar .breadcrumb').html("Node: " + name);
|
||||
},
|
||||
|
||||
render: function () {
|
||||
console.log(1);
|
||||
this.$el.html(this.template.render({coords: []}));
|
||||
|
||||
var callback = function() {
|
||||
this.continueRender();
|
||||
this.breadcrumb(this.coordname);
|
||||
$(window).trigger('resize');
|
||||
}.bind(this);
|
||||
|
||||
if (!this.initDone) {
|
||||
|
@ -58,6 +57,8 @@
|
|||
},
|
||||
|
||||
continueRender: function() {
|
||||
var self = this;
|
||||
|
||||
this.dashboards[this.coordinator.get('name')] = new window.DashboardView({
|
||||
dygraphConfig: window.dygraphConfig,
|
||||
database: window.App.arangoDatabase,
|
||||
|
@ -69,6 +70,9 @@
|
|||
}
|
||||
});
|
||||
this.dashboards[this.coordinator.get('name')].render();
|
||||
window.setTimeout(function() {
|
||||
self.dashboards[self.coordinator.get('name')].resize();
|
||||
}, 100);
|
||||
},
|
||||
|
||||
waitForCoordinators: function(callback) {
|
||||
|
|
|
@ -58,7 +58,6 @@
|
|||
|
||||
continueRender: function() {
|
||||
var coords = this.coordinators.toJSON();
|
||||
console.log(coords);
|
||||
this.$el.html(this.template.render({
|
||||
coords: coords
|
||||
}));
|
||||
|
|
|
@ -17,11 +17,21 @@
|
|||
border: 1px solid $c-content-border;
|
||||
margin-left: -1px;
|
||||
margin-top: -1px;
|
||||
padding: {
|
||||
bottom: 10px;
|
||||
left: 20px;
|
||||
right: 20px;
|
||||
top: 20px;
|
||||
}
|
||||
|
||||
.nv-controlsWrap {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.nv-legendWrap {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
svg {
|
||||
height: 250px;
|
||||
margin-left: -17px;
|
||||
|
@ -42,10 +52,19 @@
|
|||
margin-top: -1px;
|
||||
|
||||
.value {
|
||||
color: $c-positive;
|
||||
color: $c-black;
|
||||
font-size: 24pt;
|
||||
line-height: 150px;
|
||||
text-align: center;
|
||||
|
||||
&.positive {
|
||||
color: $c-positive;
|
||||
}
|
||||
|
||||
&.negative {
|
||||
color: $c-negative;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
div:first-child {
|
||||
|
|
Loading…
Reference in New Issue