Mercurial > hg > orthanc
changeset 205:6ab754744446
logging of completed series
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 28 Nov 2012 11:34:54 +0100 |
parents | 7f4acf490179 |
children | 4453a010d0db |
files | OrthancServer/DatabaseWrapper.cpp OrthancServer/ServerIndex.cpp |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/DatabaseWrapper.cpp Wed Nov 28 11:27:57 2012 +0100 +++ b/OrthancServer/DatabaseWrapper.cpp Wed Nov 28 11:34:54 2012 +0100 @@ -533,12 +533,14 @@ int64_t internalId = s.ColumnInt(2); ResourceType resourceType = static_cast<ResourceType>(s.ColumnInt(3)); const std::string& date = s.ColumnString(4); + std::string publicId = GetPublicId(internalId); Json::Value item = Json::objectValue; item["Seq"] = static_cast<int>(seq); item["ChangeType"] = ToString(changeType); item["ResourceType"] = ToString(resourceType); - item["ID"] = GetPublicId(internalId); + item["ID"] = publicId; + item["Path"] = GetBasePath(resourceType, publicId); item["Date"] = date; last = seq;
--- a/OrthancServer/ServerIndex.cpp Wed Nov 28 11:27:57 2012 +0100 +++ b/OrthancServer/ServerIndex.cpp Wed Nov 28 11:34:54 2012 +0100 @@ -293,6 +293,13 @@ } } + // Check whether the series of this new instance is now completed + SeriesStatus seriesStatus = GetSeriesStatus(series); + if (seriesStatus == SeriesStatus_Complete) + { + db_->LogChange(ChangeType_CompletedSeries, series, ResourceType_Series); + } + t->Commit(); return StoreStatus_Success;