Skip to content

Commit ad444dc

Browse files
Namespace cut visual fix, analytics fix
1 parent 9995365 commit ad444dc

File tree

3 files changed

+10
-29
lines changed

3 files changed

+10
-29
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"name": "cache-visual-editor",
33
"printableName": "Cache Visual Editor",
44
"packageName": "VisualEditor",
5-
"version": "0.9.10",
5+
"version": "0.9.11",
6+
"gaID": "UA-83005064-4",
67
"description": "Visual class editor for InterSystems Caché",
78
"main": "index.js",
89
"keywords": [

source/cache/Installer.cls

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -115,34 +115,14 @@ ClassMethod RemoveProjection(cls As %String, ByRef params, recompile As %Boolean
115115
/// <!-- @echo package.printableName --> developer.
116116
ClassMethod Stats() As %Status {
117117
if ($get(installLog) = "") { return $$$OK }
118-
119-
#define checkErr(%e) if $$$ISERR(%e) { do $SYSTEM.Status.DisplayError(%e) return %e }
120-
121-
set sid = $ZD($H,3)
122-
set key = "x8AlP"_$E(sid,1,1)_"tq"
123-
124-
set body = {
125-
"cacheVersion": $ZVERSION,
126-
"version": "<!-- @echo package.version -->",
127-
"success": 'errorOccurred,
128-
"sid": sid
129-
}
130-
if (errorOccurred) { set body.log = installLog }
131-
132118
set req = ##class(%Net.HttpRequest).%New()
133-
set req.ContentType = "application/json"
134-
set req.Server = "stats.zitros.tk"
135-
set stream = ##class(%Stream.TmpCharacter).%New()
136-
do body.$toJSON(stream)
137-
set req.EntityBody = stream
138-
$$$checkErr(req.Post("/?key="_key_"&sid="_sid))
139-
140-
set obj = ##class(%AbstractObject).$fromJSON(req.HttpResponse.Data)
141-
if (obj.error '= "") {
142-
$$$checkErr($$$ERROR($$$GeneralError, "Unable to collect statistics: " _ obj.error))
143-
}
144-
145-
return $$$OK
119+
set req.Server = "www.google-analytics.com"
120+
do req.EntityBody.Write("v=1&tid=<!-- @echo package.gaID -->&cid="_##class(%SYS.System).InstanceGUID()
121+
_"&ds=web&an=WebTerminal&av="_..#VERSION
122+
_"&t=event&aiid="_$ZCONVERT($zv, "O", "URL")_"&ec="_$ZCONVERT("install", "O", "URL")_"&ea="
123+
_$case(errorOccurred=0, 1: "Success", : "Failure")_"&el="
124+
_$ZCONVERT($case(errorOccurred=0, 1: "", : installLog), "O", "URL"))
125+
return req.Post("/collect")
146126
}
147127

148128
}

source/client/js/classEditor/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ function updateHeaderNamespaceWidth (namespace) {
260260
t2.textContent = namespace;
261261
temp.appendChild(t2);
262262
topNamespace.parentNode.appendChild(temp);
263-
topNamespace.style.width = temp.offsetWidth + "px";
263+
topNamespace.style.width = temp.offsetWidth*1.1 + "px";
264264
topNamespace.parentNode.removeChild(temp);
265265
}
266266

0 commit comments

Comments
 (0)