iris-pex-embedded-python 2.3.19__py3-none-any.whl → 2.3.21b1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of iris-pex-embedded-python might be problematic. Click here for more details.

Files changed (54) hide show
  1. grongier/cls/Grongier/PEX/Common.cls +115 -74
  2. grongier/pex/wsgi/handlers.py +51 -0
  3. intersystems_iris/_IRISOREF.py +6 -1
  4. intersystems_iris/dbapi/_DBAPI.py +16 -1
  5. intersystems_iris/dbapi/_Parameter.py +2 -0
  6. {iris_pex_embedded_python-2.3.19.dist-info → iris_pex_embedded_python-2.3.21b1.dist-info}/METADATA +32 -10
  7. {iris_pex_embedded_python-2.3.19.dist-info → iris_pex_embedded_python-2.3.21b1.dist-info}/RECORD +11 -53
  8. {iris_pex_embedded_python-2.3.19.dist-info → iris_pex_embedded_python-2.3.21b1.dist-info}/WHEEL +1 -1
  9. grongier/iris/Grongier/PEX/BusinessOperation.cls +0 -33
  10. grongier/iris/Grongier/PEX/BusinessProcess.cls +0 -100
  11. grongier/iris/Grongier/PEX/BusinessService.cls +0 -33
  12. grongier/iris/Grongier/PEX/Common.cls +0 -133
  13. grongier/iris/Grongier/PEX/Director.cls +0 -15
  14. grongier/iris/Grongier/PEX/Duplex/Operation.cls +0 -27
  15. grongier/iris/Grongier/PEX/Duplex/Process.cls +0 -211
  16. grongier/iris/Grongier/PEX/Duplex/Service.cls +0 -9
  17. grongier/iris/Grongier/PEX/InboundAdapter.cls +0 -22
  18. grongier/iris/Grongier/PEX/Message.cls +0 -126
  19. grongier/iris/Grongier/PEX/OutboundAdapter.cls +0 -34
  20. grongier/iris/Grongier/PEX/PickleMessage.cls +0 -58
  21. grongier/iris/Grongier/PEX/PrivateSession/Duplex.cls +0 -247
  22. grongier/iris/Grongier/PEX/PrivateSession/Message/Ack.cls +0 -32
  23. grongier/iris/Grongier/PEX/PrivateSession/Message/Poll.cls +0 -32
  24. grongier/iris/Grongier/PEX/PrivateSession/Message/Start.cls +0 -32
  25. grongier/iris/Grongier/PEX/PrivateSession/Message/Stop.cls +0 -48
  26. grongier/iris/Grongier/PEX/Python.cls +0 -27
  27. grongier/iris/Grongier/PEX/Test.cls +0 -62
  28. grongier/iris/Grongier/PEX/Utils.cls +0 -312
  29. grongier/iris/__init__.py +0 -0
  30. grongier/pex/data/PEX/BusinessOperation.cls +0 -35
  31. grongier/pex/data/PEX/BusinessProcess.cls +0 -113
  32. grongier/pex/data/PEX/BusinessService.cls +0 -35
  33. grongier/pex/data/PEX/Common.cls +0 -146
  34. grongier/pex/data/PEX/Director.cls +0 -57
  35. grongier/pex/data/PEX/Duplex/Operation.cls +0 -29
  36. grongier/pex/data/PEX/Duplex/Process.cls +0 -229
  37. grongier/pex/data/PEX/Duplex/Service.cls +0 -9
  38. grongier/pex/data/PEX/InboundAdapter.cls +0 -22
  39. grongier/pex/data/PEX/Message.cls +0 -128
  40. grongier/pex/data/PEX/OutboundAdapter.cls +0 -36
  41. grongier/pex/data/PEX/PickleMessage.cls +0 -58
  42. grongier/pex/data/PEX/PrivateSession/Duplex.cls +0 -260
  43. grongier/pex/data/PEX/PrivateSession/Message/Ack.cls +0 -32
  44. grongier/pex/data/PEX/PrivateSession/Message/Poll.cls +0 -32
  45. grongier/pex/data/PEX/PrivateSession/Message/Start.cls +0 -32
  46. grongier/pex/data/PEX/PrivateSession/Message/Stop.cls +0 -48
  47. grongier/pex/data/PEX/Test.cls +0 -62
  48. grongier/pex/data/PEX/Utils.cls +0 -413
  49. iris/iris_site.py +0 -13
  50. iris/irisbuiltins.py +0 -97
  51. iris/irisloader.py +0 -199
  52. {iris_pex_embedded_python-2.3.19.dist-info → iris_pex_embedded_python-2.3.21b1.dist-info}/LICENSE +0 -0
  53. {iris_pex_embedded_python-2.3.19.dist-info → iris_pex_embedded_python-2.3.21b1.dist-info}/entry_points.txt +0 -0
  54. {iris_pex_embedded_python-2.3.19.dist-info → iris_pex_embedded_python-2.3.21b1.dist-info}/top_level.txt +0 -0
