Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
b577ddb
add warning to batch mode
alexbourret Jun 30, 2025
2a81e81
add mx request size selector in preset
alexbourret Jun 30, 2025
5fcd7ba
add batch time limitation to preset
alexbourret Jul 30, 2025
7adfea1
move BatchTimeCounter to commons
alexbourret Aug 4, 2025
938c041
cleaning
alexbourret Aug 4, 2025
efc1c2b
add limiter to recipe
alexbourret Aug 4, 2025
5b9ee8f
cleaning
alexbourret Aug 5, 2025
11be561
cleaning
alexbourret Aug 5, 2025
2337c49
getting time from kwargs
alexbourret Aug 5, 2025
5ca5a62
removing dev log
alexbourret Aug 27, 2025
47c7897
Merge branch 'feature/sc-245546-add-multiple-paths-write' into featur…
alexbourret Sep 22, 2025
b19c0bd
Merge branch 'feature/timerange-limiter' into feature/add-limiter-to-…
alexbourret Sep 22, 2025
96aa549
v1.4.0
alexbourret Sep 22, 2025
04383e9
beta.1
alexbourret Sep 22, 2025
db822e0
update changelog
alexbourret Sep 22, 2025
8c21276
commenting out broken ssl test
alexbourret Sep 22, 2025
ceb6c2b
step 1 - download whole hierarchy
alexbourret Oct 24, 2025
3e2f410
add batch processing to AF hierarchy downloader
alexbourret Oct 27, 2025
11f9efa
preselect the batch mode
alexbourret Nov 13, 2025
9426f33
fixing parent column
alexbourret Nov 19, 2025
45f1282
v1.4.1
alexbourret Nov 26, 2025
0010b3f
update changelog
alexbourret Nov 26, 2025
7f18196
beta 1
alexbourret Nov 26, 2025
e178be9
add tree explorer on recipe
alexbourret Dec 3, 2025
54ad13c
Merge branch 'master' into tests/tree-explorer-on-recipe
alexbourret Dec 11, 2025
e2efc48
first working tree
alexbourret Dec 11, 2025
449ce97
charge servers and databases on the fly
JaneBellaiche Dec 11, 2025
2859c43
check children when parent node is checked
JaneBellaiche Dec 12, 2025
cfb1815
cleaning some tests in the UI
alexbourret Dec 15, 2025
99df49c
sketch of a search function
alexbourret Dec 15, 2025
0bf7530
Adding search option
alexbourret Dec 18, 2025
82156d6
connect tree with osisoft data
JaneBellaiche Dec 18, 2025
352ee94
Merge branch 'tests/tree-explorer-on-recipe' into test/tree-explorer-…
alexbourret Dec 22, 2025
a456e21
insert the result search into existing tree
alexbourret Dec 22, 2025
125f8c7
fix on search
alexbourret Jan 6, 2026
29963d4
display duplicated attributes
alexbourret Jan 6, 2026
700eec6
Edited files
Jan 7, 2026
3c39c7d
Edited files
Jan 7, 2026
c6669e5
save and restore state
JaneBellaiche Jan 7, 2026
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
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
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 1.4.2](https://github.com/dataiku/dss-plugin-pi-server/releases/tag/v1.4.2) - Feature release - 2025-11-26

- Add a AF hierarchy downloader

## [Version 1.4.0](https://github.com/dataiku/dss-plugin-pi-server/releases/tag/v1.3.1) - Bugfix release - 2025-05-24

- Add write recipe
Expand Down
115 changes: 115 additions & 0 deletions custom-recipes/pi-system-af-tree/recipe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{
"meta": {
"label": "AF tree explorer",
"description": "Explore the AF tree",
"icon": "icon-pi-system icon-cogs"
},
"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": []
}
77 changes: 77 additions & 0 deletions custom-recipes/pi-system-af-tree/recipe.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import dataiku
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': 'array'},
{'name': 'boundary_type', 'type': 'string'},
{'name': 'record_boundary_type', 'type': 'string'},
{'name': 'summary_duration', 'type': 'string'},
{'name': 'max_count', 'type': 'int'},

]
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:
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