Skip to content

Commit

Permalink
Merge pull request #54 from jerometerrier/2-activate-use-start-time-c…
Browse files Browse the repository at this point in the history
…olumn

activate start time column
  • Loading branch information
alexbourret authored Feb 4, 2025
2 parents e44bcba + 5099323 commit 2117443
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
12 changes: 6 additions & 6 deletions custom-recipes/pi-system-retrieve-list/recipe.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,16 @@
{
"name": "use_start_time_column",
"label": "Use start time value per row",
"description": "Description here",
"visibilityCondition": "false && (['InterpolatedData', 'RecordedData', 'PlotData', 'EventFrames'].includes(model.data_type))",
"description": "",
"visibilityCondition": "['InterpolatedData', 'RecordedData', 'PlotData', 'EventFrames'].includes(model.data_type)",
"type": "BOOLEAN",
"defaultValue": false
},
{
"visibilityCondition": "model.use_start_time_column==true && (['InterpolatedData', 'RecordedData', 'PlotData', 'EventFrames'].includes(model.data_type))",
"name": "start_time_column",
"label": "Start times' column",
"description": "Optional",
"description": "Column type must be string",
"type": "COLUMN",
"columnRole": "input_dataset"
},
Expand All @@ -154,17 +154,17 @@
},
{
"name": "use_end_time_column",
"label": "Use start time value per row",
"label": "Use end time value per row",
"description": "",
"visibilityCondition": "false && (['InterpolatedData', 'RecordedData', 'PlotData', 'EventFrames'].includes(model.data_type))",
"visibilityCondition": "['InterpolatedData', 'RecordedData', 'PlotData', 'EventFrames'].includes(model.data_type)",
"type": "BOOLEAN",
"defaultValue": false
},
{
"visibilityCondition": "model.use_end_time_column==true && (['InterpolatedData', 'RecordedData', 'PlotData', 'EventFrames'].includes(model.data_type))",
"name": "end_time_column",
"label": "End times' column",
"description": "Optional",
"description": "Column type must be string",
"type": "COLUMN",
"columnRole": "input_dataset"
},
Expand Down
6 changes: 2 additions & 4 deletions custom-recipes/pi-system-retrieve-list/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,8 @@
# make sure all OSIsoft time string format are evaluated at the same time
# rather than at every request, at least for start / end times set in the UI
time_not_parsed = False
if not use_start_time_column:
start_time = client.parse_pi_time(start_time)
if not use_end_time_column:
end_time = client.parse_pi_time(end_time)
start_time = client.parse_pi_time(start_time)
end_time = client.parse_pi_time(end_time)
sync_time = client.parse_pi_time(sync_time)

object_id = input_parameters_row.get(path_column)
Expand Down

0 comments on commit 2117443

Please sign in to comment.