mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-02 11:08:31 +08:00
Further canvas optimizations [SCI-1642]
This commit is contained in:
parent
b26b963e54
commit
6820511ea0
5 changed files with 12 additions and 8 deletions
|
|
@ -77,6 +77,8 @@ class ExperimentsController < ApplicationController
|
|||
|
||||
def canvas
|
||||
@project = @experiment.project
|
||||
@active_modules = @experiment.active_modules
|
||||
.includes(:tags, :inputs, :outputs)
|
||||
current_team_switch(@project.team)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -208,7 +208,8 @@ class Experiment < ActiveRecord::Base
|
|||
end
|
||||
rescue ActiveRecord::ActiveRecordError,
|
||||
ArgumentError,
|
||||
ActiveRecord::RecordNotSaved
|
||||
ActiveRecord::RecordNotSaved => ex
|
||||
logger.error ex.message
|
||||
return false
|
||||
end
|
||||
true
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
</div>
|
||||
|
||||
<div id="canvas-container" data-project-id="<%= @project.id %>">
|
||||
<%= render partial: 'canvas/full_zoom', locals: { experiment: @experiment, my_modules: @experiment.active_modules } %>
|
||||
<%= render partial: 'canvas/full_zoom', locals: { experiment: @experiment, my_modules: @active_modules } %>
|
||||
</div>
|
||||
|
||||
<!-- Manage tags modal -->
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
class AddConnectionsAndSampleTasksIndexes < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :connections, :input_id
|
||||
add_index :connections, :output_id
|
||||
add_index :sample_my_modules, :my_module_id
|
||||
end
|
||||
end
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
class AddIndexesToConnections < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :connections, :input_id
|
||||
add_index :connections, :output_id
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Reference in a new issue