From 30c13ac91865eabcddba9fb399cb20e12397266e Mon Sep 17 00:00:00 2001 From: Alessandro Date: Fri, 8 Jun 2018 16:03:52 -0400 Subject: [PATCH] Fri Jun 8 16:03:52 EDT 2018 --- DeepSeeButtons.mac | 95 +- DeepSeeButtons.xml | 99 +- UI/README.txt | 5 +- UI/_DeepSee.UI.DeepSeeButtons.xml | 33 +- UI/old/_DeepSee.UI.DeepSeeButtons1.xml | 3558 ------------------------ UI/old/_DeepSee.UI.DeepSeeButtons2.xml | 868 ------ UI/old/_DeepSee.UI.DeepSeeButtons3.xml | 703 ----- UI/old/_DeepSee.UI.DeepSeeButtons4.xml | 740 ----- UI/old/_DeepSee.UI.DeepSeeButtons5.xml | 755 ----- 9 files changed, 163 insertions(+), 6693 deletions(-) delete mode 100755 UI/old/_DeepSee.UI.DeepSeeButtons1.xml delete mode 100755 UI/old/_DeepSee.UI.DeepSeeButtons2.xml delete mode 100755 UI/old/_DeepSee.UI.DeepSeeButtons3.xml delete mode 100755 UI/old/_DeepSee.UI.DeepSeeButtons4.xml delete mode 100755 UI/old/_DeepSee.UI.DeepSeeButtons5.xml diff --git a/DeepSeeButtons.mac b/DeepSeeButtons.mac index fcafa71..29d0a75 100755 --- a/DeepSeeButtons.mac +++ b/DeepSeeButtons.mac @@ -537,7 +537,7 @@ LogOpenMainDiv() Do WriteLog("") Do WriteLog("
") Do WriteLog("") - Do WriteLog("

DeepSeeButtons - DeepSee diagnostic report

") + Do WriteLog("

DeepSeeButtons - DeepSee diagnostic report

") Quit LogDeepSeeSetupSection @@ -602,9 +602,12 @@ LogDeepSeeSetupSection Do rs.Execute() While (rs.Next()) { Set cube=rs.Get("CubeKey") + Set state = rs.Get("Disabled") + Set state = $S(state="Yes":"disabled",state="No":"enabled",1:"unknown") If ((rs.Get("IsRegistered")="Yes") && (rs.Get("Disabled")="No")) { Set msgbuild=$$GetLastBuild("Build",cube) //Get last build Set msgrepair=$$GetLastBuild("Repair",cube) //Get last repair + Do:(state="enabled") alertInitialBuildCubeManager(cube,msgrepair,msgbuild,.alerts) } } ZN "%SYS" @@ -1115,19 +1118,20 @@ LogBuildSynchSection Do WriteLog("",6) Do WriteLog("",8) Do WriteLog("Cube Name",10) - //Do WriteLog("Source Count",10) Do WriteLog("Source Count",10) + Do WriteLog("Fact Count",10) - Do WriteLog("Build Time [s]",10) - Do WriteLog("Build Rate [Facts/s]",10) - Do WriteLog("Build Errors",10) - Do WriteLog("Build Time [s]",10) + Do WriteLog("Build Rate [Facts/s]",10) + Do WriteLog("Build Errors",10) + Do WriteLog("DSTIME",10) - Do WriteLog("Last Compile",10) - Do WriteLog("Last Build/Synch",10) - Do WriteLog("Cube Group",10) - Do WriteLog("Build Order",10) - //Do WriteLog("Related Cubes",10) + Do WriteLog("Last Compile",10) + Do WriteLog("Last Build/Synch",10) + Do WriteLog("Cube Group",10) + Do WriteLog("Build Order",10) + //Do WriteLog("Related Cubes",10) Do WriteLog("",8) //Cube group and build order //Invert this array from groups(group,cube)=order to cubeGroupOrder(cube)=$LB(group,order) @@ -1152,20 +1156,50 @@ LogBuildSynchSection If (cubename'="" && '##class(%DeepSee.Utils).%IsCubeAbstract(cubenode)) { //if cube is not abstract Do WriteLog("",8) Do WriteLog(""_cubename_"",10) //cubename - - /* //COUNT(*) - Set countstar = "" - Set type=$LG(plist(cubenode),4) //subject area or cube? - Set sourceClass = $$GetSourceClass(cubenode,type) - Set sqlclass = ##class(%DeepSee.Utils).%GetSQLTableName(sourceClass) - //Check the following for abstract cubes and data connectors + + + + + + /// Keep an eye on this. Does it perform well? + // COUNT(*) - Check Extent Size. + Set cube = $zu(28,cubename,5) + Set type = $LG(plist(cube),4) + Set sourceclass = $$GetSourceClass(cube,type) + Set sqlclass = ##class(%DeepSee.Utils).%GetSQLTableName(sourceclass) + Set NewExtentSize = ##Class(%SQL.Manager.Catalog).GetCalcTableExtentSize($P(sqlclass,".",1), $P(sqlclass,".",2)) + // First exclude abstract cubes and data connectors If (sqlclass="Not available")||('##class(%SYSTEM.SQL).TableExists(sqlclass)) { - Do WriteLog("",10) - } Else { + Do WriteLog("",10) + } ElseIf NewExtentSize>=200000 { + Do WriteLog("",8) + } ElseIf (NewExtentSize<10000) { + Do WriteUpdate("Getting COUNT(*) from source class of "_cube_". ExtentSize="_NewExtentSize) Set countstar=$$GetCountStar(sqlclass) - Do WriteLog(""_$FNUMBER(countstar,"O,")_"",10) + Do WriteLog(""_$FNUMBER(countstar,"O,")_"",8) + } Else { + // Check if bitmap or bitmap extent index. + Set tRS=##class(%ResultSet).%New("%SQL.Manager.Catalog:Indices") + Set tSC = tRS.Execute($P(sqlclass,".",1),$P(sqlclass,".",2)) + //SKIP Quit:$$$ISERR(tSC) + Set hasBitmap= 0 + For { + Quit:'rs.Next() + Set tType = rs.Get("TYPE") + Set:$E(tType,1,6)="Bitmap" hasBitmap=1 + } + If hasBitmap { + Do WriteUpdate("Getting COUNT(*) from source class of "_cube_". ExtentSize="_NewExtentSize_", Bitmap index found") + Set countstar=$$GetCountStar(sqlclass) + Do WriteLog(""_$FNUMBER(countstar,"O,")_"",10) + } Else { + Do WriteLog("",8) + } } - */ + + + + Set lastmod=$zdt($LG(plist(cubenode),3),3) //last cube compile Set facts=##class(%DeepSee.Utils).%GetCubeFactCount(cubename) //number of facts @@ -1278,8 +1312,8 @@ LogCubeRegistry Set registry=##class(%DeepSee.CubeManager.Utils).GetActiveRegistry() If registry=""{ Do WriteLog("

No cube registry defined in this namespace

",2) - } - Else{ + } Else{ + Do WriteLog("

Cube Registry storage class: "_registry_"

",2) Set rs=##class(%ResultSet).%New("%DeepSee.CubeManager.RegistryMap:RegistryMapTableView") Do rs.Execute() Do WriteLog("") - Do:tracking WriteTrack("cube","Detailed information",cube) + Do:tracking WriteTrack("cube","Detailed information collected",cube) } } Quit @@ -1622,7 +1656,7 @@ LogCubeInfo Do WriteLog("

Build event: "_msgbuild_"

",10) Do WriteLog("

Registry Update event: "_msgupdate_"

",10) Do WriteLog("

Repair event: "_msgrepair_"

",10) - Do alertInitialBuildCubeManager(cube,msgrepair,msgbuild,.alerts) + //Do alertInitialBuildCubeManager(cube,msgrepair,msgbuild,.alerts) } Else { Do WriteLog("

Cube is "_state_" in Cube Manager

",10) } @@ -1860,7 +1894,7 @@ LogOtherCubeElements Do:tracking WriteTrack("cube","Other cube elements",cube) ZN namespace Do WriteLog("
",2) - Do WriteLog("",2) + Do WriteLog("",2) Do WriteLog("

Other Elements for "_cube_"

",2) If ##class(%DeepSee.Utils).%IsCubeAbstract(cube) { Do WriteLog("

Not available because the cube is abstract

",0) @@ -3235,9 +3269,9 @@ MostRunQueries(numqueries) Do WriteLog("
",2) Do WriteLog("",4) Do WriteLog("",6) - Do WriteLog("",8) - Do WriteLog("",8) - Do WriteLog("",8) + Do WriteLog("",8) + Do WriteLog("",8) + Do WriteLog("",8) Do WriteLog("",6) Set freq = "" For n = 1:1:numqueries { @@ -3411,6 +3445,7 @@ alertJoinIndexMappings(ns,alerts) { alertInitialBuildCubeManager(cube,msgrepair,msgbuild,alerts) { Try { + Set alert="" Set pre="title=""Before you synchronize cubes from the Cube Manager, it is necessary to build the cubes at least once from the Cube Manager."">" If ((msgrepair="Not found") && (msgbuild="Not found")) { Set alert = "Alert: there is no record for the initial build of "_cube_" from Cube Manager. Check if the cube is updating" diff --git a/DeepSeeButtons.xml b/DeepSeeButtons.xml index cb70d07..54c673d 100755 --- a/DeepSeeButtons.xml +++ b/DeepSeeButtons.xml @@ -1,6 +1,6 @@ - - +") Do WriteLog("
") Do WriteLog("") - Do WriteLog("

DeepSeeButtons - DeepSee diagnostic report

") + Do WriteLog("

DeepSeeButtons - DeepSee diagnostic report

") Quit LogDeepSeeSetupSection @@ -604,9 +604,12 @@ LogDeepSeeSetupSection Do rs.Execute() While (rs.Next()) { Set cube=rs.Get("CubeKey") + Set state = rs.Get("Disabled") + Set state = $S(state="Yes":"disabled",state="No":"enabled",1:"unknown") If ((rs.Get("IsRegistered")="Yes") && (rs.Get("Disabled")="No")) { Set msgbuild=$$GetLastBuild("Build",cube) //Get last build Set msgrepair=$$GetLastBuild("Repair",cube) //Get last repair + Do:(state="enabled") alertInitialBuildCubeManager(cube,msgrepair,msgbuild,.alerts) } } ZN "%SYS" @@ -1117,19 +1120,20 @@ LogBuildSynchSection Do WriteLog("
",6) Do WriteLog("",8) Do WriteLog("",10) - //Do WriteLog("",10) Do WriteLog("",10) + Do WriteLog("",10) - Do WriteLog("",10) - Do WriteLog("",10) - Do WriteLog("",10) - Do WriteLog("",10) + Do WriteLog("",10) + Do WriteLog("",10) + Do WriteLog("",10) - Do WriteLog("",10) - Do WriteLog("",10) - Do WriteLog("",10) - Do WriteLog("",10) - //Do WriteLog("",10) + Do WriteLog("",10) + Do WriteLog("",10) + Do WriteLog("",10) + Do WriteLog("",10) + //Do WriteLog("",10) Do WriteLog("",8) //Cube group and build order //Invert this array from groups(group,cube)=order to cubeGroupOrder(cube)=$LB(group,order) @@ -1154,20 +1158,50 @@ LogBuildSynchSection If (cubename'="" && '##class(%DeepSee.Utils).%IsCubeAbstract(cubenode)) { //if cube is not abstract Do WriteLog("",8) Do WriteLog("",10) //cubename - - /* //COUNT(*) - Set countstar = "" - Set type=$LG(plist(cubenode),4) //subject area or cube? - Set sourceClass = $$GetSourceClass(cubenode,type) - Set sqlclass = ##class(%DeepSee.Utils).%GetSQLTableName(sourceClass) - //Check the following for abstract cubes and data connectors + + + + + + /// Keep an eye on this. Does it perform well? + // COUNT(*) - Check Extent Size. + Set cube = $zu(28,cubename,5) + Set type = $LG(plist(cube),4) + Set sourceclass = $$GetSourceClass(cube,type) + Set sqlclass = ##class(%DeepSee.Utils).%GetSQLTableName(sourceclass) + Set NewExtentSize = ##Class(%SQL.Manager.Catalog).GetCalcTableExtentSize($P(sqlclass,".",1), $P(sqlclass,".",2)) + // First exclude abstract cubes and data connectors If (sqlclass="Not available")||('##class(%SYSTEM.SQL).TableExists(sqlclass)) { - Do WriteLog("",10) - } Else { + Do WriteLog("",10) + } ElseIf NewExtentSize>=200000 { + Do WriteLog("",8) + } ElseIf (NewExtentSize<10000) { + Do WriteUpdate("Getting COUNT(*) from source class of "_cube_". ExtentSize="_NewExtentSize) Set countstar=$$GetCountStar(sqlclass) - Do WriteLog("",10) + Do WriteLog("",8) + } Else { + // Check if bitmap or bitmap extent index. + Set tRS=##class(%ResultSet).%New("%SQL.Manager.Catalog:Indices") + Set tSC = tRS.Execute($P(sqlclass,".",1),$P(sqlclass,".",2)) + //SKIP Quit:$$$ISERR(tSC) + Set hasBitmap= 0 + For { + Quit:'rs.Next() + Set tType = rs.Get("TYPE") + Set:$E(tType,1,6)="Bitmap" hasBitmap=1 + } + If hasBitmap { + Do WriteUpdate("Getting COUNT(*) from source class of "_cube_". ExtentSize="_NewExtentSize_", Bitmap index found") + Set countstar=$$GetCountStar(sqlclass) + Do WriteLog("",10) + } Else { + Do WriteLog("",8) + } } - */ + + + + Set lastmod=$zdt($LG(plist(cubenode),3),3) //last cube compile Set facts=##class(%DeepSee.Utils).%GetCubeFactCount(cubename) //number of facts @@ -1280,8 +1314,8 @@ LogCubeRegistry Set registry=##class(%DeepSee.CubeManager.Utils).GetActiveRegistry() If registry=""{ Do WriteLog("

No cube registry defined in this namespace

",2) - } - Else{ + } Else{ + Do WriteLog("

Cube Registry storage class: "_registry_"

",2) Set rs=##class(%ResultSet).%New("%DeepSee.CubeManager.RegistryMap:RegistryMapTableView") Do rs.Execute() Do WriteLog("
#FrequencyQuery#FrequencyQuery
Cube NameSource CountSource CountFact CountBuild Time [s]Build Rate [Facts/s]Build ErrorsBuild Time [s]Build Rate [Facts/s]Build ErrorsDSTIMELast CompileLast Build/SynchCube GroupBuild OrderRelated CubesLast CompileLast Build/SynchCube GroupBuild OrderRelated Cubes
"_cubename_""_$FNUMBER(countstar,"O,")_""_$FNUMBER(countstar,"O,")_""_$FNUMBER(countstar,"O,")_"
") - Do:tracking WriteTrack("cube","Detailed information",cube) + Do:tracking WriteTrack("cube","Detailed information collected",cube) } } Quit @@ -1624,7 +1658,7 @@ LogCubeInfo Do WriteLog("

Build event: "_msgbuild_"

",10) Do WriteLog("

Registry Update event: "_msgupdate_"

",10) Do WriteLog("

Repair event: "_msgrepair_"

",10) - Do alertInitialBuildCubeManager(cube,msgrepair,msgbuild,.alerts) + //Do alertInitialBuildCubeManager(cube,msgrepair,msgbuild,.alerts) } Else { Do WriteLog("

Cube is "_state_" in Cube Manager

",10) } @@ -1862,7 +1896,7 @@ LogOtherCubeElements Do:tracking WriteTrack("cube","Other cube elements",cube) ZN namespace Do WriteLog("
",2) - Do WriteLog("",2) + Do WriteLog("",2) Do WriteLog("

Other Elements for "_cube_"

",2) If ##class(%DeepSee.Utils).%IsCubeAbstract(cube) { Do WriteLog("

Not available because the cube is abstract

",0) @@ -3237,9 +3271,9 @@ MostRunQueries(numqueries) Do WriteLog("
",2) Do WriteLog("",4) Do WriteLog("",6) - Do WriteLog("",8) - Do WriteLog("",8) - Do WriteLog("",8) + Do WriteLog("",8) + Do WriteLog("",8) + Do WriteLog("",8) Do WriteLog("",6) Set freq = "" For n = 1:1:numqueries { @@ -3413,6 +3447,7 @@ alertJoinIndexMappings(ns,alerts) { alertInitialBuildCubeManager(cube,msgrepair,msgbuild,alerts) { Try { + Set alert="" Set pre="title=""Before you synchronize cubes from the Cube Manager, it is necessary to build the cubes at least once from the Cube Manager."">" If ((msgrepair="Not found") && (msgbuild="Not found")) { Set alert = "Alert: there is no record for the initial build of "_cube_" from Cube Manager. Check if the cube is updating" diff --git a/UI/README.txt b/UI/README.txt index 62351d0..e938411 100755 --- a/UI/README.txt +++ b/UI/README.txt @@ -10,6 +10,7 @@ http://localhost:57774/csp/samples/_DeepSee.UI.DeepSeeButtonsViewer.zen Adding a permanent link to SMP > DeepSee is easy. Do that by adding the following three lines to the %DeepSee.UI.Application.cls class above the line with this text: "ADMIN SUB-MENU" // ALE's DeepSeeButtons Viewer + Set tUse = $System.Security.Check("%DeepSee_Admin","USE")|| $System.Security.Check("%Development","USE") + Set tDisabled = 'tUse set tText = $$$Text("DeepSeeButtons Viewer") - set pData(n,$i(n2)) = $lb($$$Text("DeepSeeButtons Viewer"),tText,..Link("_DeepSee.UI.DeepSeeButtonsViewer.cls"),0,..Link("deepsee/lamp_48.gif"),tText) - + set pData(n,$i(n2)) = $lb($$$Text("DeepSeeButtons Viewer"),tText,..Link("_DeepSee.UI.DeepSeeButtonsViewer.cls"),tDisabled,..Link("deepsee/lamp_48.gif"),tText) \ No newline at end of file diff --git a/UI/_DeepSee.UI.DeepSeeButtons.xml b/UI/_DeepSee.UI.DeepSeeButtons.xml index 0c8ebb0..1b0c10b 100755 --- a/UI/_DeepSee.UI.DeepSeeButtons.xml +++ b/UI/_DeepSee.UI.DeepSeeButtons.xml @@ -1,5 +1,5 @@ - + %ZEN.Component.page,%CSP.StreamServer 64735,54438.891408 @@ -56,7 +56,7 @@ DeepSee's DeepSeeButtons Viewer. Run DeepSeeButtons and display contents of the DeepSeeButtons html file in the current namespace %DeepSee.UI.standardPage 4 -64749,58302.115199 +64807,48756.516706 64741,56740.343487 @@ -172,7 +172,7 @@ title="Use the lens or type in a comma separated list of cubes that will be incl
-
#FrequencyQuery#FrequencyQuery