GithubHelp home page GithubHelp logo

midasplatform / midas Goto Github PK

View Code? Open in Web Editor NEW
17.0 17.0 9.0 69.94 MB

Girder https://github.com/girder/girder is a more modern, better supported application than Midas Server. Look at Girder before using Midas Server. Midas Server is an open-source application that enables the rapid creation of tailored, web-enabled data storage

Home Page: https://web.archive.org/web/20200929102106/www.midasplatform.org/

License: Apache License 2.0

CMake 1.44% PHP 56.10% HTML 7.45% CSS 3.32% JavaScript 22.95% Python 1.52% Shell 0.01% Java 7.12% SQLPL 0.06% PLpgSQL 0.02%

midas's People

Contributors

bbenoist avatar bradking avatar brianhelba avatar cfarcas avatar cpatrick avatar grahamcampbell avatar jamiesnape avatar jcfr avatar mgrauer avatar snape avatar yuzhengz avatar zachmullen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

midas's Issues

Timezone selection in setup

Need to be able to select current timezone. Unable to select 'Austrailia/Melbourne'.

How can this be modified so that the timezone is correct?

Display the Administration link more prominently

Via Taylor Braun-Jones:

Locating the 'Administration' link beneath the username dropdown menu in the top right was not intuitive to me at all. I would actually just swap the location of the 'Logout' link and the 'Administration' link.

Expose "Send Invitation" in Manage view

