@@ -64,18 +64,17 @@ const StepTreeItem = withStyles((theme: Theme) =>
64
64
const getTreeItemsFromStepList = ( stepsItems : StepInfo [ ] ) => {
65
65
return stepsItems . map ( ( stepItemData ) => {
66
66
return (
67
- < div >
68
- < StepTreeItem
69
- key = { stepItemData . id }
70
- nodeId = { String ( stepItemData . id ) }
71
- label = {
72
- < StepStatus
73
- status = { decodeResultValue ( stepItemData . state ) }
74
- text = { stepItemData . name . replace ( / [ ^ - ~ ] + / g, "" ) }
75
- />
76
- }
77
- />
78
- </ div >
67
+ < StepTreeItem
68
+ key = { stepItemData . id }
69
+ nodeId = { String ( stepItemData . id ) }
70
+ label = {
71
+ < StepStatus
72
+ status = { decodeResultValue ( stepItemData . state ) }
73
+ text = { stepItemData . name . replace ( / [ ^ - ~ ] + / g, "" ) }
74
+ key = { `status-${ stepItemData . id } ` }
75
+ />
76
+ }
77
+ />
79
78
) ;
80
79
} ) ;
81
80
} ;
@@ -106,24 +105,23 @@ const getTreeItemsFromStage = (stageItems: StageInfo[], steps: StepInfo[]) => {
106
105
children = [ ...children , ...stepsItems ] ;
107
106
}
108
107
return (
109
- < div >
110
- < StageTreeItem
111
- key = { stageItemData . id }
112
- nodeId = { String ( stageItemData . id ) }
113
- label = {
114
- < StepStatus
115
- status = { decodeResultValue ( stageItemData . state ) }
116
- text = { stageItemData . name }
117
- />
118
- }
119
- children = { children }
120
- classes = { {
121
- label : stageItemData . synthetic
122
- ? "pgv-graph-node--synthetic"
123
- : undefined ,
124
- } }
125
- />
126
- </ div >
108
+ < StageTreeItem
109
+ key = { stageItemData . id }
110
+ nodeId = { String ( stageItemData . id ) }
111
+ label = {
112
+ < StepStatus
113
+ status = { decodeResultValue ( stageItemData . state ) }
114
+ text = { stageItemData . name }
115
+ key = { `status-${ stageItemData . id } ` }
116
+ />
117
+ }
118
+ children = { children }
119
+ classes = { {
120
+ label : stageItemData . synthetic
121
+ ? "pgv-graph-node--synthetic"
122
+ : undefined ,
123
+ } }
124
+ />
127
125
) ;
128
126
} ) ;
129
127
} ;
@@ -165,6 +163,7 @@ export class DataTreeView extends React.Component {
165
163
expanded = { this . props . expanded }
166
164
selected = { this . props . selected }
167
165
onNodeToggle = { this . props . onNodeToggle }
166
+ key = "console-tree-view"
168
167
>
169
168
{ getTreeItemsFromStage ( this . props . stages , this . props . steps ) }
170
169
</ TreeView >
0 commit comments