Class: OpenC3::TlmViewerConfig

Inherits:
Migration show all
Defined in:
lib/openc3/migrations/20231022000000_tlm_viewer_config.rb

Class Method Summary collapse

Class Method Details

.runObject



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/openc3/migrations/20231022000000_tlm_viewer_config.rb', line 6

def self.run
  ScopeModel.names.each do |scope|
    # Get all existing ToolConfigModels and change keys from tlm_viewer to telemetry_viewer
    names = ToolConfigModel.list_configs('tlm_viewer')
    names.each do |name|
      config = ToolConfigModel.load_config('tlm_viewer', name)
      ToolConfigModel.save_config('telemetry_viewer', name, config)
      ToolConfigModel.delete_config('tlm_viewer', name)
    end
  end
end