Browse Source

Various fixes for wall

- Correct link media
- Correct get_stats endpoint
- Fix emptyMessage usage (defaults were overwritten)

Refs GH-1337
David Cramer 10 years ago
parent
commit
c9c7b97b76

+ 0 - 2
Makefile

@@ -1,7 +1,5 @@
-VERSION = 2.0.0
 NPM_ROOT = ./node_modules
 STATIC_DIR = src/sentry/static/sentry
-UGLIFY_JS ?= node_modules/uglify-js/bin/uglifyjs
 
 develop: update-submodules setup-git
 	@echo "--> Installing dependencies"

+ 15 - 3
gulpfile.js

@@ -149,16 +149,28 @@ gulp.task("clean", function () {
     .on("error", gp_util.log);
 });
 
-gulp.task("dist:css", buildCssCompileTask("sentry.css", [file("less/sentry.less")]));
+
+gulp.task("dist:css:sentry", buildCssCompileTask("sentry.css", [file("less/sentry.less")]))
+
+gulp.task("dist:css:wall", buildCssCompileTask("wall.css", [file("less/wall.less")]))
+
+gulp.task("dist:css", ["dist:css:sentry", "dist:css:wall"]);
 
 buildJsDistroTasks();
 
 gulp.task("dist", ["dist:js", "dist:css"]);
 
-gulp.task("watch:css", function(){
-  return gulp.watch(file("less/sentry.less"), ["dist:css"]);
+gulp.task("watch:css:sentry", function(){
+  return gulp.watch(file("less/sentry.less"), ["dist:css:sentry"]);
 });
 
+gulp.task("watch:css:wall", function(){
+  return gulp.watch(file("less/wall.less"), ["dist:css:wall"]);
+});
+
+gulp.task("watch:css", ["watch:css:sentry", "watch:css:wall"]);
+
+
 gulp.task("watch", ["watch:js", "watch:css"]);
 
 gulp.task("default", ["dist"]);

+ 2 - 0
src/sentry/static/sentry/scripts/views.js

@@ -427,6 +427,8 @@
     app.GroupListView = app.OrderedElementsView.extend({
 
         defaults: {
+            emptyMessage: '<p>There is no data to show.</p>',
+            maxItems: 50,
             realtime: false,
             stream: false,
             pollUrl: null,

+ 1 - 1
src/sentry/templates/sentry/wall.html

@@ -4,7 +4,7 @@
 {% load sentry_helpers %}
 
 {% block css %}
-    <link href="{% url 'sentry-media' "sentry" "dist/wall.min.css" %}" rel="image/png"/>
+    <link href="{% url 'sentry-media' "sentry" "dist/wall.css" %}" rel="stylesheet"/>
 {% endblock %}
 
 {% block body %}

+ 2 - 7
src/sentry/web/api.py

@@ -817,15 +817,10 @@ def get_resolved_groups(request, organization, team):
 @never_cache
 @csrf_exempt
 @has_access
-def get_stats(request, organization, team=None, project=None):
+def get_stats(request, organization, team):
     minutes = int(request.REQUEST.get('minutes', 15))
 
-    if not team and project:
-        project_list = [project]
-    elif team:
-        project_list = Project.objects.get_for_user(team=team, user=request.user)
-    else:
-        return HttpResponse(status=400)
+    project_list = Project.objects.get_for_user(team=team, user=request.user)
 
     cutoff = timedelta(minutes=minutes)
 

+ 1 - 1
src/sentry/web/urls.py

@@ -305,7 +305,7 @@ urlpatterns += patterns('',
     url(r'^api/(?P<organization_slug>[\w_-]+)/(?P<project_id>[\w_-]+)/group/(?P<group_id>[\w_-]+)/tags/(?P<tag_name>[^/]+)/$', api.get_group_tags,
         name='sentry-api-group-tags'),
 
-    url(r'^api/(?P<organization_slug>[\w_-]+)/(?:(?P<project_id>[\w_-]+)/)?stats/$', api.get_stats,
+    url(r'^api/(?P<organization_slug>[\w_-]+)/(?P<team_slug>[\w_-]+)/stats/$', api.get_stats,
         name='sentry-api-stats'),
     url(r'^api/(?P<organization_slug>[\w_-]+)/(?P<project_id>[\w_-]+)/tags/search/$', api.search_tags,
         name='sentry-api-search-tags'),