Merge lp:~hatch/juju-gui/remove-old-notifications into lp:juju-gui/experimental

Proposed by Jeff Pihach
Status: Merged
Merged at revision: 1190
Proposed branch: lp:~hatch/juju-gui/remove-old-notifications
Merge into: lp:juju-gui/experimental
Diff against target: 120 lines (+1/-68)
4 files modified
CHANGES.yaml (+1/-1)
app/app.js (+0/-19)
app/templates/notifications_overview.handlebars (+0/-16)
app/views/notifications.js (+0/-32)
To merge this branch: bzr merge lp:~hatch/juju-gui/remove-old-notifications
Reviewer Review Type Date Requested Status
Juju GUI Hackers Pending
Review via email: mp+194422@code.launchpad.net

Description of the change

Remove remaining old unused notifications code.

https://codereview.appspot.com/23240043/

To post a comment you must log in.
Revision history for this message
Jeff Pihach (hatch) wrote :
Download full text (4.3 KiB)

Reviewers: mp+194422_code.launchpad.net,

Message:
Please take a look.

Description:
Remove remaining old unused notifications code.

https://code.launchpad.net/~hatch/juju-gui/remove-old-notifications/+merge/194422

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/23240043/

Affected files (+3, -68 lines):
   M CHANGES.yaml
   A [revision details]
   M app/app.js
   D app/templates/notifications_overview.handlebars
   M app/views/notifications.js

Index: CHANGES.yaml
=== modified file 'CHANGES.yaml'
--- CHANGES.yaml 2013-11-07 19:57:08 +0000
+++ CHANGES.yaml 2013-11-07 21:23:39 +0000
@@ -20,7 +20,7 @@

  # Release identifiers in this file should always be "unreleased" or
  # [NUMBER].[NUMBER].[NUMBER] per http://semver.org/ .
-- unreleased
+- unreleased:
  - 0.12.0:
      - >
       (BETA) In arguably the biggest single new feature of the GUI since its

Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>

Index: app/app.js
=== modified file 'app/app.js'
--- app/app.js 2013-11-07 15:49:57 +0000
+++ app/app.js 2013-11-07 21:10:06 +0000
@@ -125,10 +125,6 @@
        notifications: {
          type: 'juju.views.NotificationsView',
          preserve: true
- },
-
- notifications_overview: {
- type: 'juju.views.NotificationsOverview'
        }

      },
