comparison OrthancServer/OrthancRestApi/OrthancRestSystem.cpp @ 1630:ffd23c0104af

"/system" URI gives information about the plugins used for storage area and DB back-end
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 21 Sep 2015 13:26:45 +0200
parents 415dfd1d1c61
children 0d074f5f6069
comparison
equal deleted inserted replaced
1629:bad4772b605c 1630:ffd23c0104af
60 result["DicomPort"] = Configuration::GetGlobalIntegerParameter("DicomPort", 4242); 60 result["DicomPort"] = Configuration::GetGlobalIntegerParameter("DicomPort", 4242);
61 result["HttpPort"] = Configuration::GetGlobalIntegerParameter("HttpPort", 8042); 61 result["HttpPort"] = Configuration::GetGlobalIntegerParameter("HttpPort", 8042);
62 result["Name"] = Configuration::GetGlobalStringParameter("Name", ""); 62 result["Name"] = Configuration::GetGlobalStringParameter("Name", "");
63 result["Version"] = ORTHANC_VERSION; 63 result["Version"] = ORTHANC_VERSION;
64 64
65 result["StorageAreaPlugin"] = Json::nullValue;
66 result["DatabaseBackendPlugin"] = Json::nullValue;
67
68 const OrthancPlugins& plugins = OrthancRestApi::GetContext(call).GetPlugins();
69
70 if (plugins.HasStorageArea())
71 {
72 result["StorageAreaPlugin"] = plugins.GetStorageAreaLibrary().GetPath();
73 }
74
75 if (plugins.HasDatabaseBackend())
76 {
77 result["DatabaseBackendPlugin"] = plugins.GetDatabaseBackendLibrary().GetPath();
78 }
79
65 call.GetOutput().AnswerJson(result); 80 call.GetOutput().AnswerJson(result);
66 } 81 }
67 82
68 static void GetStatistics(RestApiGetCall& call) 83 static void GetStatistics(RestApiGetCall& call)
69 { 84 {