Commit f57ebba1 authored by katja heuer's avatar katja heuer Committed by GitHub
Browse files

Merge pull request #170 from jimulle/master

fixed some linting errors
parents c36f1acb d2bb01a0
const express = require('express');
const controller = require('./mri.controller');
const upload_controller = require('./upload.controller');
const multer = require('multer');
const router = express.Router();
const controller = require('./mri.controller');
const uploadController = require('./upload.controller');
router.get('', controller.validator, controller.mri);
router.get('/json', controller.validator, tokenAuthentication, controller.api_mri_get);
router.post('/json', controller.validator_post, tokenAuthentication, controller.api_mri_post);
router.get('/upload', upload_controller.token);
router.get('/upload', uploadController.token);
router.post('/upload',
multer({dest: './tmp/'}).array('atlas'),
upload_controller.validator,
upload_controller.other_validations,
upload_controller.upload);
uploadController.validator,
uploadController.other_validations,
uploadController.upload);
router.get('/reset', controller.reset);
......
const fs = require('fs');
const zlib = require('zlib');
const fileType = require('file-type');
// const fs = require('fs');
// const zlib = require('zlib');
// const fileType = require('file-type');
const MRILoader = function () {
......
......@@ -38,6 +38,7 @@
"struct": "0.0.11",
"url": "^0.11.0",
"validator": "^6.0.0",
"webpage": "^0.3.0",
"ws": "^1.1.1"
},
"devDependencies": {
......
function startIntro(){
var intro = introJs();
function startIntro() {
const intro = introJs();
intro.setOptions({
steps: [
{
intro: "Welcome to BrainBox."
+ "BrainBox allows you to visualise and segment collaboratively "
+ "any brain MRI dataset available online. Follow this tutorial "
+ "to learn how to enter data into BrainBox, view it, edit it, "
+ "and create collaborative segmentation projects. BrainBox is an "
+ "open project – you will learn how to help us improving it by "
+ "reporting bugs and suggestions to our GitHub repository"
intro: 'Welcome to BrainBox.' +
'BrainBox allows you to visualise and segment collaboratively ' +
'any brain MRI dataset available online. Follow this tutorial ' +
'to learn how to enter data into BrainBox, view it, edit it, ' +
'and create collaborative segmentation projects. BrainBox is an ' +
'open project – you will learn how to help us improving it by ' +
'reporting bugs and suggestions to our GitHub repository'
},
{
element: "#url",
intro: "This is BrainBox's URL field. You can paste here a link "
+ "to any MRI on the web. Currently, BrainBox supports Nifti "
+ "format (.nii.gz files) and MGH format (.mgz files). Any link "
+ "on the Web should work, from Zenodo, FigShare, DropBox, Amazon, "
+ "etc. If you want to try BrainBox but you don't have any link to "
+ "an MRI, you can select a brain from the \"Take me to a brain\" "
+ "list, or browse among the community created projects.",
element: '#url',
intro: 'This is BrainBox\'s URL field. You can paste here a link ' +
'to any MRI on the web. Currently, BrainBox supports Nifti ' +
'format (.nii.gz files) and MGH format (.mgz files). Any link ' +
'on the Web should work, from Zenodo, FigShare, DropBox, Amazon, ' +
'etc. If you want to try BrainBox but you don\'t have any link to ' +
'an MRI, you can select a brain from the "Take me to a brain" ' +
'list, or browse among the community created projects.',
position: 'top'
},
{
element: '#go',
intro: "Once you have entered the link to an MRI in the URL field "
+ "click the <b>Go</b> button to go to BrainBox's viewer"
intro: 'Once you have entered the link to an MRI in the URL field ' +
'click the <b>Go</b> button to go to BrainBox\'s viewer'
}
]
});
......
var page = require('webpage').create();
const page = require('webpage').create();
//viewportSize being the actual size of the headless browser
page.viewportSize = { width: 1024, height: 768 };
// viewportSize being the actual size of the headless browser
page.viewportSize = {width: 1024, height: 768};
//the clipRect is the portion of the page you are taking a screenshot of
page.clipRect = { top: 0, left: 0, width: 1024, height: 768 };
// the clipRect is the portion of the page you are taking a screenshot of
page.clipRect = {top: 0, left: 0, width: 1024, height: 768};
page.open('http://brainbox.dev', function(status) {
if (status !== 'success') {
page.open('http://brainbox.dev', function (status) {
if (!(status === 'success')) {
console.log('Unable to access network');
} else {
// a screenshot of the home page
page.render('index.jpg');
// log the title
var title = page.evaluate(function() {
const title = page.evaluate(function () {
return document.title;
});
console.log(title);
}
phantom.exit();
});
\ No newline at end of file
});
var assert = require("assert");
describe('Array', function(){
describe('#indexOf()', function(){
it('should return -1 when the value is not present', function(){
assert.equal(-1, [1,2,3].indexOf(4)); // 4 is not present in this array so indexOf returns -1
})
})
const assert = require('assert');
describe('Array', function () {
describe('#indexOf()', function () {
it('should return -1 when the value is not present', function () {
assert.equal(-1, [1, 2, 3].indexOf(4)); // 4 is not present in this array so indexOf returns -1
});
});
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment