Skip to content
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
289 commits
Select commit Hold shift + click to select a range
988e75f
extend UI width
JaneBellaiche Jan 8, 2026
314bce1
recipe generates dataset
alexbourret Jan 8, 2026
6362fa9
display siblings of searched element in non selected mode
alexbourret Jan 13, 2026
eff6d7d
Edited file 'js/pi-system_treecontroller.js'
Jan 13, 2026
0a6b2a0
Edited files
Jan 15, 2026
1bd48c8
Edited file 'resource/pi-system_af-explorer.css'
Jan 15, 2026
2a72149
*display the attributes outside the tree
JaneBellaiche Jan 21, 2026
c3c79d2
typo
JaneBellaiche Jan 21, 2026
0af06a7
fix elements highlight
JaneBellaiche Jan 21, 2026
7d83faa
little bit of UI
JaneBellaiche Jan 21, 2026
ddc57a8
merging template and category search on tree explorer
alexbourret Jan 26, 2026
ad1402f
use more generic batched search approach
alexbourret Jan 27, 2026
5f030e7
fix virtual links
alexbourret Jan 27, 2026
19af286
use the database name for batched search
alexbourret Feb 3, 2026
0940e2c
UI for authentication params
JaneBellaiche Feb 3, 2026
ca4f68a
*temporary frontend fix to have attributes unselected by default afte…
JaneBellaiche Feb 3, 2026
533a773
*use js better practices
JaneBellaiche Feb 3, 2026
572b69d
*add attribute description and hide path
JaneBellaiche Feb 3, 2026
d5ab146
better handling of check boxes
alexbourret Feb 4, 2026
414610c
activate the SSL switch
alexbourret Feb 4, 2026
ff15065
UI enhancements
JaneBellaiche Feb 4, 2026
0b77bae
update get_templates_from_db to retrieve data in tree
alexbourret Feb 5, 2026
ef361dd
*fix collapse/expand on click
JaneBellaiche Feb 9, 2026
ff13648
make expanding chevron appears only if the node has children
alexbourret Feb 10, 2026
0102b07
search based on selected nodes, add maxCounts
alexbourret Feb 11, 2026
bfa1762
add network stats
alexbourret Feb 17, 2026
33c3b61
* remove multiselect
JaneBellaiche Feb 18, 2026
80bf922
template tree part2
JaneBellaiche Feb 18, 2026
5e3955e
*save active tab state (element/template)
JaneBellaiche Feb 18, 2026
b4b8e16
enhance configuration UI
JaneBellaiche Feb 18, 2026
1d95e19
fix has_children use for both elements and templates trees
alexbourret Feb 19, 2026
3e26980
remove recipe input dataset
JaneBellaiche Feb 23, 2026
08ba22a
update datas on database selection change
JaneBellaiche Feb 23, 2026
7acfa0d
fix element unselection
JaneBellaiche Feb 23, 2026
cca26d1
fix template selection
JaneBellaiche Feb 23, 2026
d102349
*add label for "select all" checkbox
JaneBellaiche Feb 23, 2026
1b67c5a
fix output columns content
JaneBellaiche Feb 23, 2026
8b92413
turn category_names into a string column
JaneBellaiche Feb 24, 2026
a3b1429
change output dataset label
JaneBellaiche Feb 25, 2026
3418ee3
move select all checkbox
JaneBellaiche Feb 26, 2026
928b57a
v1.4.2-beta.1
alexbourret Feb 26, 2026
861a24a
remove constraint to block multi selection
JaneBellaiche Mar 4, 2026
b95f180
rework UI : layouts and basic page components
JaneBellaiche Mar 4, 2026
3e452be
*UI improvements
JaneBellaiche Mar 18, 2026
dd08198
add paths to output schema
JaneBellaiche Mar 18, 2026
79a41d9
*remove siblings
JaneBellaiche Mar 18, 2026
7571dcc
optimising traverse_and_cache
alexbourret Mar 19, 2026
41ce85b
add watchGroup on credentials
JaneBellaiche Mar 19, 2026
1ae15d1
remove previous clickedNodes when making a new search
JaneBellaiche Mar 19, 2026
7a8f72c
support enter keydown to make a search
JaneBellaiche Mar 19, 2026
cbf1805
multiselect on click
JaneBellaiche Mar 23, 2026
ce92aab
*load element's children from db when not loaded
JaneBellaiche Mar 23, 2026
9a150fc
*fix attribute scope with clicked nodes
JaneBellaiche Mar 24, 2026
2fd709d
preserve selection for the output
JaneBellaiche Mar 24, 2026
3927a00
*add safety check on element and attribute name
JaneBellaiche Mar 25, 2026
52b5c82
Mulltiselect for element and tempalte trees
JaneBellaiche Apr 7, 2026
f321bd3
chore: added .idea to gitignore
Ellana42 Apr 15, 2026
97d502a
feat: disable search buttons when the search field is empty
Ellana42 Apr 15, 2026
01d3e3d
Merge pull request #95 from dataiku/feature/dss14-sc-312322--osisoft-…
Ellana42 Apr 15, 2026
e52a73c
*bugfixes on multiselect
JaneBellaiche Apr 15, 2026
278daaa
*remove ssl logs
JaneBellaiche Apr 15, 2026
310b35f
attribute search on all if no clicked nodes
JaneBellaiche Apr 15, 2026
4fd2d3e
do not reset attribute input when clicking on a node
JaneBellaiche Apr 15, 2026
b9eeced
remove dead code
JaneBellaiche Apr 16, 2026
e8623b7
refacto: var -> let/const
Ellana42 Apr 21, 2026
0f21f42
refacto: cleanup optional chaining
Ellana42 Apr 21, 2026
ad9ecca
refacto: missing chaining
Ellana42 Apr 21, 2026
c6966a3
feat: icon for tree view
Ellana42 Apr 21, 2026
2d7e0e3
refacto: missing chaining
Ellana42 Apr 21, 2026
fe34186
fix: toggle node opening after loading children
Ellana42 Apr 21, 2026
7bcffa6
Merge branch 'feature/af-tree-explorer-recipe' into feature/dss14-sc-…
Ellana42 Apr 21, 2026
1647d5b
refacto: reformat
Ellana42 Apr 21, 2026
f595d48
refacto: reformat js
Ellana42 Apr 21, 2026
4041678
fix: renaming
Ellana42 Apr 21, 2026
ad3b952
refacto: simplify logic
Ellana42 Apr 22, 2026
c63ae23
feat: attribute deduplication function
Ellana42 Apr 22, 2026
d8540fe
feat: fixed deduplicated template provider
Ellana42 Apr 22, 2026
f892b36
feat: display unduplicated attribute list (no checkboxes)
Ellana42 Apr 22, 2026
30a3717
refacto: cleanup chaining
Ellana42 Apr 22, 2026
18237f5
feat: multiselect checkboxes add to the output dataset
Ellana42 Apr 23, 2026
30c33c2
refacto: rename for clarity template > mergedAttributes > attributes
Ellana42 Apr 23, 2026
c340985
feat: working partial checkboxes + todos for cleanup
Ellana42 Apr 24, 2026
ff909a7
refacto: move html template to separate file
Ellana42 Apr 24, 2026
256b862
refacto: move group by template logic to reduce
Ellana42 Apr 27, 2026
a5e8478
refacto: building template aggregated attribute object
Ellana42 Apr 27, 2026
1281a19
feat: template level checkbox status + remove syncwithvisibleoutput
Ellana42 Apr 27, 2026
37492b9
feat: working template level checkboxes
Ellana42 Apr 27, 2026
d5fc09b
feat: working top level checkbox
Ellana42 Apr 27, 2026
819efc9
cleanup
Ellana42 Apr 27, 2026
84f872c
cleanup: remove log
Ellana42 Apr 27, 2026
641b974
Merge pull request #98 from dataiku/feature/dss14-sc-303428--osisoft-…
Ellana42 Apr 27, 2026
a957e20
cleanup: display description, not debug status
Ellana42 Apr 27, 2026
1515646
feat: attributes and data_type columns
Ellana42 Apr 27, 2026
a0f5d61
refacto: remove extra getter
Ellana42 Apr 28, 2026
4d291ab
feat: data type dropdown
Ellana42 Apr 28, 2026
c7e2411
feat: improve datatype/aggregate form data structure
Ellana42 Apr 28, 2026
753f787
cleaning: format
Ellana42 Apr 28, 2026
fce2767
feat: aggregate are displayed and saved
Ellana42 Apr 28, 2026
cb0da2a
feat: handle different types of input for aggregates
Ellana42 Apr 28, 2026
e6316cf
feat: working multiselect aggregate with multiselect elements
Ellana42 Apr 28, 2026
6a6c515
feat: add data_type/aggregate values to output
Ellana42 Apr 28, 2026
3acbfbe
fix: uncheck not working + removed all references to selectedAttributes
Ellana42 Apr 29, 2026
d19bcfc
fix: default to empty array for recipe output
Ellana42 Apr 29, 2026
91d9a83
feat: properly reset aggregates when changing data type
Ellana42 Apr 29, 2026
efe3443
feat: default value for aggregates
Ellana42 Apr 29, 2026
3d3ac9d
adding batch search of attribute template while lazy loading
alexbourret Apr 30, 2026
92a398f
make batch request handle empty urls
alexbourret Apr 30, 2026
a562330
feat: split attributes with/without templates
Ellana42 Apr 30, 2026
02824c3
refacto: extract attribute row into a separate component
Ellana42 May 4, 2026
a39e64e
refacto: follow up - add missing template
Ellana42 May 4, 2026
eaf7ab8
feat: enrich attributes in the attribute list with the name of their
Ellana42 May 4, 2026
f3b20bb
feat: build and display lone attributes data structure - checkbox wiring
Ellana42 May 4, 2026
7c58663
refacto: starting to merge template and template less behavior
Ellana42 May 4, 2026
9a2cbe1
add minimal logging in the backend
MayeulRousselet May 4, 2026
00d8868
feat + refacto: shape elements and templates tables data structure
Ellana42 May 4, 2026
5b2163b
refacto: code duplication in buildGroupedAttribugtes
Ellana42 May 4, 2026
46206f8
refacto: make template and templateless tables common html
Ellana42 May 4, 2026
3e02d6b
Merge pull request #102 from dataiku/feature/attribute-template-on-ea…
Ellana42 May 4, 2026
242f0c5
cleanup
Ellana42 May 4, 2026
ba14964
cleanup: reformat
Ellana42 May 4, 2026
e0e1dcf
fix: bad init of refactoed tables
Ellana42 May 4, 2026
b6c346a
fix: table checkbox is unchecked and disabled when table empty
Ellana42 May 4, 2026
a9ef801
Merge pull request #101 from dataiku/feature/dss14-sc-303449--osisoft…
Ellana42 May 4, 2026
2a45da0
cleanup: removing dead code
Ellana42 May 5, 2026
c2036d1
cleanup: remove unused functions
Ellana42 May 5, 2026
c06c84a
fix + refacto: load children before stopping their display + rename
Ellana42 May 5, 2026
971872c
retrieving paths for get_children_from_db operations
alexbourret May 5, 2026
959623f
Merge pull request #104 from dataiku/feature/weak-links
Ellana42 May 5, 2026
fac5b7e
feat: reset tree visual selection state on change tab (Element/Template)
Ellana42 May 5, 2026
65866c7
Merge branch 'feature/af-tree-explorer-recipe' into feature/dss14-sc-…
Ellana42 May 5, 2026
3e34dca
feat: attribute search (empty sections still show)
Ellana42 May 9, 2026
64348a2
refacto: improve naming and performance comment
Ellana42 May 9, 2026
00803bf
feat: hide section (template group for ex) if no search match in them
Ellana42 May 9, 2026
4ff9c8e
feat: empty state when all attrbutes have been searched out
Ellana42 May 9, 2026
39e6644
feat: removed max count from aggregates
Ellana42 May 9, 2026
4ecfa9b
feat: reset attribute search on template change
Ellana42 May 9, 2026
41b40e3
feat: hide filter by category dropdowns temporarily
Ellana42 May 9, 2026
453a83c
feat: add missing aggregate types + removed dependsOn from the data
Ellana42 May 11, 2026
a652d74
adding get attribute from template endpoint
alexbourret May 11, 2026
13ce567
fix
alexbourret May 11, 2026
201a463
add get_elements_for_template endpoint
alexbourret May 11, 2026
c47e7eb
feat: load template attributes as children
Ellana42 May 11, 2026
9a1486d
feat: display template attributes in the right table
Ellana42 May 11, 2026
d7b7fd4
feat: don't display element table in template mode
Ellana42 May 11, 2026
d9a2d1d
comment
Ellana42 May 11, 2026
ea4de2f
feat: untoggle templates in template mode (alignment with element mode)
Ellana42 May 11, 2026
4a73be3
feat: temporary checkbox to display the path column
Ellana42 May 11, 2026
2279699
fix for attributes' template names
alexbourret May 12, 2026
95a0489
feat: basic element dropdown functionality + moved onNodeClick to main
Ellana42 May 13, 2026
a2cb946
feat: elements dropdown refreshes on tree interaction
Ellana42 May 13, 2026
ca6c395
feat: improve empty element dropdown state
Ellana42 May 13, 2026
72dabf8
refacto: CLEANUP attribute and template implications in element search
Ellana42 May 13, 2026
0c39773
cleanup: removed ununsed functions
Ellana42 May 15, 2026
459a556
TEMP FIX: stop inserting attributes in tree when search
Ellana42 May 15, 2026
bc8e95a
TEMP FIX: expand nodes in matched search element path
Ellana42 May 15, 2026
307461c
TEMP FIX: load siblings when opening new nodes with search
Ellana42 May 15, 2026
ea8b208
feat: remove start and end time for aggregates
Ellana42 May 15, 2026
5368171
feat: add interval and sync time to output
Ellana42 May 15, 2026
74588f5
cleanup: unused functions and variables
Ellana42 May 15, 2026
68ed21e
feat: clear search button for element search
Ellana42 May 18, 2026
70388db
fix: init element dropdown on reload
Ellana42 May 18, 2026
1af10c4
feat: attribute search matches attribute description as well
Ellana42 May 18, 2026
1cb109c
AF Hierarchy connector does not retrieve elements
alexbourret May 18, 2026
e4b7cc7
fix: search attribute reacts on text input change, not keyboard events
Ellana42 May 18, 2026
caebed6
fix: handle properly attribute description when searching
Ellana42 May 18, 2026
436e6e3
feat: display number of attributes shown
Ellana42 May 18, 2026
4785529
feat: checkbox status changes based on search
Ellana42 May 18, 2026
45c77c6
feat: TMP CSS active state for template/element tabs
Ellana42 May 18, 2026
73bc039
cleanup: removed old template commented code
Ellana42 May 18, 2026
e73bb1c
feat: mostly working element dropdown in template mode + renamings
Ellana42 May 19, 2026
b41d518
feat: handle multiple identical elements in template mode
Ellana42 May 19, 2026
9a87ddd
feat: cleaner but vibecoded UI look for left panel
Ellana42 May 26, 2026
2d43f33
feat: [vibecoded] cleanup tab look
Ellana42 May 26, 2026
b78527c
Merge pull request #103 from dataiku/chore/dss14-sc-315700--osisoft-t…
Ellana42 May 26, 2026
396a51d
chore: added logs for all backend calls
Ellana42 May 26, 2026
bd5e0f5
feat: hiding "any" template in template mode
Ellana42 May 26, 2026
6cb9b7b
feat: refresh local data button
Ellana42 May 26, 2026
cb46be0
deduplicate weak links in template results
alexbourret May 27, 2026
2a78993
fix deduplication of weak links
alexbourret May 27, 2026
227c9d6
Merge branch 'feature/af-tree-explorer-recipe' into feature/dss14-sc-…
Ellana42 May 27, 2026
bb8919e
convert output's python json to json json
alexbourret May 27, 2026
c371eec
Dropdown elements + fast attribute search
Ellana42 May 27, 2026
cb37eac
refacto: extract call methods out of do + remove run and log method
Ellana42 May 27, 2026
ee47494
feat: logging start and end call with arguments
Ellana42 May 27, 2026
770261f
feat: temporary color for selected + searched node
Ellana42 May 27, 2026
4a40ce8
feat: align size of search button with input field
Ellana42 May 27, 2026
9f890b3
feat: margins around recipe title
Ellana42 May 27, 2026
cdd9e20
feat: hide recipe header
Ellana42 May 27, 2026
739c568
feat: element dropdown scrolls after 10 elements
Ellana42 May 28, 2026
b42918f
refacto: move auth banner to a separate component
Ellana42 May 28, 2026
1bbf5ce
feat: separate header in plugin main area
Ellana42 May 28, 2026
d6058d3
feat: improve search box with clear cross
Ellana42 May 28, 2026
26a0054
feat: add functionality to preview dataset button with vibecoded first
Ellana42 May 28, 2026
0762f98
feat: make preview dataset correct size
Ellana42 May 28, 2026
9b81be3
feat: clear selection button
Ellana42 May 28, 2026
fcf967a
feat: make preview dataset dynamic (on clear)
Ellana42 May 28, 2026
4d21973
Merge pull request #109 from dataiku/feature/last-improvements-p1
Ellana42 May 29, 2026
cf1586b
fix: missing template for preview dataset
Ellana42 May 29, 2026
3da7662
fix: deselecting element in template dropdown removed templates
Ellana42 May 29, 2026
814057b
fix: click on template then expand it hides template children
Ellana42 May 29, 2026
9105c0d
fix: stop relying on on-ready and replace by load button
Ellana42 May 29, 2026
199e3ca
feat: new element dropdown (no styling)
Ellana42 Jun 1, 2026
551d6cb
fix: elements dropdown works in template mode
Ellana42 Jun 1, 2026
2eb9c35
fix: add missing html
Ellana42 Jun 1, 2026
57ff031
feat: cleanup UI new elements dropdown
Ellana42 Jun 1, 2026
52c4a2c
feat: add overflow to new elements dropdown
Ellana42 Jun 1, 2026
306c6e1
fix: change empty state message on load
Ellana42 Jun 1, 2026
0cfa913
fix: element dropdown init in template mode
Ellana42 Jun 1, 2026
52d4dfa
fix: allow multiselect without reopening the modal
Ellana42 Jun 1, 2026
936b687
change af tree recipe color
alexbourret Jun 2, 2026
70e1d21
[sc-294814] Fix typo in method name
alexbourret Jan 27, 2026
e5b7ccf
update to v1.4.1
alexbourret Jan 27, 2026
1a50d2a
fix writing single value to static attribute
alexbourret Apr 17, 2026
fd6ba8f
fix: send dict instead of list to /value endpoint
alexbourret May 6, 2026
7b25c6b
update
alexbourret May 6, 2026
926d557
feat: improve styling
Ellana42 Jun 2, 2026
bb1e831
Merge branch 'master' into feature/af-tree-explorer-recipe
Ellana42 Jun 2, 2026
ac0028e
chore: fix version number
Ellana42 Jun 2, 2026
0b2971e
feat: change empty state element dropdown
Ellana42 Jun 2, 2026
c71de83
chore: update plugin.json
Ellana42 Jun 2, 2026
760d64d
feat: element selected state in template mode is instantaneous
Ellana42 Jun 2, 2026
da9a64a
cleanup: dead code post refacto element dropdown in template mode
Ellana42 Jun 2, 2026
f19f5c0
feat: change icon for preview dataset
Ellana42 Jun 2, 2026
ca17073
feat: clear all selected nodes button
Ellana42 Jun 2, 2026
5e611f6
feat: no search match banner
Ellana42 Jun 2, 2026
8ed1c2f
feat: move attribute search to cleaner component
Ellana42 Jun 2, 2026
6f8a0c9
fix for sub template search
alexbourret Jun 2, 2026
5771c17
remove sub attributes results from template search
alexbourret Jun 3, 2026
0ec4212
remove EF templates from template list
alexbourret Jun 3, 2026
870e2c4
refacto: attribute children are no longer in node.children but
Ellana42 Jun 4, 2026
7e3062c
refacto: introduced loaded attributes as the only source of attributes.
Ellana42 Jun 4, 2026
1045af6
cleanup: remove dead config.templates
Ellana42 Jun 4, 2026
0903cae
Merge pull request #112 from dataiku/feature/slim-down-config
Ellana42 Jun 5, 2026
4ee6cc6
fix + refacto: fixed missing refresh path for checkboxes and moved from
Ellana42 Jun 5, 2026
00411f7
Merge pull request #113 from dataiku/chore/summary-type-array
Ellana42 Jun 5, 2026
2b07498
feat: paperclips
Ellana42 Jun 8, 2026
07716f1
fix: don't change tree line size depending on paperclip presence
Ellana42 Jun 8, 2026
76fad04
feat: show breadcrumbs
Ellana42 Jun 8, 2026
0e64ff5
fix: smaller breadcrumbs
Ellana42 Jun 8, 2026
31efd35
Merge pull request #114 from dataiku/feature/paperclips-and-breadcrumbs
Ellana42 Jun 8, 2026
f33cdb4
feat: info icon and tooltip for partial checks
Ellana42 Jun 8, 2026
f347626
feat: selected rows are blue
Ellana42 Jun 8, 2026
c98ea36
feat: only display common attributes
Ellana42 Jun 8, 2026
ccf5dda
fix: cleanup toggle look
Ellana42 Jun 8, 2026
fb963c3
feat: improve styling toggles
Ellana42 Jun 8, 2026
d8a5f59
refacto: move attribute table to separate component
Ellana42 Jun 8, 2026
9117ab7
refacto: render tree and main area in the right order
Ellana42 Jun 8, 2026
e230024
feat: move tooltip partial selection to checkbox
Ellana42 Jun 9, 2026
d4ca9fb
add value_type to get_templates_from_db returns
alexbourret Jun 10, 2026
2d3f825
logs improvement
alexbourret Jun 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -233,3 +233,6 @@ gradle-app.setting
setup.cfg
tests/allure_report
prototypes

# Code editor configuration
.idea/
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [Version 2.0.0-alpha.1](https://github.com/dataiku/dss-plugin-pi-server/releases/tag/v2.0.0-alpha.1) - Feature release - 2026-06-03

- Add a AF hierarchy downloader

## [Version 1.4.2](https://github.com/dataiku/dss-plugin-pi-server/releases/tag/v1.4.2) - Bugfix release - 2026-04-17

- Fix issue with writing single value to static AF attributes
Expand Down
116 changes: 116 additions & 0 deletions custom-recipes/pi-system-af-tree/recipe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"meta": {
"label": "AF tree explorer",
"description": "Explore the AF tree",
"icon": "icon-pi-system icon-cogs",
"iconColor": "yellow"
},
"kind": "PYTHON",
"paramsPythonSetup": "browse_af_tree.py",
"inputRoles": [
],

"outputRoles": [
{
"name": "api_output",
"label": "Attributes dataset",
"description": "",
"arity": "UNARY",
"required": true,
"acceptsDataset": true
}
],
"paramsTemplate" : "pi-system_af-explorer.html",
"paramsModule" : "piSystemTreeApp.module",
"params": [
{
"type": "SEPARATOR",
"label": "Authentication"
},
{
"name": "credentials",
"label": "User preset",
"type": "PRESET",
"parameterSetId": "basic-auth"
},
{
"name": "show_advanced_parameters",
"label": "Show advanced parameters",
"type": "BOOLEAN",
"definition": "",
"defaultValue": false
},
{
"name": "use_server_url_column",
"label": "Use server value per row",
"visibilityCondition": "model.show_advanced_parameters==true && false",
"description": "",
"type": "BOOLEAN",
"defaultValue": false
},
{
"visibilityCondition": "(model.use_server_url_column==true) && (model.show_advanced_parameters==true)",
"name": "server_url_column",
"label": "Server domain columnn",
"description": "Should match the required path for each row",
"type": "COLUMN",
"columnRole": "input_dataset"
},
{
"visibilityCondition": "(model.use_server_url_column==false) && (model.show_advanced_parameters==true)",
"name": "server_url",
"label": "Server URL",
"type": "STRING",
"definition": "https://my_server:8082",
"defaultValue": ""
},
{
"name": "is_ssl_check_disabled",
"label": "Disable SSL check",
"visibilityCondition": "model.show_advanced_parameters==true",
"type": "BOOLEAN",
"definition": "",
"defaultValue": true
},
{
"name": "ssl_cert_path",
"label": "Path to SSL certificate",
"type": "STRING",
"description": "(optional)",
"visibilityCondition": "model.show_advanced_parameters==true && model.is_ssl_check_disabled==false",
"mandatory": false
},
{
"name": "must_convert_object_to_string",
"label": "Convert objects to string",
"visibilityCondition": "model.show_advanced_parameters==true",
"type": "BOOLEAN",
"description": "(for direct output to databases)",
"defaultValue": false
},
{
"name": "is_debug_mode",
"label": "Verbose logging",
"visibilityCondition": "model.show_advanced_parameters==true",
"type": "BOOLEAN",
"description": "",
"defaultValue": false
},
{
"name": "server_name",
"label": "Server name",
"type": "SELECT",
"description": "",
"getChoicesFromPython": true
},
{
"name": "database_name",
"label": "Database name",
"type": "SELECT",
"description": "",
"visibilityCondition": "model.server_name.length>=0",
"getChoicesFromPython": true
}
],
"resourceKeys": []
}
83 changes: 83 additions & 0 deletions custom-recipes/pi-system-af-tree/recipe.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import dataiku
import json
from dataiku.customrecipe import get_recipe_config, get_output_names_for_role
from safe_logger import SafeLogger
from osisoft_plugin_common import (
get_credentials, PerformanceTimer
)
from osisoft_constants import OSIsoftConstants