@@ -1,29 +0,0 @@
1
- Class Grongier.PEX.DuplexOperation Extends Grongier.PEX.PrivateSessionDuplex
2
- {
3
-
4
- ClassMethod OnBusinessType(pItem As Ens.Config.Item) As %Integer
5
- {
6
- Quit $$$eHostTypeOperation
7
- }
8
-
9
- XData MessageMap
10
- {
11
- <MapItems>
12
- <MapItem MessageType="Ens.Request"><Method>OnMessage</Method></MapItem>
13
- </MapItems>
14
- }
15
-
16
- Method OnMessage(
17
- request As %Library.Persistent,
18
- Output response As %Library.Persistent) As %Status
19
- {
20
- set tSC = $$$OK
21
- try {
22
- set response = ..%class."_dispatch_on_message"(request)
23
- } catch ex {
24
- set tSC = ex.AsStatus()
25
- }
26
- quit tSC
27
- }
28
-
29
- }
@@ -1,229 +0,0 @@
1
- /* Copyright (c) 2022 by InterSystems Corporation.
2
- Cambridge, Massachusetts, U.S.A. All rights reserved.
3
- Confidential property of InterSystems Corporation. */
4
-
5
- Class Grongier.PEX.DuplexProcess Extends Grongier.PEX.BusinessProcess [ ClassType = persistent, ProcedureBlock, System = 4 ]
6
- {
7
-
8
- /// Domain for Text localization
9
- Parameter DOMAIN = "PrivateSession";
10
-
11
- /// The Duplex Service name. This property is set at runtime after receiving the primary request
12
- Property ServiceDuplexName As %String;
13
-
14
- /// Indicates if a given ConfigItem is in private session or not
15
- Property %IsInPrivateSession As array Of %Boolean(STORAGEDEFAULT = "list");
16
-
17
- /// This method is always called asynchronously ONCE at the beginning of the process
18
- Method OnRequest(
19
- pRequest As %Library.Persistent,
20
- Output pResponse As Ens.Response) As %Status
21
- {
22
- #dim tSC As %Status = $$$OK
23
- try {
24
- If $IsObject(pRequest)&&($classname(pRequest)="Grongier.PEX.PrivateSession.Message.Start") {
25
- Set tSC=..Reply(##class(Grongier.PEX.PrivateSession.Message.Ack).%New()) Quit:$$$ISERR(tSC)
26
- Set ..ServiceDuplexName = ..%PrimaryRequestHeader.SourceConfigName
27
- Do ..IsInPrivateSessionSet(..ServiceDuplexName,1)
28
- Set tSC=..SendRequestAsync(..ServiceDuplexName,##class(Grongier.PEX.PrivateSession.Message.Poll).%New(),1) Quit:$$$ISERR(tSC)
29
- Set tSC=..OnPrivateSessionStarted(..ServiceDuplexName,0) Quit:$$$ISERR(tSC)
30
- } Else {
31
- Set tSC=..OnDocument(..%PrimaryRequestHeader.SourceConfigName,pRequest)
32
- }
33
- } catch {
34
- Set tSC=$$$EnsSystemError
35
- }
36
- Quit tSC
37
- }
38
-
39
- /// Handle a 'Response'
40
- Method OnResponse(
41
- request As %Library.Persistent,
42
- ByRef response As %Library.Persistent,
43
- callrequest As %Library.Persistent,
44
- callresponse As %Library.Persistent,
45
- pCompletionKey As %String) As %Status
46
- {
47
- #dim tSC As %Status = $$$OK
48
- #dim tSourceConfigName, tOneConfigName As %String
49
- try {
50
- ; get the SourceConfigName of this message
51
- Set tSourceConfigName=..%CurrentResponseHeader.SourceConfigName
52
- ; handle SessionStop message
53
- If $IsObject(callresponse)&&($classname(callresponse)="Grongier.PEX.PrivateSession.Message.Ack") {
54
- Do ..IsInPrivateSessionSet(tSourceConfigName,1)
55
- Set tSC=..SendRequestAsync(tSourceConfigName,##class(Grongier.PEX.PrivateSession.Message.Poll).%New(),1) Quit:$$$ISERR(tSC)
56
- Set tSC=..OnPrivateSessionStarted(tSourceConfigName,1) Quit:$$$ISERR(tSC)
57
- Quit
58
- }
59
- ; handle SessionStop message
60
- If $IsObject(callresponse)&&($classname(callresponse)="Grongier.PEX.PrivateSession.Message.Stop") {
61
- Set tSC=..UnRegisterPrivateSession(tSourceConfigName) Quit:$$$ISERR(tSC)
62
- Set tSC=..OnPrivateSessionStopped(tSourceConfigName,0,callresponse.AttachedMessage) Quit:$$$ISERR(tSC)
63
- Quit
64
- }
65
- ; send poll request again back to the same ConfigItem if this this is in response to a poll request
66
- If $IsObject(callrequest)&&($classname(callrequest)="Grongier.PEX.PrivateSession.Message.Poll") {
67
- If ..IsInPrivateSession(tSourceConfigName) {
68
- Set tSC=..SendRequestAsync(tSourceConfigName,##class(Grongier.PEX.PrivateSession.Message.Poll).%New(),1) If $$$ISERR(tSC)
69
- }
70
- }
71
- ; call OnDocument
72
- Set tSC=..OnDocument(tSourceConfigName,callresponse) Quit:$$$ISERR(tSC)
73
- } catch {
74
- Set tSC=$$$EnsSystemError
75
- }
76
- Quit tSC
77
- }
78
-
79
- Method StartPrivateSession(pDuplexConfigName As %String = "") As %Status
80
- {
81
- #dim tSC As %Status = $$$OK
82
- try {
83
- If pDuplexConfigName="" Set tSC=$$$EnsError($$$EnsErrGeneral,"Duplex configuration name is missing") Quit
84
- If ..IsInPrivateSession(pDuplexConfigName) Quit
85
- Set tSC=..SendRequestAsync(pDuplexConfigName,##class(Grongier.PEX.PrivateSession.Message.Start).%New()) Quit:$$$ISERR(tSC)
86
- } catch {
87
- Set tSC=$$$EnsSystemError
88
- }
89
- Quit tSC
90
- }
91
-
92
- Method StopPrivateSession(
93
- pDuplexConfigName As %String = "",
94
- pAttachedMessage As %Persistent = "") As %Status
95
- {
96
- #dim tSC As %Status = $$$OK
97
- try {
98
- If pDuplexConfigName="" Set tSC=$$$EnsError($$$EnsErrGeneral,"Duplex configuration name is missing") Quit
99
- If '..IsInPrivateSession(pDuplexConfigName) Quit
100
- Set tSC=..SendRequestAsync(pDuplexConfigName,##class(Grongier.PEX.PrivateSession.Message.Stop).%New(pAttachedMessage),0) Quit:$$$ISERR(tSC)
101
- Set tSC=..UnRegisterPrivateSession(pDuplexConfigName)
102
- Set tSC=..OnPrivateSessionStopped(pDuplexConfigName,1) Quit:$$$ISERR(tSC)
103
- } catch {
104
- Set tSC=$$$EnsSystemError
105
- }
106
- Quit tSC
107
- }
108
-
109
- Method StopAllPrivateSessions(pAttachedMessage As %Persistent = "") As %Status
110
- {
111
- #dim tSC As %Status = $$$OK
112
- #dim tItem As %String
113
- try {
114
- Set tItem="" For {
115
- Set tItem=..%IsInPrivateSession.Next(tItem) Quit:tItem=""
116
- Set tSC=..StopPrivateSession(tItem,pAttachedMessage) Quit:$$$ISERR(tSC)
117
- }
118
- } catch {
119
- Set tSC=$$$EnsSystemError
120
- }
121
- Quit tSC
122
- }
123
-
124
- Method UnRegisterPrivateSession(pDuplexConfigName As %String) As %String
125
- {
126
- #dim tSC As %Status = $$$OK
127
- try {
128
- For i=..%MasterPendingResponses.Count():-1:1 {
129
- Set tRequestHeader=##class(Ens.MessageHeader).%OpenId($li(..%MasterPendingResponses.GetAt(i),1))
130
- If $IsObject(tRequestHeader),tRequestHeader.TargetConfigName=pDuplexConfigName,tRequestHeader.MessageBodyClassName="Grongier.PEX.PrivateSession.Message.Poll" {
131
- Do ..%MasterPendingResponses.RemoveAt(i)
132
- }
133
- }
134
- Do ..IsInPrivateSessionSet(pDuplexConfigName,0)
135
- } catch {
136
- Set tSC=$$$EnsSystemError
137
- }
138
- Quit tSC
139
- }
140
-
141
- Method IsInPrivateSessionSet(
142
- pDuplexConfigName As %String,
143
- pInPrivateSession As %Boolean)
144
- {
145
- If pInPrivateSession {
146
- Do ..%IsInPrivateSession.SetAt(1,pDuplexConfigName)
147
- } Else {
148
- Do ..%IsInPrivateSession.RemoveAt(pDuplexConfigName)
149
- }
150
- Quit
151
- }
152
-
153
- Method IsInPrivateSession(pDuplexConfigName As %String) As %Boolean
154
- {
155
- If pDuplexConfigName="" Quit 0
156
- Quit ..%IsInPrivateSession.IsDefined(pDuplexConfigName)
157
- }
158
-
159
- Method OnDocument(
160
- pSourceConfigName As %String,
161
- pInput As %Library.Persistent) As %Status
162
- {
163
- set tSC = $$$OK
164
- try {
165
- set response = ..%class."_dispatch_on_document"($this,pSourceConfigName,pInput)
166
- } catch ex {
167
- set tSC = ex.AsStatus()
168
- }
169
- quit tSC
170
- }
171
-
172
- Method OnPrivateSessionStarted(
173
- pSourceConfigName As %String,
174
- pSelfGenerated As %Boolean) As %Status
175
- {
176
- set tSC = $$$OK
177
- try {
178
- set response = ..%class."_dispatch_on_private_session_started"($this,pSourceConfigName,pSelfGenerated)
179
- } catch ex {
180
- set tSC = ex.AsStatus()
181
- }
182
- quit tSC
183
- }
184
-
185
- Method OnPrivateSessionStopped(
186
- pSourceConfigName As %String,
187
- pSelfGenerated As %Boolean,
188
- pAttachedMessage As %Persistent = "") As %Status
189
- {
190
- set tSC = $$$OK
191
- try {
192
- set response = ..%class."_dispatch_on_private_session_stopped"($this,pSourceConfigName,pSelfGenerated,pAttachedMessage)
193
- } catch ex {
194
- set tSC = ex.AsStatus()
195
- }
196
- quit tSC
197
- }
198
-
199
- Storage Default
200
- {
201
- <Data name="ProcessDefaultData">
202
- <Subscript>"Process"</Subscript>
203
- <Value name="1">
204
- <Value>ServiceDuplexName</Value>
205
- </Value>
206
- <Value name="2">
207
- <Value>%IsInPrivateSession</Value>
208
- </Value>
209
- <Value name="3">
210
- <Value>%classpaths</Value>
211
- </Value>
212
- <Value name="4">
213
- <Value>%classname</Value>
214
- </Value>
215
- <Value name="5">
216
- <Value>%module</Value>
217
- </Value>
218
- <Value name="6">
219
- <Value>%settings</Value>
220
- </Value>
221
- <Value name="7">
222
- <Value>%class</Value>
223
- </Value>
224
- </Data>
225
- <DefaultData>ProcessDefaultData</DefaultData>
226
- <Type>%Storage.Persistent</Type>
227
- }
228
-
229
- }
@@ -1,9 +0,0 @@
1
- Class Grongier.PEX.DuplexService Extends Grongier.PEX.PrivateSessionDuplex
2
- {
3
-
4
- ClassMethod OnBusinessType(pItem As Ens.Config.Item) As %Integer
5
- {
6
- Quit $$$eHostTypeService
7
- }
8
-
9
- }
@@ -1,22 +0,0 @@
1
- /* Copyright (c) 2021 by InterSystems Corporation.
2
- Cambridge, Massachusetts, U.S.A. All rights reserved.
3
- Confidential property of InterSystems Corporation. */
4
-
5
- Class Grongier.PEX.InboundAdapter Extends (Ens.InboundAdapter, Grongier.PEX.Common) [ Inheritance = right, ProcedureBlock, System = 4 ]
6
- {
7
-
8
- Parameter SETTINGS = "%classname:Python InboundAdapter,%module:Python InboundAdapter,%settings:Python InboundAdapter,%classpaths:Python InboundAdapter";
9
-
10
- Method OnTask() As %Status
11
- {
12
- set tSC = $$$OK
13
- try {
14
- $$$ThrowOnError(..Connect())
15
- do ..%class."on_task"()
16
- } catch ex {
17
- set tSC = ex.AsStatus()
18
- }
19
- quit tSC
20
- }
21
-
22
- }
@@ -1,128 +0,0 @@
1
- /* Copyright (c) 2021 by InterSystems Corporation.
2
- Cambridge, Massachusetts, U.S.A. All rights reserved.
3
- Confidential property of InterSystems Corporation. */
4
-
5
- Class Grongier.PEX.Message Extends (Ens.MessageBody, %CSP.Page, %XML.Adaptor)
6
- {
7
-
8
- Parameter BUFFER = 64000;
9
-
10
- Property classname As %String(MAXLEN = "");
11
-
12
- Property jsonObject As %DynamicObject(XMLPROJECTION = "None");
13
-
14
- Property json As %String(MAXLEN = "");
15
-
16
- Property jstr As %Stream.GlobalCharacter [ Internal, Private ];
17
-
18
- Method %OnNew(classname) As %Status [ Private, ServerOnly = 1 ]
19
- {
20
- set ..classname = $g(classname)
21
- Quit $$$OK
22
- }
23
-
24
- Method jsonGet()
25
- {
26
- QUIT ..GetObjectJson()
27
- }
28
-
29
- Method jsonSet(value) As %Status
30
- {
31
- set ..jsonObject = {}.%FromJSON(value)
32
- set ..jstr = ##class(%Stream.GlobalCharacter).%New()
33
- do ..jstr.Write(value)
34
- return $$$OK
35
- }
36
-
37
- Method %DispatchGetProperty(property As %String) As %ObjectHandle
38
- {
39
- quit $property(..jsonObject,property)
40
- }
41
-
42
- Method %DispatchSetProperty(
43
- property As %String,
44
- value)
45
- {
46
- set $property(..jsonObject,property) = value
47
- quit
48
- }
49
-
50
- Method GetObjectJson(ByRef atEnd)
51
- {
52
- set atEnd = 1
53
- set json = ..jsonObject.%ToJSON()
54
- if json = "{}" {
55
- d ..jstr.Rewind()
56
- set json = ..jstr.Read(..#BUFFER)
57
- set atEnd = ..jstr.AtEnd
58
- }
59
- QUIT json
60
- }
61
-
62
- /// This method is called by the Management Portal to determine the content type that will be returned by the <method>%ShowContents</method> method.
63
- /// The return value is a string containing an HTTP content type.
64
- Method %GetContentType() As %String
65
- {
66
- Quit "text/html"
67
- }
68
-
69
- /// This method is called by the Management Portal to display a portion of the HEAD section of a message-specific content viewer.<br>
70
- Method %ShowContentsHead(pZenOutput As %Boolean = 0)
71
- {
72
- &html<<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>>
73
- &html<<script>var makeCompleteJSON=function(l,n){for(var r=["{","}","[","]",'"',"'"],t=function(l){for(var n=l.split(""),r=null,t=[],u=0;u<n.length;u++)char=n[u],"'"!=char&&'"'!=char||(null==r?r=char:r==char&&(r=null)),null==r&&":"==char&&t.push(u);return 1==t.length&&t[0]!=n.length-1},u=[],p=null,e=l.split(""),h="",o=-1,a=[],i=0;i<e.length;i++){if($.inArray(e[i],r)>-1){if(0==u.length&&("'"==e[i]||'"'==e[i]))return!1;'"'==p||"'"==p?p==e[i]&&(u.pop(),p=u[u.length-1]):"}"==e[i]&&"{"==p?(u.pop(),a.pop(),p=u[u.length-1],h="",o=-1):"]"==e[i]&&"["==p?(u.pop(),a.pop(),p=u[u.length-1]):(u.push(e[i]),"["==(p=e[i])&&a.push("array"),"{"==p&&(a.push("object"),o=i))}"object"==a[a.length-1]&&(h+=e[i])}if(!n&&o>-1){var s=function(l){for(var n=l.split(""),r=null,u=null,p=[],e=1;e<n.length;e++)"'"!=(r=n[e])&&'"'!=r||(null==u?u=r:u==r&&(u=null)),null==u&&","==r&&p.push(e);var h=[],o=1;for(e=0;e<p.length;e++)h.push($.trim(l.substring(o,p[e]))),o=p[e]+1;h.push($.trim(l.substring(o)));var a=h[h.length-1];return a.split(""),t(a)||h.pop(),"{"+h.join(",")}(h);return l=l.substring(0,o)+s,makeCompleteJSON(l,!0)}for(;u.length>0;)'"'==(p=u.pop())&&(l+='"'),"'"==p&&(l+="'"),"{"==p&&(l+="}"),"["==p&&(l+="]");return l};</script>>
74
- &html<<script>!function(e){"use strict";var n=function(n){var a=e("<span />",{"class":"collapser",on:{click:function(){var n=e(this);n.toggleClass("collapsed");var a=n.parent().children(".block"),p=a.children("ul");n.hasClass("collapsed")?(p.hide(),a.children(".dots, .comments").show()):(p.show(),a.children(".dots, .comments").hide())}}});return n&&a.addClass("collapsed"),a},a=function(a,p){var t=e.extend({},{nl2br:!0},p),r=function(e){return e.toString()?e.toString().replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):""},s=function(n,a){return e("<span />",{"class":a,html:r(n)})},l=function(a,p){switch(e.type(a)){case"object":p||(p=0);var c=e("<span />",{"class":"block"}),d=Object.keys(a).length;if(!d)return c.append(s("{","b")).append(" ").append(s("}","b"));c.append(s("{","b"));var i=e("<ul />",{"class":"obj collapsible level"+p});return e.each(a,function(a,t){d--;var r=e("<li />").append(s('"',"q")).append(a).append(s('"',"q")).append(": ").append(l(t,p+1));-1===["object","array"].indexOf(e.type(t))||e.isEmptyObject(t)||r.prepend(n()),d>0&&r.append(","),i.append(r)}),c.append(i),c.append(s("...","dots")),c.append(s("}","b")),c.append(1===Object.keys(a).length?s("// 1 item","comments"):s("// "+Object.keys(a).length+" items","comments")),c;case"array":p||(p=0);var d=a.length,c=e("<span />",{"class":"block"});if(!d)return c.append(s("[","b")).append(" ").append(s("]","b"));c.append(s("[","b"));var i=e("<ul />",{"class":"obj collapsible level"+p});return e.each(a,function(a,t){d--;var r=e("<li />").append(l(t,p+1));-1===["object","array"].indexOf(e.type(t))||e.isEmptyObject(t)||r.prepend(n()),d>0&&r.append(","),i.append(r)}),c.append(i),c.append(s("...","dots")),c.append(s("]","b")),c.append(1===a.length?s("// 1 item","comments"):s("// "+a.length+" items","comments")),c;case"string":if(a=r(a),/^(http|https|file):\/\/[^\s]+$/i.test(a))return e("<span />").append(s('"',"q")).append(e("<a />",{href:a,text:a})).append(s('"',"q"));if(t.nl2br){var o=/\n/g;o.test(a)&&(a=(a+"").replace(o,"<br />"))}var u=e("<span />",{"class":"str"}).html(a);return e("<span />").append(s('"',"q")).append(u).append(s('"',"q"));case"number":return s(a.toString(),"num");case"undefined":return s("undefined","undef");case"null":return s("null","null");case"boolean":return s(a?"true":"false","bool")}};return l(a)};return e.fn.jsonView=function(n,p){var t=e(this);if(p=e.extend({},{nl2br:!0},p),"string"==typeof n)try{n=JSON.parse(n)}catch(r){}return t.append(e("<div />",{"class":"json-view"}).append(a(n,p))),t}}(jQuery);</script>>
75
- &html<<style type="text/css">
76
- .json-view{position:relative}
77
- .json-view .collapser{width:20px;height:18px;display:block;position:absolute;left:-1.7em;top:-.2em;z-index:5;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAD1JREFUeNpiYGBgOADE%2F3Hgw0DM4IRHgSsDFOzFInmMAQnY49ONzZRjDFiADT7dMLALiE8y4AGW6LoBAgwAuIkf%2F%2FB7O9sAAAAASUVORK5CYII%3D);background-repeat:no-repeat;background-position:center center;opacity:.5;cursor:pointer}
78
- .json-view .collapsed{-ms-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-khtml-transform:rotate(-90deg);-webkit-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}
79
- .json-view .bl{display:block;padding-left:20px;margin-left:-20px;position:relative}
80
- .json-view {font-family:Verdana,sans-serif; font-size: 0.8em;}
81
- .json-view ul{list-style-type:none;padding-left:2em;border-left:1px dotted;margin:.3em}
82
- .json-view ul li{position:relative;color:#012E55}
83
- .json-view .comments,.json-view .dots{display:none;-moz-user-select:none;-ms-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}
84
- .json-view .comments{padding-left:.8em;font-style:italic;color:#888}
85
- .json-view .bool,.json-view .null,.json-view .num,.json-view .undef{font-weight:700;color:#1A01CC}
86
- .json-view .str{color:#F79243}
87
- </style>>
88
- }
89
-
90
- /// This method is called by the Management Portal to display a message-specific content viewer.<br>
91
- /// This method displays its content by writing out to the current device.
92
- /// The content should match the type returned by the <method>%GetContentType</method> method.<br>
93
- Method %ShowContents(pZenOutput As %Boolean = 0)
94
- {
95
- set jsonObject = ..QuoteJS(..GetObjectJson(.atEnd))
96
- set buffer = ..#BUFFER
97
- if 'atEnd {
98
- &html<<div>Warning JSON projection is not comptete, it's truncated, #(buffer)# charaters display</div>>
99
- }
100
- // https://github.com/bazh/jquery.json-view
101
- &html<<div id="element">#(..classname)#</div>>
102
- &html<<script>$(function() {$('#element').jsonView(makeCompleteJSON(#(jsonObject)#,false));});</script>>
103
- }
104
-
105
- Storage Default
106
- {
107
- <Data name="MessageDefaultData">
108
- <Subscript>"Message"</Subscript>
109
- <Value name="1">
110
- <Value>classname</Value>
111
- </Value>
112
- <Value name="2">
113
- <Value>json</Value>
114
- </Value>
115
- <Value name="3">
116
- <Value>jstr</Value>
117
- </Value>
118
- </Data>
119
- <Data name="jsonObject">
120
- <Attribute>jsonObject</Attribute>
121
- <Structure>node</Structure>
122
- <Subscript>"Grongier.PEX.Message.jsonObject"</Subscript>
123
- </Data>
124
- <DefaultData>MessageDefaultData</DefaultData>
125
- <Type>%Storage.Persistent</Type>
126
- }
127
-
128
- }
@@ -1,36 +0,0 @@
1
- /* Copyright (c) 2021 by InterSystems Corporation.
2
- Cambridge, Massachusetts, U.S.A. All rights reserved.
3
- Confidential property of InterSystems Corporation. */
4
-
5
- Class Grongier.PEX.OutboundAdapter Extends (Ens.OutboundAdapter, Grongier.PEX.Common) [ Inheritance = right, ProcedureBlock, System = 4 ]
6
- {
7
-
8
- Property KeepaliveInterval As %Numeric [ InitialExpression = 0 ];
9
-
10
- Parameter SETTINGS = "KeepaliveInterval:Python CallInterval,%classname:Python OutboundAdapter,%module:Python OutboundAdapter,%settings:Python OutboundAdapter,%classpaths:Python OutboundAdapter";
11
-
12
- Method %DispatchMethod(
13
- method As %String,
14
- args...) As %ObjectHandle
15
- {
16
- if $quit {
17
- quit $method($this.%class,method,args...)
18
- } else {
19
- do $method($this.%class,method,args...)
20
- quit
21
- }
22
- }
23
-
24
- Method OnKeepalive(pStatus As %Status = {$$$OK}) As %Status
25
- {
26
- set tSC = $$$OK
27
- try {
28
- $$$ThrowOnError(##super(pStatus))
29
- do ..%class."on_keepalive"()
30
- } catch ex {
31
- set tSC = ex.AsStatus()
32
- }
33
- quit tSC
34
- }
35
-
36
- }
@@ -1,58 +0,0 @@
1
- /* Copyright (c) 2021 by InterSystems Corporation.
2
- Cambridge, Massachusetts, U.S.A. All rights reserved.
3
- Confidential property of InterSystems Corporation. */
4
-
5
- Class Grongier.PEX.PickleMessage Extends (Ens.MessageBody, %CSP.Page)
6
- {
7
-
8
- Property classname As %String(MAXLEN = "");
9
-
10
- Property jstr As %Stream.GlobalCharacter [ Internal, Private ];
11
-
12
- Method %OnNew(classname) As %Status [ Private, ServerOnly = 1 ]
13
- {
14
- set ..classname = $g(classname)
15
- Quit $$$OK
16
- }
17
-
18
- /// This method is called by the Management Portal to determine the content type that will be returned by the <method>%ShowContents</method> method.
19
- /// The return value is a string containing an HTTP content type.
20
- Method %GetContentType() As %String
21
- {
22
- Quit "text/html"
23
- }
24
-
25
- /// This method is called by the Management Portal to display a message-specific content viewer.<br>
26
- /// This method displays its content by writing out to the current device.
27
- /// The content should match the type returned by the <method>%GetContentType</method> method.<br>
28
- Method %ShowContents(pZenOutput As %Boolean = 0)
29
- {
30
- // https://github.com/bazh/jquery.json-view
31
- &html<<div id="element">#(..classname)#</div>>
32
- &html<<div>Pickle Pyhton Message can't be displayed</div>>
33
- }
34
-
35
- Storage Default
36
- {
37
- <Data name="MessageDefaultData">
38
- <Subscript>"Message"</Subscript>
39
- <Value name="1">
40
- <Value>classname</Value>
41
- </Value>
42
- <Value name="2">
43
- <Value>json</Value>
44
- </Value>
45
- <Value name="3">
46
- <Value>jstr</Value>
47
- </Value>
48
- </Data>
49
- <Data name="jsonObject">
50
- <Attribute>jsonObject</Attribute>
51
- <Structure>node</Structure>
52
- <Subscript>"Grongier.PEX.Message.jsonObject"</Subscript>
53
- </Data>
54
- <DefaultData>MessageDefaultData</DefaultData>
55
- <Type>%Storage.Persistent</Type>
56
- }
57
-
58
- }