{"action":"created","issue":{"url":"https://api.github.com/repos/poldrack/myconnectome-vm/issues/5","labels_url":"https://api.github.com/repos/poldrack/myconnectome-vm/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/poldrack/myconnectome-vm/issues/5/comments","events_url":"https://api.github.com/repos/poldrack/myconnectome-vm/issues/5/events","html_url":"https://github.com/poldrack/myconnectome-vm/pull/5","id":79938436,"number":5,"title":"Update web interface with \"Start Analysis\" Button","user":{"login":"vsoch","id":814322,"avatar_url":"https://avatars.githubusercontent.com/u/814322?v=3","gravatar_id":"","url":"https://api.github.com/users/vsoch","html_url":"https://github.com/vsoch","followers_url":"https://api.github.com/users/vsoch/followers","following_url":"https://api.github.com/users/vsoch/following{/other_user}","gists_url":"https://api.github.com/users/vsoch/gists{/gist_id}","starred_url":"https://api.github.com/users/vsoch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsoch/subscriptions","organizations_url":"https://api.github.com/users/vsoch/orgs","repos_url":"https://api.github.com/users/vsoch/repos","events_url":"https://api.github.com/users/vsoch/events{/privacy}","received_events_url":"https://api.github.com/users/vsoch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-23T19:54:56Z","updated_at":"2015-05-25T01:38:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/poldrack/myconnectome-vm/pulls/5","html_url":"https://github.com/poldrack/myconnectome-vm/pull/5","diff_url":"https://github.com/poldrack/myconnectome-vm/pull/5.diff","patch_url":"https://github.com/poldrack/myconnectome-vm/pull/5.patch"},"body":"I was able to do this sooner rather than later because it looks like the raw HCP data is still in the process of being copied.\r\n\r\n- Add a \"Run Analysis\" button to the main interface. This button is active only before analyses are started, and this status is determined by the existence of a \".started\" file in /home/vagrant/myconnectome. The button works by calling an application url \"start\" that only serves to execute the run_everything.py, and then write the \".started\" file and redirect to the main page.  When this has been done, the \"Run Analysis\" button changes to a disabled \"Analysis is Running.\" button.\r\n- The page checks for the count of analyses that are finished (based on existence of the result files), and when the count of finished == count of total possible, the button changes to \"Analysis is Complete.\"\r\n- The base page is now the main MyConnectome analysis page. This was much harder than I anticipated - there was no way I could figure out to generate directory listings for a custom set of folders (many errors were propogated for the different versions of this that I tried) and changing the app.route to '/' did not work, as the plugin seems to always want the root to be a listing. What worked was creating a symbolic link between the myconnectome folder and a \"results\" folder in /var/www, and then telling the plugin that the root was the results folder.\r\n\r\nI've tested that it works to start and run the analyses, and I also tested locally that the button changes when analyses finish, although I have not tested this last part from a fresh install (for example, what if there are issues with writing to stdout when being run in this fashion?). It is running now and I will edit this PR if any other issues come up!"},"comment":{"url":"https://api.github.com/repos/poldrack/myconnectome-vm/issues/comments/105086608","html_url":"https://github.com/poldrack/myconnectome-vm/pull/5#issuecomment-105086608","issue_url":"https://api.github.com/repos/poldrack/myconnectome-vm/issues/5","id":105086608,"user":{"login":"vsoch","id":814322,"avatar_url":"https://avatars.githubusercontent.com/u/814322?v=3","gravatar_id":"","url":"https://api.github.com/users/vsoch","html_url":"https://github.com/vsoch","followers_url":"https://api.github.com/users/vsoch/followers","following_url":"https://api.github.com/users/vsoch/following{/other_user}","gists_url":"https://api.github.com/users/vsoch/gists{/gist_id}","starred_url":"https://api.github.com/users/vsoch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsoch/subscriptions","organizations_url":"https://api.github.com/users/vsoch/orgs","repos_url":"https://api.github.com/users/vsoch/repos","events_url":"https://api.github.com/users/vsoch/events{/privacy}","received_events_url":"https://api.github.com/users/vsoch/received_events","type":"User","site_admin":false},"created_at":"2015-05-25T01:38:31Z","updated_at":"2015-05-25T01:38:31Z","body":"I just finished running everything from start to finish, and I think it's (finally) ready for you @poldrack to review. I was running into many issues with trying to run the analysis from within the python script (mostly related to environmental variables and paths, as you can see above), and it occurred to me that a much easier solution (and easier for the user) would be to launch the analyses from the getgo, and then have the button serve as a status message. In the README we should instruct the user to only bring up the VM when he/she is ready to do the analyses (aka, has an internet connection).\r\n\r\nHere is the status button midway through the analysis:\r\n\r\n![processing](https://cloud.githubusercontent.com/assets/814322/7790639/dcd72f72-0243-11e5-8a29-4e1403d13b69.png)\r\n\r\nand finished:\r\n\r\n![complete](https://cloud.githubusercontent.com/assets/814322/7790640/e687a394-0243-11e5-82a9-6ad95b032833.png)\r\n\r\nI think that this solution is reasonable, because the user still does not need to log into the VM to do anything, despite not getting whatever satisfaction may come out of pushing a start button! :O)"}}