Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
>
<template #item="{ item: plugin }">
<plugin-list-item
:key="plugin.name"
v-bind="plugin"
:targets="pluginTargets(plugin.name)"
:is-modified="isModified(plugin.name)"
Expand Down
3 changes: 3 additions & 0 deletions openc3/lib/openc3/utilities/local_mode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ def self.sync_tool_config()
end

def self.save_tool_config(scope, tool, name, data)
return unless ENV['OPENC3_LOCAL_MODE'] and Dir.exist?(OPENC3_LOCAL_MODE_PATH)
json = JSON.parse(data, allow_nan: true, create_additions: true)
config_path = "#{OPENC3_LOCAL_MODE_PATH}/#{scope}/tool_config/#{tool}/#{name}.json"
return unless File.expand_path(config_path).start_with?(OPENC3_LOCAL_MODE_PATH)
Expand All @@ -460,6 +461,7 @@ def self.save_tool_config(scope, tool, name, data)
end

def self.delete_tool_config(scope, tool, name)
return unless ENV['OPENC3_LOCAL_MODE'] and Dir.exist?(OPENC3_LOCAL_MODE_PATH)
config_path = "#{OPENC3_LOCAL_MODE_PATH}/#{scope}/tool_config/#{tool}/#{name}.json"
return unless File.expand_path(config_path).start_with?(OPENC3_LOCAL_MODE_PATH)
FileUtils.rm_f(config_path)
Expand All @@ -479,6 +481,7 @@ def self.sync_settings()
end

def self.save_setting(scope, name, data)
return unless ENV['OPENC3_LOCAL_MODE'] and Dir.exist?(OPENC3_LOCAL_MODE_PATH)
config_path = "#{OPENC3_LOCAL_MODE_PATH}/#{scope}/settings/#{name}.json"
return unless File.expand_path(config_path).start_with?(OPENC3_LOCAL_MODE_PATH)
FileUtils.mkdir_p(File.dirname(config_path))
Expand Down
Loading