mirror of https://gitee.com/bigwinds/arangodb
created new dashboard route in showClusterView
This commit is contained in:
parent
616dd60028
commit
c8856ab3f6
|
@ -11,7 +11,8 @@
|
||||||
"planSymmetrical" : "planSymmetric",
|
"planSymmetrical" : "planSymmetric",
|
||||||
"planAsymmetrical" : "planAsymmetric",
|
"planAsymmetrical" : "planAsymmetric",
|
||||||
"shards" : "showShards",
|
"shards" : "showShards",
|
||||||
"showCluster" : "showCluster"
|
"showCluster" : "showCluster",
|
||||||
|
"dashboard/:server" : "dashboard"
|
||||||
},
|
},
|
||||||
|
|
||||||
getNewRoute: function(last) {
|
getNewRoute: function(last) {
|
||||||
|
@ -106,6 +107,30 @@
|
||||||
this.clusterDownView = new window.ClusterDownView();
|
this.clusterDownView = new window.ClusterDownView();
|
||||||
}
|
}
|
||||||
this.clusterDownView.render(content);
|
this.clusterDownView.render(content);
|
||||||
|
},
|
||||||
|
|
||||||
|
dashboard: function(server) {
|
||||||
|
console.log(server);
|
||||||
|
if (this.statisticsDescription === undefined) {
|
||||||
|
this.statisticsDescription = new window.StatisticsDescription();
|
||||||
|
this.statisticsDescription.fetch({
|
||||||
|
async:false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (this.statistics === undefined) {
|
||||||
|
this.statisticsCollection = new window.StatisticsCollection();
|
||||||
|
}
|
||||||
|
console.log(this.statisticsCollection);
|
||||||
|
console.log(this.statisticsDescription);
|
||||||
|
console.log( window.arangoDocumentsStore);
|
||||||
|
if (this.dashboardView === undefined) {
|
||||||
|
this.dashboardView = new dashboardView({
|
||||||
|
collection: this.statisticsCollection,
|
||||||
|
description: this.statisticsDescription,
|
||||||
|
documentStore: new window.arangoDocumentsStore()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.dashboardView.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
console.log(c);
|
console.log(c);
|
||||||
%>
|
%>
|
||||||
<li class="tile">
|
<li class="tile">
|
||||||
<div class="coordinator <%=statusClass(c.get('status'))%> href="/_db/_system/_admin/aardvark/cluster/dashboard/<%=c.get('address')%>">
|
<div class="coordinator <%=statusClass(c.get('status'))%>" id="<%=c.get('address')%>">
|
||||||
<span class="clusterInfoIcon icon_arangodb_compass"></span>
|
<span class="clusterInfoIcon icon_arangodb_compass"></span>
|
||||||
</div>
|
</div>
|
||||||
<h5 class="collectionName"><%=c.get("name")%></h5>
|
<h5 class="collectionName"><%=c.get("name")%></h5>
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
_.each(s.dbs, function(c) {
|
_.each(s.dbs, function(c) {
|
||||||
%>
|
%>
|
||||||
<li class="tile">
|
<li class="tile">
|
||||||
<div class="dbserver <%=statusClass(c.get('status'))%>" href="/_db/_system/_admin/aardvark/cluster/dashboard/<%=c.get('address')%>">
|
<div class="dbserver <%=statusClass(c.get('status'))%>" id="<%=c.get('address')%>">
|
||||||
<span class="clusterInfoIcon icon_arangodb_database1"></span>
|
<span class="clusterInfoIcon icon_arangodb_database1"></span>
|
||||||
</div>
|
</div>
|
||||||
<h5 class="collectionName"><%=c.get("name")%> (Shards: <span id="<%=c.get("name")%>Shards" class="shardCounter"/>)</h5>
|
<h5 class="collectionName"><%=c.get("name")%> (Shards: <span id="<%=c.get("name")%>Shards" class="shardCounter"/>)</h5>
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
%>
|
%>
|
||||||
<li class="tile">
|
<li class="tile">
|
||||||
<% _.each(s.coords, function(c) { %>
|
<% _.each(s.coords, function(c) { %>
|
||||||
<div class="coordinator <%=statusClass(c.get('status'))%> href="/_db/_system/_admin/aardvark/cluster/dashboard/<%=c.get('address')%>">
|
<div class="coordinator <%=statusClass(c.get('status'))%>" id="<%=c.get('address')%>">
|
||||||
<span class="clusterInfoIcon icon_arangodb_compass"></span>
|
<span class="clusterInfoIcon icon_arangodb_compass"></span>
|
||||||
<h6 class="serverName"><%=c.get("name")%></h6>
|
<h6 class="serverName"><%=c.get("name")%></h6>
|
||||||
</div>
|
</div>
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
_.each(s.dbs, function(c) {
|
_.each(s.dbs, function(c) {
|
||||||
dbName = c.get("name");
|
dbName = c.get("name");
|
||||||
%>
|
%>
|
||||||
<div class="dbserver <%=statusClass(c.get('status'))%> href="/_db/_system/_admin/aardvark/cluster/dashboard/<%=c.get('address')%>">
|
<div class="dbserver <%=statusClass(c.get('status'))%>" id="<%=c.get('address')%>">
|
||||||
<span class="clusterInfoIcon icon_arangodb_database1"></span>
|
<span class="clusterInfoIcon icon_arangodb_database1"></span>
|
||||||
<h6 class="serverName"><%=c.get("name")%></h6>
|
<h6 class="serverName"><%=c.get("name")%></h6>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
events: {
|
events: {
|
||||||
"change #selectDB" : "updateCollections",
|
"change #selectDB" : "updateCollections",
|
||||||
"change #selectCol" : "updateShards",
|
"change #selectCol" : "updateShards",
|
||||||
|
"click .coordinator" : "dashboard",
|
||||||
|
"click .dbserver" : "dashboard",
|
||||||
"click #clusterShutdown" : "clusterShutdown",
|
"click #clusterShutdown" : "clusterShutdown",
|
||||||
"mouseover #lineGraph" : "setShowAll",
|
"mouseover #lineGraph" : "setShowAll",
|
||||||
"mouseout #lineGraph" : "resetShowAll"
|
"mouseout #lineGraph" : "resetShowAll"
|
||||||
|
@ -402,8 +404,11 @@
|
||||||
|
|
||||||
clusterShutdown : function() {
|
clusterShutdown : function() {
|
||||||
window.App.navigate("", {trigger: true});
|
window.App.navigate("", {trigger: true});
|
||||||
|
},
|
||||||
|
dashboard: function(e) {
|
||||||
|
var id = $(e.currentTarget).attr("id");
|
||||||
|
window.App.navigate("dashboard/"+id, {trigger: true});
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}());
|
}());
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
offset: 0,
|
offset: 0,
|
||||||
|
|
||||||
url: '/_api/documents',
|
url: '/_api/documents',
|
||||||
model: arangoDocumentModel,
|
model: window.arangoDocumentModel,
|
||||||
getFirstDocuments: function () {
|
getFirstDocuments: function () {
|
||||||
if (this.currentPage !== 1) {
|
if (this.currentPage !== 1) {
|
||||||
var link = window.location.hash.split("/");
|
var link = window.location.hash.split("/");
|
||||||
|
|
|
@ -286,7 +286,7 @@
|
||||||
|
|
||||||
|
|
||||||
initialize: function () {
|
initialize: function () {
|
||||||
this.arangoReplication = new window.ArangoReplication();
|
console.log();
|
||||||
this.documentStore = this.options.documentStore;
|
this.documentStore = this.options.documentStore;
|
||||||
this.getStatisticHistory();
|
this.getStatisticHistory();
|
||||||
this.description = this.options.description.models[0];
|
this.description = this.options.description.models[0];
|
||||||
|
@ -596,7 +596,6 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
stopUpdating: function () {
|
stopUpdating: function () {
|
||||||
console.log("stopupdating");
|
|
||||||
this.isUpdating = false;
|
this.isUpdating = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -155,6 +155,10 @@
|
||||||
"frontend/html/start.html.part",
|
"frontend/html/start.html.part",
|
||||||
"clusterFrontend/html/head.html.part",
|
"clusterFrontend/html/head.html.part",
|
||||||
"frontend/js/templates/**",
|
"frontend/js/templates/**",
|
||||||
|
"frontend/js/templates/dashboardView.ejs",
|
||||||
|
"frontend/js/templates/dashboardDistributed.ejs",
|
||||||
|
"frontend/js/templates/dashboardHttpGroup.ejs",
|
||||||
|
"frontend/js/templates/lineChartDetailView.ejs",
|
||||||
"clusterFrontend/js/templates/**",
|
"clusterFrontend/js/templates/**",
|
||||||
"frontend/html/body.html.part",
|
"frontend/html/body.html.part",
|
||||||
"clusterFrontend/html/scripts.html.part",
|
"clusterFrontend/html/scripts.html.part",
|
||||||
|
@ -164,7 +168,8 @@
|
||||||
|
|
||||||
"css/cluster.css": {
|
"css/cluster.css": {
|
||||||
"files": [
|
"files": [
|
||||||
"frontend/scss/cluster.css"
|
"frontend/scss/cluster.css",
|
||||||
|
"frontend/scss/generated.css"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -176,7 +181,10 @@
|
||||||
"clusterFrontend/js/models/**",
|
"clusterFrontend/js/models/**",
|
||||||
"clusterFrontend/js/collections/**",
|
"clusterFrontend/js/collections/**",
|
||||||
"frontend/js/views/footerView.js",
|
"frontend/js/views/footerView.js",
|
||||||
|
"frontend/js/views/dashboardView.js",
|
||||||
"frontend/js/collections/arangoStatisticsCollection.js",
|
"frontend/js/collections/arangoStatisticsCollection.js",
|
||||||
|
"frontend/js/collections/arangoDocuments.js",
|
||||||
|
"frontend/js/models/arangoDocument.js",
|
||||||
"frontend/js/collections/arangoStatisticsDescriptionCollection.js",
|
"frontend/js/collections/arangoStatisticsDescriptionCollection.js",
|
||||||
"clusterFrontend/js/views/**",
|
"clusterFrontend/js/views/**",
|
||||||
"clusterFrontend/js/routers/**"
|
"clusterFrontend/js/routers/**"
|
||||||
|
|
Loading…
Reference in New Issue