Browse Source

[metastore] Plug the new browse data table

Romain Rigaux 10 năm trước cách đây
mục cha
commit
1796867c31

+ 1 - 1
apps/metastore/src/metastore/templates/metastore.mako

@@ -338,7 +338,7 @@ ${ assist.assistPanel() }
         <div class="actionbar-actions">
           <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 () { table(selectedTables()[0]); selectedTables([]); }, disable: selectedTables().length !== 1"><i class="fa fa-eye"></i> ${_('View')}</button>
-          <button class="btn toolbarBtn" title="${_('Browse the selected table')}" data-bind="click: function () { location.href = '/metastore/table/' + name + '/' + selectedTables()[0].name + '/read'; }, disable: selectedTables().length !== 1"><i class="fa fa-list"></i> ${_('Browse Data')}</button>
+          <button class="btn toolbarBtn" title="${_('Browse the selected table')}" data-bind="click: function () { location.href = '/notebook/browse/' + name + '/' + selectedTables()[0].name; }, disable: selectedTables().length !== 1"><i class="fa fa-list"></i> ${_('Browse Data')}</button>
           % if has_write_access:
             <button id="dropBtn" class="btn toolbarBtn" title="${_('Delete the selected tables')}" data-bind="click: function () { $('#dropTable').modal('show'); }, disable: selectedTables().length === 0"><i class="fa fa-times"></i>  ${_('Drop')}</button>
             <div id="dropTable" class="modal hide fade">

+ 1 - 1
desktop/libs/notebook/src/notebook/urls.py

@@ -41,7 +41,7 @@ urlpatterns = patterns('notebook.views',
   url(r'^copy$', 'copy', name='copy'),
 
   url(r'^editor$', 'editor', name='editor'),
-  url(r'^browse(?P<database>\w+)/(?P<table>\w+)$', 'browse', name='browse'),
+  url(r'^browse/(?P<database>\w+)/(?P<table>\w+)$', 'browse', name='browse'),
 )
 
 # APIs