From 3eda79f03eb1ce0fc1e1786a596e77f6f6bfb050 Mon Sep 17 00:00:00 2001 From: Pokorny Martin Date: Thu, 4 Jan 2024 10:16:26 +0100 Subject: [PATCH 1/2] revert unexpected chamges --- .github/workflows/publish-gh-pages.yml | 43 -------------------------- 1 file changed, 43 deletions(-) delete mode 100644 .github/workflows/publish-gh-pages.yml diff --git a/.github/workflows/publish-gh-pages.yml b/.github/workflows/publish-gh-pages.yml deleted file mode 100644 index 298b0a29..00000000 --- a/.github/workflows/publish-gh-pages.yml +++ /dev/null @@ -1,43 +0,0 @@ -# Simple workflow for deploying static content to GitHub Pages -name: Deploy end user documentation - -on: - # Runs on pushes targeting the default branch - push: - branches: ["main"] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. -concurrency: - group: "pages" - cancel-in-progress: false - -jobs: - # Single deploy job since we're just deploying - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v2 - with: - # Upload entire repository - path: '.' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v3 From ac88a7f033bbd4ff71f1ed68ff1a6cd9dbb2bf41 Mon Sep 17 00:00:00 2001 From: Pokorny Martin Date: Thu, 4 Jan 2024 10:18:59 +0100 Subject: [PATCH 2/2] first draft --- .../general/Settings.pnl | 65 ++-- .../panels/vision/QualityChecks/QG_Result.pnl | 166 +++++----- .../panels/vision/tf/QG_Results.pnl | 108 +++++++ .../panels/vision/tf/objects/qgSideBar.pnl | 290 ++++++++++++++++++ .../vision/tf/objects/qgViewContainer.pnl | 115 +++++++ .../classes/QualityGates/QgVersionResult.ctl | 11 +- 6 files changed, 641 insertions(+), 114 deletions(-) create mode 100644 WinCCOA_QualityChecks/panels/vision/tf/QG_Results.pnl create mode 100644 WinCCOA_QualityChecks/panels/vision/tf/objects/qgSideBar.pnl create mode 100644 WinCCOA_QualityChecks/panels/vision/tf/objects/qgViewContainer.pnl diff --git a/WinCCOA_QualityChecks/panels/WinCCOA_QualityChecks/general/Settings.pnl b/WinCCOA_QualityChecks/panels/WinCCOA_QualityChecks/general/Settings.pnl index 34ff9698..63e81b66 100644 --- a/WinCCOA_QualityChecks/panels/WinCCOA_QualityChecks/general/Settings.pnl +++ b/WinCCOA_QualityChecks/panels/WinCCOA_QualityChecks/general/Settings.pnl @@ -1,7 +1,7 @@ V 14 2 -LANG:10001 0 LANG:10000 0 +LANG:10001 0 PANEL,-1 -1 1200 600 N "white" 0 E E E E E 1 -1 -1 0 40 50 ""0 1 @@ -309,8 +309,7 @@ string getBasePart(const string &id) "" DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 LAYER, 0 -1 -LANG:10001 0 +0 2 29 "PRIMITIVE_TEXT1" "" @@ -320,22 +319,22 @@ LANG:10001 0 E E E 0 2 -LANG:10001 0 LANG:10000 0 +LANG:10001 0 4 "layoutAlignment" "AlignVCenter" "dashclr"N "_Transparent" "antiAliased" "0" "transformable" "0" -E E 0 1 3 2 1 E 0.9988465974635842 0 1 -55.41061130365657 -9.5 0 E 77.5 29 506 60 +E E 0 1 3 2 1 E 0.9988465974635842 0 1 -55.41061130365657 -9.5 0 E 77.5 29 570 60 0 2 2 "0s" 0 0 0 192 0 0 77.5 29 1 2 -LANG:10001 26 Arial,-1,27,5,50,0,0,0,0,0 LANG:10000 26 Arial,-1,27,5,50,0,0,0,0,0 +LANG:10001 26 Arial,-1,27,5,50,0,0,0,0,0 0 2 -LANG:10001 31 WinCCOA Quality Checks Settings LANG:10000 36 WinCCOA Quality Checks Einstellungen +LANG:10001 31 WinCCOA Quality Checks Settings 32 30 "SPACER1" "" @@ -345,8 +344,8 @@ LANG:10000 36 WinCCOA Quality Checks Einstellungen E E E 0 2 -LANG:10001 0 LANG:10000 0 +LANG:10001 0 3 "transparentForMouse" "" @@ -362,8 +361,8 @@ LANG:10000 0 E E E 0 2 -LANG:10001 0 LANG:10000 0 +LANG:10001 0 3 "layoutAlignment" "AlignNone" @@ -379,8 +378,8 @@ E E 0 1 3 2 1 E 1 78 1198 78 E E E 0 2 -LANG:10001 0 LANG:10000 0 +LANG:10001 0 3 "layoutAlignment" "AlignNone" @@ -396,21 +395,21 @@ E E 0 1 3 2 1 E 1 521 1198 521 E E E 0 2 -LANG:10001 0 LANG:10000 0 +LANG:10001 0 2 "minimumSize" "125 35" "layoutAlignment" "AlignVCenter" 2 -LANG:10001 26 Arial,-1,13,5,50,0,0,0,0,0 LANG:10000 26 Arial,-1,13,5,50,0,0,0,0,0 +LANG:10001 26 Arial,-1,13,5,50,0,0,0,0,0 0 1053 546 1181 584 T 2 -LANG:10001 5 Close LANG:10000 10 Schließen +LANG:10001 5 Close "#uses \"panel\" main(mapping event) @@ -434,7 +433,12 @@ main(mapping event) closeDialog(); }" 0 - E E E + E E "main() +{ + this.enabled(getUserPermission(4)); +} +" 0 + 32 36 "SPACER2" "" @@ -444,8 +448,8 @@ main(mapping event) E E E 0 2 -LANG:10001 0 LANG:10000 0 +LANG:10001 0 3 "transparentForMouse" "" @@ -461,8 +465,8 @@ LANG:10000 0 E E E 0 2 -LANG:10001 0 LANG:10000 0 +LANG:10001 0 7 "frameShape" "enum 0" @@ -473,8 +477,8 @@ LANG:10000 0 "textElideMode" "enum 2" "layoutAlignment" "AlignNone" 2 -LANG:10001 26 Arial,-1,13,5,50,0,0,0,0,0 LANG:10000 26 Arial,-1,13,5,50,0,0,0,0,0 +LANG:10001 26 Arial,-1,13,5,50,0,0,0,0,0 0 0 87 1199 512.000000000004 10 TreeWidget 2 @@ -597,21 +601,21 @@ void fillWithData() E E E 0 2 -LANG:10001 0 LANG:10000 0 +LANG:10001 0 2 "minimumSize" "125 35" "layoutAlignment" "AlignVCenter" 2 -LANG:10001 26 Arial,-1,13,5,50,0,0,0,0,0 LANG:10000 26 Arial,-1,13,5,50,0,0,0,0,0 +LANG:10001 26 Arial,-1,13,5,50,0,0,0,0,0 0 921 546 1049 584 T 2 -LANG:10001 4 Save LANG:10000 9 Speichern +LANG:10001 4 Save "#uses \"classes/json/JsonFile\" main(mapping event) @@ -651,32 +655,25 @@ void saveChanges() E E E 0 LAYER, 1 -1 -LANG:10001 0 +0 0 LAYER, 2 -1 -LANG:10001 0 +0 0 LAYER, 3 -1 -LANG:10001 0 +0 0 LAYER, 4 -1 -LANG:10001 0 +0 0 LAYER, 5 -1 -LANG:10001 0 +0 0 LAYER, 6 -1 -LANG:10001 0 +0 0 LAYER, 7 -1 -LANG:10001 0 +0 0 4 5 "LAYOUT_GROUP14" 7 2 0 diff --git a/WinCCOA_QualityChecks/panels/vision/QualityChecks/QG_Result.pnl b/WinCCOA_QualityChecks/panels/vision/QualityChecks/QG_Result.pnl index ec35566f..8ceb8b34 100644 --- a/WinCCOA_QualityChecks/panels/vision/QualityChecks/QG_Result.pnl +++ b/WinCCOA_QualityChecks/panels/vision/QualityChecks/QG_Result.pnl @@ -2,7 +2,7 @@ V 14 2 LANG:10000 0 LANG:10001 0 -PANEL,-1 -1 1201 714 N "_3DFace" 1 +PANEL,-1 -1 717 526 N "WF_PanelBackground" 1 "$fileName" "dyn_string columns; @@ -12,61 +12,63 @@ main() string jsonString; fileToString($fileName, jsonString); - + + PUSH_BUTTON1.visible(myModuleName() != \"qgViewContainer\"); + mapping map = jsonDecode(jsonString); - + //add columns if ( mappingHasKey(map, \"fields\") ) - { + { dyn_string fields = map[\"fields\"]; - + TREE.addColumn(\"Source Tree\"); - + for (int i = 1; i <= dynlen(fields); i++) { if ( fields[i] == \"descr\" || fields[i] == \"totalPoints\" ) { continue; - } - + } + TREE.addColumn(fields[i]); dynAppend(columns, fields[i]); } } - + if ( mappingHasKey(map[\"root\"], \"children\") ) - { + { createTree(map[\"root\"][\"children\"]); } } void createTree(dyn_mapping dyn_map, string parentId = \"\") { - + for ( int i = 1; i <= dynlen(dyn_map); i++ ) { mapping map = dyn_map[i]; - + if ( mappingHasKey(map, \"text\") ) - { + { string text = map[\"text\"]; //add nodes TREE.appendItemNC(parentId, text, text); - + //set information for each available column for ( int j = 1; j <= dynlen(columns); j++ ) { if ( mappingHasKey(map, columns[j]) ) - { + { TREE.setText(text, j, map[columns[j]]); } } - + //expand nodes that have errors & color them red if ( mappingHasKey(map, \"expanded\") ) - { + { TREE.setOpen(text, map[\"expanded\"]); - + if ( mappingHasKey(map, \"leaf\") && map[\"leaf\"]) { if (TREE.getText(text,1) != TREE.getText(text,2)) @@ -76,33 +78,52 @@ void createTree(dyn_mapping dyn_map, string parentId = \"\") } } } - + //do it recursive for each children if ( mappingHasKey(map, \"children\") ) - { + { createTree(map[\"children\"], text); - } + } } } } " 0 E E E E 1 -1 -1 0 50 40 ""0 1 -E E 3 +E E 5 "CBRef" "1" "EClose" E +"type" "WF" "dpi" "96" -1 0 0 +"pdpi" "96" +1 1 0 0 0 0 1 0 "" DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 LAYER, 0 -2 +0 +6 5 +"RECTANGLE1" +"" +1 0 708.0000000000003 E E E 1 E 1 E N "WF_BtnBottomPanelFore" E N "WF_BtnBottomPanelBack" E E + E E +5 0 0 0 0 0 +E E E +0 +3 LANG:10000 0 LANG:10001 0 +LANG:10027 0 + +4 +"sizePolicy" "Preferred Preferred" +"layoutAlignment" "AlignNone" +"dashclr"N "_Transparent" +"antiAliased" "0" +E E 0 1 1 2 1 E 0.9722222222222222 0 1.515304618752894 63 -478.8356700770494 1 E 0 708 1008 747 29 0 "TREE" -"" -1 12.63972286374134 11.58617332035053 E E E 1 E 1 E N "DavyGrey" E N "SiemensSnow" E E +"WF" +1 12.63972286374134 10.71762414800389 E E E 1 E 1 E N "DavyGrey" E N "SiemensSnow" E E E E 0 0 0 0 0 0 E E E @@ -118,13 +139,13 @@ LANG:10001 0 2 LANG:10000 26 Arial,-1,12,5,50,0,0,0,0,0 LANG:10001 26 Arial,-1,12,5,50,0,0,0,0,0 -0 9 9 1191 673 +0 9 9 1191 450.0000000000001 10 TreeWidget 0 E13 1 "PUSH_BUTTON1" -"" -1 1097 684.8 E E E 1 E 1 E N "_ButtonText" E N "_Button" E E +"WF" +1 727 616.348440065681 E E E 1 E 1 E N "WF_Text" E N "_Button" E E E E 1 0 0 0 0 0 E E E @@ -134,12 +155,13 @@ LANG:10000 0 LANG:10001 0 2 -"minimumSize" "95 25" +"minimumSize" "80 32" "layoutAlignment" "AlignNone" -2 -LANG:10000 26 Arial,-1,12,5,50,0,0,0,0,0 -LANG:10001 26 Arial,-1,12,5,50,0,0,0,0,0 -0 1095 678 1193 706 +3 +LANG:10000 26 Arial,-1,11,5,50,0,0,0,0,0 +LANG:10001 26 Arial,-1,11,5,50,0,0,0,0,0 +LANG:10027 26 Arial,-1,11,5,50,0,0,0,0,0 +0 725 609.548440065681 823 637.548440065681 T 2 @@ -153,7 +175,7 @@ LANG:10001 5 Close 32 2 "SPACER1" "" -1 9 680 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E +1 91 611.7742200328405 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E E E 2 0 0 0 0 0 E E E @@ -166,11 +188,11 @@ LANG:10001 0 "transparentForMouse" "" "sizePolicy" "Expanding Ignored" "layoutAlignment" "AlignNone" - 9 680 988.9999999999999 704 1 + 91 611.7742200328405 527 635.7742200328405 1 13 3 "PUSH_BUTTON2" -"" -1 996 684.8 E E E 1 E 1 E N "_ButtonText" E N "_Button" E E +"WF" +1 626 616.348440065681 E E E 1 E 1 E N "WF_Text" E N "_Button" E E E E 3 0 0 0 0 0 E E E @@ -180,12 +202,13 @@ LANG:10000 0 LANG:10001 0 2 -"minimumSize" "95 25" +"minimumSize" "80 32" "layoutAlignment" "AlignNone" -2 -LANG:10000 26 Arial,-1,12,5,50,0,0,0,0,0 -LANG:10001 26 Arial,-1,12,5,50,0,0,0,0,0 -0 994 678 1092 706 +3 +LANG:10000 26 Arial,-1,11,5,50,0,0,0,0,0 +LANG:10001 26 Arial,-1,11,5,50,0,0,0,0,0 +LANG:10027 26 Arial,-1,11,5,50,0,0,0,0,0 +0 624 609.548440065681 722 637.548440065681 T 2 @@ -198,55 +221,48 @@ LANG:10001 6 Limits E E E 0 LAYER, 1 -2 -LANG:10000 0 -LANG:10001 0 +0 0 LAYER, 2 -2 -LANG:10000 0 -LANG:10001 0 +0 0 LAYER, 3 -2 -LANG:10000 0 -LANG:10001 0 +0 0 LAYER, 4 -2 -LANG:10000 0 -LANG:10001 0 +0 0 LAYER, 5 -2 -LANG:10000 0 -LANG:10001 0 +0 0 LAYER, 6 -2 -LANG:10000 0 -LANG:10001 0 +0 0 LAYER, 7 -2 -LANG:10000 0 -LANG:10001 0 0 -4 0 "LAYOUT_GROUP0" 1 -3 0 -1 2 3 +0 +4 1 "LAYOUT_GROUP1" 3 +1 0 +0 + +"S 0" "0 0 1 1" +"" "" +0 2 0 1 0 +4 2 "LAYOUT_GROUP5" 3 +4 0 +5 1 2 3 "S 1" "2 0 1 1" "S 2" "0 0 1 1" "S 3" "1 0 1 1" "" "" -0 1 0 0 -4 1 "LAYOUT_GROUP1" -1 -1 1 -0 -0 -"S 0" "0 0 1 1" -"G 0" "1 0 1 1" +1 1 1 11 11 11 11 1 7 +4 3 "LAYOUT_GROUP6" -1 +0 2 + +1 2 +"G 1" "0 0 1 1" +"G 2" "1 0 1 1" "" "" -0 2 0 0 +0 2 0 1 0 0 diff --git a/WinCCOA_QualityChecks/panels/vision/tf/QG_Results.pnl b/WinCCOA_QualityChecks/panels/vision/tf/QG_Results.pnl new file mode 100644 index 00000000..6e03cf0c --- /dev/null +++ b/WinCCOA_QualityChecks/panels/vision/tf/QG_Results.pnl @@ -0,0 +1,108 @@ +V 14 +1 +LANG:10000 0 +PANEL,-1 -1 641 472 N "WF_PanelBackground" 0 +" + +main() +{ + splitter.addModule(\"qgSideBar\"); + splitter.addModule(\"qgViewContainer\"); + + dyn_int sizes = jsonDecode(globalStorage.getValue(\"qg_splitter_sizes\", \"[]\")); + + if ( dynlen(sizes) > 0 ) + splitter.setSizes(sizes); + + rootPanelOnModule(\"vision/tf/objects/qgSideBar\", \"qgSideBar\", \"qgSideBar\", \"\"); + rootPanelOnModule(\"vision/tf/objects/qgViewContainer\", \"qgViewContainer\", \"qgViewContainer\", \"\"); + + splitter.setMinimumSize(\"qgSideBar\", 100); + splitter.setCollapsible(\"qgSideBar\", FALSE); +} +" 0 + E E E E 1 -1 -1 0 -107.5 -50.25641025641026 +""0 1 +E "#uses \"classes/globalStorage/GlobalStorage\" + +GlobalStorage globalStorage = GlobalStorage(\"vision_tf\"); +" 0 + 5 +"CBRef" "1" +"EClose" E +"type" "WF" +"dpi" "120" +"pdpi" "141.951" +1 1 0 0 0 0 1 0 +"" +DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 +LAYER, 0 +0 +29 2 +"splitter" +"" +1 -170 -90 E E E 1 E 1 E N "WF_Text" E N "SiemensSand" E E + E E +1 0 0 0 0 0 +E E E +0 +3 +LANG:10000 0 +LANG:10001 0 +LANG:10027 0 + +8 +"lineWidth" "int 1" +"styleSheet" "string QWidget#splitter{font-family: \"Noto Sans\"; font-size: 17px; font-style: normal; font-weight: 400; }QWidget#splitter:enabled {background: #ffaaaa96; color: #ff505a64; }" +"handleWidth" "int 2" +"frameShape" "enum 1" +"tabletTracking" "bool TRUE" +"sizePolicy" "Preferred MinimumExpanding" +"layoutAlignment" "AlignNone" +"snapMode" "Line" +3 +LANG:10000 35 MS Shell Dlg 2,-1,13,5,50,0,0,0,0,0 +LANG:10001 38 Noto Sans,-1,17,5,50,0,0,0,0,0,Regular +LANG:10027 35 MS Shell Dlg 2,-1,13,5,50,0,0,0,0,0 +0 -57.5 -50.25641025641026 392.5 259.7435897435897 +8 Splitter +1 +0 "splitterMoved" "(int pos, int idx)" +" globalStorage.setValue(\"qg_splitter_sizes\", jsonEncode(splitter.getSizes(), TRUE));" +E0 +LAYER, 1 +0 +0 +LAYER, 2 +0 +0 +LAYER, 3 +0 +0 +LAYER, 4 +0 +0 +LAYER, 5 +0 +0 +LAYER, 6 +0 +0 +LAYER, 7 +0 +0 +4 0 "LAYOUT_GROUP5" 2 +1 0 +2 + +"S 2" "0 0 1 1" +"" "" +0 1 0 1 0 +4 2 "LAYOUT_GROUP16" -1 +0 1 + +0 +"G 0" "0 0 1 1" +"" "" +0 2 0 1 0 +0 diff --git a/WinCCOA_QualityChecks/panels/vision/tf/objects/qgSideBar.pnl b/WinCCOA_QualityChecks/panels/vision/tf/objects/qgSideBar.pnl new file mode 100644 index 00000000..7289de7b --- /dev/null +++ b/WinCCOA_QualityChecks/panels/vision/tf/objects/qgSideBar.pnl @@ -0,0 +1,290 @@ +V 14 +1 +LANG:10000 0 +PANEL,-1 -1 358 461 N "WF_PanelBackground" 0 +E E E E E 1 -1 -1 0 -10 10 +""0 1 +E "#uses \"classes/json/JsonFile\" +#uses \"fileSystem\" + + +#event showQgResultBuild(const string &buildDir) +#event showQgResultGate(const string &buildDir) + +const int COL_PATH = 4; +const int COL_TYPE = 5; + +dyn_string fswMonitoredPathes; +//-------------------------------------------------------------------------------- +fswAddPathRecursive(const string &path) +{ + if (!fswMonitoredPathes.contains(path)) + { + fswAddPath(path); + dynAppend(fswMonitoredPathes, path); + } + + dyn_string subDirs = getSubDirNames(path); + + for (int i = 1; i <= dynlen(subDirs); i++) + { + fswAddPathRecursive(path + subDirs[i] + \"/\"); + } +} +//-------------------------------------------------------------------------------- +synchronized newResultFound(string eventName, string path) +{ + fswAddPathRecursive(path); // be sure new directories are added in to watcher + loadResults(); +} + + +void loadResults() +{ + string resDir = makeUnixPath(TfFileSys::getTestInstallPath(TfFileSysPath::Results) + \"QualityGates/\"); + + if (resDir == \"\") + return; + + testTree.updatesEnabled(FALSE); +// testTree.clear(); + //Return a list with all executed testSuites and merge it + dyn_string testSuiteIds = getSubDirNames(resDir); + + for (int i = 1; i <= dynlen(testSuiteIds); i++) + { + _addSuite(testSuiteIds[i], resDir); + } + + testTree.updatesEnabled(TRUE); + +} + + +//-------------------------------------------------------------------------------- +_addSuite(const string &tsName, const string &resDir) +{ + OaTestResult summary; + const string id = tsName; + + // add only not existing items (due refresh) + if (!testTree.itemExists(id)) + { + testTree.appendItem(\"\", id, tsName); + testTree.setText(id, COL_PATH, resDir + tsName + \"/\"); + testTree.setText(id, COL_TYPE, \"suite\"); + } + + dyn_string projects = getSubDirNames(resDir + tsName); + + for (int i = 1; i <= dynlen(projects); i++) + { + _addProj(id, projects[i]); + + } + +} + +//-------------------------------------------------------------------------------- +_addProj(const string &parrentId, const string &projName) +{ + const string id = parrentId + \";\" + projName; + const string parrentPath = testTree.getText(parrentId, COL_PATH); + const string myPath = parrentPath + projName + \"/\"; + + // add only not existing items (due refresh) + if (!testTree.itemExists(id)) + { + testTree.appendItem(parrentId, id, projName); + testTree.setText(id, COL_PATH, myPath); + testTree.setText(id, COL_TYPE, \"project\"); + } + + dyn_string builds = getSubDirNames(myPath); + + for (int i = 1; i <= dynlen(builds); i++) + { + _addBuild(id, builds[i]); + } +} + +_addBuild(const string &parrentId, const string &build) +{ + const string id = parrentId + \"#\" + build; + const string parrentPath = testTree.getText(parrentId, COL_PATH); + const string myPath = parrentPath + build + \"/\"; + + // add only not existing items (due refresh) + if (!testTree.itemExists(id)) + { + testTree.appendItem(parrentId, id, build); + testTree.setText(id, COL_PATH, myPath); + testTree.setText(id, COL_TYPE, \"build\"); + } + + dyn_string gates = getSubDirNames(myPath); + + for (int i = 1; i <= dynlen(gates); i++) + { + _addGate(id, gates[i]); + } + +} + + +_addGate(const string &parrentId, const string &gate) +{ + const string id = parrentId + \"-\" + gate; + const string parrentPath = testTree.getText(parrentId, COL_PATH); + const string myPath = parrentPath + gate + \"/\"; + + // add only not existing items (due refresh) + if (!testTree.itemExists(id)) + { + string gateName = getCatStr(\"QG_Names\", gate); + + if (dynlen(getLastError()) > 0) + gateName = gate; + + testTree.appendItem(parrentId, id, gateName); + testTree.setText(id, COL_PATH, myPath); + testTree.setText(id, COL_TYPE, \"gate\"); + } + + + string score; + fileToString(myPath + \"Score\", score, \"UTF8\"); + testTree.setText(id, 1, score); + + JsonFile sumFile = JsonFile(myPath + \"sum.json\"); + mapping sumData; + sumFile.read(sumData); + testTree.setText(id, 2, sumData.value(\"totalPoints\")); + testTree.setText(id, 3, sumData.value(\"errorPoints\")); + + + if (sumData.value(\"hasError\")) + { + testTree.setBackColor(id, 0, \"WF_Error\"); + } + else + { + testTree.setBackColor(id, 0, \"WF_Info\"); + } + +} + + + +" 0 + 5 +"CBRef" "1" +"EClose" E +"type" "WF" +"dpi" "120" +"pdpi" "141.951" +2 1 0 0 0 0 1 0 +"" +DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 +LAYER, 0 +0 +29 1 +"testTree" +"WF" +1 30 40 E E E 1 E 1 E N "WF_Text" E N "WF_PanelBackground" E E + E E +0 0 0 0 0 0 +E E E +0 +3 +LANG:10000 0 +LANG:10001 0 +LANG:10027 0 + +1 +"layoutAlignment" "AlignNone" +3 +LANG:10000 35 MS Shell Dlg 2,-1,13,5,50,0,0,0,0,0 +LANG:10001 35 MS Shell Dlg 2,-1,13,5,50,0,0,0,0,0 +LANG:10027 35 MS Shell Dlg 2,-1,13,5,50,0,0,0,0,0 +0 30 40 510 360 +10 TreeWidget +2 +0 "selectionChanged" "(string id)" +" const string path = testTree.getText(id, COL_PATH); + + if (path.isEmpty()) + return; + + const string type = testTree.getText(id, COL_TYPE); + + if (type == \"gate\") + triggerEvent(self.showQgResultGate, path); + else if (type == \"build\") + triggerEvent(self.showQgResultBuild, path); +" +0 "doubleClicked" "(string id, int column)" +"" +"#uses \"fileSystem\" + +main() +{ + this.addColumn(\"Name\"); + this.setColumnWidthMode(0, TREE_WIDTH_STRETCH); + // Score + this.addColumn(\"Score\\n[%]\"); + // totalPoints + this.addColumn(\"Total\\npoints\"); + // errorPoints + this.addColumn(\"Error\\npoints\"); + + this.addColumn(\"resultPath\"); + this.hideColumn(COL_PATH, TRUE); + this.addColumn(\"type\"); + this.hideColumn(COL_TYPE, TRUE); + + this.alternatingRowColors(TRUE); + loadResults(); + +// uiConnect(\"testRunFinished\", \"testRunFinished\"); + + string resDir = makeUnixPath(TfFileSys::getTestInstallPath(TfFileSysPath::Results) + \"QualityGates/\"); + + if (resDir != \"\") + { + fswAddPathRecursive(resDir); + sysConnect(\"newResultFound\", \"fswPathChanged\"); + } +} + +" 0 +0 +LAYER, 1 +0 +0 +LAYER, 2 +0 +0 +LAYER, 3 +0 +0 +LAYER, 4 +0 +0 +LAYER, 5 +0 +0 +LAYER, 6 +0 +0 +LAYER, 7 +0 +0 +4 0 "LAYOUT_GROUP1" -1 +1 0 +1 + +"S 1" "0 0 1 1" +"" "" +0 1 0 0 +0 diff --git a/WinCCOA_QualityChecks/panels/vision/tf/objects/qgViewContainer.pnl b/WinCCOA_QualityChecks/panels/vision/tf/objects/qgViewContainer.pnl new file mode 100644 index 00000000..f7d34a3c --- /dev/null +++ b/WinCCOA_QualityChecks/panels/vision/tf/objects/qgViewContainer.pnl @@ -0,0 +1,115 @@ +V 14 +1 +LANG:10000 0 +PANEL,-1 -1 584 400 N "WF_PanelBackground" 0 +"main() +{ + uiConnect(\"showQgResultGate\", \"qgSideBar.qgSideBar:\", \"showQgResultGate\"); + uiConnect(\"showQgResultBuild\", \"qgSideBar.qgSideBar:\", \"showQgResultBuild\"); +} + +void claerTab() +{ + while (qgsTab.registerCount() > 0) + qgsTab.deleteRegister(0); +} + + +void showQgResultBuild(const string &buildDir) +{ + claerTab(); + + dyn_string qgIds = getSubDirNames(buildDir); + + for (int i = 1; i <= dynlen(qgIds); i++) + { + addGate(qgIds[i], buildDir, i - 1); + } + +} + +void showQgResultGate(const string &gateDir) +{ + claerTab(); + + addGate(baseName(gateDir), dirName(gateDir), 0); + +} + +void addGate(const string &gate, const string &buildDir, const int regIdx) +{ + qgsTab.insertRegister(regIdx); + qgsTab.registerName(regIdx, gate); + + string registerName = getCatStr(\"QG_Names\", gate); + + if (dynlen(getLastError()) > 0) + registerName = gate; + + qgsTab.registerHeader(regIdx, registerName); + qgsTab.registerPanel(regIdx, \"vision/QualityChecks/QG_Result.pnl\", makeDynString(\"$fileName:\" + buildDir + gate + \"/Result\")); +} +" 0 + E E E E 1 -1 -1 0 50 30 +""0 1 +E E 5 +"CBRef" "1" +"EClose" E +"type" "WF" +"dpi" "120" +"pdpi" "141.951" +2 1 0 0 0 0 1 0 +"" +DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 +LAYER, 0 +0 +28 1 +"qgsTab" +"WF" +1 50 30 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E + E E +0 0 0 0 0 0 +E E E +0 +1 +LANG:10000 0 + +2 +"layoutAlignment" "AlignNone" +"showBackground" "0" +3 +LANG:10000 30 Noto Sans,12,-1,5,50,0,0,0,0,0 +LANG:10001 30 Noto Sans,12,-1,5,50,0,0,0,0,0 +LANG:10027 30 Noto Sans,12,-1,5,50,0,0,0,0,0 +0 48 28 332 202 +E0 +0 +LAYER, 1 +0 +0 +LAYER, 2 +0 +0 +LAYER, 3 +0 +0 +LAYER, 4 +0 +0 +LAYER, 5 +0 +0 +LAYER, 6 +0 +0 +LAYER, 7 +0 +0 +4 0 "LAYOUT_GROUP1" -1 +1 0 +1 + +"S 1" "0 0 1 1" +"" "" +0 1 0 0 +0 diff --git a/WinCCOA_QualityChecks/scripts/libs/classes/QualityGates/QgVersionResult.ctl b/WinCCOA_QualityChecks/scripts/libs/classes/QualityGates/QgVersionResult.ctl index d1571892..9cec06b8 100644 --- a/WinCCOA_QualityChecks/scripts/libs/classes/QualityGates/QgVersionResult.ctl +++ b/WinCCOA_QualityChecks/scripts/libs/classes/QualityGates/QgVersionResult.ctl @@ -595,14 +595,15 @@ struct QgVersionResult } //------------------------------------------------------------------------------ - /** @brief enabled or disabled oaUnitResults - @todo mPunk 30.10.2018: make it configureable, otherwise does not work in jenkins - @return TRUE hen are oaUnit results enabled + /** Check if the oaUnitResult can be enabled. + + The oaUnitFormat is enabled only when the script has been started by WinCC OA + TestFramework. */ protected static bool _enableOaTestOutput() { - return true; - return Qg::isRunningOnJenkins(); + // like in the OaTestBase::isStartedByTF() but the function is private :-( + return isfile(PROJ_PATH + "fullResult.json"); } //------------------------------------------------------------------------------