From e0baa033277875de7a363eb0e7cfff9d33fbea0b Mon Sep 17 00:00:00 2001 From: John Davis Date: Sun, 18 Feb 2024 15:39:32 -0500 Subject: [PATCH] Delete file added during forward merge of 23.1 --- client/src/store/historyStore/datasetStore.js | 58 ------------------- 1 file changed, 58 deletions(-) delete mode 100644 client/src/store/historyStore/datasetStore.js diff --git a/client/src/store/historyStore/datasetStore.js b/client/src/store/historyStore/datasetStore.js deleted file mode 100644 index 5df5072179a7..000000000000 --- a/client/src/store/historyStore/datasetStore.js +++ /dev/null @@ -1,58 +0,0 @@ -import Vue from "vue"; -import { urlData } from "utils/url"; - -const state = { - items: {}, -}; - -const getters = { - getDataset: - (state) => - ({ id }) => { - return state.items[id] || { hid: 0, name: "Wait..." }; - }, -}; - -const actions = { - fetchDataset: async ({ state, commit }, { id }) => { - if (!state.items[id]) { - const url = `/api/datasets/${id}`; - const dataset = await urlData({ url }); - commit("saveDataset", { id, dataset }); - } - }, -}; - -const mutations = { - /** - * Adds a new dataset. - * @param {Array} dataset as returned by the datasets api (detailed serialization) - */ - saveDataset: (state, { id, dataset }) => { - Vue.set(state.items, id, dataset); - }, - /** - * Updates existing datasets. This is called by the history changed items store. - * @param {Array} payload as returned by the history contents api (detailed serialization) - */ - saveDatasets: (state, { payload }) => { - payload.forEach((item) => { - if (item.history_content_type == "dataset") { - const id = item.id; - if (state.items[id]) { - const localItem = state.items[id]; - Object.keys(item).forEach((key) => { - localItem[key] = item[key]; - }); - } - } - }); - }, -}; - -export const datasetStore = { - state, - getters, - actions, - mutations, -};