diff --git a/client/src/components/History/CurrentHistory/HistoryCounter.vue b/client/src/components/History/CurrentHistory/HistoryCounter.vue index 5c3a4d8a22c5..30ef239cf236 100644 --- a/client/src/components/History/CurrentHistory/HistoryCounter.vue +++ b/client/src/components/History/CurrentHistory/HistoryCounter.vue @@ -20,11 +20,11 @@ @click="showPreferredObjectStoreModal = true"> - - + - @@ -91,15 +90,14 @@ import prettyBytes from "pretty-bytes"; import { formatDistanceToNowStrict } from "date-fns"; import { usesDetailedHistoryMixin } from "./usesDetailedHistoryMixin.js"; import CurrentUser from "components/providers/CurrentUser"; -import HistoryTargetPreferredObjectStorePopover from "./HistoryTargetPreferredObjectStorePopover"; -import HistorySelectPreferredObjectStore from "./HistorySelectPreferredObjectStore"; -import { getAppRoot } from "onload/loadConfig"; +import PreferredStorePopover from "./PreferredStorePopover"; +import SelectPreferredStore from "./SelectPreferredStore"; export default { components: { CurrentUser, - HistoryTargetPreferredObjectStorePopover, - HistorySelectPreferredObjectStore, + PreferredStorePopover, + SelectPreferredStore, }, filters: { niceFileSize(rawSize = 0) { @@ -119,7 +117,6 @@ export default { reloadButtonVariant: "link", showPreferredObjectStoreModal: false, historyPreferredObjectStoreId: this.history.preferred_object_store_id, - root: getAppRoot(), }; }, mounted() { diff --git a/client/src/components/History/CurrentHistory/HistoryTargetPreferredObjectStorePopover.vue b/client/src/components/History/CurrentHistory/PreferredStorePopover.vue similarity index 98% rename from client/src/components/History/CurrentHistory/HistoryTargetPreferredObjectStorePopover.vue rename to client/src/components/History/CurrentHistory/PreferredStorePopover.vue index a3f047f539d7..45374721179c 100644 --- a/client/src/components/History/CurrentHistory/HistoryTargetPreferredObjectStorePopover.vue +++ b/client/src/components/History/CurrentHistory/PreferredStorePopover.vue @@ -32,6 +32,7 @@ export default { }, historyPreferredObjectStoreId: { type: String, + default: null, }, user: { type: Object, required: true }, }, diff --git a/client/src/components/History/CurrentHistory/HistorySelectPreferredObjectStore.test.js b/client/src/components/History/CurrentHistory/SelectPreferredStore.test.js similarity index 88% rename from client/src/components/History/CurrentHistory/HistorySelectPreferredObjectStore.test.js rename to client/src/components/History/CurrentHistory/SelectPreferredStore.test.js index a02300ce0d50..14f50f81ba67 100644 --- a/client/src/components/History/CurrentHistory/HistorySelectPreferredObjectStore.test.js +++ b/client/src/components/History/CurrentHistory/SelectPreferredStore.test.js @@ -1,13 +1,12 @@ import { mount } from "@vue/test-utils"; import { getLocalVue } from "tests/jest/helpers"; -import HistorySelectPreferredObjectStore from "./HistorySelectPreferredObjectStore"; +import SelectPreferredStore from "./SelectPreferredStore"; import axios from "axios"; import MockAdapter from "axios-mock-adapter"; import flushPromises from "flush-promises"; const localVue = getLocalVue(true); -const TEST_ROOT = "/"; const TEST_HISTORY_ID = "myTestHistoryId"; const TEST_HISTORY = { @@ -16,8 +15,8 @@ const TEST_HISTORY = { }; function mountComponent() { - const wrapper = mount(HistorySelectPreferredObjectStore, { - propsData: { userPreferredObjectStoreId: null, history: TEST_HISTORY, root: TEST_ROOT }, + const wrapper = mount(SelectPreferredStore, { + propsData: { userPreferredObjectStoreId: null, history: TEST_HISTORY }, localVue, }); return wrapper; @@ -30,7 +29,7 @@ const OBJECT_STORES = [ { object_store_id: "object_store_2", badges: [], quota: { enabled: false } }, ]; -describe("HistorySelectPreferredObjectStore.vue", () => { +describe("SelectPreferredStore.vue", () => { let axiosMock; beforeEach(async () => { diff --git a/client/src/components/History/CurrentHistory/HistorySelectPreferredObjectStore.vue b/client/src/components/History/CurrentHistory/SelectPreferredStore.vue similarity index 92% rename from client/src/components/History/CurrentHistory/HistorySelectPreferredObjectStore.vue rename to client/src/components/History/CurrentHistory/SelectPreferredStore.vue index 622329363faf..6cf49f4f0801 100644 --- a/client/src/components/History/CurrentHistory/HistorySelectPreferredObjectStore.vue +++ b/client/src/components/History/CurrentHistory/SelectPreferredStore.vue @@ -1,6 +1,5 @@