Sha256: d984749b4414f57954c00fa954418062a2a038a6a7f016d3a868f7fbcce51002

Contents?: true

Size: 676 Bytes

Versions: 14

Compression:

Stored size: 676 Bytes

Contents

require 'openc3/utilities/migration'
require 'openc3/models/tool_config_model'

module OpenC3
  class TlmViewerConfig < Migration
    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
  end
end

unless ENV['OPENC3_NO_MIGRATE']
  OpenC3::TlmViewerConfig.run
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
openc3-5.20.0 lib/openc3/migrations/20231022000000_tlm_viewer_config.rb
openc3-5.19.0 lib/openc3/migrations/20231022000000_tlm_viewer_config.rb
openc3-5.18.0 lib/openc3/migrations/20231022000000_tlm_viewer_config.rb
openc3-5.17.1 lib/openc3/migrations/20231022000000_tlm_viewer_config.rb
openc3-5.17.0 lib/openc3/migrations/20231022000000_tlm_viewer_config.rb
openc3-5.16.0 lib/openc3/migrations/20231022000000_tlm_viewer_config.rb
openc3-5.15.2 lib/openc3/migrations/20231022000000_tlm_viewer_config.rb
openc3-5.15.1 lib/openc3/migrations/20231022000000_tlm_viewer_config.rb
openc3-5.15.0 lib/openc3/migrations/20231022000000_tlm_viewer_config.rb
openc3-5.14.2 lib/openc3/migrations/20231022000000_tlm_viewer_config.rb
openc3-5.14.1 lib/openc3/migrations/20231022000000_tlm_viewer_config.rb
openc3-5.14.0 lib/openc3/migrations/20231022000000_tlm_viewer_config.rb
openc3-5.13.0 lib/openc3/migrations/20231022000000_tlm_viewer_config.rb
openc3-5.12.0 lib/openc3/migrations/20231022000000_tlm_viewer_config.rb