mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
Fix dataset list operation to switch between histories
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import store from "store";
|
||||
import { getAppRoot } from "onload/loadConfig";
|
||||
import { getGalaxyInstance } from "app";
|
||||
import { Services } from "./services";
|
||||
@@ -147,16 +148,13 @@ export default {
|
||||
this.onError(error);
|
||||
});
|
||||
},
|
||||
onShowDataset(item) {
|
||||
const Galaxy = getGalaxyInstance();
|
||||
this.services
|
||||
.setHistory(item.history_id)
|
||||
.then(() => {
|
||||
Galaxy.currHistoryPanel.loadCurrentHistory();
|
||||
})
|
||||
.catch((error) => {
|
||||
this.onError(error);
|
||||
});
|
||||
async onShowDataset(item) {
|
||||
const historyId = item.history_id;
|
||||
try {
|
||||
await store.dispatch("history/setCurrentHistory", historyId);
|
||||
} catch (error) {
|
||||
this.onError(error);
|
||||
}
|
||||
},
|
||||
onTags(tags, index) {
|
||||
const item = this.rows[index];
|
||||
|
||||
@@ -45,16 +45,6 @@ export class Services {
|
||||
}
|
||||
}
|
||||
|
||||
async setHistory(id) {
|
||||
const url = `${this.root}history/set_as_current?id=${id}`;
|
||||
try {
|
||||
const response = await axios.get(url);
|
||||
return response.data;
|
||||
} catch (e) {
|
||||
this._errorMessage(e);
|
||||
}
|
||||
}
|
||||
|
||||
async updateTags(item_id, item_class, item_tags) {
|
||||
const url = `${this.root}api/tags`;
|
||||
try {
|
||||
|
||||
@@ -153,7 +153,7 @@ const actions = {
|
||||
},
|
||||
async setCurrentHistory({ dispatch, getters }, id) {
|
||||
const changedHistory = await setCurrentHistoryOnServer(id);
|
||||
dispatch("selectHistory", changedHistory);
|
||||
return dispatch("selectHistory", changedHistory);
|
||||
},
|
||||
setHistory({ commit }, history) {
|
||||
commit("setHistory", history);
|
||||
|
||||
Reference in New Issue
Block a user