@@ -29,6 +29,7 @@ interface ColumnConfigProps {
2929 handleCopyUrl : ( type : string , name : string , id : string ) => void ;
3030 handleClone : ( name : string , id : string ) => void ;
3131 handleShowDetails : ( designId : string , designName : string ) => void ;
32+ handleOpenInDesigner ?: ( designId : string , designName : string ) => void ;
3233 handleDownload ?: ( design : Pattern ) => void ;
3334 getDownloadUrl ?: ( id : string ) => string ;
3435 isDownloadAllowed : boolean ;
@@ -40,6 +41,7 @@ interface ColumnConfigProps {
4041 isFromWorkspaceTable ?: boolean ;
4142 isRemoveAllowed ?: boolean ;
4243 theme ?: Theme ;
44+ showPlaygroundActions : boolean ;
4345}
4446
4547export const colViews : ColView [ ] = [
@@ -69,6 +71,8 @@ export const createDesignsColumnsConfig = ({
6971 isDownloadAllowed,
7072 isRemoveAllowed,
7173 theme,
74+ handleOpenInDesigner,
75+ showPlaygroundActions = true ,
7276 isFromWorkspaceTable = false
7377} : ColumnConfigProps ) : MUIDataTableColumn [ ] => {
7478 return [
@@ -209,6 +213,7 @@ export const createDesignsColumnsConfig = ({
209213 } ,
210214 {
211215 title : 'Open in Playground' ,
216+ hidden : showPlaygroundActions == false ,
212217 onClick : ( ) => {
213218 window . open (
214219 `https://playground.meshery.io/extension/meshmap?mode=${
@@ -221,6 +226,18 @@ export const createDesignsColumnsConfig = ({
221226 < KanvasIcon width = { 24 } height = { 24 } primaryFill = { theme ?. palette . icon . secondary } />
222227 )
223228 } ,
229+
230+ {
231+ hidden : ! handleOpenInDesigner ,
232+ title : 'Open in Designer' ,
233+ // disabled : !handleOpenInDesigner,
234+ onClick : ( ) =>
235+ handleOpenInDesigner && handleOpenInDesigner ( rowData ?. id , rowData ?. name ) ,
236+ icon : (
237+ < KanvasIcon width = { 24 } height = { 24 } primaryFill = { theme ?. palette . icon . secondary } />
238+ )
239+ } ,
240+
224241 {
225242 title : isFromWorkspaceTable ? 'Remove Design' : 'Delete' ,
226243 disabled : isFromWorkspaceTable ? ! isRemoveAllowed : ! isDeleteAllowed ,
@@ -231,7 +248,7 @@ export const createDesignsColumnsConfig = ({
231248 < L5DeleteIcon />
232249 )
233250 }
234- ] ;
251+ ] . filter ( ( a ) => a . hidden != true ) ;
235252
236253 const publishAction = {
237254 title : 'Publish' ,
0 commit comments