aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main
diff options
context:
space:
mode:
authorDavid Cho-Lerat <david.cho-lerat@sonarsource.com>2024-03-26 17:00:58 +0100
committersonartech <sonartech@sonarsource.com>2024-03-27 20:02:41 +0000
commit2d74ec68eacea50de73aa63504d26070f289bc66 (patch)
treeff4651f16ed4d953ab1d6e4b07e05940057b3da6 /server/sonar-web/src/main
parent568280bfd2ad771a302b61727264ce2446ec507f (diff)
downloadsonarqube-2d74ec68eacea50de73aa63504d26070f289bc66.tar.gz
sonarqube-2d74ec68eacea50de73aa63504d26070f289bc66.zip
SONAR-21748 Fix scanner context modal title
Diffstat (limited to 'server/sonar-web/src/main')
-rw-r--r--server/sonar-web/src/main/js/apps/background-tasks/components/ScannerContext.tsx28
1 files changed, 12 insertions, 16 deletions
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/ScannerContext.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/ScannerContext.tsx
index f60bc0e5418..745c54e4d48 100644
--- a/server/sonar-web/src/main/js/apps/background-tasks/components/ScannerContext.tsx
+++ b/server/sonar-web/src/main/js/apps/background-tasks/components/ScannerContext.tsx
@@ -17,12 +17,14 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { Modal, Spinner } from 'design-system';
+
+import { Spinner } from '@sonarsource/echoes-react';
+import { Modal } from 'design-system';
import { noop } from 'lodash';
import * as React from 'react';
-import { FormattedMessage } from 'react-intl';
import { getTask } from '../../../api/ce';
import { translate } from '../../../helpers/l10n';
+import { isDefined } from '../../../helpers/types';
import { Task } from '../../../types/tasks';
interface Props {
@@ -61,23 +63,17 @@ export default class ScannerContext extends React.PureComponent<Props, State> {
return (
<Modal
- onClose={this.props.onClose}
- isLarge
- isScrollable
- headerTitle={
- <FormattedMessage
- id="background_tasks.error_stacktrace.title"
- values={{
- project: task.componentName,
- type: translate('background_task.type', task.type),
- }}
- />
- }
body={
- <Spinner loading={scannerContext == null}>
- <pre className="js-task-scanner-context">{scannerContext}</pre>
+ <Spinner isLoading={!isDefined(scannerContext)}>
+ <pre className="it__task-scanner-context">{scannerContext}</pre>
</Spinner>
}
+ headerTitle={`${translate('background_tasks.scanner_context')}: ${
+ task.componentName
+ } [${translate('background_task.type', task.type)}]`}
+ isLarge
+ isScrollable
+ onClose={this.props.onClose}
secondaryButtonLabel={translate('close')}
/>
);