1
0
Fork 0

satisfy jslint

This commit is contained in:
Jan Steemann 2014-12-16 15:37:15 +01:00
parent a8ad216a0a
commit 61f799ecf0
3 changed files with 10 additions and 12 deletions

View File

@ -48,7 +48,6 @@
result = data; result = data;
}, },
error: function(data) { error: function(data) {
console.log(data);
result = { result = {
error: true error: true
}; };

View File

@ -1,6 +1,6 @@
/*jshint browser: true */ /*jshint browser: true */
/*jshint strict: false, unused: false */ /*jshint strict: false, unused: false */
/*global Backbone, $, window, arangoHelper, templateEngine, Joi, _*/ /*global Backbone, $, window, arangoHelper, templateEngine, Joi, alert, _*/
(function() { (function() {
"use strict"; "use strict";
@ -73,11 +73,11 @@
[ [
{ {
rule: Joi.string().regex(/^[a-zA-Z0-9]+[\/]/), rule: Joi.string().regex(/^[a-zA-Z0-9]+[\/]/),
msg: "No valid github link given." msg: "No valid Github link given."
}, },
{ {
rule: Joi.string().required(), rule: Joi.string().required(),
msg: "No github link given." msg: "No Github link given."
} }
] ]
)); ));
@ -445,7 +445,7 @@
} else { } else {
switch(result.errorNum) { switch(result.errorNum) {
case 1752: case 1752:
alert("Unable to download Application from the given repository"); alert("Unable to download application from the given repository");
break; break;
default: default:
alert("Error: " + result.errorNum + ". " + result.errorMessage); alert("Error: " + result.errorNum + ". " + result.errorMessage);
@ -462,7 +462,7 @@
"mount-point", "mount-point",
"Mount", "Mount",
"", "",
"The path the App will be mounted. Has to start with /. Is not allowed to start with /_", "The path the app will be mounted. Has to start with /. Is not allowed to start with /_",
"/my/app", "/my/app",
true, true,
//TODO nochmal schauen //TODO nochmal schauen
@ -502,6 +502,7 @@
rule: Joi.number().integer(), rule: Joi.number().integer(),
msg: "Has to be an integer." msg: "Has to be an integer."
}]; }];
/* falls through */
default: default:
if (check === undefined) { if (check === undefined) {
check = [{ check = [{
@ -530,7 +531,7 @@
window.modalView.createSuccessButton("Configure", this.mountFoxx.bind(this, config, name, version)) window.modalView.createSuccessButton("Configure", this.mountFoxx.bind(this, config, name, version))
); );
window.modalView.show( window.modalView.show(
"modalTable.ejs", "Configure Application", buttons, tableContent "modalTable.ejs", "Configure application", buttons, tableContent
); );
}, },
@ -598,7 +599,7 @@
}, },
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) { } else if (info.responseText.indexOf("app is not defined") > -1) {
//temp ignore this message, fix needs to be server-side //temp ignore this message, fix needs to be server-side
window.modalView.hide(); window.modalView.hide();
@ -624,7 +625,7 @@
]; ];
window.modalView.show( window.modalView.show(
"modalDownloadFoxx.ejs", "modalDownloadFoxx.ejs",
"Download Application", "Download application",
buttons buttons
); );
}, },
@ -720,7 +721,7 @@
); );
window.modalView.show( window.modalView.show(
"modalApplicationMount.ejs", "modalApplicationMount.ejs",
"Install Application", "Install application",
buttons, buttons,
undefined, undefined,
undefined, undefined,

View File

@ -29,8 +29,6 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
var arangodb = require("org/arangodb"); var arangodb = require("org/arangodb");
var ArangoError = arangodb.ArangoError;
var console = require("console"); var console = require("console");
var fs = require("fs"); var fs = require("fs");
var utils = require("org/arangodb/foxx/manager-utils"); var utils = require("org/arangodb/foxx/manager-utils");