Skip to content

Commit

Permalink
Update for widget/dashboard time ranges for update_dashboard.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
svrnm committed Mar 26, 2019
1 parent d655502 commit 1184eba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion recipes/update_dashboard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ DASHBOARD_ID=$2
SINCE=${3:-${DEFAULT_SINCE}}
UNTIL=${4:-${DEFAULT_UNTIL}}

# Fix ADQL queries and set startTime and endTime for dashboard or widget specific time ranges
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")

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")

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

0 comments on commit 1184eba

Please sign in to comment.