mirror of
https://github.com/nasa/openmct.git
synced 2025-06-24 02:04:02 +00:00
236 lines
7.8 KiB
HTML
236 lines
7.8 KiB
HTML
<!--
|
|
Open MCT, Copyright (c) 2014-2024, United States Government
|
|
as represented by the Administrator of the National Aeronautics and Space
|
|
Administration. All rights reserved.
|
|
|
|
Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
"License"); you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
http://www.apache.org/licenses/LICENSE-2.0.
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
License for the specific language governing permissions and limitations
|
|
under the License.
|
|
|
|
Open MCT includes source code licensed under additional open source
|
|
licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
this source code distribution or the Licensing information page available
|
|
at runtime from the About dialog for additional information.
|
|
-->
|
|
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<!-- Modified viewport meta tag to improve accessibility -->
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" />
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<title>Open MCT</title>
|
|
<script src="dist/openmct.js"></script>
|
|
<link
|
|
rel="icon"
|
|
type="image/png"
|
|
href="dist/favicons/favicon-96x96.png"
|
|
sizes="96x96"
|
|
type="image/x-icon"
|
|
/>
|
|
<link
|
|
rel="icon"
|
|
type="image/png"
|
|
href="dist/favicons/favicon-32x32.png"
|
|
sizes="32x32"
|
|
type="image/x-icon"
|
|
/>
|
|
<link
|
|
rel="icon"
|
|
type="image/png"
|
|
href="dist/favicons/favicon-16x16.png"
|
|
sizes="16x16"
|
|
type="image/x-icon"
|
|
/>
|
|
<style>
|
|
@keyframes splash-spinner {
|
|
0% {
|
|
transform: translate(-50%, -50%) rotate(0deg);
|
|
}
|
|
100% {
|
|
transform: translate(-50%, -50%) rotate(360deg);
|
|
}
|
|
}
|
|
|
|
#splash-screen {
|
|
background-color: black;
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
z-index: 10000;
|
|
}
|
|
|
|
#splash-screen:before {
|
|
animation-name: splash-spinner;
|
|
animation-duration: 0.5s;
|
|
animation-iteration-count: infinite;
|
|
animation-timing-function: linear;
|
|
border-radius: 50%;
|
|
border-color: rgba(255, 255, 255, 0.25);
|
|
border-top-color: white;
|
|
border-style: solid;
|
|
border-width: 10px;
|
|
content: '';
|
|
display: block;
|
|
opacity: 0.25;
|
|
position: absolute;
|
|
left: 50%;
|
|
top: 50%;
|
|
height: 100px;
|
|
width: 100px;
|
|
}
|
|
</style>
|
|
<script defer>
|
|
const THIRTY_SECONDS = 30 * 1000;
|
|
const ONE_MINUTE = THIRTY_SECONDS * 2;
|
|
const FIVE_MINUTES = ONE_MINUTE * 5;
|
|
const FIFTEEN_MINUTES = FIVE_MINUTES * 3;
|
|
const THIRTY_MINUTES = FIFTEEN_MINUTES * 2;
|
|
const ONE_HOUR = THIRTY_MINUTES * 2;
|
|
const TWO_HOURS = ONE_HOUR * 2;
|
|
const ONE_DAY = ONE_HOUR * 24;
|
|
|
|
openmct.install(openmct.plugins.LocalStorage());
|
|
|
|
openmct.install(openmct.plugins.example.Generator());
|
|
openmct.install(openmct.plugins.example.EventGeneratorPlugin());
|
|
openmct.install(openmct.plugins.example.ExampleImagery());
|
|
openmct.install(openmct.plugins.example.ExampleTags());
|
|
|
|
openmct.install(openmct.plugins.Espresso());
|
|
openmct.install(openmct.plugins.MyItems());
|
|
openmct.install(
|
|
openmct.plugins.PlanLayout({
|
|
creatable: true
|
|
})
|
|
);
|
|
openmct.install(openmct.plugins.Timeline());
|
|
openmct.install(openmct.plugins.Hyperlink());
|
|
openmct.install(openmct.plugins.UTCTimeSystem());
|
|
openmct.install(
|
|
openmct.plugins.AutoflowView({
|
|
type: 'telemetry.panel'
|
|
})
|
|
);
|
|
openmct.install(
|
|
openmct.plugins.DisplayLayout({
|
|
showAsView: ['summary-widget', 'example.imagery']
|
|
})
|
|
);
|
|
openmct.install((openmct) => {
|
|
openmct.time.addTimeSystem({
|
|
key: 'µs',
|
|
name: 'microseconds',
|
|
cssClass: 'icon-clock',
|
|
timeFormat: 'µsf',
|
|
durationFormat: 'duration',
|
|
isUTCBased: true
|
|
});
|
|
});
|
|
openmct.install((openmct) => {
|
|
function getµsComponent(text) {
|
|
return text.substring(23, text.length - 1);
|
|
}
|
|
function getDecimalPart(floatOrInteger) {
|
|
return (floatOrInteger * 1000) - Math.floor(floatOrInteger) * 1000;
|
|
}
|
|
openmct.telemetry.addFormat({
|
|
key: 'µsf',
|
|
parse(text) {
|
|
if (typeof text === 'number' || text === undefined) {
|
|
return text;
|
|
} else {
|
|
if (!text.endsWith("Z")) {
|
|
throw new Error("Only supports Zulu timestamps");
|
|
}
|
|
const µsPart = getµsComponent(text).padEnd(3, '0');
|
|
const msPrecisionNumber = Date.parse(text);
|
|
const µsPrecisionNumber = msPrecisionNumber + (Number.parseInt(µsPart, 10) / 1000);
|
|
|
|
return µsPrecisionNumber;
|
|
}
|
|
},
|
|
format(number) {
|
|
if (typeof number === "number"){
|
|
let dateText = new Date(number).toISOString();
|
|
|
|
if (!Number.isInteger(number)) {
|
|
// Append microseconds to the end
|
|
dateText = dateText.substring(dateText.length - 2) + getDecimalPart(number).toString().padStart(3, '0') + 'Z';
|
|
}
|
|
|
|
return dateText;
|
|
} else {
|
|
return number;
|
|
}
|
|
}
|
|
})
|
|
});
|
|
openmct.install(openmct.plugins.Conductor({
|
|
menuOptions: [
|
|
{
|
|
name: "Fixed",
|
|
timeSystem: 'utc',
|
|
bounds: {
|
|
start: Date.parse("2025-05-02T15:33:00Z"),
|
|
end: Date.parse("2025-05-06T02:53:00Z")
|
|
}
|
|
},
|
|
{
|
|
name: "Realtime",
|
|
timeSystem: 'utc',
|
|
clock: 'local',
|
|
clockOffsets: {
|
|
start: -THIRTY_MINUTES,
|
|
end: 0
|
|
}
|
|
},
|
|
{
|
|
name: "Realtime",
|
|
timeSystem: 'µs',
|
|
clock: 'local',
|
|
clockOffsets: {
|
|
start: -THIRTY_MINUTES,
|
|
end: 0
|
|
}
|
|
}
|
|
]
|
|
}));
|
|
openmct.time.setBounds({start: Date.parse("2025-05-02T15:33:00Z"), end: Date.parse("2025-05-06T02:53:00Z")});
|
|
openmct.install(openmct.plugins.StaticRootPlugin({namespace: 'static', exportUrl:'/favicons/test-condition-set.json'}))
|
|
openmct.install(openmct.plugins.SummaryWidget());
|
|
openmct.install(openmct.plugins.Notebook());
|
|
openmct.install(openmct.plugins.LADTable());
|
|
openmct.install(openmct.plugins.Filters(['table', 'telemetry.plot.overlay']));
|
|
openmct.install(openmct.plugins.ObjectMigration());
|
|
openmct.install(
|
|
openmct.plugins.ClearData(
|
|
['table', 'telemetry.plot.overlay', 'telemetry.plot.stacked', 'example.imagery'],
|
|
{ indicator: true }
|
|
)
|
|
);
|
|
openmct.install(openmct.plugins.Clock({ enableClockIndicator: true }));
|
|
openmct.install(openmct.plugins.Timer());
|
|
openmct.install(openmct.plugins.Timelist());
|
|
openmct.install(openmct.plugins.BarChart());
|
|
openmct.install(openmct.plugins.ScatterPlot());
|
|
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
openmct.start();
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="app"></div>
|
|
</body>
|
|
</html>
|