File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
desktop/core/src/desktop/js/ko/components/contextPopover Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,24 @@ class DataCatalogContext {
27
27
self . popover = options . popover ;
28
28
self . catalogEntry = ko . observable ( options . catalogEntry ) ;
29
29
30
+ self . parentIsView = ko . observable ( false ) ;
31
+ const checkIfParentIsView = catalogEntry => {
32
+ if ( ! catalogEntry ) {
33
+ self . parentIsView ( false ) ;
34
+ return ;
35
+ }
36
+ catalogEntry
37
+ . getParent ( )
38
+ . then ( parentEntry => {
39
+ self . parentIsView ( parentEntry . isView ( ) ) ;
40
+ } )
41
+ . catch ( ( ) => {
42
+ self . parentIsView ( false ) ;
43
+ } ) ;
44
+ } ;
45
+ checkIfParentIsView ( self . catalogEntry ( ) ) ;
46
+ self . catalogEntry . subscribe ( checkIfParentIsView ) ;
47
+
30
48
self . loading = ko . observable ( false ) ;
31
49
self . hasErrors = ko . observable ( false ) ;
32
50
self . activePromises = [ ] ;
Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ const SUPPORT_TEMPLATES = `
275
275
276
276
<script type="text/html" id="context-catalog-entry-title">
277
277
<div class="hue-popover-title">
278
- <i class="hue-popover-title-icon fa muted" data-bind="css: catalogEntry() && catalogEntry().isView() ? 'fa-eye' : (catalogEntry().isModel() ? 'fa-puzzle-piece' : 'fa-table')"></i>
278
+ <i class="hue-popover-title-icon fa muted" data-bind="css: catalogEntry() && ( catalogEntry().isView() || parentIsView()) ? 'fa-eye' : (catalogEntry().isDatabase() ? 'fa-database' : (catalogEntry(). isModel() ? 'fa-puzzle-piece' : 'fa-table') )"></i>
279
279
<span class="hue-popover-title-text" data-bind="foreach: breadCrumbs">
280
280
<!-- ko ifnot: isActive --><div><a href="javascript: void(0);" data-bind="click: makeActive, text: name"></a>.</div><!-- /ko -->
281
281
<!-- ko if: isActive -->
You can’t perform that action at this time.
0 commit comments