logger = SafeLogger("pi-system plugin", forbiden_keys=["token", "password"])

logger.info("PIWebAPI AF selector recipe v{}".format(
OSIsoftConstants.PLUGIN_VERSION
))


def get_step_value(item):
if item and "Step" in item:
if item.get("Step") is True:
return "True"
else:
return "False"
return None


def next_tree_item(tree_data):
if not isinstance(tree_data, list):
return
for item in tree_data:
children = item.pop("children", [])
if children:
for child in next_tree_item(children):
yield child
yield item


output_names_stats = get_output_names_for_role('api_output')
config = get_recipe_config()
tree_data = config.get("treeData", [])

logger.info("Initialization with config config={}".format(logger.filter_secrets(config)))

auth_type, username, password, server_url, is_ssl_check_disabled = get_credentials(config)
is_ssl_check_disabled = config.get("is_ssl_check_disabled", False) # Because no advanced parameter switch

network_timer = PerformanceTimer()
processing_timer = PerformanceTimer()
processing_timer.start()

output_dataset = dataiku.Dataset(output_names_stats[0])
schema = [
{'name': 'title', 'type': 'string'},
{'name': 'template_name', 'type': 'string'},
{'name': 'category_names', 'type': 'string'},
{'name': 'path', 'type': 'string'},
{'name': 'paths', 'type': 'string'},
{'name': 'id', 'type': 'string'},
{'name': 'url', 'type': 'string'},
{'name': 'data_type', 'type': 'string'},
{'name': 'summary_type', 'type': 'string'},
{'name': 'boundary_type', 'type': 'string'},
{'name': 'record_boundary_type', 'type': 'string'},
{'name': 'summary_duration', 'type': 'string'},
{'name': 'max_count', 'type': 'int'},
{'name': 'interval', 'type': 'string'},
{'name': 'sync_time', 'type': 'string'},

]
output_dataset.write_schema(schema)

