}
interface State {
- incremental?: boolean;
isFailed?: boolean;
isInProgress?: boolean;
isPending?: boolean;
this.setState({
isPending: r.queue.some((task: any) => task.status === STATUSES.PENDING),
isInProgress: r.queue.some((task: any) => task.status === STATUSES.IN_PROGRESS),
- isFailed: r.current && r.current.status === STATUSES.FAILED,
- incremental: r.current && r.current.incremental
+ isFailed: r.current && r.current.status === STATUSES.FAILED
});
}
});
<ComponentNavMeta
branch={this.props.currentBranch}
component={this.props.component}
- incremental={this.state.incremental}
isInProgress={this.state.isInProgress}
isFailed={this.state.isFailed}
isPending={this.state.isPending}
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import IncrementalBadge from './IncrementalBadge';
import BranchStatus from '../../../../components/common/BranchStatus';
import { Branch, Component } from '../../../types';
import Tooltip from '../../../../components/controls/Tooltip';
interface Props {
branch?: Branch;
component: Component;
- incremental?: boolean;
isInProgress?: boolean;
isFailed?: boolean;
isPending?: boolean;
metaList.push(<li key="version">Version {props.component.version}</li>);
}
- if (props.incremental) {
- metaList.push(
- <li key="incremental">
- <IncrementalBadge />
- </li>
- );
- }
-
return (
<div className="navbar-context-meta">
<ul className="list-inline">{metaList}</ul>
+++ /dev/null
-/*
- * 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.
- */
-import * as React from 'react';
-import Tooltip from '../../../../components/controls/Tooltip';
-import { translate } from '../../../../helpers/l10n';
-
-export default function IncrementalBadge() {
- return (
- <Tooltip overlay={translate('incremental.project_tooltip')}>
- <div className="outline-badge">{translate('incremental')}</div>
- </Tooltip>
- );
-}
});
it('renders', () => {
- const wrapper = shallow(
- <ComponentNav branches={[]} component={component} location={{}} />
- );
- wrapper.setState({
- incremental: true,
- isFailed: true,
- isInProgress: true,
- isPending: true
- });
+ const wrapper = shallow(<ComponentNav branches={[]} component={component} location={{}} />);
+ wrapper.setState({ isFailed: true, isInProgress: true, isPending: true });
expect(wrapper).toMatchSnapshot();
});
import * as React from 'react';
import { shallow } from 'enzyme';
import ComponentNavMeta from '../ComponentNavMeta';
-import { Branch, BranchType, ShortLivingBranch, LongLivingBranch } from '../../../../types';
+import { BranchType, ShortLivingBranch, LongLivingBranch } from '../../../../types';
const component = {
analysisDate: '2017-01-02T00:00:00.000Z',
version: '0.0.1'
};
-it('renders incremental badge', () => {
- check(true);
- check(false);
-
- function check(incremental: boolean) {
- expect(
- shallow(
- <ComponentNavMeta branch={{} as Branch} component={component} incremental={incremental} />
- ).find('IncrementalBadge')
- ).toHaveLength(incremental ? 1 : 0);
- }
-});
-
it('renders status of short-living branch', () => {
const branch: ShortLivingBranch = {
isMain: false,
"qualifier": "TRK",
}
}
- incremental={true}
isFailed={true}
isInProgress={true}
isPending={true}
return (
<td>
<span className="note">{task.id}</span>
- <TaskType incremental={task.incremental} type={task.type} />
+ <TaskType type={task.type} />
</td>
);
}
</Link>
)}
- <TaskType incremental={task.incremental} type={task.type} />
+ <TaskType type={task.type} />
</td>
);
}
import { translate } from '../../../helpers/l10n';
interface Props {
- incremental?: boolean;
type: string;
}
-export default function TaskType({ incremental, type }: Props) {
+export default function TaskType({ type }: Props) {
return (
<span className="display-inline-block note">
{'['}
{translate('background_task.type', type)}
- {incremental && ` - ${translate('incremental')}`}
{']'}
</span>
);
it('renders', () => {
expect(shallow(<TaskType type="REPORT" />)).toMatchSnapshot();
- expect(shallow(<TaskType incremental={true} type="REPORT" />)).toMatchSnapshot();
});
]
</span>
`;
-
-exports[`renders 2`] = `
-<span
- className="display-inline-block note"
->
- [
- background_task.type.REPORT
- - incremental
- ]
-</span>
-`;
executedAt?: string;
executionTimeMs?: number;
hasScannerContext?: boolean;
- incremental?: boolean;
id: string;
organization?: string;
startedAt?: string;
identifier_abbreviated=Id
inactive=Inactive
including_abbreviated=incl.
-incremental=Incremental
-incremental.project_tooltip=Overall project status could be incomplete: incremental mode was used in the last analysis, so only changed files were examined.
info=Info
issue=Issue
issues=Issues