From c30ba7d9a85ba270c23c86d1d97e2e669ff867a4 Mon Sep 17 00:00:00 2001 From: Dac Anh Minh Le Date: Mon, 8 Jan 2018 16:21:10 +0100 Subject: [PATCH] Pentaho CDE Atol CD Plugins official release Change-Id: If0e04a4106aba980a23c20397a82e340aaf75b5b --- README.md | 10 +- build.properties | 8 +- cpk.xml | 8 +- dashboards/admin/main.cdfde | 319 ++++++++++++- .../Introduction to SVG Component.adoc | 57 +++ docs/SVG Component/Original features.adoc | 23 + docs/SVG Component/README.adoc | 13 + .../SVG Component installation.adoc | 70 +++ docs/SVG Component/Signature properties.adoc | 95 ++++ docs/SVG Component/Standard properties.adoc | 74 +++ ...nd interactions with other components.adoc | 25 ++ .../features/Colorization filtering.adoc | 30 ++ ...rization of entities on the SVG image.adoc | 24 + .../Input interface for the legend.adoc | 109 +++++ .../SVG Component/features/Ratio control.adoc | 22 + .../features/SVG graphic title.adoc | 12 + .../features/The dynamic selectors.adoc | 44 ++ .../features/The export button function.adoc | 17 + .../The two entry modes for SVG content.adoc | 62 +++ docs/SVG Component/features/Tooltip.adoc | 48 ++ docs/SVG Component/features/Zoom.adoc | 13 + docs/SVG Component/images/atolcdLogo.png | Bin 0 -> 4242 bytes docs/SVG Component/images/depPopulation.png | Bin 0 -> 71254 bytes .../SVG Component/images/dynamicSelectors.png | Bin 0 -> 62835 bytes .../images/indicatorMappingInputInterface.png | Bin 0 -> 24325 bytes .../images/legendInputInterface.png | Bin 0 -> 36052 bytes docs/SVG Component/images/zoomExport.png | Bin 0 -> 35156 bytes plugin.xml | 2 +- resources/components/SVG/SVG.js | 8 +- resources/lang/messages.properties | 4 +- static/custom/css/atolcd.css | 6 + static/custom/img/atolcdLogo.png | Bin 0 -> 7407 bytes static/custom/js/sparkl.js | 423 ++++++++++++++++++ static/system/img/pluginLogo.png | Bin 0 -> 7407 bytes version.xml | 2 +- 35 files changed, 1496 insertions(+), 32 deletions(-) create mode 100644 docs/SVG Component/Introduction to SVG Component.adoc create mode 100644 docs/SVG Component/Original features.adoc create mode 100644 docs/SVG Component/README.adoc create mode 100644 docs/SVG Component/SVG Component installation.adoc create mode 100644 docs/SVG Component/Signature properties.adoc create mode 100644 docs/SVG Component/Standard properties.adoc create mode 100644 docs/SVG Component/features/Click and interactions with other components.adoc create mode 100644 docs/SVG Component/features/Colorization filtering.adoc create mode 100644 docs/SVG Component/features/Colorization of entities on the SVG image.adoc create mode 100644 docs/SVG Component/features/Input interface for the legend.adoc create mode 100644 docs/SVG Component/features/Ratio control.adoc create mode 100644 docs/SVG Component/features/SVG graphic title.adoc create mode 100644 docs/SVG Component/features/The dynamic selectors.adoc create mode 100644 docs/SVG Component/features/The export button function.adoc create mode 100644 docs/SVG Component/features/The two entry modes for SVG content.adoc create mode 100644 docs/SVG Component/features/Tooltip.adoc create mode 100644 docs/SVG Component/features/Zoom.adoc create mode 100644 docs/SVG Component/images/atolcdLogo.png create mode 100644 docs/SVG Component/images/depPopulation.png create mode 100644 docs/SVG Component/images/dynamicSelectors.png create mode 100644 docs/SVG Component/images/indicatorMappingInputInterface.png create mode 100644 docs/SVG Component/images/legendInputInterface.png create mode 100644 docs/SVG Component/images/zoomExport.png create mode 100644 static/custom/css/atolcd.css create mode 100644 static/custom/img/atolcdLogo.png create mode 100644 static/custom/js/sparkl.js create mode 100644 static/system/img/pluginLogo.png diff --git a/README.md b/README.md index 98ee5be..62a6de3 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,19 @@ -Pentaho CDE Atol CD plugins +Pentaho CDE Atol CD Plugins ================================ This project provides you CDE components developed by [Atol Conseils et Développements (Atol CD)](http://www.atolcd.com), including **SVG Component**. -[Pentaho CDE Atol CD plugins Home page](https://github.com/atolcd/pentaho-cde-atolcd-plugins/) +Works with Pentaho 6.0 and above. + +[Pentaho CDE Atol CD Plugins home page](https://github.com/atolcd/pentaho-cde-atolcd-plugins/) Installation instructions --------------------- 1. **Install the Pentaho plug-in atolcd:** start Pentaho BI Server and open it in a browser; search for the plug-in atolcd in Pentaho Marketplace and install its latest version; clear browser’s cache and restart Pentaho server. -2. **Include Atolcd input types:** reopen Pentaho User Console in browser; open the installation page of atolcd plug-in (menu Tools > Atolcd); click on the button “Include ATOL CD input types”; clear browser’s cache and restart Pentaho server. +2. **Include Atol CD input types:** reopen Pentaho in browser; open the installation page of atolcd plug-in (menu Tools > Atol CD Plugins); click on the button “Click here to finish plugin installation”; clear browser’s cache and restart Pentaho server. 3. **Installation complete**. -To get more information about this plugin, see our [documentation](https://github.com/atolcd/pentaho-cde-atolcd-plugins/blob/master/). +To get more information about this plugin, please refer to our [documentation](https://github.com/atolcd/pentaho-cde-atolcd-plugins/blob/master/docs/SVG%20Component/README.adoc). Contributing diff --git a/build.properties b/build.properties index 61bf6c4..2a1b43d 100644 --- a/build.properties +++ b/build.properties @@ -1,14 +1,14 @@ # Stage: TRUNK | STABLE | BETA | other branch project.stage=SPARKL project.stage.name=Sparkl -project.version= +project.version=1.0 project.revision=${project.stage}-${project.version} # Version: a numeric value or SNAPSHOT. SNAPSHOT is replaced by DSTAMP package.url=not defined ivy.artifact.id=atolcd -ivy.artifact.group= -impl.title= -project.description= +ivy.artifact.group=Atol CD +impl.title=Provides components for Community Dashboard Editor. +project.description=Provides components for Community Dashboard Editor. testsrc.dir=test dependency.bi-platform.revision=TRUNK-SNAPSHOT #Properties for Pentaho 5.0 diff --git a/cpk.xml b/cpk.xml index 4e90161..7a8aa61 100644 --- a/cpk.xml +++ b/cpk.xml @@ -22,7 +22,13 @@ 5 - Atolcd + Provides components for Community Dashboard Editor. + Atol CD Plugins + contact@atolcd.com + Atol CD + Atol CD + www.atolcd.com 2017-07-26 + 1.0 diff --git a/dashboards/admin/main.cdfde b/dashboards/admin/main.cdfde index 083752e..4f3d798 100644 --- a/dashboards/admin/main.cdfde +++ b/dashboards/admin/main.cdfde @@ -27,7 +27,7 @@ { "name": "label", "type": "String", - "value": "Include ATOL C&D input types" + "value": "Click here to finish plugin installation" }, { "name": "listeners", @@ -42,7 +42,7 @@ { "name": "expression", "type": "JavaScript", - "value": "function() {\n var dialog = Dashboards.getComponentByName('${c:dialog}');\n \n sparkl.runEndpoint('atolcd', 'includeAtolcdInputTypes', {\n success: function(data) {\n Dashboards.decrementRunningCalls();\n \n var message = 'ATOL C&D input types included.';\n \n if (data.resultset.length > 0) {\n var resColNum = data.metadata.filter(function(column) {\n return column.colName == 'result';\n })[0].colIndex;\n \n if (typeof resColNum !== 'undefined') {\n var contains = data.resultset[0][resColNum];\n \n if (contains == 'contains') {\n message = 'ATOL C&D input types already included.';\n }\n }\n } else {\n message = 'Transformation configuration error.';\n }\n \n dialog.open({\n message: message,\n dialogClass: 'closeButtonVisible'\n });\n },\n error: function() {\n Dashboards.decrementRunningCalls();\n dialog.open({\n message: 'Error while checking ATOL C&D input types inclusion.',\n dialogClass: 'closeButtonVisible'\n });\n } \n });\n} " + "value": "function() {\n var dialog = Dashboards.getComponentByName('${c:dialog}');\n \n sparkl.runEndpoint('atolcd', 'includeAtolcdInputTypes', {\n success: function(data) {\n Dashboards.decrementRunningCalls();\n \n var message = 'Plugin correctly installed.';\n \n if (data.resultset.length > 0) {\n var resColNum = data.metadata.filter(function(column) {\n return column.colName == 'result';\n })[0].colIndex;\n \n if (typeof resColNum !== 'undefined') {\n var contains = data.resultset[0][resColNum];\n \n if (contains == 'contains') {\n message = 'Plugin already correctly installed.';\n }\n }\n } else {\n message = 'Transformation configuration error.';\n }\n \n dialog.open({\n message: message,\n dialogClass: 'closeButtonVisible'\n });\n },\n error: function() {\n Dashboards.decrementRunningCalls();\n dialog.open({\n message: 'Error while installing plugin.',\n dialogClass: 'closeButtonVisible'\n });\n } \n });\n} " }, { "name": "failureCallback", @@ -162,6 +162,65 @@ "rowName": "Text Component", "type": "ComponentstextComponent", "typeDesc": "Text Component" + }, + { + "id": "710c3e26-392a-4ff8-2ea8-2b8423ce05da", + "parent": "OTHERCOMPONENTS", + "properties": [ + { + "name": "name", + "type": "Id", + "value": "label" + }, + { + "name": "listeners", + "type": "Listeners", + "value": "[]" + }, + { + "name": "expression", + "type": "JavaScript", + "value": "

SVG Component plugin:

" + }, + { + "name": "priority", + "type": "Integer", + "value": 5 + }, + { + "name": "refreshPeriod", + "type": "Integer", + "value": "" + }, + { + "name": "htmlObject", + "type": "HtmlObject", + "value": "${h:labelColumn}" + }, + { + "name": "executeAtStart", + "type": "Boolean", + "value": "true" + }, + { + "name": "preExecution", + "type": "JavaScript", + "value": "" + }, + { + "name": "postExecution", + "type": "JavaScript", + "value": "" + }, + { + "name": "tooltip", + "type": "Html", + "value": "" + } + ], + "rowName": "Text Component", + "type": "ComponentstextComponent", + "typeDesc": "Text Component" } ] }, @@ -214,27 +273,184 @@ "layout": { "rows": [ { - "id": "f68ec166-516b-9220-4f9f-60dad90e9437", - "type": "LayoutResourceCode", - "typeDesc": "Resource", + "id": "ac7b82af-085e-1562-0d52-06b4fc7fb546", + "parent": "UnIqEiD", + "properties": [ + { + "name": "name", + "type": "Id", + "value": "sparklJS" + }, + { + "name": "resourceFile", + "type": "ResourceFile", + "value": "${system:/static/custom/js/sparkl.js}" + }, + { + "name": "resourceType", + "type": "Label", + "value": "Javascript" + } + ], + "type": "LayoutResourceFile", + "typeDesc": "Resource" + }, + { + "id": "4038135e-5a56-7b9f-3e5b-9f88cd4fac1a", "parent": "UnIqEiD", "properties": [ { "name": "name", - "value": "sparklJs", - "type": "Id" + "type": "Id", + "value": "mainCSS" }, { - "name": "resourceCode", - "value": "/********************************** Project namespace *******************************************/\nvar sparkl = {};\n(function(myself) {\n\n var _settings = {\n expressions: {\n element: /^[A-Za-z][A-Za-z\\d]*$/,\n plugin: /^[A-Za-z][A-Za-z\\d]*$/,\n image: /\\.(png|jpg)$/,\n zip: /\\.(zip)$/\n },\n reservedNames: [\n 'status', 'refresh', 'reload'\n ]\n };\n\n myself.getSettings = function() {\n var acc = _settings;\n _.every(arguments, function(el) {\n acc = acc[el] || undefined;\n return !!acc;\n });\n return acc;\n };\n\n\n myself.changeLocation = function(newLocation, bookmarks, isNew) {\n if (!newLocation) {\n return;\n }\n var hash = (bookmarks && !_.isEmpty(bookmarks)) ? '#' + generateHashValue(\"bookmark\", {\n impl: \"client\",\n params: bookmarks\n }) : \"\";\n if (isNew) {\n window.open(newLocation + hash);\n } else {\n window.location = newLocation + hash;\n }\n };\n\n function generateHashValue(key, value) {\n var obj = Dashboards.getHashValue(),\n json;\n if (arguments.length == 1) {\n obj = key;\n } else {\n obj[key] = value;\n }\n json = JSON.stringify(obj);\n return json;\n }\n\n myself.isValidName = function(name, type) {\n var reg = _settings.expressions[type || 'plugin'] || /.*/;\n return reg.test(name);\n };\n\n\n myself.isUpdated = function(srcVersion, pluginVersion) {\n return (srcVersion == pluginVersion);\n };\n\n\n myself.isJobError = function(json) {\n return (json && json.result === false);\n };\n\n myself.hasUploaderComponent = function() {\n return !(typeof FileUploaderComponent == 'undefined');\n };\n\n\n myself.createElementsTableEmptyRawData = function() {\n var emptyData = {\n metadata: [{\n colIndex: 0,\n colType: 'String',\n colName: 'elementName'\n }, {\n colIndex: 1,\n colType: 'String',\n colName: 'elementType'\n }, {\n colIndex: 2,\n colType: 'Boolean',\n colName: 'adminOnly'\n }, {\n colIndex: 3,\n colType: 'String',\n colName: 'fileName'\n }, {\n colIndex: 4,\n colType: 'String',\n colName: 'elementName'\n }],\n queryInfo: {\n totalRows: 0\n },\n resultset: []\n };\n return emptyData;\n };\n\n\n myself.addUploadForm = function(ph, opts) {\n\n var _opts = {\n root: '.',\n success: function(filename) {\n Dashboards.log('File uploaded');\n },\n uploadError: function() {\n Dashboards.log('Error uploading file');\n },\n validationError: function() {\n Dashboards.log('File type not allowed.');\n },\n isValidFilename: function(filename) {\n var reg = myself.getSettings('expressions', 'image');\n return reg.test(filename);\n }\n };\n\n opts = _.extend({}, _opts, opts);\n\n var $ph = $(ph),\n $uploadForm = $('
').addClass('WDhidden'),\n filename = '';\n\n var validateForm = function() {\n if (opts.isValidFilename(filename)) {\n return true;\n } else {\n opts.validationError();\n return false;\n }\n };\n\n var resetUploadForm = function() {\n $fileInput.val('');\n filename = '';\n };\n\n var fileUploaded = function(response) {\n if (response.result) {\n opts.success(filename);\n resetUploadForm(filename);\n } else {\n opts.uploadError(filename);\n }\n };\n\n // configure file upload form\n $uploadForm.ajaxForm({\n dataType: 'json',\n success: fileUploaded,\n error: opts.uploadError,\n beforeSubmit: validateForm\n });\n\n $ph.append($uploadForm);\n\n var $fileInput = $('').appendTo($uploadForm),\n $pathInput = $('').appendTo($uploadForm),\n $submitInput = $('