From bd7476051889385c22c9fa9de0ae068ceeee0ab9 Mon Sep 17 00:00:00 2001 From: Jason Thomas Date: Mon, 2 Dec 2024 22:05:40 -0700 Subject: [PATCH 1/2] Allow suites to use import --- .../packages/openc3-cosmos-demo/targets/INST2/lib/helper.py | 2 +- .../openc3-cosmos-demo/targets/INST2/procedures/collect.py | 2 +- .../targets/INST2/procedures/my_script_suite.py | 4 ++++ .../openc3-tool-common/src/tools/admin/tabs/PluginsTab.vue | 1 + openc3-cosmos-script-runner-api/scripts/run_suite_analysis.py | 1 + openc3/python/test/utilities/test_target_file_importer.py | 2 +- 6 files changed, 9 insertions(+), 3 deletions(-) diff --git a/openc3-cosmos-init/plugins/packages/openc3-cosmos-demo/targets/INST2/lib/helper.py b/openc3-cosmos-init/plugins/packages/openc3-cosmos-demo/targets/INST2/lib/helper.py index 3f88ca0147..5e13846abf 100644 --- a/openc3-cosmos-init/plugins/packages/openc3-cosmos-demo/targets/INST2/lib/helper.py +++ b/openc3-cosmos-init/plugins/packages/openc3-cosmos-demo/targets/INST2/lib/helper.py @@ -1,3 +1,3 @@ class Helper: - def help(self): + def print_help(self): print("help") diff --git a/openc3-cosmos-init/plugins/packages/openc3-cosmos-demo/targets/INST2/procedures/collect.py b/openc3-cosmos-init/plugins/packages/openc3-cosmos-demo/targets/INST2/procedures/collect.py index 756002f575..a5042d4ecb 100644 --- a/openc3-cosmos-init/plugins/packages/openc3-cosmos-demo/targets/INST2/procedures/collect.py +++ b/openc3-cosmos-init/plugins/packages/openc3-cosmos-demo/targets/INST2/procedures/collect.py @@ -5,7 +5,7 @@ from INST2.lib.helper import Helper helper = Helper() -helper.help() +helper.print_help() number = ask("Enter a number.") if not isinstance(number, (int, float)): diff --git a/openc3-cosmos-init/plugins/packages/openc3-cosmos-demo/targets/INST2/procedures/my_script_suite.py b/openc3-cosmos-init/plugins/packages/openc3-cosmos-demo/targets/INST2/procedures/my_script_suite.py index c41b5db0d8..832af9bf25 100644 --- a/openc3-cosmos-init/plugins/packages/openc3-cosmos-demo/targets/INST2/procedures/my_script_suite.py +++ b/openc3-cosmos-init/plugins/packages/openc3-cosmos-demo/targets/INST2/procedures/my_script_suite.py @@ -1,6 +1,8 @@ from openc3.script.suite import Group, Suite load_utility("INST2/procedures/utilities/clear.py") +# Load a target file library (not instrumented) +from INST2.lib.helper import Helper class ExampleGroup(Group): @@ -30,6 +32,8 @@ def script_3(self): raise SkipScript def helper(self): + helper = Helper() + helper.print_help() if RunningScript.manual: answer = ask("Are you sure?") else: diff --git a/openc3-cosmos-init/plugins/packages/openc3-tool-common/src/tools/admin/tabs/PluginsTab.vue b/openc3-cosmos-init/plugins/packages/openc3-tool-common/src/tools/admin/tabs/PluginsTab.vue index 99315956d4..0262246f5e 100644 --- a/openc3-cosmos-init/plugins/packages/openc3-tool-common/src/tools/admin/tabs/PluginsTab.vue +++ b/openc3-cosmos-init/plugins/packages/openc3-tool-common/src/tools/admin/tabs/PluginsTab.vue @@ -623,6 +623,7 @@ export default { } .list { background-color: var(--color-background-surface-default) !important; + overflow-x: hidden; } .v-theme--cosmosDark.v-list div:nth-child(odd) .v-list-item { background-color: var(--color-background-base-selected) !important; diff --git a/openc3-cosmos-script-runner-api/scripts/run_suite_analysis.py b/openc3-cosmos-script-runner-api/scripts/run_suite_analysis.py index aab7d84d9f..cb4408f9ff 100644 --- a/openc3-cosmos-script-runner-api/scripts/run_suite_analysis.py +++ b/openc3-cosmos-script-runner-api/scripts/run_suite_analysis.py @@ -20,6 +20,7 @@ from openc3.script.suite_runner import SuiteRunner from openc3.utilities.target_file import TargetFile from openc3.script import * +import openc3.utilities.target_file_importer openc3_scope = sys.argv[1] # argv[0] is the script name path = sys.argv[2] diff --git a/openc3/python/test/utilities/test_target_file_importer.py b/openc3/python/test/utilities/test_target_file_importer.py index b114dece11..ee22caf757 100644 --- a/openc3/python/test/utilities/test_target_file_importer.py +++ b/openc3/python/test/utilities/test_target_file_importer.py @@ -62,4 +62,4 @@ def test_import(self): # from INST2.lib.helper import Helper # helper = Helper() - # self.assertEqual(helper.help(), 42) + # self.assertEqual(helper.print_help(), 42) From 0011e6c67c3402a4e64af0557947152a98c13f09 Mon Sep 17 00:00:00 2001 From: Jason Thomas Date: Tue, 3 Dec 2024 11:01:44 -0700 Subject: [PATCH 2/2] overflow-x: hidden for all admin tabs --- .../openc3-tool-common/src/tools/admin/tabs/InterfacesTab.vue | 1 + .../openc3-tool-common/src/tools/admin/tabs/MicroservicesTab.vue | 1 + .../openc3-tool-common/src/tools/admin/tabs/PackagesTab.vue | 1 + .../openc3-tool-common/src/tools/admin/tabs/RoutersTab.vue | 1 + .../openc3-tool-common/src/tools/admin/tabs/TargetsTab.vue | 1 + .../openc3-tool-common/src/tools/admin/tabs/ToolsTab.vue | 1 + 6 files changed, 6 insertions(+) diff --git a/openc3-cosmos-init/plugins/packages/openc3-tool-common/src/tools/admin/tabs/InterfacesTab.vue b/openc3-cosmos-init/plugins/packages/openc3-tool-common/src/tools/admin/tabs/InterfacesTab.vue index 8f5f620319..128efb2944 100644 --- a/openc3-cosmos-init/plugins/packages/openc3-tool-common/src/tools/admin/tabs/InterfacesTab.vue +++ b/openc3-cosmos-init/plugins/packages/openc3-tool-common/src/tools/admin/tabs/InterfacesTab.vue @@ -91,6 +91,7 @@ export default {