Mercurial > hg > orthanc
annotate OrthancServer/Plugins/Samples/ConnectivityChecks/WebResources/app.js @ 4097:99e2054d1e8d
fix unit tests for orthanc framework
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 01 Jul 2020 11:15:29 +0200 |
parents | d25f4c0fa160 |
children | 4bb7522a63e0 |
rev | line source |
---|---|
3622
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 /** |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 * Orthanc - A Lightweight, RESTful DICOM Store |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
3640
94f4a18a79cc
upgrade to year 2020
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3622
diff
changeset
|
5 * Copyright (C) 2017-2020 Osimis S.A., Belgium |
3622
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 * |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 * This program is free software: you can redistribute it and/or |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 * modify it under the terms of the GNU General Public License as |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 * published by the Free Software Foundation, either version 3 of the |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 * License, or (at your option) any later version. |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 * |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 * In addition, as a special exception, the copyright holders of this |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 * program give permission to link the code of its release with the |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 * OpenSSL project's "OpenSSL" library (or with modified versions of it |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 * that use the same license as the "OpenSSL" library), and distribute |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 * the linked executables. You must obey the GNU General Public License |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 * in all respects for all of the code used other than "OpenSSL". If you |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 * modify file(s) with this exception, you may extend this exception to |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 * your version of the file(s), but you are not obligated to do so. If |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 * you do not wish to do so, delete this exception statement from your |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 * version. If you delete this exception statement from all source files |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 * in the program, then also delete it here. |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 * |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 * This program is distributed in the hope that it will be useful, but |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 * WITHOUT ANY WARRANTY; without even the implied warranty of |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 * General Public License for more details. |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 * |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 * You should have received a copy of the GNU General Public License |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 **/ |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 new Vue({ |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 el: '#app', |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 data: { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 dicomNodes: {}, |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 peers: [], |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 canTestPeers: false, |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 dicomWebServers: [] |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 }, |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 methods: { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 toggle: function (todo) { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 todo.done = !todo.done |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 }, |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 testDicomModalities: function () { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 console.log('testing DICOM modalities'); |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 axios |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 .get('../../modalities?expand') |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 .then(response => { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 this.dicomNodes = response.data; |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 for (let alias of Object.keys(this.dicomNodes)) { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 this.dicomNodes[alias]['alias'] = alias; |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 this.dicomNodes[alias]['status'] = 'testing'; |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
56 axios |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
57 .post('../../modalities/' + alias + '/echo') |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
58 .then(response => { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
59 this.dicomNodes[alias]['status'] = 'ok'; |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
60 this.$forceUpdate(); |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
61 }) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
62 .catch(response => { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
63 this.dicomNodes[alias]['status'] = 'ko'; |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
64 this.$forceUpdate(); |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
65 }) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
66 } |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
67 }) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
68 }, |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
69 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
70 testOrthancPeers: function () { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
71 console.log('testing Orthanc peers'); |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
72 axios |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
73 .get('../../peers?expand') |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
74 .then(response => { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
75 this.peers = response.data; |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
76 for (let alias of Object.keys(this.peers)) { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
77 this.peers[alias]['alias'] = alias; |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
78 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
79 if (this.canTestPeers) { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
80 this.peers[alias]['status'] = 'testing'; |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
81 axios |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
82 .get('../../peers/' + alias + '/system') // introduced in ApiVersion 5 only ! |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
83 .then(response => { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
84 this.peers[alias]['status'] = 'ok'; |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
85 this.$forceUpdate(); |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
86 }) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
87 .catch(response => { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
88 this.peers[alias]['status'] = 'ko'; |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
89 this.$forceUpdate(); |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
90 }) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
91 } |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
92 else { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
93 this.peers[alias]['status'] = 'unknown'; |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
94 this.$forceUpdate(); |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
95 } |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
96 } |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
97 }) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
98 }, |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
99 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
100 testDicomWebServers: function () { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
101 console.log('testing Dicom-web servers'); |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
102 axios |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
103 .get('../../dicom-web/servers?expand') |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
104 .then(response => { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
105 this.dicomWebServers = response.data; |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
106 for (let alias of Object.keys(this.dicomWebServers)) { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
107 this.dicomWebServers[alias]['alias'] = alias; |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
108 this.dicomWebServers[alias]['status'] = 'testing'; |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
109 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
110 // perform a dummy qido-rs to test the connectivity |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
111 axios |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
112 .post('../../dicom-web/servers/' + alias + '/qido', { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
113 'Uri' : '/studies', |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
114 'Arguments' : { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
115 '00100010' : 'CONNECTIVITY^CHECKS' |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
116 } |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
117 }) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
118 .then(response => { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
119 this.dicomWebServers[alias]['status'] = 'ok'; |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
120 this.$forceUpdate(); |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
121 }) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
122 .catch(response => { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
123 this.dicomWebServers[alias]['status'] = 'ko'; |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
124 this.$forceUpdate(); |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
125 }) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
126 } |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
127 }) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
128 }, |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
129 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
130 }, |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
131 computed: { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
132 }, |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
133 mounted() { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
134 axios |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
135 .get('../../system') |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
136 .then(response => { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
137 this.canTestPeers = response.data.ApiVersion >= 5; |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
138 this.testDicomModalities(); |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
139 if (this.canTestPeers) { |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
140 this.testOrthancPeers(); |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
141 } |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
142 this.testDicomWebServers(); |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
143 }) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
144 } |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
145 }) |