From 865960a030d875f565787837f378aedd68b66640 Mon Sep 17 00:00:00 2001 From: donsizemore Date: Fri, 27 Sep 2019 14:00:02 -0400 Subject: [PATCH] #88 enable data curation tool in demo mode pending javascript rewrite --- defaults/main.yml | 12 ++++++++---- files/DataCuration.json | 22 ++++++++++++++++++++++ tasks/dataverse-externaltools.yml | 22 ++++++++++++++++------ tests/group_vars/vagrant.yml | 12 ++++++++---- 4 files changed, 54 insertions(+), 14 deletions(-) create mode 100644 files/DataCuration.json diff --git a/defaults/main.yml b/defaults/main.yml index 7332320..480e3c5 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -45,8 +45,6 @@ dataverse: upload_to_hub: False user: counter year_month: "2018-05" - dataexplorer: - enabled: true db: name: dvndb host: localhost @@ -62,6 +60,14 @@ dataverse: protocol: doi provider: FAKE shoulder: "FK2/" + externaltools: + datacurationtool: + enabled: true + method: demo + dataexplorer: + enabled: true + wholetale: + enabled: false filesdir: /usr/local/dvn/data glassfish: user: glassfish @@ -110,8 +116,6 @@ dataverse: thumbnails: true usermgmtkey: burrito version: 4.16 - wholetale: - enabled: true grafana: grafana_user: 'admin' diff --git a/files/DataCuration.json b/files/DataCuration.json new file mode 100644 index 0000000..926e01f --- /dev/null +++ b/files/DataCuration.json @@ -0,0 +1,22 @@ +{ + "displayName": "Data Curation Tool", + "description": "Data Curation Tool for curation of variables", + "type": "configure", + "toolUrl": "https://scholarsportal.github.io/Dataverse-Data-Curation-Tool/", + "toolParameters": { + "queryParameters": [ + { + "dfId": "{fileId}" + }, + { + "siteUrl": "{siteUrl}" + }, + { + "key": "{apiToken}" + }, + { + "fileMetadataId" : "{fileMetadataId}" + } + ] + } +} diff --git a/tasks/dataverse-externaltools.yml b/tasks/dataverse-externaltools.yml index b19fc8d..2e697f2 100644 --- a/tasks/dataverse-externaltools.yml +++ b/tasks/dataverse-externaltools.yml @@ -1,16 +1,16 @@ --- -- name: enable wholetale externaltool +- name: enable data curation tool uri: url: http://localhost:8080/api/admin/externalTools method: POST - headers: + headers: Content-type: "application/json" body_format: json - body: "{{ lookup('file', 'wholetale.json') }}" - when: dataverse.wholetale.enabled == true + body: "{{ lookup('file', 'DataCuration.json') }}" + when: dataverse.externaltools.datacurationtool.enabled == true -- name: enable data explorer on demand +- name: enable data explorer uri: url: http://localhost:8080/api/admin/externalTools method: POST @@ -18,4 +18,14 @@ Content-type: "application/json" body_format: json body: "{{ lookup('file', 'dataExplorer.json') }}" - when: dataverse.dataexplorer.enabled == true + when: dataverse.externaltools.dataexplorer.enabled == true + +- name: enable wholetale + uri: + url: http://localhost:8080/api/admin/externalTools + method: POST + headers: + Content-type: "application/json" + body_format: json + body: "{{ lookup('file', 'wholetale.json') }}" + when: dataverse.externaltools.wholetale.enabled == true diff --git a/tests/group_vars/vagrant.yml b/tests/group_vars/vagrant.yml index e10d35e..d96e154 100644 --- a/tests/group_vars/vagrant.yml +++ b/tests/group_vars/vagrant.yml @@ -45,8 +45,6 @@ dataverse: upload_to_hub: False user: counter year_month: "2018-05" - dataexplorer: - enabled: true db: name: dvndb host: localhost @@ -62,6 +60,14 @@ dataverse: protocol: doi provider: FAKE shoulder: "FK2/" + externaltools: + datacurationtool: + enabled: true + method: demo + dataexplorer: + enabled: true + wholetale: + enabled: false filesdir: /usr/local/dvn/data glassfish: user: glassfish @@ -110,8 +116,6 @@ dataverse: thumbnails: true usermgmtkey: burrito version: 4.16 - wholetale: - enabled: false grafana: grafana_user: 'admin'