OpenC3/cosmos

View on GitHub
docs/assets/js/13196248.63bb9020.js

Summary

Maintainability
A
0 mins
Test Coverage
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[6677],{9107:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>c,default:()=>h,frontMatter:()=>s,metadata:()=>r,toc:()=>o});var i=a(4848),n=a(8453);const s={title:"Calendar (Enterprise)"},c=void 0,r={id:"tools/calendar",title:"Calendar (Enterprise)",description:"Introduction",source:"@site/docs/tools/calendar.md",sourceDirName:"tools",slug:"/tools/calendar",permalink:"/docs/tools/calendar",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/tools/calendar.md",tags:[],version:"current",frontMatter:{title:"Calendar (Enterprise)"},sidebar:"defaultSidebar",previous:{title:"Bucket Explorer",permalink:"/docs/tools/bucket-explorer"},next:{title:"Command Sender",permalink:"/docs/tools/cmd-sender"}},d={},o=[{value:"Introduction",id:"introduction",level:2},{value:"Adding Timelines",id:"adding-timelines",level:3},{value:"Types of Events",id:"types-of-events",level:2},{value:"Metadata",id:"metadata",level:3},{value:"Note",id:"note",level:3},{value:"Activity",id:"activity",level:3},{value:"Timeline Implementation Details",id:"timeline-implementation-details",level:2}];function l(e){const t={h2:"h2",h3:"h3",img:"img",p:"p",...(0,n.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h2,{id:"introduction",children:"Introduction"}),"\n",(0,i.jsx)(t.p,{children:"Calendar visualizes metadata, notes, and timeline information in one easy to understand place. Timelines allow for the simple execution of commands and scripts based on future dates and times."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Calendar",src:a(4987).A+"",width:"1271",height:"707"})}),"\n",(0,i.jsx)(t.h3,{id:"adding-timelines",children:"Adding Timelines"}),"\n",(0,i.jsx)(t.p,{children:"Adding a Timeline to COSMOS is as simple as clicking Create -> Timeline and giving it a unique name. Timelines can be created for organizational purposes or for overlapping activities as no activities can overlap on a given timeline. However, each additional timeline consists of several threads so only create timelines as necessary."}),"\n",(0,i.jsx)(t.h2,{id:"types-of-events",children:"Types of Events"}),"\n",(0,i.jsx)(t.h3,{id:"metadata",children:"Metadata"}),"\n",(0,i.jsx)(t.p,{children:"Metadata allows you to record arbitrary data into the COSMOS system. For example, you could ask the user for inputs which fall outside the available target telemetry including operators, environmental factors, procedural steps, etc. This allows for searching metadata based on these fields and correlating the related telemetry data."}),"\n",(0,i.jsx)(t.p,{children:"You can create a new metadata item from either the Create menu or by right-clicking on the calendar in the given time slot you want the metadata item to appear. Note that metadata entries only have a start time, they do not have an end time."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"CreateMetadata1",src:a(4317).A+"",width:"594",height:"440"})}),"\n",(0,i.jsx)(t.p,{children:"You then add key / value pairs for all the metadata items you want to create."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"CreateMetadata2",src:a(313).A+"",width:"594",height:"443"})}),"\n",(0,i.jsx)(t.h3,{id:"note",children:"Note"}),"\n",(0,i.jsx)(t.p,{children:"Notes require both a start and end time."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"CreateNote1",src:a(2372).A+"",width:"594",height:"431"})}),"\n",(0,i.jsx)(t.p,{children:"You then record the note to create the note event on the calendar."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"CreateNote2",src:a(9231).A+"",width:"594",height:"405"})}),"\n",(0,i.jsx)(t.h3,{id:"activity",children:"Activity"}),"\n",(0,i.jsx)(t.p,{children:"Scheduled on a timeline, activities take both a start and end time."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"CreateActivity1",src:a(8741).A+"",width:"596",height:"476"})}),"\n",(0,i.jsx)(t.p,{children:'Activities can run single commands, run a script, or simply "Reserve" space on the calendar for reference or other bookkeeping.'}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"CreateActivity2",src:a(9966).A+"",width:"596",height:"340"})}),"\n",(0,i.jsx)(t.p,{children:"When calendar activities are scheduled they appear with a green circle containing a plus (+). Once they complete successfully the icon changes to a green circle containing a checkbox (\u2713). Reserve activities simply have a blank green circle."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Calendar",src:a(2498).A+"",width:"1274",height:"755"})}),"\n",(0,i.jsx)(t.p,{children:"Calendar events can also be viewed in a list format via File->Show Table Display which supports pagination for listing both past and future events."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"List View",src:a(134).A+"",width:"1231",height:"684"})}),"\n",(0,i.jsx)(t.h2,{id:"timeline-implementation-details",children:"Timeline Implementation Details"}),"\n",(0,i.jsx)(t.p,{children:"When a user creates a timeline, a new timeline microservice starts. The timeline microservice is the main thread of execution for the timeline. This starts a scheduler manager thread. The scheduler manager thread contains a thread pool that hosts more than one thread to run the activity. The scheduler manager will evaluate the schedule and based on the start time of the activity it will add the activity to the queue."}),"\n",(0,i.jsx)(t.p,{children:'The main thread will block on the web socket to listen to request changes to the timeline, these could be adding, removing, or updating activities. The main thread will make the changes to the in memory schedule if these changes are within the hour of the current time. When the web socket gets an update it has an action lookup table. These actions are "created", "updated", "deleted", etc... Some actions require updating the schedule from the database to ensure the schedule and the database are always in sync.'}),"\n",(0,i.jsx)(t.p,{children:"The schedule thread checks every second to make sure if a task can be run. If the start time is equal or less then the last 15 seconds it will then check the previously queued jobs list in the schedule. If the activity has not been queued and is not fulfilled the activity will be queued, this adds an event to the activity but is not saved to the database."}),"\n",(0,i.jsx)(t.p,{children:"The workers block on the queue until an activity is placed on the queue. Once a job is pulled from the queue they check the type and run the activity. The thread will mark the activity fulfillment true and update the database record with the complete. If the worker gets an error while trying to run the task the activity will NOT be fulfilled and record the error in the database."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Timeline Lifecycle",src:a(1976).A+"",width:"1065",height:"514"})})]})}function h(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},4987:(e,t,a)=>{a.d(t,{A:()=>i});const i=a.p+"assets/images/blank_calendar-70e605942120937b862bd7039348229bab9af1f9c93d356ddbf401a3e8543c74.png"},2498:(e,t,a)=>{a.d(t,{A:()=>i});const i=a.p+"assets/images/calendar-dacbcbb05175c76f3406b4aaade0465444c20b72e93366c79fed1f6eec018c42.png"},8741:(e,t,a)=>{a.d(t,{A:()=>i});const i=a.p+"assets/images/create_activity1-c05ffc03af2df852aeb3ad246f53f259af504e0e6c64cdac21f9126947c49f95.png"},9966:(e,t,a)=>{a.d(t,{A:()=>i});const i=a.p+"assets/images/create_activity2-58c7da6f79dd510701148c0c54fae02c830b9ca4af662a7b132987ed3410a8f7.png"},4317:(e,t,a)=>{a.d(t,{A:()=>i});const i=a.p+"assets/images/create_metadata1-a331ba8f0bd19bf5f8d7f2e083c3c7164e9b7b9936f5a7f83c4141c62a6c46f6.png"},313:(e,t,a)=>{a.d(t,{A:()=>i});const i=a.p+"assets/images/create_metadata2-c57b5420d5469b48289030ed7c64758539c2319dc742159caa0d4c8fe35050a8.png"},2372:(e,t,a)=>{a.d(t,{A:()=>i});const i=a.p+"assets/images/create_note1-472b93e8e0e3e66a2e6198e0d4573cdc38cc356df87be66163f990f18137f6c0.png"},9231:(e,t,a)=>{a.d(t,{A:()=>i});const i=a.p+"assets/images/create_note2-770501a149ef4aabae24d0b636f46ed61fbdcfda9537c61637c07c60257e9228.png"},134:(e,t,a)=>{a.d(t,{A:()=>i});const i=a.p+"assets/images/list_view-2f36ce06962e67d5a4f1f060956e5089b3f13c8ab57f33103c3781687611e7a9.png"},1976:(e,t,a)=>{a.d(t,{A:()=>i});const i=a.p+"assets/images/timeline_lifecycle-0bd916dee06bf67936b043abfdbc4d5fdec7cc5a32a889ee6c05e9faf74f4c6a.png"},8453:(e,t,a)=>{a.d(t,{R:()=>c,x:()=>r});var i=a(6540);const n={},s=i.createContext(n);function c(e){const t=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:c(e.components),i.createElement(s.Provider,{value:t},e.children)}}}]);