Closed
Bug 478330
Opened 15 years ago
Closed 14 years ago
Client-side X-WEAVE-ALERT support
Categories
(Cloud Services :: General, defect, P2)
Cloud Services
General
Tracking
(Not tracked)
RESOLVED
WONTFIX
Future
People
(Reporter: hello, Assigned: anant)
References
Details
Attachments
(1 file, 1 obsolete file)
6.35 KB,
patch
|
Details | Diff | Splinter Review |
The server is sending a new header, X-WEAVE-ALERT, for the server to inform the client about various error conditions (like quotas, downtime notifications, etc).
Reporter | ||
Updated•15 years ago
|
Flags: blocking-weave1.0+
Target Milestone: 0.4 → 1.0
Updated•15 years ago
|
Component: Weave → General
Product: Mozilla Labs → Weave
Updated•15 years ago
|
QA Contact: weave → general
Updated•15 years ago
|
Target Milestone: 1.0 → 0.6
Updated•15 years ago
|
Priority: -- → P2
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → anant
Assignee | ||
Comment 2•15 years ago
|
||
We display a notification (or replace an existing one), everytime we receive a X-Weave-Alert header from the server. Tested with a sample message on the dev-server on sm-weave-proxy01.
Attachment #392358 -
Flags: review?(thunder)
Reporter | ||
Comment 3•15 years ago
|
||
Comment on attachment 392358 [details] [diff] [review] Handle X-Weave-Alert header I think Resource should capture this info and pass it up somehow, instead of jamming UI code into our lowest-level js networking code. Also, having it stored somewhere and higher up the stack would allow us to have other behaviors, e.g. displaying a warning on the quota meter in about:weave.
Attachment #392358 -
Flags: review?(thunder) → review-
Assignee | ||
Comment 4•15 years ago
|
||
Better, modular support for displaying X-Weave-Alert's to the user. Issues to be dealt with: 1. Decide on the JSON format to be sent in X-Weave-Alert 2. Decide on codes for each type of alert 3. Intepret the codes on the client and display appropriate notifications (including ones that cannot be dismissed by the user)
Attachment #392358 -
Attachment is obsolete: true
Assignee | ||
Comment 5•15 years ago
|
||
The patch also changes the semantics of Resource.get() which now returns a RequestResponse object instead of just the responseText, so that the status code and headers can be queried by the caller without using Resource.lastRequest
Comment 6•15 years ago
|
||
If we're doing that, which I don't object to, can we make the status property not throw if the channel is wacky? Would let us simplify a lot of stuff I'm doing in bug 481733...
Reporter | ||
Comment 7•15 years ago
|
||
(In reply to comment #4) > Created an attachment (id=395220) [details] > Handle X-Weave-Alert header (v2) > > Better, modular support for displaying X-Weave-Alert's to the user. Issues to > be dealt with: > > 1. Decide on the JSON format to be sent in X-Weave-Alert > 2. Decide on codes for each type of alert > 3. Intepret the codes on the client and display appropriate notifications > (including ones that cannot be dismissed by the user) looks good, can you land this and work out 1-3 after?
Assignee | ||
Comment 8•15 years ago
|
||
http://hg.mozilla.org/labs/weave/rev/129ca9a54aed Resource doesn't throw anymore if the response isn't between 200 and 300. We instead always return an object of type RequestResponse which can be queried for response data, headers and status code. X-Weave-Alert's are, for now, a JSON array of human readable strings that are displayed as-is. We can revisit their representation at a later time.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 9•15 years ago
|
||
> X-Weave-Alert's are, for now, a JSON array of human readable strings that are
> displayed as-is. We can revisit their representation at a later time.
Please file a follow up bug for this.
Comment 10•15 years ago
|
||
The unit tests are most likely failing now -- test_resource/records_*.
Comment 11•15 years ago
|
||
Backed out changeset 129ca9a54aed due to burning test_auth_manager: FAIL test_resource: FAIL This could build on top of bug 511746. That patch exposes a .status like this patch here but it provides a .header too instead of needing to keep around the channel to call getResponseHeader.
Updated•15 years ago
|
Target Milestone: 0.6 → 0.7
Updated•15 years ago
|
Priority: P2 → P1
Reporter | ||
Updated•15 years ago
|
Priority: P1 → P2
Comment 12•15 years ago
|
||
We have various messages for backoff, and we're not doing quotas for 1.0, so sending a non-localized message to the client isn't a high priority for now.
Flags: blocking-weave1.0+ → blocking-weave1.0-
Target Milestone: 0.7 → Future
Comment 13•14 years ago
|
||
We don't need this for now. At some point, we'll have notifications if we need to do somehting like this, but probably not as a header.
Status: REOPENED → RESOLVED
Closed: 15 years ago → 14 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•