Skip to content

Commit

Permalink
Merge pull request #29 from gemini-hlsw/SCHED-612
Browse files Browse the repository at this point in the history
SCHED 612: Add startTime to table
  • Loading branch information
stroncod authored Feb 14, 2024
2 parents f5d3964 + 77f315d commit 90fe0e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 5 additions & 2 deletions src/components/Results/TimeEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function TimeEntry({ timeEntry, mornTwilight, eveTwilight, site }
instrument: visit.instrument
}))
};

const tz = site ==='GN' ? 'Pacific/Honolulu' : 'America/Santiago';
const formatScore = (score: number) => {
return score.toFixed(2)
};
Expand All @@ -45,7 +45,9 @@ export default function TimeEntry({ timeEntry, mornTwilight, eveTwilight, site }
return percentage;
}


const startTimeBodyTemplate =(visit: Visit) => {
return new Date(visit.startTime).toLocaleString('en-UK', {timeZone: tz})
};
const obsClassBodyTemplate = (visit: Visit) => {
return <Tag value={visit.obsClass} severity={getSeverity(visit)}></Tag>;
};
Expand Down Expand Up @@ -97,6 +99,7 @@ export default function TimeEntry({ timeEntry, mornTwilight, eveTwilight, site }
<DataTable value={timeEntry.plan.visits} tableStyle={{ minWidth: '50rem' }}>
<Column field="obsId" header="Observation ID"> </Column>
<Column header="Observation Class" body={obsClassBodyTemplate}></Column>
<Column header="Start Time" body={startTimeBodyTemplate}></Column>
<Column field="atomStartIdx" header="Atom Start"> </Column>
<Column field="atomEndIdx" header="Atom End"> </Column>
<Column header="Obs Completion" body={obsCompletionBodyTemplate}> </Column>
Expand Down
6 changes: 2 additions & 4 deletions src/components/SchedulerPlot/SchedulerPlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@ const AltAzPlot: React.FC<AltAzPlotProps> = ({ data, eveTwilight, mornTwilight,

chart.update({
series: seriesData,
xAxis: {
type: "datetime",
},
yAxis: {},
});

// Render custom labels for each section
Expand Down Expand Up @@ -198,6 +194,8 @@ const AltAzPlot: React.FC<AltAzPlotProps> = ({ data, eveTwilight, mornTwilight,
},
},
gridLineColor: gridLineColor, // Change the color of horizontal grid lines
min: 0,
max: 90,
},
legend: {
enabled: true,
Expand Down

0 comments on commit 90fe0e1

Please sign in to comment.