# HG changeset patch # User Sebastien Jodogne # Date 1350995697 -7200 # Node ID 11e48e70c0397ea2473b095289dfbdcc698a5b88 # Parent 1058c115aed1b30e75c72711382df4357d715e5a instance naming diff -r 1058c115aed1 -r 11e48e70c039 NEWS --- a/NEWS Tue Oct 16 15:30:19 2012 +0200 +++ b/NEWS Tue Oct 23 14:34:57 2012 +0200 @@ -1,10 +1,12 @@ Pending changes in the mainline =============================== +* URI "/system" * Help on the command line * Improved logging * Possibility of dynamic linking against jsoncpp, sqlite, boost and dmctk * Fix some bugs +* Switch to 8042 port for HTTP Version 0.2.2 (2012/10/04) diff -r 1058c115aed1 -r 11e48e70c039 OrthancExplorer/explorer.html --- a/OrthancExplorer/explorer.html Tue Oct 16 15:30:19 2012 +0200 +++ b/OrthancExplorer/explorer.html Tue Oct 23 14:34:57 2012 +0200 @@ -34,7 +34,7 @@
-

Find a patient

+

Find a patient

Upload DICOM
@@ -45,7 +45,7 @@
-

Upload DICOM files

+

Upload DICOM files

Find patient
@@ -71,7 +71,7 @@
-

List of the studies of one patient

+

List of the studies of one patient

Find patient Upload DICOM
@@ -99,7 +99,7 @@
-

List of the series of one study

+

List of the series of one study

Find patient Upload DICOM
@@ -126,7 +126,7 @@
-

List of the instances of one series

+

List of the instances of one series

Find patient Upload DICOM
@@ -155,7 +155,7 @@
-

One DICOM instance

+

One DICOM instance

Find patient Upload DICOM
diff -r 1058c115aed1 -r 11e48e70c039 OrthancExplorer/explorer.js --- a/OrthancExplorer/explorer.js Tue Oct 16 15:30:19 2012 +0200 +++ b/OrthancExplorer/explorer.js Tue Oct 23 14:34:57 2012 +0200 @@ -322,6 +322,16 @@ $('#find-patients').live('pagebeforeshow', function() { + //$('.orthanc-name').each( + + $.ajax({ + url: '/system', + dataType: 'json', + success: function(s) { + $('.orthanc-name').html(s.Name + ' » '); + } + }); + GetMultipleResources('patients', null, function(patients) { var target = $('#all-patients'); $('li', target).remove(); diff -r 1058c115aed1 -r 11e48e70c039 OrthancServer/OrthancRestApi.cpp --- a/OrthancServer/OrthancRestApi.cpp Tue Oct 16 15:30:19 2012 +0200 +++ b/OrthancServer/OrthancRestApi.cpp Tue Oct 23 14:34:57 2012 +0200 @@ -418,6 +418,25 @@ Json::Value result(Json::objectValue); + // Version information ------------------------------------------------------ + + if (uri.size() == 1 && uri[0] == "system") + { + if (method == "GET") + { + result = Json::Value(Json::objectValue); + result["Version"] = ORTHANC_VERSION; + result["Name"] = GetGlobalStringParameter("Name", ""); + existingResource = true; + } + else + { + output.SendMethodNotAllowedError("GET,POST"); + return; + } + } + + // List all the instances --------------------------------------------------- if (uri.size() == 1 && uri[0] == "instances") diff -r 1058c115aed1 -r 11e48e70c039 Resources/Configuration.json --- a/Resources/Configuration.json Tue Oct 16 15:30:19 2012 +0200 +++ b/Resources/Configuration.json Tue Oct 23 14:34:57 2012 +0200 @@ -6,6 +6,9 @@ // Path to the directory that holds the database "StorageDirectory" : "OrthancStorage", + // The logical name of this instance of Orthanc. This one is + // displayed in Orthanc Explorer and at the URI "/system". + "Name" : "MyOrthanc", /** @@ -13,7 +16,7 @@ **/ // HTTP port for the REST services and for the GUI - "HttpPort" : 8000, + "HttpPort" : 8042,