|
|
@ -4,15 +4,16 @@ babel
|
|||
.coverage
|
||||
_build
|
||||
_static
|
||||
dashed/bin/dashedc
|
||||
caravel/bin/caravelc
|
||||
envpy3
|
||||
build
|
||||
*.db
|
||||
tmp
|
||||
dashed_config.py
|
||||
caravel_config.py
|
||||
local_config.py
|
||||
env
|
||||
dist
|
||||
dashed.egg-info/
|
||||
caravel.egg-info/
|
||||
app.db
|
||||
*.bak
|
||||
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ pep8:
|
|||
full: true
|
||||
ignore-paths:
|
||||
- docs
|
||||
- dashed/migrations/env.py
|
||||
- dashed/ascii_art.py
|
||||
- caravel/migrations/env.py
|
||||
- caravel/ascii_art.py
|
||||
ignore-patterns:
|
||||
- ^example/doc_.*\.py$
|
||||
- (^|/)docs(/|$)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ before_install:
|
|||
install:
|
||||
- pip wheel -w $HOME/.wheelhouse -f $HOME/.wheelhouse .
|
||||
- pip install --find-links=$HOME/.wheelhouse --no-index .
|
||||
- cd dashed/assets
|
||||
- cd caravel/assets
|
||||
- npm install
|
||||
- npm run lint
|
||||
- npm run prod
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ Look through the GitHub issues for features. Anything tagged with
|
|||
|
||||
### Documentation
|
||||
|
||||
Dashed could always use better documentation,
|
||||
whether as part of the official Dashed docs,
|
||||
Caravel could always use better documentation,
|
||||
whether as part of the official Caravel docs,
|
||||
in docstrings, `docs/*.rst` or even on the web as blog posts or
|
||||
articles.
|
||||
|
||||
|
|
@ -49,14 +49,14 @@ If you are proposing a feature:
|
|||
|
||||
## Latest Documentation
|
||||
|
||||
[API Documentation](http://pythonhosted.com/dashed)
|
||||
[API Documentation](http://pythonhosted.com/caravel)
|
||||
|
||||
## Setting up a Python development environment
|
||||
|
||||
# fork the repo on github and then clone it
|
||||
# alternatively you may want to clone the main repo but that won't work
|
||||
# so well if you are planning on sending PRs
|
||||
# git clone git@github.com:mistercrunch/dashed.git
|
||||
# git clone git@github.com:mistercrunch/caravel.git
|
||||
|
||||
# [optional] setup a virtual env and activate it
|
||||
virtualenv env
|
||||
|
|
@ -66,24 +66,24 @@ If you are proposing a feature:
|
|||
python setup.py develop
|
||||
|
||||
# Create an admin user
|
||||
fabmanager create-admin --app dashed
|
||||
fabmanager create-admin --app caravel
|
||||
|
||||
# Initialize the database
|
||||
dashed db upgrade
|
||||
caravel db upgrade
|
||||
|
||||
# Create default roles and permissions
|
||||
dashed init
|
||||
caravel init
|
||||
|
||||
# Load some data to play with
|
||||
dashed load_examples
|
||||
caravel load_examples
|
||||
|
||||
# start a dev web server
|
||||
dashed runserver -d
|
||||
caravel runserver -d
|
||||
|
||||
|
||||
## Setting up the node / npm javascript environment
|
||||
|
||||
`dashed/assets` contains all npm-managed, front end assets.
|
||||
`caravel/assets` contains all npm-managed, front end assets.
|
||||
Flask-Appbuilder itself comes bundled with jQuery and bootstrap.
|
||||
While these may be phased out over time, these packages are currently not
|
||||
managed with npm.
|
||||
|
|
@ -116,7 +116,7 @@ new `node_modules/` folder within `assets/`.
|
|||
npm install
|
||||
```
|
||||
|
||||
To parse and generate bundled files for dashed, run either of the
|
||||
To parse and generate bundled files for caravel, run either of the
|
||||
following commands. The `dev` flag will keep the npm script running and
|
||||
re-run it upon any changes within the assets directory.
|
||||
|
||||
|
|
@ -132,7 +132,7 @@ For every development session you will have to start a flask dev server
|
|||
as well as an npm watcher
|
||||
|
||||
```
|
||||
dashed runserver -d -p 8081
|
||||
caravel runserver -d -p 8081
|
||||
npm run dev
|
||||
```
|
||||
|
||||
|
|
@ -157,12 +157,12 @@ Generate the documentation with:
|
|||
cd docs && ./build.sh
|
||||
|
||||
## CSS Themes
|
||||
As part of the npm build process, CSS for Dashed is compiled from ```Less```, a dynamic stylesheet language.
|
||||
As part of the npm build process, CSS for Caravel is compiled from ```Less```, a dynamic stylesheet language.
|
||||
|
||||
It's possible to customize or add your own theme to Dashed, either by overriding CSS rules or preferably
|
||||
It's possible to customize or add your own theme to Caravel, either by overriding CSS rules or preferably
|
||||
by modifying the Less variables or files in ```assets/stylesheets/less/```.
|
||||
|
||||
The ```variables.less``` and ```bootswatch.less``` files that ship with Dashed are derived from
|
||||
The ```variables.less``` and ```bootswatch.less``` files that ship with Caravel are derived from
|
||||
[Bootswatch](https://bootswatch.com) and thus extend Bootstrap. Modify variables in these files directly, or
|
||||
swap them out entirely with the equivalent files from other Bootswatch (themes)[https://github.com/thomaspark/bootswatch.git]
|
||||
|
||||
|
|
|
|||
14
MANIFEST.in
|
|
@ -1,8 +1,8 @@
|
|||
recursive-include dashed/templates *
|
||||
recursive-include dashed/static *
|
||||
recursive-exclude dashed/static/assets/node_modules *
|
||||
recursive-include dashed/static/assets/node_modules/font-awesome *
|
||||
recursive-exclude dashed/static/docs *
|
||||
recursive-include caravel/templates *
|
||||
recursive-include caravel/static *
|
||||
recursive-exclude caravel/static/assets/node_modules *
|
||||
recursive-include caravel/static/assets/node_modules/font-awesome *
|
||||
recursive-exclude caravel/static/docs *
|
||||
recursive-exclude tests *
|
||||
recursive-include dashed/data *
|
||||
recursive-include dashed/migrations *
|
||||
recursive-include caravel/data *
|
||||
recursive-include caravel/migrations *
|
||||
|
|
|
|||
56
README.md
|
|
@ -1,33 +1,33 @@
|
|||
Dashed
|
||||
Caravel
|
||||
=========
|
||||
|
||||
[](https://badge.fury.io/py/dashed)
|
||||
[](https://coveralls.io/github/airbnb/dashed?branch=master)
|
||||
[](https://landscape.io/github/airbnb/dashed/master)
|
||||
[](https://requires.io/github/airbnb/dashed/requirements/?branch=master)
|
||||
[](https://gitter.im/airbnb/dashed?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](https://badge.fury.io/py/caravel)
|
||||
[](https://coveralls.io/github/airbnb/caravel?branch=master)
|
||||
[](https://landscape.io/github/airbnb/caravel/master)
|
||||
[](https://requires.io/github/airbnb/caravel/requirements/?branch=master)
|
||||
[](https://gitter.im/airbnb/caravel?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
Dashed is a data exploration platform designed to be visual, intuitive
|
||||
Caravel is a data exploration platform designed to be visual, intuitive
|
||||
and interactive.
|
||||
|
||||
[this project used to be named **Panoramix**]
|
||||
|
||||
|
||||
Video - Introduction to Dashed
|
||||
Video - Introduction to Caravel
|
||||
---------------------------------
|
||||
[](http://www.youtube.com/watch?v=3Txm_nj_R7M)
|
||||
[](http://www.youtube.com/watch?v=3Txm_nj_R7M)
|
||||
|
||||
Screenshots
|
||||
------------
|
||||

|
||||

|
||||
|
||||
Dashed
|
||||
Caravel
|
||||
---------
|
||||
Dashed's main goal is to make it easy to slice, dice and visualize data.
|
||||
Caravel's main goal is to make it easy to slice, dice and visualize data.
|
||||
It empowers its user to perform **analytics at the speed of thought**.
|
||||
|
||||
Dashed provides:
|
||||
Caravel provides:
|
||||
* A quick way to intuitively visualize datasets
|
||||
* Create and share interactive dashboards
|
||||
* A rich set of visualizations to analyze your data, as well as a flexible
|
||||
|
|
@ -40,14 +40,14 @@ Dashed provides:
|
|||
displayed in the UI,
|
||||
by defining which fields should show up in which dropdown and which
|
||||
aggregation and function (metrics) are made available to the user
|
||||
* Deep integration with Druid allows for Dashed to stay blazing fast while
|
||||
* Deep integration with Druid allows for Caravel to stay blazing fast while
|
||||
slicing and dicing large, realtime datasets
|
||||
|
||||
|
||||
Database Support
|
||||
----------------
|
||||
|
||||
Dashed was originally designed on to of Druid.io, but quickly broadened
|
||||
Caravel was originally designed on to of Druid.io, but quickly broadened
|
||||
its scope to support other databases through the use of SqlAlchemy, a Python
|
||||
ORM that is compatible with
|
||||
[most common databases](http://docs.sqlalchemy.org/en/rel_1_0/core/engines.html).
|
||||
|
|
@ -68,36 +68,36 @@ power analytic dashboards and applications.*
|
|||
Installation
|
||||
------------
|
||||
|
||||
Dashed is currently only tested using Python 2.7.*. Python 3 support is
|
||||
Caravel is currently only tested using Python 2.7.*. Python 3 support is
|
||||
on the roadmap, Python 2.6 won't be supported.
|
||||
|
||||
Follow these few simple steps to install Dashed.
|
||||
Follow these few simple steps to install Caravel.
|
||||
|
||||
```
|
||||
# Install dashed
|
||||
pip install dashed
|
||||
# Install caravel
|
||||
pip install caravel
|
||||
|
||||
# Create an admin user
|
||||
fabmanager create-admin --app dashed
|
||||
fabmanager create-admin --app caravel
|
||||
|
||||
# Initialize the database
|
||||
dashed db upgrade
|
||||
caravel db upgrade
|
||||
|
||||
# Create default roles and permissions
|
||||
dashed init
|
||||
caravel init
|
||||
|
||||
# Load some data to play with
|
||||
dashed load_examples
|
||||
caravel load_examples
|
||||
|
||||
# Start the development web server
|
||||
dashed runserver -d
|
||||
caravel runserver -d
|
||||
```
|
||||
|
||||
After installation, you should be able to point your browser to the right
|
||||
hostname:port [http://localhost:8088](http://localhost:8088), login using
|
||||
the credential you entered while creating the admin account, and navigate to
|
||||
`Menu -> Admin -> Refresh Metadata`. This action should bring in all of
|
||||
your datasources for Dashed to be aware of, and they should show up in
|
||||
your datasources for Caravel to be aware of, and they should show up in
|
||||
`Menu -> Datasources`, from where you can start playing with your data!
|
||||
|
||||
Configuration
|
||||
|
|
@ -134,14 +134,14 @@ More screenshots
|
|||
|
||||
Related Links
|
||||
-------------
|
||||
* [Dashed Google Group] (https://groups.google.com/forum/#!forum/airbnb_dashed)
|
||||
* [Gitter (live chat) Channel](https://gitter.im/airbnb/dashed)
|
||||
* [Caravel Google Group] (https://groups.google.com/forum/#!forum/airbnb_caravel)
|
||||
* [Gitter (live chat) Channel](https://gitter.im/airbnb/caravel)
|
||||
|
||||
|
||||
Tip of the Hat
|
||||
--------------
|
||||
|
||||
Dashed would not be possible without these great frameworks / libs
|
||||
Caravel would not be possible without these great frameworks / libs
|
||||
|
||||
* Flask App Builder - Allowing us to focus on building the app quickly while
|
||||
getting the foundation for free
|
||||
|
|
@ -153,4 +153,4 @@ getting the foundation for free
|
|||
Contributing
|
||||
------------
|
||||
|
||||
Interested in contributing? Casual hacking? Check out [Contributing.MD](https://github.com/airbnb/dashed/blob/master/CONTRIBUTING.md)
|
||||
Interested in contributing? Casual hacking? Check out [Contributing.MD](https://github.com/airbnb/caravel/blob/master/CONTRIBUTING.md)
|
||||
|
|
|
|||
4
TODO.md
|
|
@ -1,5 +1,5 @@
|
|||
# TODO
|
||||
List of TODO items for Dashed
|
||||
List of TODO items for Caravel
|
||||
|
||||
## Important
|
||||
* **Getting proper JS testing:** unit tests on the Python side are pretty
|
||||
|
|
@ -7,7 +7,7 @@ List of TODO items for Dashed
|
|||
testing all the ajax-type calls
|
||||
* **Viz Plugins:** Allow people to define and share visualization plugins.
|
||||
ideally one would only need to drop in a set of files in a folder and
|
||||
Dashed would discover and expose the plugins
|
||||
Caravel would discover and expose the plugins
|
||||
|
||||
## Features
|
||||
* **Stars:** set dashboards, slices and datasets as favorites
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ script_location = migrations
|
|||
# are written from script.py.mako
|
||||
# output_encoding = utf-8
|
||||
|
||||
sqlalchemy.url = scheme://localhost/dashed
|
||||
sqlalchemy.url = scheme://localhost/caravel
|
||||
|
||||
# Logging configuration
|
||||
[loggers]
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ from flask.ext.cache import Cache
|
|||
|
||||
|
||||
APP_DIR = os.path.dirname(__file__)
|
||||
CONFIG_MODULE = os.environ.get('DASHED_CONFIG', 'dashed.config')
|
||||
CONFIG_MODULE = os.environ.get('CARAVEL_CONFIG', 'caravel.config')
|
||||
|
||||
# Logging configuration
|
||||
logging.basicConfig(format='%(asctime)s:%(levelname)s:%(name)s:%(message)s')
|
||||
|
|
@ -28,15 +28,15 @@ migrate = Migrate(app, db, directory=APP_DIR + "/migrations")
|
|||
class MyIndexView(IndexView):
|
||||
@expose('/')
|
||||
def index(self):
|
||||
return redirect('/dashed/welcome')
|
||||
return redirect('/caravel/welcome')
|
||||
|
||||
appbuilder = AppBuilder(
|
||||
app, db.session,
|
||||
base_template='dashed/base.html',
|
||||
base_template='caravel/base.html',
|
||||
indexview=MyIndexView,
|
||||
security_manager_class=app.config.get("CUSTOM_SECURITY_MANAGER"))
|
||||
|
||||
sm = appbuilder.sm
|
||||
|
||||
get_session = appbuilder.get_session
|
||||
from dashed import config, views # noqa
|
||||
from caravel import config, views # noqa
|
||||
|
Before Width: | Height: | Size: 459 KiB After Width: | Height: | Size: 459 KiB |
|
Before Width: | Height: | Size: 552 KiB After Width: | Height: | Size: 552 KiB |
|
Before Width: | Height: | Size: 236 KiB After Width: | Height: | Size: 236 KiB |
|
Before Width: | Height: | Size: 702 KiB After Width: | Height: | Size: 702 KiB |
|
Before Width: | Height: | Size: 328 KiB After Width: | Height: | Size: 328 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 147 KiB |
|
|
@ -1,6 +1,6 @@
|
|||
var $ = window.$ = require('jquery');
|
||||
var jQuery = window.jQuery = $;
|
||||
var px = require('./modules/dashed.js');
|
||||
var px = require('./modules/caravel.js');
|
||||
var d3 = require('d3');
|
||||
require('bootstrap');
|
||||
|
||||
|
|
@ -8,7 +8,7 @@ var ace = require('brace');
|
|||
require('brace/mode/css');
|
||||
require('brace/theme/crimson_editor');
|
||||
|
||||
require('./dashed-select2.js');
|
||||
require('./caravel-select2.js');
|
||||
require('../node_modules/gridster/dist/jquery.gridster.min.css');
|
||||
require('../node_modules/gridster/dist/jquery.gridster.min.js');
|
||||
|
||||
|
|
@ -137,7 +137,7 @@ var Dashboard = function (dashboardData) {
|
|||
};
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '/dashed/save_dash/' + dashboard.id + '/',
|
||||
url: '/caravel/save_dash/' + dashboard.id + '/',
|
||||
data: {
|
||||
data: JSON.stringify(data)
|
||||
},
|
||||
|
|
@ -5,13 +5,13 @@
|
|||
// js
|
||||
var $ = window.$ = require('jquery');
|
||||
var jQuery = window.jQuery = $;
|
||||
var px = require('./modules/dashed.js');
|
||||
var px = require('./modules/caravel.js');
|
||||
|
||||
require('jquery-ui');
|
||||
$.widget.bridge('uitooltip', $.ui.tooltip); // Shutting down jq-ui tooltips
|
||||
require('bootstrap');
|
||||
|
||||
require('./dashed-select2.js');
|
||||
require('./caravel-select2.js');
|
||||
|
||||
require('../node_modules/bootstrap-toggle/js/bootstrap-toggle.min.js');
|
||||
|
||||
|
|
@ -8,7 +8,7 @@ class App extends React.Component {
|
|||
render () {
|
||||
return (
|
||||
<Jumbotron>
|
||||
<h1>Dashed</h1>
|
||||
<h1>Caravel</h1>
|
||||
<p>Extensible visualization tool for exploring data from any database.</p>
|
||||
</Jumbotron>
|
||||
);
|
||||
|
|
@ -2,7 +2,7 @@ var $ = require('jquery');
|
|||
var jQuery = $;
|
||||
var d3 = require('d3');
|
||||
|
||||
require('../../stylesheets/dashed.css');
|
||||
require('../../stylesheets/caravel.css');
|
||||
|
||||
// vis sources
|
||||
var sourceMap = {
|
||||
|
|
@ -46,7 +46,7 @@ var color = function () {
|
|||
// Color factory
|
||||
var seen = {};
|
||||
return function (s) {
|
||||
// next line is for dashed series that should have the same color
|
||||
// next line is for caravel series that should have the same color
|
||||
s = s.replace('---', '');
|
||||
if (seen[s] === undefined) {
|
||||
seen[s] = Object.keys(seen).length;
|
||||
|
|
@ -133,7 +133,7 @@ var px = (function () {
|
|||
}
|
||||
|
||||
function initFavStars() {
|
||||
var baseUrl = '/dashed/favstar/';
|
||||
var baseUrl = '/caravel/favstar/';
|
||||
// Init star behavihor for favorite
|
||||
function show() {
|
||||
if ($(this).hasClass('selected')) {
|
||||
|
|
@ -36,7 +36,7 @@ $(document).ready(function () {
|
|||
|
||||
function showTableMetadata() {
|
||||
$(".metadata").load(
|
||||
'/dashed/table/' + database_id + '/' + $("#dbtable").val() + '/');
|
||||
'/caravel/table/' + database_id + '/' + $("#dbtable").val() + '/');
|
||||
}
|
||||
$("#dbtable").on("change", showTableMetadata);
|
||||
showTableMetadata();
|
||||
|
|
@ -46,7 +46,7 @@ $(document).ready(function () {
|
|||
$(".sqlcontent").show();
|
||||
|
||||
function selectStarOnClick() {
|
||||
$.ajax('/dashed/select_star/' + database_id + '/' + $("#dbtable").val() + '/')
|
||||
$.ajax('/caravel/select_star/' + database_id + '/' + $("#dbtable").val() + '/')
|
||||
.done(function (msg) {
|
||||
editor.setValue(msg);
|
||||
});
|
||||
|
|
@ -67,7 +67,7 @@ $(document).ready(function () {
|
|||
history.pushState({}, document.title, '?sql=' + encodeURIComponent(editor.getValue()));
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '/dashed/runsql/',
|
||||
url: '/caravel/runsql/',
|
||||
data: {
|
||||
data: JSON.stringify({
|
||||
database_id: $('#database_id').val(),
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
var $ = window.$ = require('jquery');
|
||||
var jQuery = window.jQuery = $;
|
||||
var px = require('./modules/dashed.js');
|
||||
var px = require('./modules/caravel.js');
|
||||
|
||||
require('bootstrap');
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
var $ = window.$ = require('jquery');
|
||||
var jQuery = window.jQuery = $;
|
||||
|
||||
require('../stylesheets/dashed.css');
|
||||
require('../stylesheets/caravel.css');
|
||||
require('../stylesheets/welcome.css');
|
||||
require('bootstrap');
|
||||
require('datatables');
|
||||
|
|
@ -37,7 +37,7 @@ $(document).ready(function () {
|
|||
cal.init({
|
||||
start: new Date().setFullYear(new Date().getFullYear() - 1),
|
||||
range: 13,
|
||||
data: '/dashed/activity_per_day',
|
||||
data: '/caravel/activity_per_day',
|
||||
domain: "month",
|
||||
subDomain: "day",
|
||||
itemName: "action",
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "dashed",
|
||||
"name": "caravel",
|
||||
"version": "0.1.0",
|
||||
"description": "Any database to any visualization",
|
||||
"directories": {
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/mistercrunch/dashed.git"
|
||||
"url": "git+https://github.com/mistercrunch/caravel.git"
|
||||
},
|
||||
"keywords": [
|
||||
"big",
|
||||
|
|
@ -31,9 +31,9 @@
|
|||
],
|
||||
"author": "Airbnb",
|
||||
"bugs": {
|
||||
"url": "https://github.com/mistercrunch/dashed/issues"
|
||||
"url": "https://github.com/mistercrunch/caravel/issues"
|
||||
},
|
||||
"homepage": "https://github.com/mistercrunch/dashed#readme",
|
||||
"homepage": "https://github.com/mistercrunch/caravel#readme",
|
||||
"dependencies": {
|
||||
"babel-loader": "^6.2.1",
|
||||
"babel-polyfill": "^6.3.14",
|
||||
|
|
@ -4,7 +4,7 @@ var d3 = window.d3 || require('d3');
|
|||
// CSS
|
||||
require('./big_number.css');
|
||||
|
||||
var px = require('../javascripts/modules/dashed.js');
|
||||
var px = require('../javascripts/modules/caravel.js');
|
||||
|
||||
function bigNumberVis(slice) {
|
||||
var div = d3.select(slice.selector);
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
.select2-highlighted > .filter_box {
|
||||
background-color: transparent;
|
||||
border: 1px dashed black;
|
||||
border: 1px caravel black;
|
||||
}
|
||||
|
||||
.dashboard .filter_box .slice_container > div {
|
||||
|
|
@ -5,7 +5,7 @@ var d3 = window.d3 || require('d3');
|
|||
|
||||
// CSS
|
||||
require('./filter_box.css');
|
||||
require('../javascripts/dashed-select2.js');
|
||||
require('../javascripts/caravel-select2.js');
|
||||
|
||||
function filterBox(slice) {
|
||||
var filtersObj = {};
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
// JS
|
||||
var $ = window.$ || require('jquery');
|
||||
var px = window.px || require('../javascripts/modules/dashed.js');
|
||||
var px = window.px || require('../javascripts/modules/caravel.js');
|
||||
var d3 = require('d3');
|
||||
|
||||
d3.tip = require('d3-tip'); //using window.d3 doesn't capture events properly bc of multiple instances
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
g.dashed path {
|
||||
g.caravel path {
|
||||
stroke-dasharray: 5, 5;
|
||||
}
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
// JS
|
||||
var $ = window.$ || require('jquery');
|
||||
var d3 = window.d3 || require('d3');
|
||||
var px = window.px || require('../javascripts/modules/dashed.js');
|
||||
var px = window.px || require('../javascripts/modules/caravel.js');
|
||||
var nv = require('nvd3');
|
||||
|
||||
// CSS
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
// CSS
|
||||
require('./sankey.css');
|
||||
// JS
|
||||
var px = window.px || require('../javascripts/modules/dashed.js');
|
||||
var px = window.px || require('../javascripts/modules/caravel.js');
|
||||
var d3 = window.d3 || require('d3');
|
||||
d3.sankey = require('d3-sankey').sankey;
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
var d3 = window.d3 || require('d3');
|
||||
var px = require('../javascripts/modules/dashed.js');
|
||||
var px = require('../javascripts/modules/caravel.js');
|
||||
var wrapSvgText = require('../javascripts/modules/utils.js').wrapSvgText;
|
||||
|
||||
require('./sunburst.css');
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
var px = window.px || require('../javascripts/modules/dashed.js');
|
||||
var px = window.px || require('../javascripts/modules/caravel.js');
|
||||
var d3 = window.d3 || require('d3');
|
||||
var cloudLayout = require('d3-cloud');
|
||||
|
||||
|
|
@ -5,11 +5,11 @@ import logging
|
|||
from subprocess import Popen
|
||||
|
||||
from flask.ext.script import Manager
|
||||
from dashed import app
|
||||
from caravel import app
|
||||
from flask.ext.migrate import MigrateCommand
|
||||
import dashed
|
||||
from dashed import db
|
||||
from dashed import data, utils
|
||||
import caravel
|
||||
from caravel import db
|
||||
from caravel import data, utils
|
||||
|
||||
config = app.config
|
||||
|
||||
|
|
@ -21,16 +21,16 @@ manager.add_command('db', MigrateCommand)
|
|||
'-d', '--debug', action='store_true',
|
||||
help="Start the web server in debug mode")
|
||||
@manager.option(
|
||||
'-p', '--port', default=config.get("DASHED_WEBSERVER_PORT"),
|
||||
'-p', '--port', default=config.get("CARAVEL_WEBSERVER_PORT"),
|
||||
help="Specify the port on which to run the web server")
|
||||
@manager.option(
|
||||
'-w', '--workers', default=config.get("DASHED_WORKERS", 16),
|
||||
'-w', '--workers', default=config.get("CARAVEL_WORKERS", 16),
|
||||
help="Number of gunicorn web server workers to fire up")
|
||||
@manager.option(
|
||||
'-t', '--timeout', default=config.get("DASHED_WEBSERVER_TIMEOUT"),
|
||||
'-t', '--timeout', default=config.get("CARAVEL_WEBSERVER_TIMEOUT"),
|
||||
help="Specify the timeout (seconds) for the gunicorn web server")
|
||||
def runserver(debug, port, timeout, workers):
|
||||
"""Starts a Dashed web server"""
|
||||
"""Starts a Caravel web server"""
|
||||
debug = debug or config.get("DEBUG")
|
||||
if debug:
|
||||
app.run(
|
||||
|
|
@ -43,14 +43,14 @@ def runserver(debug, port, timeout, workers):
|
|||
"-w {workers} "
|
||||
"--timeout {timeout} "
|
||||
"-b 0.0.0.0:{port} "
|
||||
"dashed:app").format(**locals())
|
||||
"caravel:app").format(**locals())
|
||||
print("Starting server with command: " + cmd)
|
||||
Popen(cmd, shell=True).wait()
|
||||
|
||||
@manager.command
|
||||
def init():
|
||||
"""Inits the Dashed application"""
|
||||
utils.init(dashed)
|
||||
"""Inits the Caravel application"""
|
||||
utils.init(caravel)
|
||||
|
||||
@manager.option(
|
||||
'-s', '--sample', action='store_true',
|
||||
|
|
@ -74,7 +74,7 @@ def load_examples(sample):
|
|||
def refresh_druid():
|
||||
"""Refresh all druid datasources"""
|
||||
session = db.session()
|
||||
from dashed import models
|
||||
from caravel import models
|
||||
for cluster in session.query(models.DruidCluster).all():
|
||||
try:
|
||||
cluster.refresh_datasources()
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
"""The main config file for Dashed
|
||||
"""The main config file for Caravel
|
||||
|
||||
All configuration in this file can be overridden by providing a local_config
|
||||
in your PYTHONPATH as there is a ``from local_config import *``
|
||||
|
|
@ -12,13 +12,13 @@ BASE_DIR = os.path.abspath(os.path.dirname(__file__))
|
|||
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# Dashed specifix config
|
||||
# Caravel specifix config
|
||||
# ---------------------------------------------------------
|
||||
ROW_LIMIT = 50000
|
||||
WEBSERVER_THREADS = 8
|
||||
|
||||
DASHED_WEBSERVER_PORT = 8088
|
||||
DASHED_WEBSERVER_TIMEOUT = 60
|
||||
CARAVEL_WEBSERVER_PORT = 8088
|
||||
CARAVEL_WEBSERVER_TIMEOUT = 60
|
||||
|
||||
CUSTOM_SECURITY_MANAGER = None
|
||||
# ---------------------------------------------------------
|
||||
|
|
@ -27,7 +27,7 @@ CUSTOM_SECURITY_MANAGER = None
|
|||
SECRET_KEY = '\2\1thisismyscretkey\1\2\e\y\y\h' # noqa
|
||||
|
||||
# The SQLAlchemy connection string.
|
||||
SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/dashed.db'
|
||||
SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/caravel.db'
|
||||
# SQLALCHEMY_DATABASE_URI = 'mysql://myapp@localhost/myapp'
|
||||
# SQLALCHEMY_DATABASE_URI = 'postgresql://root:password@localhost/myapp'
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ SHOW_STACKTRACE = True
|
|||
# GLOBALS FOR APP Builder
|
||||
# ------------------------------
|
||||
# Uncomment to setup Your App name
|
||||
APP_NAME = "Dashed"
|
||||
APP_NAME = "Caravel"
|
||||
|
||||
# Uncomment to setup Setup an App icon
|
||||
# APP_ICON = "/static/img/something.png"
|
||||
|
|
@ -116,6 +116,6 @@ CACHE_DEFAULT_TIMEOUT = None
|
|||
CACHE_CONFIG = {'CACHE_TYPE': 'null'}
|
||||
|
||||
try:
|
||||
from dashed_config import * # noqa
|
||||
from caravel_config import * # noqa
|
||||
except Exception:
|
||||
pass
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
"""Loads datasets, dashboards and slices in a new dashed instance"""
|
||||
"""Loads datasets, dashboards and slices in a new caravel instance"""
|
||||
|
||||
import gzip
|
||||
import json
|
||||
|
|
@ -8,7 +8,7 @@ import textwrap
|
|||
import pandas as pd
|
||||
from sqlalchemy import String, DateTime, Float
|
||||
|
||||
from dashed import app, db, models, utils
|
||||
from caravel import app, db, models, utils
|
||||
|
||||
# Shortcuts
|
||||
DB = models.Database
|
||||
|
|
@ -5,7 +5,7 @@ from wtforms import (
|
|||
BooleanField, IntegerField, HiddenField)
|
||||
from wtforms import validators, widgets
|
||||
from copy import copy
|
||||
from dashed import app
|
||||
from caravel import app
|
||||
from collections import OrderedDict
|
||||
config = app.config
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ class FreeFormSelectField(SelectField):
|
|||
|
||||
class OmgWtForm(Form):
|
||||
|
||||
"""Dashedification of the WTForm Form object"""
|
||||
"""Caravelification of the WTForm Form object"""
|
||||
|
||||
fieldsets = {}
|
||||
css_classes = dict()
|
||||
|
|
@ -101,13 +101,13 @@ class FormFactory(object):
|
|||
|
||||
def __init__(self, viz):
|
||||
self.viz = viz
|
||||
from dashed.viz import viz_types
|
||||
from caravel.viz import viz_types
|
||||
viz = self.viz
|
||||
datasource = viz.datasource
|
||||
default_metric = datasource.metrics_combo[0][0]
|
||||
default_groupby = datasource.groupby_column_names[0]
|
||||
group_by_choices = [(s, s) for s in datasource.groupby_column_names]
|
||||
# Pool of all the fields that can be used in Dashed
|
||||
# Pool of all the fields that can be used in Caravel
|
||||
self.field_dict = {
|
||||
'viz_type': SelectField(
|
||||
'Viz',
|
||||
|
|
@ -180,7 +180,7 @@ class FormFactory(object):
|
|||
('cca3', 'code ISO 3166-1 alpha-3 (cca3)'),
|
||||
),
|
||||
description=(
|
||||
"The country code standard that Dashed should expect "
|
||||
"The country code standard that Caravel should expect "
|
||||
"to find in the [country] column")),
|
||||
'groupby': SelectMultipleSortableField(
|
||||
'Group by',
|
||||
|
|
@ -581,7 +581,7 @@ class FormFactory(object):
|
|||
"applies a date transformation to alter "
|
||||
"your time column and defines a new time granularity."
|
||||
"The options here are defined on a per database "
|
||||
"engine basis in the Dashed source code"))
|
||||
"engine basis in the Caravel source code"))
|
||||
add_to_form(time_fields)
|
||||
field_css_classes['time_grain_sqla'] = ['form-control', 'select2']
|
||||
field_css_classes['granularity_sqla'] = ['form-control', 'select2']
|
||||