1- import { FunctionComponent , ReactNode } from 'react' ;
1+ import { FunctionComponent } from 'react' ;
22import { DataViewTable , DataViewTr , DataViewTh , ExpandableContent } from '@patternfly/react-data-view/dist/dynamic/DataViewTable' ;
33import { ExclamationCircleIcon } from '@patternfly/react-icons' ;
44import { Button } from '@patternfly/react-core' ;
5- import { ActionsColumn , ExpandableRowContent } from '@patternfly/react-table' ;
5+ import { ActionsColumn } from '@patternfly/react-table' ;
66
77interface Repository {
88 id : number ;
@@ -15,47 +15,47 @@ interface Repository {
1515
1616const expandableContents : ExpandableContent [ ] = [
1717 // Row 1 - Repository one
18- { row_id : 1 , column_id : 3 , content : < div > < strong > PR Details:</ strong > 3 open PRs, 45 merged this month, avg review time: 2 days</ div > } ,
19- { row_id : 1 , column_id : 5 , content : < div > < strong > Commit Info:</ strong > Author: John Doe, Message: "Fix critical authentication bug", SHA: a1b2c3d</ div > } ,
18+ { rowId : 1 , columnId : 3 , content : < div > < strong > PR Details:</ strong > 3 open PRs, 45 merged this month, avg review time: 2 days</ div > } ,
19+ { rowId : 1 , columnId : 5 , content : < div > < strong > Commit Info:</ strong > Author: John Doe, Message: "Fix critical authentication bug", SHA: a1b2c3d</ div > } ,
2020
2121 // Row 2 - Repository two
22- { row_id : 2 , column_id : 2 , content : < div > < strong > Branch Details:</ strong > 8 active branches, main, staging, feature/api-v2, feature/dashboard</ div > } ,
23- { row_id : 2 , column_id : 3 , content : < div > < strong > PR Details:</ strong > 5 open PRs, 120 merged this month, avg review time: 1.5 days</ div > } ,
24- { row_id : 2 , column_id : 4 , content : < div > < strong > Workspace Info:</ strong > Development env, 3 active deployments, last updated 30 mins ago</ div > } ,
25- { row_id : 2 , column_id : 5 , content : < div > < strong > Commit Info:</ strong > Author: Jane Smith, Message: "Add new API endpoints", SHA: x9y8z7w</ div > } ,
22+ { rowId : 2 , columnId : 2 , content : < div > < strong > Branch Details:</ strong > 8 active branches, main, staging, feature/api-v2, feature/dashboard</ div > } ,
23+ { rowId : 2 , columnId : 3 , content : < div > < strong > PR Details:</ strong > 5 open PRs, 120 merged this month, avg review time: 1.5 days</ div > } ,
24+ { rowId : 2 , columnId : 4 , content : < div > < strong > Workspace Info:</ strong > Development env, 3 active deployments, last updated 30 mins ago</ div > } ,
25+ { rowId : 2 , columnId : 5 , content : < div > < strong > Commit Info:</ strong > Author: Jane Smith, Message: "Add new API endpoints", SHA: x9y8z7w</ div > } ,
2626
2727 // Row 3 - Repository three
28- { row_id : 3 , column_id : 2 , content : < div > < strong > Branch Details:</ strong > 12 active branches including main, develop, multiple feature branches</ div > } ,
29- { row_id : 3 , column_id : 3 , content : < div > < strong > PR Details:</ strong > 8 open PRs, 200 merged this month, avg review time: 3 days</ div > } ,
30- { row_id : 3 , column_id : 4 , content : < div > < strong > Workspace Info:</ strong > Staging env, 10 active deployments, last updated 1 day ago</ div > } ,
31- { row_id : 3 , column_id : 5 , content : < div > < strong > Commit Info:</ strong > Author: Bob Johnson, Message: "Refactor core modules", SHA: p0o9i8u</ div > } ,
28+ { rowId : 3 , columnId : 2 , content : < div > < strong > Branch Details:</ strong > 12 active branches including main, develop, multiple feature branches</ div > } ,
29+ { rowId : 3 , columnId : 3 , content : < div > < strong > PR Details:</ strong > 8 open PRs, 200 merged this month, avg review time: 3 days</ div > } ,
30+ { rowId : 3 , columnId : 4 , content : < div > < strong > Workspace Info:</ strong > Staging env, 10 active deployments, last updated 1 day ago</ div > } ,
31+ { rowId : 3 , columnId : 5 , content : < div > < strong > Commit Info:</ strong > Author: Bob Johnson, Message: "Refactor core modules", SHA: p0o9i8u</ div > } ,
3232
3333 // Row 4 - Repository four
34- { row_id : 4 , column_id : 2 , content : < div > < strong > Branch Details:</ strong > 6 active branches, focusing on microservices architecture</ div > } ,
35- { row_id : 4 , column_id : 3 , content : < div > < strong > PR Details:</ strong > 2 open PRs, 90 merged this month, avg review time: 2.5 days</ div > } ,
36- { row_id : 4 , column_id : 4 , content : < div > < strong > Workspace Info:</ strong > QA env, 7 active deployments, automated testing enabled</ div > } ,
37- { row_id : 4 , column_id : 5 , content : < div > < strong > Commit Info:</ strong > Author: Alice Williams, Message: "Update dependencies", SHA: m5n4b3v</ div > } ,
34+ { rowId : 4 , columnId : 2 , content : < div > < strong > Branch Details:</ strong > 6 active branches, focusing on microservices architecture</ div > } ,
35+ { rowId : 4 , columnId : 3 , content : < div > < strong > PR Details:</ strong > 2 open PRs, 90 merged this month, avg review time: 2.5 days</ div > } ,
36+ { rowId : 4 , columnId : 4 , content : < div > < strong > Workspace Info:</ strong > QA env, 7 active deployments, automated testing enabled</ div > } ,
37+ { rowId : 4 , columnId : 5 , content : < div > < strong > Commit Info:</ strong > Author: Alice Williams, Message: "Update dependencies", SHA: m5n4b3v</ div > } ,
3838
3939 // Row 5 - Repository five
40- { row_id : 5 , column_id : 2 , content : < div > < strong > Branch Details:</ strong > 4 active branches, clean branch strategy</ div > } ,
41- { row_id : 5 , column_id : 3 , content : < div > < strong > PR Details:</ strong > 6 open PRs, 75 merged this month, avg review time: 1 day</ div > } ,
42- { row_id : 5 , column_id : 4 , content : < div > < strong > Workspace Info:</ strong > Pre-production env, CI/CD pipeline configured</ div > } ,
43- { row_id : 5 , column_id : 5 , content : < div > < strong > Commit Info:</ strong > Author: Charlie Brown, Message: "Implement dark mode", SHA: q2w3e4r</ div > } ,
40+ { rowId : 5 , columnId : 2 , content : < div > < strong > Branch Details:</ strong > 4 active branches, clean branch strategy</ div > } ,
41+ { rowId : 5 , columnId : 3 , content : < div > < strong > PR Details:</ strong > 6 open PRs, 75 merged this month, avg review time: 1 day</ div > } ,
42+ { rowId : 5 , columnId : 4 , content : < div > < strong > Workspace Info:</ strong > Pre-production env, CI/CD pipeline configured</ div > } ,
43+ { rowId : 5 , columnId : 5 , content : < div > < strong > Commit Info:</ strong > Author: Charlie Brown, Message: "Implement dark mode", SHA: q2w3e4r</ div > } ,
4444
4545 // Row 6 - Repository six
46- { row_id : 6 , column_id : 2 , content : < div > < strong > Branch Details:</ strong > 15 active branches, complex branching model</ div > } ,
47- { row_id : 6 , column_id : 3 , content : < div > < strong > PR Details:</ strong > 10 open PRs, 250 merged this month, avg review time: 4 days</ div > } ,
48- { row_id : 6 , column_id : 4 , content : < div > < strong > Workspace Info:</ strong > Multi-region deployment, high availability setup</ div > } ,
49- { row_id : 6 , column_id : 5 , content : < div > < strong > Commit Info:</ strong > Author: David Lee, Message: "Security patches applied", SHA: t6y7u8i</ div > } ,
46+ { rowId : 6 , columnId : 2 , content : < div > < strong > Branch Details:</ strong > 15 active branches, complex branching model</ div > } ,
47+ { rowId : 6 , columnId : 3 , content : < div > < strong > PR Details:</ strong > 10 open PRs, 250 merged this month, avg review time: 4 days</ div > } ,
48+ { rowId : 6 , columnId : 4 , content : < div > < strong > Workspace Info:</ strong > Multi-region deployment, high availability setup</ div > } ,
49+ { rowId : 6 , columnId : 5 , content : < div > < strong > Commit Info:</ strong > Author: David Lee, Message: "Security patches applied", SHA: t6y7u8i</ div > } ,
5050] ;
5151
5252const repositories : Repository [ ] = [
53- { id : 1 , name : 'Repository one' , branches : 'Branch one' , prs : 'Pull request one' , workspaces : 'Workspace one' , lastCommit : 'Timestamp one' } ,
54- { id : 2 , name : 'Repository two' , branches : 'Branch two' , prs : 'Pull request two' , workspaces : 'Workspace two' , lastCommit : 'Timestamp two' } ,
55- { id : 3 , name : 'Repository three' , branches : 'Branch three' , prs : 'Pull request three' , workspaces : 'Workspace three' , lastCommit : 'Timestamp three' } ,
56- { id : 4 , name : 'Repository four' , branches : 'Branch four' , prs : 'Pull request four' , workspaces : 'Workspace four' , lastCommit : 'Timestamp four' } ,
57- { id : 5 , name : 'Repository five' , branches : 'Branch five' , prs : 'Pull request five' , workspaces : 'Workspace five' , lastCommit : 'Timestamp five' } ,
58- { id : 6 , name : 'Repository six' , branches : 'Branch six' , prs : 'Pull request six' , workspaces : 'Workspace six' , lastCommit : 'Timestamp six' }
53+ { id : 1 , name : 'Repository one' , branches : 'Branch one' , prs : 'Pull request one' , workspaces : 'Workspace one' , lastCommit : 'Timestamp one' } ,
54+ { id : 2 , name : 'Repository two' , branches : 'Branch two' , prs : 'Pull request two' , workspaces : 'Workspace two' , lastCommit : 'Timestamp two' } ,
55+ { id : 3 , name : 'Repository three' , branches : 'Branch three' , prs : 'Pull request three' , workspaces : 'Workspace three' , lastCommit : 'Timestamp three' } ,
56+ { id : 4 , name : 'Repository four' , branches : 'Branch four' , prs : 'Pull request four' , workspaces : 'Workspace four' , lastCommit : 'Timestamp four' } ,
57+ { id : 5 , name : 'Repository five' , branches : 'Branch five' , prs : 'Pull request five' , workspaces : 'Workspace five' , lastCommit : 'Timestamp five' } ,
58+ { id : 6 , name : 'Repository six' , branches : 'Branch six' , prs : 'Pull request six' , workspaces : 'Workspace six' , lastCommit : 'Timestamp six' }
5959] ;
6060
6161const rowActions = [
@@ -97,7 +97,7 @@ const columns: DataViewTh[] = [
9797 'Repositories' ,
9898 { cell : < > Branches< ExclamationCircleIcon className = 'pf-v6-u-ml-sm' color = "var(--pf-t--global--color--status--danger--default)" /> </ > } ,
9999 'Pull requests' ,
100- { cell : 'Workspaces' , props : { info : { tooltip : 'More information' } , isStickyColumn : true } } ,
100+ { cell : 'Workspaces' , props : { info : { tooltip : 'More information' } , isStickyColumn : true } } ,
101101 { cell : 'Last commit' , props : { sort : { sortBy : { } , columnIndex : 4 } } } ,
102102] ;
103103
0 commit comments