[airavata-php-gateway] branch custos-integration-latest updated: Bug fix in RoleMapper

2021-05-06 Thread isjarana
This is an automated email from the ASF dual-hosted git repository.

isjarana pushed a commit to branch custos-integration-latest
in repository https://gitbox.apache.org/repos/asf/airavata-php-gateway.git


The following commit(s) were added to refs/heads/custos-integration-latest by 
this push:
 new 27131ef  Bug fix in RoleMapper
27131ef is described below

commit 27131ef9a9fdb5603f6d05b719264229b22b1b6a
Author: Isuru Ranawaka 
AuthorDate: Thu May 6 21:17:12 2021 -0400

Bug fix in RoleMapper
---
 app/libraries/Keycloak/API/RoleMapper.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/libraries/Keycloak/API/RoleMapper.php 
b/app/libraries/Keycloak/API/RoleMapper.php
index 39845f2..5b943bd 100644
--- a/app/libraries/Keycloak/API/RoleMapper.php
+++ b/app/libraries/Keycloak/API/RoleMapper.php
@@ -37,7 +37,7 @@ class RoleMapper extends BaseKeycloakAPIEndpoint {
 curl_setopt($r, CURLOPT_CAINFO, $this->cafile_path);
 }
 curl_setopt($r, CURLOPT_HTTPHEADER, array(
-"Authorization: Basic " . base64_encode($this->client_id . ":" . 
$this->client_secret),
+"Authorization: Bearer " . base64_encode($this->client_id . ":" . 
$this->client_secret),
 ));
 $response = curl_exec($r);
 if ($response == false) {


[airavata-django-portal] branch airavata-3453 updated: AIRAVATA-3453 lint error

2021-05-06 Thread machristie
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch airavata-3453
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git


The following commit(s) were added to refs/heads/airavata-3453 by this push:
 new f4224c0  AIRAVATA-3453 lint error
f4224c0 is described below

commit f4224c03dfd01ba5245d52858a916c362fff4968
Author: Marcus Christie 
AuthorDate: Thu May 6 17:40:36 2021 -0400

AIRAVATA-3453 lint error
---
 django_airavata/apps/workspace/views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/django_airavata/apps/workspace/views.py 
b/django_airavata/apps/workspace/views.py
index 84cc7e6..a701800 100644
--- a/django_airavata/apps/workspace/views.py
+++ b/django_airavata/apps/workspace/views.py
@@ -124,7 +124,7 @@ def edit_experiment(request, experiment_id):
 request.active_nav_item = 'experiments'
 
 return render(request,
-#   'django_airavata_workspace/edit_experiment.html',
+  #   'django_airavata_workspace/edit_experiment.html',
   'django_airavata_workspace/supcrtbl2.html',
   {'bundle_name': 'edit-experiment',
'experiment_id': experiment_id})


[airavata-site] branch asf-site updated: updates affiliations

2021-05-06 Thread smarru
This is an automated email from the ASF dual-hosted git repository.

smarru pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/airavata-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new e8fbbda  updates affiliations
e8fbbda is described below

commit e8fbbda83de925c0d57b909172f7b97f99ea95b6
Author: Suresh Marru 
AuthorDate: Thu May 6 17:07:59 2021 -0400

updates affiliations
---
 content/community.html | 20 ++--
 source/_data/team.yml  | 20 ++--
 2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/content/community.html b/content/community.html
index 1a340aa..a4ed377 100644
--- a/content/community.html
+++ b/content/community.html
@@ -123,15 +123,6 @@
   
 
   
-Thejaka Amila Kanewala
-amilaj
-amilaj [at] apache [dot] org
-Service Now
-committer, PMC
--8
-  
-
-  
 Anuj Bhandar
 anujbhan
 anujbhan [at] apache [dot] org
@@ -245,7 +236,7 @@
 hasini [at] google [dot] com
 Google
 committer
--5
+-8
   
 
   
@@ -465,6 +456,15 @@
   
 
   
+Thejaka Amila Kanewala
+amilaj
+amilaj [at] apache [dot] org
+Service Now
+committer, PMC
+-8
+  
+
+  
 Thilina Gunarathne
 thilina
 thilina [at] apache [dot] org
diff --git a/source/_data/team.yml b/source/_data/team.yml
index dc9501c..917a8c8 100644
--- a/source/_data/team.yml
+++ b/source/_data/team.yml
@@ -39,13 +39,6 @@
   roles: committer, PMC, Incubation Mentor
   time_zone: "-5"
 
-- name: Amila Jayasekara
-  apache_id: amilaj
-  email: amilaj [at] apache [dot] org
-  organization: Service Now
-  roles: committer, PMC
-  time_zone: "-8"
-
 - name: Anuj Bhandar
   apache_id: anujbhan
   email: anujbhan [at] apache [dot] org
@@ -133,14 +126,14 @@
 - name: Hasini Gunasinghe
   apache_id: hasini
   email: hasini [at] google [dot] com
-  organization: Purdue University
+  organization: Google
   roles: committer
-  time_zone: "-5"
+  time_zone: "-8"
 
 - name: Heshan Suriyaarachchi
   apache_id: heshan
   email: heshan [at] apache [dot] org
-  organization: Amazon
+  organization: Service Now
   roles: committer, PMC
   time_zone: "-8"
 
@@ -305,6 +298,13 @@
   roles: committer, PMC, PMC Chair
   time_zone: "-5"
 
+- name: Thejaka Amila Kanewala
+  apache_id: amilaj
+  email: amilaj [at] apache [dot] org
+  organization: Service Now
+  roles: committer, PMC
+  time_zone: "-8"
+
 - name: Thilina Gunarathne
   apache_id: thilina
   email: thilina [at] apache [dot] org


[airavata-django-portal] 01/03: AIRAVATA-3453 Update experiment input when autocomplete option selected

2021-05-06 Thread machristie
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch airavata-3453
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit 3905db54fea54f199b431046bf17fc6e217eaabb
Author: Marcus Christie 
AuthorDate: Wed May 5 10:27:15 2021 -0400

AIRAVATA-3453 Update experiment input when autocomplete option selected
---
 .../js/web-components/ExperimentEditor.vue   | 7 ---
 .../workspace/templates/django_airavata_workspace/supcrtbl2.html | 9 -
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git 
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentEditor.vue
 
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentEditor.vue
index 0de4bff..611fbdc 100644
--- 
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentEditor.vue
+++ 
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentEditor.vue
@@ -13,7 +13,7 @@
   
   
   
@@ -82,8 +82,9 @@ export default {
 updateExperimentName(event) {
   this.experiment.experimentName = event.target.value;
 },
-updateInputValue(event, experimentInput) {
-  experimentInput.value = event.target.value;
+updateInputValue(inputName, value) {
+  const experimentInput = this.experiment.experimentInputs.find(i => 
i.name === inputName);
+  experimentInput.value = value;
 },
 onSubmit(event) {
   // console.log(event);
diff --git 
a/django_airavata/apps/workspace/templates/django_airavata_workspace/supcrtbl2.html
 
b/django_airavata/apps/workspace/templates/django_airavata_workspace/supcrtbl2.html
index fc266a3..5edd42c 100644
--- 
a/django_airavata/apps/workspace/templates/django_airavata_workspace/supcrtbl2.html
+++ 
b/django_airavata/apps/workspace/templates/django_airavata_workspace/supcrtbl2.html
@@ -220,7 +220,14 @@ $('document').ready(function() {
 },replace: function (word) {
   return word + ' ';
 }
-  }]);
+  }]).on('textComplete:select', e => {
+// Keep the value of 'Reaction' up-to-date when an autocomplete option is 
selected.
+// experiment-editor listens for 'input' events, which are triggered when 
user
+// types in 'Reaction' textarea, but selecting an autocomplete option 
doesn't
+// trigger an 'input' event, so we need to manually update the value of the
+// experiment input when an autocomplete option is selected.
+
document.getElementById('experiment-editor').vueComponent.updateInputValue('Reaction',
 e.target.value);
+  });
 });
 
 function resetViews() {


[airavata-django-portal] 02/03: AIRAVATA-3453 project-selector and including bootstrap vue styles

2021-05-06 Thread machristie
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch airavata-3453
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit bb2f31a4ecc7bb37f34261fc727035d01cf2c794
Author: Marcus Christie 
AuthorDate: Thu May 6 13:42:33 2021 -0400

AIRAVATA-3453 project-selector and including bootstrap vue styles
---
 .../js/web-components/ExperimentEditor.vue | 17 +++-
 .../js/web-components/Foo.vue  |  3 -
 .../js/web-components/ProjectSelector.vue  | 95 ++
 .../js/web-components/store.js |  4 +
 .../js/web-components/styles.css   |  3 +
 5 files changed, 115 insertions(+), 7 deletions(-)

diff --git 
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentEditor.vue
 
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentEditor.vue
index 611fbdc..0e99976 100644
--- 
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentEditor.vue
+++ 
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentEditor.vue
@@ -9,6 +9,12 @@
 />
   
 
+
+  
+  
+
+  
+
 

i.name === inputName);
   experimentInput.value = value;
 },
