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
|
||||
</button>
|
||||
<button id="installFoxxFromGithub" class="button-success btn-old-padding" style="float:right">
|
||||
Install from Github
|
||||
Download from Github
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -286,12 +286,18 @@
|
|||
else {
|
||||
this.showSystemInfoMod(this.fillInfoValues());
|
||||
}
|
||||
this.selectHighestVersion();
|
||||
},
|
||||
|
||||
installDialog: function(event) {
|
||||
|
||||
var currentVersion = $('.modalSelect').val();
|
||||
|
||||
window.modalView.hide();
|
||||
event.stopPropagation();
|
||||
this.showMod(this.fillValues());
|
||||
|
||||
this.selectSpecificVersion(currentVersion);
|
||||
},
|
||||
|
||||
update: function() {
|
||||
|
@ -349,6 +355,11 @@
|
|||
error: function(e, info) {
|
||||
if (info.responseText.indexOf("already used by") > -1) {
|
||||
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 {
|
||||
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(){
|
||||
var activeVersion = this.model.get("activeVersion");
|
||||
|
||||
|
|
Loading…
Reference in New Issue