Skip to content

Commit

Permalink
[AIRFLOW-6] Remove dependency on Highcharts
Browse files Browse the repository at this point in the history
Highcharts' license is not compatible with the Apache 2.0
license. This patch removes Highcharts in favor of d3,
however some charts are not supported anymore.

* This brings Maxime Beauchemin's work to master
  • Loading branch information
bolkedebruin committed Jun 20, 2016
1 parent d243c00 commit 0a46008
Show file tree
Hide file tree
Showing 27 changed files with 18,153 additions and 764 deletions.
2,347 changes: 2,347 additions & 0 deletions `

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions airflow/bin/airflow
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import logging
import os
from airflow import configuration
Expand Down
14 changes: 14 additions & 0 deletions airflow/executors/base_executor.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from builtins import range

from airflow import configuration
Expand Down
14 changes: 14 additions & 0 deletions airflow/executors/celery_executor.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from builtins import object
import logging
import subprocess
Expand Down
2 changes: 1 addition & 1 deletion airflow/hooks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.


# Only import Core Airflow Operators that don't have extra requirements.
# All other operators must be imported directly.
from .base_hook import BaseHook
Expand All @@ -34,6 +33,7 @@
# Imports the hooks dynamically while keeping the package API clean,
# abstracting the underlying modules


from airflow.utils.helpers import import_module_attrs as _import_module_attrs
from airflow.hooks.base_hook import BaseHook # noqa to expose in package

Expand Down
1 change: 0 additions & 1 deletion airflow/hooks/dbapi_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from builtins import str
from past.builtins import basestring
from datetime import datetime
Expand Down
3 changes: 1 addition & 2 deletions airflow/hooks/jdbc_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@
# limitations under the License.

from builtins import str
__author__ = 'janomar'

import logging
import jaydebeapi

from airflow.hooks.dbapi_hook import DbApiHook


class JdbcHook(DbApiHook):
"""
General hook for jdbc db access.
Expand Down
1 change: 1 addition & 0 deletions airflow/hooks/oracle_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import numpy
import logging


class OracleHook(DbApiHook):
"""
Interact with Oracle SQL.
Expand Down
4 changes: 1 addition & 3 deletions airflow/www/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from airflow import models
from airflow.settings import Session

from airflow.www.blueprints import ck, routes
from airflow.www.blueprints import routes
from airflow import jobs
from airflow import settings
from airflow import configuration
Expand All @@ -45,9 +45,7 @@ def create_app(config=None):
cache = Cache(
app=app, config={'CACHE_TYPE': 'filesystem', 'CACHE_DIR': '/tmp'})

app.register_blueprint(ck, url_prefix='/ck')
app.register_blueprint(routes)
app.jinja_env.add_extension("chartkick.ext.charts")

with app.app_context():
from airflow.www import views
Expand Down
6 changes: 0 additions & 6 deletions airflow/www/blueprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,8 @@
from flask import (
url_for, Markup, Blueprint, redirect,
)
import chartkick
import markdown

# Init for chartkick, the python wrapper for highcharts
ck = Blueprint(
'ck_page', __name__,
static_folder=chartkick.js(), static_url_path='/static')

routes = Blueprint('routes', __name__)


Expand Down
Loading

0 comments on commit 0a46008

Please sign in to comment.