openc3 7.5.1 → 7.6.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/Gemfile +0 -0
- data/bin/openc3cli +82 -5
- data/data/config/_params.yaml +3 -0
- data/data/config/command_modifiers.yaml +5 -3
- data/data/config/default_plugins.yaml +1 -0
- data/data/config/interface_modifiers.yaml +17 -1
- data/data/config/item_modifiers.yaml +24 -1
- data/data/config/microservice.yaml +15 -1
- data/data/config/parameter_modifiers.yaml +4 -4
- data/data/config/plugins.yaml +511 -3
- data/data/config/settings.yaml +17 -0
- data/data/config/target.yaml +53 -0
- data/data/config/telemetry.yaml +58 -2
- data/data/config/widgets.yaml +30 -0
- data/lib/openc3/accessors/accessor.rb +14 -2
- data/lib/openc3/accessors/binary_accessor.rb +25 -5
- data/lib/openc3/api/CLAUDE.md +1 -0
- data/lib/openc3/api/api.rb +1 -0
- data/lib/openc3/api/cmd_api.rb +9 -1
- data/lib/openc3/api/interface_api.rb +7 -2
- data/lib/openc3/api/limits_api.rb +93 -41
- data/lib/openc3/api/router_api.rb +7 -2
- data/lib/openc3/api/settings_api.rb +4 -1
- data/lib/openc3/api/shared_resource_api.rb +107 -0
- data/lib/openc3/api/tlm_api.rb +10 -0
- data/lib/openc3/interfaces/http_client_interface.rb +84 -27
- data/lib/openc3/interfaces/protocols/preidentified_protocol.rb +6 -2
- data/lib/openc3/interfaces/tcpip_server_interface.rb +205 -125
- data/lib/openc3/io/json_api.rb +2 -10
- data/lib/openc3/io/json_api_object.rb +2 -10
- data/lib/openc3/logs/packet_log_writer.rb +8 -3
- data/lib/openc3/microservices/decom_common.rb +4 -1
- data/lib/openc3/microservices/decom_microservice.rb +52 -6
- data/lib/openc3/microservices/interface_decom_common.rb +13 -0
- data/lib/openc3/microservices/interface_microservice.rb +50 -11
- data/lib/openc3/microservices/limits_group_microservice.rb +513 -0
- data/lib/openc3/microservices/log_microservice.rb +22 -8
- data/lib/openc3/microservices/microservice.rb +8 -2
- data/lib/openc3/microservices/multi_microservice.rb +76 -22
- data/lib/openc3/microservices/queue_microservice.rb +29 -24
- data/lib/openc3/migrations/20260704000000_default_bridge.rb +1 -2
- data/lib/openc3/migrations/20261103000001_limits_group_backfill.rb +193 -0
- data/lib/openc3/models/bridge_model.rb +3 -3
- data/lib/openc3/models/cvt_model.rb +3 -1
- data/lib/openc3/models/host_interface_microservice_model.rb +4 -4
- data/lib/openc3/models/interface_model.rb +27 -7
- data/lib/openc3/models/microservice_group.rb +167 -0
- data/lib/openc3/models/microservice_model.rb +88 -2
- data/lib/openc3/models/panel_model.rb +109 -0
- data/lib/openc3/models/plugin_model.rb +1006 -26
- data/lib/openc3/models/plugin_store_model.rb +6 -1
- data/lib/openc3/models/protected_storage_model.rb +64 -0
- data/lib/openc3/models/queue_model.rb +19 -10
- data/lib/openc3/models/scope_model.rb +80 -3
- data/lib/openc3/models/setting_model.rb +2 -2
- data/lib/openc3/models/shared_resource_model.rb +381 -0
- data/lib/openc3/models/target_model.rb +324 -68
- data/lib/openc3/operators/microservice_operator.rb +76 -9
- data/lib/openc3/operators/operator.rb +29 -0
- data/lib/openc3/packets/commands.rb +16 -16
- data/lib/openc3/packets/limits.rb +2 -0
- data/lib/openc3/packets/packet.rb +75 -4
- data/lib/openc3/packets/packet_config.rb +152 -13
- data/lib/openc3/packets/packet_item.rb +35 -14
- data/lib/openc3/packets/packet_item_limits.rb +67 -6
- data/lib/openc3/packets/parsers/limits_parser.rb +69 -2
- data/lib/openc3/packets/parsers/packet_item_parser.rb +6 -0
- data/lib/openc3/packets/parsers/packet_parser.rb +45 -0
- data/lib/openc3/packets/parsers/state_parser.rb +1 -1
- data/lib/openc3/script/CLAUDE.md +1 -0
- data/lib/openc3/script/api_shared.rb +17 -9
- data/lib/openc3/script/calendar.rb +18 -6
- data/lib/openc3/script/commands.rb +11 -9
- data/lib/openc3/script/critical_cmd.rb +22 -2
- data/lib/openc3/script/metadata.rb +30 -4
- data/lib/openc3/script/plugins.rb +8 -0
- data/lib/openc3/script/script.rb +8 -24
- data/lib/openc3/script/web_socket_api.rb +23 -17
- data/lib/openc3/system/system.rb +9 -3
- data/lib/openc3/top_level.rb +17 -0
- data/lib/openc3/topics/command_topic.rb +7 -1
- data/lib/openc3/topics/decom_interface_topic.rb +9 -3
- data/lib/openc3/topics/discovery_topic.rb +84 -0
- data/lib/openc3/topics/limits_event_topic.rb +236 -17
- data/lib/openc3/topics/telemetry_decom_topic.rb +12 -3
- data/lib/openc3/topics/topic.rb +2 -1
- data/lib/openc3/utilities/authentication.rb +67 -16
- data/lib/openc3/utilities/cli_generator.rb +117 -25
- data/lib/openc3/utilities/client_ip_header_filter.rb +38 -0
- data/lib/openc3/utilities/config_overlay.rb +24 -1
- data/lib/openc3/utilities/cosmos_rails_formatter.rb +18 -10
- data/lib/openc3/utilities/hardware_discovery.rb +279 -0
- data/lib/openc3/utilities/limits_rollup.rb +81 -0
- data/lib/openc3/utilities/local_mode.rb +48 -5
- data/lib/openc3/utilities/questdb_client.rb +130 -22
- data/lib/openc3/utilities/reingest_job.rb +12 -3
- data/lib/openc3/utilities/running_script.rb +206 -49
- data/lib/openc3/utilities/script.rb +24 -12
- data/lib/openc3/utilities/script_env.rb +164 -0
- data/lib/openc3/utilities/script_message_signing.rb +133 -0
- data/lib/openc3/utilities/store_autoload.rb +32 -1
- data/lib/openc3/utilities/store_queued.rb +5 -1
- data/lib/openc3/version.rb +6 -6
- data/templates/command_validator/command_validator.py +9 -9
- data/templates/{tool_react/pnpm-workspace.yaml → panel/.prettierrc.cjs} +7 -5
- data/templates/panel/Rakefile +24 -0
- data/templates/panel/package.json +17 -0
- data/templates/{tool_angular → panel}/pnpm-workspace.yaml +5 -0
- data/templates/panel/src/Panel.js +52 -0
- data/templates/panel/src/Panel.vue +60 -0
- data/templates/panel/src/panelSdk.js +24 -0
- data/templates/panel/vite-Panel.config.js +43 -0
- data/templates/tool_vue/package.json +3 -3
- data/templates/widget/package.json +2 -2
- metadata +24 -56
- data/templates/tool_angular/.editorconfig +0 -16
- data/templates/tool_angular/.gitignore +0 -44
- data/templates/tool_angular/.vscode/extensions.json +0 -4
- data/templates/tool_angular/.vscode/launch.json +0 -20
- data/templates/tool_angular/.vscode/tasks.json +0 -42
- data/templates/tool_angular/angular.json +0 -111
- data/templates/tool_angular/extra-webpack.config.js +0 -8
- data/templates/tool_angular/package.json +0 -48
- data/templates/tool_angular/src/app/app-routing.module.ts +0 -15
- data/templates/tool_angular/src/app/app.component.html +0 -22
- data/templates/tool_angular/src/app/app.component.scss +0 -18
- data/templates/tool_angular/src/app/app.component.spec.ts +0 -29
- data/templates/tool_angular/src/app/app.component.ts +0 -52
- data/templates/tool_angular/src/app/app.module.ts +0 -30
- data/templates/tool_angular/src/app/custom-overlay-container.ts +0 -17
- data/templates/tool_angular/src/app/empty-route/empty-route.component.ts +0 -7
- data/templates/tool_angular/src/app/openc3-api.d.ts +0 -1
- data/templates/tool_angular/src/assets/.gitkeep +0 -0
- data/templates/tool_angular/src/environments/environment.prod.ts +0 -3
- data/templates/tool_angular/src/environments/environment.ts +0 -16
- data/templates/tool_angular/src/favicon.ico +0 -0
- data/templates/tool_angular/src/index.html +0 -13
- data/templates/tool_angular/src/main.single-spa.ts +0 -40
- data/templates/tool_angular/src/single-spa/asset-url.ts +0 -12
- data/templates/tool_angular/src/single-spa/single-spa-props.ts +0 -8
- data/templates/tool_angular/src/styles.scss +0 -1
- data/templates/tool_angular/tsconfig.app.json +0 -13
- data/templates/tool_angular/tsconfig.json +0 -33
- data/templates/tool_angular/tsconfig.spec.json +0 -14
- data/templates/tool_react/.eslintrc +0 -7
- data/templates/tool_react/.gitignore +0 -71
- data/templates/tool_react/.prettierignore +0 -8
- data/templates/tool_react/babel.config.json +0 -29
- data/templates/tool_react/jest.config.js +0 -12
- data/templates/tool_react/package.json +0 -51
- data/templates/tool_react/src/openc3-tool_name.js +0 -24
- data/templates/tool_react/src/root.component.js +0 -88
- data/templates/tool_react/src/root.component.test.js +0 -9
- data/templates/tool_react/webpack.config.js +0 -27
- data/templates/tool_svelte/.gitignore +0 -71
- data/templates/tool_svelte/.prettierignore +0 -8
- data/templates/tool_svelte/.prettierrc.js +0 -5
- data/templates/tool_svelte/babel.config.js +0 -12
- data/templates/tool_svelte/build/smui.css +0 -1
- data/templates/tool_svelte/jest.config.js +0 -9
- data/templates/tool_svelte/package.json +0 -49
- data/templates/tool_svelte/pnpm-workspace.yaml +0 -20
- data/templates/tool_svelte/rollup.config.js +0 -74
- data/templates/tool_svelte/src/App.svelte +0 -42
- data/templates/tool_svelte/src/App.test.js +0 -9
- data/templates/tool_svelte/src/theme/_smui-theme.scss +0 -25
- data/templates/tool_svelte/src/tool_name.js +0 -17
- data/templates/widget/LICENSE.md +0 -20
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Component, ViewChild, AfterViewInit, OnDestroy } from '@angular/core';
|
|
2
|
-
import {CdkPortal, DomPortalOutlet} from '@angular/cdk/portal';
|
|
3
|
-
import { OpenC3Api } from "@openc3/js-common/services";
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'openc3-tool-<%= tool_name %>-root',
|
|
7
|
-
templateUrl: './app.component.html',
|
|
8
|
-
styleUrls: ['./app.component.scss'],
|
|
9
|
-
})
|
|
10
|
-
export class AppComponent implements AfterViewInit, OnDestroy {
|
|
11
|
-
@ViewChild(CdkPortal)
|
|
12
|
-
private portal: CdkPortal | undefined;
|
|
13
|
-
private host: DomPortalOutlet | undefined;
|
|
14
|
-
|
|
15
|
-
clickHandler = function() {
|
|
16
|
-
let api = new OpenC3Api();
|
|
17
|
-
api.cmd("INST", "COLLECT", { TYPE: "NORMAL" }).then((response: any) => {
|
|
18
|
-
alert("Command Sent!");
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
getMenuElement() {
|
|
22
|
-
let elem = document.getElementById("openc3-menu")
|
|
23
|
-
if (elem) {
|
|
24
|
-
return elem
|
|
25
|
-
} else {
|
|
26
|
-
return document.createElement('span')
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
ngAfterViewInit(): void {
|
|
30
|
-
this.host = new DomPortalOutlet(
|
|
31
|
-
this.getMenuElement()
|
|
32
|
-
);
|
|
33
|
-
this.host.attach(this.portal);
|
|
34
|
-
document.title = "<%= tool_name_display %>";
|
|
35
|
-
let tool = document.querySelector('#openc3-tool');
|
|
36
|
-
if (tool == null) {
|
|
37
|
-
tool = document.createElement('div')
|
|
38
|
-
}
|
|
39
|
-
let overlay = document.querySelector('.cdk-overlay-container');
|
|
40
|
-
if (overlay == null) {
|
|
41
|
-
overlay = document.createElement('div')
|
|
42
|
-
overlay.classList.add('cdk-overlay-container');
|
|
43
|
-
}
|
|
44
|
-
// Move stuff
|
|
45
|
-
tool.append(overlay);
|
|
46
|
-
}
|
|
47
|
-
ngOnDestroy(): void {
|
|
48
|
-
if (this.host) {
|
|
49
|
-
this.host.detach();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { BrowserModule } from '@angular/platform-browser';
|
|
3
|
-
import { PortalModule } from '@angular/cdk/portal';
|
|
4
|
-
|
|
5
|
-
import { AppRoutingModule } from './app-routing.module';
|
|
6
|
-
import { AppComponent } from './app.component';
|
|
7
|
-
import {MatCardModule} from '@angular/material/card';
|
|
8
|
-
import {MatButtonModule} from '@angular/material/button';
|
|
9
|
-
import {MatMenuModule} from '@angular/material/menu';
|
|
10
|
-
import {OverlayContainer} from '@angular/cdk/overlay';
|
|
11
|
-
import {AppOverlayContainer} from './custom-overlay-container';
|
|
12
|
-
|
|
13
|
-
@NgModule({
|
|
14
|
-
declarations: [
|
|
15
|
-
AppComponent
|
|
16
|
-
],
|
|
17
|
-
imports: [
|
|
18
|
-
BrowserModule,
|
|
19
|
-
AppRoutingModule,
|
|
20
|
-
PortalModule,
|
|
21
|
-
MatCardModule,
|
|
22
|
-
MatButtonModule,
|
|
23
|
-
MatMenuModule
|
|
24
|
-
],
|
|
25
|
-
providers: [
|
|
26
|
-
{ provide: OverlayContainer, useClass: AppOverlayContainer },
|
|
27
|
-
],
|
|
28
|
-
bootstrap: [AppComponent]
|
|
29
|
-
})
|
|
30
|
-
export class AppModule { }
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Injectable, OnDestroy } from '@angular/core';
|
|
2
|
-
import { OverlayContainer } from '@angular/cdk/overlay';
|
|
3
|
-
|
|
4
|
-
export class AppOverlayContainer extends OverlayContainer {
|
|
5
|
-
|
|
6
|
-
override _createContainer(): void {
|
|
7
|
-
let container = document.createElement('div');
|
|
8
|
-
container.classList.add('cdk-overlay-container');
|
|
9
|
-
|
|
10
|
-
let elem = document.querySelector('#openc3-tool');
|
|
11
|
-
if (!elem) {
|
|
12
|
-
elem = document.createElement('div')
|
|
13
|
-
}
|
|
14
|
-
elem.appendChild(container);
|
|
15
|
-
this._containerElement = container;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module '@openc3/js-common/services';
|
|
File without changes
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// This file can be replaced during build by using the `fileReplacements` array.
|
|
2
|
-
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
|
|
3
|
-
// The list of file replacements can be found in `angular.json`.
|
|
4
|
-
|
|
5
|
-
export const environment = {
|
|
6
|
-
production: false
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
* For easier debugging in development mode, you can import the following file
|
|
11
|
-
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
|
|
12
|
-
*
|
|
13
|
-
* This import should be commented out in production mode because it will have a negative impact
|
|
14
|
-
* on performance if an error is thrown.
|
|
15
|
-
*/
|
|
16
|
-
import 'zone.js/dist/zone-error'; // Included with Angular CLI.
|
|
Binary file
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<title>Openc3ToolTemplateAngular</title>
|
|
6
|
-
<base href="/">
|
|
7
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
8
|
-
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
|
9
|
-
</head>
|
|
10
|
-
<body>
|
|
11
|
-
<openc3-tool-template-angular-root></openc3-tool-template-angular-root>
|
|
12
|
-
</body>
|
|
13
|
-
</html>
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import 'zone.js/dist/zone'
|
|
2
|
-
|
|
3
|
-
import { enableProdMode, NgZone } from '@angular/core';
|
|
4
|
-
|
|
5
|
-
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
6
|
-
import { Router, NavigationStart } from '@angular/router';
|
|
7
|
-
|
|
8
|
-
import { singleSpaAngular, getSingleSpaExtraProviders } from 'single-spa-angular';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import { AppModule } from './app/app.module';
|
|
12
|
-
import { environment } from './environments/environment';
|
|
13
|
-
import { singleSpaPropsSubject } from './single-spa/single-spa-props';
|
|
14
|
-
|
|
15
|
-
if (environment.production) {
|
|
16
|
-
enableProdMode();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const lifecycles = singleSpaAngular({
|
|
20
|
-
bootstrapFunction: singleSpaProps => {
|
|
21
|
-
singleSpaPropsSubject.next(singleSpaProps);
|
|
22
|
-
return platformBrowserDynamic(getSingleSpaExtraProviders()).bootstrapModule(AppModule);
|
|
23
|
-
},
|
|
24
|
-
template: '<openc3-tool-<%= tool_name %>-root />',
|
|
25
|
-
Router,
|
|
26
|
-
NavigationStart,
|
|
27
|
-
NgZone,
|
|
28
|
-
domElementGetter: function() {
|
|
29
|
-
let elem = document.getElementById("openc3-tool")
|
|
30
|
-
if (elem) {
|
|
31
|
-
return elem
|
|
32
|
-
} else {
|
|
33
|
-
return document.createElement('div')
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
export const bootstrap = lifecycles.bootstrap;
|
|
39
|
-
export const mount = lifecycles.mount;
|
|
40
|
-
export const unmount = lifecycles.unmount;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// In single-spa, the assets need to be loaded from a dynamic location,
|
|
2
|
-
// instead of hard coded to `/assets`. We use webpack public path for this.
|
|
3
|
-
// See https://webpack.js.org/guides/public-path/#root
|
|
4
|
-
|
|
5
|
-
export function assetUrl(url: string): string {
|
|
6
|
-
// @ts-ignore
|
|
7
|
-
const publicPath = __webpack_public_path__;
|
|
8
|
-
const publicPathSuffix = publicPath.endsWith('/') ? '' : '/';
|
|
9
|
-
const urlPrefix = url.startsWith('/') ? '' : '/';
|
|
10
|
-
|
|
11
|
-
return `${publicPath}${publicPathSuffix}assets${urlPrefix}${url}`;
|
|
12
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ReplaySubject } from 'rxjs';
|
|
2
|
-
import { AppProps } from 'single-spa';
|
|
3
|
-
|
|
4
|
-
export const singleSpaPropsSubject = new ReplaySubject<SingleSpaProps>(1);
|
|
5
|
-
|
|
6
|
-
// Add any custom single-spa props you have to this type def
|
|
7
|
-
// https://single-spa.js.org/docs/building-applications.html#custom-props
|
|
8
|
-
export type SingleSpaProps = AppProps; // & {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/* You can add global styles to this file, and also import other style files */
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
-
{
|
|
3
|
-
"compileOnSave": false,
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"baseUrl": "./",
|
|
6
|
-
"outDir": "./dist/out-tsc",
|
|
7
|
-
"forceConsistentCasingInFileNames": true,
|
|
8
|
-
"strict": true,
|
|
9
|
-
"noImplicitOverride": true,
|
|
10
|
-
"noPropertyAccessFromIndexSignature": true,
|
|
11
|
-
"noImplicitReturns": true,
|
|
12
|
-
"noFallthroughCasesInSwitch": true,
|
|
13
|
-
"sourceMap": true,
|
|
14
|
-
"declaration": false,
|
|
15
|
-
"downlevelIteration": true,
|
|
16
|
-
"experimentalDecorators": true,
|
|
17
|
-
"moduleResolution": "node",
|
|
18
|
-
"importHelpers": true,
|
|
19
|
-
"target": "ES2022",
|
|
20
|
-
"module": "ES2022",
|
|
21
|
-
"useDefineForClassFields": false,
|
|
22
|
-
"lib": [
|
|
23
|
-
"ES2022",
|
|
24
|
-
"dom"
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
|
-
"angularCompilerOptions": {
|
|
28
|
-
"enableI18nLegacyMessageIdFormat": false,
|
|
29
|
-
"strictInjectionParameters": true,
|
|
30
|
-
"strictInputAccessModifiers": true,
|
|
31
|
-
"strictTemplates": true
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
-
{
|
|
3
|
-
"extends": "./tsconfig.json",
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"outDir": "./out-tsc/spec",
|
|
6
|
-
"types": [
|
|
7
|
-
"jasmine"
|
|
8
|
-
]
|
|
9
|
-
},
|
|
10
|
-
"include": [
|
|
11
|
-
"src/**/*.spec.ts",
|
|
12
|
-
"src/**/*.d.ts"
|
|
13
|
-
]
|
|
14
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# Logs
|
|
2
|
-
logs
|
|
3
|
-
*.log
|
|
4
|
-
npm-debug.log*
|
|
5
|
-
pnpm-debug.log*
|
|
6
|
-
|
|
7
|
-
# Runtime data
|
|
8
|
-
pids
|
|
9
|
-
*.pid
|
|
10
|
-
*.seed
|
|
11
|
-
*.pid.lock
|
|
12
|
-
|
|
13
|
-
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
14
|
-
lib-cov
|
|
15
|
-
|
|
16
|
-
# Coverage directory used by tools like istanbul
|
|
17
|
-
coverage
|
|
18
|
-
|
|
19
|
-
# nyc test coverage
|
|
20
|
-
.nyc_output
|
|
21
|
-
|
|
22
|
-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
|
23
|
-
.grunt
|
|
24
|
-
|
|
25
|
-
# Bower dependency directory (https://bower.io/)
|
|
26
|
-
bower_components
|
|
27
|
-
|
|
28
|
-
# node-waf configuration
|
|
29
|
-
.lock-wscript
|
|
30
|
-
|
|
31
|
-
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
32
|
-
build/Release
|
|
33
|
-
|
|
34
|
-
# Dependency directories
|
|
35
|
-
node_modules/
|
|
36
|
-
jspm_packages/
|
|
37
|
-
|
|
38
|
-
# TypeScript v1 declaration files
|
|
39
|
-
typings/
|
|
40
|
-
|
|
41
|
-
# Optional npm cache directory
|
|
42
|
-
.npm
|
|
43
|
-
|
|
44
|
-
# Optional eslint cache
|
|
45
|
-
.eslintcache
|
|
46
|
-
|
|
47
|
-
# Optional REPL history
|
|
48
|
-
.node_repl_history
|
|
49
|
-
|
|
50
|
-
# Output of 'npm pack'
|
|
51
|
-
*.tgz
|
|
52
|
-
|
|
53
|
-
# Yarn Integrity file
|
|
54
|
-
.yarn-integrity
|
|
55
|
-
|
|
56
|
-
# dotenv environment variables file
|
|
57
|
-
.env
|
|
58
|
-
|
|
59
|
-
# next.js build output
|
|
60
|
-
.next
|
|
61
|
-
tools
|
|
62
|
-
|
|
63
|
-
# Editor directories and files
|
|
64
|
-
.idea
|
|
65
|
-
.vscode
|
|
66
|
-
*.suo
|
|
67
|
-
*.ntvs*
|
|
68
|
-
*.njsproj
|
|
69
|
-
*.sln
|
|
70
|
-
*.sw?
|
|
71
|
-
.DS_Store
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"presets": [
|
|
3
|
-
"@babel/preset-env",
|
|
4
|
-
[
|
|
5
|
-
"@babel/preset-react",
|
|
6
|
-
{
|
|
7
|
-
"runtime": "automatic"
|
|
8
|
-
}
|
|
9
|
-
],
|
|
10
|
-
],
|
|
11
|
-
"plugins": [
|
|
12
|
-
[
|
|
13
|
-
"@babel/plugin-transform-runtime",
|
|
14
|
-
{
|
|
15
|
-
"useESModules": true,
|
|
16
|
-
"regenerator": false
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
],
|
|
20
|
-
"env": {
|
|
21
|
-
"test": {
|
|
22
|
-
"presets": [
|
|
23
|
-
["@babel/preset-env", {
|
|
24
|
-
"targets": "current node"
|
|
25
|
-
}]
|
|
26
|
-
]
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
rootDir: "src",
|
|
3
|
-
testEnvironment: "jsdom",
|
|
4
|
-
transform: {
|
|
5
|
-
"^.+\\.(j|t)sx?$": "babel-jest",
|
|
6
|
-
},
|
|
7
|
-
moduleNameMapper: {
|
|
8
|
-
"\\.(css)$": "identity-obj-proxy",
|
|
9
|
-
"single-spa-react/parcel": "single-spa-react/lib/cjs/parcel.cjs",
|
|
10
|
-
},
|
|
11
|
-
setupFilesAfterEnv: ["@testing-library/jest-dom"],
|
|
12
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"scripts": {
|
|
3
|
-
"start": "webpack serve",
|
|
4
|
-
"start:standalone": "webpack serve --env standalone",
|
|
5
|
-
"build": "concurrently pnpm:build:*",
|
|
6
|
-
"build:webpack": "webpack --mode=production",
|
|
7
|
-
"analyze": "webpack --mode=production --env analyze",
|
|
8
|
-
"lint": "eslint src --ext js",
|
|
9
|
-
"format": "prettier --write .",
|
|
10
|
-
"check-format": "prettier --check .",
|
|
11
|
-
"test": "cross-env BABEL_ENV=test jest",
|
|
12
|
-
"watch-tests": "cross-env BABEL_ENV=test jest --watch",
|
|
13
|
-
"coverage": "cross-env BABEL_ENV=test jest --coverage"
|
|
14
|
-
},
|
|
15
|
-
"dependencies": {
|
|
16
|
-
"@emotion/react": "^11.13.3",
|
|
17
|
-
"@emotion/styled": "^11.11.0",
|
|
18
|
-
"@mui/material": "^6.1.1",
|
|
19
|
-
"@openc3/js-common": "7.5.1",
|
|
20
|
-
"react": "^18.2.0",
|
|
21
|
-
"react-dom": "^18.2.0",
|
|
22
|
-
"single-spa-react": "^5.1.4"
|
|
23
|
-
},
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"@babel/core": "^7.25.2",
|
|
26
|
-
"@babel/eslint-parser": "^7.25.1",
|
|
27
|
-
"@babel/plugin-transform-runtime": "^7.25.4",
|
|
28
|
-
"@babel/preset-env": "^7.25.4",
|
|
29
|
-
"@babel/preset-react": "^7.23.3",
|
|
30
|
-
"@babel/runtime": "^7.25.6",
|
|
31
|
-
"@testing-library/jest-dom": "^6.5.0",
|
|
32
|
-
"@testing-library/react": "^16.0.1",
|
|
33
|
-
"babel-jest": "^29.7.0",
|
|
34
|
-
"concurrently": "^9.0.1",
|
|
35
|
-
"cross-env": "^7.0.3",
|
|
36
|
-
"eslint": "^8.56.0",
|
|
37
|
-
"eslint-config-prettier": "^9.1.0",
|
|
38
|
-
"eslint-config-react-important-stuff": "^3.0.0",
|
|
39
|
-
"eslint-plugin-prettier": "^5.1.2",
|
|
40
|
-
"identity-obj-proxy": "^3.0.0",
|
|
41
|
-
"jest": "^29.7.0",
|
|
42
|
-
"jest-cli": "^29.7.0",
|
|
43
|
-
"prettier": "^3.1.1",
|
|
44
|
-
"pretty-quick": "^4.0.0",
|
|
45
|
-
"webpack": "^5.95.0",
|
|
46
|
-
"webpack-cli": "^5.1.4",
|
|
47
|
-
"webpack-config-single-spa-react": "^4.0.5",
|
|
48
|
-
"webpack-dev-server": "^5.1.0",
|
|
49
|
-
"webpack-merge": "^6.0.1"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import ReactDOM from "react-dom";
|
|
3
|
-
import singleSpaReact from "single-spa-react";
|
|
4
|
-
import Root from "./root.component";
|
|
5
|
-
|
|
6
|
-
const lifecycles = singleSpaReact({
|
|
7
|
-
React,
|
|
8
|
-
ReactDOM,
|
|
9
|
-
rootComponent: Root,
|
|
10
|
-
errorBoundary(err, info, props) {
|
|
11
|
-
// Customize the root error boundary for your microfrontend here.
|
|
12
|
-
return null;
|
|
13
|
-
},
|
|
14
|
-
domElementGetter: function () {
|
|
15
|
-
let elem = document.getElementById("openc3-tool");
|
|
16
|
-
if (elem) {
|
|
17
|
-
return elem;
|
|
18
|
-
} else {
|
|
19
|
-
return new HTMLElement();
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
export const { bootstrap, mount, unmount } = lifecycles;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { createPortal } from "react-dom";
|
|
3
|
-
import Button from "@mui/material/Button";
|
|
4
|
-
import Card from "@mui/material/Card";
|
|
5
|
-
import CardContent from "@mui/material/CardContent";
|
|
6
|
-
import Menu from "@mui/material/Menu";
|
|
7
|
-
import MenuItem from "@mui/material/MenuItem";
|
|
8
|
-
import { OpenC3Api } from "@openc3/js-common/services";
|
|
9
|
-
|
|
10
|
-
export default function Root(props) {
|
|
11
|
-
const [anchorEl, setAnchorEl] = React.useState();
|
|
12
|
-
const open = Boolean(anchorEl);
|
|
13
|
-
const handleClick = (event) => {
|
|
14
|
-
setAnchorEl(event.currentTarget);
|
|
15
|
-
};
|
|
16
|
-
const sendCommand = () => {
|
|
17
|
-
let api = new OpenC3Api();
|
|
18
|
-
api.cmd("INST", "COLLECT", { TYPE: "NORMAL" }).then((response) => {
|
|
19
|
-
alert("Command Sent!");
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
const handleClose = () => {
|
|
23
|
-
setAnchorEl(null);
|
|
24
|
-
sendCommand();
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
document.title = "<%= tool_name_display %>";
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<Card variant="outlined">
|
|
31
|
-
<CardContent>
|
|
32
|
-
<Button variant="contained" onClick={sendCommand}>
|
|
33
|
-
Send Command!
|
|
34
|
-
</Button>
|
|
35
|
-
</CardContent>
|
|
36
|
-
{createPortal(
|
|
37
|
-
<div>
|
|
38
|
-
<Button
|
|
39
|
-
id="basic-button"
|
|
40
|
-
aria-controls={open ? "basic-menu" : undefined}
|
|
41
|
-
aria-haspopup="true"
|
|
42
|
-
aria-expanded={open ? "true" : undefined}
|
|
43
|
-
onClick={handleClick}
|
|
44
|
-
variant="contained"
|
|
45
|
-
disableElevation
|
|
46
|
-
>
|
|
47
|
-
File
|
|
48
|
-
</Button>
|
|
49
|
-
<Menu
|
|
50
|
-
id="basic-menu"
|
|
51
|
-
anchorEl={anchorEl}
|
|
52
|
-
open={open}
|
|
53
|
-
onClose={handleClose}
|
|
54
|
-
MenuListProps={{
|
|
55
|
-
"aria-labelledby": "basic-button",
|
|
56
|
-
}}
|
|
57
|
-
>
|
|
58
|
-
<MenuItem onClick={handleClose}>Send Command</MenuItem>
|
|
59
|
-
</Menu>
|
|
60
|
-
<div
|
|
61
|
-
style={{
|
|
62
|
-
"align-items": "center",
|
|
63
|
-
"text-align": "center",
|
|
64
|
-
width: "80%",
|
|
65
|
-
display: "inline-flex",
|
|
66
|
-
position: "relative",
|
|
67
|
-
"z-index": 0,
|
|
68
|
-
padding: "4px 16px",
|
|
69
|
-
}}
|
|
70
|
-
>
|
|
71
|
-
<div
|
|
72
|
-
style={{
|
|
73
|
-
"font-size": "1.25rem",
|
|
74
|
-
"line-height": 1.5,
|
|
75
|
-
"text-overflow": "ellipsis",
|
|
76
|
-
"white-space": "nowrap",
|
|
77
|
-
width: "100%",
|
|
78
|
-
}}
|
|
79
|
-
>
|
|
80
|
-
<%= tool_name_display %>
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
</div>,
|
|
84
|
-
document.getElementById("openc3-menu")
|
|
85
|
-
)}
|
|
86
|
-
</Card>
|
|
87
|
-
);
|
|
88
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { render } from "@testing-library/react";
|
|
2
|
-
import Root from "./root.component";
|
|
3
|
-
|
|
4
|
-
describe("Root component", () => {
|
|
5
|
-
it("should be in the document", () => {
|
|
6
|
-
const { getByText } = render(<Root name="Testapp" />);
|
|
7
|
-
expect(getByText(/Testapp is mounted!/i)).toBeInTheDocument();
|
|
8
|
-
});
|
|
9
|
-
});
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
const { merge } = require("webpack-merge");
|
|
2
|
-
const singleSpaDefaults = require("webpack-config-single-spa-react");
|
|
3
|
-
const path = require("path");
|
|
4
|
-
|
|
5
|
-
function resolve(dir) {
|
|
6
|
-
return path.join(__dirname, "..", dir);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
module.exports = (webpackConfigEnv, argv) => {
|
|
10
|
-
const defaultConfig = singleSpaDefaults({
|
|
11
|
-
orgName: "openc3",
|
|
12
|
-
projectName: "<%= tool_name %>",
|
|
13
|
-
webpackConfigEnv,
|
|
14
|
-
argv,
|
|
15
|
-
orgPackagesAsExternal: false,
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
delete defaultConfig.externals;
|
|
19
|
-
|
|
20
|
-
return merge(defaultConfig, {
|
|
21
|
-
output: {
|
|
22
|
-
path: path.resolve(__dirname, "tools/<%= tool_name %>"),
|
|
23
|
-
filename: "main.js",
|
|
24
|
-
libraryTarget: "system", // This line is in all the vue.config.js files, is it needed here?
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
};
|