diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-12-20 16:11:28 +0100 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2016-12-20 16:35:14 +0100 |
commit | ad9cf3363e466ad8e62c1b7c91363b18c80940ef (patch) | |
tree | 49095463cb5cee96bf1cf1492ed27176ec4a0985 /it | |
parent | f483ceff28b0d3ce39da21c7442ebaec803e4fe2 (diff) | |
download | sonarqube-ad9cf3363e466ad8e62c1b7c91363b18c80940ef.tar.gz sonarqube-ad9cf3363e466ad8e62c1b7c91363b18c80940ef.zip |
add all kinds of page extensions to ui-extensions-plugin
Diffstat (limited to 'it')
4 files changed, 112 insertions, 1 deletions
diff --git a/it/it-plugins/ui-extensions-plugin/src/main/java/GlobalPage.java b/it/it-plugins/ui-extensions-plugin/src/main/java/GlobalPage.java new file mode 100644 index 00000000000..d243da0828d --- /dev/null +++ b/it/it-plugins/ui-extensions-plugin/src/main/java/GlobalPage.java @@ -0,0 +1,34 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import org.sonar.api.web.NavigationSection; +import org.sonar.api.web.Page; + +@NavigationSection(NavigationSection.HOME) +public class GlobalPage implements Page { + + public String getId() { + return "global_page"; + } + + public String getTitle() { + return "Global Page"; + } + +} diff --git a/it/it-plugins/ui-extensions-plugin/src/main/java/ProjectPage.java b/it/it-plugins/ui-extensions-plugin/src/main/java/ProjectPage.java new file mode 100644 index 00000000000..db08565862a --- /dev/null +++ b/it/it-plugins/ui-extensions-plugin/src/main/java/ProjectPage.java @@ -0,0 +1,37 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import org.sonar.api.resources.Qualifiers; +import org.sonar.api.web.NavigationSection; +import org.sonar.api.web.Page; +import org.sonar.api.web.ResourceQualifier; + +@NavigationSection(NavigationSection.RESOURCE) +@ResourceQualifier({Qualifiers.PROJECT}) +public class ProjectPage implements Page { + + public String getId() { + return "/project_page"; + } + + public String getTitle() { + return "Project Page"; + } + +} diff --git a/it/it-plugins/ui-extensions-plugin/src/main/java/SettingsPage.java b/it/it-plugins/ui-extensions-plugin/src/main/java/SettingsPage.java new file mode 100644 index 00000000000..9c3fd26c990 --- /dev/null +++ b/it/it-plugins/ui-extensions-plugin/src/main/java/SettingsPage.java @@ -0,0 +1,37 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import org.sonar.api.web.NavigationSection; +import org.sonar.api.web.Page; +import org.sonar.api.web.UserRole; + +@NavigationSection(NavigationSection.CONFIGURATION) +@UserRole(UserRole.ADMIN) +public class SettingsPage implements Page { + + public String getId() { + return "settings_page"; + } + + public String getTitle() { + return "Settings Page"; + } + +} diff --git a/it/it-plugins/ui-extensions-plugin/src/main/java/UiExtensionsPlugin.java b/it/it-plugins/ui-extensions-plugin/src/main/java/UiExtensionsPlugin.java index c236dff6b71..c545b48c8e9 100644 --- a/it/it-plugins/ui-extensions-plugin/src/main/java/UiExtensionsPlugin.java +++ b/it/it-plugins/ui-extensions-plugin/src/main/java/UiExtensionsPlugin.java @@ -26,7 +26,10 @@ public class UiExtensionsPlugin extends SonarPlugin { public List getExtensions() { return Arrays.asList( FakePageDecorations.class, - ResourceConfigurationPage.class + ResourceConfigurationPage.class, + ProjectPage.class, + GlobalPage.class, + SettingsPage.class ); } } |