You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2021/06/23 21:26:25 UTC
[airavata-django-portal] branch develop updated: AIRAVATA-3322
performance improvements in the frontend for loading statistics
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 a0c2421 AIRAVATA-3322 performance improvements in the frontend for loading statistics
a0c2421 is described below
commit a0c242110c5e653ccf93eef532d9b5f42fcc0de2
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Wed Jun 23 17:26:04 2021 -0400
AIRAVATA-3322 performance improvements in the frontend for loading statistics
---
.../statistics/ExperimentStatisticsContainer.vue | 2 --
django_airavata/apps/api/serializers.py | 17 ++++++++++-------
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/statistics/ExperimentStatisticsContainer.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/statistics/ExperimentStatisticsContainer.vue
index c15d0f1..71d4529 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/statistics/ExperimentStatisticsContainer.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/statistics/ExperimentStatisticsContainer.vue
@@ -484,13 +484,11 @@ export default {
//this.fromTime = new Date(this.fromTime.setHours(0,0,0));
this.toTime = new Date().fp_incr(1);
this.updateDateRange();
- this.loadStatistics();
},
getPastWeek() {
this.fromTime = new Date().fp_incr(-7);
this.toTime = new Date().fp_incr(1);
this.updateDateRange();
- this.loadStatistics();
},
updateDateRange() {
this.dateRange = [
diff --git a/django_airavata/apps/api/serializers.py b/django_airavata/apps/api/serializers.py
index ec68e11..700bbf6 100644
--- a/django_airavata/apps/api/serializers.py
+++ b/django_airavata/apps/api/serializers.py
@@ -531,7 +531,7 @@ class FullExperimentSerializer(serializers.Serializer):
raise Exception("Not implemented")
-class ExperimentSummarySerializer(
+class BaseExperimentSummarySerializer(
thrift_utils.create_serializer_class(ExperimentSummaryModel)):
creationTime = UTCPosixTimestampDateTimeField()
statusUpdateTime = UTCPosixTimestampDateTimeField()
@@ -543,6 +543,9 @@ class ExperimentSummarySerializer(
view_name='django_airavata_api:project-detail',
lookup_field='projectId',
lookup_url_kwarg='project_id')
+
+
+class ExperimentSummarySerializer(BaseExperimentSummarySerializer):
userHasWriteAccess = serializers.SerializerMethodField()
def get_userHasWriteAccess(self, experiment):
@@ -989,12 +992,12 @@ class NotificationSerializer(
class ExperimentStatisticsSerializer(
thrift_utils.create_serializer_class(ExperimentStatistics)):
- allExperiments = ExperimentSummarySerializer(many=True)
- completedExperiments = ExperimentSummarySerializer(many=True)
- failedExperiments = ExperimentSummarySerializer(many=True)
- cancelledExperiments = ExperimentSummarySerializer(many=True)
- createdExperiments = ExperimentSummarySerializer(many=True)
- runningExperiments = ExperimentSummarySerializer(many=True)
+ allExperiments = BaseExperimentSummarySerializer(many=True)
+ completedExperiments = BaseExperimentSummarySerializer(many=True)
+ failedExperiments = BaseExperimentSummarySerializer(many=True)
+ cancelledExperiments = BaseExperimentSummarySerializer(many=True)
+ createdExperiments = BaseExperimentSummarySerializer(many=True)
+ runningExperiments = BaseExperimentSummarySerializer(many=True)
class UnverifiedEmailUserProfile(serializers.Serializer):