@@ -757,17 +753,6 @@
      // Route handlers

      /**
- * @method show_notifications_overview
- */
- show_notifications_overview: function(req) {
- this.showView('notifications_overview', {
- env: this.env,
- notifications: this.db.notifications,
- nsRouter: this.nsRouter
- });
- },
-
- /**
       * Show the login screen.
       *
       * @method showLogin
@@ -1309,10 +1294,6 @@
              callbacks: 'show_charm',
              model: 'browser-charm',
              namespace: 'gui'},
- // Notifications.
- { path: '/notifications/',
- callbacks: 'show_notifications_overview',
- namespace: 'gui'},
            // Authorization
            { path: '/login/', callbacks: 'showLogin' }
          ]

Index: app/templates/notifications_overview.handlebars
=== removed file 'app/templates/notifications_overview.handlebars'
--- app/templates/notifications_overview.handlebars 2012-09-28 20:12:35
+0000
+++ app/templates/notifications_overview.handlebars 1970-01-01 00:00:00
+0000
@@ -1,16 +0,0 @@
-<ul class="unstyled">
- {{#notifications}}
- <li id="{{clientId}}" class="notice">
- <div{{#if seen}} class="seen" {{/if}} class="{{level}}">
- <h4>{{title}}</h4>
- <div>
- {{message}}
- </div>
- {{#if link}}
- <a href="{{link}}"><i class="icon-arrow-right"></i>{{link_title}}</a>
- {{/if}}
- <small data-timestamp="{{timestamp}}"
class="timestamp">{{humanizeTime timestamp}}</small>
- </div>
- </li>
- {{/notifications}}
-</ul>

Ind...

Read more...

Revision history for this message
Jeff Pihach (hatch) wrote :

No tests were removed as part of this branch because the tests for this
section were removed already. There are a series of notification tests
which are skipped right now which still fail and will need to be
re-written but do not impact this code removal.

https://codereview.appspot.com/23240043/

Revision history for this message
Gary Poster (gary) wrote :

LGTM. I wonder if we should delete the skipped tests. Do their
existence bring value somehow?

https://codereview.appspot.com/23240043/

Revision history for this message
Jeff Pihach (hatch) wrote :

Thanks for the review!

We left them in because we should have tests for the area which we are
skipping we just need to
assign time to fixing them/refactoring the notifications.

https://codereview.appspot.com/23240043/

Revision history for this message
Jeff Pihach (hatch) wrote :

*** Submitted:

Remove remaining old unused notifications code.

R=gary.poster
CC=
https://codereview.appspot.com/23240043

https://codereview.appspot.com/23240043/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CHANGES.yaml'
2--- CHANGES.yaml 2013-11-07 19:57:08 +0000
3+++ CHANGES.yaml 2013-11-07 21:26:54 +0000
4@@ -20,7 +20,7 @@
5
6 # Release identifiers in this file should always be "unreleased" or
7 # [NUMBER].[NUMBER].[NUMBER] per http://semver.org/ .
8-- unreleased
9+- unreleased:
10 - 0.12.0:
11 - >
12 (BETA) In arguably the biggest single new feature of the GUI since its
13
14=== modified file 'app/app.js'
15--- app/app.js 2013-11-07 15:49:57 +0000
16+++ app/app.js 2013-11-07 21:26:54 +0000
17@@ -125,10 +125,6 @@
18 notifications: {
19 type: 'juju.views.NotificationsView',
20 preserve: true
21- },
22-
23- notifications_overview: {
24- type: 'juju.views.NotificationsOverview'
25 }
26
27 },
28@@ -757,17 +753,6 @@
29 // Route handlers
30
31 /**
32- * @method show_notifications_overview
33- */
34- show_notifications_overview: function(req) {
35- this.showView('notifications_overview', {
36- env: this.env,
37- notifications: this.db.notifications,
38- nsRouter: this.nsRouter
39- });
40- },
41-
42- /**
43 * Show the login screen.
44 *
45 * @method showLogin
46@@ -1309,10 +1294,6 @@
47 callbacks: 'show_charm',
48 model: 'browser-charm',
49 namespace: 'gui'},
50- // Notifications.
51- { path: '/notifications/',
52- callbacks: 'show_notifications_overview',
53- namespace: 'gui'},
54 // Authorization
55 { path: '/login/', callbacks: 'showLogin' }
56 ]
57
58=== removed file 'app/templates/notifications_overview.handlebars'
59--- app/templates/notifications_overview.handlebars 2012-09-28 20:12:35 +0000
60+++ app/templates/notifications_overview.handlebars 1970-01-01 00:00:00 +0000
61@@ -1,16 +0,0 @@
62-<ul class="unstyled">
63- {{#notifications}}
64- <li id="{{clientId}}" class="notice">
65- <div{{#if seen}} class="seen" {{/if}} class="{{level}}">
66- <h4>{{title}}</h4>
67- <div>
68- {{message}}
69- </div>
70- {{#if link}}
71- <a href="{{link}}"><i class="icon-arrow-right"></i>{{link_title}}</a>
72- {{/if}}
73- <small data-timestamp="{{timestamp}}" class="timestamp">{{humanizeTime timestamp}}</small>
74- </div>
75- </li>
76- {{/notifications}}
77-</ul>
78
79=== modified file 'app/views/notifications.js'
80--- app/views/notifications.js 2013-10-29 22:30:57 +0000
81+++ app/views/notifications.js 2013-11-07 21:26:54 +0000
82@@ -292,38 +292,6 @@
83 });
84 views.NotificationsView = NotificationsView;
85
86- /**
87- * The 'View All Notifications' view.
88- *
89- * @class NotificationsOverview
90- */
91- var NotificationsOverview = Y.Base.create('NotificationsOverview',
92- NotificationsBaseView, [], {
93- template: Templates.notifications_overview,
94- events: {
95- 'li.notice': {
96- click: 'notificationSelect'
97- }
98- },
99- // Actions for selecting a notice
100- selection: {hide: false},
101-
102- /**
103- * The overview shows all events by default when real filtering
104- * is present this will have to take options.
105- *
106- * @method getShowable
107- */
108- getShowable: function() {
109- var notifications = this.get('notifications');
110- return notifications.map(function(n) {
111- return n.getAttrs();
112- });
113- }
114- });
115-
116- views.NotificationsOverview = NotificationsOverview;
117-
118 }, '0.1.0', {
119 requires: [
120 'view',

Subscribers

People subscribed via source and target branches