@@ -31,13 +31,15 @@ export const systemsListColumns = () => [
3131 }
3232 } ,
3333 {
34- key : 'baseline_name ' ,
34+ key : 'template_name ' ,
3535 title : 'Template' ,
3636 renderFunc : ( value , _ , row ) =>
3737 row . satellite_managed
3838 ? < ManagedBySatelliteCell />
3939 : 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 >
4143 : 'No template' ,
4244 props : {
4345 width : 5
@@ -71,13 +73,15 @@ export const advisorySystemsColumns = () => [
7173 }
7274 } ,
7375 {
74- key : 'baseline_name ' ,
76+ key : 'template_name ' ,
7577 title : 'Template' ,
7678 renderFunc : ( value , _ , row ) =>
7779 row . satellite_managed
7880 ? < ManagedBySatelliteCell />
7981 : 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 >
8185 : 'No template' ,
8286 props : {
8387 width : 5
@@ -104,13 +108,15 @@ export const packageSystemsColumns = [
104108 }
105109 } ,
106110 {
107- key : 'baseline_name ' ,
111+ key : 'template_name ' ,
108112 title : 'Template' ,
109113 renderFunc : ( value , _ , row ) =>
110114 row . satellite_managed
111115 ? < ManagedBySatelliteCell />
112116 : 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 >
114120 : 'No template' ,
115121 props : {
116122 width : 5
@@ -147,10 +153,10 @@ const isRemediationDisabled = (row) => {
147153 return ( applicableAdvisories && applicableAdvisories . every ( typeSum => typeSum === 0 ) ) || ( status === 'Applicable' ) ;
148154} ;
149155
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+ // };
154160
155161export const useActivateRemediationModal = ( setRemediationIssues , setRemediationOpen ) => {
156162 const { fetchBatched } = useFetchBatched ( ) ;
@@ -190,10 +196,10 @@ export const useActivateRemediationModal = (setRemediationIssues, setRemediation
190196
191197export const systemsRowActions = (
192198 activateRemediationModal ,
193- showTemplateAssignSystemsModal ,
194- openUnassignSystemsModal ,
195- row ,
196- hasTemplateAccess
199+ // showTemplateAssignSystemsModal,
200+ // openUnassignSystemsModal,
201+ row
202+ // hasTemplateAccess
197203) => {
198204 return [
199205 {
@@ -202,22 +208,22 @@ export const systemsRowActions = (
202208 onClick : ( event , rowId , rowData ) => {
203209 activateRemediationModal ( rowData ) ;
204210 }
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- }
219211 }
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+ // ] : [])
221227 ] ;
222228} ;
223229
0 commit comments