From b08ef64c93d48cf79030e1ceec91c12c9b5e474d Mon Sep 17 00:00:00 2001 From: Anil Natha Date: Fri, 8 Dec 2023 16:06:58 -0800 Subject: [PATCH 01/10] Restructured forms to accommodate L1A and L1B job forms. the /jobs/new endpoint now lists the available applications a job can be executed against, with endpoints for each application job execution form (e.g /jobs/new/chirp-rebinning). --- src/Root.tsx | 6 + src/routes/jobs/monitoring/index.css | 8 + src/routes/jobs/monitoring/index.tsx | 4 +- src/routes/jobs/new/chirp-rebinning/index.css | 0 src/routes/jobs/new/chirp-rebinning/index.tsx | 276 ++++++++++++++++++ src/routes/jobs/new/index.css | 23 +- src/routes/jobs/new/index.tsx | 250 +--------------- src/routes/jobs/new/l1a/index.css | 0 src/routes/jobs/new/l1a/index.tsx | 263 +++++++++++++++++ src/routes/jobs/new/l1b/index.css | 0 src/routes/jobs/new/l1b/index.tsx | 263 +++++++++++++++++ 11 files changed, 852 insertions(+), 241 deletions(-) create mode 100644 src/routes/jobs/new/chirp-rebinning/index.css create mode 100644 src/routes/jobs/new/chirp-rebinning/index.tsx create mode 100644 src/routes/jobs/new/l1a/index.css create mode 100644 src/routes/jobs/new/l1a/index.tsx create mode 100644 src/routes/jobs/new/l1b/index.css create mode 100644 src/routes/jobs/new/l1b/index.tsx diff --git a/src/Root.tsx b/src/Root.tsx index b63c472..a7fd644 100644 --- a/src/Root.tsx +++ b/src/Root.tsx @@ -6,6 +6,9 @@ import { import Home from "./routes/home" import JobMonitoring from "./routes/jobs/monitoring"; import NewJob from "./routes/jobs/new"; +import NewJobChirpRebinning from "./routes/jobs/new/chirp-rebinning"; +import NewJobL1A from "./routes/jobs/new/l1a"; +import NewJobL1B from "./routes/jobs/new/l1b"; import Navbar from "./components/Navbar" import WebView from "./components/WebView"; @@ -21,6 +24,9 @@ function Root() { } /> } /> } /> + } /> + } /> + } /> } /> diff --git a/src/routes/jobs/monitoring/index.css b/src/routes/jobs/monitoring/index.css index c037947..88af009 100644 --- a/src/routes/jobs/monitoring/index.css +++ b/src/routes/jobs/monitoring/index.css @@ -8,4 +8,12 @@ .job-detail-item { padding-bottom: 8px; word-wrap: break-word; +} + +.button-bar button { + margin-right: 10px; +} + +.button-bar button:last-child { + margin-right: 0px; } \ No newline at end of file diff --git a/src/routes/jobs/monitoring/index.tsx b/src/routes/jobs/monitoring/index.tsx index 8c94542..1d4c311 100644 --- a/src/routes/jobs/monitoring/index.tsx +++ b/src/routes/jobs/monitoring/index.tsx @@ -155,7 +155,9 @@ function JobMonitoring() {

Job Monitoring

- +
+ +
(); + const [submittingJob, setSubmittingJob] = useState(false); + const tokens = getTokens(); + const meta:{ [key: string]: string} = { + "description": "Create New Chirp Rebinning Job", + "title": "Create New Chirp Rebinning Job", + } + + const handleChange = (e:Event & { target: HTMLInputElement}) => { + setForm({ + ...form, + [e.target.id]: e.target.value, + }); + }; + + const handleReset = () => { + setForm(JOB_FORM_INITIAL_STATE); + } + + const setStopDate = () => { + + const endDate = addDays(new Date(form.input_cmr_search_start_time), 16); + + const year = endDate.toLocaleString("default", { year: "numeric" }); + const month = endDate.toLocaleString("default", { month: "2-digit" }); + const day = endDate.toLocaleString("default", { day: "2-digit" }); + const formattedEndDate = year + "-" + month + "-" + day; + + setForm({ + ...form, + ["input_cmr_search_stop_time"]: formattedEndDate + }) + + } + + const addDays = function(date:Date, days:number) { + date.setDate(date.getDate() + days); + return date; + } + + const handleSubmit = async (e:React.FormEvent) => { + + e.preventDefault(); + setSubmittingJob(true); + + const data = { + "mode": "async", + "response": "document", + "inputs": [ + { + "id": "input_processing_labels", + "data": form.input_processing_labels.split(",") + }, + { + "id": "input_cmr_collection_name", + "data": form.input_cmr_collection_name + }, + { + "id": "input_cmr_search_start_time", + "data": form.input_cmr_search_start_time + }, + { + "id": "input_cmr_search_stop_time", + "data": form.input_cmr_search_stop_time + }, + { + "id": "input_cmr_edl_user", + "data": form.input_cmr_edl_user + }, + { + "id": "input_cmr_edl_pass", + "data": form.input_cmr_edl_pass + }, + { + "id": "output_collection_id", + "data": form.output_collection_id + }, + { + "id": "output_data_bucket", + "data": form.output_data_bucket + }, + { + "id": "input_daac_collection_shortname", + "data": form.input_daac_collection_shortname + }, + { + "id": "input_daac_collection_sns", + "data": form.input_daac_collection_sns + } + ], + "outputs": [ + { + "id": "output", + "transmissionMode": "reference" + } + ] + } + + await fetch( + processEndpoint + "/" + process.id + ":" + process.version + "/jobs", + { + method: "POST", + headers: { + "Authorization": "Bearer " + tokens.accessToken, + "Content-Type": "application/json", + }, + body: JSON.stringify(data) + } + ).then( (response:Response) => { + + + if( response.ok ) { + const jobID:string | undefined = response.headers.get("Location")?.replace("http://127.0.0.1:5000/processes/" + process.id.toString() + ":" + process.version.toString() + "/jobs/","") + setNewJobID(jobID); + setSubmittingJob(false); + } + + }).catch( (error:Error) => { + console.debug("Error", error.message); + setSubmittingJob(false); + }) + + handleReset() + + } + + return ( + <> + +
+

{meta["title"]}

+ Back to application selection +
+

Job Parameters

+ { newJobId && + <> +
Your job request was submitted successfully!
+
Your Job ID is {newJobId}
+
+ + } + + + + + + + + +

+ + + + + +
+ + +
+ + +
+ + ) +} + +export default NewJobChirpRebinning; \ No newline at end of file diff --git a/src/routes/jobs/new/index.css b/src/routes/jobs/new/index.css index 4b2130a..4230d12 100644 --- a/src/routes/jobs/new/index.css +++ b/src/routes/jobs/new/index.css @@ -1,5 +1,26 @@ -form { +.app-list-container { width: 600px; background-color: white; padding: 24px; +} + +.app-list { + list-style-type: none; + padding: 0px; + margin: 0px; +} + +.app-list li { + margin-bottom: 20px; +} + +.app-list li:last-child { + margin-bottom: 0px; +} + +.job-form { + background-color: white; + margin-top: 24px; + padding: 4px 24px 24px 24px; + width: 600px; } \ No newline at end of file diff --git a/src/routes/jobs/new/index.tsx b/src/routes/jobs/new/index.tsx index 5d68645..0a69e77 100644 --- a/src/routes/jobs/new/index.tsx +++ b/src/routes/jobs/new/index.tsx @@ -1,169 +1,13 @@ -import { useState } from "react"; -import { Link } from "react-router-dom"; -import { Button, TextField } from "@nasa-jpl/react-stellar"; +import { useNavigate } from "react-router-dom"; +import { Button } from "@nasa-jpl/react-stellar"; import { DocumentMeta } from "../../../components/DocumentMeta/DocumentMeta"; -import Config from "../../../Config"; -import { getTokens } from '../../../AuthenticationWrapper'; import "./index.css" -const JOB_FORM_PAGE_LOAD_STATE = { - input_processing_labels: "label1, label2", - input_cmr_collection_name: "C2011289787-GES_DISC", - input_cmr_search_start_time: "2016-08-22T00:10:00Z", - input_cmr_search_stop_time: "2016-08-22T01:10:00Z", - input_cmr_edl_user: "cmr_user", - input_cmr_edl_pass: "cmr_pass", - output_collection_id: "urn:nasa:unity:uds_local_test:DEV1:CHRP_16_DAY_REBIN___1", - output_data_bucket: "uds-test-cumulus-sps", - input_daac_collection_shortname: "CHIRP_L1B", - input_daac_collection_sns: "arn:://SNS-arn" -} - -const JOB_FORM_INITIAL_STATE = { - input_processing_labels: "", - input_cmr_collection_name: "", - input_cmr_search_start_time: "", - input_cmr_search_stop_time: "", - input_cmr_edl_user: "cmr_user", - input_cmr_edl_pass: "cmr_pass", - output_collection_id: "", - output_data_bucket: "", - input_daac_collection_shortname: "CHIRP_L1B", - input_daac_collection_sns: "arn:://SNS-arn" -} - function NewJob() { - const processEndpoint = Config['sps']['endpoint'] + 'processes'; - const process:{ id:string, title:string, version:string} = { - id: "chirp", - title: "Chirp Rebinning Workflow", - version: "develop" - } - const [form, setForm] = useState(JOB_FORM_PAGE_LOAD_STATE); - const [newJobId, setNewJobID] = useState(); - const [submittingJob, setSubmittingJob] = useState(false); - const tokens = getTokens(); - - const handleChange = (e:Event & { target: HTMLInputElement}) => { - setForm({ - ...form, - [e.target.id]: e.target.value, - }); - }; - - const handleReset = () => { - setForm(JOB_FORM_INITIAL_STATE); - } - - const setStopDate = () => { - - const endDate = addDays(new Date(form.input_cmr_search_start_time), 16); - - const year = endDate.toLocaleString("default", { year: "numeric" }); - const month = endDate.toLocaleString("default", { month: "2-digit" }); - const day = endDate.toLocaleString("default", { day: "2-digit" }); - const formattedEndDate = year + "-" + month + "-" + day; - - setForm({ - ...form, - ["input_cmr_search_stop_time"]: formattedEndDate - }) - - } - - const addDays = function(date:Date, days:number) { - date.setDate(date.getDate() + days); - return date; - } - - const handleSubmit = async (e:React.FormEvent) => { - - e.preventDefault(); - setSubmittingJob(true); - - const data = { - "mode": "async", - "response": "document", - "inputs": [ - { - "id": "input_processing_labels", - "data": form.input_processing_labels.split(",") - }, - { - "id": "input_cmr_collection_name", - "data": form.input_cmr_collection_name - }, - { - "id": "input_cmr_search_start_time", - "data": form.input_cmr_search_start_time - }, - { - "id": "input_cmr_search_stop_time", - "data": form.input_cmr_search_stop_time - }, - { - "id": "input_cmr_edl_user", - "data": form.input_cmr_edl_user - }, - { - "id": "input_cmr_edl_pass", - "data": form.input_cmr_edl_pass - }, - { - "id": "output_collection_id", - "data": form.output_collection_id - }, - { - "id": "output_data_bucket", - "data": form.output_data_bucket - }, - { - "id": "input_daac_collection_shortname", - "data": form.input_daac_collection_shortname - }, - { - "id": "input_daac_collection_sns", - "data": form.input_daac_collection_sns - } - ], - "outputs": [ - { - "id": "output", - "transmissionMode": "reference" - } - ] - } - - await fetch( - processEndpoint + "/" + process.id + ":" + process.version + "/jobs", - { - method: "POST", - headers: { - "Authorization": "Bearer " + tokens.accessToken, - "Content-Type": "application/json", - }, - body: JSON.stringify(data) - } - ).then( (response:Response) => { - - - if( response.ok ) { - const jobID:string | undefined = response.headers.get("Location")?.replace("http://127.0.0.1:5000/processes/" + process.id.toString() + ":" + process.version.toString() + "/jobs/","") - setNewJobID(jobID); - setSubmittingJob(false); - } - - }).catch( (error:Error) => { - console.debug("Error", error.message); - setSubmittingJob(false); - }) - - handleReset() - - } - + const navigate = useNavigate(); + return ( <>

Create New Job

-
- -

{process.title}

- { newJobId && - <> -
Your job request was submitted successfully!
-
Your Job ID is {newJobId}
-
- - } - - - - - - - - -

- - - - - -
- - -
- - +
+
    +
  • +
  • +
  • +
+
) diff --git a/src/routes/jobs/new/l1a/index.css b/src/routes/jobs/new/l1a/index.css new file mode 100644 index 0000000..e69de29 diff --git a/src/routes/jobs/new/l1a/index.tsx b/src/routes/jobs/new/l1a/index.tsx new file mode 100644 index 0000000..edfb606 --- /dev/null +++ b/src/routes/jobs/new/l1a/index.tsx @@ -0,0 +1,263 @@ +import { useState } from "react"; +import { Link } from "react-router-dom"; +import { Button, TextField } from "@nasa-jpl/react-stellar"; +import { DocumentMeta } from "../../../../components/DocumentMeta/DocumentMeta"; +import Config from "../../../../Config"; +import { getTokens } from "../../../../AuthenticationWrapper"; + +import "./index.css" + +const JOB_FORM_PAGE_LOAD_STATE = { + input_processing_labels: "", + input_cmr_collection_name: "", + input_cmr_search_start_time: "", + input_cmr_search_stop_time: "", + input_cmr_edl_user: "cmr_user", + input_cmr_edl_pass: "cmr_pass", + output_collection_id: "", + output_data_bucket: "", + input_daac_collection_shortname: "CHIRP_L1B", + input_daac_collection_sns: "arn:://SNS-arn" +} + +const JOB_FORM_INITIAL_STATE = { + input_processing_labels: "", + input_cmr_collection_name: "", + input_cmr_search_start_time: "", + input_cmr_search_stop_time: "", + input_cmr_edl_user: "cmr_user", + input_cmr_edl_pass: "cmr_pass", + output_collection_id: "", + output_data_bucket: "", + input_daac_collection_shortname: "CHIRP_L1B", + input_daac_collection_sns: "arn:://SNS-arn" +} + +function NewJobL1A() { + + const processEndpoint = Config['sps']['endpoint'] + 'processes'; + const process:{ id:string, title:string, version:string} = { + id: "chirp", + title: "L1A Job", + version: "develop" + } + const [form, setForm] = useState(JOB_FORM_PAGE_LOAD_STATE); + const [newJobId, setNewJobID] = useState(); + const [submittingJob, setSubmittingJob] = useState(false); + const tokens = getTokens(); + const meta:{ [key: string]: string} = { + "description": "Create New L1A Job", + "title": "Create New L1A Job", + } + + const handleChange = (e:Event & { target: HTMLInputElement}) => { + setForm({ + ...form, + [e.target.id]: e.target.value, + }); + }; + + const handleReset = () => { + setForm(JOB_FORM_INITIAL_STATE); + } + + const setStopDate = () => { + + const endDate = addDays(new Date(form.input_cmr_search_start_time), 16); + + const year = endDate.toLocaleString("default", { year: "numeric" }); + const month = endDate.toLocaleString("default", { month: "2-digit" }); + const day = endDate.toLocaleString("default", { day: "2-digit" }); + const formattedEndDate = year + "-" + month + "-" + day; + + setForm({ + ...form, + ["input_cmr_search_stop_time"]: formattedEndDate + }) + + } + + const addDays = function(date:Date, days:number) { + date.setDate(date.getDate() + days); + return date; + } + + const handleSubmit = async (e:React.FormEvent) => { + + e.preventDefault(); + setSubmittingJob(true); + + const data = { + "mode": "async", + "response": "document", + "inputs": [ + { + "id": "input_processing_labels", + "data": form.input_processing_labels.split(",") + }, + { + "id": "input_cmr_collection_name", + "data": form.input_cmr_collection_name + }, + { + "id": "input_cmr_search_start_time", + "data": form.input_cmr_search_start_time + }, + { + "id": "input_cmr_search_stop_time", + "data": form.input_cmr_search_stop_time + }, + { + "id": "input_cmr_edl_user", + "data": form.input_cmr_edl_user + }, + { + "id": "input_cmr_edl_pass", + "data": form.input_cmr_edl_pass + }, + { + "id": "output_collection_id", + "data": form.output_collection_id + }, + { + "id": "output_data_bucket", + "data": form.output_data_bucket + }, + { + "id": "input_daac_collection_shortname", + "data": form.input_daac_collection_shortname + }, + { + "id": "input_daac_collection_sns", + "data": form.input_daac_collection_sns + } + ], + "outputs": [ + { + "id": "output", + "transmissionMode": "reference" + } + ] + } + + await fetch( + processEndpoint + "/" + process.id + ":" + process.version + "/jobs", + { + method: "POST", + headers: { + "Authorization": "Bearer " + tokens.accessToken, + "Content-Type": "application/json", + }, + body: JSON.stringify(data) + } + ).then( (response:Response) => { + + + if( response.ok ) { + const jobID:string | undefined = response.headers.get("Location")?.replace("http://127.0.0.1:5000/processes/" + process.id.toString() + ":" + process.version.toString() + "/jobs/","") + setNewJobID(jobID); + setSubmittingJob(false); + } + + }).catch( (error:Error) => { + console.debug("Error", error.message); + setSubmittingJob(false); + }) + + handleReset() + + } + + return ( + <> + +
+

{meta["title"]}

+ Back to application selection +
+

Job Parameters

+ { newJobId && + <> +
Your job request was submitted successfully!
+
Your Job ID is {newJobId}
+
+ + } + + + + + + + + +

+ + + + + +
+ + +
+ + +
+ + ) +} + +export default NewJobL1A; \ No newline at end of file diff --git a/src/routes/jobs/new/l1b/index.css b/src/routes/jobs/new/l1b/index.css new file mode 100644 index 0000000..e69de29 diff --git a/src/routes/jobs/new/l1b/index.tsx b/src/routes/jobs/new/l1b/index.tsx new file mode 100644 index 0000000..39ea483 --- /dev/null +++ b/src/routes/jobs/new/l1b/index.tsx @@ -0,0 +1,263 @@ +import { useState } from "react"; +import { Link } from "react-router-dom"; +import { Button, TextField } from "@nasa-jpl/react-stellar"; +import { DocumentMeta } from "../../../../components/DocumentMeta/DocumentMeta"; +import Config from "../../../../Config"; +import { getTokens } from "../../../../AuthenticationWrapper"; + +import "./index.css" + +const JOB_FORM_PAGE_LOAD_STATE = { + input_processing_labels: "", + input_cmr_collection_name: "", + input_cmr_search_start_time: "", + input_cmr_search_stop_time: "", + input_cmr_edl_user: "cmr_user", + input_cmr_edl_pass: "cmr_pass", + output_collection_id: "", + output_data_bucket: "", + input_daac_collection_shortname: "CHIRP_L1B", + input_daac_collection_sns: "arn:://SNS-arn" +} + +const JOB_FORM_INITIAL_STATE = { + input_processing_labels: "", + input_cmr_collection_name: "", + input_cmr_search_start_time: "", + input_cmr_search_stop_time: "", + input_cmr_edl_user: "cmr_user", + input_cmr_edl_pass: "cmr_pass", + output_collection_id: "", + output_data_bucket: "", + input_daac_collection_shortname: "CHIRP_L1B", + input_daac_collection_sns: "arn:://SNS-arn" +} + +function NewJobL1B() { + + const processEndpoint = Config['sps']['endpoint'] + 'processes'; + const process:{ id:string, title:string, version:string} = { + id: "chirp", + title: "L1B Job", + version: "develop" + } + const [form, setForm] = useState(JOB_FORM_PAGE_LOAD_STATE); + const [newJobId, setNewJobID] = useState(); + const [submittingJob, setSubmittingJob] = useState(false); + const tokens = getTokens(); + const meta:{ [key: string]: string} = { + "description": "Create New L1B Job", + "title": "Create New L1B Job", + } + + const handleChange = (e:Event & { target: HTMLInputElement}) => { + setForm({ + ...form, + [e.target.id]: e.target.value, + }); + }; + + const handleReset = () => { + setForm(JOB_FORM_INITIAL_STATE); + } + + const setStopDate = () => { + + const endDate = addDays(new Date(form.input_cmr_search_start_time), 16); + + const year = endDate.toLocaleString("default", { year: "numeric" }); + const month = endDate.toLocaleString("default", { month: "2-digit" }); + const day = endDate.toLocaleString("default", { day: "2-digit" }); + const formattedEndDate = year + "-" + month + "-" + day; + + setForm({ + ...form, + ["input_cmr_search_stop_time"]: formattedEndDate + }) + + } + + const addDays = function(date:Date, days:number) { + date.setDate(date.getDate() + days); + return date; + } + + const handleSubmit = async (e:React.FormEvent) => { + + e.preventDefault(); + setSubmittingJob(true); + + const data = { + "mode": "async", + "response": "document", + "inputs": [ + { + "id": "input_processing_labels", + "data": form.input_processing_labels.split(",") + }, + { + "id": "input_cmr_collection_name", + "data": form.input_cmr_collection_name + }, + { + "id": "input_cmr_search_start_time", + "data": form.input_cmr_search_start_time + }, + { + "id": "input_cmr_search_stop_time", + "data": form.input_cmr_search_stop_time + }, + { + "id": "input_cmr_edl_user", + "data": form.input_cmr_edl_user + }, + { + "id": "input_cmr_edl_pass", + "data": form.input_cmr_edl_pass + }, + { + "id": "output_collection_id", + "data": form.output_collection_id + }, + { + "id": "output_data_bucket", + "data": form.output_data_bucket + }, + { + "id": "input_daac_collection_shortname", + "data": form.input_daac_collection_shortname + }, + { + "id": "input_daac_collection_sns", + "data": form.input_daac_collection_sns + } + ], + "outputs": [ + { + "id": "output", + "transmissionMode": "reference" + } + ] + } + + await fetch( + processEndpoint + "/" + process.id + ":" + process.version + "/jobs", + { + method: "POST", + headers: { + "Authorization": "Bearer " + tokens.accessToken, + "Content-Type": "application/json", + }, + body: JSON.stringify(data) + } + ).then( (response:Response) => { + + + if( response.ok ) { + const jobID:string | undefined = response.headers.get("Location")?.replace("http://127.0.0.1:5000/processes/" + process.id.toString() + ":" + process.version.toString() + "/jobs/","") + setNewJobID(jobID); + setSubmittingJob(false); + } + + }).catch( (error:Error) => { + console.debug("Error", error.message); + setSubmittingJob(false); + }) + + handleReset() + + } + + return ( + <> + +
+

{meta["title"]}

+ Back to application selection +
+

Job Parameters

+ { newJobId && + <> +
Your job request was submitted successfully!
+
Your Job ID is {newJobId}
+
+ + } + + + + + + + + +

+ + + + + +
+ + +
+ + +
+ + ) +} + +export default NewJobL1B; \ No newline at end of file From 25aa8cdbba9eb7ae14d994615025a83e847c1468 Mon Sep 17 00:00:00 2001 From: Anil Natha Date: Mon, 11 Dec 2023 12:14:33 -0800 Subject: [PATCH 02/10] Added "BackLink" component to handle navigation back to a given page. Link style incorporates a left pointing chevron icon. --- src/components/BackLink/index.tsx | 18 ++++++++++++++++++ src/routes/jobs/new/chirp-rebinning/index.tsx | 3 ++- src/routes/jobs/new/l1a/index.tsx | 3 ++- src/routes/jobs/new/l1b/index.tsx | 3 ++- 4 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 src/components/BackLink/index.tsx diff --git a/src/components/BackLink/index.tsx b/src/components/BackLink/index.tsx new file mode 100644 index 0000000..ba2853f --- /dev/null +++ b/src/components/BackLink/index.tsx @@ -0,0 +1,18 @@ +import { Link } from "react-router-dom"; +import ChevronLeft from "@nasa-jpl/stellar/icons/chevron_left.svg"; + +type BackLinkProps = { + label:string; + path:string; +}; + +export const BackLink = (props:BackLinkProps) => { + + let {label, path} = props; + + return( + <> + {label}{label} + + ) +} \ No newline at end of file diff --git a/src/routes/jobs/new/chirp-rebinning/index.tsx b/src/routes/jobs/new/chirp-rebinning/index.tsx index 6f614e7..c3fff66 100644 --- a/src/routes/jobs/new/chirp-rebinning/index.tsx +++ b/src/routes/jobs/new/chirp-rebinning/index.tsx @@ -4,6 +4,7 @@ import { Button, TextField } from "@nasa-jpl/react-stellar"; import { DocumentMeta } from "../../../../components/DocumentMeta/DocumentMeta"; import Config from "../../../../Config"; import { getTokens } from "../../../../AuthenticationWrapper"; +import { BackLink } from "../../../../components/BackLink"; import "./index.css" @@ -189,7 +190,7 @@ function NewJobChirpRebinning() { />

{meta["title"]}

- Back to application selection +

Job Parameters

{ newJobId && diff --git a/src/routes/jobs/new/l1a/index.tsx b/src/routes/jobs/new/l1a/index.tsx index edfb606..2e9a682 100644 --- a/src/routes/jobs/new/l1a/index.tsx +++ b/src/routes/jobs/new/l1a/index.tsx @@ -4,6 +4,7 @@ import { Button, TextField } from "@nasa-jpl/react-stellar"; import { DocumentMeta } from "../../../../components/DocumentMeta/DocumentMeta"; import Config from "../../../../Config"; import { getTokens } from "../../../../AuthenticationWrapper"; +import { BackLink } from "../../../../components/BackLink"; import "./index.css" @@ -176,7 +177,7 @@ function NewJobL1A() { />

{meta["title"]}

- Back to application selection +

Job Parameters

{ newJobId && diff --git a/src/routes/jobs/new/l1b/index.tsx b/src/routes/jobs/new/l1b/index.tsx index 39ea483..2cf97dc 100644 --- a/src/routes/jobs/new/l1b/index.tsx +++ b/src/routes/jobs/new/l1b/index.tsx @@ -4,6 +4,7 @@ import { Button, TextField } from "@nasa-jpl/react-stellar"; import { DocumentMeta } from "../../../../components/DocumentMeta/DocumentMeta"; import Config from "../../../../Config"; import { getTokens } from "../../../../AuthenticationWrapper"; +import { BackLink } from "../../../../components/BackLink"; import "./index.css" @@ -176,7 +177,7 @@ function NewJobL1B() { />

{meta["title"]}

- Back to application selection +

Job Parameters

{ newJobId && From ffca83cfd734a1d3b39dc23aa39faf2b91d64e51 Mon Sep 17 00:00:00 2001 From: Anil Natha Date: Tue, 12 Dec 2023 09:40:32 -0800 Subject: [PATCH 03/10] Added a NoutFound route for improved route error handling. --- src/Root.tsx | 4 +++- src/routes/errors/not-found/index.tsx | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 src/routes/errors/not-found/index.tsx diff --git a/src/Root.tsx b/src/Root.tsx index a7fd644..cc081f7 100644 --- a/src/Root.tsx +++ b/src/Root.tsx @@ -14,6 +14,7 @@ import WebView from "./components/WebView"; import Config from "./Config"; +import NotFound from "./routes/errors/not-found"; function Root() { return (
@@ -27,7 +28,8 @@ function Root() { } /> } /> } /> - } /> + } /> + } />
diff --git a/src/routes/errors/not-found/index.tsx b/src/routes/errors/not-found/index.tsx new file mode 100644 index 0000000..3dc3830 --- /dev/null +++ b/src/routes/errors/not-found/index.tsx @@ -0,0 +1,19 @@ +import { DocumentMeta } from "../../../components/DocumentMeta/DocumentMeta" + +function NotFound() { + + return ( + <> + +
+

Not Found

+ The requested resource cannot be found +
+ + ) +} + +export default NotFound \ No newline at end of file From 224b6a880996d348ef047f95a3dda41501bdf519 Mon Sep 17 00:00:00 2001 From: Anil Natha Date: Tue, 12 Dec 2023 09:42:10 -0800 Subject: [PATCH 04/10] Added process utility to easily facilitate updating routes and job forms. --- src/Root.tsx | 24 +++++++--- .../new/{chirp-rebinning => chirp}/index.css | 0 .../new/{chirp-rebinning => chirp}/index.tsx | 16 +++---- src/routes/jobs/new/index.tsx | 16 +++++-- src/routes/jobs/new/l1a/index.tsx | 16 +++---- src/routes/jobs/new/l1b/index.tsx | 16 +++---- src/types/process.d.tsx | 5 ++ src/utils/processes.tsx | 48 +++++++++++++++++++ 8 files changed, 107 insertions(+), 34 deletions(-) rename src/routes/jobs/new/{chirp-rebinning => chirp}/index.css (100%) rename src/routes/jobs/new/{chirp-rebinning => chirp}/index.tsx (96%) create mode 100644 src/types/process.d.tsx create mode 100644 src/utils/processes.tsx diff --git a/src/Root.tsx b/src/Root.tsx index cc081f7..e5c4887 100644 --- a/src/Root.tsx +++ b/src/Root.tsx @@ -6,16 +6,19 @@ import { import Home from "./routes/home" import JobMonitoring from "./routes/jobs/monitoring"; import NewJob from "./routes/jobs/new"; -import NewJobChirpRebinning from "./routes/jobs/new/chirp-rebinning"; -import NewJobL1A from "./routes/jobs/new/l1a"; -import NewJobL1B from "./routes/jobs/new/l1b"; + import Navbar from "./components/Navbar" import WebView from "./components/WebView"; import Config from "./Config"; +import { getProcesses, getProcessRoute } from "./utils/processes"; import NotFound from "./routes/errors/not-found"; + function Root() { + + const processes = getProcesses(); + return (
@@ -25,9 +28,18 @@ function Root() { } /> } /> } /> - } /> - } /> - } /> + + { + /* Add routes for job execution forms */ + processes.map( (item) => { + let path = "/jobs/new/" + item['id']; + let route:JSX.Element | null = getProcessRoute(item['id']); + return ( + } key={"route_" + item['id']}/> + ) + }) + } + } /> } /> diff --git a/src/routes/jobs/new/chirp-rebinning/index.css b/src/routes/jobs/new/chirp/index.css similarity index 100% rename from src/routes/jobs/new/chirp-rebinning/index.css rename to src/routes/jobs/new/chirp/index.css diff --git a/src/routes/jobs/new/chirp-rebinning/index.tsx b/src/routes/jobs/new/chirp/index.tsx similarity index 96% rename from src/routes/jobs/new/chirp-rebinning/index.tsx rename to src/routes/jobs/new/chirp/index.tsx index c3fff66..8fcec75 100644 --- a/src/routes/jobs/new/chirp-rebinning/index.tsx +++ b/src/routes/jobs/new/chirp/index.tsx @@ -47,21 +47,21 @@ const JOB_FORM_INITIAL_STATE = { input_daac_collection_sns: "arn:://SNS-arn" } -function NewJobChirpRebinning() { +type NewJobChirpRebinningProps = { + process:Process +}; + +function NewJobChirpRebinning(props:NewJobChirpRebinningProps) { const processEndpoint = Config['sps']['endpoint'] + 'processes'; - const process:{ id:string, title:string, version:string} = { - id: "chirp", - title: "Chirp Rebinning Workflow", - version: "develop" - } + const {process} = props; const [form, setForm] = useState(JOB_FORM_PAGE_LOAD_STATE); const [newJobId, setNewJobID] = useState(); const [submittingJob, setSubmittingJob] = useState(false); const tokens = getTokens(); const meta:{ [key: string]: string} = { - "description": "Create New Chirp Rebinning Job", - "title": "Create New Chirp Rebinning Job", + "description": "Create New " + process.title + " Job", + "title": "Create New " + process.title + " Job", } const handleChange = (e:Event & { target: HTMLInputElement}) => { diff --git a/src/routes/jobs/new/index.tsx b/src/routes/jobs/new/index.tsx index 0a69e77..0dd7c71 100644 --- a/src/routes/jobs/new/index.tsx +++ b/src/routes/jobs/new/index.tsx @@ -1,13 +1,16 @@ import { useNavigate } from "react-router-dom"; import { Button } from "@nasa-jpl/react-stellar"; import { DocumentMeta } from "../../../components/DocumentMeta/DocumentMeta"; +import { getProcesses } from "../../../utils/processes"; import "./index.css" function NewJob() { const navigate = useNavigate(); - + + const processes = getProcesses(); + return ( <> Create New Job
    -
  • -
  • -
  • + { + processes.map( (item) => { + const path = "/jobs/new/" + item['id']; + return ( +
  • + ) + }) + }
diff --git a/src/routes/jobs/new/l1a/index.tsx b/src/routes/jobs/new/l1a/index.tsx index 2e9a682..7ceca61 100644 --- a/src/routes/jobs/new/l1a/index.tsx +++ b/src/routes/jobs/new/l1a/index.tsx @@ -34,21 +34,21 @@ const JOB_FORM_INITIAL_STATE = { input_daac_collection_sns: "arn:://SNS-arn" } -function NewJobL1A() { +type NewJobL1AProps = { + process:Process +}; + +function NewJobL1A(props:NewJobL1AProps) { const processEndpoint = Config['sps']['endpoint'] + 'processes'; - const process:{ id:string, title:string, version:string} = { - id: "chirp", - title: "L1A Job", - version: "develop" - } + const {process} = props; const [form, setForm] = useState(JOB_FORM_PAGE_LOAD_STATE); const [newJobId, setNewJobID] = useState(); const [submittingJob, setSubmittingJob] = useState(false); const tokens = getTokens(); const meta:{ [key: string]: string} = { - "description": "Create New L1A Job", - "title": "Create New L1A Job", + "description": "Create New " + process.title + " Job", + "title": "Create New " + process.title + " Job", } const handleChange = (e:Event & { target: HTMLInputElement}) => { diff --git a/src/routes/jobs/new/l1b/index.tsx b/src/routes/jobs/new/l1b/index.tsx index 2cf97dc..7ae0824 100644 --- a/src/routes/jobs/new/l1b/index.tsx +++ b/src/routes/jobs/new/l1b/index.tsx @@ -34,21 +34,21 @@ const JOB_FORM_INITIAL_STATE = { input_daac_collection_sns: "arn:://SNS-arn" } -function NewJobL1B() { +type NewJobL1BProps = { + process:Process +}; + +function NewJobL1B(props:NewJobL1BProps) { const processEndpoint = Config['sps']['endpoint'] + 'processes'; - const process:{ id:string, title:string, version:string} = { - id: "chirp", - title: "L1B Job", - version: "develop" - } + const {process} = props; const [form, setForm] = useState(JOB_FORM_PAGE_LOAD_STATE); const [newJobId, setNewJobID] = useState(); const [submittingJob, setSubmittingJob] = useState(false); const tokens = getTokens(); const meta:{ [key: string]: string} = { - "description": "Create New L1B Job", - "title": "Create New L1B Job", + "description": "Create New " + process.title + " Job", + "title": "Create New " + process.title + " Job", } const handleChange = (e:Event & { target: HTMLInputElement}) => { diff --git a/src/types/process.d.tsx b/src/types/process.d.tsx new file mode 100644 index 0000000..d84dde3 --- /dev/null +++ b/src/types/process.d.tsx @@ -0,0 +1,5 @@ +interface Process { + id:string; + title:string; + version:string; +}; \ No newline at end of file diff --git a/src/utils/processes.tsx b/src/utils/processes.tsx new file mode 100644 index 0000000..5399365 --- /dev/null +++ b/src/utils/processes.tsx @@ -0,0 +1,48 @@ +import NewJobChirpRebinning from "../routes/jobs/new/chirp"; +import NewJobL1A from "../routes/jobs/new/l1a"; +import NewJobL1B from "../routes/jobs/new/l1b"; + +const getProcesses = ():Process[] => { + return ( + [ + { + id: "chirp", + title: "CHIRP Rebinning", + version: "develop", + }, + { + id: "l1a", + title: "l1a_pge_cwl", + version: "develop", + }, + { + id: "l1b", + title: "l1b_pge_cwl", + version: "develop", + }, + ] + ) +}; + +const getProcess = (processID:string):Process => { + const processes:Process[] = getProcesses(); + const index = processes.findIndex( process => process.id === processID ); + return processes[index]; +}; + + +const getProcessRoute = (processID:string):JSX.Element | null => { + + const process:Process = getProcess(processID) + const processRoutes:{ [key: string]: JSX.Element} = { + "chirp": , + "l1a": , + "l1b": , + } + + return ( + (process) ? processRoutes[processID] : null + ) +}; + +export { getProcesses, getProcess, getProcessRoute }; \ No newline at end of file From eb814a0d24b0ef3b5b6954406825dfc539a6fb45 Mon Sep 17 00:00:00 2001 From: Anil Natha Date: Tue, 12 Dec 2023 09:42:21 -0800 Subject: [PATCH 05/10] Fixed linting errors. --- src/components/BackLink/index.tsx | 2 +- src/components/DocumentMeta/DocumentMeta.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/BackLink/index.tsx b/src/components/BackLink/index.tsx index ba2853f..791b544 100644 --- a/src/components/BackLink/index.tsx +++ b/src/components/BackLink/index.tsx @@ -8,7 +8,7 @@ type BackLinkProps = { export const BackLink = (props:BackLinkProps) => { - let {label, path} = props; + const {label, path} = props; return( <> diff --git a/src/components/DocumentMeta/DocumentMeta.tsx b/src/components/DocumentMeta/DocumentMeta.tsx index 7e7d4bb..3be67a9 100644 --- a/src/components/DocumentMeta/DocumentMeta.tsx +++ b/src/components/DocumentMeta/DocumentMeta.tsx @@ -7,7 +7,7 @@ export type DocumentMetaProps = { export const DocumentMeta = (props:DocumentMetaProps) => { - let {title, description} = props; + const {title, description} = props; return ( From e575c5b82c8841b1b7369abc255af48e53e04a8c Mon Sep 17 00:00:00 2001 From: Anil Natha Date: Tue, 12 Dec 2023 12:09:01 -0800 Subject: [PATCH 06/10] Fixed error reported by linter. --- src/Root.tsx | 4 ++-- src/types/process.d.tsx | 2 +- src/utils/processes.tsx | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Root.tsx b/src/Root.tsx index e5c4887..b534c06 100644 --- a/src/Root.tsx +++ b/src/Root.tsx @@ -32,8 +32,8 @@ function Root() { { /* Add routes for job execution forms */ processes.map( (item) => { - let path = "/jobs/new/" + item['id']; - let route:JSX.Element | null = getProcessRoute(item['id']); + const path = "/jobs/new/" + item['id']; + const route:JSX.Element | null = getProcessRoute(item['id']); return ( } key={"route_" + item['id']}/> ) diff --git a/src/types/process.d.tsx b/src/types/process.d.tsx index d84dde3..a68f27a 100644 --- a/src/types/process.d.tsx +++ b/src/types/process.d.tsx @@ -2,4 +2,4 @@ interface Process { id:string; title:string; version:string; -}; \ No newline at end of file +} \ No newline at end of file diff --git a/src/utils/processes.tsx b/src/utils/processes.tsx index 5399365..6ccad44 100644 --- a/src/utils/processes.tsx +++ b/src/utils/processes.tsx @@ -38,11 +38,12 @@ const getProcessRoute = (processID:string):JSX.Element | null => { "chirp": , "l1a": , "l1b": , - } + } return ( (process) ? processRoutes[processID] : null ) + }; export { getProcesses, getProcess, getProcessRoute }; \ No newline at end of file From 94c12bafaf9ba5507d5cc7f376bea47c3ea83c05 Mon Sep 17 00:00:00 2001 From: Anil Natha Date: Tue, 12 Dec 2023 16:40:31 -0800 Subject: [PATCH 07/10] Removed unused css files. --- src/routes/jobs/new/chirp/index.css | 0 src/routes/jobs/new/chirp/index.tsx | 2 -- src/routes/jobs/new/l1a/index.css | 0 src/routes/jobs/new/l1a/index.tsx | 2 -- src/routes/jobs/new/l1b/index.css | 0 src/routes/jobs/new/l1b/index.tsx | 2 -- 6 files changed, 6 deletions(-) delete mode 100644 src/routes/jobs/new/chirp/index.css delete mode 100644 src/routes/jobs/new/l1a/index.css delete mode 100644 src/routes/jobs/new/l1b/index.css diff --git a/src/routes/jobs/new/chirp/index.css b/src/routes/jobs/new/chirp/index.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/routes/jobs/new/chirp/index.tsx b/src/routes/jobs/new/chirp/index.tsx index 8fcec75..976051c 100644 --- a/src/routes/jobs/new/chirp/index.tsx +++ b/src/routes/jobs/new/chirp/index.tsx @@ -6,8 +6,6 @@ import Config from "../../../../Config"; import { getTokens } from "../../../../AuthenticationWrapper"; import { BackLink } from "../../../../components/BackLink"; -import "./index.css" - /*const JOB_FORM_PAGE_LOAD_STATE = { input_processing_labels: "label1, label2", input_cmr_collection_name: "C2011289787-GES_DISC", diff --git a/src/routes/jobs/new/l1a/index.css b/src/routes/jobs/new/l1a/index.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/routes/jobs/new/l1a/index.tsx b/src/routes/jobs/new/l1a/index.tsx index 7ceca61..4ee0ed2 100644 --- a/src/routes/jobs/new/l1a/index.tsx +++ b/src/routes/jobs/new/l1a/index.tsx @@ -6,8 +6,6 @@ import Config from "../../../../Config"; import { getTokens } from "../../../../AuthenticationWrapper"; import { BackLink } from "../../../../components/BackLink"; -import "./index.css" - const JOB_FORM_PAGE_LOAD_STATE = { input_processing_labels: "", input_cmr_collection_name: "", diff --git a/src/routes/jobs/new/l1b/index.css b/src/routes/jobs/new/l1b/index.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/routes/jobs/new/l1b/index.tsx b/src/routes/jobs/new/l1b/index.tsx index 7ae0824..51b9889 100644 --- a/src/routes/jobs/new/l1b/index.tsx +++ b/src/routes/jobs/new/l1b/index.tsx @@ -6,8 +6,6 @@ import Config from "../../../../Config"; import { getTokens } from "../../../../AuthenticationWrapper"; import { BackLink } from "../../../../components/BackLink"; -import "./index.css" - const JOB_FORM_PAGE_LOAD_STATE = { input_processing_labels: "", input_cmr_collection_name: "", From ca4d42883145ec3a2603dbd313abd3e457d55ad7 Mon Sep 17 00:00:00 2001 From: Anil Natha Date: Tue, 12 Dec 2023 16:53:46 -0800 Subject: [PATCH 08/10] Updated L1B form fields. --- src/routes/jobs/new/l1b/index.tsx | 121 ++++++------------------------ 1 file changed, 21 insertions(+), 100 deletions(-) diff --git a/src/routes/jobs/new/l1b/index.tsx b/src/routes/jobs/new/l1b/index.tsx index 51b9889..2c68a88 100644 --- a/src/routes/jobs/new/l1b/index.tsx +++ b/src/routes/jobs/new/l1b/index.tsx @@ -7,29 +7,17 @@ import { getTokens } from "../../../../AuthenticationWrapper"; import { BackLink } from "../../../../components/BackLink"; const JOB_FORM_PAGE_LOAD_STATE = { - input_processing_labels: "", - input_cmr_collection_name: "", - input_cmr_search_start_time: "", - input_cmr_search_stop_time: "", - input_cmr_edl_user: "cmr_user", - input_cmr_edl_pass: "cmr_pass", + input_collection_id: "", + start_datetime: "", + stop_datetime: "", output_collection_id: "", - output_data_bucket: "", - input_daac_collection_shortname: "CHIRP_L1B", - input_daac_collection_sns: "arn:://SNS-arn" } const JOB_FORM_INITIAL_STATE = { - input_processing_labels: "", - input_cmr_collection_name: "", - input_cmr_search_start_time: "", - input_cmr_search_stop_time: "", - input_cmr_edl_user: "cmr_user", - input_cmr_edl_pass: "cmr_pass", + input_collection_id: "", + start_datetime: "", + stop_datetime: "", output_collection_id: "", - output_data_bucket: "", - input_daac_collection_shortname: "CHIRP_L1B", - input_daac_collection_sns: "arn:://SNS-arn" } type NewJobL1BProps = { @@ -60,27 +48,6 @@ function NewJobL1B(props:NewJobL1BProps) { setForm(JOB_FORM_INITIAL_STATE); } - const setStopDate = () => { - - const endDate = addDays(new Date(form.input_cmr_search_start_time), 16); - - const year = endDate.toLocaleString("default", { year: "numeric" }); - const month = endDate.toLocaleString("default", { month: "2-digit" }); - const day = endDate.toLocaleString("default", { day: "2-digit" }); - const formattedEndDate = year + "-" + month + "-" + day; - - setForm({ - ...form, - ["input_cmr_search_stop_time"]: formattedEndDate - }) - - } - - const addDays = function(date:Date, days:number) { - date.setDate(date.getDate() + days); - return date; - } - const handleSubmit = async (e:React.FormEvent) => { e.preventDefault(); @@ -91,45 +58,21 @@ function NewJobL1B(props:NewJobL1BProps) { "response": "document", "inputs": [ { - "id": "input_processing_labels", - "data": form.input_processing_labels.split(",") + "id": "input_collection_id", + "data": form.input_collection_id }, { - "id": "input_cmr_collection_name", - "data": form.input_cmr_collection_name + "id": "start_datetime", + "data": form.start_datetime }, { - "id": "input_cmr_search_start_time", - "data": form.input_cmr_search_start_time - }, - { - "id": "input_cmr_search_stop_time", - "data": form.input_cmr_search_stop_time - }, - { - "id": "input_cmr_edl_user", - "data": form.input_cmr_edl_user - }, - { - "id": "input_cmr_edl_pass", - "data": form.input_cmr_edl_pass + "id": "stop_datetime", + "data": form.stop_datetime }, { "id": "output_collection_id", "data": form.output_collection_id }, - { - "id": "output_data_bucket", - "data": form.output_data_bucket - }, - { - "id": "input_daac_collection_shortname", - "data": form.input_daac_collection_shortname - }, - { - "id": "input_daac_collection_sns", - "data": form.input_daac_collection_sns - } ], "outputs": [ { @@ -185,48 +128,36 @@ function NewJobL1B(props:NewJobL1BProps) {
} - - -

- -
From daa23a5d961033880ca72df4b4c22831f35d8bc0 Mon Sep 17 00:00:00 2001 From: Anil Natha Date: Tue, 12 Dec 2023 20:24:57 -0800 Subject: [PATCH 09/10] Updated L1B forms. --- src/routes/jobs/new/l1a/index.tsx | 128 ++++++++++-------------------- 1 file changed, 41 insertions(+), 87 deletions(-) diff --git a/src/routes/jobs/new/l1a/index.tsx b/src/routes/jobs/new/l1a/index.tsx index 4ee0ed2..0967ca9 100644 --- a/src/routes/jobs/new/l1a/index.tsx +++ b/src/routes/jobs/new/l1a/index.tsx @@ -7,29 +7,21 @@ import { getTokens } from "../../../../AuthenticationWrapper"; import { BackLink } from "../../../../components/BackLink"; const JOB_FORM_PAGE_LOAD_STATE = { - input_processing_labels: "", - input_cmr_collection_name: "", - input_cmr_search_start_time: "", - input_cmr_search_stop_time: "", - input_cmr_edl_user: "cmr_user", - input_cmr_edl_pass: "cmr_pass", + input_ephatt_collection_id: "", + input_science_collection_id: "", output_collection_id: "", - output_data_bucket: "", - input_daac_collection_shortname: "CHIRP_L1B", - input_daac_collection_sns: "arn:://SNS-arn" + static_dir: "", + start_datetime: "", + stop_datetime: "", } const JOB_FORM_INITIAL_STATE = { - input_processing_labels: "", - input_cmr_collection_name: "", - input_cmr_search_start_time: "", - input_cmr_search_stop_time: "", - input_cmr_edl_user: "cmr_user", - input_cmr_edl_pass: "cmr_pass", + input_ephatt_collection_id: "", + input_science_collection_id: "", output_collection_id: "", - output_data_bucket: "", - input_daac_collection_shortname: "CHIRP_L1B", - input_daac_collection_sns: "arn:://SNS-arn" + static_dir: "", + start_datetime: "", + stop_datetime: "", } type NewJobL1AProps = { @@ -60,27 +52,6 @@ function NewJobL1A(props:NewJobL1AProps) { setForm(JOB_FORM_INITIAL_STATE); } - const setStopDate = () => { - - const endDate = addDays(new Date(form.input_cmr_search_start_time), 16); - - const year = endDate.toLocaleString("default", { year: "numeric" }); - const month = endDate.toLocaleString("default", { month: "2-digit" }); - const day = endDate.toLocaleString("default", { day: "2-digit" }); - const formattedEndDate = year + "-" + month + "-" + day; - - setForm({ - ...form, - ["input_cmr_search_stop_time"]: formattedEndDate - }) - - } - - const addDays = function(date:Date, days:number) { - date.setDate(date.getDate() + days); - return date; - } - const handleSubmit = async (e:React.FormEvent) => { e.preventDefault(); @@ -91,45 +62,29 @@ function NewJobL1A(props:NewJobL1AProps) { "response": "document", "inputs": [ { - "id": "input_processing_labels", - "data": form.input_processing_labels.split(",") - }, - { - "id": "input_cmr_collection_name", - "data": form.input_cmr_collection_name - }, - { - "id": "input_cmr_search_start_time", - "data": form.input_cmr_search_start_time + "id": "input_ephatt_collection_id", + "data": form.input_ephatt_collection_id }, { - "id": "input_cmr_search_stop_time", - "data": form.input_cmr_search_stop_time + "id": "input_science_collection_id", + "data": form.input_science_collection_id }, { - "id": "input_cmr_edl_user", - "data": form.input_cmr_edl_user + "id": "output_collection_id", + "data": form.output_collection_id }, { - "id": "input_cmr_edl_pass", - "data": form.input_cmr_edl_pass + "id": "static_dir", + "data": form.static_dir }, { - "id": "output_collection_id", - "data": form.output_collection_id + "id": "start_datetime", + "data": form.start_datetime }, { - "id": "output_data_bucket", - "data": form.output_data_bucket + "id": "stop_datetime", + "data": form.stop_datetime }, - { - "id": "input_daac_collection_shortname", - "data": form.input_daac_collection_shortname - }, - { - "id": "input_daac_collection_sns", - "data": form.input_daac_collection_sns - } ], "outputs": [ { @@ -186,68 +141,67 @@ function NewJobL1A(props:NewJobL1AProps) { } - -

+ +
From 6e0f3b564650149c8e240416df8c2bacd355f1b0 Mon Sep 17 00:00:00 2001 From: Anil Natha Date: Wed, 13 Dec 2023 08:46:55 -0800 Subject: [PATCH 10/10] Updated changelog. --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c998e3d..005c37e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.4.0] - 2023-12-13 +- Updated /job/new endpoint so it lists the applications for which jobs may be executed. +- Moved chirp rebinning job form to /jobs/new/chirp +- Added job submission forms for L1A and L1B PGEs +- Added process utility to help facilitate changes listed above. + ## [0.3.1] - 2023-12-12 - Fixed link associated with logo on mobile platforms diff --git a/package.json b/package.json index 4e80167..5cf02d5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "unity-ui", "private": true, - "version": "0.3.1", + "version": "0.4.0", "type": "module", "scripts": { "dev": "vite",