+updateProjectId(event) {
+  const [projectId] = event.detail;
+  this.experiment.projectId = projectId;
+},
 onSubmit(event) {
   // console.log(event);
   // 'save' event is cancelable. Listener can call .preventDefault() on 
the event to cancel.
@@ -119,8 +128,6 @@ export default {
   this.applicationModule.appModuleName +
   " on " +
   new Date().toLocaleString();
-const defaultProjectId = await getDefaultProjectId();
-experiment.projectId = defaultProjectId;
 
experiment.userConfigurationData.computationalResourceScheduling.resourceHostId 
=
   "js-169-51.jetstream-cloud.org_6672e8fe-8d63-4bbe-8bf8-4ea04092e72f";
 this.$emit("loaded", experiment);
@@ -131,4 +138,6 @@ export default {
 };
 
 
-
+
+@import "./styles.css";
+
diff --git 
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/Foo.vue
 
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/Foo.vue
deleted file mode 100644
index 7b8b46c..000
--- 
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/Foo.vue
+++ /dev/null
@@ -1,3 +0,0 @@
-
-  
-
diff --git 
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ProjectSelector.vue
 
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ProjectSelector.vue
new file mode 100644
index 000..7d5c116
--- /dev/null
+++ 
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ProjectSelector.vue
@@ -0,0 +1,95 @@
+
+  
+
+  
+Select a Project
+  
+  
+
+  {{ project.text }}
+
+  
+  
+
+  {{ project.text }}
+
+  
+
+  
+
+
+
+import { getDefaultProjectId, getProjects } from "./store";
+import Vue from "vue";
+import { BootstrapVue } from "bootstrap-vue";
+Vue.use(BootstrapVue);
+
+export default {
+  props: {
+value: {
+  type: String,
+  default: null,
+},
+  },
+  data() {
+return {
+  projectId: this.value,
+  projects: null,
+};
+  },
+  async mounted() {
+this.projects = await getProjects();
+const defaultProjectId = await getDefaultProjectId();
+if (!this.projectId) {
+  this.projectId = defaultProjectId;
+  this.$emit("input", this.projectId);
+}
+  },
+  computed: {
+sharedProjectOptions: function () {
+  return this.projects
+? this.projects
+.filter((p) => !p.isOwner)
+.map((project) => ({
+  value: project.projectID,
+  text:
+project.name +
+(!project.isOwner ? " (owned by " + project.owner + ")" : ""),
+}))
+: [];
+},
+myProjectOptions() {
+  return this.projects
+? this.projects
+.filter((p) => p.isOwner)
+.map((project) => ({
+  value: project.projectID,
+  text: project.name,
+}))
+: [];
+},
+  },
+  watch: {
+projectId() {
+  const inputEvent = new CustomEvent("input", {
+detail: [this.projectId],
+composed: true,
+bubbles: true,
+  });
+  this.$el.dispatchEvent(inputEvent);
+},
+  },
+};
+
+
+
+@import url("./styles.css");
+
diff --git 
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/store.js
 
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/store.js
index 2f66bfb..2e008b8 

[airavata-django-portal] 03/03: AIRAVATA-3453 group resource profile selector

2021-05-06 Thread machristie
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch airavata-3453
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit 9e24ffe94fefd0466eeb13df1bb04ce27a91b635
Author: Marcus Christie 
AuthorDate: Thu May 6 14:57:36 2021 -0400

AIRAVATA-3453 group resource profile selector
---
 .../js/web-components/ExperimentEditor.vue |   9 ++
 .../GroupResourceProfileSelector.vue   | 112 +
 .../js/web-components/store.js |  39 +--
 3 files changed, 150 insertions(+), 10 deletions(-)

diff --git 
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentEditor.vue
 
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentEditor.vue
index 0e99976..25d77d8 100644
--- 
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentEditor.vue
+++ 
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentEditor.vue
@@ -24,6 +24,11 @@
   
   
 
+
+  
+
+  
+
 
   Save
 
@@ -95,6 +100,10 @@ export default {
   const [projectId] = event.detail;
   this.experiment.projectId = projectId;
 },
+updateGroupResourceProfileId(event) {
+  const [groupResourceProfileId] = event.detail;
+  this.experiment.userConfigurationData.groupResourceProfileId = 
groupResourceProfileId;
+},
 onSubmit(event) {
   // console.log(event);
   // 'save' event is cancelable. Listener can call .preventDefault() on 
the event to cancel.
diff --git 
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/GroupResourceProfileSelector.vue
 
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/GroupResourceProfileSelector.vue
new file mode 100644
index 000..78be81f
--- /dev/null
+++ 
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/GroupResourceProfileSelector.vue
@@ -0,0 +1,112 @@
+
+  
+
+  
+
+  Select an allocation
+
+  
+
+  
+
+
+
+import {
+  getDefaultGroupResourceProfileId,
+  getGroupResourceProfiles,
+} from "./store";
+import Vue from "vue";
+import { BootstrapVue } from "bootstrap-vue";
+Vue.use(BootstrapVue);
+
+export default {
+  name: "group-resource-profile-selector",
+  props: {
+value: {
+  type: String,
+},
+label: {
+  type: String,
+  default: "Allocation",
+},
+  },
+  data() {
+return {
+  groupResourceProfileId: this.value,
+  groupResourceProfiles: [],
+  defaultGroupResourceProfileId: null,
+};
+  },
+  async mounted() {
+this.defaultGroupResourceProfileId = await 
getDefaultGroupResourceProfileId();
+this.groupResourceProfiles = await getGroupResourceProfiles();
+this.init();
+  },
+  computed: {
+groupResourceProfileOptions: function () {
+  if (this.groupResourceProfiles && this.groupResourceProfiles.length > 0) 
{
+const groupResourceProfileOptions = this.groupResourceProfiles.map(
+  (groupResourceProfile) => {
+return {
+  value: groupResourceProfile.groupResourceProfileId,
+  text: groupResourceProfile.groupResourceProfileName,
+};
+  }
+);
+groupResourceProfileOptions.sort((a, b) =>
+  a.text.localeCompare(b.text)
+);
+return groupResourceProfileOptions;
+  } else {
+return [];
+  }
+},
+  },
+  methods: {
+init() {
+  // Default the selected group resource profile
+  if (
+(!this.value ||
+  !this.selectedValueInGroupResourceProfileList(
+this.groupResourceProfiles
+  )) &&
+this.groupResourceProfiles &&
+this.groupResourceProfiles.length > 0
+  ) {
+// automatically select the last one user selected
+this.groupResourceProfileId = this.defaultGroupResourceProfileId;
+this.emitValueChanged();
+  }
+},
+groupResourceProfileChanged: function (groupResourceProfileId) {
+  this.groupResourceProfileId = groupResourceProfileId;
+  this.emitValueChanged();
+},
+emitValueChanged: function () {
+  const inputEvent = new CustomEvent("input", {
+detail: [this.groupResourceProfileId],
+composed: true,
+bubbles: true,
+  });
+  this.$el.dispatchEvent(inputEvent);
+},
+selectedValueInGroupResourceProfileList(groupResourceProfiles) {
+  return (
+groupResourceProfiles
+  .map((grp) => grp.groupResourceProfileId)
+  .indexOf(this.value) >= 0
+  );
+},
+  },
+};
+
+
+
+@import url("./styles.css");
+
diff --git 
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/store.js
 

[airavata-django-portal] branch airavata-3453 updated (cc630a0 -> 9e24ffe)

2021-05-06 Thread machristie
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a change to branch airavata-3453
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git.


from cc630a0  AIRAVATA-3453 Initialize textarea value
 new 3905db5  AIRAVATA-3453 Update experiment input when autocomplete 
option selected
 new bb2f31a  AIRAVATA-3453 project-selector and including bootstrap vue 
styles
 new 9e24ffe  AIRAVATA-3453 group resource profile selector

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../js/web-components/ExperimentEditor.vue |  33 --
 .../js/web-components/Foo.vue  |   3 -
 .../GroupResourceProfileSelector.vue   | 112 +
 .../js/web-components/ProjectSelector.vue  |  95 +
 .../js/web-components/store.js |  43 ++--
 .../js/web-components/styles.css   |   3 +
 .../django_airavata_workspace/supcrtbl2.html   |   9 +-
 7 files changed, 277 insertions(+), 21 deletions(-)
 delete mode 100644 
django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/Foo.vue
 create mode 100644 
django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/GroupResourceProfileSelector.vue
 create mode 100644 
django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ProjectSelector.vue
 create mode 100644 
django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/styles.css


[airavata-django-portal] branch develop updated: AIRAVATA-3458 Check first if file exists before getting size

2021-05-06 Thread machristie
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git


The following commit(s) were added to refs/heads/develop by this push:
 new 956d591  AIRAVATA-3458 Check first if file exists before getting size
956d591 is described below

commit 956d5915d16460e7da69f91bca16af535d55cb23
Author: Marcus Christie 
AuthorDate: Thu May 6 10:42:30 2021 -0400

AIRAVATA-3458 Check first if file exists before getting size
---
 django_airavata/apps/api/serializers.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/django_airavata/apps/api/serializers.py 
b/django_airavata/apps/api/serializers.py
index e5aa474..e355b63 100644
--- a/django_airavata/apps/api/serializers.py
+++ b/django_airavata/apps/api/serializers.py
@@ -481,7 +481,7 @@ class DataProductSerializer(
 def get_filesize(self, data_product):
 request = self.context['request']
 # For backwards compatibility with older user_storage, can be 
eventually removed
-if hasattr(user_storage, 'get_data_product_metadata'):
+if hasattr(user_storage, 'get_data_product_metadata') and 
user_storage.exists(request, data_product):
 metadata = user_storage.get_data_product_metadata(request, 
data_product)
 return metadata['size']
 else:


[airavata-django-portal-sdk] branch mft-integration updated: AIRAVATA-3458 Support get_data_product_metadata when user isn't owner

2021-05-06 Thread machristie
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch mft-integration
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal-sdk.git


The following commit(s) were added to refs/heads/mft-integration by this push:
 new f1cbe97  AIRAVATA-3458 Support get_data_product_metadata when user 
isn't owner
f1cbe97 is described below

commit f1cbe976a0c898179b26557395dcd46b21b831d4
Author: Marcus Christie 
AuthorDate: Thu May 6 11:22:09 2021 -0400

AIRAVATA-3458 Support get_data_product_metadata when user isn't owner
---
 airavata_django_portal_sdk/user_storage/api.py | 41 --
 airavata_django_portal_sdk/util.py |  7 +++--
 2 files changed, 44 insertions(+), 4 deletions(-)

diff --git a/airavata_django_portal_sdk/user_storage/api.py 
b/airavata_django_portal_sdk/user_storage/api.py
index 353d2e0..9ad2a31 100644
--- a/airavata_django_portal_sdk/user_storage/api.py
+++ b/airavata_django_portal_sdk/user_storage/api.py
@@ -402,7 +402,44 @@ def get_data_product_metadata(request, data_product=None, 
data_product_uri=None)
 if data_product is None:
 data_product = _get_data_product(request, data_product_uri)
 storage_resource_id, path = 
_get_replica_resource_id_and_filepath(data_product)
-return get_file_metadata(request, path, storage_resource_id)
+if _is_remote_api():
+resp = _call_remote_api(
+request,
+"/data-products/",
+params={'product-uri': data_product.productUri})
+data = resp.json()
+file = {
+"name": os.path.basename(path),
+# FIXME: since this isn't the true relative path, going to leave 
out for now
+# "path": path,
+"resource_path": path,
+"created_time": convert_iso8601_to_datetime(data['creationTime'], 
microseconds=False),
+"size": data['filesize']
+}
+mime_type = None
+if 'mime-type' in data_product.productMetadata:
+mime_type = data_product.productMetadata['mime-type']
+file['data-product-uri'] = data_product_uri
+file['mime_type'] = mime_type
+# TODO: remove this, there's no need for hidden files
+file['hidden'] = False
+return file
+backend = get_user_storage_provider(request,
+owner_username=data_product.ownerName,
+
storage_resource_id=storage_resource_id)
+if backend.is_file(path):
+_, files = backend.get_metadata(path)
+file = files[0]
+mime_type = None
+if 'mime-type' in data_product.productMetadata:
+mime_type = data_product.productMetadata['mime-type']
+file['data-product-uri'] = data_product_uri
+file['mime_type'] = mime_type
+# TODO: remove this, there's no need for hidden files
+file['hidden'] = False
+return file
+else:
+raise ObjectDoesNotExist("File does not exist at that path.")
 
 
 def get_file(request, path, storage_resource_id=None):
@@ -793,7 +830,7 @@ def _get_replica_resource_id_and_filepath(data_product):
 return (replica_location.storageResourceId,
 unquote(urlparse(replica_location.filePath).path))
 else:
-return None
+return None, None
 
 
 def _is_remote_api():
diff --git a/airavata_django_portal_sdk/util.py 
b/airavata_django_portal_sdk/util.py
index dc8a6bf..7395096 100644
--- a/airavata_django_portal_sdk/util.py
+++ b/airavata_django_portal_sdk/util.py
@@ -1,6 +1,9 @@
 import datetime
 
 
-def convert_iso8601_to_datetime(iso8601string):
+def convert_iso8601_to_datetime(iso8601string, microseconds=True):
 """Convert ISO8601 datetime string to a datetime instance."""
-return datetime.datetime.strptime(iso8601string, "%Y-%m-%dT%H:%M:%S.%fZ")
+if microseconds:
+return datetime.datetime.strptime(iso8601string, 
"%Y-%m-%dT%H:%M:%S.%fZ")
+else:
+return datetime.datetime.strptime(iso8601string, "%Y-%m-%dT%H:%M:%SZ")


[airavata-django-portal-sdk] branch mft-integration updated: In remote API `exists()`, handle case where data product itself doesn't exist

2021-05-06 Thread machristie
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch mft-integration
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal-sdk.git


The following commit(s) were added to refs/heads/mft-integration by this push:
 new 76f44b1  In remote API `exists()`, handle case where data product 
itself doesn't exist
76f44b1 is described below

commit 76f44b10de186bab00e1a80f4b39633b3af9c864
Author: Marcus Christie 
AuthorDate: Thu May 6 10:11:42 2021 -0400

In remote API `exists()`, handle case where data product itself doesn't 
exist
---
 airavata_django_portal_sdk/user_storage/api.py | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/airavata_django_portal_sdk/user_storage/api.py 
b/airavata_django_portal_sdk/user_storage/api.py
index 51f1279..353d2e0 100644
--- a/airavata_django_portal_sdk/user_storage/api.py
+++ b/airavata_django_portal_sdk/user_storage/api.py
@@ -248,7 +248,11 @@ def exists(request, data_product=None, 
data_product_uri=None):
 resp = _call_remote_api(
 request,
 "/data-products/",
-params={'product-uri': data_product.productUri})
+params={'product-uri': data_product.productUri},
+raise_for_status=False)
+if resp.status_code == HTTPStatus.NOT_FOUND:
+return False
+resp.raise_for_status()
 data = resp.json()
 return data['downloadURL'] is not None
 else:


[airavata-django-portal-sdk] branch master updated: In remote API `exists()`, handle case where data product itself doesn't exist

2021-05-06 Thread machristie
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal-sdk.git


The following commit(s) were added to refs/heads/master by this push:
 new 069af28  In remote API `exists()`, handle case where data product 
itself doesn't exist
069af28 is described below

commit 069af28ad9cacbeae075d7f4d626096820b43f0b
Author: Marcus Christie 
AuthorDate: Thu May 6 10:07:37 2021 -0400

In remote API `exists()`, handle case where data product itself doesn't 
exist
---
 airavata_django_portal_sdk/user_storage.py | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/airavata_django_portal_sdk/user_storage.py 
b/airavata_django_portal_sdk/user_storage.py
index 76d749a..6937ee4 100644
--- a/airavata_django_portal_sdk/user_storage.py
+++ b/airavata_django_portal_sdk/user_storage.py
@@ -198,7 +198,11 @@ def exists(request, data_product=None, 
data_product_uri=None):
 resp = _call_remote_api(
 request,
 "/data-products/",
-params={'product-uri': data_product.productUri})
+params={'product-uri': data_product.productUri},
+raise_for_status=False)
+if resp.status_code == HTTPStatus.NOT_FOUND:
+return False
+resp.raise_for_status()
 data = resp.json()
 return data['downloadURL'] is not None
 else:


[airavata-django-portal] branch develop updated (edd97d9 -> ee566e6)

2021-05-06 Thread machristie
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git.


from edd97d9  Merge pull request #59 from 
akbranam/AIRAVATA-3417-Search-JobId-And_Substring
 add 0870a6b  Merge branch 'staging'
 add 1d0a857  Merge branch 'develop' into staging
 add 2ff4d0c  AIRAVATA-3362 Handle missing experiment data dir
 add ee566e6  Merge branch 'staging' into develop

No new revisions were added by this update.

Summary of changes:
 .../storage/ExperimentStorageViewContainer.vue | 29 ++
 1 file changed, 24 insertions(+), 5 deletions(-)


[airavata-django-portal] branch staging updated: AIRAVATA-3362 Handle missing experiment data dir

2021-05-06 Thread machristie
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch staging
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git


The following commit(s) were added to refs/heads/staging by this push:
 new 2ff4d0c  AIRAVATA-3362 Handle missing experiment data dir
2ff4d0c is described below

commit 2ff4d0cc247281ca13ff0b1bca3d4662ea8bd21e
Author: Marcus Christie 
AuthorDate: Thu May 6 10:01:43 2021 -0400

AIRAVATA-3362 Handle missing experiment data dir
---
 .../storage/ExperimentStorageViewContainer.vue | 29 ++
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git 
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/storage/ExperimentStorageViewContainer.vue
 
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/storage/ExperimentStorageViewContainer.vue
index f940102..7241649 100644
--- 
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/storage/ExperimentStorageViewContainer.vue
+++ 
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/storage/ExperimentStorageViewContainer.vue
@@ -6,11 +6,14 @@
   @directory-selected="directorySelected"
   :download-in-new-window="true"
 >
+
+  Experiment Data Directory does not exist in storage.
+