Skip to content

Commit

Permalink
Merge pull request #176 from interactive-instruments/next
Browse files Browse the repository at this point in the history
Fixes #154, fixes #171
  • Loading branch information
jonherrmann authored Nov 23, 2018
2 parents 3691e85 + 0968073 commit 0085acb
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("ETF Web API")
.description(
"This is an interactive documentation and a web user interface for interacting with the Web API version 2 BETA of the test framework "
+ "[ETF](https://interactive-instruments.github.io/etf-webapp). "
"This is an interactive documentation and a web user interface for interacting with the Web API version 2 of the test framework "
+ "[ETF](http://etf-validator.net). "
+ "This semi-automatic generated documentation covers basic functionality, but consulting the [API Documentation](http://docs.etf-validator.net/v2.0/Developer_manuals/WEB-API.html) "
+ "may be required to get a deeper understanding of the ETF model and further procedures. "
+ "Issues can be reported in [GitHub]"
+ "(https://github.com/interactive-instruments/etf-webapp/issues/new?title=[webapi-v2-beta]%20&body=Please%20don%27t%20delete%20the%20"
+ "[webapi-v2-beta]%20text%20in%20the%20title.%20This%20text%20can%20be%20deleted.&labels=webapi). "
+ "(https://github.com/etf-validator/etf-webapp/issues/new?title=[webapi-v2]%20&body=Please%20don%27t%20delete%20the%20[webapi-v2]"
+ "%20text%20in%20the%20title.%20This%20text%20can%20be%20deleted.&labels=module:%20Web%20UI%20/%20controller%20layer). "
+ "\n\n"
+ "Content negotiation is not supported and therefore JSON is always returned for endpoints without file extension. "
+ "For most operations, a link to the XML response schema is provided in the implementation nodes."
Expand Down
3 changes: 1 addition & 2 deletions src/main/webapp/etf.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
xmlns:th="http://www.thymeleaf.org"
xmlns:tiles="http://www.thymeleaf.org"
xmlns:og="http://opengraphprotocol.org/schema/"
lang="en"
class="ui-mobile ui-mobile-rendering">

<head>
Expand Down Expand Up @@ -56,7 +55,7 @@
<script data-main="js/main"
src="js/lib/require.min.js"
integrity="sha256-vuyY04PmJJxZwwbco4EPMyu4gE72DbbInyRaPG/Dlso="
crossorigin="anonymous">
crossorigin="use-credentials">
</script>
</head>

Expand Down
92 changes: 68 additions & 24 deletions src/main/webapp/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requirejs.onError = function (err) {
if (err.requireType === 'timeout') {
console.log('Timeout loading modules: ' + err.requireModules);
}else if (err.requireType === 'scripterror') {
alert('Error loading the ETF Web Interface, please contact the System Administrator. Error message: '+err.message);
alert('Error loading the ETF Web Interface. Please contact the System Administrator and report this error message: '+err.message);
}
throw err;
};
Expand All @@ -14,60 +14,104 @@ require.config( {

// Do not change order!
"jquery": [
"//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.3.min", "lib/jquery.min"
"https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.3.min",
"https://code.jquery.com/jquery-1.11.3.min",
"lib/jquery.min"
],

'jquery.mobile.config': 'config/jquery.mobile.config',

"jquery.mobile": [
"//ajax.googleapis.com/ajax/libs/jquerymobile/1.4.5/jquery.mobile.min", "lib/jquery.mobile.min"
"https://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.5/jquery.mobile.min",
"https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.4.5/jquery.mobile-1.4.5.min",
"lib/jquery.mobile.min"
],

"jquery.validate": [
"//ajax.aspnetcdn.com/ajax/jquery.validate/1.14.0/jquery.validate.min", "lib/jquery.validate.min"
"https://ajax.aspnetcdn.com/ajax/jquery.validate/1.14.0/jquery.validate.min",
"https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.14.0/jquery.validate.min",
"lib/jquery.validate.min"
],

"underscore": [
"//cdn.jsdelivr.net/lodash/4.17.4/lodash.min", "lib/lodash.min"
"https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.min",
"https://cdn.jsdelivr.net/npm/[email protected]/lodash.min",
"lib/lodash.min"
],
"backbone": [
"//cdnjs.cloudflare.com/ajax/libs/backbone.js/1.3.3/backbone-min", "lib/backbone-min"
"https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.3.3/backbone-min",
"https://fastcdn.org/Backbone.js/1.2.3/backbone-min",
"lib/backbone-min"
],
"backbone.paginator": [
"//cdnjs.cloudflare.com/ajax/libs/backbone.paginator/2.0.5/backbone.paginator.min", "lib/backbone.paginator.min"
"https://cdnjs.cloudflare.com/ajax/libs/backbone.paginator/2.0.5/backbone.paginator.min",
"lib/backbone.paginator.min"
],
"moment": [
"//cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment.min", "lib/momemt.min"
"https://cdn.jsdelivr.net/npm/[email protected]/moment.min",
"https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment.min",
"lib/momemt.min"
],
"toastr": [
"//cdnjs.cloudflare.com/ajax/libs/toastr.js/2.1.3/toastr.min", "lib/toastr.min"
"https://cdnjs.cloudflare.com/ajax/libs/toastr.js/2.1.3/toastr.min",
"lib/toastr.min"
],
"jquery.iframe-transport": [
"//cdnjs.cloudflare.com/ajax/libs/blueimp-file-upload/9.14.2/js/jquery.iframe-transport.min", "lib/jquery.iframe-transport.min"
"https://cdnjs.cloudflare.com/ajax/libs/blueimp-file-upload/9.14.2/js/jquery.iframe-transport.min",
"lib/jquery.iframe-transport.min"
],
"jquery-ui/ui/widget": [
"lib/jquery.ui.widget"
],
"jquery.fileupload": [
"//cdnjs.cloudflare.com/ajax/libs/blueimp-file-upload/9.14.2/js/jquery.fileupload.min", "lib/jquery.fileupload.min"
"https://cdnjs.cloudflare.com/ajax/libs/blueimp-file-upload/9.14.2/js/jquery.fileupload.min",
"lib/jquery.fileupload.min"
],
"etf.webui": [
"app"
],
},
onNodeCreated: function(node, config, module, path) {
var sri = {
'jquery': 'sha256-rsPUGdUPBXgalvIj4YKJrrUlmLXbOb6Cp7cdxn1qeUc=',
'jquery.mobile': 'sha256-MkfSkbXhZoQ1CyPwjC30mPfLF8iKF5n564n9WvCLX4E=',
'jquery.validate': 'sha256-Lj47JmDL+qxf6/elCzHQSUFZmJYmqEECssN5LP/ifRM=',
'underscore': 'sha256-IyWBFJYclFY8Pn32bwWdSHmV4B9M5mby5bhPHEmeY8w=',
'backbone': 'sha256-0atoj6xVOJUoBM8Vp5PFywwLLE+aNl2svi4Q9UWZ+dQ=',
'backbone.paginator': 'sha256-nqCLeI27BiuRxhJEcsKPwUpTusAzME+5qFOWntHhAvy6',
'moment': 'sha256-Gn7MUQono8LUxTfRA0WZzJgTua52Udm1Ifrk5421zkA=',
'toastr': 'sha256-yNbKY1y6h2rbVcQtf0b8lq4a+xpktyFc3pSYoGAY1qQ=',
'jquery.iframe-transport': 'sha256-OiZnRAga/nDE1Ud8eLfBWCwb9mMZmkrRIRblCeRYWj8=',
'jquery-ui/ui/widget': 'sha256-CvqMlHtDX8dDgshwl03tVwvzncqqMKN0FLzZrNap4+I=',
'jquery.fileupload': 'sha256-tcXzqklRDpmITiQ0Ff+S6H2uUQl089oXkEyGjOOGmN4='
'https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.3.min.js': 'sha384-6ePHh72Rl3hKio4HiJ841psfsRJveeS+aLoaEf3BWfS+gTF0XdAqku2ka8VddikM',
'https://code.jquery.com/jquery-1.11.3.min.js': 'sha384-+54fLHoW8AHu3nHtUxs9fW2XKOZ2ZwKHB5olRtKSDTKJIb1Na1EceFZMS8E72mzW',

'https://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.5/jquery.mobile.min.js': 'sha384-XEn4bZ9g8ia7KJWyaf3o/ADO5s2pqwtDl1MdxgCZ9x6rm5QICw5Zk2+vwIJnAeFD',
'https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.4.5/jquery.mobile-1.4.5.min.js': 'sha384-u7i0wHEdsFrw92D1Z0sk2r6kiOGnZJhnawPUT0he8TRKfD4/XMEsj22l/cHFXO3v',

'https://ajax.aspnetcdn.com/ajax/jquery.validate/1.14.0/jquery.validate.min.js': 'sha384-Fnqn3nxp3506LP/7Y3j/25BlWeA3PXTyT1l78LjECcPaKCV12TsZP7yyMxOe/G/k',
'https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.14.0/jquery.validate.min.js': 'sha384-Fnqn3nxp3506LP/7Y3j/25BlWeA3PXTyT1l78LjECcPaKCV12TsZP7yyMxOe/G/k',

'https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.min.js': 'sha384-FwbQ7A+X0UT99MG4WBjhZHvU0lvi67zmsIYxAREyhabGDXt1x0jDiwi3xubEYDYw',
'https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js': 'sha384-zIRexRVB5q09c7QIwaG/PJmsn9EPaqP3V9wNSk3XSC2hU6ns+hMorBODGGcKRnbz',

'https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.3.3/backbone-min.js': 'sha384-NNt9ocJfZhIg2c5PbM5G2a3tTaeXhEfqCHWHNB7htzaWKn8MwFkzVyGdzLA8QMX7',
'https://fastcdn.org/Backbone.js/1.2.3/backbone-min.js': 'sha384-kgH1F06klaG52/uQEQlpP5QZ9tbJZgcU4omvs1DRSHaJGVZWp//NYtoi93ZmGday',

'https://cdnjs.cloudflare.com/ajax/libs/backbone.paginator/2.0.5/backbone.paginator.min.js': 'sha256-nqCLeI27BiuRxhJEcsKPwUpTusAzME+5qFOWntHhAvy6',

'https://cdn.jsdelivr.net/npm/[email protected]/moment.min.js': 'sha384-BmqX+J1qYayHgEkw+9Idtrl0B0TorHRQW9/iwTxk1samHGPmEI7ovnGvy4SbWxwa',
'https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment.min.js': 'sha384-KgEy7s3ThYKule8wWiu2WJkm0AmJeSLkXku5PY5X8MhVgdm8K1ebsVRKHfNfWPrR',

'https://cdnjs.cloudflare.com/ajax/libs/toastr.js/2.1.3/toastr.min.js': 'sha256-yNbKY1y6h2rbVcQtf0b8lq4a+xpktyFc3pSYoGAY1qQ=',

'https://cdnjs.cloudflare.com/ajax/libs/blueimp-file-upload/9.14.2/js/jquery.iframe-transport.min.js': 'sha256-OiZnRAga/nDE1Ud8eLfBWCwb9mMZmkrRIRblCeRYWj8=',

'https://cdnjs.cloudflare.com/ajax/libs/blueimp-file-upload/9.14.2/js/jquery.fileupload.min.js': 'sha256-tcXzqklRDpmITiQ0Ff+S6H2uUQl089oXkEyGjOOGmN4='
};
if (sri[module]) {
node.setAttribute('integrity', sri[module]);
var jsPos = path.indexOf('js/');
var sri = sri[path];
if(jsPos != 0) {
node.setAttribute('crossorigin', 'anonymous');
if(sri) {
node.setAttribute('integrity', sri);
}else{
alert('Security error. ' +
'Please contact the System Administrator and ' +
'report this error message: script integrity check failed for '+path);
}
}else{
node.setAttribute('crossorigin', 'use-credentials');
}
},
shim: {
Expand Down

0 comments on commit 0085acb

Please sign in to comment.