aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.js
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2018-12-04 12:10:03 +0100
committerSonarTech <sonartech@sonarsource.com>2018-12-07 20:21:02 +0100
commitd878513061fbc8a097c833df45206a685a928409 (patch)
tree42c0e2e46bef318d4760a1832d45c33a818b15be /server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.js
parent585f3438a50dc49a31f05948451d1dd333268cbe (diff)
downloadsonarqube-d878513061fbc8a097c833df45206a685a928409.tar.gz
sonarqube-d878513061fbc8a097c833df45206a685a928409.zip
rewrite permission templates app in ts
Diffstat (limited to 'server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.js')
-rw-r--r--server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.js50
1 files changed, 0 insertions, 50 deletions
diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.js b/server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.js
deleted file mode 100644
index d1055d0217b..00000000000
--- a/server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2018 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.
- */
-import React from 'react';
-import PropTypes from 'prop-types';
-import { sortBy } from 'lodash';
-import { translate, translateWithParameters } from '../../../helpers/l10n';
-import { PermissionTemplateType } from '../propTypes';
-
-export default class Defaults extends React.PureComponent {
- static propTypes = {
- organization: PropTypes.object,
- permissionTemplate: PermissionTemplateType.isRequired
- };
-
- render() {
- const qualifiersToDisplay =
- this.props.organization && !this.props.organization.isDefault
- ? ['TRK']
- : this.props.permissionTemplate.defaultFor;
-
- const qualifiers = sortBy(qualifiersToDisplay)
- .map(qualifier => translate('qualifiers', qualifier))
- .join(', ');
-
- return (
- <div>
- <span className="badge spacer-right">
- {translateWithParameters('permission_template.default_for', qualifiers)}
- </span>
- </div>
- );
- }
-}