From 7e680a8f7deab21a118f1f08e1772aa661b5e886 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Wed, 28 Feb 2024 15:54:04 +0000 Subject: [PATCH] make metric file configurable --- simpleclient/index.php | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/simpleclient/index.php b/simpleclient/index.php index d2a5668d..0e0314cb 100644 --- a/simpleclient/index.php +++ b/simpleclient/index.php @@ -47,7 +47,7 @@ $fuji_server = 'http://localhost:1071/fuji/api/v1/evaluate'; $fuji_username = 'marvel'; $fuji_password = 'wonderwoman'; -$metric_version = "metrics_v0.7_software"; #"metrics_v0.7_software_cessda"; #"metrics_v0.5"; #"metrics_v0.7_software"; +#$metric_version = "metrics_v0.7_software"; #"metrics_v0.7_software_cessda"; #"metrics_v0.5"; #"metrics_v0.7_software"; $usegithub = true; ################################################################ @@ -83,7 +83,14 @@ $input_service_type = $_POST['service_type']; } } +if(isset($_POST['metric_version'])){ + $input_metric_version=$_POST['metric_version']; +}else{ + $input_metric_version="metrics_v0.7_software"; +} + $allowed_service_types = array('oai_pmh'=>'OAI-PMH','ogc_csw'=>'OGC CSW', 'sparql'=>'SPARQL'); +$allowed_metric_versions = array('metrics_v0.7_software'=>'software-agnostic', 'metrics_v0.7_software_cessda'=>'software-CESSDA') ?>
@@ -136,7 +143,20 @@
-
+
+ + +
+
test_debug = true; $message->use_datacite = $usedatacite; $message->use_github = $usegithub; - $message->metric_version = $metric_version; + $message->metric_version = $input_metric_version; $post = json_encode($message); $username = $fuji_username;