From 3a604bda9aa574c291f764ca8791b9af91d66a67 Mon Sep 17 00:00:00 2001 From: Grégoire Aubert Date: Fri, 23 Jun 2017 17:34:10 +0200 Subject: SONAR-9414 Display a preview of the project activity graph on the project page --- .../src/main/js/apps/overview/events/Event.js | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 server/sonar-web/src/main/js/apps/overview/events/Event.js (limited to 'server/sonar-web/src/main/js/apps/overview/events/Event.js') diff --git a/server/sonar-web/src/main/js/apps/overview/events/Event.js b/server/sonar-web/src/main/js/apps/overview/events/Event.js new file mode 100644 index 00000000000..1d377ecd253 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/overview/events/Event.js @@ -0,0 +1,44 @@ +/* + * 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 React from 'react'; +import { TooltipsContainer } from '../../../components/mixins/tooltips-mixin'; +import type { Event as EventType } from '../../projectActivity/types'; +import { translate } from '../../../helpers/l10n'; + +export default function Event(props: { event: EventType }) { + const { event } = props; + + if (event.category === 'VERSION') { + return {props.event.name}; + } + + return ( +
+ + + {translate('event.category', event.category)}: + {' '} + {event.name} + + +
+ ); +} -- cgit v1.2.3