Skip to content

Commit

Permalink
rm superset-select2.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Feb 16, 2017
1 parent e96d2a6 commit aadfdd5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
3 changes: 0 additions & 3 deletions superset/assets/javascripts/superset-select2.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@

from alembic import op
import json
from urllib import quote_plus, parse
import sqlalchemy as sa
from superset import db
from superset.legacy import cast_form_data
from sqlalchemy.ext.declarative import declarative_base
from future.standard_library import install_aliases
install_aliases()
from urllib import parse

Base = declarative_base()

Expand Down Expand Up @@ -57,7 +57,7 @@ def upgrade():
split = url.url.split('/')
d['datasource'] = split[5] + '__' + split[4]
d = cast_form_data(d)
newurl = '/'.join(split[:-1]) + '/?form_data=' + quote_plus(json.dumps(d))
newurl = '/'.join(split[:-1]) + '/?form_data=' + parse.quote_plus(json.dumps(d))
url.url = newurl
session.merge(url)
session.commit()
Expand Down
10 changes: 6 additions & 4 deletions superset/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
import pickle
import re
import textwrap
import urllib
from future.standard_library import install_aliases
install_aliases()
from urllib import parse
from copy import deepcopy, copy
from datetime import timedelta, datetime, date

Expand All @@ -24,7 +26,7 @@
from sqlalchemy.orm import subqueryload

import sqlparse
from dateutil.parser import parse
from dateutil.parser import parse as dparse

from flask import escape, g, Markup, request
from flask_appbuilder import Model
Expand Down Expand Up @@ -338,7 +340,7 @@ def slice_url(self):
return (
"/superset/explore/{obj.datasource_type}/"
"{obj.datasource_id}/?form_data={params}".format(
obj=self, params=urllib.quote(json.dumps(self.form_data))))
obj=self, params=parse.quote(json.dumps(self.form_data))))

@property
def slice_id_url(self):
Expand Down Expand Up @@ -2055,7 +2057,7 @@ def latest_metadata(self):
if not results:
return
max_time = results[0]['result']['maxTime']
max_time = parse(max_time)
max_time = dparse(max_time)
# Query segmentMetadata for 7 days back. However, due to a bug,
# we need to set this interval to more than 1 day ago to exclude
# realtime segments, which triggered a bug (fixed in druid 0.8.2).
Expand Down

0 comments on commit aadfdd5

Please sign in to comment.