Mercurial > hg > orthanc
comparison OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp @ 5120:a6fa660ec26e
/system: added MaximumStorageMode and MaximumStorageSize
author | Alain Mazy <am@osimis.io> |
---|---|
date | Fri, 16 Dec 2022 13:10:35 +0100 |
parents | 7547c7dfd017 |
children | 9fc5bf6f3c75 |
comparison
equal
deleted
inserted
replaced
5119:bdec57f3cbf2 | 5120:a6fa660ec26e |
---|---|
75 static const char* const VERSION = "Version"; | 75 static const char* const VERSION = "Version"; |
76 static const char* const MAIN_DICOM_TAGS = "MainDicomTags"; | 76 static const char* const MAIN_DICOM_TAGS = "MainDicomTags"; |
77 static const char* const STORAGE_COMPRESSION = "StorageCompression"; | 77 static const char* const STORAGE_COMPRESSION = "StorageCompression"; |
78 static const char* const OVERWRITE_INSTANCES = "OverwriteInstances"; | 78 static const char* const OVERWRITE_INSTANCES = "OverwriteInstances"; |
79 static const char* const INGEST_TRANSCODING = "IngestTranscoding"; | 79 static const char* const INGEST_TRANSCODING = "IngestTranscoding"; |
80 | 80 static const char* const MAXIMUM_STORAGE_SIZE = "MaximumStorageSize"; |
81 static const char* const MAXIMUM_STORAGE_MODE = "MaximumStorageMode"; | |
82 | |
81 if (call.IsDocumentation()) | 83 if (call.IsDocumentation()) |
82 { | 84 { |
83 call.GetDocumentation() | 85 call.GetDocumentation() |
84 .SetTag("System") | 86 .SetTag("System") |
85 .SetSummary("Get system information") | 87 .SetSummary("Get system information") |
111 "Whether storage compression is enabled (new in Orthanc 1.11.0)") | 113 "Whether storage compression is enabled (new in Orthanc 1.11.0)") |
112 .SetAnswerField(OVERWRITE_INSTANCES, RestApiCallDocumentation::Type_Boolean, | 114 .SetAnswerField(OVERWRITE_INSTANCES, RestApiCallDocumentation::Type_Boolean, |
113 "Whether instances are overwritten when re-ingested (new in Orthanc 1.11.0)") | 115 "Whether instances are overwritten when re-ingested (new in Orthanc 1.11.0)") |
114 .SetAnswerField(INGEST_TRANSCODING, RestApiCallDocumentation::Type_String, | 116 .SetAnswerField(INGEST_TRANSCODING, RestApiCallDocumentation::Type_String, |
115 "Whether instances are transcoded when ingested into Orthanc (`""` if no transcoding is performed) (new in Orthanc 1.11.0)") | 117 "Whether instances are transcoded when ingested into Orthanc (`""` if no transcoding is performed) (new in Orthanc 1.11.0)") |
118 .SetAnswerField(MAXIMUM_STORAGE_SIZE, RestApiCallDocumentation::Type_Number, | |
119 "The configured MaximumStorageSize in MB (new in Orthanc 1.11.3)") | |
120 .SetAnswerField(MAXIMUM_STORAGE_MODE, RestApiCallDocumentation::Type_String, | |
121 "The configured MaximumStorageMode (new in Orthanc 1.11.3)") | |
116 .SetHttpGetSample("https://demo.orthanc-server.com/system", true); | 122 .SetHttpGetSample("https://demo.orthanc-server.com/system", true); |
117 return; | 123 return; |
118 } | 124 } |
119 | 125 |
120 ServerContext& context = OrthancRestApi::GetContext(call); | 126 ServerContext& context = OrthancRestApi::GetContext(call); |
135 result[CHECK_REVISIONS] = lock.GetConfiguration().GetBooleanParameter(CHECK_REVISIONS, false); // New in Orthanc 1.9.2 | 141 result[CHECK_REVISIONS] = lock.GetConfiguration().GetBooleanParameter(CHECK_REVISIONS, false); // New in Orthanc 1.9.2 |
136 result[STORAGE_COMPRESSION] = lock.GetConfiguration().GetBooleanParameter(STORAGE_COMPRESSION, false); // New in Orthanc 1.11.0 | 142 result[STORAGE_COMPRESSION] = lock.GetConfiguration().GetBooleanParameter(STORAGE_COMPRESSION, false); // New in Orthanc 1.11.0 |
137 result[OVERWRITE_INSTANCES] = lock.GetConfiguration().GetBooleanParameter(OVERWRITE_INSTANCES, false); // New in Orthanc 1.11.0 | 143 result[OVERWRITE_INSTANCES] = lock.GetConfiguration().GetBooleanParameter(OVERWRITE_INSTANCES, false); // New in Orthanc 1.11.0 |
138 result[INGEST_TRANSCODING] = lock.GetConfiguration().GetStringParameter(INGEST_TRANSCODING, ""); // New in Orthanc 1.11.0 | 144 result[INGEST_TRANSCODING] = lock.GetConfiguration().GetStringParameter(INGEST_TRANSCODING, ""); // New in Orthanc 1.11.0 |
139 result[DATABASE_SERVER_IDENTIFIER] = lock.GetConfiguration().GetDatabaseServerIdentifier(); | 145 result[DATABASE_SERVER_IDENTIFIER] = lock.GetConfiguration().GetDatabaseServerIdentifier(); |
146 result[MAXIMUM_STORAGE_SIZE] = lock.GetConfiguration().GetUnsignedIntegerParameter(MAXIMUM_STORAGE_SIZE, 0); // New in Orthanc 1.11.3 | |
147 result[MAXIMUM_STORAGE_MODE] = lock.GetConfiguration().GetStringParameter(MAXIMUM_STORAGE_MODE, "Recycle"); // New in Orthanc 1.11.3 | |
140 } | 148 } |
141 | 149 |
142 result[STORAGE_AREA_PLUGIN] = Json::nullValue; | 150 result[STORAGE_AREA_PLUGIN] = Json::nullValue; |
143 result[DATABASE_BACKEND_PLUGIN] = Json::nullValue; | 151 result[DATABASE_BACKEND_PLUGIN] = Json::nullValue; |
144 | 152 |