]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-10816 Create WS to administrate applications
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 30 May 2018 12:27:58 +0000 (14:27 +0200)
committersonartech <sonartech@sonarsource.com>
Fri, 29 Jun 2018 07:10:15 +0000 (09:10 +0200)
server/sonar-server/src/main/java/org/sonar/server/project/Visibility.java
server/sonar-web/src/main/js/api/application.ts
sonar-plugin-api/src/main/java/org/sonar/api/utils/Paging.java

index 41e954b8218fd9b0c92aa34f06de9db8d4176ff4..510dfe7f4be392124876523fc4adb38b78a12203 100644 (file)
@@ -56,9 +56,12 @@ public enum Visibility {
   }
 
   public static boolean isPrivate(String label) {
+    return parseVisibility(label).isPrivate();
+  }
+
+  public static Visibility parseVisibility(String label) {
     return stream(values())
       .filter(v -> v.label.equals(label))
-      .map(Visibility::isPrivate)
       .findAny()
       .orElseThrow(() -> new IllegalStateException("Invalid visibility label '" + label + "'"));
   }
index 933756abb8178ee983dd01fa59f96b8f06892ead..5821d5705bec197c72e9a58e328756cafe118bf7 100644 (file)
@@ -27,5 +27,5 @@ export interface ApplicationLeak {
 }
 
 export function getApplicationLeak(application: string): Promise<Array<ApplicationLeak>> {
-  return getJSON('/api/views/show_leak', { application }).then(r => r.leaks, throwGlobalError);
+  return getJSON('/api/applications/show_leak', { application }).then(r => r.leaks, throwGlobalError);
 }
index 2e48336a348f89c1834d61c3fcb9d29389fe83b1..13aa3f675318a35b3224b33188e6ae0874bc9df4 100644 (file)
@@ -40,7 +40,7 @@ public class Paging {
   }
 
   /**
-   * @deprecated since 5.2 please use the forPageIndex(...) builder method
+   * @deprecated since 5.2 please use the #forPgeIndex(...) builder method
    */
   @Deprecated
   public static Paging create(int pageSize, int pageIndex, int totalItems) {