openc3 5.8.1 → 5.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/openc3/ext/crc/crc.c +1 -1
- data/lib/openc3/api/cmd_api.rb +1 -1
- data/lib/openc3/microservices/decom_microservice.rb +10 -2
- data/lib/openc3/microservices/reaction_microservice.rb +152 -81
- data/lib/openc3/microservices/timeline_microservice.rb +1 -1
- data/lib/openc3/microservices/trigger_group_microservice.rb +188 -118
- data/lib/openc3/migrations/20230615000000_autonomic.rb +86 -0
- data/lib/openc3/models/activity_model.rb +2 -4
- data/lib/openc3/models/microservice_model.rb +6 -2
- data/lib/openc3/models/model.rb +1 -3
- data/lib/openc3/models/reaction_model.rb +124 -119
- data/lib/openc3/models/scope_model.rb +15 -3
- data/lib/openc3/models/timeline_model.rb +1 -3
- data/lib/openc3/models/trigger_group_model.rb +16 -50
- data/lib/openc3/models/trigger_model.rb +86 -123
- data/lib/openc3/packets/json_packet.rb +2 -3
- data/lib/openc3/script/commands.rb +10 -0
- data/lib/openc3/script/script.rb +1 -0
- data/lib/openc3/top_level.rb +0 -12
- data/lib/openc3/utilities/authorization.rb +1 -1
- data/lib/openc3/utilities/bucket_require.rb +5 -1
- data/lib/openc3/utilities/bucket_utilities.rb +4 -1
- data/lib/openc3/utilities/cli_generator.rb +56 -4
- data/lib/openc3/utilities/ruby_lex_utils.rb +4 -0
- data/lib/openc3/version.rb +6 -6
- data/templates/plugin/README.md +54 -4
- data/templates/plugin/Rakefile +31 -3
- data/templates/tool_angular/.editorconfig +16 -0
- data/templates/tool_angular/.gitignore +44 -0
- data/templates/tool_angular/.vscode/extensions.json +4 -0
- data/templates/tool_angular/.vscode/launch.json +20 -0
- data/templates/tool_angular/.vscode/tasks.json +42 -0
- data/templates/tool_angular/angular.json +111 -0
- data/templates/tool_angular/extra-webpack.config.js +8 -0
- data/templates/tool_angular/package.json +47 -0
- data/templates/tool_angular/src/app/app-routing.module.ts +15 -0
- data/templates/tool_angular/src/app/app.component.html +31 -0
- data/templates/tool_angular/src/app/app.component.scss +26 -0
- data/templates/tool_angular/src/app/app.component.spec.ts +29 -0
- data/templates/tool_angular/src/app/app.component.ts +51 -0
- data/templates/tool_angular/src/app/app.module.ts +30 -0
- data/templates/tool_angular/src/app/custom-overlay-container.ts +17 -0
- data/templates/tool_angular/src/app/empty-route/empty-route.component.ts +7 -0
- data/templates/tool_angular/src/app/openc3-api.d.ts +1 -0
- data/templates/tool_angular/src/assets/.gitkeep +0 -0
- data/templates/tool_angular/src/environments/environment.prod.ts +3 -0
- data/templates/tool_angular/src/environments/environment.ts +16 -0
- data/templates/tool_angular/src/favicon.ico +0 -0
- data/templates/tool_angular/src/index.html +13 -0
- data/templates/tool_angular/src/main.single-spa.ts +40 -0
- data/templates/tool_angular/src/single-spa/asset-url.ts +12 -0
- data/templates/tool_angular/src/single-spa/single-spa-props.ts +8 -0
- data/templates/tool_angular/src/styles.scss +1 -0
- data/templates/tool_angular/tsconfig.app.json +13 -0
- data/templates/tool_angular/tsconfig.json +33 -0
- data/templates/tool_angular/tsconfig.spec.json +14 -0
- data/templates/tool_angular/yarn.lock +8080 -0
- data/templates/tool_react/.eslintrc +7 -0
- data/templates/tool_react/.gitignore +72 -0
- data/templates/tool_react/.prettierignore +8 -0
- data/templates/tool_react/babel.config.json +29 -0
- data/templates/tool_react/jest.config.js +12 -0
- data/templates/tool_react/package.json +53 -0
- data/templates/tool_react/src/openc3-tool_name.js +24 -0
- data/templates/tool_react/src/root.component.js +88 -0
- data/templates/tool_react/src/root.component.test.js +9 -0
- data/templates/tool_react/webpack.config.js +27 -0
- data/templates/tool_react/yarn.lock +6854 -0
- data/templates/tool_svelte/.gitignore +72 -0
- data/templates/tool_svelte/.prettierignore +8 -0
- data/templates/tool_svelte/babel.config.js +12 -0
- data/templates/tool_svelte/build/smui.css +5 -0
- data/templates/tool_svelte/jest.config.js +9 -0
- data/templates/tool_svelte/package.json +46 -0
- data/templates/tool_svelte/rollup.config.js +72 -0
- data/templates/tool_svelte/src/App.svelte +42 -0
- data/templates/tool_svelte/src/App.test.js +9 -0
- data/templates/tool_svelte/src/services/api.js +92 -0
- data/templates/tool_svelte/src/services/axios.js +85 -0
- data/templates/tool_svelte/src/services/cable.js +65 -0
- data/templates/tool_svelte/src/services/config-parser.js +199 -0
- data/templates/tool_svelte/src/services/openc3-api.js +647 -0
- data/templates/tool_svelte/src/theme/_smui-theme.scss +25 -0
- data/templates/tool_svelte/src/tool_name.js +17 -0
- data/templates/tool_svelte/yarn.lock +5052 -0
- data/templates/tool_vue/.browserslistrc +16 -0
- data/templates/tool_vue/.env.standalone +1 -0
- data/templates/tool_vue/.eslintrc.js +43 -0
- data/templates/tool_vue/.gitignore +2 -0
- data/templates/tool_vue/.nycrc +3 -0
- data/templates/tool_vue/.prettierrc.js +5 -0
- data/templates/tool_vue/babel.config.json +11 -0
- data/templates/tool_vue/jsconfig.json +6 -0
- data/templates/tool_vue/package.json +52 -0
- data/templates/tool_vue/src/App.vue +15 -0
- data/templates/tool_vue/src/main.js +38 -0
- data/templates/tool_vue/src/router.js +29 -0
- data/templates/tool_vue/src/tools/tool_name/tool_name.vue +63 -0
- data/templates/tool_vue/vue.config.js +30 -0
- data/templates/tool_vue/yarn.lock +9145 -0
- data/templates/widget/package.json +9 -9
- data/templates/widget/yarn.lock +77 -73
- metadata +76 -2
@@ -0,0 +1,16 @@
|
|
1
|
+
> 0.2%
|
2
|
+
# Chome 80 is circa Feb 2020
|
3
|
+
# See https://en.wikipedia.org/wiki/Google_Chrome_version_history
|
4
|
+
chrome >= 80
|
5
|
+
# Edge 80 is circa Jan 2020
|
6
|
+
# See https://docs.microsoft.com/en-us/deployedge/microsoft-edge-relnote-archive-stable-channel
|
7
|
+
edge >= 80
|
8
|
+
# Firefox ESR is extended support release
|
9
|
+
firefox ESR
|
10
|
+
# Safari 13.1 released Mar 24, 2020
|
11
|
+
# See https://en.wikipedia.org/wiki/Safari_version_history
|
12
|
+
safari >= 13.1
|
13
|
+
not dead
|
14
|
+
not ie 11
|
15
|
+
# Opera mini doesn't have built-in support for ES6
|
16
|
+
not op_mini all
|
@@ -0,0 +1 @@
|
|
1
|
+
STANDALONE_SINGLE_SPA=true
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module.exports = {
|
2
|
+
root: true,
|
3
|
+
env: {
|
4
|
+
node: true,
|
5
|
+
},
|
6
|
+
extends: [
|
7
|
+
'plugin:vue/essential',
|
8
|
+
'plugin:prettier/recommended',
|
9
|
+
'@vue/prettier',
|
10
|
+
],
|
11
|
+
plugins: ['prettier'],
|
12
|
+
rules: {
|
13
|
+
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
14
|
+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
15
|
+
'prettier/prettier': [
|
16
|
+
'warn',
|
17
|
+
{
|
18
|
+
endOfLine: 'auto',
|
19
|
+
},
|
20
|
+
],
|
21
|
+
'vue/multi-word-component-names': 'off',
|
22
|
+
'vue/valid-v-slot': [
|
23
|
+
'error',
|
24
|
+
{
|
25
|
+
allowModifiers: true,
|
26
|
+
},
|
27
|
+
],
|
28
|
+
},
|
29
|
+
parserOptions: {
|
30
|
+
parser: '@babel/eslint-parser',
|
31
|
+
},
|
32
|
+
overrides: [
|
33
|
+
{
|
34
|
+
files: [
|
35
|
+
'**/__tests__/*.{j,t}s?(x)',
|
36
|
+
'**/tests/unit/**/*.spec.{j,t}s?(x)',
|
37
|
+
],
|
38
|
+
env: {
|
39
|
+
jest: true,
|
40
|
+
},
|
41
|
+
},
|
42
|
+
],
|
43
|
+
}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
{
|
2
|
+
"name": "<%= tool_name %>",
|
3
|
+
"version": "5.9.0",
|
4
|
+
"private": true,
|
5
|
+
"scripts": {
|
6
|
+
"serve": "vue-cli-service serve",
|
7
|
+
"build": "vue-cli-service build --no-module",
|
8
|
+
"test:unit": "vue-cli-service test:unit",
|
9
|
+
"lint": "vue-cli-service lint",
|
10
|
+
"serve:standalone": "vue-cli-service serve --mode standalone",
|
11
|
+
"test:components": "vue-cli-service test:components"
|
12
|
+
},
|
13
|
+
"dependencies": {
|
14
|
+
"@openc3/tool-common": "5.9.0",
|
15
|
+
"axios": "0.27.2",
|
16
|
+
"date-fns": "2.30.0",
|
17
|
+
"portal-vue": "2.1.7",
|
18
|
+
"single-spa-vue": "2.5.1",
|
19
|
+
"sprintf-js": "1.1.2",
|
20
|
+
"systemjs-webpack-interop": "2.3.7",
|
21
|
+
"vue": "2.7.14",
|
22
|
+
"vue-router": "3.5.3",
|
23
|
+
"vuetify": "2.6.14",
|
24
|
+
"vuex": "3.6.2"
|
25
|
+
},
|
26
|
+
"devDependencies": {
|
27
|
+
"@babel/eslint-parser": "7.22.5",
|
28
|
+
"@vue/babel-preset-app": "5.0.8",
|
29
|
+
"@vue/cli": "5.0.8",
|
30
|
+
"@vue/cli-plugin-babel": "5.0.8",
|
31
|
+
"@vue/cli-plugin-eslint": "5.0.8",
|
32
|
+
"@vue/cli-plugin-router": "5.0.8",
|
33
|
+
"@vue/cli-plugin-vuex": "5.0.8",
|
34
|
+
"@vue/cli-service": "5.0.8",
|
35
|
+
"@vue/eslint-config-prettier": "7.1.0",
|
36
|
+
"@vue/test-utils": "1.3.0",
|
37
|
+
"babel-loader": "9.1.2",
|
38
|
+
"babel-plugin-istanbul": "6.1.1",
|
39
|
+
"eslint": "8.44.0",
|
40
|
+
"eslint-config-prettier": "8.8.0",
|
41
|
+
"eslint-plugin-prettier": "4.2.1",
|
42
|
+
"eslint-plugin-vue": "9.15.1",
|
43
|
+
"html-webpack-plugin": "^5.5.3",
|
44
|
+
"prettier": "2.8.8",
|
45
|
+
"sass": "1.63.6",
|
46
|
+
"sass-loader": "13.3.2",
|
47
|
+
"vue-cli-plugin-single-spa": "3.3.0",
|
48
|
+
"vue-cli-plugin-vuetify": "2.5.8",
|
49
|
+
"vue-template-compiler": "2.7.14",
|
50
|
+
"webpack": "5.88.1"
|
51
|
+
}
|
52
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<!--
|
2
|
+
# Copyright 2023 OpenC3, Inc.
|
3
|
+
# All Rights Reserved.
|
4
|
+
#
|
5
|
+
# This file may also be used under the terms of a commercial license
|
6
|
+
# if purchased from OpenC3, Inc.
|
7
|
+
-->
|
8
|
+
|
9
|
+
<template>
|
10
|
+
<div>
|
11
|
+
<v-app id="innerapp">
|
12
|
+
<router-view></router-view>
|
13
|
+
</v-app>
|
14
|
+
</div>
|
15
|
+
</template>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import 'systemjs-webpack-interop/auto-public-path/2'
|
2
|
+
import Vue from 'vue'
|
3
|
+
import singleSpaVue from 'single-spa-vue'
|
4
|
+
|
5
|
+
import App from './App.vue'
|
6
|
+
import router from './router'
|
7
|
+
import store from '@openc3/tool-common/src/plugins/store'
|
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 })
|
20
|
+
|
21
|
+
const vueLifecycles = singleSpaVue({
|
22
|
+
Vue,
|
23
|
+
appOptions: {
|
24
|
+
router,
|
25
|
+
store,
|
26
|
+
vuetify,
|
27
|
+
render(h) {
|
28
|
+
return h(App, {
|
29
|
+
props: {},
|
30
|
+
})
|
31
|
+
},
|
32
|
+
el: '#openc3-tool',
|
33
|
+
},
|
34
|
+
})
|
35
|
+
|
36
|
+
export const bootstrap = vueLifecycles.bootstrap
|
37
|
+
export const mount = vueLifecycles.mount
|
38
|
+
export const unmount = vueLifecycles.unmount
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/*
|
2
|
+
# Copyright 2023 OpenC3, Inc.
|
3
|
+
# All Rights Reserved.
|
4
|
+
#
|
5
|
+
# This file may also be used under the terms of a commercial license
|
6
|
+
# if purchased from OpenC3, Inc.
|
7
|
+
*/
|
8
|
+
|
9
|
+
import Vue from 'vue'
|
10
|
+
import Router from 'vue-router'
|
11
|
+
|
12
|
+
Vue.use(Router)
|
13
|
+
|
14
|
+
export default new Router({
|
15
|
+
mode: 'history',
|
16
|
+
base: process.env.BASE_URL,
|
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
|
+
],
|
29
|
+
})
|
@@ -0,0 +1,63 @@
|
|
1
|
+
<!--
|
2
|
+
# Copyright 2023 OpenC3, Inc.
|
3
|
+
# All Rights Reserved.
|
4
|
+
#
|
5
|
+
# This file may also be used under the terms of a commercial license
|
6
|
+
# if purchased from OpenC3, Inc.
|
7
|
+
-->
|
8
|
+
|
9
|
+
<template>
|
10
|
+
<div>
|
11
|
+
<top-bar :menus="menus" :title="title" />
|
12
|
+
<v-card>
|
13
|
+
<v-card-title> Example Card </v-card-title>
|
14
|
+
<v-card-text>
|
15
|
+
<v-btn block @click="buttonPress"> Send Command </v-btn>
|
16
|
+
</v-card-text>
|
17
|
+
</v-card>
|
18
|
+
</div>
|
19
|
+
</template>
|
20
|
+
|
21
|
+
<script>
|
22
|
+
import { OpenC3Api } from '@openc3/tool-common/src/services/openc3-api'
|
23
|
+
import TopBar from '@openc3/tool-common/src/components/TopBar'
|
24
|
+
|
25
|
+
export default {
|
26
|
+
components: {
|
27
|
+
TopBar,
|
28
|
+
},
|
29
|
+
data() {
|
30
|
+
return {
|
31
|
+
title: '<%= tool_name_display %>',
|
32
|
+
api: null,
|
33
|
+
menus: [
|
34
|
+
{
|
35
|
+
label: 'File',
|
36
|
+
items: [
|
37
|
+
{
|
38
|
+
label: 'Send Command',
|
39
|
+
command: () => {
|
40
|
+
this.api
|
41
|
+
.cmd('INST', 'COLLECT', { TYPE: 'NORMAL' })
|
42
|
+
.then((response) => {
|
43
|
+
alert('Command Sent!')
|
44
|
+
})
|
45
|
+
},
|
46
|
+
},
|
47
|
+
],
|
48
|
+
},
|
49
|
+
],
|
50
|
+
}
|
51
|
+
},
|
52
|
+
created() {
|
53
|
+
this.api = new OpenC3Api()
|
54
|
+
},
|
55
|
+
methods: {
|
56
|
+
buttonPress() {
|
57
|
+
this.api.cmd('INST', 'COLLECT', { TYPE: 'NORMAL' }).then((response) => {
|
58
|
+
alert('Command Sent!')
|
59
|
+
})
|
60
|
+
},
|
61
|
+
},
|
62
|
+
}
|
63
|
+
</script>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
const path = require("path");
|
2
|
+
|
3
|
+
module.exports = {
|
4
|
+
publicPath: '/tools/<%= tool_name %>',
|
5
|
+
outputDir: 'tools/<%= tool_name %>',
|
6
|
+
filenameHashing: false,
|
7
|
+
transpileDependencies: ['vuetify'],
|
8
|
+
devServer: {
|
9
|
+
port: 2999,
|
10
|
+
headers: {
|
11
|
+
'Access-Control-Allow-Origin': '*',
|
12
|
+
},
|
13
|
+
client: {
|
14
|
+
webSocketURL: {
|
15
|
+
hostname: 'localhost',
|
16
|
+
pathname: '/tools/<%= tool_name %>',
|
17
|
+
port: 2999,
|
18
|
+
},
|
19
|
+
},
|
20
|
+
},
|
21
|
+
configureWebpack: {
|
22
|
+
output: {
|
23
|
+
libraryTarget: 'system'
|
24
|
+
},
|
25
|
+
},
|
26
|
+
chainWebpack: (config) => {
|
27
|
+
config.module.rule('js').use('babel-loader')
|
28
|
+
config.externals(['vue', 'vuetify', 'vuex', 'vue-router'])
|
29
|
+
},
|
30
|
+
}
|