From b2ae6023bf2873a963a19e906c83a63d6964fdfb Mon Sep 17 00:00:00 2001
From: silvester-pari
+ {{ selectedProduct.properties.title }} +
+Process: {{ selectedProcess }}
++ Product: {{ selectedProduct.properties.title }} +
+Cloud: {{ selectedCloud }}
++ {{ processingError }} +
++ {{ processingInfo }} +
+{{ item.jobID }}
+
+
+ Process: {{ selectedProcess }}
+Product: {{ selectedProduct }}
+Cloud: {{ selectedCloud }}
+Input Parameters:
+ +Process: {{ selectedProcess }}
++ Process: {{ selectedProcess.name }} +
+Parameters:
+- Product: {{ selectedProduct.properties.title }} + Product: {{ selectedProduct.properties.title }}
-Cloud: {{ selectedCloud }}
+Cloud: {{ selectedCloud }}
{{ item.jobID }}
+
+
+ Input Parameters:
- + +- Process: {{ selectedProcess.name }} + Process: {{ selectedProcess.title }}
Parameters:
Input Parameters:
- +- Process: {{ selectedProcess.title }} + Process: {{ availableProcesses[selectedProcess].properties.title }}
Parameters:
Process:
From fbc6e45c0e8af03839555ef8455fdfc57008ee96 Mon Sep 17 00:00:00 2001
From: silvester-pari
Process:
@@ -306,7 +305,7 @@ export default {
const result = await this.fetchApplications();
if (result.features) {
result.features.forEach((process) => {
- this.availableProcesses[process.id] = process;
+ this.$set(this.availableProcesses, process.id, process);
});
}
} catch (error) {
@@ -346,6 +345,13 @@ export default {
this.selectedProcessDetails = await this.$axios.$get(
`https://backend-api.staging.opensciencedata.esa.int/applications/${this.selectedProcess}`
);
+ if (this.selectedProcessDetails && this.selectedProcessDetails.$graph[0].inputs) {
+ Object.entries(this.selectedProcessDetails.$graph[0].inputs).forEach(([inputId, input]) => {
+ if (input.default) {
+ this.selectedParameters[inputId] = input.default;
+ }
+ })
+ }
this.availableProcessesLoading = false;
} catch (error) {
console.error(console.error);
diff --git a/pages/processing-status.vue b/pages/processing-status.vue
index 3df48382..364812fc 100644
--- a/pages/processing-status.vue
+++ b/pages/processing-status.vue
@@ -160,30 +160,7 @@ export default {
return styling;
},
async fetchItem(url) {
- const params = new URLSearchParams();
- params.append("scope", "openid user_name is_operator");
- params.append("grant_type", "password");
- params.append("username", "osc");
- params.append("password", "OSCClientPassword!");
- params.append("client_id", "eba82eb7-5cb0-4f5e-99ab-3830eef383e2");
- const auth = await this.$axios.post(
- "https://auth.eoepca-staging.spaceapplications.com/oxauth/restv1/token",
- params,
- {
- headers: {
- "Cache-Control": "no-cache",
- "Content-Type": "application/x-www-form-urlencoded",
- },
- }
- );
- const result = await this.$axios.$get(url, {
- headers: {
- Accept: "application/json",
- "X-User-Id": auth.data.id_token,
- "Content-Type": "application/json",
- Prefer: "respond-async",
- },
- });
+ const result = await this.$processingBackend.$get(url);
console.log(result);
window.open(result.StacCatalogUri, "_blank").focus();
diff --git a/plugins/axios.js b/plugins/axios.js
index 0d87cba8..e63467af 100644
--- a/plugins/axios.js
+++ b/plugins/axios.js
@@ -62,13 +62,13 @@ export default function (
}
try {
const params = new URLSearchParams();
- params.append("scope", "openid user_name is_operator");
+ params.append("scope", "openid user_name");
params.append("grant_type", "password");
- params.append("username", "osc");
- params.append("password", "OSCClientPassword!");
- params.append("client_id", "eba82eb7-5cb0-4f5e-99ab-3830eef383e2");
+ params.append("username", "
{{ item.jobID }}
-
-
- Process: {{ selectedProcess }}
-Product: {{ selectedProduct }}
-Cloud: {{ selectedCloud }}
-- Product: {{ selectedProduct.properties.title }} +
+ Cloud: {{ selectedEndpoint.title }}
-Cloud: {{ selectedCloud }}