selectedAttributes = config.get("outputSelectedAttributes", [])
with output_dataset.get_writer() as writer:
for item in selectedAttributes:
if item.get("checked", True) is True:
item["category_names"] = json.dumps(item.get("category_names", []))
item["summary_type"] = json.dumps(item.get("summary_type", []))
item["paths"] = json.dumps(item.get("paths", []))
writer.write_row_dict(item)

processing_timer.stop()
logger.info("Overall timer:{}".format(processing_timer.get_report()))
logger.info("Network timer:{}".format(network_timer.get_report()))
2 changes: 1 addition & 1 deletion custom-recipes/pi-system-retrieve-list/recipe.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"name": "use_batch_mode",
"label": "Use batch mode",
"type": "BOOLEAN",
"description": "",
"description": "Use to quickly retrieve small samples from multiple paths. ⚠️Not for large time ranges",
"visibilityCondition": "model.show_advanced_parameters==true",
"defaultValue": false
},
Expand Down
9 changes: 7 additions & 2 deletions custom-recipes/pi-system-retrieve-list/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
get_credentials, get_interpolated_parameters, normalize_af_path,
get_combined_description, get_base_for_data_type, check_debug_mode,
PerformanceTimer, get_max_count, check_must_convert_object_to_string,
convert_schema_objects_to_string, get_summary_parameters, get_advanced_parameters
convert_schema_objects_to_string, get_summary_parameters, get_advanced_parameters,
get_batch_parameters
)
from osisoft_client import OSIsoftClient
from osisoft_constants import OSIsoftConstants
Expand Down Expand Up @@ -63,6 +64,8 @@ def get_step_value(item):
record_boundary_type = config.get("record_boundary_type") if data_type == "RecordedData" else None
summary_type, summary_duration = get_summary_parameters(config)
do_duplicate_input_row = config.get("do_duplicate_input_row", False)
max_request_size, estimated_density, maximum_points_returned = get_batch_parameters(config)
max_time_to_retrieve_per_batch = estimated_density / maximum_points_returned #density per hour <- max time is in hour

network_timer = PerformanceTimer()
processing_timer = PerformanceTimer()
Expand Down Expand Up @@ -150,7 +153,9 @@ def get_step_value(item):
object_id=object_id,
summary_type=summary_type,
summary_duration=summary_duration,
endpoint_type="AF"
endpoint_type="AF",
estimated_density=estimated_density,
maximum_points_returned=maximum_points_returned
)
batch_buffer_size = 0
buffer = []
Expand Down
Loading