mirror of
https://github.com/apache/superset.git
synced 2024-09-12 16:49:40 -04:00
Desperatly changing view name to avoid proxy odd bug
This commit is contained in:
parent
88b8f73489
commit
baac8c44a5
@ -304,7 +304,7 @@ class SqlaTable(Model, Queryable, AuditMixinNullable):
|
|||||||
'Database', backref='tables', foreign_keys=[database_id])
|
'Database', backref='tables', foreign_keys=[database_id])
|
||||||
offset = Column(Integer, default=0)
|
offset = Column(Integer, default=0)
|
||||||
|
|
||||||
baselink = "tableview"
|
baselink = "tablemodelview"
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return self.table_name
|
return self.table_name
|
||||||
@ -315,7 +315,7 @@ class SqlaTable(Model, Queryable, AuditMixinNullable):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def url(self):
|
def url(self):
|
||||||
return '/tableview/edit/{}'.format(self.id)
|
return '/tablemodelview/edit/{}'.format(self.id)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def link(self):
|
def link(self):
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
$.each(data, function(i, d){
|
$.each(data, function(i, d){
|
||||||
var id = 'tbl_' + d;
|
var id = 'tbl_' + d;
|
||||||
div.append('<span id="' + id + '" style="margin: 0px 10px 10px 0px;" class="btn btn-default">' + d + '</span>')
|
div.append('<span id="' + id + '" style="margin: 0px 10px 10px 0px;" class="btn btn-default">' + d + '</span>')
|
||||||
$('#' + id).click(function(){window.location = '/tableview/add';})
|
$('#' + id).click(function(){window.location = '/tablemodelview/add';})
|
||||||
});
|
});
|
||||||
}).fail(function(error) {
|
}).fail(function(error) {
|
||||||
alert("ERROR: " + error.responseText);
|
alert("ERROR: " + error.responseText);
|
||||||
|
@ -147,7 +147,7 @@ appbuilder.add_view(
|
|||||||
category_icon='fa-database',)
|
category_icon='fa-database',)
|
||||||
|
|
||||||
|
|
||||||
class TableView(PanoramixModelView, DeleteMixin):
|
class TableModelView(PanoramixModelView, DeleteMixin):
|
||||||
datamodel = SQLAInterface(models.SqlaTable)
|
datamodel = SQLAInterface(models.SqlaTable)
|
||||||
list_columns = [
|
list_columns = [
|
||||||
'table_link', 'database', 'sql_link', 'changed_by_', 'changed_on_']
|
'table_link', 'database', 'sql_link', 'changed_by_', 'changed_on_']
|
||||||
@ -176,7 +176,7 @@ class TableView(PanoramixModelView, DeleteMixin):
|
|||||||
self.post_add(table)
|
self.post_add(table)
|
||||||
|
|
||||||
appbuilder.add_view(
|
appbuilder.add_view(
|
||||||
TableView,
|
TableModelView,
|
||||||
"Tables",
|
"Tables",
|
||||||
category="Sources",
|
category="Sources",
|
||||||
icon='fa-table',)
|
icon='fa-table',)
|
||||||
|
Loading…
Reference in New Issue
Block a user