Timestrip Plan view troubleshooting #4380
Replies: 3 comments 1 reply
-
Hi @iSagnik , I saw your message and found this discussion. I started experimenting with the Plan and managed to create something similar to the demo. A few things I noticed:
{
"rover": [
{
"start": 1641074586129,
"end": 1642842186129,
"name": "Rover Surface Operations",
"type": "rover"
},
{
"start": 1641074586129,
"end": 1641171786129,
"name": "Post-landing shakedown",
"type": "rover",
"color": "lightpink",
"textColor": "black"
},
{
"start": 1641171786129,
"end": 1641823386129,
"name": "Lander Egress",
"type": "rover",
"color": "lightsalmon",
"textColor": "black"
},
{
"start": 1641823386129,
"end": 1641996186129,
"name": "Driving",
"type": "rover",
"color": "lightseagreen",
"textColor": "black"
},
{
"start": 1641996186129,
"end": 1642010766129,
"name": "Drilling",
"type": "rover",
"color": "lightskyblue",
"textColor": "black"
},
{
"start": 1642010766129,
"end": 1642842186129,
"name": "Sample Analysis",
"type": "rover",
"color": "lightslategrey",
"textColor": "white"
}
]
} If you create a Plan with the JSON from above and export its parent as JSON, you'll see that it's linked to a domain object that looks like this: "013d4086-cfc6-4b3c-8af2-3ce7571196c0": {
"identifier": {
"key": "013d4086-cfc6-4b3c-8af2-3ce7571196c0",
"namespace": ""
},
"name": "Rover Plan",
"type": "plan",
"selectFile": {
"name": "rover.json",
"body": "{\n \"rover\": [\n {\n \"start\": 1641074586129,\n \"end\": 1642842186129,\n \"name\": \"Rover Surface Operations\",\n \"type\": \"rover\"\n },\n {\n \"start\": 1641074586129,\n \"end\": 1641171786129,\n \"name\": \"Post-landing shakedown\",\n \"type\": \"rover\",\n \"color\": \"lightpink\",\n \"textColor\": \"black\"\n },\n {\n \"start\": 1641171786129,\n \"end\": 1641823386129,\n \"name\": \"Lander Egress\",\n \"type\": \"rover\",\n \"color\": \"lightsalmon\",\n \"textColor\": \"black\"\n },\n {\n \"start\": 1641823386129,\n \"end\": 1641996186129,\n \"name\": \"Driving\",\n \"type\": \"rover\",\n \"color\": \"lightseagreen\",\n \"textColor\": \"black\"\n },\n {\n \"start\": 1641996186129,\n \"end\": 1642010766129,\n \"name\": \"Drilling\",\n \"type\": \"rover\",\n \"color\": \"lightskyblue\",\n \"textColor\": \"black\"\n },\n {\n \"start\": 1642010766129,\n \"end\": 1642842186129,\n \"name\": \"Sample Analysis\",\n \"type\": \"rover\",\n \"color\": \"lightslategrey\",\n \"textColor\": \"white\"\n }\n ]\n}"
},
"modified": 1642985563829,
"location": "mine",
"persisted": 1642985563831,
"locked": false
} You may be able to dynamically update the |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for your response! That looks really promising but I am
still unsure about how to actually add a component like that to my OpenMCT
view. I have looked at the provider and domain object documentation and am
having trouble understanding what the flow is for adding custom or built in
plugins to the openmct dashboard. Could you please elaborate on that front?
…On Sun, Jan 23, 2022 at 8:45 PM tobiasbrown ***@***.***> wrote:
Hi @iSagnik <https://github.com/iSagnik> , I saw your message
<#4616 (comment)>
and found this discussion. I started experimenting with the Plan and
managed to create something similar to the demo.
[image: Screen Shot 2022-01-24 at 11 20 44 am]
<https://user-images.githubusercontent.com/2645932/150704324-6ecc58b7-47a0-4777-8889-a6590c8aed0f.png>
A few things I noticed:
- You may need to update your start and end times to use milliseconds
(eg. new Date('2022-01-22T09:03:06.129Z').getTime()).
- Fixed Timespan needs to be selected with start and end times that
overlap with the plan's start and end times.
- Try use textColor
<https://github.com/nasa/openmct/blob/master/src/plugins/plan/Plan.vue#L294>
instead of text_color.
{
"rover": [
{
"start": 1641074586129,
"end": 1642842186129,
"name": "Rover Surface Operations",
"type": "rover"
},
{
"start": 1641074586129,
"end": 1641171786129,
"name": "Post-landing shakedown",
"type": "rover",
"color": "lightpink",
"textColor": "black"
},
{
"start": 1641171786129,
"end": 1641823386129,
"name": "Lander Egress",
"type": "rover",
"color": "lightsalmon",
"textColor": "black"
},
{
"start": 1641823386129,
"end": 1641996186129,
"name": "Driving",
"type": "rover",
"color": "lightseagreen",
"textColor": "black"
},
{
"start": 1641996186129,
"end": 1642010766129,
"name": "Drilling",
"type": "rover",
"color": "lightskyblue",
"textColor": "black"
},
{
"start": 1642010766129,
"end": 1642842186129,
"name": "Sample Analysis",
"type": "rover",
"color": "lightslategrey",
"textColor": "white"
}
]
}
If you create a Plan with the JSON from above and export its parent as
JSON, you'll see that it's linked to a domain object that looks like this:
"013d4086-cfc6-4b3c-8af2-3ce7571196c0": {
"identifier": {
"key": "013d4086-cfc6-4b3c-8af2-3ce7571196c0",
"namespace": ""
},
"name": "Rover Plan",
"type": "plan",
"selectFile": {
"name": "rover.json",
"body": "{\n \"rover\": [\n {\n \"start\": 1641074586129,\n \"end\": 1642842186129,\n \"name\": \"Rover Surface Operations\",\n \"type\": \"rover\"\n },\n {\n \"start\": 1641074586129,\n \"end\": 1641171786129,\n \"name\": \"Post-landing shakedown\",\n \"type\": \"rover\",\n \"color\": \"lightpink\",\n \"textColor\": \"black\"\n },\n {\n \"start\": 1641171786129,\n \"end\": 1641823386129,\n \"name\": \"Lander Egress\",\n \"type\": \"rover\",\n \"color\": \"lightsalmon\",\n \"textColor\": \"black\"\n },\n {\n \"start\": 1641823386129,\n \"end\": 1641996186129,\n \"name\": \"Driving\",\n \"type\": \"rover\",\n \"color\": \"lightseagreen\",\n \"textColor\": \"black\"\n },\n {\n \"start\": 1641996186129,\n \"end\": 1642010766129,\n \"name\": \"Drilling\",\n \"type\": \"rover\",\n \"color\": \"lightskyblue\",\n \"textColor\": \"black\"\n },\n {\n \"start\": 1642010766129,\n \"end\": 1642842186129,\n \"name\": \"Sample Analysis\",\n \"type\": \"rover\",\n \"color\": \"lightslategrey\",\n \"textColor\": \"white\"\n }\n ]\n}"
},
"modified": 1642985563829,
"location": "mine",
"persisted": 1642985563831,
"locked": false
}
You may be able to dynamically update the body with JSON from your data
source. Hope that helps.
—
Reply to this email directly, view it on GitHub
<#4380 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALUF6242QWKPGQIGB4DQIATUXSVMFANCNFSM5GY6QN7Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
@iSagnik What are you trying to do exactly? Create a custom plugin and have it appear in Open MCT? |
Beta Was this translation helpful? Give feedback.
-
I am trying to build a timeline view of the different segments on our engine test and I am having a very hard time finding any information on how to use the Time strip - plan components.
I managed to pull up a view with segments and their times hardcoded. However, I would like to set up my JSON with relative time intervals with the first event starting with a trigger. Is there any documentation I can refer to for this? The demo has the exact component and configs I am trying to build.
Any info on this would be great!
Questions:
Example JSON I currently have:
{ "compiler1": [ { "name": "example_section", "start": 2, "end": 52, "type": "compiler1", "color": "fuchsia", "text_color": "black" }, { "name": "new", "start": 52, "end": 102, "type": "compiler1", "color": "fuchsia", "text_color": "black" }, { "name": "inner", "start": 58, "end": 68, "type": "compiler1", "color": "blue", "text_color": "black" }, { "name": "inner", "start": 68, "end": 78, "type": "compiler1", "color": "blue", "text_color": "black" } ] }
Beta Was this translation helpful? Give feedback.
All reactions