|
@@ -115,57 +115,6 @@ ${ components.menubar(is_embeddable) }
|
|
|
</ul>
|
|
</ul>
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
-<script type="text/html" id="metastore-columns-table">
|
|
|
|
|
- <div style="overflow-x: auto; overflow-y: hidden">
|
|
|
|
|
- <table class="table table-condensed table-nowrap metastore-table">
|
|
|
|
|
- <thead>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th width="2%"> </th>
|
|
|
|
|
- <th width="2%" class="no-sort"> </th>
|
|
|
|
|
- <th width="20%">${_('Name')}</th>
|
|
|
|
|
- <th width="10%">${_('Type')}</th>
|
|
|
|
|
- <th width="66%" class="metastore-description-col">${_('Description')}</th>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </thead>
|
|
|
|
|
- <tbody data-bind="hueach: { data: $data, itemHeight: 32, scrollable: '${ MAIN_SCROLLABLE }', scrollableOffset: 200, disableHueEachRowCount: 5, scrollUp: true}">
|
|
|
|
|
- <tr>
|
|
|
|
|
- <td data-bind="text: $index() + $indexOffset() + 1"></td>
|
|
|
|
|
- <td><a class="blue" href="javascript:void(0)" data-bind="click: showContextPopover"><i class="fa fa-fw fa-info" title="${_('Show details')}"></i></a></td>
|
|
|
|
|
- <td title="${ _("Scroll to the column") }">
|
|
|
|
|
- <!-- ko if: $root.database() && $root.database().table() && $root.database().table().samples && $root.database().table().samples.loading() -->
|
|
|
|
|
- <span data-bind="text: catalogEntry.name"></span>
|
|
|
|
|
- <!-- ko if: $root.optimizerEnabled() && popularity() -->
|
|
|
|
|
- <i class="fa fa-star-o" data-bind="attr: { 'title': '${_ko('Popularity')}' + ': ' + popularity() + '%' }, tooltip"></i>
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- <i class="fa fa-key" title="${ _("Primary key") }" data-bind="visible: catalogEntry.isPrimaryKey(), tooltip"></i>
|
|
|
|
|
- <i class="fa fa-key" title="${ _("Partition key") }" data-bind="visible: catalogEntry.isPartitionKey(), tooltip"></i>
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- <!-- ko ifnot: $root.database() && $root.database().table() && $root.database().table().samples && $root.database().table().samples.loading() -->
|
|
|
|
|
- <a href="javascript:void(0)" class="column-selector" data-bind="click: $root.scrollToColumn">
|
|
|
|
|
- <span data-bind="text: catalogEntry.name"></span>
|
|
|
|
|
- <!-- ko if: $root.optimizerEnabled() && popularity() -->
|
|
|
|
|
- <i class="fa fa-star-o" data-bind="attr: { 'title': '${_ko('Popularity')}' + ': ' + popularity() + '%' }, tooltip"></i>
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- <i class="fa fa-key" title="${ _("Primary key") }" data-bind="visible: catalogEntry.isPrimaryKey(), tooltip"></i>
|
|
|
|
|
- <i class="fa fa-key" title="${ _("Partition key") }" data-bind="visible: catalogEntry.isPartitionKey(), tooltip"></i>
|
|
|
|
|
- </a>
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- </td>
|
|
|
|
|
- <td data-bind="text: catalogEntry.getType()"></td>
|
|
|
|
|
- <td class="metastore-description-col" >
|
|
|
|
|
- <!-- ko ifnot: table.isView() -->
|
|
|
|
|
- <!-- ko template: 'metastore-td-description' --><!-- /ko -->
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- <!-- ko if: table.isView() -->
|
|
|
|
|
- <span style="white-space: pre;" data-bind="text: comment"></span>
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </tbody>
|
|
|
|
|
- </table>
|
|
|
|
|
- </div>
|
|
|
|
|
-</script>
|
|
|
|
|
-
|
|
|
|
|
<script type="text/html" id="metastore-partition-columns-table">
|
|
<script type="text/html" id="metastore-partition-columns-table">
|
|
|
<div style="overflow-x: auto; overflow-y: hidden">
|
|
<div style="overflow-x: auto; overflow-y: hidden">
|
|
|
<table class="table table-condensed table-nowrap metastore-table">
|
|
<table class="table table-condensed table-nowrap metastore-table">
|
|
@@ -199,7 +148,7 @@ ${ components.menubar(is_embeddable) }
|
|
|
|
|
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
<!-- ko if: $data.withDrop -->
|
|
<!-- ko if: $data.withDrop -->
|
|
|
- <div class="hueCheckbox fa" data-bind="hueCheckAll: { allValues: $data.values, selectedValues: $data.selectedValues }"></div>
|
|
|
|
|
|
|
+ <div class="hue-checkbox fa" data-bind="hueCheckAll: { allValues: $data.values, selectedValues: $data.selectedValues }"></div>
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
</th>
|
|
</th>
|
|
|
<th>${_('Values')}</th>
|
|
<th>${_('Values')}</th>
|
|
@@ -215,7 +164,7 @@ ${ components.menubar(is_embeddable) }
|
|
|
<span data-bind="text: $index() + 1"></span>
|
|
<span data-bind="text: $index() + 1"></span>
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
<!-- ko if: $parent.withDrop -->
|
|
<!-- ko if: $parent.withDrop -->
|
|
|
- <div class="hueCheckbox fa" data-bind="multiCheck: '#partitionsTable', value: $data, hueChecked: $parent.selectedValues"></div>
|
|
|
|
|
|
|
+ <div class="hue-checkbox fa" data-bind="multiCheck: '#partitionsTable', value: $data, hueChecked: $parent.selectedValues"></div>
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
</td>
|
|
</td>
|
|
|
<td title="${_('Query partition data')}">
|
|
<td title="${_('Query partition data')}">
|
|
@@ -390,76 +339,59 @@ ${ components.menubar(is_embeddable) }
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/html" id="metastore-databases">
|
|
<script type="text/html" id="metastore-databases">
|
|
|
- <div class="actionbar-actions" data-bind="dockable: { scrollable: '${ MAIN_SCROLLABLE }', jumpCorrection: 5, topSnap: '${ TOP_SNAP }' }">
|
|
|
|
|
- <input class="input-xlarge search-query margin-left-10" type="text" placeholder="${ _('Search for a database...') }" data-bind="clearable: databaseQuery, value: databaseQuery, valueUpdate: 'afterkeydown'"/>
|
|
|
|
|
- % if has_write_access:
|
|
|
|
|
- <button class="btn toolbarBtn margin-left-20" title="${_('Drop the selected databases')}" data-bind="click: function () { $('#dropDatabase').modal('show'); }, disable: selectedDatabases().length === 0"><i class="fa fa-times"></i> ${_('Drop')}</button>
|
|
|
|
|
- <div id="dropDatabase" class="modal hide fade">
|
|
|
|
|
-
|
|
|
|
|
- % if is_embeddable:
|
|
|
|
|
- <form action="/metastore/databases/drop" data-bind="submit: dropAndWatch" method="POST">
|
|
|
|
|
- <input type="hidden" name="is_embeddable" value="true"/>
|
|
|
|
|
- <input type="hidden" name="start_time" value=""/>
|
|
|
|
|
- <input type="hidden" name="source_type" data-bind="value: $root.sourceType"/>
|
|
|
|
|
- % else:
|
|
|
|
|
- <form id="dropDatabaseForm" action="/metastore/databases/drop" method="POST">
|
|
|
|
|
- % endif
|
|
|
|
|
- ${ csrf_token(request) | n,unicode }
|
|
|
|
|
- <div class="modal-header">
|
|
|
|
|
- <button type="button" class="close" data-dismiss="modal" aria-label="${ _('Close') }"><span aria-hidden="true">×</span></button>
|
|
|
|
|
- <h2 id="dropDatabaseMessage" class="modal-title">${ _('Do you really want to delete the following database(s)?') }</h2>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="modal-body">
|
|
|
|
|
- <ul data-bind="foreach: selectedDatabases">
|
|
|
|
|
- <li>
|
|
|
|
|
- <span data-bind="text: catalogEntry.name"></span>
|
|
|
|
|
- <!-- ko if: $data.tables().length > 0 -->
|
|
|
|
|
- (<span data-bind="text: $data.tables().length"></span> tables)
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- </li>
|
|
|
|
|
- </ul>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="modal-footer">
|
|
|
|
|
- <div class="label label-important margin-top-5 pull-left">${ _('Warning: This will drop all tables and objects within the database.') }</div>
|
|
|
|
|
- <input type="button" class="btn" data-dismiss="modal" value="${_('No')}">
|
|
|
|
|
- <input type="submit" class="btn btn-danger" value="${_('Yes')}"/>
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- ko foreach: selectedDatabases -->
|
|
|
|
|
- <input type="hidden" name="database_selection" data-bind="value: catalogEntry.name" />
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- </form>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <div class="entries-table-container">
|
|
|
|
|
+ <div class="actionbar-actions">
|
|
|
|
|
+ % if has_write_access:
|
|
|
|
|
+ <button class="btn toolbarBtn margin-left-20" title="${_('Drop the selected databases')}" data-bind="click: function () { $('#dropDatabase').modal('show'); }, disable: selectedDatabases().length === 0"><i class="fa fa-times"></i> ${_('Drop')}</button>
|
|
|
|
|
+ <div id="dropDatabase" class="modal hide fade">
|
|
|
|
|
+
|
|
|
|
|
+ % if is_embeddable:
|
|
|
|
|
+ <form action="/metastore/databases/drop" data-bind="submit: dropAndWatch" method="POST">
|
|
|
|
|
+ <input type="hidden" name="is_embeddable" value="true"/>
|
|
|
|
|
+ <input type="hidden" name="start_time" value=""/>
|
|
|
|
|
+ <input type="hidden" name="source_type" data-bind="value: $root.sourceType"/>
|
|
|
|
|
+ % else:
|
|
|
|
|
+ <form id="dropDatabaseForm" action="/metastore/databases/drop" method="POST">
|
|
|
|
|
+ % endif
|
|
|
|
|
+ ${ csrf_token(request) | n,unicode }
|
|
|
|
|
+ <div class="modal-header">
|
|
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-label="${ _('Close') }"><span aria-hidden="true">×</span></button>
|
|
|
|
|
+ <h2 id="dropDatabaseMessage" class="modal-title">${ _('Do you really want to delete the following database(s)?') }</h2>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="modal-body">
|
|
|
|
|
+ <ul data-bind="foreach: selectedDatabases">
|
|
|
|
|
+ <li>
|
|
|
|
|
+ <span data-bind="text: catalogEntry.name"></span>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="modal-footer">
|
|
|
|
|
+ <div class="label label-important margin-top-5 pull-left">${ _('Warning: This will drop all tables and objects within the database.') }</div>
|
|
|
|
|
+ <input type="button" class="btn" data-dismiss="modal" value="${_('No')}">
|
|
|
|
|
+ <input type="submit" class="btn btn-danger" value="${_('Yes')}"/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- ko foreach: selectedDatabases -->
|
|
|
|
|
+ <input type="hidden" name="database_selection" data-bind="value: catalogEntry.name" />
|
|
|
|
|
+ <!-- /ko -->
|
|
|
|
|
+ </form>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
- % if is_embeddable:
|
|
|
|
|
- <button href="javascript: void(0);" class="btn btn-default" data-bind="publish: { 'open.link': '${ url('indexer:importer_prefill', source_type='manual', target_type='database') }' }" title="${_('Create a new database')}"><i class="fa fa-plus"></i> ${_('New')}</button>
|
|
|
|
|
- % elif ENABLE_NEW_CREATE_TABLE.get():
|
|
|
|
|
- <button class="btn btn-default" data-bind="attr: { 'href': '${ url('indexer:importer_prefill', source_type='manual', target_type='database') }' }" title="${_('Create a new database')}"><i class="fa fa-plus"></i> ${_('New')}</button>
|
|
|
|
|
- % else:
|
|
|
|
|
- <button href="${ url('beeswax:create_database') }" class="btn btn-default" title="${_('Create a new database')}"><i class="fa fa-plus"></i> ${_('New')}</button>
|
|
|
|
|
|
|
+ % if is_embeddable:
|
|
|
|
|
+ <button href="javascript: void(0);" class="btn btn-default" data-bind="publish: { 'open.link': '${ url('indexer:importer_prefill', source_type='manual', target_type='database') }' }" title="${_('Create a new database')}"><i class="fa fa-plus"></i> ${_('New')}</button>
|
|
|
|
|
+ % elif ENABLE_NEW_CREATE_TABLE.get():
|
|
|
|
|
+ <button class="btn btn-default" data-bind="attr: { 'href': '${ url('indexer:importer_prefill', source_type='manual', target_type='database') }' }" title="${_('Create a new database')}"><i class="fa fa-plus"></i> ${_('New')}</button>
|
|
|
|
|
+ % else:
|
|
|
|
|
+ <button href="${ url('beeswax:create_database') }" class="btn btn-default" title="${_('Create a new database')}"><i class="fa fa-plus"></i> ${_('New')}</button>
|
|
|
|
|
+ % endif
|
|
|
% endif
|
|
% endif
|
|
|
- % endif
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="entries-table-no-header">
|
|
|
|
|
+ <!-- ko if: catalogEntry() -->
|
|
|
|
|
+ <!-- ko component: { name: 'catalog-entries-list', params: { catalogEntry: catalogEntry(), contextPopoverEnabled: true, onClick: onDatabaseClick.bind($data), selectedEntries: selectedDatabases, editableDescriptions: /true/i.test('${ has_write_access }') } } --><!-- /ko -->
|
|
|
|
|
+ <!-- /ko -->
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- <table id="databasesTable" class="table table-condensed datatables" style="margin-bottom: 10px" data-bind="visible: filteredDatabases().length > 0">
|
|
|
|
|
- <thead>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th width="1%" style="text-align: center" class="vertical-align-middle"><div class="hueCheckbox fa" data-bind="hueCheckAll: { allValues: filteredDatabases, selectedValues: selectedDatabases }"></div></th>
|
|
|
|
|
- <th> </th>
|
|
|
|
|
- <th>${ _('Database Name') }</th>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </thead>
|
|
|
|
|
- <tbody data-bind="hueach: { data: filteredDatabases, itemHeight: 32, scrollable: '${ MAIN_SCROLLABLE }', scrollableOffset: 145, scrollUp: true }">
|
|
|
|
|
- <tr>
|
|
|
|
|
- <td width="1%" style="text-align: center">
|
|
|
|
|
- <div class="hueCheckbox fa" data-bind="multiCheck: '#databasesTable', value: $data, hueChecked: $parent.selectedDatabases"></div>
|
|
|
|
|
- </td>
|
|
|
|
|
- <td width="1%"><a class="blue" href="javascript:void(0)" data-bind="click: showContextPopover"><i class="fa fa-fw fa-info" title="${_('Show details')}"></i></a></td>
|
|
|
|
|
- <td>
|
|
|
|
|
- <a href="javascript: void(0);" data-bind="text: catalogEntry.name, click: function () { $parent.setDatabase($data, function() { huePubSub.publish('metastore.url.change'); }) }"></a>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </tbody>
|
|
|
|
|
- </table>
|
|
|
|
|
- <span class="margin-left-10" data-bind="visible: filteredDatabases().length === 0" style="font-style: italic; display: none;">${_('No databases found')}</span>
|
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/html" id="metastore-td-description">
|
|
<script type="text/html" id="metastore-td-description">
|
|
@@ -574,84 +506,27 @@ ${ components.menubar(is_embeddable) }
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row-fluid">
|
|
<div class="row-fluid">
|
|
|
- <div class="span12 tile" style="margin: 0 10px;">
|
|
|
|
|
- <h4>${ _('Tables') }</h4>
|
|
|
|
|
- <div class="actionbar-actions" style="margin-top:5px;" data-bind="visible: tables().length > 0, dockable: { scrollable: '${ MAIN_SCROLLABLE }', jumpCorrection: 5, topSnap: '${ TOP_SNAP }' }">
|
|
|
|
|
- <input class="input-xlarge search-query margin-left-10" type="text" placeholder="${ _('Search for a table...') }" data-bind="clearable: tableQuery, value: tableQuery, valueUpdate: 'afterkeydown'"/>
|
|
|
|
|
- <button class="btn toolbarBtn margin-left-20" title="${_('Browse the selected table')}" data-bind="click: function () { setTable(selectedTables()[0]); selectedTables([]); }, disable: selectedTables().length !== 1"><i class="fa fa-eye"></i> ${_('View')}</button>
|
|
|
|
|
|
|
+ <div class="span12 tile entries-table-container">
|
|
|
|
|
+ <h4 class="entries-table-header">${ _('Tables') }</h4>
|
|
|
|
|
+ <div class="actionbar-actions" data-bind="visible: tables().length > 0">
|
|
|
|
|
+ <button class="btn toolbarBtn margin-left-20" title="${_('Browse the selected table')}" data-bind="click: function () { onTableClick(selectedTables()[0].catalogEntry); selectedTables([]); }, disable: selectedTables().length !== 1"><i class="fa fa-eye"></i> ${_('View')}</button>
|
|
|
<button class="btn toolbarBtn" title="${_('Query the selected table')}" data-bind="click: function () { IS_HUE_4 ? queryAndWatch('/notebook/browse/' + selectedTables()[0].catalogEntry.path.join('/') + '/', $root.sourceType()) : location.href = '/notebook/browse/' + selectedTables()[0].catalogEntry.path.join('/'); }, disable: selectedTables().length !== 1">
|
|
<button class="btn toolbarBtn" title="${_('Query the selected table')}" data-bind="click: function () { IS_HUE_4 ? queryAndWatch('/notebook/browse/' + selectedTables()[0].catalogEntry.path.join('/') + '/', $root.sourceType()) : location.href = '/notebook/browse/' + selectedTables()[0].catalogEntry.path.join('/'); }, disable: selectedTables().length !== 1">
|
|
|
<i class="fa fa-play fa-fw"></i> ${_('Query')}
|
|
<i class="fa fa-play fa-fw"></i> ${_('Query')}
|
|
|
</button>
|
|
</button>
|
|
|
% if has_write_access:
|
|
% if has_write_access:
|
|
|
<button id="dropBtn" class="btn toolbarBtn" title="${_('Drop the selected tables')}" data-bind="click: function () { $('#dropTable').modal('show'); }, disable: selectedTables().length === 0"><i class="fa fa-times"></i> ${_('Drop')}</button>
|
|
<button id="dropBtn" class="btn toolbarBtn" title="${_('Drop the selected tables')}" data-bind="click: function () { $('#dropTable').modal('show'); }, disable: selectedTables().length === 0"><i class="fa fa-times"></i> ${_('Drop')}</button>
|
|
|
% if is_embeddable:
|
|
% if is_embeddable:
|
|
|
- <button href="javascript: void(0);" class="btn btn-default" data-bind="publish: { 'open.link': '${ url('indexer:importer_prefill', source_type='all', target_type='table') }' + database().catalogEntry.name }" title="${_('Create a new table')}"><i class="fa fa-plus"></i> ${_('New')}</button>
|
|
|
|
|
|
|
+ <button href="javascript: void(0);" class="btn btn-default" data-bind="publish: { 'open.link': '${ url('indexer:importer_prefill', source_type='all', target_type='table') }' + catalogEntry.name }" title="${_('Create a new table')}"><i class="fa fa-plus"></i> ${_('New')}</button>
|
|
|
% elif ENABLE_NEW_CREATE_TABLE.get():
|
|
% elif ENABLE_NEW_CREATE_TABLE.get():
|
|
|
- <button class="btn btn-default" data-bind="attr: { 'href': '${ url('indexer:importer_prefill', source_type='all', target_type='table') }' + database().catalogEntry.name }" title="${_('Create a new table')}"><i class="fa fa-plus"></i> ${_('New')}</button>
|
|
|
|
|
|
|
+ <button class="btn btn-default" data-bind="attr: { 'href': '${ url('indexer:importer_prefill', source_type='all', target_type='table') }' + catalogEntry.name }" title="${_('Create a new table')}"><i class="fa fa-plus"></i> ${_('New')}</button>
|
|
|
% else:
|
|
% else:
|
|
|
- <button class="btn btn-default" data-bind="attr: { 'href': '/beeswax/create/import_wizard/' + database().catalogEntry.name }" title="${_('Create a new table from a file')}"><i class="fa fa-stack"></i> ${_('New from file')}</button>
|
|
|
|
|
- <button class="btn btn-default" data-bind="attr: { 'href': '/beeswax/create/create_table/' + database().catalogEntry.name }" title="${_('Create a new table manually')}"><i class="fa fa-plus"></i> ${_('New manually')}</button>
|
|
|
|
|
|
|
+ <button class="btn btn-default" data-bind="attr: { 'href': '/beeswax/create/import_wizard/' + catalogEntry.name }" title="${_('Create a new table from a file')}"><i class="fa fa-stack"></i> ${_('New from file')}</button>
|
|
|
|
|
+ <button class="btn btn-default" data-bind="attr: { 'href': '/beeswax/create/create_table/' + catalogEntry.name }" title="${_('Create a new table manually')}"><i class="fa fa-plus"></i> ${_('New manually')}</button>
|
|
|
% endif
|
|
% endif
|
|
|
% endif
|
|
% endif
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <table id="tablesTable" class="table table-condensed table-nowrap" style="margin-bottom: 10px; width: 100%" data-bind="visible: filteredTables().length > 0">
|
|
|
|
|
- <thead>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th width="1%" style="text-align: center" class="vertical-align-middle"><div class="hueCheckbox fa" data-bind="hueCheckAll: { allValues: filteredTables, selectedValues: selectedTables }"></div></th>
|
|
|
|
|
- <th> </th>
|
|
|
|
|
- <th width="20%">${ _('Name') }</th>
|
|
|
|
|
- <th class="metastore-description-col" width="69%">${ _('Description') }</th>
|
|
|
|
|
- <!-- ko if: $root.optimizerEnabled -->
|
|
|
|
|
- <th width="10%">${ _('Columns') }</th>
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- </tr>
|
|
|
|
|
- </thead>
|
|
|
|
|
- <tbody data-bind="hueach: { data: filteredTables, itemHeight: 32, scrollable: '${ MAIN_SCROLLABLE }', scrollableOffset: 277, scrollUp: true }">
|
|
|
|
|
- <tr>
|
|
|
|
|
- <td width="1%" style="text-align: center">
|
|
|
|
|
- <div class="hueCheckbox fa" data-bind="multiCheck: '#tablesTable', value: $data, hueChecked: $parent.selectedTables"></div>
|
|
|
|
|
- </td>
|
|
|
|
|
- <td width="1%"><a class="blue" href="javascript:void(0)" data-bind="click: showContextPopover"><i class="fa fa-fw fa-info" title="${_('Show details')}"></i></a></td>
|
|
|
|
|
- <td>
|
|
|
|
|
- <a class="tableLink" href="javascript:void(0);" data-bind="click: function() { $parent.setTable($data, function() { huePubSub.publish('metastore.url.change'); }) }">
|
|
|
|
|
- <!-- ko ifnot: $root.optimizerEnabled && optimizerStats() -->
|
|
|
|
|
- <!-- ko if: catalogEntry.isTable() -->
|
|
|
|
|
- <i class="fa fa-fw fa-table" title="${ _('Table') }"></i>
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- <!-- ko if: catalogEntry.isView() -->
|
|
|
|
|
- <i class="fa fa-fw fa-eye" title="${ _('View') }"></i>
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- <!-- ko if: $root.optimizerEnabled && optimizerStats() -->
|
|
|
|
|
- <!-- ko if: optimizerStats().is_fact -->
|
|
|
|
|
- <i class="fa fa-fw fa-database" title="${ _('Fact table') }"></i>
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- <!-- ko ifnot: optimizerStats().is_fact -->
|
|
|
|
|
- <i class="fa fa-fw fa-calendar" title="${ _('Dimension table') }"></i>
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- <span data-bind="text: catalogEntry.name"></span>
|
|
|
|
|
- <!-- ko if: $root.optimizerEnabled() && optimizerStats() && optimizerStats().popularity -->
|
|
|
|
|
- <i class="fa fa-star-o" data-bind="attr: { 'title': '${_ko('Popularity')}' + ': ' + optimizerStats().popularity + '%' }, tooltip"></i>
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- </a>
|
|
|
|
|
- </td>
|
|
|
|
|
- <td class="metastore-description-col" data-bind="attr: { title: hueUtils.html2text(commentWithoutNewLines()) }">
|
|
|
|
|
- <!-- ko template: 'metastore-td-description' --><!-- /ko -->
|
|
|
|
|
- </td>
|
|
|
|
|
- <!-- ko if: $root.optimizerEnabled -->
|
|
|
|
|
- <!-- ko if: optimizerStats() -->
|
|
|
|
|
- <td data-bind="text: optimizerStats().column_count"></td>
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- <!-- ko ifnot: optimizerStats() -->
|
|
|
|
|
- <td></td>
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- </tr>
|
|
|
|
|
- </tbody>
|
|
|
|
|
- </table>
|
|
|
|
|
- <div data-bind="visible: filteredTables().length === 0, css: { 'margin-left-10': tables().length > 0 }" style="font-style: italic; display: none;">${_('No tables found.')}</div>
|
|
|
|
|
|
|
+ <!-- ko component: { name: 'catalog-entries-list', params: { catalogEntry: catalogEntry, contextPopoverEnabled: true, onClick: onTableClick.bind($data), selectedEntries: selectedTables, editableDescriptions: /true/i.test('${ has_write_access }') } } --><!-- /ko -->
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -718,36 +593,7 @@ ${ components.menubar(is_embeddable) }
|
|
|
|
|
|
|
|
<div class="tile">
|
|
<div class="tile">
|
|
|
<h4 style="margin-bottom: 5px;">${ _('Columns') } (<span data-bind="text: columns().length"></span>) <i data-bind="visible: loadingColumns" class="fa fa-spinner fa-spin" style="display: none;"></i></h4>
|
|
<h4 style="margin-bottom: 5px;">${ _('Columns') } (<span data-bind="text: columns().length"></span>) <i data-bind="visible: loadingColumns" class="fa fa-spinner fa-spin" style="display: none;"></i></h4>
|
|
|
- <!-- ko with: favouriteColumns -->
|
|
|
|
|
- <!-- ko template: "metastore-columns-table" --><!-- /ko -->
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
-
|
|
|
|
|
- <a href="javascript: void(0);" title="${_('View more...')}" class="metastore-view-more" data-bind="visible: columns().length > favouriteColumns().length, click: function() { $root.currentTab('columns'); $('.page-content').scrollTop(0); }">
|
|
|
|
|
- ${_('View more...')}
|
|
|
|
|
- </a>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <div class="tile">
|
|
|
|
|
- <h4>${ _('Sample') } <i data-bind="visible: samples.loading" class='fa fa-spinner fa-spin' style="display: none;"></i></h4>
|
|
|
|
|
- <!-- ko with: samples -->
|
|
|
|
|
- <!-- ko if: loaded() && !hasErrors() -->
|
|
|
|
|
- <!-- ko with: preview -->
|
|
|
|
|
- <div style="overflow: auto">
|
|
|
|
|
- <!-- ko template: { if: rows().length, name: 'metastore-samples-table' } --><!-- /ko -->
|
|
|
|
|
- </div>
|
|
|
|
|
- <a href="javascript: void(0);" title="${_('View more...')}" class="metastore-view-more" data-bind="visible: rows().length >= 3, click: function() { $root.currentTab('sample'); $('.page-content').scrollTop(0); }" style="display: none;">
|
|
|
|
|
- ${_('View more...')}
|
|
|
|
|
- </a>
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- <!-- ko if: metastoreTable.tableDetails() -->
|
|
|
|
|
- <div data-bind="visible: !rows().length && metastoreTable.tableDetails().is_view" style="display: none;">${ _('The view does not contain any data.') }</div>
|
|
|
|
|
- <div data-bind="visible: !rows().length && !metastoreTable.tableDetails().is_view" style="display: none;">${ _('The table does not contain any data.') }</div>
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- <!-- ko if: hasErrors() -->
|
|
|
|
|
- <div>${ _('Could not load the sample, see the server log for details.') }</div>
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
|
|
+ <!-- ko component: { name: 'catalog-entries-list', params: { catalogEntry: catalogEntry, contextPopoverEnabled: true, editableDescriptions: /true/i.test('${ has_write_access }') } } --><!-- /ko -->
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="tile" data-bind="visible: tableDetails() && tableDetails().partition_keys.length" style="display: none;">
|
|
<div class="tile" data-bind="visible: tableDetails() && tableDetails().partition_keys.length" style="display: none;">
|
|
@@ -766,12 +612,6 @@ ${ components.menubar(is_embeddable) }
|
|
|
</div>
|
|
</div>
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
-<script type="text/html" id="metastore-columns-tab">
|
|
|
|
|
- <!-- ko with: filteredColumns -->
|
|
|
|
|
- <!-- ko template: "metastore-columns-table" --><!-- /ko -->
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
-</script>
|
|
|
|
|
-
|
|
|
|
|
<script type="text/html" id="metastore-partitions-tab">
|
|
<script type="text/html" id="metastore-partitions-tab">
|
|
|
<!-- ko with: partitions -->
|
|
<!-- ko with: partitions -->
|
|
|
<div class="tile" data-bind="visible: true" style="display: none;">
|
|
<div class="tile" data-bind="visible: true" style="display: none;">
|
|
@@ -1113,7 +953,6 @@ ${ components.menubar(is_embeddable) }
|
|
|
|
|
|
|
|
<ul class="nav nav-tabs nav-tabs-border margin-top-10">
|
|
<ul class="nav nav-tabs nav-tabs-border margin-top-10">
|
|
|
<li data-bind="css: { 'active': $root.currentTab() === 'overview' }"><a href="javascript: void(0);" data-bind="click: function() { $root.currentTab('overview'); }">${_('Overview')}</a></li>
|
|
<li data-bind="css: { 'active': $root.currentTab() === 'overview' }"><a href="javascript: void(0);" data-bind="click: function() { $root.currentTab('overview'); }">${_('Overview')}</a></li>
|
|
|
- <li data-bind="css: { 'active': $root.currentTab() === 'columns' }"><a href="javascript: void(0);" data-bind="click: function() { $root.currentTab('columns'); }">${_('Columns')} (<span data-bind="text: columns().length"></span>)</a></li>
|
|
|
|
|
<!-- ko if: tableDetails() && tableDetails().partition_keys.length -->
|
|
<!-- ko if: tableDetails() && tableDetails().partition_keys.length -->
|
|
|
<li data-bind="css: { 'active': $root.currentTab() === 'partitions' }"><a href="javascript: void(0);" data-bind="click: function() { $root.currentTab('partitions'); }">${_('Partitions')} (<span data-bind="text: partitionsCountLabel"></span>)</a></li>
|
|
<li data-bind="css: { 'active': $root.currentTab() === 'partitions' }"><a href="javascript: void(0);" data-bind="click: function() { $root.currentTab('partitions'); }">${_('Partitions')} (<span data-bind="text: partitionsCountLabel"></span>)</a></li>
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
@@ -1137,13 +976,6 @@ ${ components.menubar(is_embeddable) }
|
|
|
<!-- ko template: 'metastore-overview-tab' --><!-- /ko -->
|
|
<!-- ko template: 'metastore-overview-tab' --><!-- /ko -->
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
|
|
|
|
|
- <!-- ko if: $root.currentTab() === 'columns' -->
|
|
|
|
|
- <input class="input-xlarge search-query margin-left-10" type="text" placeholder="${ _('Search for a column...') }" data-bind="clearable: columnQuery, value: columnQuery, valueUpdate: 'afterkeydown'"/>
|
|
|
|
|
- <div class="margin-top-10">
|
|
|
|
|
- <!-- ko template: 'metastore-columns-tab' --><!-- /ko -->
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
-
|
|
|
|
|
<!-- ko if: $root.currentTab() === 'partitions' -->
|
|
<!-- ko if: $root.currentTab() === 'partitions' -->
|
|
|
<!-- ko template: 'metastore-partitions-tab' --><!-- /ko -->
|
|
<!-- ko template: 'metastore-partitions-tab' --><!-- /ko -->
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|