mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-14 17:14:54 +08:00
Switch to using POST for action toolbar requests [SCI-11522]
This commit is contained in:
parent
94eccb790f
commit
92861d88fb
3 changed files with 14 additions and 13 deletions
|
@ -75,6 +75,7 @@
|
|||
|
||||
<script>
|
||||
import { debounce } from '../shared/debounce.js';
|
||||
import axios from '../../packs/custom_axios.js';
|
||||
|
||||
export default {
|
||||
name: 'ActionToolbar',
|
||||
|
@ -105,8 +106,8 @@ export default {
|
|||
this.debouncedFetchActions = debounce((params) => {
|
||||
this.params = params;
|
||||
|
||||
$.get(`${this.actionsUrl}?${new URLSearchParams(this.params).toString()}`, (data) => {
|
||||
this.actions = data.actions;
|
||||
axios.post(this.actionsUrl, this.params).then((response) => {
|
||||
this.actions = response.data.actions;
|
||||
this.loading = false;
|
||||
this.setButtonOverflow();
|
||||
if (this.actionsLoadedCallback) this.$nextTick(this.actionsLoadedCallback);
|
||||
|
|
|
@ -32,7 +32,7 @@ export default {
|
|||
name: 'ActionToolbar',
|
||||
props: {
|
||||
actionsUrl: { type: String, required: true },
|
||||
actionsMethod: { type: String, default: 'get' },
|
||||
actionsMethod: { type: String, default: 'post' },
|
||||
params: { type: Object },
|
||||
},
|
||||
data() {
|
||||
|
|
|
@ -64,7 +64,7 @@ Rails.application.routes.draw do
|
|||
get :template_tags
|
||||
get :zpl_preview
|
||||
post :sync_fluics_templates
|
||||
get :actions_toolbar
|
||||
post :actions_toolbar
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -202,7 +202,7 @@ Rails.application.routes.draw do
|
|||
defaults: { format: 'json' }
|
||||
get 'create_modal', to: 'repositories#create_modal',
|
||||
defaults: { format: 'json' }
|
||||
get 'actions_toolbar'
|
||||
post 'actions_toolbar'
|
||||
get :list
|
||||
get :rows_list
|
||||
end
|
||||
|
@ -279,7 +279,7 @@ Rails.application.routes.draw do
|
|||
end
|
||||
collection do
|
||||
get :project_contents
|
||||
get 'actions_toolbar'
|
||||
post 'actions_toolbar'
|
||||
end
|
||||
end
|
||||
get 'reports/datatable', to: 'reports#datatable'
|
||||
|
@ -387,7 +387,7 @@ Rails.application.routes.draw do
|
|||
get 'users_filter'
|
||||
post 'archive_group'
|
||||
post 'restore_group'
|
||||
get 'actions_toolbar'
|
||||
post 'actions_toolbar'
|
||||
get :user_roles
|
||||
end
|
||||
end
|
||||
|
@ -412,7 +412,7 @@ Rails.application.routes.draw do
|
|||
get 'inventory_assigning_experiment_filter'
|
||||
get 'clone_modal', action: :clone_modal
|
||||
get 'move_modal', action: :move_modal
|
||||
get 'actions_toolbar'
|
||||
post 'actions_toolbar'
|
||||
get 'move_modal' # return modal with move options
|
||||
post 'move' # move experiment
|
||||
end
|
||||
|
@ -458,7 +458,7 @@ Rails.application.routes.draw do
|
|||
post 'save_table_state', on: :collection, defaults: { format: 'json' }
|
||||
|
||||
collection do
|
||||
get 'actions_toolbar'
|
||||
post 'actions_toolbar'
|
||||
get 'inventory_assigning_my_module_filter'
|
||||
end
|
||||
|
||||
|
@ -703,7 +703,7 @@ Rails.application.routes.draw do
|
|||
post 'protocolsio_import_save', to: 'protocols#protocolsio_import_save'
|
||||
get 'export', to: 'protocols#export'
|
||||
get 'protocolsio', to: 'protocols#protocolsio_index'
|
||||
get 'actions_toolbar', to: 'protocols#actions_toolbar'
|
||||
post 'actions_toolbar', to: 'protocols#actions_toolbar'
|
||||
get 'user_roles', to: 'protocols#user_roles'
|
||||
end
|
||||
end
|
||||
|
@ -769,7 +769,7 @@ Rails.application.routes.draw do
|
|||
end
|
||||
|
||||
collection do
|
||||
get :actions_toolbar
|
||||
post :actions_toolbar
|
||||
end
|
||||
|
||||
resources :repository_row_connections, only: %i(create destroy) do
|
||||
|
@ -839,7 +839,7 @@ Rails.application.routes.draw do
|
|||
|
||||
resources :storage_locations, only: %i(index create destroy update show) do
|
||||
collection do
|
||||
get :actions_toolbar
|
||||
post :actions_toolbar
|
||||
get :tree
|
||||
end
|
||||
member do
|
||||
|
@ -869,7 +869,7 @@ Rails.application.routes.draw do
|
|||
end
|
||||
|
||||
collection do
|
||||
get :actions_toolbar
|
||||
post :actions_toolbar
|
||||
post :archive
|
||||
post :restore
|
||||
get :user_roles
|
||||
|
|
Loading…
Add table
Reference in a new issue