Mercurial > hg > orthanc
changeset 151:11e48e70c039
instance naming
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 23 Oct 2012 14:34:57 +0200 |
parents | 1058c115aed1 |
children | 4829c054751a |
files | NEWS OrthancExplorer/explorer.html OrthancExplorer/explorer.js OrthancServer/OrthancRestApi.cpp Resources/Configuration.json |
diffstat | 5 files changed, 41 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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 @@ <body> <div data-role="page" id="find-patients" > <div data-role="header" > - <h1>Find a patient</h1> + <h1><span class="orthanc-name"></span>Find a patient</h1> <a href="#upload" data-icon="gear" class="ui-btn-right">Upload DICOM</a> </div> <div data-role="content"> @@ -45,7 +45,7 @@ <div data-role="page" id="upload" > <div data-role="header" > - <h1>Upload DICOM files</h1> + <h1><span class="orthanc-name"></span>Upload DICOM files</h1> <a href="#find-patients" data-icon="search" class="ui-btn-left" data-direction="reverse">Find patient</a> </div> <div data-role="content"> @@ -71,7 +71,7 @@ <div data-role="page" id="patient" > <div data-role="header" > - <h1>List of the studies of one patient</h1> + <h1><span class="orthanc-name"></span>List of the studies of one patient</h1> <a href="#find-patients" data-icon="search" class="ui-btn-left" data-direction="reverse">Find patient</a> <a href="#upload" data-icon="gear" class="ui-btn-right">Upload DICOM</a> </div> @@ -99,7 +99,7 @@ <div data-role="page" id="study"> <div data-role="header"> - <h1>List of the series of one study</h1> + <h1><span class="orthanc-name"></span>List of the series of one study</h1> <a href="#find-patients" data-icon="search" class="ui-btn-left" data-direction="reverse">Find patient</a> <a href="#upload" data-icon="gear" class="ui-btn-right">Upload DICOM</a> </div> @@ -126,7 +126,7 @@ <div data-role="page" id="series"> <div data-role="header"> - <h1>List of the instances of one series</h1> + <h1><span class="orthanc-name"></span>List of the instances of one series</h1> <a href="#find-patients" data-icon="search" class="ui-btn-left" data-direction="reverse">Find patient</a> <a href="#upload" data-icon="gear" class="ui-btn-right">Upload DICOM</a> </div> @@ -155,7 +155,7 @@ <div data-role="page" id="instance"> <div data-role="header"> - <h1>One DICOM instance</h1> + <h1><span class="orthanc-name"></span>One DICOM instance</h1> <a href="#find-patients" data-icon="search" class="ui-btn-left" data-direction="reverse">Find patient</a> <a href="#upload" data-icon="gear" class="ui-btn-right">Upload DICOM</a> </div>
--- 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();
--- 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")
--- 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,