This is an automated email from the ASF dual-hosted git repository.

yasithdev pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airavata-portals.git


The following commit(s) were added to refs/heads/main by this push:
     new eb0d5bad7 Remove dead standalone frontend service singletons (#217)
eb0d5bad7 is described below

commit eb0d5bad731eee4337e15b059c5a1dd8dd415f1d
Author: Yasith Jayawardana <[email protected]>
AuthorDate: Sat Jun 13 01:36:49 2026 -0400

    Remove dead standalone frontend service singletons (#217)
    
    ProjectService.js, FullExperimentService.js, and UserProfileService.js under
    api/js/services are superseded: index.js binds 
ProjectService/FullExperimentService/
    UserProfileService via ServiceFactory.service("Projects"/"FullExperiments"/
    "UserProfiles") and does not import these standalone files. No component 
imports
    them by path either (consumers get the factory-bound versions from the api 
index),
    so they are never bundled.
---
 .../js/services/FullExperimentService.js           | 17 --------
 .../js/services/ProjectService.js                  | 48 ----------------------
 .../js/services/UserProfileService.js              | 17 --------
 3 files changed, 82 deletions(-)

diff --git 
a/airavata-django-portal/django_airavata/apps/api/static/django_airavata_api/js/services/FullExperimentService.js
 
b/airavata-django-portal/django_airavata/apps/api/static/django_airavata_api/js/services/FullExperimentService.js
deleted file mode 100644
index 452f7d9b0..000000000
--- 
a/airavata-django-portal/django_airavata/apps/api/static/django_airavata_api/js/services/FullExperimentService.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import FullExperiment from "../models/FullExperiment";
-import FetchUtils from "../utils/FetchUtils";
-
-class FullExperimentService {
-  get(experimentId, data = null) {
-    if (data) {
-      return Promise.resolve(new FullExperiment(data));
-    } else {
-      return FetchUtils.get(
-        "/api/full-experiments/" + encodeURIComponent(experimentId) + "/"
-      ).then((result) => new FullExperiment(result));
-    }
-  }
-}
-
-// Export as a singleton
-export default new FullExperimentService();
diff --git 
a/airavata-django-portal/django_airavata/apps/api/static/django_airavata_api/js/services/ProjectService.js
 
b/airavata-django-portal/django_airavata/apps/api/static/django_airavata_api/js/services/ProjectService.js
deleted file mode 100644
index df5100853..000000000
--- 
a/airavata-django-portal/django_airavata/apps/api/static/django_airavata_api/js/services/ProjectService.js
+++ /dev/null
@@ -1,48 +0,0 @@
-import Project from "../models/Project";
-import PaginationIterator from "../utils/PaginationIterator";
-import FetchUtils from "../utils/FetchUtils";
-
-class ProjectService {
-  list(data = {}) {
-    if (data && data.results) {
-      return Promise.resolve(new PaginationIterator(data, Project));
-    } else {
-      return fetch("/api/projects/", {
-        credentials: "include",
-      })
-        .then((response) => response.json())
-        .then((json) => new PaginationIterator(json, Project));
-    }
-  }
-
-  listAll() {
-    return fetch("/api/projects/list_all/", {
-      credentials: "include",
-    })
-      .then((response) => response.json())
-      .then((json) => json.map((project) => new Project(project)));
-  }
-
-  create(project) {
-    return FetchUtils.post("/api/projects/", JSON.stringify(project)).then(
-      (result) => new Project(result)
-    );
-  }
-
-  update() {
-    // TODO
-  }
-
-  get(projectId, data = null) {
-    if (data) {
-      return Promise.resolve(new Project(data));
-    } else {
-      return FetchUtils.get(
-        "/api/projects/" + encodeURIComponent(projectId) + "/"
-      ).then((result) => new Project(result));
-    }
-  }
-}
-
-// Export as a singleton
-export default new ProjectService();
diff --git 
a/airavata-django-portal/django_airavata/apps/api/static/django_airavata_api/js/services/UserProfileService.js
 
b/airavata-django-portal/django_airavata/apps/api/static/django_airavata_api/js/services/UserProfileService.js
deleted file mode 100644
index 1a5c3b518..000000000
--- 
a/airavata-django-portal/django_airavata/apps/api/static/django_airavata_api/js/services/UserProfileService.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import UserProfile from "../models/UserProfile";
-import FetchUtils from "../utils/FetchUtils";
-
-class UserProfileService {
-  list(data = null) {
-    if (data) {
-      return Promise.resolve(data.map((result) => new UserProfile(result)));
-    } else {
-      return FetchUtils.get("/api/user-profiles/").then((results) =>
-        results.map((result) => new UserProfile(result))
-      );
-    }
-  }
-}
-
-// Export as a singleton
-export default new UserProfileService();

Reply via email to