File tree Expand file tree Collapse file tree 4 files changed +11
-5
lines changed
client/js/plugins/ResourceDetails Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -268,7 +268,8 @@ function ResourceDetailsPanel({
268268 pendingChanges,
269269 enablePreview,
270270 editingOverlay,
271- closeOnClickOut
271+ closeOnClickOut,
272+ showViewerButton
272273} , context ) {
273274
274275 const [ confirmModal , setConfirmModal ] = useState ( false ) ;
@@ -341,6 +342,7 @@ function ResourceDetailsPanel({
341342 tabs = { tabs }
342343 tabComponents = { tabComponents }
343344 resourcesGridId = { resourcesGridId }
345+ showViewerButton = { showViewerButton }
344346 />
345347 </ ResourcesPanelWrapper >
346348 < PendingStatePrompt
Original file line number Diff line number Diff line change @@ -63,7 +63,8 @@ function formatResourceLinkUrl(resource) {
6363
6464function DetailsToolbar ( {
6565 resource,
66- items = [ ]
66+ items = [ ] ,
67+ showViewerButton = false
6768} ) {
6869
6970 const {
@@ -126,7 +127,7 @@ function DetailsToolbar({
126127 < Icon glyph = "globe" />
127128 </ Button >
128129 </ CopyToClipboard > }
129- { info ?. viewerUrl
130+ { ! showViewerButton ? null : info ?. viewerUrl
130131 ? (
131132 < Button
132133 variant = "primary"
Original file line number Diff line number Diff line change @@ -75,7 +75,8 @@ function DetailsPanel({
7575 resourcesGridId,
7676 monitoredState,
7777 location,
78- panelRef
78+ panelRef,
79+ showViewerButton
7980} , context ) {
8081
8182 const resource = parseCatalogResource ( resourceProp ) ;
@@ -100,6 +101,7 @@ function DetailsPanel({
100101 tools = { < DetailsToolbar
101102 resource = { resource }
102103 items = { toolbarItems }
104+ showViewerButton = { showViewerButton }
103105 /> }
104106 onClose = { onClose }
105107 thumbnailComponent = { ConnectedDetailsThumbnail }
Original file line number Diff line number Diff line change 33123312 "headerNodeSelector" : " .gn-main-header" ,
33133313 "enableFilters" : true ,
33143314 "enablePreview" : true ,
3315- "editingOverlay" : true
3315+ "editingOverlay" : true ,
3316+ "showViewerButton" : true
33163317 }
33173318 },
33183319 {
You can’t perform that action at this time.
0 commit comments