From d375f4bfcc0413e8552ac84c8caa0f6dfef5d1eb Mon Sep 17 00:00:00 2001 From: Palak Bhojani Date: Tue, 25 Jun 2019 11:30:05 -0700 Subject: [PATCH 1/2] Add the ability to update a task token --- ui/src/tasks/actions/index.ts | 9 +++++++-- ui/src/tasks/components/TaskTokenDropdown.tsx | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ui/src/tasks/actions/index.ts b/ui/src/tasks/actions/index.ts index 56a0a3a12c..c8d71102cf 100644 --- a/ui/src/tasks/actions/index.ts +++ b/ui/src/tasks/actions/index.ts @@ -394,13 +394,18 @@ export const cancel = () => async dispatch => { export const updateScript = () => async (dispatch, getState: GetStateFunc) => { try { const { - tasks: {currentScript: script, currentTask: task, taskOptions}, + tasks: {currentScript: script, currentTask: task, taskOptions, taskToken}, } = getState() - const updatedTask: Partial & {name: string; flux: string} = { + const updatedTask: Partial & { + name: string + flux: string + token: string + } = { flux: script, name: taskOptions.name, offset: taskOptions.offset, + token: taskToken.token, } if (taskOptions.taskScheduleType === TaskSchedule.interval) { diff --git a/ui/src/tasks/components/TaskTokenDropdown.tsx b/ui/src/tasks/components/TaskTokenDropdown.tsx index a540567d71..e196e47ae2 100644 --- a/ui/src/tasks/components/TaskTokenDropdown.tsx +++ b/ui/src/tasks/components/TaskTokenDropdown.tsx @@ -26,7 +26,7 @@ export default class TaskTokenDropdown extends PureComponent { > {tokens.map(t => ( - {t.description} + {t.description || 'Name this token'} ))} From 5d4799d868f72d6344585266d80e1aa240351e0a Mon Sep 17 00:00:00 2001 From: Palak Bhojani Date: Tue, 25 Jun 2019 11:39:26 -0700 Subject: [PATCH 2/2] Update changelog for updating a task token --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4286d0fb9a..f332452567 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ 1. [14130](https://github.com/influxdata/influxdb/pull/14130): Add static templates for system, docker, redis, kubernetes 1. [14189] (https://github.com/influxdata/influxdb/pull/14189): Add option to select a token when creating a task +1. [14200] (https://github.com/influxdata/influxdb/pull/14200): Add the ability to update a token when updating a task ## v2.0.0-alpha.12 [2019-06-13]