]> source.dussan.org Git - sonarqube.git/commitdiff
Expose Icons component to plugins
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Fri, 11 Aug 2017 08:41:15 +0000 (10:41 +0200)
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>
Mon, 14 Aug 2017 09:44:44 +0000 (11:44 +0200)
server/sonar-web/src/main/js/app/utils/exposeLibraries.js
server/sonar-web/src/main/js/components/icons-components/icons.js [new file with mode: 0644]

index dd928635b8bd55415ebf2f2d9a52cd2b83f76519..7c458767be0a54cc7aaa29c722b146708d6d04f6 100644 (file)
@@ -24,6 +24,7 @@ import Select from 'react-select';
 import Modal from 'react-modal';
 import * as measures from '../../helpers/measures';
 import * as request from '../../helpers/request';
+import * as icons from '../../components/icons-components/icons';
 import FavoriteContainer from '../../components/controls/FavoriteContainer';
 import ListFooter from '../../components/controls/ListFooter';
 import Tooltip from '../../components/controls/Tooltip';
@@ -37,6 +38,7 @@ const exposeLibraries = () => {
   window.moment = moment;
   window.ReactRedux = ReactRedux;
   window.ReactRouter = ReactRouter;
+  window.SonarIcons = icons;
   window.SonarMeasures = measures;
   window.SonarRequest = request;
   window.SonarComponents = {
diff --git a/server/sonar-web/src/main/js/components/icons-components/icons.js b/server/sonar-web/src/main/js/components/icons-components/icons.js
new file mode 100644 (file)
index 0000000..890a7c8
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info 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.
+ */
+// @flow
+import _AlertWarnIcon from './AlertWarnIcon';
+import _BubblesIcon from './BubblesIcon';
+import _BugIcon from './BugIcon';
+import _ChangeIcon from './ChangeIcon';
+import _ChartLegendIcon from './ChartLegendIcon';
+import _CloseIcon from './CloseIcon';
+import _CodeSmellIcon from './CodeSmellIcon';
+import _DeleteIcon from './DeleteIcon';
+import _HelpIcon from './HelpIcon';
+import _HistoryIcon from './HistoryIcon';
+import _LinkIcon from './LinkIcon';
+import _ListIcon from './ListIcon';
+import _OrganizationIcon from './OrganizationIcon';
+import _ProjectEventIcon from './ProjectEventIcon';
+import _QualifierIcon from './QualifierIcon';
+import _SortAscIcon from './SortAscIcon';
+import _SortDescIcon from './SortDescIcon';
+import _TreeIcon from './TreeIcon';
+import _TreemapIcon from './TreemapIcon';
+import _VulnerabilityIcon from './VulnerabilityIcon';
+
+export const AlertWarnIcon = _AlertWarnIcon;
+export const BubblesIcon = _BubblesIcon;
+export const BugIcon = _BugIcon;
+export const ChangeIcon = _ChangeIcon;
+export const ChartLegendIcon = _ChartLegendIcon;
+export const CloseIcon = _CloseIcon;
+export const CodeSmellIcon = _CodeSmellIcon;
+export const DeleteIcon = _DeleteIcon;
+export const HelpIcon = _HelpIcon;
+export const HistoryIcon = _HistoryIcon;
+export const LinkIcon = _LinkIcon;
+export const ListIcon = _ListIcon;
+export const OrganizationIcon = _OrganizationIcon;
+export const ProjectEventIcon = _ProjectEventIcon;
+export const QualifierIcon = _QualifierIcon;
+export const SortAscIcon = _SortAscIcon;
+export const SortDescIcon = _SortDescIcon;
+export const TreeIcon = _TreeIcon;
+export const TreemapIcon = _TreemapIcon;
+export const VulnerabilityIcon = _VulnerabilityIcon;