Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

activate start time column #54

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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 @@ -125,16 +125,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 @@ -148,17 +148,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 @@ -82,10 +82,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