Skip to content

Commit 5f26028

Browse files
authored
Merge pull request #33 from zenml-io/talha/feedback-fixes
Talha/feedback fixes
2 parents 84b3823 + d0512a2 commit 5f26028

File tree

55 files changed

+883
-114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+883
-114
lines changed

global.d.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,15 @@ interface TStack {
113113
isShared?: Boolean;
114114
}
115115
type TRunStatus =
116-
| 'Finished'
116+
| 'finished'
117117
| 'In Progress'
118118
| 'completed'
119-
| 'Running'
120-
| 'Failed';
119+
| 'running'
120+
| 'failed'
121+
| 'cached';
121122

122123
interface TRun {
124+
pipelineConfiguration?: any;
123125
id: TId;
124126
status: TRunStatus;
125127
kubeflowStartTime: Date;
@@ -137,7 +139,7 @@ interface TRun {
137139
userName?: any;
138140
user?: any;
139141
creationDate?: any;
140-
status?: string;
142+
// status?: string;
141143
created: Date;
142144
name?: string;
143145
}

public/_redirects

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/* /index.html 200

public/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424

2525
<meta name="viewport" content="width=device-width, initial-scale=1" />
2626
<meta name="theme-color" content="#000000" />
27-
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
27+
<!-- <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> -->
2828
<!--
2929
manifest.json provides metadata used when your web app is installed on a
3030
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
3131
-->
32-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
32+
<!-- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> -->
3333
<!--
3434
Notice the use of %PUBLIC_URL% in the tags above.
3535
It will be replaced with the URL of the `public` folder during the build.

src/constants/runs.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export const runStatus: { [key: string]: TRunStatus } = {
2-
completed: 'completed',
3-
Running: 'Running',
4-
Failed: 'Failed',
2+
FAILED: 'failed',
3+
COMPLETED: 'completed',
4+
RUNNING: 'running',
5+
CACHED: 'cached',
56
};

src/ui/components/Filters/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,12 @@ export const getInitialFilterStateForRuns = () => {
210210
type: 'string',
211211
},
212212
{
213-
value: 'name',
213+
value: 'pipelineName',
214214
label: 'Pipeline Name',
215215
type: 'string',
216216
},
217217
{
218-
value: 'name',
218+
value: 'stackName',
219219
label: 'Stack Name',
220220
type: 'string',
221221
},

src/ui/layouts/common/layouts/AuthenticatedLayout/AuthenticatedHeader.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ export const AuthenticatedHeader: React.FC<{
3333

3434
if (!user || !organization) return null;
3535

36-
const userFullName = user.fullName || DEFAULT_FULL_NAME;
36+
const userFullName = user.fullName || user.name || DEFAULT_FULL_NAME;
3737
const userInitials = getInitials(userFullName);
3838

3939
const logout = () => {
4040
dispatch(sessionActions.logout());
4141
};
42-
42+
// debugger;
4343
return (
4444
<FlexBox
4545
paddingHorizontal="lg"

src/ui/layouts/pipelines/PipelineDetail/Configuration/index.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ export const Configuration: React.FC<{ pipelineId: TId }> = ({
1818
}) => {
1919
const { downloadYamlFile, pipelineConfig } = useService({ pipelineId });
2020

21-
const dispatch = useDispatch()
21+
const dispatch = useDispatch();
2222
const handleCopy = () => {
23-
navigator.clipboard.writeText(pipelineConfig)
23+
navigator.clipboard.writeText(pipelineConfig);
2424
dispatch(
2525
showToasterAction({
2626
description: 'Config copied to clipboard',
2727
type: toasterTypes.success,
2828
}),
2929
);
30-
}
30+
};
3131

3232
return (
3333
<FlexBox.Column fullWidth>
@@ -38,11 +38,14 @@ export const Configuration: React.FC<{ pipelineId: TId }> = ({
3838
>
3939
<H4 bold>{translate('configuration.title.text')}</H4>
4040
<Box>
41-
<GhostButton style={{ marginRight: '10px' }} onClick={downloadYamlFile}>
41+
<GhostButton
42+
style={{ marginRight: '10px' }}
43+
onClick={downloadYamlFile}
44+
>
4245
{translate('configuration.button.text')}
4346
</GhostButton>
4447
<GhostButton onClick={handleCopy}>
45-
<icons.copy color={iconColors.black} size={iconSizes.sm} />
48+
<icons.copy color={iconColors.black} size={iconSizes.sm} />
4649
</GhostButton>
4750
</Box>
4851
</FlexBox>
@@ -54,7 +57,7 @@ export const Configuration: React.FC<{ pipelineId: TId }> = ({
5457
style={okaidia}
5558
>
5659
{pipelineConfig}
57-
</SyntaxHighlighter>
60+
</SyntaxHighlighter>
5861
</FlexBox>
5962
</FlexBox.Column>
6063
);

src/ui/layouts/pipelines/PipelineDetail/Configuration/useService.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import { useSelector } from 'react-redux';
2-
import { pipelineSelectors } from '../../../../../redux/selectors';
2+
import {
3+
pipelineSelectors,
4+
// runSelectors,
5+
} from '../../../../../redux/selectors';
36

47
import YAML from 'json2yaml';
58

src/ui/layouts/pipelines/PipelineDetail/Runs/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@ import { translate } from '../translate';
33
import { RunsTable } from '../../RunsTable';
44
import { useService } from './useService';
55

6-
export const Runs: React.FC<{ pipelineId: TId }> = ({ pipelineId }) => {
6+
export const Runs: React.FC<{ pipelineId: TId; filter: any }> = ({
7+
pipelineId,
8+
filter,
9+
}) => {
710
const { fetching, runIds } = useService({ pipelineId });
811

912
return (
1013
<RunsTable
1114
fetching={fetching}
1215
emptyStateText={translate('emptyState.text')}
1316
runIds={runIds}
17+
filter={filter}
1418
/>
1519
);
1620
};

src/ui/layouts/pipelines/PipelineDetail/index.tsx

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React, { useState } from 'react';
22

33
import { Box, Paragraph, icons } from '../../../components';
44
import { iconColors, iconSizes } from '../../../../constants';
@@ -9,7 +9,43 @@ import { Configuration } from './Configuration';
99
import { Runs } from './Runs';
1010
import { BasePage } from '../BasePage';
1111
import { useService } from './useService';
12+
import FilterComponent, {
13+
getInitialFilterStateForRuns,
14+
} from '../../../components/Filters';
15+
import { useLocationPath } from '../../../hooks';
1216

17+
interface Props {
18+
pipelineId: TId;
19+
}
20+
const FilterWrapperForRun = () => {
21+
const locationPath = useLocationPath();
22+
// debugger;
23+
24+
// TODO: Dev please note: getInitialFilterState is for stack inital filter value for any other component you need to modify it
25+
const [filters, setFilter] = useState([getInitialFilterStateForRuns()]);
26+
function getFilter(values: any) {
27+
const filterValuesMap = values.map((v: any) => {
28+
return {
29+
column: v.column.selectedValue,
30+
type: v.contains.selectedValue,
31+
value: v.filterValue,
32+
};
33+
});
34+
return filterValuesMap;
35+
}
36+
return (
37+
<FilterComponent
38+
getInitials={getInitialFilterStateForRuns}
39+
filters={filters}
40+
setFilter={setFilter}
41+
>
42+
<Runs
43+
filter={getFilter(filters)}
44+
pipelineId={locationPath.split('/')[2]}
45+
/>
46+
</FilterComponent>
47+
);
48+
};
1349
const getTabPages = (pipelineId: TId): TabPage[] => {
1450
return [
1551
{
@@ -19,7 +55,8 @@ const getTabPages = (pipelineId: TId): TabPage[] => {
1955
},
2056
{
2157
text: translate('tabs.runs.text'),
22-
Component: () => <Runs pipelineId={pipelineId} />,
58+
Component: FilterWrapperForRun,
59+
2360
path: routePaths.pipeline.runs(pipelineId),
2461
},
2562
];
@@ -121,7 +158,6 @@ export const PipelineDetail: React.FC = () => {
121158
</Paragraph>
122159
</Box>
123160
</Box>
124-
125161
</BasePage>
126162
);
127163
};

0 commit comments

Comments
 (0)