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

lahirujayathilake pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/master by this push:
     new 9fe9f4ff57 Backend support for listing tags in alphabetical order 
(#550)
9fe9f4ff57 is described below

commit 9fe9f4ff57d696bfbd56903587a4f456f1949c6c
Author: Ganning Xu <[email protected]>
AuthorDate: Tue Jul 29 14:03:54 2025 -0700

    Backend support for listing tags in alphabetical order (#550)
    
    * backend support for listing tags in alphabetical order
    
    * adding file to allow test to paass
---
 .../helix/impl/task/aws/AWSCompletingTask.java     | 38 +++++++++++-----------
 .../service/controller/ResourceController.java     |  2 +-
 .../research/service/handlers/ResourceHandler.java |  5 +++
 3 files changed, 25 insertions(+), 20 deletions(-)

diff --git 
a/airavata-api/src/main/java/org/apache/airavata/helix/impl/task/aws/AWSCompletingTask.java
 
b/airavata-api/src/main/java/org/apache/airavata/helix/impl/task/aws/AWSCompletingTask.java
index 0485e6aafc..725ad2607d 100644
--- 
a/airavata-api/src/main/java/org/apache/airavata/helix/impl/task/aws/AWSCompletingTask.java
+++ 
b/airavata-api/src/main/java/org/apache/airavata/helix/impl/task/aws/AWSCompletingTask.java
@@ -1,21 +1,22 @@
 /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
 package org.apache.airavata.helix.impl.task.aws;
 
 import org.apache.airavata.helix.impl.task.AiravataTask;
@@ -44,6 +45,5 @@ public class AWSCompletingTask extends AiravataTask {
     }
 
     @Override
-    public void onCancel(TaskContext taskContext) {
-    }
+    public void onCancel(TaskContext taskContext) {}
 }
diff --git 
a/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/controller/ResourceController.java
 
b/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/controller/ResourceController.java
index af849205fd..f02cf7cac5 100644
--- 
a/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/controller/ResourceController.java
+++ 
b/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/controller/ResourceController.java
@@ -99,7 +99,7 @@ public class ResourceController {
     @Operation(summary = "Get all tags")
     @GetMapping(value = "/public/tags/all")
     public 
ResponseEntity<List<org.apache.airavata.research.service.model.entity.Tag>> 
getTags() {
-        return ResponseEntity.ok(resourceHandler.getAllTagsByPopularity());
+        return 
ResponseEntity.ok(resourceHandler.getAllTagsByAlphabeticalOrder());
     }
 
     @Operation(summary = "Get dataset, notebook, repository, or model")
diff --git 
a/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/handlers/ResourceHandler.java
 
b/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/handlers/ResourceHandler.java
index d4bff347f4..d76b11aae6 100644
--- 
a/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/handlers/ResourceHandler.java
+++ 
b/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/handlers/ResourceHandler.java
@@ -48,6 +48,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.PageRequest;
 import org.springframework.data.domain.Pageable;
+import org.springframework.data.domain.Sort;
 import org.springframework.stereotype.Service;
 
 @Service
@@ -284,6 +285,10 @@ public class ResourceHandler {
         return tagRepository.findDistinctByPopularity(100);
     }
 
+    public List<Tag> getAllTagsByAlphabeticalOrder() {
+        return tagRepository.findAll(Sort.by(Sort.Direction.ASC, "value"));
+    }
+
     public List<Resource> getAllResourcesByTypeAndName(Class<? extends 
Resource> type, String name) {
         return resourceRepository.findByTypeAndNameContainingIgnoreCase(type, 
name.toLowerCase(), UserContext.userId());
     }

Reply via email to