Permalink
Browse files

Merge pull request #1 from CTMM-TraIT/master

Changes made to make it work for test-1dot2
  • Loading branch information...
2 parents 45ae1e6 + abf415e commit a0bec14078548d769afac044f718db22492ee2e9 @evast committed Nov 27, 2015
@@ -1,4 +1,3 @@
-import org.springframework.util.StringUtils
import org.transmart.searchapp.ImportXnatConfiguration;
import org.transmart.searchapp.ImportXnatVariable;
import groovy.xml.MarkupBuilder
@@ -8,7 +7,6 @@ import groovy.xml.MarkupBuilder
*/
class ImportXnatController {
- def springSecurityService
def grailsApplication
// the delete, save and update actions only accept POST requests
@@ -176,13 +174,22 @@ class ImportXnatController {
def kettledir = (getScriptsLocation() + "/xnattotransmartlink/")
def datadir = (getScriptsLocation() + "/xnattotransmartlink/")
- def process = ("python " + getScriptsLocation() + "/xnattotransmartlink/downloadscript.py ${url} ${username} ${password} ${project} ${node} ${kettledir} ${datadir}").execute(null, new File(getScriptsLocation() + "/xnattotransmartlink"))
+ def cmd = "python " +
+ getScriptsLocation() +
+ "/xnattotransmartlink/downloadscript.py" +
+ " ${url} ${username} ${password} ${project} ${node} ${kettledir} ${datadir}"
+ log.debug(cmd)
+ def process = (cmd).execute(null, new File(getScriptsLocation() + "/xnattotransmartlink"))
process.waitFor()
- if (process.err.text == "") {
- flash.message = "${process.in.text}"
+ def inText = process.in.text
+ def errText = process.err.text
+ if (errText) {
+ log.error(errText)
+ flash.message = "${errText}</br>${inText}"
} else {
- flash.message = "${process.err.text}</br>${process.in.text}"
- }
+ log.info(inText)
+ flash.message = inText
+ }
redirect action: import_wizard, id: importXnatConfiguration.id
}
@@ -13,7 +13,8 @@ CREATE TABLE searchapp.import_xnat_configuration (
);
ALTER TABLE searchapp.import_xnat_configuration OWNER TO searchapp;
GRANT ALL ON TABLE searchapp.import_xnat_configuration TO searchapp;
-
+GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE searchapp.import_xnat_configuration TO biomart_user;
+GRANT ALL ON TABLE searchapp.import_xnat_configuration TO tm_cz;
--
-- Name: pk_import_xnat_configuration; Type: CONSTRAINT; Schema: searchapp; Owner: -
--
@@ -10,7 +10,8 @@ CREATE TABLE searchapp.import_xnat_variable (
);
ALTER TABLE searchapp.import_xnat_variable OWNER TO searchapp;
GRANT ALL ON TABLE searchapp.import_xnat_variable TO searchapp;
-
+GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE searchapp.import_xnat_variable TO biomart_user;
+GRANT ALL ON TABLE searchapp.import_xnat_variable TO tm_cz;
--
-- Name: pk_import_xnat_var; Type: CONSTRAINT; Schema: searchapp; Owner: -
--
@@ -1,9 +1,10 @@
#!/bin/bash
-export KETTLE_HOME="/home/jenkins/transmart-data/env/tranSMART-ETL/Postgres/GPL-1.0/Kettle/Kettle-ETL/"
+export TS_DATA="/home/transmart/transmart-data/"
+export KETTLE_HOME="${TS_DATA}samples/postgres/kettle-home/"
-sh "/home/jenkins/transmart-data/env/data-integration/kitchen.sh" \
+sh "${TS_DATA}env/data-integration/kitchen.sh" \
-norep=N \
--file="/home/jenkins/transmart-data/env/tranSMART-ETL/Kettle-GPL/Kettle-ETL/create_clinical_data.kjb" \
+-file="${TS_DATA}env/tranSMART-ETL/Postgres/GPL-1.0/Kettle/Kettle-ETL/create_clinical_data.kjb" \
-log=load_clinical_data.log \
-param:LOAD_TYPE=I \
-param:COLUMN_MAP_FILE=xnat.tmm \
@@ -3,7 +3,7 @@
import pyxnat
import subprocess
import sys
-from elementtree.ElementTree import parse
+from xml.etree.ElementTree import parse
CONFIG_PATH = './'
CONFIG_EXTENSION = ".xml"

0 comments on commit a0bec14

Please sign in to comment.