diff options
author | swills <swills@FreeBSD.org> | 2016-02-07 09:55:37 +0800 |
---|---|---|
committer | swills <swills@FreeBSD.org> | 2016-02-07 09:55:37 +0800 |
commit | 4a9392e4e8758e3c9070107e77d618d520c4f0b9 (patch) | |
tree | d4351ef72c21051466731c2de9c9323a0117bdf6 | |
parent | c569e396977faafda21b62f511c97277d038f42a (diff) | |
download | freebsd-ports-gnome-4a9392e4e8758e3c9070107e77d618d520c4f0b9.tar.gz freebsd-ports-gnome-4a9392e4e8758e3c9070107e77d618d520c4f0b9.tar.zst freebsd-ports-gnome-4a9392e4e8758e3c9070107e77d618d520c4f0b9.zip |
www/py-graphite-web: update to 0.9.15
PR: 206534
Submitted by: Michael Zhilin <mizhka@gmail.com>
28 files changed, 61 insertions, 548 deletions
diff --git a/www/py-graphite-web/Makefile b/www/py-graphite-web/Makefile index 8f8f0944c6d5..11426c564b47 100644 --- a/www/py-graphite-web/Makefile +++ b/www/py-graphite-web/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= graphite-web -PORTVERSION= 0.9.12 -PORTREVISION= 3 +PORTVERSION= 0.9.15 CATEGORIES= www python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -16,6 +15,7 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cairo>=1.8.10:${PORTSDIR}/graphics/py-cairo ${PYTHON_PKGNAMEPREFIX}carbon>=${PORTVERSION}:${PORTSDIR}/databases/py-carbon \ ${PYTHON_PKGNAMEPREFIX}django18>=1.4:${PORTSDIR}/www/py-django18 \ ${PYTHON_PKGNAMEPREFIX}django-tagging>=0.3.1:${PORTSDIR}/www/py-django-tagging \ + ${PYTHON_PKGNAMEPREFIX}pytz>0:${PORTSDIR}/devel/py-pytz \ xorg-fonts-truetype>=0:${PORTSDIR}/x11-fonts/xorg-fonts-truetype FETCH_ARGS= -o ${DISTNAME}${EXTRACT_SUFX} diff --git a/www/py-graphite-web/distinfo b/www/py-graphite-web/distinfo index f231a5217ae9..a29a444f417e 100644 --- a/www/py-graphite-web/distinfo +++ b/www/py-graphite-web/distinfo @@ -1,2 +1,2 @@ -SHA256 (graphite-project-graphite-web-0.9.12_GH0.tar.gz) = 03a4403fdb36e5707d3dbd6a71d9be1e80b1adbbe49e3e0989a15829d02f23d2 -SIZE (graphite-project-graphite-web-0.9.12_GH0.tar.gz) = 2334147 +SHA256 (graphite-project-graphite-web-0.9.15_GH0.tar.gz) = 75c53e9de089738280f1ed1084b6b4df79b9f94cb99a20c479645046c80ca677 +SIZE (graphite-project-graphite-web-0.9.15_GH0.tar.gz) = 2434438 diff --git a/www/py-graphite-web/files/patch-conf__graphite.wsgi.example b/www/py-graphite-web/files/patch-conf__graphite.wsgi.example index 6ddea150fd81..ea9d4e85bdbe 100644 --- a/www/py-graphite-web/files/patch-conf__graphite.wsgi.example +++ b/www/py-graphite-web/files/patch-conf__graphite.wsgi.example @@ -1,14 +1,10 @@ ---- conf/graphite.wsgi.example.orig 2013-08-21 17:11:04.000000000 +0000 -+++ conf/graphite.wsgi.example 2014-09-14 03:30:45.456594225 +0000 -@@ -1,8 +1,10 @@ - import os, sys +--- conf/graphite.wsgi.example.orig 2015-11-27 18:37:16 UTC ++++ conf/graphite.wsgi.example +@@ -1,6 +1,6 @@ + import os + import sys -sys.path.append('/opt/graphite/webapp') +sys.path.append('%%PREFIX%%/graphite/webapp') - os.environ['DJANGO_SETTINGS_MODULE'] = 'graphite.settings' - -+import django - import django.core.handlers.wsgi -+django.setup() - - application = django.core.handlers.wsgi.WSGIHandler() + try: + from importlib import import_module diff --git a/www/py-graphite-web/files/patch-setup.cfg b/www/py-graphite-web/files/patch-setup.cfg deleted file mode 100644 index 31f99fde30bb..000000000000 --- a/www/py-graphite-web/files/patch-setup.cfg +++ /dev/null @@ -1,9 +0,0 @@ ---- ./setup.cfg.orig 2013-08-21 17:11:04.000000000 +0000 -+++ ./setup.cfg 2014-02-12 20:50:27.345399259 +0000 -@@ -1,6 +1,4 @@ - [install] --prefix = /opt/graphite --install-lib = %(prefix)s/webapp - - [bdist_rpm] - requires = Django => 1.1.4 diff --git a/www/py-graphite-web/files/patch-setup.py b/www/py-graphite-web/files/patch-setup.py index 6a50288ce47b..bbb276c33b3f 100644 --- a/www/py-graphite-web/files/patch-setup.py +++ b/www/py-graphite-web/files/patch-setup.py @@ -1,6 +1,15 @@ ---- setup.py.orig 2013-08-21 17:11:04.000000000 +0000 -+++ setup.py 2014-02-14 04:44:44.290189349 +0000 -@@ -15,11 +15,11 @@ +--- setup.py.orig 2015-11-27 18:37:16 UTC ++++ setup.py +@@ -23,8 +23,6 @@ else: + cf.add_section('install') + except ConfigParser.DuplicateSectionError: + pass +- cf.set('install', 'prefix', '/opt/graphite') +- cf.set('install', 'install-lib', '%(prefix)s/webapp') + + with open('setup.cfg', 'wb') as f: + cf.write(f) +@@ -41,11 +39,11 @@ else: storage_dirs = [] for subdir in ('whisper', 'rrd', 'log', 'log/webapp'): @@ -14,20 +23,21 @@ for filename in files: filepath = os.path.join(root, filename) -@@ -29,7 +29,7 @@ +@@ -55,7 +53,7 @@ for root, dirs, files in os.walk('webapp webapp_content[root].append(filepath) -conf_files = [ ('conf', glob('conf/*.example')) ] -+conf_files = [ ('/usr/local/etc/graphite', glob('conf/*.example')) ] ++conf_files = [ ('%%PREFIX%%/etc/graphite', glob('conf/*.example')) ] examples = [ ('examples', glob('examples/example-*')) ] - setup( -@@ -60,6 +60,6 @@ - package_data={'graphite' : - ['templates/*', 'local_settings.py.example']}, - scripts=glob('bin/*'), -- data_files=webapp_content.items() + storage_dirs + conf_files + examples, -+ data_files=conf_files, - **setup_kwargs - ) + try: +@@ -87,7 +85,7 @@ try: + package_data={'graphite' : + ['templates/*', 'local_settings.py.example']}, + scripts=glob('bin/*'), +- data_files=webapp_content.items() + storage_dirs + conf_files + examples, ++ data_files=conf_files, + **setup_kwargs + ) + finally: diff --git a/www/py-graphite-web/files/patch-webapp__graphite__account__urls.py b/www/py-graphite-web/files/patch-webapp__graphite__account__urls.py deleted file mode 100644 index 28fe65b65e82..000000000000 --- a/www/py-graphite-web/files/patch-webapp__graphite__account__urls.py +++ /dev/null @@ -1,11 +0,0 @@ ---- ./webapp/graphite/account/urls.py.orig 2013-08-21 17:11:04.000000000 +0000 -+++ ./webapp/graphite/account/urls.py 2014-02-13 02:01:59.480110302 +0000 -@@ -12,7 +12,7 @@ - See the License for the specific language governing permissions and - limitations under the License.""" - --from django.conf.urls.defaults import * -+from django.conf.urls import * - - urlpatterns = patterns('graphite.account.views', - ('^login/?$', 'loginView'), diff --git a/www/py-graphite-web/files/patch-webapp__graphite__browser__urls.py b/www/py-graphite-web/files/patch-webapp__graphite__browser__urls.py deleted file mode 100644 index b60079e97805..000000000000 --- a/www/py-graphite-web/files/patch-webapp__graphite__browser__urls.py +++ /dev/null @@ -1,11 +0,0 @@ ---- ./webapp/graphite/browser/urls.py.orig 2013-08-21 17:11:04.000000000 +0000 -+++ ./webapp/graphite/browser/urls.py 2014-02-13 02:01:59.481111098 +0000 -@@ -12,7 +12,7 @@ - See the License for the specific language governing permissions and - limitations under the License.""" - --from django.conf.urls.defaults import * -+from django.conf.urls import * - - urlpatterns = patterns('graphite.browser.views', - ('^header/?$', 'header'), diff --git a/www/py-graphite-web/files/patch-webapp__graphite__browser__views.py b/www/py-graphite-web/files/patch-webapp__graphite__browser__views.py deleted file mode 100644 index b164962536fa..000000000000 --- a/www/py-graphite-web/files/patch-webapp__graphite__browser__views.py +++ /dev/null @@ -1,23 +0,0 @@ ---- webapp/graphite/browser/views.py.orig 2014-09-14 03:00:52 UTC -+++ webapp/graphite/browser/views.py -@@ -77,7 +77,7 @@ - - index_file.close() - result_string = ','.join(results) -- return HttpResponse(result_string, mimetype='text/plain') -+ return HttpResponse(result_string, content_type='text/plain') - - - def myGraphLookup(request): -@@ -254,9 +254,9 @@ - #json = str(nodes) #poor man's json encoder for simple types - json_data = json.dumps(nodes) - if jsonp: -- response = HttpResponse("%s(%s)" % (jsonp, json_data),mimetype="text/javascript") -+ response = HttpResponse("%s(%s)" % (jsonp, json_data),content_type="text/javascript") - else: -- response = HttpResponse(json_data,mimetype="application/json") -+ response = HttpResponse(json_data,content_type="application/json") - response['Pragma'] = 'no-cache' - response['Cache-Control'] = 'no-cache' - return response diff --git a/www/py-graphite-web/files/patch-webapp__graphite__cli__urls.py b/www/py-graphite-web/files/patch-webapp__graphite__cli__urls.py deleted file mode 100644 index df64f94962af..000000000000 --- a/www/py-graphite-web/files/patch-webapp__graphite__cli__urls.py +++ /dev/null @@ -1,11 +0,0 @@ ---- ./webapp/graphite/cli/urls.py.orig 2013-08-21 17:11:04.000000000 +0000 -+++ ./webapp/graphite/cli/urls.py 2014-02-13 02:01:59.481111098 +0000 -@@ -12,7 +12,7 @@ - See the License for the specific language governing permissions and - limitations under the License.""" - --from django.conf.urls.defaults import * -+from django.conf.urls import * - - urlpatterns = patterns('graphite.cli.views', - (r'^autocomplete/?$', 'autocomplete'), diff --git a/www/py-graphite-web/files/patch-webapp__graphite__cli__views.py b/www/py-graphite-web/files/patch-webapp__graphite__cli__views.py deleted file mode 100644 index 5811e7863654..000000000000 --- a/www/py-graphite-web/files/patch-webapp__graphite__cli__views.py +++ /dev/null @@ -1,42 +0,0 @@ ---- webapp/graphite/cli/views.py.orig 2014-09-14 03:00:52 UTC -+++ webapp/graphite/cli/views.py -@@ -40,7 +40,7 @@ - def evaluate(request): - if 'commandInput' not in request.GET: - output = commands.stderr("No commandInput parameter!") -- return HttpResponse(output, mimetype='text/plain') -+ return HttpResponse(output, content_type='text/plain') - - #Variable substitution - profile = getProfile(request) -@@ -59,7 +59,7 @@ - cmd = cmd[:i] + my_vars[var] + cmd[j:] - else: - output = commands.stderr("Unknown variable %s" % var) -- return HttpResponse(output, mimetype='text/plain') -+ return HttpResponse(output, content_type='text/plain') - - if cmd == '?': cmd = 'help' - -@@ -68,13 +68,13 @@ - - if not tokens.command: - output = commands.stderr("Invalid syntax") -- return HttpResponse(output, mimetype='text/plain') -+ return HttpResponse(output, content_type='text/plain') - - handler_name = '_' + tokens.command - handler = vars(commands).get(handler_name) - if handler is None: - output = commands.stderr("Unknown command") -- return HttpResponse(output, mimetype='text/plain') -+ return HttpResponse(output, content_type='text/plain') - - args = dict( tokens.items() ) - del args['command'] -@@ -89,4 +89,4 @@ - profile.history = '\n'.join(history) - profile.save() - -- return HttpResponse(output, mimetype='text/plain') -+ return HttpResponse(output, content_type='text/plain') diff --git a/www/py-graphite-web/files/patch-webapp__graphite__composer__urls.py b/www/py-graphite-web/files/patch-webapp__graphite__composer__urls.py deleted file mode 100644 index 7b545872e5e1..000000000000 --- a/www/py-graphite-web/files/patch-webapp__graphite__composer__urls.py +++ /dev/null @@ -1,11 +0,0 @@ ---- ./webapp/graphite/composer/urls.py.orig 2013-08-21 17:11:04.000000000 +0000 -+++ ./webapp/graphite/composer/urls.py 2014-02-13 02:01:59.481111098 +0000 -@@ -12,7 +12,7 @@ - See the License for the specific language governing permissions and - limitations under the License.""" - --from django.conf.urls.defaults import * -+from django.conf.urls import * - - urlpatterns = patterns('graphite.composer.views', - ('send_email','send_email'), diff --git a/www/py-graphite-web/files/patch-webapp__graphite__dashboard__urls.py b/www/py-graphite-web/files/patch-webapp__graphite__dashboard__urls.py deleted file mode 100644 index c3af35b8de71..000000000000 --- a/www/py-graphite-web/files/patch-webapp__graphite__dashboard__urls.py +++ /dev/null @@ -1,8 +0,0 @@ ---- ./webapp/graphite/dashboard/urls.py.orig 2013-08-21 17:11:04.000000000 +0000 -+++ ./webapp/graphite/dashboard/urls.py 2014-02-13 02:01:59.482110196 +0000 -@@ -1,4 +1,4 @@ --from django.conf.urls.defaults import * -+from django.conf.urls import * - - urlpatterns = patterns('graphite.dashboard.views', - ('^save/(?P<name>[^/]+)', 'save'), diff --git a/www/py-graphite-web/files/patch-webapp__graphite__dashboard__views.py b/www/py-graphite-web/files/patch-webapp__graphite__dashboard__views.py deleted file mode 100644 index 04dae9a023dc..000000000000 --- a/www/py-graphite-web/files/patch-webapp__graphite__dashboard__views.py +++ /dev/null @@ -1,8 +0,0 @@ ---- webapp/graphite/dashboard/views.py.orig 2014-09-14 03:00:52 UTC -+++ webapp/graphite/dashboard/views.py -@@ -249,4 +249,4 @@ - - - def json_response(obj): -- return HttpResponse(mimetype='application/json', content=json.dumps(obj)) -+ return HttpResponse(content_type='application/json', content=json.dumps(obj)) diff --git a/www/py-graphite-web/files/patch-webapp__graphite__events__urls.py b/www/py-graphite-web/files/patch-webapp__graphite__events__urls.py deleted file mode 100644 index adb732a64e8e..000000000000 --- a/www/py-graphite-web/files/patch-webapp__graphite__events__urls.py +++ /dev/null @@ -1,11 +0,0 @@ ---- ./webapp/graphite/events/urls.py.orig 2013-08-21 17:11:04.000000000 +0000 -+++ ./webapp/graphite/events/urls.py 2014-02-13 02:01:59.482110196 +0000 -@@ -12,7 +12,7 @@ - See the License for the specific language governing permissions and - limitations under the License.""" - --from django.conf.urls.defaults import * -+from django.conf.urls import * - - urlpatterns = patterns('graphite.events.views', - ('^get_data?$', 'get_data'), diff --git a/www/py-graphite-web/files/patch-webapp__graphite__events__views.py b/www/py-graphite-web/files/patch-webapp__graphite__events__views.py deleted file mode 100644 index 23896dad31c4..000000000000 --- a/www/py-graphite-web/files/patch-webapp__graphite__events__views.py +++ /dev/null @@ -1,16 +0,0 @@ ---- webapp/graphite/events/views.py.orig 2014-09-14 03:00:52 UTC -+++ webapp/graphite/events/views.py -@@ -65,11 +65,11 @@ - response = HttpResponse( - "%s(%s)" % (request.REQUEST.get('jsonp'), - json.dumps(fetch(request), cls=EventEncoder)), -- mimetype='text/javascript') -+ content_type='text/javascript') - else: - response = HttpResponse( - json.dumps(fetch(request), cls=EventEncoder), -- mimetype="application/json") -+ content_type="application/json") - return response - - def fetch(request): diff --git a/www/py-graphite-web/files/patch-webapp__graphite__graphlot__urls.py b/www/py-graphite-web/files/patch-webapp__graphite__graphlot__urls.py deleted file mode 100644 index adfa48b4266a..000000000000 --- a/www/py-graphite-web/files/patch-webapp__graphite__graphlot__urls.py +++ /dev/null @@ -1,11 +0,0 @@ ---- ./webapp/graphite/graphlot/urls.py.orig 2013-08-21 17:11:04.000000000 +0000 -+++ ./webapp/graphite/graphlot/urls.py 2014-02-13 02:01:59.482110196 +0000 -@@ -12,7 +12,7 @@ - See the License for the specific language governing permissions and - limitations under the License.""" - --from django.conf.urls.defaults import * -+from django.conf.urls import * - - urlpatterns = patterns('graphite.graphlot.views', - ('^rawdata/?$', 'get_data'), diff --git a/www/py-graphite-web/files/patch-webapp__graphite__graphlot__views.py b/www/py-graphite-web/files/patch-webapp__graphite__graphlot__views.py deleted file mode 100644 index fd77002ce2eb..000000000000 --- a/www/py-graphite-web/files/patch-webapp__graphite__graphlot__views.py +++ /dev/null @@ -1,46 +0,0 @@ ---- webapp/graphite/graphlot/views.py.orig 2014-09-14 03:00:52 UTC -+++ webapp/graphite/graphlot/views.py -@@ -52,7 +52,7 @@ - ) for timeseries in seriesList ] - if not result: - raise Http404 -- return HttpResponse(json.dumps(result), mimetype="application/json") -+ return HttpResponse(json.dumps(result), content_type="application/json") - - - def find_metric(request): -@@ -61,11 +61,11 @@ - query = str( request.REQUEST['q'] ) - except: - return HttpResponseBadRequest( -- content="Missing required parameter 'q'", mimetype="text/plain") -+ content="Missing required parameter 'q'", content_type="text/plain") - - matches = list( STORE.find(query+"*") ) - content = "\n".join([node.metric_path for node in matches ]) -- response = HttpResponse(content, mimetype='text/plain') -+ response = HttpResponse(content, content_type='text/plain') - - return response - -@@ -118,7 +118,7 @@ - - index_file.close() - result_string = ','.join(results) -- return HttpResponse(result_string, mimetype='text/plain') -+ return HttpResponse(result_string, content_type='text/plain') - - - def myGraphLookup(request): -@@ -256,9 +256,9 @@ - jsonp = False - json_data = json.dumps(nodes) - if jsonp: -- response = HttpResponse("%s(%s)" % (jsonp, json_data),mimetype="text/javascript") -+ response = HttpResponse("%s(%s)" % (jsonp, json_data),content_type="text/javascript") - else: -- response = HttpResponse(json_data,mimetype="application/json") -+ response = HttpResponse(json_data,content_type="application/json") - response['Pragma'] = 'no-cache' - response['Cache-Control'] = 'no-cache' - return response diff --git a/www/py-graphite-web/files/patch-webapp__graphite__local_settings.py.example b/www/py-graphite-web/files/patch-webapp__graphite__local_settings.py.example index f7a2e01a2f5f..019273af97c4 100644 --- a/www/py-graphite-web/files/patch-webapp__graphite__local_settings.py.example +++ b/www/py-graphite-web/files/patch-webapp__graphite__local_settings.py.example @@ -1,12 +1,12 @@ ---- webapp/graphite/local_settings.py.example.orig 2013-08-21 17:11:04.000000000 +0000 -+++ webapp/graphite/local_settings.py.example 2014-02-14 05:02:05.550117395 +0000 +--- webapp/graphite/local_settings.py.example.orig 2015-11-27 18:37:16 UTC ++++ webapp/graphite/local_settings.py.example @@ -62,6 +62,9 @@ #CONF_DIR = '/opt/graphite/conf' #STORAGE_DIR = '/opt/graphite/storage' #CONTENT_DIR = '/opt/graphite/webapp/content' +CONF_DIR = '%%PREFIX%%/etc/graphite' +STORAGE_DIR = '/var/db/carbon' -+CONTENT_DIR = '%%DATADIR%%/content' ++CONTENT_DIR = '%%PREFIX%%/share/graphite-web/content' # To further or fully customize the paths, modify the following. Note that the # default settings for each of these are relative to CONF_DIR and STORAGE_DIR diff --git a/www/py-graphite-web/files/patch-webapp__graphite__metrics__urls.py b/www/py-graphite-web/files/patch-webapp__graphite__metrics__urls.py deleted file mode 100644 index a2a8932e7897..000000000000 --- a/www/py-graphite-web/files/patch-webapp__graphite__metrics__urls.py +++ /dev/null @@ -1,11 +0,0 @@ ---- ./webapp/graphite/metrics/urls.py.orig 2013-08-21 17:11:04.000000000 +0000 -+++ ./webapp/graphite/metrics/urls.py 2014-02-13 02:01:59.483113296 +0000 -@@ -12,7 +12,7 @@ - See the License for the specific language governing permissions and - limitations under the License.""" - --from django.conf.urls.defaults import * -+from django.conf.urls import * - - urlpatterns = patterns('graphite.metrics.views', - ('^index\.json$', 'index_json'), diff --git a/www/py-graphite-web/files/patch-webapp__graphite__metrics__views.py b/www/py-graphite-web/files/patch-webapp__graphite__metrics__views.py deleted file mode 100644 index c73f1c681021..000000000000 --- a/www/py-graphite-web/files/patch-webapp__graphite__metrics__views.py +++ /dev/null @@ -1,126 +0,0 @@ ---- webapp/graphite/metrics/views.py.orig 2014-09-14 03:00:52 UTC -+++ webapp/graphite/metrics/views.py -@@ -71,16 +71,16 @@ - for m in sorted(matches) - ] - if jsonp: -- return HttpResponse("%s(%s)" % (jsonp, json.dumps(matches)), mimetype='text/javascript') -+ return HttpResponse("%s(%s)" % (jsonp, json.dumps(matches)), content_type='text/javascript') - else: -- return HttpResponse(json.dumps(matches), mimetype='application/json') -+ return HttpResponse(json.dumps(matches), content_type='application/json') - - - def search_view(request): - try: - query = str( request.REQUEST['query'] ) - except: -- return HttpResponseBadRequest(content="Missing required parameter 'query'", mimetype="text/plain") -+ return HttpResponseBadRequest(content="Missing required parameter 'query'", content_type="text/plain") - search_request = { - 'query' : query, - 'max_results' : int( request.REQUEST.get('max_results', 25) ), -@@ -91,7 +91,7 @@ - - results = sorted(searcher.search(**search_request)) - result_data = json.dumps( dict(metrics=results) ) -- return HttpResponse(result_data, mimetype='application/json') -+ return HttpResponse(result_data, content_type='application/json') - - - def context_view(request): -@@ -99,7 +99,7 @@ - contexts = [] - - if not 'metric' not in request.GET: -- return HttpResponse('{ "error" : "missing required parameter \"metric\"" }', mimetype='application/json') -+ return HttpResponse('{ "error" : "missing required parameter \"metric\"" }', content_type='application/json') - - for metric in request.GET.getlist('metric'): - try: -@@ -110,19 +110,19 @@ - contexts.append({ 'metric' : metric, 'context' : context }) - - content = json.dumps( { 'contexts' : contexts } ) -- return HttpResponse(content, mimetype='application/json') -+ return HttpResponse(content, content_type='application/json') - - elif request.method == 'POST': - - if 'metric' not in request.POST: -- return HttpResponse('{ "error" : "missing required parameter \"metric\"" }', mimetype='application/json') -+ return HttpResponse('{ "error" : "missing required parameter \"metric\"" }', content_type='application/json') - - newContext = dict( item for item in request.POST.items() if item[0] != 'metric' ) - - for metric in request.POST.getlist('metric'): - STORE.get(metric).updateContext(newContext) - -- return HttpResponse('{ "success" : true }', mimetype='application/json') -+ return HttpResponse('{ "success" : true }', content_type='application/json') - - else: - return HttpResponseBadRequest("invalid method, must be GET or POST") -@@ -140,7 +140,7 @@ - try: - query = str( request.REQUEST['query'] ) - except: -- return HttpResponseBadRequest(content="Missing required parameter 'query'", mimetype="text/plain") -+ return HttpResponseBadRequest(content="Missing required parameter 'query'", content_type="text/plain") - - if '.' in query: - base_path = query.rsplit('.', 1)[0] + '.' -@@ -175,11 +175,11 @@ - - if format == 'treejson': - content = tree_json(matches, base_path, wildcards=profile.advancedUI or wildcards, contexts=contexts) -- response = HttpResponse(content, mimetype='application/json') -+ response = HttpResponse(content, content_type='application/json') - - elif format == 'pickle': - content = pickle_nodes(matches, contexts=contexts) -- response = HttpResponse(content, mimetype='application/pickle') -+ response = HttpResponse(content, content_type='application/pickle') - - elif format == 'completer': - #if len(matches) == 1 and (not matches[0].isLeaf()) and query == matches[0].metric_path + '*': # auto-complete children -@@ -196,10 +196,10 @@ - results.append(wildcardNode) - - content = json.dumps({ 'metrics' : results }) -- response = HttpResponse(content, mimetype='application/json') -+ response = HttpResponse(content, content_type='application/json') - - else: -- return HttpResponseBadRequest(content="Invalid value for 'format' parameter", mimetype="text/plain") -+ return HttpResponseBadRequest(content="Invalid value for 'format' parameter", content_type="text/plain") - - response['Pragma'] = 'no-cache' - response['Cache-Control'] = 'no-cache' -@@ -235,7 +235,7 @@ - 'results' : results - } - -- response = HttpResponse(json.dumps(result), mimetype='application/json') -+ response = HttpResponse(json.dumps(result), content_type='application/json') - response['Pragma'] = 'no-cache' - response['Cache-Control'] = 'no-cache' - return response -@@ -252,7 +252,7 @@ - log.exception() - results[metric] = dict(error="Unexpected error occurred in CarbonLink.get_metadata(%s, %s)" % (metric, key)) - -- return HttpResponse(json.dumps(results), mimetype='application/json') -+ return HttpResponse(json.dumps(results), content_type='application/json') - - - def set_metadata_view(request): -@@ -287,7 +287,7 @@ - else: - results = dict(error="Invalid request method") - -- return HttpResponse(json.dumps(results), mimetype='application/json') -+ return HttpResponse(json.dumps(results), content_type='application/json') - - - def tree_json(nodes, base_path, wildcards=False, contexts=False): diff --git a/www/py-graphite-web/files/patch-webapp__graphite__render__urls.py b/www/py-graphite-web/files/patch-webapp__graphite__render__urls.py deleted file mode 100644 index 8a34a167408b..000000000000 --- a/www/py-graphite-web/files/patch-webapp__graphite__render__urls.py +++ /dev/null @@ -1,11 +0,0 @@ ---- ./webapp/graphite/render/urls.py.orig 2013-08-21 17:11:04.000000000 +0000 -+++ ./webapp/graphite/render/urls.py 2014-02-13 02:01:59.483113296 +0000 -@@ -12,7 +12,7 @@ - See the License for the specific language governing permissions and - limitations under the License.""" - --from django.conf.urls.defaults import * -+from django.conf.urls import * - - urlpatterns = patterns('graphite.render.views', - ('local/?$','renderLocalView'), diff --git a/www/py-graphite-web/files/patch-webapp__graphite__render__views.py b/www/py-graphite-web/files/patch-webapp__graphite__render__views.py deleted file mode 100644 index 3cf698c8cdef..000000000000 --- a/www/py-graphite-web/files/patch-webapp__graphite__render__views.py +++ /dev/null @@ -1,58 +0,0 @@ ---- webapp/graphite/render/views.py.orig 2013-08-21 17:11:04.000000000 +0000 -+++ webapp/graphite/render/views.py 2014-09-14 03:52:01.676505998 +0000 -@@ -116,7 +116,7 @@ - - format = requestOptions.get('format') - if format == 'csv': -- response = HttpResponse(mimetype='text/csv') -+ response = HttpResponse(content_type='text/csv') - writer = csv.writer(response, dialect='excel') - - for series in data: -@@ -136,16 +136,16 @@ - if 'jsonp' in requestOptions: - response = HttpResponse( - content="%s(%s)" % (requestOptions['jsonp'], json.dumps(series_data)), -- mimetype='text/javascript') -+ content_type='text/javascript') - else: -- response = HttpResponse(content=json.dumps(series_data), mimetype='application/json') -+ response = HttpResponse(content=json.dumps(series_data), content_type='application/json') - - response['Pragma'] = 'no-cache' - response['Cache-Control'] = 'no-cache' - return response - - if format == 'raw': -- response = HttpResponse(mimetype='text/plain') -+ response = HttpResponse(content_type='text/plain') - for series in data: - response.write( "%s,%d,%d,%d|" % (series.name, series.start, series.end, series.step) ) - response.write( ','.join(map(str,series)) ) -@@ -158,7 +158,7 @@ - graphOptions['outputFormat'] = 'svg' - - if format == 'pickle': -- response = HttpResponse(mimetype='application/pickle') -+ response = HttpResponse(content_type='application/pickle') - seriesInfo = [series.getInfo() for series in data] - pickle.dump(seriesInfo, response, protocol=-1) - -@@ -177,7 +177,7 @@ - if useSVG and 'jsonp' in requestOptions: - response = HttpResponse( - content="%s(%s)" % (requestOptions['jsonp'], json.dumps(image)), -- mimetype='text/javascript') -+ content_type='text/javascript') - else: - response = buildResponse(image, useSVG and 'image/svg+xml' or 'image/png') - -@@ -386,7 +386,7 @@ - - - def buildResponse(imageData, mimetype="image/png"): -- response = HttpResponse(imageData, mimetype=mimetype) -+ response = HttpResponse(imageData, content_type=mimetype) - response['Cache-Control'] = 'no-cache' - response['Pragma'] = 'no-cache' - return response diff --git a/www/py-graphite-web/files/patch-webapp__graphite__urls.py b/www/py-graphite-web/files/patch-webapp__graphite__urls.py deleted file mode 100644 index cf7041453c9f..000000000000 --- a/www/py-graphite-web/files/patch-webapp__graphite__urls.py +++ /dev/null @@ -1,11 +0,0 @@ ---- ./webapp/graphite/urls.py.orig 2013-08-21 17:11:04.000000000 +0000 -+++ ./webapp/graphite/urls.py 2014-02-13 02:01:59.484110692 +0000 -@@ -12,7 +12,7 @@ - See the License for the specific language governing permissions and - limitations under the License.""" - --from django.conf.urls.defaults import * -+from django.conf.urls import * - from django.conf import settings - from django.contrib import admin - diff --git a/www/py-graphite-web/files/patch-webapp__graphite__version__urls.py b/www/py-graphite-web/files/patch-webapp__graphite__version__urls.py deleted file mode 100644 index abc480ed8db7..000000000000 --- a/www/py-graphite-web/files/patch-webapp__graphite__version__urls.py +++ /dev/null @@ -1,11 +0,0 @@ ---- ./webapp/graphite/version/urls.py.orig 2013-08-21 17:11:04.000000000 +0000 -+++ ./webapp/graphite/version/urls.py 2014-02-13 02:01:59.484110692 +0000 -@@ -12,7 +12,7 @@ - See the License for the specific language governing permissions and - limitations under the License.""" - --from django.conf.urls.defaults import * -+from django.conf.urls import * - - urlpatterns = patterns('graphite.version.views', - ('', 'index'), diff --git a/www/py-graphite-web/files/patch-webapp__graphite__whitelist__urls.py b/www/py-graphite-web/files/patch-webapp__graphite__whitelist__urls.py deleted file mode 100644 index 5622723ae300..000000000000 --- a/www/py-graphite-web/files/patch-webapp__graphite__whitelist__urls.py +++ /dev/null @@ -1,11 +0,0 @@ ---- ./webapp/graphite/whitelist/urls.py.orig 2013-08-21 17:11:04.000000000 +0000 -+++ ./webapp/graphite/whitelist/urls.py 2014-02-13 02:01:59.484110692 +0000 -@@ -12,7 +12,7 @@ - See the License for the specific language governing permissions and - limitations under the License.""" - --from django.conf.urls.defaults import * -+from django.conf.urls import * - - urlpatterns = patterns('graphite.whitelist.views', - ('add','add'), diff --git a/www/py-graphite-web/files/patch-webapp__graphite__whitelist__views.py b/www/py-graphite-web/files/patch-webapp__graphite__whitelist__views.py deleted file mode 100644 index a9431b26b9db..000000000000 --- a/www/py-graphite-web/files/patch-webapp__graphite__whitelist__views.py +++ /dev/null @@ -1,25 +0,0 @@ ---- webapp/graphite/whitelist/views.py.orig 2014-09-14 03:00:52 UTC -+++ webapp/graphite/whitelist/views.py -@@ -25,19 +25,19 @@ - whitelist = load_whitelist() - new_whitelist = whitelist | metrics - save_whitelist(new_whitelist) -- return HttpResponse(mimetype="text/plain", content="OK") -+ return HttpResponse(content_type="text/plain", content="OK") - - def remove(request): - metrics = set( request.POST['metrics'].split() ) - whitelist = load_whitelist() - new_whitelist = whitelist - metrics - save_whitelist(new_whitelist) -- return HttpResponse(mimetype="text/plain", content="OK") -+ return HttpResponse(content_type="text/plain", content="OK") - - def show(request): - whitelist = load_whitelist() - members = '\n'.join( sorted(whitelist) ) -- return HttpResponse(mimetype="text/plain", content=members) -+ return HttpResponse(content_type="text/plain", content=members) - - def load_whitelist(): - fh = open(settings.WHITELIST_FILE, 'rb') diff --git a/www/py-graphite-web/files/pkg-message.in b/www/py-graphite-web/files/pkg-message.in index d1d9490d6267..7fa1cebda5ff 100644 --- a/www/py-graphite-web/files/pkg-message.in +++ b/www/py-graphite-web/files/pkg-message.in @@ -58,6 +58,7 @@ Setup Apache by creating a vhost similar to the following: <Directory "%%PYTHON_SITELIBDIR%%/django/contrib/admin/static/"> Order deny,allow Allow from all + Require all granted </Directory> # The graphite.wsgi file has to be accessible by apache. It won't @@ -65,11 +66,13 @@ Setup Apache by creating a vhost similar to the following: <Directory %%PREFIX%%/etc/graphite/> Order deny,allow Allow from all + Require all granted </Directory> <Directory %%DATADIR%%/content/> Order deny,allow Allow from all + Require all granted </Directory> </VirtualHost> diff --git a/www/py-graphite-web/pkg-plist b/www/py-graphite-web/pkg-plist index cb3275fc1d35..4b5b7547f6ac 100644 --- a/www/py-graphite-web/pkg-plist +++ b/www/py-graphite-web/pkg-plist @@ -47,36 +47,26 @@ etc/graphite/local_settings.py.example %%DATADIR%%/content/css/default/top_left.gif %%DATADIR%%/content/css/default/top_mid.gif %%DATADIR%%/content/css/default/top_right.gif -%%DATADIR%%/content/css/jquery.autocomplete.css %%DATADIR%%/content/css/table.css %%DATADIR%%/content/html/completerHelp.html %%DATADIR%%/content/html/searchHelp.html %%DATADIR%%/content/html/timeHelp.html -%%DATADIR%%/content/img/I.gif -%%DATADIR%%/content/img/L.gif -%%DATADIR%%/content/img/Lminus.gif -%%DATADIR%%/content/img/Lplus.gif -%%DATADIR%%/content/img/T.gif -%%DATADIR%%/content/img/Tminus.gif -%%DATADIR%%/content/img/Tplus.gif -%%DATADIR%%/content/img/arrow1.gif %%DATADIR%%/content/img/blank.gif -%%DATADIR%%/content/img/calBt.gif +%%DATADIR%%/content/img/calendar.png %%DATADIR%%/content/img/carbon-fiber.png +%%DATADIR%%/content/img/clock.png %%DATADIR%%/content/img/clock_16.png -%%DATADIR%%/content/img/delete.gif -%%DATADIR%%/content/img/error.png -%%DATADIR%%/content/img/folder.png %%DATADIR%%/content/img/graphite.png %%DATADIR%%/content/img/graphite_short.png -%%DATADIR%%/content/img/indicator.png %%DATADIR%%/content/img/leaf.gif -%%DATADIR%%/content/img/line_chart.png %%DATADIR%%/content/img/mini-bottom2.gif %%DATADIR%%/content/img/mini-top2.gif -%%DATADIR%%/content/img/save.gif -%%DATADIR%%/content/img/searching.gif -%%DATADIR%%/content/img/updateGraph.gif +%%DATADIR%%/content/img/overview.png +%%DATADIR%%/content/img/refresh.png +%%DATADIR%%/content/img/save.png +%%DATADIR%%/content/img/share.png +%%DATADIR%%/content/img/trash.png +%%DATADIR%%/content/img/upload.png %%DATADIR%%/content/js/ace/ace.js %%DATADIR%%/content/js/ace/keybinding-vim.js %%DATADIR%%/content/js/ace/mode-c_cpp.js @@ -544,12 +534,6 @@ etc/graphite/local_settings.py.example %%DATADIR%%/content/js/ext/resources/images/default/window/top-bottom.png %%DATADIR%%/content/js/ext/resources/images/default/window/top-bottom.psd %%DATADIR%%/content/js/ext/ux/DataViewTransition.js -%%DATADIR%%/content/js/jquery.autocomplete.js -%%DATADIR%%/content/js/jquery.flot.crosshair.js -%%DATADIR%%/content/js/jquery.flot.js -%%DATADIR%%/content/js/jquery.flot.selection.js -%%DATADIR%%/content/js/jquery.graphite.js -%%DATADIR%%/content/js/jquery.js %%DATADIR%%/content/js/scriptaculous/builder.js %%DATADIR%%/content/js/scriptaculous/controls.js %%DATADIR%%/content/js/scriptaculous/dragdrop.js @@ -650,15 +634,6 @@ etc/graphite/local_settings.py.example %%PYTHON_SITELIBDIR%%/graphite/events/views.py %%PYTHON_SITELIBDIR%%/graphite/events/views.pyc %%PYTHON_SITELIBDIR%%/graphite/events/views.pyo -%%PYTHON_SITELIBDIR%%/graphite/graphlot/__init__.py -%%PYTHON_SITELIBDIR%%/graphite/graphlot/__init__.pyc -%%PYTHON_SITELIBDIR%%/graphite/graphlot/__init__.pyo -%%PYTHON_SITELIBDIR%%/graphite/graphlot/urls.py -%%PYTHON_SITELIBDIR%%/graphite/graphlot/urls.pyc -%%PYTHON_SITELIBDIR%%/graphite/graphlot/urls.pyo -%%PYTHON_SITELIBDIR%%/graphite/graphlot/views.py -%%PYTHON_SITELIBDIR%%/graphite/graphlot/views.pyc -%%PYTHON_SITELIBDIR%%/graphite/graphlot/views.pyo %%PYTHON_SITELIBDIR%%/graphite/local_settings.py.example %%PYTHON_SITELIBDIR%%/graphite/local_settings.py %%PYTHON_SITELIBDIR%%/graphite/logger.py @@ -731,7 +706,6 @@ etc/graphite/local_settings.py.example %%PYTHON_SITELIBDIR%%/graphite/templates/editProfile.html %%PYTHON_SITELIBDIR%%/graphite/templates/event.html %%PYTHON_SITELIBDIR%%/graphite/templates/events.html -%%PYTHON_SITELIBDIR%%/graphite/templates/graphlot.html %%PYTHON_SITELIBDIR%%/graphite/templates/login.html %%PYTHON_SITELIBDIR%%/graphite/templates/version.html %%PYTHON_SITELIBDIR%%/graphite/thirdparty/__init__.py @@ -758,6 +732,18 @@ etc/graphite/local_settings.py.example %%PYTHON_SITELIBDIR%%/graphite/urls.py %%PYTHON_SITELIBDIR%%/graphite/urls.pyc %%PYTHON_SITELIBDIR%%/graphite/urls.pyo +%%PYTHON_SITELIBDIR%%/graphite/url_shortener/__init__.py +%%PYTHON_SITELIBDIR%%/graphite/url_shortener/__init__.pyc +%%PYTHON_SITELIBDIR%%/graphite/url_shortener/__init__.pyo +%%PYTHON_SITELIBDIR%%/graphite/url_shortener/baseconv.py +%%PYTHON_SITELIBDIR%%/graphite/url_shortener/baseconv.pyc +%%PYTHON_SITELIBDIR%%/graphite/url_shortener/baseconv.pyo +%%PYTHON_SITELIBDIR%%/graphite/url_shortener/models.py +%%PYTHON_SITELIBDIR%%/graphite/url_shortener/models.pyc +%%PYTHON_SITELIBDIR%%/graphite/url_shortener/models.pyo +%%PYTHON_SITELIBDIR%%/graphite/url_shortener/views.py +%%PYTHON_SITELIBDIR%%/graphite/url_shortener/views.pyc +%%PYTHON_SITELIBDIR%%/graphite/url_shortener/views.pyo %%PYTHON_SITELIBDIR%%/graphite/util.py %%PYTHON_SITELIBDIR%%/graphite/util.pyc %%PYTHON_SITELIBDIR%%/graphite/util.pyo |