# HG changeset patch # User Alain Mazy # Date 1671192635 -3600 # Node ID a6fa660ec26efe2c4e2cfe00c64cde440283170e # Parent bdec57f3cbf2854da5ae4b57244c430ebc6263f7 /system: added MaximumStorageMode and MaximumStorageSize diff -r bdec57f3cbf2 -r a6fa660ec26e NEWS --- a/NEWS Wed Dec 14 11:50:43 2022 +0100 +++ b/NEWS Fri Dec 16 13:10:35 2022 +0100 @@ -27,7 +27,7 @@ from the configuration file for a specific operation. * /tools/metrics-prometheus: added orthanc_last_change and orthanc_up_time_s * Tolerance for "image/jpg" MIME type instead of "image/jpeg" in /tools/create-dicom - +* /system: added MaximumStorageMode and MaximumStorageSize OrthancFramework (C++) ---------------------- diff -r bdec57f3cbf2 -r a6fa660ec26e OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp --- a/OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp Wed Dec 14 11:50:43 2022 +0100 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp Fri Dec 16 13:10:35 2022 +0100 @@ -77,7 +77,9 @@ static const char* const STORAGE_COMPRESSION = "StorageCompression"; static const char* const OVERWRITE_INSTANCES = "OverwriteInstances"; static const char* const INGEST_TRANSCODING = "IngestTranscoding"; - + static const char* const MAXIMUM_STORAGE_SIZE = "MaximumStorageSize"; + static const char* const MAXIMUM_STORAGE_MODE = "MaximumStorageMode"; + if (call.IsDocumentation()) { call.GetDocumentation() @@ -113,6 +115,10 @@ "Whether instances are overwritten when re-ingested (new in Orthanc 1.11.0)") .SetAnswerField(INGEST_TRANSCODING, RestApiCallDocumentation::Type_String, "Whether instances are transcoded when ingested into Orthanc (`""` if no transcoding is performed) (new in Orthanc 1.11.0)") + .SetAnswerField(MAXIMUM_STORAGE_SIZE, RestApiCallDocumentation::Type_Number, + "The configured MaximumStorageSize in MB (new in Orthanc 1.11.3)") + .SetAnswerField(MAXIMUM_STORAGE_MODE, RestApiCallDocumentation::Type_String, + "The configured MaximumStorageMode (new in Orthanc 1.11.3)") .SetHttpGetSample("https://demo.orthanc-server.com/system", true); return; } @@ -137,6 +143,8 @@ result[OVERWRITE_INSTANCES] = lock.GetConfiguration().GetBooleanParameter(OVERWRITE_INSTANCES, false); // New in Orthanc 1.11.0 result[INGEST_TRANSCODING] = lock.GetConfiguration().GetStringParameter(INGEST_TRANSCODING, ""); // New in Orthanc 1.11.0 result[DATABASE_SERVER_IDENTIFIER] = lock.GetConfiguration().GetDatabaseServerIdentifier(); + result[MAXIMUM_STORAGE_SIZE] = lock.GetConfiguration().GetUnsignedIntegerParameter(MAXIMUM_STORAGE_SIZE, 0); // New in Orthanc 1.11.3 + result[MAXIMUM_STORAGE_MODE] = lock.GetConfiguration().GetStringParameter(MAXIMUM_STORAGE_MODE, "Recycle"); // New in Orthanc 1.11.3 } result[STORAGE_AREA_PLUGIN] = Json::nullValue; diff -r bdec57f3cbf2 -r a6fa660ec26e OrthancServer/Sources/Search/DatabaseLookup.cpp --- a/OrthancServer/Sources/Search/DatabaseLookup.cpp Wed Dec 14 11:50:43 2022 +0100 +++ b/OrthancServer/Sources/Search/DatabaseLookup.cpp Fri Dec 16 13:10:35 2022 +0100 @@ -113,6 +113,14 @@ (*element, DicomToJsonFlags_None, 0, encoding, hasCodeExtensions, ignoreTagLength)); + if (tag.getGroup() == 64 && tag.getElement() == 2) + { + constraints_[i]->IsMatch(value->GetContent()); + } + if (tag.getGroup() == 64 && tag.getElement() == 3) + { + constraints_[i]->IsMatch(value->GetContent()); + } // WARNING: Also modify "HierarchicalMatcher::Setup()" if modifying this code if (value.get() == NULL || value->IsNull())