I wanted to invite someone.
I went on the project page http://packages.kitware.com/community/17, and then read "Manage" on the right side panel, I did not read any further, and just clicked on it.
From the Manage page (http://packages.kitware.com/community/manage?communityId=17) , it is not possible to invite anyone (however it is possible to remove someone).
It would make sense to:

  • add "Send Invitation" in the Manage page of a community
  • Reorder "Manage" with "Send Invitation

(note that this issue has also been reported here

CORS violation when using REST API

I would like to use the REST api to request data from MIDAS3, all works well
until I ask for the contents of a bitstream using this URL:

http://slicer.kitware.com/midas3/rest/bitstream/download/206209?token=z1Fox3UzXORN4BJUfoGH08ZN94Hsb8zCfWmqJDXa

MIDAS re-directs outside the /rest, CORS-aware section of MIDAS to

http://slicer.kitware.com/midas3/rest/bitstream/download/206209?token=z1Fox3UzXORN4BJUfoGH08ZN94Hsb8zCfWmqJDXa&appname=mrml-drop&email=daniel.blezek%40gmail.com&apikey=uO0824aTAB7SUhnMQoQYzXxtx2lM1jXt5GwcX1lO

and Firefox unceremoniously pukes with a CORS warning:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the
remote resource at
http://slicer.kitware.com/midas3/download/?bitstream=206209&offset=0&name=DWIVolume.mrb&authToken=z1Fox3UzXORN4BJUfoGH08ZN94Hsb8zCfWmqJDXa.
This can be fixed by moving the resource to the same domain or enabling CORS.

Would it be possible to stream directly rather than redirect? The browser can
display without problem, but XMLHttpRequest objects can't.

Thanks,
-dan

Database errors on install can produce bad error messages.

From Samira on the mailing list:

The issue I had, was in database set-up however the error message I got was “The passwords are not the same” which was not correct. It would be good if there was an error message like “the database is not reachable” then I could figure out the problem easier.

We should have more informative error messages at install time.

Replace this item checkbox

It would be wonderful to have a "replace this item" checkbox option.
For example, if I have to upload seven files to various
subdirectories, it would be great to select those seven items, drop
seven items (or a folder with seven items) into the "browse or drop
here" upload area, and have The Right Thing happen. If I selected
seven items but only dropped six, or if the items I uploaded have
different basenames than the items I selected, it would throw an
error.

Keep existing license checkbox.

If I select "Upload new revision if item name already exists", it
would be great if another checkbox appears that said "Keep existing
license." This checkbox would be on by default.

Enabling the cleanup module breaks things

This results in an error as reported on the mailing list:

The system has encountered the following error:
Uncaught exception 'Zend_Exception' with message 'Task already exits' in /home/midas/pacs/notification/MIDASNotifier.php:93 Stack trace: #0 /home/midas/pacs/core/AppController.php(226): MIDAS_Notifier->__construct(true, Object(Zend_Session_Namespace)) #1 /home/midas/pacs/library/Zend/Controller/Action.php(502): AppController->preDispatch() #2 /home/midas/pacs/library/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('errorAction') #3 /home/midas/pacs/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #4 /home/midas/pacs/library/Zend/Application/Bootstrap/Bootstrap.php(101): Zend_Controller_Front->dispatch() #5 /home/midas/pacs/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run() #6 /home/midas/pacs/index.php(63): Zend_Application->run() #7 {main} Next exception 'Zend_Controller_Exception' with message 'Task already exits#0 /home/midas/pacs/core
In /home/midas/pacs/library/Zend/Controller/Plugin/Broker.php, line: 336
At 18:03:28 2014-12-01
Please notify your administrator with this information.

InstallController.php

I Noticed that the InstallController.php has a bug with the php $type variable. leading to the install failing.

Patch "FolderModel.php - addItem" function to not use "fetchAll"

Copied from http://public.kitware.com/MidasBT/view.php?id=1057

In folder with more than 16000 items, it is not possible to add new items.

Solution

  • Today : Increase memory_limit set in php.ini
  • In few days : Patch "FolderModel.php - addItem" function to not use "fetchAll"
  • In coming weeks : Review usage of "fetchAll" in the entire code base ?

References

Details

Debug statement can be re-enabled on the server http://slicer.kitwarein.com by doing:

$ sudo su - www-data
$ bash
$ cd /var/www/midas3/
$ git stash pop
$ cd /var/www/midas3/slicerpackages
$ git stash pop

... or applying the enclosed patch on your local installation. See midas-debug-stmt.patch and slicerpackages-debug-stmt.patch. See midas-debug-stmt.patch.txt and slicerpackages-debug-stmt.patch.txt

Then, when creating a new item, the execution unrolls as described below:

On my workstation:

Checkout Slicer Source, then use the script published in this gist: https://gist.github.com/jcfr/9380371

Slicer_SOURCE_DIR=/home/jcfr/Projects/Slicer

cmake -DSlicer_SOURCE_DIR:PATH=${Slicer_SOURCE_DIR} \
  -DPACKAGE_FILEPATH:FILEPATH=${Slicer_SOURCE_DIR}/Resources/3DSlicer-DesktopIcon.png \
  -P 3613-test-slicer-midas-upload.cmake

On slicer.kitwarein.com:

 # Extract from log file: /var/www/midas3/log/development.log
 #
 #
 # memory: Size of a "item" dao
 # cumul_memory: Cumulated size of all item daos instantiated in this loop
 # total_memory: Total memory used by this script
[31568] ApiComponent.php - extensionUpload - line:223
[31568] ApiComponent.php - extensionUpload - line:226
[31568] UploadComponent.php - createUploadedItem - line:245
[31568] FolderModel.php - addItem - line:913
[31568] MIDASDatabasePdo.php - link - line:219
[31568] MIDASDatabasePdo.php - getValue - line:137
[31568] MIDASDatabasePdo.php - getLinkedObject - line:165
[31568] MIDASDatabasePdo.php - getLinkedObject - line:204 [i:0][memory:2.76 kb][cumul_memory:5.64 kb][total_size:125.05 mb]
[31568] MIDASDatabasePdo.php - getLinkedObject - line:204 [i:1][memory:2.68 kb][cumul_memory:13.65 kb][total_size:125.06 mb]
[31568] MIDASDatabasePdo.php - getLinkedObject - line:204 [i:2][memory:2.68 kb][cumul_memory:21.39 kb][total_size:125.06 mb]
[31568] MIDASDatabasePdo.php - getLinkedObject - line:204 [i:3][memory:2.68 kb][cumul_memory:29.13 kb][total_size:125.07 mb]
[31568] MIDASDatabasePdo.php - getLinkedObject - line:204 [i:4][memory:2.68 kb][cumul_memory:36.86 kb][total_size:125.08 mb]
[...]
[31568] MIDASDatabasePdo.php - getLinkedObject - line:204 [i:16677][memory:2.68 kb][cumul_memory:130.7 mb][total_size:255.74 mb]
[31568] MIDASDatabasePdo.php - getLinkedObject - line:204 [i:16678][memory:2.68 kb][cumul_memory:130.7 mb][total_size:255.75 mb]
[31568] MIDASDatabasePdo.php - getLinkedObject - line:204 [i:16679][memory:2.68 kb][cumul_memory:130.71 mb][total_size:255.75 mb]
[31568] MIDASDatabasePdo.php - getLinkedObject - line:204 [i:16680][memory:2.68 kb][cumul_memory:130.72 mb][total_size:255.76 mb]
[31568] MIDASDatabasePdo.php - getLinkedObject - line:204 [i:16681][memory:2.68 kb][cumul_memory:130.73 mb][total_size:255.77 mb]
[31568] MIDASDatabasePdo.php - getLinkedObject - line:204 [i:16682][memory:2.68 kb][cumul_memory:130.73 mb][total_size:255.78 mb]
[31568] MIDASDatabasePdo.php - getLinkedObject - line:204 [i:16683][memory:2.68 kb][cumul_memory:130.74 mb][total_size:255.78 mb]
[31568] MIDASDatabasePdo.php - getLinkedObject - line:204 [i:16684][memory:2.68 kb][cumul_memory:130.75 mb][total_size:255.79 mb]
[31568] MIDASDatabasePdo.php - getLinkedObject - line:204 [i:16685][memory:2.68 kb][cumul_memory:130.76 mb][total_size:255.8 mb]
[31568] MIDASDatabasePdo.php - getLinkedObject - line:204 [i:16686][memory:2.68 kb][cumul_memory:130.76 mb][total_size:255.81 mb]
[31568] MIDASDatabasePdo.php - getLinkedObject - line:204 [i:16687][memory:2.68 kb][cumul_memory:130.77 mb][total_size:255.81 mb]
[31568] MIDASDatabasePdo.php - getLinkedObject - line:204 [i:16688][memory:2.68 kb][cumul_memory:130.78 mb][total_size:255.82 mb]

Considering that the memory limit set on the server is 256MB, this explain why the upload failed.

www-data@slicer:/data/www/midas3/log$ cat /etc/php5/apache2/php.ini | grep ^memory_limit
memory_limit = 256M

Associated versions

midas version: f03ce8b2e1e21878f3c7d5552a2bb81f46b27b71

slicerpackages version: b16033698bfceb1002c918a1872b67a9a833f211

slicerappstore version: 6cc5599ae8502e555f7acdd471bfbb50d30d3e25 

Midas API throws 500 when trying to authenticate without a Default API key

@sankhesh found this when trying to use Pydas. He logged into a midas system, and had an API key with a name that wasn't Default, but no Default API key. He got a 500 with this stack trace:

Caught PydasException: 'Request failed with HTTP error code 500'
Waiting 5 seconds, then retrying request
Caught PydasException: u'Request failed with Midas error code -150: Unable to authenticate. Please check credentials.'
Waiting 5 seconds, then retrying request
^CTraceback (most recent call last):
File "", line 1, in
File "build/bdist.linux-x86_64/egg/pydas/api.py", line 71, in login
File "build/bdist.linux-x86_64/egg/pydas/drivers.py", line 216, in get_default_api_key
File "build/bdist.linux-x86_64/egg/pydas/retry.py", line 63, in wrapper
File "build/bdist.linux-x86_64/egg/pydas/drivers.py", line 153, in login_with_api_key
File "build/bdist.linux-x86_64/egg/pydas/retry.py", line 57, in wrapper

and in the Midas logs

Fatal Error: Array
(
[type] => 1
[message] => Call to a member function getApikey() on a non-object
[file] => /data/www/midas/core/controllers/components/ApisystemComponent.php
[line] => 190
[typeText] => E_ERROR
)

Critical error involving missing UserDao in new installation

I'm working on a new installation on a RHEL 6 system and encountering an error labeled as critical in the logs which involves a missing UserDao method. I've resolved previous critical errors by installing RHEL rpms missed during the initial setup. I'm wondering if I'm missing some other essential rpm here:

Fatal Error: Array
(
[type] => 1
[message] => AppController::isDynamicHelp(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "UserDao" of the object you are trying to operate on was loaded before unserialize() gets called or provide a __autoload() function to load the class definition
[file] => /opt/Midas3/core/AppController.php
[line] => 441
[typeText] => E_ERROR
)

Digging into the code a bit, I see on line 89 of the same AppController.php file that Dao is defined by a call to userModel->load. I'm not even sure I'm reading the above error correctly, because line 441 should only be reached if the Dao variable is != null.

Thanks for any advice,
John.

system/defaultapikey failure

Midas 3.4.0 :

When using rest/system/defaultapikey (or api/json...), if the specified user does not already have a 'Default' api key, we get through the following error :

The system has encountered the following error:<br/>
<h3>Call to a member function getApikey() on a non-object<br/>In /midas/core/controllers/components/ApisystemComponent.php, line: 210<br/>
  At 14:49:36 2015-04-01</h3>
  <br/>Please notify your administrator with this information.<br/>

If we add a 'Default' api key to the user manually, the call to rest/system/defaultapikey works fine.
It looks like this is broken since 3.2.15 (not 100% sure)

Error during first pass setup: InstallController

When I pull up the MIDAS home page for the first time after a fresh install on a Ubuntu system, I start the install process by entering the sql database information.

Continuing from there, I encounter the following error:
Unable to find sql file
In /var/www/midas/html/core/controllers/InstallController.php, line: 117
At 18:47:46 2015-05-18

I modified the exception thrown to print the name of the sql file it was trying to locate:

/var/www/midas/html/core/database//0.sq

The path is correct down to the database directory, but not after. So, looking at the code,

$sqlFile = BASE_PATH.'/core/database/'.$type.'/'.$sqlFile.'.sql'

it appears that the $type and $sqlFile variables are not being set. The $type variable should be arriving from the html dropdown list on the install page. The $sqlFile variable is set by a call to the getNewVersion method of $upgradeComponent. In my case, I installed version 3.4.0.

The file core/database/mysql/3.4.0.sql does exist.

So the problem seems to be the construction of the filename by the InstallController.php file.

The only point of divergence from the installation instructions I've introduced is that I'm forcing MIDAS to run under SSL. Do you think I'm missing some php.ini setting that's preventing HTML form entries from transmitting over SSL?

Thanks,
John.

Use CSRF token for googleauth

We should generate a token and store it in a cookie for the user, then validate it at completion of the OAuth flow to prevent CSRF.

Community moderator unable to create top-level directory

Noticed in v3.2.14
A new Community Moderator was unable to create a new top-level directory. Administrator can do it just fine on the other hand. This might be a policy choice, but IMHO from the sounds of it someone who is a Community Moderator should be allowed to create & own the folder.

Uploader Freezing

Uploader freezes when user is not allowed to upload to a folder. Giving an error message would be very helpful

Midas fails to install

Hi there,

I have been working on this for a week now. Are you able to give me some help?

I am unable to configure the database, I get the following error with the Midas setup step 2.

An error occurred
The system has encountered the following error:
Unable to find sql file
In /var/www/midas/public_html/core/controllers/InstallController.php, line: 115

I note that this has been a bug for a few months now, was it resolved?

Is there a version of Midas that can be downloaded that works? The current one is unusable 3.4.1 as it cannot be installed onto a new system.

Problems serving content from Midas: wrong content type for images?

Problem initially reported by @fedorov

Image uploaded to Midas are associated with the "application/octet-stream" whereas image upload a year ago were associated with "image/png", "image/jpeg", .... .

This is causing problem to embed image. See details in forwarded email.

Note that I confirmed this with both png and jpeg after updating slicer.kitware.com to the current master.

Here are the two images discussed in the forwarded email:

Item1: http://slicer.kitware.com/midas3/item/162714
Mime type: application/octet-stream

Item2: http://slicer.kitware.com/midas3/item/122386
Mine type: image/png

Thanks for your help and insights,
Jc

feed tab

on clicking the feed tab presents the following error

Not Found

The requested URL /feed was not found on this server.
Apache/2.4.7 (Ubuntu) Server at midas Port 80

The presumption is that it is supposed to resolve to index.php/feed

Batchmake admin panel

Class 'Batchmake_Form_Admin' not found
In /var/www/midas/modules/batchmake/controllers/AdminController.php, line: 34

Latest version installed.

Centos 7 Setup Issues

Followed the instructions, however when i click on the go to next step on the install page, the request seems to occur however, nothing changes within the window.

Landingpage customization

The landingpage module in 3.4.0 reports an error about not being able to load indexcore/index.phtml. This can be corrected by a simple rename:

$ mv modules/landingpage/views/index-core modules/landingpage/views/indexcore

Installation documentation issues

After posting elsewhere about a problem I was having with a MIDAS installation I inherited from someone else, I decided to try installing MIDAS myself on a fresh Ubuntu system. I found a few problems with the documentation at readthedocs:

On the main installation page after the Dependencies step, the example tar commands are shown with the argument "cf". I suspect this should be xzf to both extract and gunzip the archives (rather than create them with cf).

I also could find no instructions for how to configure the initial databases within the database server. In my case, I'm using mysql. I followed the old kitware instructions.

The instructions at kitware however, don't make note of the additional "socket" text entry box that shows up during the first visit and setup of the MIDAS server. I wasn't sure what to put there. Since I encounter an "unable to find sql" error on the next page, I suspect I'm missing something important about the sql setup.

John.

help - composer error?

does any of this matter with the build? It's not working after following the documentation given for ubuntu trusty.

symfony/event-dispatcher suggests installing symfony/dependency-injection ()
symfony/event-dispatcher suggests installing symfony/http-kernel ()
guzzle/guzzle suggests installing guzzlehttp/guzzle (Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated.)
sebastian/global-state suggests installing ext-uopz (*)
phpdocumentor/reflection-docblock suggests installing dflydev/markdown (~1.0)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
ramsey/uuid suggests installing ext-uuid (Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator)
ramsey/uuid suggests installing ramsey/uuid-doctrine (Allows the use of Ramsey\Uuid\Uuid as Doctrine field type.)
intervention/image suggests installing ext-imagick (to use Imagick based image processing.)
intervention/image suggests installing intervention/imagecache (Caching extension for the Intervention Image library)

The web server comes up with this however the button doesn't work? Am I missing something?

screen shot 2015-11-02 at 11 00 40 pm

web developer tools using firefox 38 gives the following errors:
The stylesheet http://midas/index.php/core/public/css/install/install.css was not loaded because its MIME type, "text/html", is not "text/css".
Use of getPreventDefault() is deprecated. Use defaultPrevented instead.

Using chrome as the debugger comes up with this error:

GET http://midas/user/login 404 (Not Found)send @ jquery.js:2v.extend.ajax @ jquery.js:2(anonymous function) @ midas.dialog.js:102r.complete @ jquery.js:2l @ jquery.js:2c.fireWith @ jquery.js:2Kn.a @ jquery.js:2v.fx.tick @ jquery.js:2

Zipped downloads are broken

  • in core/controllers/DownloadController.php the autoload fails:
    all new ZipStream allocations should be new ZipStream\ZipStream
  • same file, rename all calls add_file_from_path to addFileFromPath as that's the name of the method in ZipStream. Similar for add_file into addFile
  • repeat in core/models/pdo/FolderModel.php as you're operating on a ZipStream object. Perhaps rename the zipStream function into zipStreamWrapper or something more suggestive to avoid looking too hard for a lowercase vs uppercase Z 😄
  • rinse and repeat in modules/remoteprocessing/controllers/AdminController.php and
    modules/keyfiles/controllers/DownloadController.php

@cfarcas

Deprecate / remove java applet for large download ?

While trying to download 1.8GB from http://aladdin.kitware.com (Midas 3.2.11), after clicking on the download link for a folder, I am proposed two options. See screenshot below.

midas-3-large-download-requested

As suggested, I have clicked on the "Yes, use large downloader". Then, on windows:

  1. firefox asked me to manually install Java because of security reasons
  2. after following the instruction, I managed to install java
  3. going back to the page, the applet failed complaining the current security settings can't accept self signed certificate
  4. I then added a security exception (Start menu -> Programs -> Java -> Configure Java -> Security) by listing http://aladdin.kitware.com as an exception
  5. going back to the page, I was able to see the applet ... clicking on Download failed with a timeout

Finally, I gave a try with the normal downloader .. and already 0.5 GB have been downloaded

Moving forward, I suggest we disable the java downloader. It should be enabled explicitly on instance that require it.

Users tab

the users tab asks for the wrong URL with the following error.

Not Found
The requested URL /user was not found on this server.
Apache/2.4.7 (Ubuntu) Server at midas Port 80

with it supposed to resolve to http://midas_web_root/index.php/user

rest/user API for admin

Currently (Midas 3.4.0), the GET rest/user API returns only public users, event when identified as an admin. Maybe could it return a full list for admin ?

LDAP Server Name field validation is too strict

The validation of the 'LDAP Server Name' field for the LDAP module configuration is a little bit harsh :

  • a 'local' name is refused (try with any name without a dot)
  • sometimes the name (with a dot) is refused because : cannot match TLD against known list
  • an IP address is refused

It look like the same validation as for the domain part of an email is applied.

Midas version : 3.2.20

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.