From 355850fba0519bfce75d852082c324e01a4f45e5 Mon Sep 17 00:00:00 2001 From: Andrew Watkins Date: Tue, 4 Oct 2016 12:58:22 -0700 Subject: [PATCH] Implement rename explorations --- ui/src/chronograf/actions/view/index.js | 6 +++--- ui/src/chronograf/reducers/explorers.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/src/chronograf/actions/view/index.js b/ui/src/chronograf/actions/view/index.js index b64b671884..5f6be1c1d0 100644 --- a/ui/src/chronograf/actions/view/index.js +++ b/ui/src/chronograf/actions/view/index.js @@ -194,11 +194,11 @@ export function deleteExplorer(source, explorerURI, push) { }; } -export function editExplorer(clusterID, explorerID, params) { +export function editExplorer(explorerURI, params) { return (dispatch) => { AJAX({ - url: `/api/int/v1/explorers/${explorerID}`, - method: 'PUT', + url: explorerURI, + method: 'PATCH', data: JSON.stringify(params), headers: { 'Content-Type': 'application/json', diff --git a/ui/src/chronograf/reducers/explorers.js b/ui/src/chronograf/reducers/explorers.js index ac9fe46c05..6b78475ed4 100644 --- a/ui/src/chronograf/reducers/explorers.js +++ b/ui/src/chronograf/reducers/explorers.js @@ -34,7 +34,7 @@ export default function explorers(state = {}, action) { case 'EDIT_EXPLORER': { const {explorer} = action.payload; const update = { - [explorer.id]: normalizeExplorer(explorer), + [explorer.link.href]: normalizeExplorer(explorer), }; return u(update, state);