diff --git a/client/package.json b/client/package.json index 7f3ac4610ed..04561397485 100644 --- a/client/package.json +++ b/client/package.json @@ -74,11 +74,11 @@ "underscore": "^1.10.2", "underscore.string": "^3.3.5", "vue": "^2.6.11", - "vuedraggable": "2.24.1", "vue-infinite-scroll": "^2.0.2", "vue-multiselect": "^2.1.0", "vue-router": "^3.3.1", "vue-rx": "^6.2.0", + "vuedraggable": "2.24.1", "vueisotope": "^3.1.2", "vuex": "^3.4.0", "vuex-cache": "^3.2.0", diff --git a/client/src/components/DataDialog/DataDialog.vue b/client/src/components/DataDialog/DataDialog.vue index f1b498fcde5..a123cda6429 100644 --- a/client/src/components/DataDialog/DataDialog.vue +++ b/client/src/components/DataDialog/DataDialog.vue @@ -49,7 +49,7 @@ import { UrlTracker } from "./utilities"; import { Model } from "./model"; import { Services } from "./services"; import { getAppRoot } from "onload/loadConfig"; -import { mountUploadModal } from "components/Upload"; +import { openUploadModal } from "components/Upload"; Vue.use(BootstrapVue); @@ -135,7 +135,7 @@ export default { callback: this.callback, modalShow: true, }; - mountUploadModal(propsData); + openUploadModal(propsData); this.modalShow = false; }, /** Called when selection is complete, values are formatted and parsed to external callback **/ diff --git a/client/src/components/DebouncedInput.js b/client/src/components/DebouncedInput.js index dd3e1cba62f..03a4ee9de5f 100644 --- a/client/src/components/DebouncedInput.js +++ b/client/src/components/DebouncedInput.js @@ -2,15 +2,9 @@ * Renderless component, used to debounce various types of form inputs */ -import Vue from "vue"; -import VueRx from "vue-rx"; import { filter, debounceTime, distinctUntilChanged, finalize } from "rxjs/operators"; -import { vueRxShortcuts } from "./plugins"; - -Vue.use(VueRx); export default { - mixins: [vueRxShortcuts], props: { value: { required: true }, delay: { type: Number, required: false, default: 500 }, diff --git a/client/src/components/History/ContentItem/CollectionContentItem.js b/client/src/components/History/ContentItem/CollectionContentItem.js index e88605af117..efa92a9083a 100644 --- a/client/src/components/History/ContentItem/CollectionContentItem.js +++ b/client/src/components/History/ContentItem/CollectionContentItem.js @@ -5,12 +5,6 @@ export default { computed: { contentItemComponent() { - if (this.item === null) { - return "Loading"; - } - if (this.scrolling) { - return "Placeholder"; - } const { history_content_type } = this.item; switch (history_content_type) { case "dataset": diff --git a/client/src/components/History/ContentItem/ContentItem.js b/client/src/components/History/ContentItem/ContentItem.js index afe62bf8e10..0adfea54b42 100644 --- a/client/src/components/History/ContentItem/ContentItem.js +++ b/client/src/components/History/ContentItem/ContentItem.js @@ -11,22 +11,17 @@ import Placeholder from "./Placeholder"; import Dataset from "./Dataset"; import DatasetCollection from "./DatasetCollection"; +// import SubDataset from "./SubDataset"; import Subcollection from "./Subcollection"; export default { - inject: ["listState", "isSelected", "isExpanded", "setSelected", "setExpanded"], - template: ` + + + + diff --git a/client/src/components/History/ContentItem/Dataset/DatasetMenu.vue b/client/src/components/History/ContentItem/Dataset/DatasetMenu.vue index bc96b65eba6..3982752bf4a 100644 --- a/client/src/components/History/ContentItem/Dataset/DatasetMenu.vue +++ b/client/src/components/History/ContentItem/Dataset/DatasetMenu.vue @@ -72,6 +72,14 @@ icon="fas fa-file-download" /> + +
import { mapGetters } from "vuex"; -import { Dataset } from "../../model"; +import { Dataset, STATES } from "../../model"; import { PriorityMenu, PriorityMenuItem } from "components/PriorityMenu"; -import { legacyNavigationMixin } from "components/plugins"; +import { legacyNavigationMixin } from "components/plugins/legacyNavigation"; export default { - inject: ["STATES"], mixins: [legacyNavigationMixin], components: { @@ -156,6 +163,11 @@ export default { }; }, + created() { + // make available to template + this.STATES = STATES; + }, + computed: { ...mapGetters("user", ["currentUser"]), ...mapGetters("config", ["config"]), @@ -168,10 +180,10 @@ export default { if (this.dataset.purged) { return "Cannot display datasets removed from disk"; } - if (this.dataset.state == this.STATES.UPLOAD) { + if (this.dataset.state == STATES.UPLOAD) { return "This dataset must finish uploading before it can be viewed"; } - if (this.dataset.state == this.STATES.NEW) { + if (this.dataset.state == STATES.NEW) { return "This dataset is not yet viewable"; } return "View data"; @@ -184,7 +196,7 @@ export default { if (this.dataset.purged) { return "Cannot edit attributes of datasets removed from disk"; } - const unreadyStates = new Set([this.STATES.UPLOAD, this.STATES.NEW]); + const unreadyStates = new Set([STATES.UPLOAD, STATES.NEW]); if (unreadyStates.has(this.dataset.state)) { return "This dataset is not yet editable"; } @@ -206,7 +218,7 @@ export default { if (!this.dataset.hasData) { return false; } - const okStates = new Set([this.STATES.OK, this.STATES.FAILED_METADATA, this.STATES.ERROR]); + const okStates = new Set([STATES.OK, STATES.FAILED_METADATA, STATES.ERROR]); return okStates.has(this.dataset.state); }, @@ -261,9 +273,8 @@ export default { }, onDeleteClick() { - const eventName = this.dataset.deleted ? "undeleteDataset" : "deleteDataset"; - // console.log("emitting", eventName, this.dataset); - this.$emit(eventName, this.dataset); + const eventName = this.dataset.deleted ? "undelete" : "delete"; + this.$emit(eventName); }, }, }; diff --git a/client/src/components/History/ContentItem/Dataset/DatasetUI.vue b/client/src/components/History/ContentItem/Dataset/DatasetUI.vue index 8314d8c6d92..36c2da3b28e 100644 --- a/client/src/components/History/ContentItem/Dataset/DatasetUI.vue +++ b/client/src/components/History/ContentItem/Dataset/DatasetUI.vue @@ -14,6 +14,7 @@ either through the props, and make updates through the events --> @keydown.arrow-right.self.stop="$emit('update:expanded', true)" @keydown.space.self.stop.prevent="$emit('update:selected', !selected)" > +
@@ -46,25 +46,30 @@ either through the props, and make updates through the events --> {{ dataset.hid }} {{ dataset.title }} - - + + + + +
+ +
+ +
- - - + +
+ +
@@ -102,20 +108,16 @@ either through the props, and make updates through the events --> diff --git a/client/src/components/History/ContentItem/DatasetCollection/DatasetCollection.vue b/client/src/components/History/ContentItem/DatasetCollection/DatasetCollection.vue new file mode 100644 index 00000000000..86e54a534df --- /dev/null +++ b/client/src/components/History/ContentItem/DatasetCollection/DatasetCollection.vue @@ -0,0 +1,57 @@ + + + diff --git a/client/src/components/History/ContentItem/DatasetCollection/DscMenu.vue b/client/src/components/History/ContentItem/DatasetCollection/DscMenu.vue index 6a52cc1a6e1..fbe90484749 100644 --- a/client/src/components/History/ContentItem/DatasetCollection/DscMenu.vue +++ b/client/src/components/History/ContentItem/DatasetCollection/DscMenu.vue @@ -5,13 +5,13 @@ Delete Collection - Delete Collection Only + Delete Collection Only - + Delete Contained Datasets - + Purge Contained Datasets diff --git a/client/src/components/History/ContentItem/DatasetCollection/DscUI.vue b/client/src/components/History/ContentItem/DatasetCollection/DscUI.vue index 57a6cd1966b..25393e98d18 100644 --- a/client/src/components/History/ContentItem/DatasetCollection/DscUI.vue +++ b/client/src/components/History/ContentItem/DatasetCollection/DscUI.vue @@ -6,12 +6,9 @@ class="dataset dataset-collection collapsed" :class="{ selected }" :data-state="dsc.state" - @keydown.arrow-right.self.stop="$emit('select-collection', dsc)" + @keydown.arrow-right.self.stop="$emit('viewCollection')" @keydown.space.self.stop.prevent="$emit('update:selected', !selected)" - @click.stop=" - $emit('select-collection', dsc); - $emit('update:expanded', dsc); - " + @click.stop="$emit('viewCollection')" > + +
+ +
+ -
No summary
@@ -71,27 +75,20 @@ import { DatasetCollection } from "../../model/DatasetCollection"; import { StatusIcon, StateBtn } from "../../StatusIcon"; import JobStateProgress from "./JobStateProgress"; import DscMenu from "./DscMenu"; +import { Nametag } from "components/Nametags"; export default { - inject: ["listState", "STATES"], components: { StatusIcon, StateBtn, JobStateProgress, DscMenu, + Nametag, }, props: { dsc: { type: DatasetCollection, required: true }, selected: { type: Boolean, required: false, default: false }, - showHid: { type: Boolean, required: false, default: true }, - }, - computed: { - counter() { - return this.showHid ? this.dsc.hid : ""; - }, - showSelection() { - return this.listState.showSelection; - }, + showSelection: { type: Boolean, required: false, default: false }, }, methods: { onStatusClick() { diff --git a/client/src/components/History/ContentItem/DatasetCollection/index.js b/client/src/components/History/ContentItem/DatasetCollection/index.js new file mode 100644 index 00000000000..4d7f796c22b --- /dev/null +++ b/client/src/components/History/ContentItem/DatasetCollection/index.js @@ -0,0 +1,6 @@ +import DatasetCollection from "./DatasetCollection"; + +export { default as DscUI } from "./DscUI"; +export { default as DscMenu } from "./DscMenu"; +export { default as JobStateProgress } from "./JobStateProgress"; +export default DatasetCollection; diff --git a/client/src/components/History/ContentItem/DatasetCollection/index.vue b/client/src/components/History/ContentItem/DatasetCollection/index.vue deleted file mode 100644 index 49d4758c5d3..00000000000 --- a/client/src/components/History/ContentItem/DatasetCollection/index.vue +++ /dev/null @@ -1,67 +0,0 @@ - - - diff --git a/client/src/components/History/ContentItem/HistoryContentItem.js b/client/src/components/History/ContentItem/HistoryContentItem.js index fe65f664934..c6d8c6632dc 100644 --- a/client/src/components/History/ContentItem/HistoryContentItem.js +++ b/client/src/components/History/ContentItem/HistoryContentItem.js @@ -7,10 +7,6 @@ export default { contentItemComponent() { if (this.item.id === undefined) { return "Placeholder"; - // return "Loading"; - } - if (this.scrolling) { - return "Placeholder"; } const { history_content_type } = this.item; switch (history_content_type) { diff --git a/client/src/components/History/ContentItem/Subcollection.vue b/client/src/components/History/ContentItem/Subcollection.vue index fbef360ddfe..d17a8f6b5a0 100644 --- a/client/src/components/History/ContentItem/Subcollection.vue +++ b/client/src/components/History/ContentItem/Subcollection.vue @@ -7,12 +7,10 @@ v-on="$listeners" class="collapsed" :data-state="state" - @keydown.arrow-right.self.stop.prevent="$emit('select-collection', dsc)" + @keydown.arrow-right.self.stop.prevent="$emit('viewCollection')" + @click.stop="$emit('viewCollection')" > -