mirror of https://gitee.com/bigwinds/arangodb
better usability for foxx github installer
This commit is contained in:
parent
6191403181
commit
39cf260ff2
|
@ -57,7 +57,7 @@
|
||||||
<img id="uploadIndicator" class="upload-indicator" src="img/ajax-loader.gif"/>Import Foxx
|
<img id="uploadIndicator" class="upload-indicator" src="img/ajax-loader.gif"/>Import Foxx
|
||||||
</button>
|
</button>
|
||||||
<button id="installFoxxFromGithub" class="button-success btn-old-padding" style="float:right">
|
<button id="installFoxxFromGithub" class="button-success btn-old-padding" style="float:right">
|
||||||
Install from Github
|
Download from Github
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -286,12 +286,18 @@
|
||||||
else {
|
else {
|
||||||
this.showSystemInfoMod(this.fillInfoValues());
|
this.showSystemInfoMod(this.fillInfoValues());
|
||||||
}
|
}
|
||||||
|
this.selectHighestVersion();
|
||||||
},
|
},
|
||||||
|
|
||||||
installDialog: function(event) {
|
installDialog: function(event) {
|
||||||
|
|
||||||
|
var currentVersion = $('.modalSelect').val();
|
||||||
|
|
||||||
window.modalView.hide();
|
window.modalView.hide();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
this.showMod(this.fillValues());
|
this.showMod(this.fillValues());
|
||||||
|
|
||||||
|
this.selectSpecificVersion(currentVersion);
|
||||||
},
|
},
|
||||||
|
|
||||||
update: function() {
|
update: function() {
|
||||||
|
@ -349,6 +355,11 @@
|
||||||
error: function(e, info) {
|
error: function(e, info) {
|
||||||
if (info.responseText.indexOf("already used by") > -1) {
|
if (info.responseText.indexOf("already used by") > -1) {
|
||||||
alert("Mount-Path already in use.");
|
alert("Mount-Path already in use.");
|
||||||
|
}
|
||||||
|
else if (info.responseText.indexOf("app is not defined") > -1) {
|
||||||
|
//temp ignore this message, fix needs to be server-side
|
||||||
|
window.modalView.hide();
|
||||||
|
self.appsView.reload();
|
||||||
} else {
|
} else {
|
||||||
alert(info.statusText);
|
alert(info.statusText);
|
||||||
}
|
}
|
||||||
|
@ -356,6 +367,23 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
selectSpecificVersion: function(version) {
|
||||||
|
$('.modalSelect').val(version);
|
||||||
|
},
|
||||||
|
|
||||||
|
selectHighestVersion: function() {
|
||||||
|
var versions = this.model.get("versions"),
|
||||||
|
toRender = "0";
|
||||||
|
|
||||||
|
_.each(versions, function(version) {
|
||||||
|
if(version >= toRender) {
|
||||||
|
toRender = version;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.modalSelect').val(toRender);
|
||||||
|
},
|
||||||
|
|
||||||
render: function(){
|
render: function(){
|
||||||
var activeVersion = this.model.get("activeVersion");
|
var activeVersion = this.model.get("activeVersion");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue