Skip to content

Commit 741ba11

Browse files
author
Oleksandr_Halichenko
committed
removed unused components
1 parent 501b3a8 commit 741ba11

File tree

15 files changed

+44
-81
lines changed

15 files changed

+44
-81
lines changed

src/App.module.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ footer {
3333
margin-left: 15px;
3434
}
3535

36+
.failedTitle {
37+
margin-right: 15px;
38+
}
39+
3640
.caption {
3741
color: aliceblue;
3842
}

src/App.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@ import { Route } from 'react-router-dom';
55
import { AppHeader } from './AppHeader';
66
import css from './App.module.scss';
77

8-
import sourceData from './report.json';
8+
declare global {
9+
interface Window {
10+
data: any;
11+
sourceData: Array<any>
12+
}
13+
}
914

10-
const data = (sourceData as Array<any>)
15+
const data = window.sourceData
1116
.map((feature: any) => ({
1217
...feature,
1318
total: feature.elements.length,
@@ -26,10 +31,6 @@ const data = (sourceData as Array<any>)
2631
status: feature.failed > 0 ? 'failed' : 'passed'
2732
}));
2833

29-
declare global {
30-
interface Window { data: any; }
31-
}
32-
3334
window.data = data;
3435

3536
export const App = () => {
@@ -38,7 +39,8 @@ export const App = () => {
3839
<Route component={ AppHeader } />
3940
<main>
4041
<Route path="/" exact component={ MainPage } />
41-
<Route path="/:id" exact component={ FeaturePage } />
42+
<Route path="/feature/:id" exact component={ FeaturePage } />
43+
<Route path="/failed-scenarios" exact component={ FeaturePage } />
4244
</main>
4345
<footer/>
4446
</div>

src/AppHeader.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as React from "react";
2-
import { MainMenu, Text, LinkButton } from "@epam/promo";
1+
import * as React from 'react';
2+
import { MainMenu, FlexSpacer, LinkButton } from '@epam/promo';
33
import css from './App.module.scss';
44

55
export const AppHeader = () => {
@@ -12,6 +12,14 @@ export const AppHeader = () => {
1212
cx={css.title}
1313
captionCX={css.caption}
1414
/>
15+
<FlexSpacer/>
16+
<LinkButton
17+
caption='Failed Scenarios'
18+
link={ { pathname: '/failed-scenarios' } }
19+
size='48'
20+
cx={css.failedTitle}
21+
captionCX={css.caption}
22+
/>
1523
</MainMenu>
1624
)
1725
}

src/components/AttachmentModal.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@ import {
55
ModalHeader,
66
ModalWindow,
77
FlexRow,
8-
FlexSpacer,
98
Panel,
10-
ScrollBars,
11-
Text,
12-
Button
9+
ScrollBars
1310
} from '@epam/promo';
1411

1512
export const AttachmentModal = (modalProps: any) => {

src/components/ErrorModal.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@ import {
55
ModalHeader,
66
ModalWindow,
77
FlexRow,
8-
FlexSpacer,
98
Panel,
10-
ScrollBars,
11-
Text,
12-
Button
9+
ScrollBars
1310
} from '@epam/promo';
1411

1512
export const ErrorModal = (modalProps: any) => {

src/components/Features.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useMemo, useState} from 'react';
1+
import React, { useState} from 'react';
22
import {
33
Panel,
44
FlexRow,
@@ -8,7 +8,7 @@ import {
88
LinkButton,
99
TextInput, Switch, FlexSpacer
1010
} from '@epam/promo';
11-
import {DataColumnProps, useArrayDataSource} from "@epam/uui-core";
11+
import {DataColumnProps, useArrayDataSource} from '@epam/uui-core';
1212
import css from './Features.module.scss';
1313

1414
type Feature = {
@@ -25,7 +25,7 @@ const featureColumns: DataColumnProps<Feature>[] = [
2525
{
2626
key: 'name',
2727
caption: 'Name',
28-
render: item => <LinkButton caption={item.name} link={ { pathname: `/${item.id}` } } size='42' />,
28+
render: item => <LinkButton caption={item.name} link={ { pathname: `/feature/${item.id}` } } size='42' />,
2929
isSortable: true,
3030
width: 400
3131
},

src/components/Scenario.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import React, { useMemo, useState} from 'react';
2-
import {Panel, FlexRow, DataTable, Text, Badge, LinkButton, IconContainer, FlexCell, Accordion} from '@epam/promo';
3-
import {Step} from "./Step";
1+
import React from 'react';
2+
import { FlexRow, Text, Badge, FlexCell, Accordion} from '@epam/promo';
3+
import { Step } from './Step';
44

55
const filterByStatus = (scenario: any, status: string) => scenario.steps.filter((step: any) => step.result.status === status);
66
const scenarioTitle = (scenario: any) => () => {

src/components/StatisticsPieChart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import {PieChart, Pie, Sector, Cell, ResponsiveContainer, Tooltip} from 'recharts';
2+
import { PieChart, Pie, Cell, Tooltip } from 'recharts';
33

44
const COLORS = ['#88CC00', '#E54322', '#0088FE', '#FFBB28'];
55

src/components/Step.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import React, { useMemo, useState} from 'react';
2-
import { Panel, FlexRow, DataTable, Text, Badge, LinkButton, IconContainer, IconButton } from '@epam/promo';
1+
import React from 'react';
2+
import { Text, IconContainer, IconButton } from '@epam/promo';
33
import { ErrorModal } from './ErrorModal';
44
import { ReactComponent as PassedIcon } from '@epam/assets/icons/common/notification-done-24.svg';
55
import { ReactComponent as FailedIcon } from '@epam/assets/icons/common/navigation-close-24.svg';
@@ -9,8 +9,8 @@ import { ReactComponent as ErrorIcon } from '@epam/assets/icons/common/notificat
99
import { ReactComponent as AttachmentIcon } from '@epam/assets/icons/common/file-attachment-24.svg';
1010

1111
import css from './Step.module.scss';
12-
import {useUuiContext} from "@epam/uui-core";
13-
import {AttachmentModal} from "./AttachmentModal";
12+
import { useUuiContext } from '@epam/uui-core';
13+
import { AttachmentModal } from './AttachmentModal';
1414

1515
const icon = (status: string) => {
1616
switch (status) {

src/icons/logo.svg

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)