mirror of https://gitee.com/bigwinds/arangodb
adjusted ui to internal cluster api
This commit is contained in:
parent
5509776503
commit
2a0d2bfc8c
|
@ -5,6 +5,7 @@
|
|||
window.ClusterCoordinator = Backbone.Model.extend({
|
||||
defaults: {
|
||||
'name': '',
|
||||
'id': '',
|
||||
'status': 'ok',
|
||||
'address': '',
|
||||
'protocol': ''
|
||||
|
|
|
@ -326,10 +326,10 @@
|
|||
this.clusterView.render();
|
||||
},
|
||||
|
||||
node: function (name, initialized) {
|
||||
node: function (id, initialized) {
|
||||
this.checkUser();
|
||||
if (!initialized || this.isCluster === undefined) {
|
||||
this.waitForInit(this.node.bind(this), name);
|
||||
this.waitForInit(this.node.bind(this), id);
|
||||
return;
|
||||
}
|
||||
if (this.isCluster === false) {
|
||||
|
@ -342,7 +342,7 @@
|
|||
this.nodeView.remove();
|
||||
}
|
||||
this.nodeView = new window.NodeView({
|
||||
coordname: name,
|
||||
coordid: id,
|
||||
coordinators: this.coordinatorCollection,
|
||||
dbServers: this.dbServers
|
||||
});
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
if (window.App.isCluster) {
|
||||
this.coordinators = options.coordinators;
|
||||
this.dbServers = options.dbServers;
|
||||
this.coordname = options.coordname;
|
||||
this.coordid = options.coordid;
|
||||
this.updateServerTime();
|
||||
|
||||
// start polling with interval
|
||||
|
@ -47,8 +47,7 @@
|
|||
|
||||
var callback = function () {
|
||||
this.continueRender();
|
||||
this.breadcrumb(arangoHelper.getCoordinatorShortName(this.coordname));
|
||||
// window.arangoHelper.buildNodeSubNav(this.coordname, 'Dashboard', 'Logs')
|
||||
this.breadcrumb(arangoHelper.getCoordinatorShortName(this.coordid));
|
||||
$(window).trigger('resize');
|
||||
}.bind(this);
|
||||
|
||||
|
@ -59,8 +58,8 @@
|
|||
if (!this.initDBDone) {
|
||||
this.waitForDBServers(callback);
|
||||
} else {
|
||||
this.coordname = window.location.hash.split('/')[1];
|
||||
this.coordinator = this.coordinators.findWhere({name: this.coordname});
|
||||
this.coordid = window.location.hash.split('/')[1];
|
||||
this.coordinator = this.coordinators.findWhere({id: this.coordid});
|
||||
callback();
|
||||
}
|
||||
},
|
||||
|
@ -79,7 +78,7 @@
|
|||
raw: this.coordinator.get('address'),
|
||||
isDBServer: false,
|
||||
endpoint: this.coordinator.get('protocol') + '://' + this.coordinator.get('address'),
|
||||
target: this.coordinator.get('name')
|
||||
target: this.coordinator.get('id')
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
@ -113,7 +112,7 @@
|
|||
if (self.coordinators.length === 0) {
|
||||
self.waitForCoordinators(callback);
|
||||
} else {
|
||||
self.coordinator = self.coordinators.findWhere({name: self.coordname});
|
||||
self.coordinator = self.coordinators.findWhere({id: self.coordid});
|
||||
self.initCoordDone = true;
|
||||
if (callback) {
|
||||
callback();
|
||||
|
|
Loading…
Reference in New Issue