This is the Event Log page of the ZEN Ensemble application. With namespace support Ensemble EnsPortal.EventLog 4 60310,50851.071342 %String SELECT Type,ID,TimeLogged,SessionId,Job,ConfigName,Text,TraceCat,SourceClass,SourceMethod,$ZNSPACE As Namespace FROM Ens_Util.Log This pane displays event log activity table. User may click on a row and details are displayed to the side. http://www.intersystems.com/zen ]]> This pane displays the search criteria. We provide defaults and user can change them. User's values are saved and used as future defaults for this user. Clicking a drop down list item will refresh the table immediately. Text fields you are required to click [Enter] or the "Search" button. http://www.intersystems.com/zen
]]>
MultiTypeNS class query]]> *pSC:%Status,pInfo:%ZEN.Auxiliary.QueryInfo %ResultSet Save user's last search criteria into global for page default 1 SortOrder,TimeFormat,Defaults,EventType,MaxRows,States,AutoRefresh,NamespaceList=$Namespace 1 expression 1 %String 1 pDefaults:%String="" 1 %OnAfterCreatePage to get defaults and build up the initial display]]> %String 10000) { Set MaxRows = 500 } If (MaxRows < 0) { Set MaxRows = 1 } Set table.maxRows = MaxRows #; Namespaces Set tNamespaceList = $LTS(..GetEnsembleNamespaces()) Set ..%GetComponentById("nslist").valueList = tNamespaceList ]]> Construct WHERE part of an SQL statement. 1 %String part of an SQL statement. Returns empty string if there is no conditions.]]> 1 %String ?") Set qHandle("mainArgs") = qHandle("mainArgs") + 1 Set qHandle("mainArgs", qHandle("mainArgs")) = pConditions.MinID } If (pConditions.MaxID '= "") { Set tConditions = tConditions _ $LB("ID < ?") Set qHandle("mainArgs") = qHandle("mainArgs") + 1 Set qHandle("mainArgs", qHandle("mainArgs")) = pConditions.MaxID } If (pConditions.Job '= "") { Set tConditions = tConditions _ $LB("Job = ?") Set qHandle("mainArgs") = qHandle("mainArgs") + 1 Set qHandle("mainArgs", qHandle("mainArgs")) = pConditions.Job } If (pConditions.SessionID '= "") { Set tConditions = tConditions _ $LB("SessionId = ?") Set qHandle("mainArgs") = qHandle("mainArgs") + 1 Set qHandle("mainArgs", qHandle("mainArgs")) = pConditions.SessionID } If (pConditions.SourceClass '= "") { Set tConditions = tConditions _ $LB("SourceClass LIKE ?") Set qHandle("mainArgs") = qHandle("mainArgs") + 1 Set qHandle("mainArgs", qHandle("mainArgs")) = pConditions.SourceClass } If (pConditions.SourceMethod '= "") { Set tConditions = tConditions _ $LB("SourceMethod LIKE ?") Set qHandle("mainArgs") = qHandle("mainArgs") + 1 Set qHandle("mainArgs",qHandle("mainArgs")) = pConditions.SourceMethod } If (pConditions.Text '= "") { Set tConditions = tConditions _ $LB("Text [ ?") Set qHandle("mainArgs") = qHandle("mainArgs") + 1 Set qHandle("mainArgs", qHandle("mainArgs")) = pConditions.Text } If (pConditions.StartTime '= "") { Set tConditions = tConditions _ $LB("TimeLogged >= ?") Set qHandle("mainArgs") = qHandle("mainArgs") + 1 Set qHandle("mainArgs",qHandle("mainArgs")) = pConditions.StartTime } If (pConditions.EndTime '= "") { Set tConditions = tConditions _ $LB("TimeLogged <= ?") Set qHandle("mainArgs") = qHandle("mainArgs") + 1 Set qHandle("mainArgs", qHandle("mainArgs")) = pConditions.EndTime } If (pConditions.ConfigName '= "") { Set tConditions = tConditions _ $LB("ConfigName LIKE ?") Set qHandle("mainArgs") = qHandle("mainArgs") + 1 Set qHandle("mainArgs", qHandle("mainArgs")) = pConditions.ConfigName } } Set tTypeCount = $L(pTypes,",") If ((pTypes '= "") && (tTypeCount>0)) { Set tTypesSQL="" For i= 1:1:tTypeCount { Set tType = $P(pTypes,",",i) If (tType '= "") && '##class(Ens.DataType.LogType).IsValid(tType) { Set tTypesSQL =tTypesSQL _ $LB("'" _ tType _ "'") } } Set tTypesSQL = $LTS(tTypesSQL,", ") Set tConditions = tConditions _ $LB("Type IN (" _ tTypesSQL _ ")") } Quit $LTS(tConditions," AND ") ]]> Construct ORDER BY part of an SQL statement. 1 pDescending:%Boolean=1 %String %Query pTypes:%String="",pDescending:%Boolean=0,pSelectMode:%Integer=2,pConditions:%ZEN.proxyObject="" 1 %Status 1 %Status 1 %Status Returns info about availible Ensemble-enabled Namespaces 1 %String Ensure that we check the table's sql to see whether there is any paging based on a condition on "ID" This is OK (for now) because the main StartID and EndID restrictions use conditions on "%ID" W") Set tProp = $P(tCondition," ",1) If (tProp = "ID") { Set tOp = $P($P(tCondition,tProp_" ",2)," ",1) Set tVal = $P(tCondition," ",$L(tCondition," ")) If (tOp = "<") { Set pMaxID = $S(tVal="": pMaxID, pMaxID="": tVal, pMaxIDtVal: pMinID, 1: tVal) } } } } } } ]]> Server-side callback to provide data for the details table 1 pSeed:%String %Status pNamespace]]> 1 pNamespace:%String %String 1 User clicked the Search button, user changed a Quick Search or Event Type criterion, or we have completed a non-zero Purge. javascript 1 10000) MaxRows = 100; if (MaxRows < 0) MaxRows = 1; // Get the current expando state and save it var States = zenPage.expandoState(); // Get the Auto-Refresh choice and save it var auto = zen("chkRefresh"); var AutoRefresh = auto.getValue(); // Save last selections to global as default for page zenPage.SaveDefaults(SortOrder,TimeFormat,Defaults,EventType,MaxRows,States,AutoRefresh,zen('nslist').getValue()); ]]> toggle detailTable for a selected row. javascript 1 0) { var detail = zen("dynaGrid"); // get the detail display if (!this._oldRows) { // if needed, establish oldRows array to remember content this._oldRows = new Object(); } if (this._oldRows[this.selectedId]) { // reuse the content for this row detail.setContent(this._oldRows[this.selectedId]); } else { // get new content from server detail.setContent(""); // clear out any lingering content from before var table = zen('table'); detail.seed = this.selectedId + ',' + table.getRenderedRowData(table.selectedIndex).Namespace; detail.refreshContents(true); this._oldRows[this.selectedId] = detail.getEnclosingDiv().innerHTML; } detail.setHidden(false); } ]]> User clicked a link for Trace. Display the Visual Trace page in a popup, so user can click the arrows to go from session to session without losing his/her place in the Event Log. session,stopEvent,evt javascript 1 This client event, if present, is fired when the page is loaded. javascript 1