@@ -31,13 +31,15 @@ export const systemsListColumns = () => [
31
31
}
32
32
} ,
33
33
{
34
- key : 'baseline_name ' ,
34
+ key : 'template_name ' ,
35
35
title : 'Template' ,
36
36
renderFunc : ( value , _ , row ) =>
37
37
row . satellite_managed
38
38
? < ManagedBySatelliteCell />
39
39
: value
40
- ? < InsightsLink to = { { pathname : `/templates/${ row . baseline_id } ` } } > { value } </ InsightsLink >
40
+ ? < InsightsLink app = "content" to = { { pathname : `/templates/${ row . template_uuid } /details` } } >
41
+ { value }
42
+ </ InsightsLink >
41
43
: 'No template' ,
42
44
props : {
43
45
width : 5
@@ -71,13 +73,15 @@ export const advisorySystemsColumns = () => [
71
73
}
72
74
} ,
73
75
{
74
- key : 'baseline_name ' ,
76
+ key : 'template_name ' ,
75
77
title : 'Template' ,
76
78
renderFunc : ( value , _ , row ) =>
77
79
row . satellite_managed
78
80
? < ManagedBySatelliteCell />
79
81
: value
80
- ? < InsightsLink to = { { pathname : `/templates/${ row . baseline_id } ` } } > { value } </ InsightsLink >
82
+ ? < InsightsLink app = "content" to = { { pathname : `/templates/${ row . template_uuid } /details` } } >
83
+ { value }
84
+ </ InsightsLink >
81
85
: 'No template' ,
82
86
props : {
83
87
width : 5
@@ -104,13 +108,15 @@ export const packageSystemsColumns = [
104
108
}
105
109
} ,
106
110
{
107
- key : 'baseline_name ' ,
111
+ key : 'template_name ' ,
108
112
title : 'Template' ,
109
113
renderFunc : ( value , _ , row ) =>
110
114
row . satellite_managed
111
115
? < ManagedBySatelliteCell />
112
116
: value
113
- ? < InsightsLink to = { { pathname : `/templates/${ row . baseline_id } ` } } > { value } </ InsightsLink >
117
+ ? < InsightsLink app = "content" to = { { pathname : `/templates/${ row . template_uuid } /details` } } >
118
+ { value }
119
+ </ InsightsLink >
114
120
: 'No template' ,
115
121
props : {
116
122
width : 5
@@ -147,10 +153,10 @@ const isRemediationDisabled = (row) => {
147
153
return ( applicableAdvisories && applicableAdvisories . every ( typeSum => typeSum === 0 ) ) || ( status === 'Applicable' ) ;
148
154
} ;
149
155
150
- const isPatchSetRemovalDisabled = ( row ) => {
151
- const { baseline_name : baselineName } = row || { } ;
152
- return ! baselineName || ( typeof baselineName === 'string' && baselineName === '' ) ;
153
- } ;
156
+ // const isPatchSetRemovalDisabled = (row) => {
157
+ // const { template_name: templateName } = row || {};
158
+ // return !templateName || (typeof templateName === 'string' && templateName === '');
159
+ // };
154
160
155
161
export const useActivateRemediationModal = ( setRemediationIssues , setRemediationOpen ) => {
156
162
const { fetchBatched } = useFetchBatched ( ) ;
@@ -190,10 +196,10 @@ export const useActivateRemediationModal = (setRemediationIssues, setRemediation
190
196
191
197
export const systemsRowActions = (
192
198
activateRemediationModal ,
193
- showTemplateAssignSystemsModal ,
194
- openUnassignSystemsModal ,
195
- row ,
196
- hasTemplateAccess
199
+ // showTemplateAssignSystemsModal,
200
+ // openUnassignSystemsModal,
201
+ row
202
+ // hasTemplateAccess
197
203
) => {
198
204
return [
199
205
{
@@ -202,22 +208,22 @@ export const systemsRowActions = (
202
208
onClick : ( event , rowId , rowData ) => {
203
209
activateRemediationModal ( rowData ) ;
204
210
}
205
- } ,
206
- ...( showTemplateAssignSystemsModal ? [ {
207
- title : 'Assign to a template' ,
208
- isDisabled : ! hasTemplateAccess || row . satellite_managed ,
209
- onClick : ( event , rowId , rowData ) => {
210
- showTemplateAssignSystemsModal ( { [ rowData . id ] : true } ) ;
211
- }
212
- } ,
213
- {
214
- title : 'Remove from a template' ,
215
- isDisabled : ! hasTemplateAccess || isPatchSetRemovalDisabled ( row ) || row . satellite_managed ,
216
- onClick : ( event , rowId , rowData ) => {
217
- openUnassignSystemsModal ( [ rowData . id ] ) ;
218
- }
219
211
}
220
- ] : [ ] )
212
+ // ...(showTemplateAssignSystemsModal ? [{
213
+ // title: 'Assign to a template',
214
+ // isDisabled: !hasTemplateAccess || row.satellite_managed,
215
+ // onClick: (event, rowId, rowData) => {
216
+ // showTemplateAssignSystemsModal({ [rowData.id]: true });
217
+ // }
218
+ // },
219
+ // {
220
+ // title: 'Remove from a template',
221
+ // isDisabled: !hasTemplateAccess || isPatchSetRemovalDisabled(row) || row.satellite_managed,
222
+ // onClick: (event, rowId, rowData) => {
223
+ // openUnassignSystemsModal([rowData.id]);
224
+ // }
225
+ // }
226
+ // ] : [])
221
227
] ;
222
228
} ;
223
229
0 commit comments