Skip to content

Commit

Permalink
[frontend] hide import in table browser for spark (#2900)
Browse files Browse the repository at this point in the history
Add check based on source.type. Spark uses source type='sparksql'

Co-authored-by: Björn Alm <balm@cloudera.com>
  • Loading branch information
bjornalm and bjornalm committed Jun 22, 2022
1 parent 81758f4 commit 45a900b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/metastore/src/metastore/templates/metastore.mako
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ ${ components.menubar(is_embeddable) }
<a class="btn btn-default" data-bind="attr: { 'href': '/metastore/table/'+ catalogEntry.path.join('/') + '/read' }" title="${_('Browse Data')}"><i class="fa fa-play fa-fw"></i> ${_('Browse Data')}</a>
% endif
% if has_write_access:
<a href="javascript: void(0);" class="btn btn-default" data-bind="click: showImportData, visible: tableDetails() && !catalogEntry.isView()" title="${_('Import Data')}"><i class="fa fa-upload fa-fw"></i> ${_('Import')}</a>
<a href="javascript: void(0);" class="btn btn-default" data-bind="click: showImportData, visible: $root.source().type !== 'sparksql' && tableDetails() && !catalogEntry.isView()" title="${_('Import Data')}"><i class="fa fa-upload fa-fw"></i> ${_('Import')}</a>
% endif
% if has_write_access:
<a href="#dropSingleTable" data-toggle="modal" class="btn btn-default" data-bind="attr: { 'title' : tableDetails() && catalogEntry.isView() ? '${_('Drop View')}' : '${_('Drop Table')}' }"><i class="fa fa-times fa-fw"></i> ${_('Drop')}</a>
Expand Down

0 comments on commit 45a900b

Please sign in to comment.