aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/quality-profiles/home
diff options
context:
space:
mode:
authorphilippe-perrin-sonarsource <philippe.perrin@sonarsource.com>2022-01-27 11:06:59 +0100
committersonartech <sonartech@sonarsource.com>2022-01-27 20:03:05 +0000
commitdca8354af94e9feb46ea2312857e000aaa232372 (patch)
tree336b645749ab1fb1b1abdac19a69c70257e98b68 /server/sonar-web/src/main/js/apps/quality-profiles/home
parent85f744be340d8f404978341186dd77cc05584f31 (diff)
downloadsonarqube-dca8354af94e9feb46ea2312857e000aaa232372.tar.gz
sonarqube-dca8354af94e9feb46ea2312857e000aaa232372.zip
SONAR-15945 Get rid of T namespace in sonar-web
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-profiles/home')
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionRules.tsx5
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.tsx8
2 files changed, 6 insertions, 7 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionRules.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionRules.tsx
index e22e81e2460..03c084b8498 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionRules.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionRules.tsx
@@ -25,17 +25,18 @@ import { toShortNotSoISOString } from '../../../helpers/dates';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { formatMeasure } from '../../../helpers/measures';
import { getRulesUrl } from '../../../helpers/urls';
+import { Dict, Rule, RuleActivation } from '../../../types/types';
const RULES_LIMIT = 10;
-function parseRules(rules: T.Rule[], actives?: T.Dict<T.RuleActivation[]>): ExtendedRule[] {
+function parseRules(rules: Rule[], actives?: Dict<RuleActivation[]>): ExtendedRule[] {
return rules.map(rule => {
const activations = actives && actives[rule.key];
return { ...rule, activations: activations ? activations.length : 0 };
});
}
-interface ExtendedRule extends T.Rule {
+interface ExtendedRule extends Rule {
activations: number;
}
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.tsx
index c1256df0850..8e3e02902fa 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.tsx
@@ -23,12 +23,13 @@ import * as React from 'react';
import HelpTooltip from '../../../components/controls/HelpTooltip';
import { Alert } from '../../../components/ui/Alert';
import { translate, translateWithParameters } from '../../../helpers/l10n';
+import { Dict, Language } from '../../../types/types';
import { Profile } from '../types';
import ProfilesListHeader from './ProfilesListHeader';
import ProfilesListRow from './ProfilesListRow';
interface Props {
- languages: T.Language[];
+ languages: Language[];
location: Pick<Location, 'query'>;
profiles: Profile[];
updateProfiles: () => Promise<void>;
@@ -95,10 +96,7 @@ export default class ProfilesList extends React.PureComponent<Props> {
const { profiles, languages } = this.props;
const { language } = this.props.location.query;
- const profilesIndex: T.Dict<Profile[]> = groupBy<Profile>(
- profiles,
- profile => profile.language
- );
+ const profilesIndex: Dict<Profile[]> = groupBy<Profile>(profiles, profile => profile.language);
const profilesToShow = language ? pick(profilesIndex, language) : profilesIndex;