Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bowerrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"directory": "remoteappmanager/static/components/"
"directory": "remoteappmanager/static/bower_components/"
}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jupyterhub_cookie_secret
doc/build
doc/source/api
doc/source/remoteappmanager_help.txt
remoteappmanager/static/components/
remoteappmanager/static/bower_components/
node_modules
.coverage
coverage/
Expand Down
68 changes: 35 additions & 33 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,46 +1,48 @@
{
"passfail" : false,
"maxerr" : 100,
"browser" : true,
"jquery" : true,
"passfail" : false,
"maxerr" : 100,
"browser" : true,
"predef" : [
"define",
"require"
],
"debug" : false,
"devel" : true,
"es5" : true,
"strict" : true,
"es5" : true,
"strict" : false,
"globalstrict" : false,
"asi" : false,
"laxbreak" : false,
"bitwise" : true,
"asi" : false,
"laxbreak" : false,
"bitwise" : true,
"boss" : false,
"unused" : true,
"curly" : true,
"eqeqeq" : true,
"eqnull" : false,
"evil" : false,
"expr" : false,
"forin" : false,
"immed" : true,
"latedef" : true,
"curly" : true,
"eqeqeq" : true,
"eqnull" : false,
"evil" : false,
"expr" : false,
"forin" : false,
"immed" : true,
"latedef" : true,
"loopfunc" : false,
"noarg" : true,
"noarg" : true,
"regexp" : true,
"regexdash" : false,
"scripturl" : true,
"shadow" : false,
"supernew" : false,
"undef" : true,
"newcap" : true,
"noempty" : true,
"nonew" : true,
"nomen" : true,
"onevar" : false,
"plusplus" : false,
"sub" : false,
"trailing" : true,
"white" : false,
"indent" : 4
"regexdash" : false,
"scripturl" : true,
"shadow" : false,
"supernew" : false,
"undef" : true,
"newcap" : true,
"noempty" : true,
"nonew" : true,
"nomen" : true,
"onevar" : false,
"plusplus" : false,
"sub" : false,
"trailing" : true,
"white" : false,
"indent" : 4,
"globals": {
"module": true
}
}
20 changes: 11 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ deps:
else \
plat_packages="docker.io python3-venv"; \
fi; \
sudo apt-get -qq install -o Dpkg::Options::="--force-confold" --force-yes -y $$plat_packages nodejs python3-pip
npm install
`npm bin`/bower install
sudo apt-get -qq install -o Dpkg::Options::="--force-confold" --force-yes -y $$plat_packages nodejs python3-pip
npm install
`npm bin`/bower install

.PHONY: pythondeps
pythondeps:
pip3 -q install --upgrade pip setuptools
pip3 -q install -r requirements.txt
pip3 -q install -r requirements.txt

.PHONY: devdeps
devdeps:
Expand All @@ -47,7 +47,7 @@ devdeps:
sudo apt-get -qq install phantomjs

.PHONY: develop
develop:
develop:
@echo "Installing application"
@echo "----------------------"
python3 setup.py -q develop
Expand All @@ -56,16 +56,18 @@ develop:
install:
@echo "Installing application"
@echo "----------------------"
npm run build
npm run build-test
python3 setup.py -q install

.PHONY: certs
certs:
certs:
@echo "Creating certificates"
@echo "---------------------"
-pushd jupyterhub && sh ../scripts/generate_certificate.sh && popd

.PHONY: db
db:
db:
@echo "Creating database"
@echo "-----------------"
pushd jupyterhub; \
Expand All @@ -92,7 +94,7 @@ testimages:
docker pull simphonyproject/filetransfer:latest; \
docker pull simphonyproject/jupyter:latest; \
fi


.PHONY: test
test: pythontest jstest
Expand All @@ -104,7 +106,7 @@ pythontest:
python -m tornado.testing discover -s remoteappmanager -t .

.PHONY: jstest
jstest:
jstest:
@echo "Running javascript testsuite"
@echo "----------------------------"
`npm bin`/jshint --config .jshintrc remoteappmanager/static/js/
Expand Down
1 change: 0 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"ionicons": "~2.0.1",
"jquery": "components/jquery#~2.0",
"moment": "~2.7",
"requirejs": "~2.1",
"datatables.net": "~1.10.12",
"datatables.net-dt": "~1.10.12",
"admin-lte": "~2.3.11",
Expand Down
18 changes: 7 additions & 11 deletions jstests/helpers.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
define([
"components/vue/dist/vue"
], function(Vue) {
"use strict";

var getRenderedText = function(Component, propsData) {
var Vue = require("vuejs");

var getRenderedText = function(Component, propsData) {
var Ctor = Vue.extend(Component);
var vm = new Ctor({ propsData: propsData }).$mount();
return vm.$el.textContent;
};
return {
};

module.exports = {
getRenderedText: getRenderedText
};
});
};
9 changes: 5 additions & 4 deletions jstests/tests.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<head>
<title>RemoteAppManager Test Runner</title>
<link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-2.0.1.css">
<script src="https://code.jquery.com/qunit/qunit-2.0.1.js"></script>
<script>
QUnit.config.autostart = false;
</script>
<script src="../remoteappmanager/static/components/requirejs/require.js" data-main="testsuite.js"></script>
<script src="../remoteappmanager/static/components/blanket/dist/qunit/blanket.js"></script>
<script src="../remoteappmanager/static/bower_components/blanket/dist/qunit/blanket.js"></script>
</head>
<body>
<div id="qunit"></div>
<div id="qunit"></div>
<div id="qunit-fixture">
<div id="applist"></div>
<div class="content-wrapper"></div>
</div>

<script src="./dist/testsuite.js"></script>
</body>
</html>
112 changes: 55 additions & 57 deletions jstests/tests/home/mock_jsapi.js
Original file line number Diff line number Diff line change
@@ -1,63 +1,61 @@
define(['jquery'], function ($) {
"use strict";
var $ = require("jquery");

return {
Application: {
data: {
"12345": {
image: {
name: "app1",
ui_name: "Application 1",
icon_128: "",
description: "description",
policy: {
allow_home: true,
volume_source: "",
volume_target: "",
volume_mode: ""
},
configurables: [
"resolution"
]
}
},
"67890": {
image: {
name: "app2",
ui_name: "Application 2",
icon_128: "",
description: "description",
policy: {
allow_home: true,
volume_source: "",
volume_target: "",
volume_mode: ""
},
configurables: []
}
module.exports = {
Application: {
data: {
"12345": {
image: {
name: "app1",
ui_name: "Application 1",
icon_128: "",
description: "description",
policy: {
allow_home: true,
volume_source: "",
volume_target: "",
volume_mode: ""
},
configurables: [
"resolution"
]
}
},
create: function() {
},
delete: function() {
},
retrieve: function(id) {
return $.when(this.data[id]);

},
items: function() {
return $.when(["12345", "67890"], this.data);
"67890": {
image: {
name: "app2",
ui_name: "Application 2",
icon_128: "",
description: "description",
policy: {
allow_home: true,
volume_source: "",
volume_target: "",
volume_mode: ""
},
configurables: []
}
}
},
Container: {
create: function() {
},
delete: function() {
},
retrieve: function() {
},
items: function() {
}
create: function() {
},
delete: function() {
},
retrieve: function(id) {
return $.when(this.data[id]);

},
items: function() {
return $.when(["12345", "67890"], this.data);
}
},
Container: {
create: function() {
},
delete: function() {
},
retrieve: function() {
},
items: function() {
}
};
});
}
};
Loading