forked from apache/superset
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8963e0
commit 51b273b
Showing
22 changed files
with
223 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
px.registerWidget('markup', function(data_attribute) { | ||
|
||
function refresh(done) { | ||
$('#code').attr('rows', '15') | ||
done(); | ||
} | ||
return { | ||
render: refresh, | ||
resize: refresh, | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
li.widget.pivot_table div.token { | ||
overflow: auto; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
px.registerWidget('pivot_table', function(data_attribute) { | ||
var token_name = data_attribute['token']; | ||
var token = $('#' + token_name); | ||
var form_data = data_attribute.form_data; | ||
|
||
function refresh(done) { | ||
token.load(data_attribute.json_endpoint, function(response, status, xhr){ | ||
if(status=="error"){ | ||
var err = '<div class="alert alert-danger">' + xhr.responseText + '</div>'; | ||
token.html(err); | ||
token.show(); | ||
} | ||
else{ | ||
if (form_data.groupby.length == 1){ | ||
var table = token.find('table').DataTable({ | ||
paging: false, | ||
searching: false, | ||
}); | ||
table.column('-1').order( 'desc' ).draw(); | ||
} | ||
} | ||
token.show(); | ||
done(); | ||
}); | ||
} | ||
|
||
return { | ||
render: refresh, | ||
resize: refresh, | ||
}; | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
li.widget.table div.token { | ||
overflow: auto; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
px.registerWidget('table', function(data_attribute) { | ||
|
||
var token_name = data_attribute['token']; | ||
var token = $('#' + token_name); | ||
|
||
function refresh(done) { | ||
token.load(data_attribute.json_endpoint, function(response, status, xhr){ | ||
if(status=="error"){ | ||
var err = '<div class="alert alert-danger">' + xhr.responseText + '</div>'; | ||
token.html(err); | ||
token.show(); | ||
done(); | ||
} | ||
else{ | ||
var table = token.find('table').DataTable({ | ||
paging: false, | ||
searching: false, | ||
}); | ||
table.column('-1').order( 'desc' ).draw(); | ||
} | ||
token.show(); | ||
done(); | ||
}); | ||
} | ||
|
||
return { | ||
render: refresh, | ||
resize: refresh, | ||
}; | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.