openc3 5.20.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/openc3cli +12 -120
- data/data/config/command_modifiers.yaml +13 -1
- data/data/config/interface_modifiers.yaml +21 -4
- data/data/config/item_modifiers.yaml +1 -1
- data/data/config/microservice.yaml +15 -2
- data/data/config/param_item_modifiers.yaml +1 -1
- data/data/config/parameter_modifiers.yaml +1 -1
- data/data/config/table_manager.yaml +2 -2
- data/data/config/target.yaml +11 -0
- data/data/config/telemetry_modifiers.yaml +17 -1
- data/data/config/tool.yaml +12 -0
- data/data/config/widgets.yaml +13 -17
- data/lib/openc3/accessors/form_accessor.rb +4 -3
- data/lib/openc3/accessors/html_accessor.rb +3 -3
- data/lib/openc3/accessors/http_accessor.rb +13 -13
- data/lib/openc3/accessors/xml_accessor.rb +16 -4
- data/lib/openc3/api/target_api.rb +0 -30
- data/lib/openc3/config/config_parser.rb +6 -3
- data/lib/openc3/core_ext/array.rb +0 -16
- data/lib/openc3/core_ext.rb +0 -1
- data/lib/openc3/interfaces/file_interface.rb +198 -0
- data/lib/openc3/interfaces/http_client_interface.rb +71 -39
- data/lib/openc3/interfaces/http_server_interface.rb +0 -7
- data/lib/openc3/interfaces/interface.rb +2 -0
- data/lib/openc3/interfaces/mqtt_interface.rb +32 -15
- data/lib/openc3/interfaces/mqtt_stream_interface.rb +19 -4
- data/lib/openc3/interfaces/protocols/crc_protocol.rb +7 -0
- data/lib/openc3/interfaces/serial_interface.rb +1 -0
- data/lib/openc3/interfaces.rb +2 -4
- data/lib/openc3/microservices/multi_microservice.rb +3 -3
- data/lib/openc3/migrations/20241208080000_no_critical_cmd.rb +31 -0
- data/lib/openc3/migrations/20241208080001_no_trigger_group.rb +46 -0
- data/lib/openc3/models/interface_model.rb +9 -3
- data/lib/openc3/models/microservice_model.rb +8 -1
- data/lib/openc3/models/plugin_model.rb +6 -1
- data/lib/openc3/models/python_package_model.rb +6 -1
- data/lib/openc3/models/reaction_model.rb +14 -10
- data/lib/openc3/models/scope_model.rb +60 -42
- data/lib/openc3/models/target_model.rb +17 -1
- data/lib/openc3/models/timeline_model.rb +17 -5
- data/lib/openc3/models/tool_model.rb +15 -3
- data/lib/openc3/models/trigger_group_model.rb +6 -3
- data/lib/openc3/operators/microservice_operator.rb +8 -0
- data/lib/openc3/packets/commands.rb +17 -6
- data/lib/openc3/packets/limits.rb +0 -12
- data/lib/openc3/packets/packet.rb +1 -1
- data/lib/openc3/packets/packet_item.rb +30 -36
- data/lib/openc3/packets/structure_item.rb +2 -2
- data/lib/openc3/script/script.rb +0 -10
- data/lib/openc3/script/web_socket_api.rb +2 -2
- data/lib/openc3/streams/mqtt_stream.rb +41 -33
- data/lib/openc3/streams/serial_stream.rb +27 -27
- data/lib/openc3/streams/stream.rb +17 -17
- data/lib/openc3/streams/tcpip_client_stream.rb +1 -1
- data/lib/openc3/streams/tcpip_socket_stream.rb +19 -19
- data/lib/openc3/system/system.rb +1 -1
- data/lib/openc3/system.rb +2 -3
- data/lib/openc3/tools/table_manager/table.rb +2 -2
- data/lib/openc3/tools/table_manager/table_parser.rb +1 -1
- data/lib/openc3/top_level.rb +0 -5
- data/lib/openc3/topics/command_decom_topic.rb +0 -7
- data/lib/openc3/utilities/bucket_utilities.rb +1 -1
- data/lib/openc3/utilities/cli_generator.rb +0 -1
- data/lib/openc3/version.rb +6 -6
- data/templates/plugin/README.md +1 -1
- data/templates/target/targets/TARGET/lib/target.rb +1 -1
- data/templates/tool_angular/package.json +8 -8
- data/templates/tool_angular/src/app/app.component.html +4 -13
- data/templates/tool_angular/src/app/app.component.scss +5 -13
- data/templates/tool_angular/src/app/app.component.ts +5 -4
- data/templates/tool_angular/src/app/custom-overlay-container.ts +2 -2
- data/templates/tool_angular/src/app/openc3-api.d.ts +1 -1
- data/templates/tool_angular/src/main.single-spa.ts +1 -1
- data/templates/tool_react/package.json +1 -0
- data/templates/tool_react/src/root.component.js +1 -1
- data/templates/tool_svelte/package.json +11 -9
- data/templates/tool_svelte/rollup.config.js +2 -0
- data/templates/tool_svelte/src/App.svelte +2 -2
- data/templates/tool_vue/eslint.config.mjs +68 -0
- data/templates/tool_vue/jsconfig.json +1 -1
- data/templates/tool_vue/package.json +26 -43
- data/templates/tool_vue/src/App.vue +3 -5
- data/templates/tool_vue/src/main.js +12 -23
- data/templates/tool_vue/src/router.js +19 -18
- data/templates/tool_vue/src/tools/tool_name/tool_name.vue +2 -2
- data/templates/tool_vue/vite.config.js +52 -0
- data/templates/widget/package.json +19 -26
- data/templates/widget/src/Widget.vue +13 -15
- data/templates/widget/vite.config.js +26 -0
- metadata +10 -41
- data/lib/openc3/core_ext/hash.rb +0 -40
- data/lib/openc3/core_ext/httpclient.rb +0 -11
- data/lib/openc3/interfaces/linc_interface.rb +0 -480
- data/lib/openc3/interfaces/protocols/override_protocol.rb +0 -4
- data/lib/openc3/microservices/critical_cmd_microservice.rb +0 -74
- data/lib/openc3/microservices/reaction_microservice.rb +0 -607
- data/lib/openc3/microservices/timeline_microservice.rb +0 -398
- data/lib/openc3/microservices/trigger_group_microservice.rb +0 -698
- data/lib/openc3/migrations/20230615000000_autonomic.rb +0 -86
- data/lib/openc3/migrations/20240915000000_activity_uuid.rb +0 -28
- data/lib/openc3/migrations/20241016000000_scope_critical_cmd.rb +0 -24
- data/lib/openc3/system/system_config.rb +0 -413
- data/templates/tool_svelte/src/services/api.js +0 -92
- data/templates/tool_svelte/src/services/axios.js +0 -85
- data/templates/tool_svelte/src/services/cable.js +0 -65
- data/templates/tool_svelte/src/services/config-parser.js +0 -198
- data/templates/tool_svelte/src/services/openc3-api.js +0 -606
- data/templates/tool_vue/.eslintrc.js +0 -43
- data/templates/tool_vue/babel.config.json +0 -11
- data/templates/tool_vue/vue.config.js +0 -38
- data/templates/widget/.eslintrc.js +0 -43
- data/templates/widget/babel.config.json +0 -11
- data/templates/widget/vue.config.js +0 -28
- /data/templates/tool_vue/{.prettierrc.js → .prettierrc.cjs} +0 -0
- /data/templates/widget/{.prettierrc.js → .prettierrc.cjs} +0 -0
|
@@ -3,24 +3,16 @@
|
|
|
3
3
|
@include mat.core();
|
|
4
4
|
|
|
5
5
|
// Define a dark theme
|
|
6
|
-
$dark-theme: mat.define-dark-theme((
|
|
6
|
+
$dark-theme: mat.m2-define-dark-theme((
|
|
7
7
|
color: (
|
|
8
|
-
primary: mat.define-palette(mat.$blue-palette),
|
|
9
|
-
accent: mat.define-palette(mat.$blue-grey-palette),
|
|
8
|
+
primary: mat.m2-define-palette(mat.$m2-blue-palette),
|
|
9
|
+
accent: mat.m2-define-palette(mat.$m2-blue-grey-palette),
|
|
10
10
|
),
|
|
11
11
|
// Only include `typography` and `density` in the default dark theme.
|
|
12
|
-
typography: mat.define-typography-config(),
|
|
12
|
+
typography: mat.m2-define-typography-config(),
|
|
13
13
|
density: 0,
|
|
14
14
|
));
|
|
15
15
|
|
|
16
|
-
// Define a light theme
|
|
17
|
-
$light-theme: mat.define-light-theme((
|
|
18
|
-
color: (
|
|
19
|
-
primary: mat.define-palette(mat.$indigo-palette),
|
|
20
|
-
accent: mat.define-palette(mat.$pink-palette),
|
|
21
|
-
),
|
|
22
|
-
));
|
|
23
|
-
|
|
24
16
|
// Apply the dark theme by default
|
|
25
17
|
@include mat.core-theme($dark-theme);
|
|
26
|
-
@include mat.button-theme($dark-theme);
|
|
18
|
+
@include mat.button-theme($dark-theme);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component, ViewChild, AfterViewInit, OnDestroy } from '@angular/core';
|
|
2
2
|
import {CdkPortal, DomPortalOutlet} from '@angular/cdk/portal';
|
|
3
|
-
import { OpenC3Api } from "@openc3/
|
|
3
|
+
import { OpenC3Api } from "@openc3/js-common/services";
|
|
4
4
|
|
|
5
5
|
@Component({
|
|
6
6
|
selector: 'openc3-tool-<%= tool_name %>-root',
|
|
@@ -23,7 +23,7 @@ export class AppComponent implements AfterViewInit, OnDestroy {
|
|
|
23
23
|
if (elem) {
|
|
24
24
|
return elem
|
|
25
25
|
} else {
|
|
26
|
-
return
|
|
26
|
+
return document.createElement('span')
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
ngAfterViewInit(): void {
|
|
@@ -34,11 +34,12 @@ export class AppComponent implements AfterViewInit, OnDestroy {
|
|
|
34
34
|
document.title = "<%= tool_name_display %>";
|
|
35
35
|
let tool = document.querySelector('#openc3-tool');
|
|
36
36
|
if (tool == null) {
|
|
37
|
-
tool =
|
|
37
|
+
tool = document.createElement('div')
|
|
38
38
|
}
|
|
39
39
|
let overlay = document.querySelector('.cdk-overlay-container');
|
|
40
40
|
if (overlay == null) {
|
|
41
|
-
overlay =
|
|
41
|
+
overlay = document.createElement('div')
|
|
42
|
+
overlay.classList.add('cdk-overlay-container');
|
|
42
43
|
}
|
|
43
44
|
// Move stuff
|
|
44
45
|
tool.append(overlay);
|
|
@@ -9,9 +9,9 @@ export class AppOverlayContainer extends OverlayContainer {
|
|
|
9
9
|
|
|
10
10
|
let elem = document.querySelector('#openc3-tool');
|
|
11
11
|
if (!elem) {
|
|
12
|
-
elem =
|
|
12
|
+
elem = document.createElement('div')
|
|
13
13
|
}
|
|
14
14
|
elem.appendChild(container);
|
|
15
15
|
this._containerElement = container;
|
|
16
16
|
}
|
|
17
|
-
}
|
|
17
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
declare module '@openc3/
|
|
1
|
+
declare module '@openc3/js-common/services';
|
|
@@ -5,7 +5,7 @@ import Card from "@mui/material/Card";
|
|
|
5
5
|
import CardContent from "@mui/material/CardContent";
|
|
6
6
|
import Menu from "@mui/material/Menu";
|
|
7
7
|
import MenuItem from "@mui/material/MenuItem";
|
|
8
|
-
import { OpenC3Api } from "@openc3/
|
|
8
|
+
import { OpenC3Api } from "@openc3/js-common/services";
|
|
9
9
|
|
|
10
10
|
export default function Root(props) {
|
|
11
11
|
const [anchorEl, setAnchorEl] = React.useState();
|
|
@@ -11,13 +11,14 @@
|
|
|
11
11
|
"smui-theme": "smui-theme compile build/smui.css -i src/theme"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@astrouxds/astro-web-components": "7.24.0",
|
|
15
|
-
"@openc3/
|
|
16
|
-
"@smui/button": "^7.0.0
|
|
17
|
-
"@smui/
|
|
18
|
-
"@smui/
|
|
19
|
-
"@smui/
|
|
20
|
-
"
|
|
14
|
+
"@astrouxds/astro-web-components": "^7.24.0",
|
|
15
|
+
"@openc3/js-common": "6.0.0",
|
|
16
|
+
"@smui/button": "^7.0.0",
|
|
17
|
+
"@smui/common": "^7.0.0",
|
|
18
|
+
"@smui/card": "^7.0.0",
|
|
19
|
+
"@smui/list": "^7.0.0",
|
|
20
|
+
"@smui/menu": "^7.0.0",
|
|
21
|
+
"axios": "^1.7.7",
|
|
21
22
|
"single-spa-svelte": "^2.1.1",
|
|
22
23
|
"sirv-cli": "^2.0.2",
|
|
23
24
|
"svelte-portal": "^2.2.0"
|
|
@@ -40,8 +41,9 @@
|
|
|
40
41
|
"rollup-plugin-postcss": "^4.0.2",
|
|
41
42
|
"rollup-plugin-svelte": "^7.1.6",
|
|
42
43
|
"rollup-plugin-terser": "^7.0.2",
|
|
43
|
-
"smui-theme": "^7.0.0
|
|
44
|
+
"smui-theme": "^7.0.0",
|
|
44
45
|
"svelte": "^4.2.19",
|
|
45
46
|
"svelte-jester": "^5.0.0"
|
|
46
|
-
}
|
|
47
|
+
},
|
|
48
|
+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
47
49
|
}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
import List, { Item, Separator, Text } from '@smui/list';
|
|
28
28
|
import Button, { Label } from '@smui/button';
|
|
29
29
|
import Card from '@smui/card';
|
|
30
|
-
import { OpenC3Api } from
|
|
30
|
+
import { OpenC3Api } from '@openc3/js-common/services';
|
|
31
31
|
|
|
32
32
|
let menu;
|
|
33
33
|
|
|
@@ -39,4 +39,4 @@
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
document.title = "<%= tool_name_display %>";
|
|
42
|
-
</script>
|
|
42
|
+
</script>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import prettier from 'eslint-plugin-prettier'
|
|
2
|
+
import globals from 'globals'
|
|
3
|
+
import parser from 'vue-eslint-parser'
|
|
4
|
+
import path from 'node:path'
|
|
5
|
+
import { fileURLToPath } from 'node:url'
|
|
6
|
+
import js from '@eslint/js'
|
|
7
|
+
import { FlatCompat } from '@eslint/eslintrc'
|
|
8
|
+
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
10
|
+
const __dirname = path.dirname(__filename)
|
|
11
|
+
const compat = new FlatCompat({
|
|
12
|
+
baseDirectory: __dirname,
|
|
13
|
+
recommendedConfig: js.configs.recommended,
|
|
14
|
+
allConfig: js.configs.all,
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
export default [
|
|
18
|
+
...compat.extends(
|
|
19
|
+
'plugin:vue/vue3-essential',
|
|
20
|
+
'plugin:prettier/recommended',
|
|
21
|
+
'@vue/prettier',
|
|
22
|
+
),
|
|
23
|
+
{
|
|
24
|
+
plugins: {
|
|
25
|
+
prettier,
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
languageOptions: {
|
|
29
|
+
globals: {
|
|
30
|
+
...globals.node,
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
parser: parser,
|
|
34
|
+
ecmaVersion: 2022,
|
|
35
|
+
sourceType: 'module',
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
rules: {
|
|
39
|
+
'no-console': 'error',
|
|
40
|
+
'no-debugger': 'error',
|
|
41
|
+
|
|
42
|
+
'prettier/prettier': [
|
|
43
|
+
'warn',
|
|
44
|
+
{
|
|
45
|
+
endOfLine: 'auto',
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
|
|
49
|
+
'vue/multi-word-component-names': 'off',
|
|
50
|
+
|
|
51
|
+
'vue/valid-v-slot': [
|
|
52
|
+
'error',
|
|
53
|
+
{
|
|
54
|
+
allowModifiers: true,
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
files: ['**/__tests__/*.{j,t}s?(x)', '**/tests/unit/**/*.spec.{j,t}s?(x)'],
|
|
61
|
+
|
|
62
|
+
languageOptions: {
|
|
63
|
+
globals: {
|
|
64
|
+
...globals.jest,
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
]
|
|
@@ -1,53 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%= tool_name %>",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"private": true,
|
|
5
|
+
"type": "module",
|
|
5
6
|
"scripts": {
|
|
6
|
-
"serve": "
|
|
7
|
-
"build": "
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"serve:standalone": "vue-cli-service serve --mode standalone",
|
|
11
|
-
"test:components": "vue-cli-service test:components"
|
|
7
|
+
"serve": "vite build --watch --mode dev-server",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"lint": "eslint src",
|
|
10
|
+
"serve:standalone": "vite preview --mode standalone"
|
|
12
11
|
},
|
|
13
12
|
"dependencies": {
|
|
14
|
-
"@
|
|
15
|
-
"@
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"vue": "2.7.16",
|
|
23
|
-
"vue-router": "3.5.3",
|
|
24
|
-
"vuetify": "2.7.1",
|
|
25
|
-
"vuex": "3.6.2"
|
|
13
|
+
"@astrouxds/astro-web-components": "^7.24.0",
|
|
14
|
+
"@openc3/js-common": "6.0.0",
|
|
15
|
+
"@openc3/vue-common": "6.0.0",
|
|
16
|
+
"axios": "^1.7.7",
|
|
17
|
+
"date-fns": "^4.1.0",
|
|
18
|
+
"lodash": "^4.17.21",
|
|
19
|
+
"single-spa-vue": "^3.0.0",
|
|
20
|
+
"sprintf-js": "^1.1.3"
|
|
26
21
|
},
|
|
27
22
|
"devDependencies": {
|
|
28
|
-
"@
|
|
29
|
-
"@vue/
|
|
30
|
-
"@vue/
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"eslint": "8.56.0",
|
|
41
|
-
"eslint-config-prettier": "9.1.0",
|
|
42
|
-
"eslint-plugin-prettier": "5.2.1",
|
|
43
|
-
"eslint-plugin-vue": "9.30.0",
|
|
44
|
-
"html-webpack-plugin": "^5.6.0",
|
|
45
|
-
"prettier": "3.3.3",
|
|
46
|
-
"sass": "1.80.4",
|
|
47
|
-
"sass-loader": "16.0.2",
|
|
48
|
-
"vue-cli-plugin-single-spa": "3.3.0",
|
|
49
|
-
"vue-cli-plugin-vuetify": "2.5.8",
|
|
50
|
-
"vue-template-compiler": "2.7.16",
|
|
51
|
-
"webpack": "5.95.0"
|
|
23
|
+
"@vitejs/plugin-vue": "^5.1.5",
|
|
24
|
+
"@vue/eslint-config-prettier": "^9.0.0",
|
|
25
|
+
"@vue/test-utils": "^2.4.6",
|
|
26
|
+
"eslint": "^9.16.0",
|
|
27
|
+
"eslint-config-prettier": "^9.1.0",
|
|
28
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
29
|
+
"eslint-plugin-vue": "^9.30.0",
|
|
30
|
+
"prettier": "^3.3.3",
|
|
31
|
+
"sass": "^1.80.4",
|
|
32
|
+
"vite": "^5.4.11",
|
|
33
|
+
"vue": "^3.5.13",
|
|
34
|
+
"vue-eslint-parser": "^9.4.3"
|
|
52
35
|
}
|
|
53
36
|
}
|
|
@@ -1,36 +1,25 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import Vue from 'vue'
|
|
1
|
+
import { createApp, h } from 'vue'
|
|
3
2
|
import singleSpaVue from 'single-spa-vue'
|
|
4
3
|
|
|
5
4
|
import App from './App.vue'
|
|
6
5
|
import router from './router'
|
|
7
|
-
import store from '@openc3/
|
|
8
|
-
|
|
9
|
-
Vue.config.productionTip = false
|
|
10
|
-
|
|
11
|
-
import '@openc3/tool-common/src/assets/stylesheets/layout/layout.scss'
|
|
12
|
-
import vuetify from '@openc3/tool-common/src/plugins/vuetify'
|
|
13
|
-
import Dialog from '@openc3/tool-common/src/plugins/dialog'
|
|
14
|
-
import PortalVue from 'portal-vue'
|
|
15
|
-
import Notify from '@openc3/tool-common/src/plugins/notify'
|
|
16
|
-
|
|
17
|
-
Vue.use(PortalVue)
|
|
18
|
-
Vue.use(Dialog)
|
|
19
|
-
Vue.use(Notify, { store })
|
|
6
|
+
import { Dialog, Notify, store, vuetify } from '@openc3/vue-common/plugins'
|
|
20
7
|
|
|
21
8
|
const vueLifecycles = singleSpaVue({
|
|
22
|
-
|
|
9
|
+
createApp,
|
|
23
10
|
appOptions: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
vuetify,
|
|
27
|
-
render(h) {
|
|
28
|
-
return h(App, {
|
|
29
|
-
props: {},
|
|
30
|
-
})
|
|
11
|
+
render() {
|
|
12
|
+
return h(App, {})
|
|
31
13
|
},
|
|
32
14
|
el: '#openc3-tool',
|
|
33
15
|
},
|
|
16
|
+
handleInstance: (app) => {
|
|
17
|
+
app.use(router)
|
|
18
|
+
app.use(store)
|
|
19
|
+
app.use(vuetify)
|
|
20
|
+
app.use(Dialog)
|
|
21
|
+
app.use(Notify, { store })
|
|
22
|
+
},
|
|
34
23
|
})
|
|
35
24
|
|
|
36
25
|
export const bootstrap = vueLifecycles.bootstrap
|
|
@@ -6,24 +6,25 @@
|
|
|
6
6
|
# if purchased from OpenC3, Inc.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import { createRouter, createWebHistory } from 'vue-router'
|
|
10
|
+
import { prependBasePath } from '@openc3/js-common/utils'
|
|
11
|
+
import { NotFound } from '@openc3/vue-common/components'
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
const routes = [
|
|
14
|
+
{
|
|
15
|
+
path: '/',
|
|
16
|
+
name: 'jruby',
|
|
17
|
+
component: () => import('./tools/<%= tool_name %>/<%= tool_name %>.vue'),
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
path: '/:pathMatch(.*)*',
|
|
21
|
+
name: 'NotFound',
|
|
22
|
+
component: NotFound,
|
|
23
|
+
},
|
|
24
|
+
]
|
|
25
|
+
routes.forEach(prependBasePath)
|
|
13
26
|
|
|
14
|
-
export default
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
routes: [
|
|
18
|
-
{
|
|
19
|
-
path: '/',
|
|
20
|
-
name: '<%= tool_name %>',
|
|
21
|
-
component: () => import('./tools/<%= tool_name %>/<%= tool_name %>.vue'),
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
path: '*',
|
|
25
|
-
name: 'NotFound',
|
|
26
|
-
component: () => import('@openc3/tool-common/src/components/NotFound'),
|
|
27
|
-
},
|
|
28
|
-
],
|
|
27
|
+
export default createRouter({
|
|
28
|
+
history: createWebHistory(),
|
|
29
|
+
routes,
|
|
29
30
|
})
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<script>
|
|
22
|
-
import { OpenC3Api } from '@openc3/
|
|
23
|
-
import TopBar from '@openc3/
|
|
22
|
+
import { OpenC3Api } from '@openc3/js-common/services'
|
|
23
|
+
import { TopBar } from '@openc3/vue-common/components'
|
|
24
24
|
|
|
25
25
|
export default {
|
|
26
26
|
components: {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { resolve } from 'path'
|
|
2
|
+
import { defineConfig } from 'vite'
|
|
3
|
+
import vue from '@vitejs/plugin-vue'
|
|
4
|
+
import { devServerPlugin } from '@openc3/js-common/viteDevServerPlugin'
|
|
5
|
+
|
|
6
|
+
const DEFAULT_EXTENSIONS = ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json']
|
|
7
|
+
|
|
8
|
+
export default defineConfig((options) => {
|
|
9
|
+
return {
|
|
10
|
+
build: {
|
|
11
|
+
outDir: 'tools/<%= tool_name %>',
|
|
12
|
+
emptyOutDir: true,
|
|
13
|
+
rollupOptions: {
|
|
14
|
+
input: 'src/main.js',
|
|
15
|
+
output: {
|
|
16
|
+
format: 'systemjs',
|
|
17
|
+
hashCharacters: 'hex',
|
|
18
|
+
entryFileNames: '[name].js',
|
|
19
|
+
chunkFileNames: '[name]-[hash:20].js',
|
|
20
|
+
assetFileNames: 'assets/[name]-[hash][extname]',
|
|
21
|
+
},
|
|
22
|
+
external: ['single-spa', 'vue', 'vuex', 'vue-router', 'vuetify'],
|
|
23
|
+
preserveEntrySignatures: 'strict',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
server: {
|
|
27
|
+
port: 2999,
|
|
28
|
+
},
|
|
29
|
+
plugins: [
|
|
30
|
+
vue({
|
|
31
|
+
template: {
|
|
32
|
+
compilerOptions: {
|
|
33
|
+
isCustomElement: (tag) => tag.startsWith('rux-'),
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
}),
|
|
37
|
+
devServerPlugin(options),
|
|
38
|
+
],
|
|
39
|
+
resolve: {
|
|
40
|
+
alias: {
|
|
41
|
+
'@': resolve(__dirname, './src'),
|
|
42
|
+
},
|
|
43
|
+
extensions: [...DEFAULT_EXTENSIONS, '.vue'], // not recommended but saves us from having to change every SFC import
|
|
44
|
+
},
|
|
45
|
+
define: {
|
|
46
|
+
__BASE_URL__: JSON.stringify('/tools/<%= tool_name %>'),
|
|
47
|
+
},
|
|
48
|
+
optimizeDeps: {
|
|
49
|
+
entries: [], // https://github.com/vituum/vituum/issues/25#issuecomment-1690080284
|
|
50
|
+
},
|
|
51
|
+
}
|
|
52
|
+
})
|
|
@@ -1,35 +1,28 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"version": "
|
|
2
|
+
"name": "<%= widget_name %>",
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"private": true,
|
|
5
|
+
"type": "module",
|
|
5
6
|
"scripts": {
|
|
6
|
-
"build": "
|
|
7
|
+
"build": "vite build"
|
|
7
8
|
},
|
|
8
9
|
"dependencies": {
|
|
9
|
-
"@astrouxds/astro-web-components": "7.24.0",
|
|
10
|
-
"vue": "
|
|
11
|
-
"vuetify": "
|
|
10
|
+
"@astrouxds/astro-web-components": "^7.24.0",
|
|
11
|
+
"@openc3/vue-common": "6.0.0",
|
|
12
|
+
"vuetify": "^3.7.1"
|
|
12
13
|
},
|
|
13
14
|
"devDependencies": {
|
|
14
|
-
"@
|
|
15
|
-
"@
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"eslint-
|
|
26
|
-
"eslint-plugin-prettier": "5.2.1",
|
|
27
|
-
"eslint-plugin-vue": "9.30.0",
|
|
28
|
-
"prettier": "3.3.3",
|
|
29
|
-
"sass": "1.80.4",
|
|
30
|
-
"sass-loader": "16.0.2",
|
|
31
|
-
"vue-cli-plugin-vuetify": "2.5.8",
|
|
32
|
-
"vue-template-compiler": "2.7.16",
|
|
33
|
-
"webpack": "5.95.0"
|
|
15
|
+
"@vitejs/plugin-vue": "^5.1.5",
|
|
16
|
+
"@vue/eslint-config-prettier": "^9.0.0",
|
|
17
|
+
"eslint": "^9.16.0",
|
|
18
|
+
"eslint-config-prettier": "^9.1.0",
|
|
19
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
20
|
+
"eslint-plugin-vue": "^9.30.0",
|
|
21
|
+
"prettier": "^3.3.3",
|
|
22
|
+
"sass": "^1.80.4",
|
|
23
|
+
"vite": "^5.4.11",
|
|
24
|
+
"vue": "^3.5.13",
|
|
25
|
+
"vite-plugin-style-inject": "^0.0.1",
|
|
26
|
+
"vue-eslint-parser": "^9.4.3"
|
|
34
27
|
}
|
|
35
28
|
}
|
|
@@ -8,25 +8,23 @@
|
|
|
8
8
|
|
|
9
9
|
<template>
|
|
10
10
|
<div class="value-widget-container">
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
/>
|
|
24
|
-
</template>
|
|
11
|
+
<v-text-field
|
|
12
|
+
variant="solo"
|
|
13
|
+
density="compact"
|
|
14
|
+
readonly
|
|
15
|
+
single-line
|
|
16
|
+
hide-no-data
|
|
17
|
+
hide-details
|
|
18
|
+
:value="_value"
|
|
19
|
+
:class="valueClass"
|
|
20
|
+
:style="computedStyle"
|
|
21
|
+
data-test="value"
|
|
22
|
+
/>
|
|
25
23
|
</div>
|
|
26
24
|
</template>
|
|
27
25
|
|
|
28
26
|
<script>
|
|
29
|
-
import VWidget from '@openc3/
|
|
27
|
+
import { VWidget } from '@openc3/vue-common/widgets'
|
|
30
28
|
|
|
31
29
|
export default {
|
|
32
30
|
mixins: [VWidget],
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import VitePluginStyleInject from 'vite-plugin-style-inject'
|
|
3
|
+
import vue from '@vitejs/plugin-vue'
|
|
4
|
+
|
|
5
|
+
const DEFAULT_EXTENSIONS = ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json']
|
|
6
|
+
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
build: {
|
|
9
|
+
outDir: 'tools/widgets/<%= widget_name %>',
|
|
10
|
+
emptyOutDir: true,
|
|
11
|
+
sourcemap: true,
|
|
12
|
+
lib: {
|
|
13
|
+
entry: './src/<%= widget_name %>.vue',
|
|
14
|
+
name: '<%= widget_name %>',
|
|
15
|
+
fileName: (format, entryName) => `${entryName}.${format}.min.js`,
|
|
16
|
+
formats: ['umd'],
|
|
17
|
+
},
|
|
18
|
+
rollupOptions: {
|
|
19
|
+
external: ['vue', 'vuetify'],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
plugins: [vue(), VitePluginStyleInject()],
|
|
23
|
+
resolve: {
|
|
24
|
+
extensions: [...DEFAULT_EXTENSIONS, '.vue'], // not recommended but saves us from having to change every SFC import
|
|
25
|
+
},
|
|
26
|
+
})
|