Skip to content

Commit 1184eba

Browse files
committed
Update for widget/dashboard time ranges for update_dashboard.sh
1 parent d655502 commit 1184eba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

recipes/update_dashboard.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ DASHBOARD_ID=$2
1010
SINCE=${3:-${DEFAULT_SINCE}}
1111
UNTIL=${4:-${DEFAULT_UNTIL}}
1212

13+
# Fix ADQL queries and set startTime and endTime for dashboard or widget specific time ranges
14+
JSON=$(../act.sh -E ${ENVIRONMENT} dashboard get -i ${DASHBOARD_ID} | sed -e "s/SINCE[[:space:]]*[0-9]*[[:space:]]*UNTIL[[:space:]]*[0-9]*/SINCE ${SINCE} UNTIL ${UNTIL}/g" | sed -e "s/\"\startTime\"\([[:space:]]*\):[^,]*,/\"startTime\"\1: ${SINCE},/g" | sed -e "s/\"\endTime\"\([[:space:]]*\):[^,]*,/\"endTime\"\1: ${UNTIL},/g")
1315

14-
JSON=$(../act.sh -E ${ENVIRONMENT} dashboard get -i ${DASHBOARD_ID} | sed -e "s/SINCE[[:space:]]*[0-9]*[[:space:]]*UNTIL[[:space:]]*[0-9]*/SINCE ${SINCE} UNTIL ${UNTIL}/g")
1516

1617
../act.sh -E ${ENVIRONMENT} dashboard update -d "${JSON}"

0 commit comments

Comments
 (0)