Closed Bug 1348253 Opened 3 years ago Closed 3 years ago

about:url-classifier: Providers information and update button

Categories

(Toolkit :: Safe Browsing, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: ethan, Assigned: dimi)

References

(Blocks 1 open bug)

Details

(Whiteboard: #sbv4-m7)

Attachments

(3 files, 1 obsolete file)

https://bugzilla.mozilla.org/show_bug.cgi?id=1338079#c0

The third section (providers) would show the following information for each provider:
- time of the last update
- last update return status (e.g. 200, 503)

and have a button to force an update for just that provider.
Assignee: nobody → dlee
Status: NEW → ASSIGNED
Priority: -- → P2
Attached patch WIP patch (obsolete) — Splinter Review
Whiteboard: #sbv4-m6
Attachment #8848448 - Attachment is obsolete: true
Attached image screenshot
Attach screenshot, the layout is copyied from about:support
This is going to be really useful!

Two small things, based on the screenshot:

- maybe we should add the ApplicationReputation log module too
- until we have something in the Memory, Database, Cache and Lookup Sections, we should not display them

Also, did you link to this page from about:about?
(In reply to François Marier [:francois] from comment #4)
> This is going to be really useful!
> 
> Two small things, based on the screenshot:
> 
> - maybe we should add the ApplicationReputation log module too
> - until we have something in the Memory, Database, Cache and Lookup
> Sections, we should not display them
> 

I'll add ApplicationReputation log module and remove sections that we are not yet support.

> Also, did you link to this page from about:about?

Yes!
Comment on attachment 8851462 [details]
Bug 1348253 - about:url-classifier: Providers information and update button.

https://reviewboard.mozilla.org/r/123760/#review129142

This looks really good, thanks Dimi!

Can you please check that it works on Fennec (and ideally include a screenshot)?

I'm not sure if the debug section makes sense on Fennec though, so maybe we should check with a Fennec developer to see if we should include it or if we should only display the provider section there.

::: toolkit/content/aboutUrlClassifier.js:47
(Diff revision 2)
> +    this.render();
> +    this.refresh();
> +  },
> +
> +  register() {
> +    // Handle beging udpate

"begin update"

::: toolkit/content/aboutUrlClassifier.js:64
(Diff revision 2)
> +    // Handle finish update
> +    Services.obs.addObserver((aSubject, aTopic, aData) => {
> +      let p = this.updatingProvider;
> +      this.updatingProvider = "";
> +
> +      // It is possible that we get update-finish event only because

"update-finished"

::: toolkit/content/aboutUrlClassifier.js:177
(Diff revision 2)
> +      this.refreshJSDebug();
> +    }, false);
> +  },
> +
> +  render() {
> +    // This function update the log moudle text field if we click

"module"

::: toolkit/content/aboutUrlClassifier.xhtml:36
(Diff revision 2)
> +          <th id="col-lastupdateresult">&aboutUrlClassifier.providerLastUpdateStatus;</th>
> +          <th id="col-update">&aboutUrlClassifier.providerUpdateBtn;</th>
> +        </tr>
> +      </thead>
> +      <tbody id="provider-table-body">
> +        <!-- data is generate in javascript -->

"generated"

::: toolkit/content/aboutUrlClassifier.xhtml:49
(Diff revision 2)
> +      <button id="set-log-modules">&aboutUrlClassifier.debugModuleBtn;</button>
> +      <br></br>
> +      <input id="log-file" type="text" value=""/>
> +      <button id="set-log-file">&aboutUrlClassifier.debugFileBtn;</button>
> +      <br></br>
> +      <button id="js-log"/>

Maybe this should be a checkbox? "Safe Browsing JS Log"

::: toolkit/locales/en-US/chrome/global/aboutUrlClassifier.dtd:25
(Diff revision 2)
> +<!ENTITY aboutUrlClassifier.memoryTitle                 "Memory">
> +<!ENTITY aboutUrlClassifier.databaseTitle               "Database">
> +<!ENTITY aboutUrlClassifier.debugTitle                  "Debug">
> +<!ENTITY aboutUrlClassifier.debugModuleBtn              "Set Log Modules">
> +<!ENTITY aboutUrlClassifier.debugFileBtn                "Set Log File">
> +<!ENTITY aboutUrlClassifier.debugSBModules              "SafeBrowsing log modules">

"Safe Browsing"

::: toolkit/locales/en-US/chrome/global/aboutUrlClassifier.properties:9
(Diff revision 2)
> +
> +TriggerUpdate = Trigger Update
> +
> +NotAvailable = N/A
> +
> +DisableSBJSLog = Disable SafeBrowsing JS Log

"Safe Browsing"

::: toolkit/locales/en-US/chrome/global/aboutUrlClassifier.properties:11
(Diff revision 2)
> +
> +NotAvailable = N/A
> +
> +DisableSBJSLog = Disable SafeBrowsing JS Log
> +
> +EnableSBJSLog = Enable SafeBrowsing JS Log

ditto
Attachment #8851462 - Flags: review?(francois)
Attachment #8851462 - Flags: review?(francois)
Whiteboard: #sbv4-m6 → #sbv4-m7
(In reply to Dimi Lee[:dimi][:dlee] from comment #3)
> Created attachment 8851463 [details]
> screenshot
> 
> Attach screenshot, the layout is copyied from about:support

This looks pretty good.
I look forward to this feature being rolled out!  :)
Attached image screenshot on fennec
Hi Francois,
about:url-classifier works on feenec, attach fennec screnshot.
As for MOZ_LOG log, I think it make sense to me because we can still get the debug message by using "adb logcat" on fennec device.
Comment on attachment 8851462 [details]
Bug 1348253 - about:url-classifier: Providers information and update button.

https://reviewboard.mozilla.org/r/123760/#review133482

Great work!

::: toolkit/content/aboutUrlClassifier.js:47
(Diff revisions 2 - 4)
>      this.render();
>      this.refresh();
>    },
>  
>    register() {
> -    // Handle beging udpate
> +    // Handle beging update

"begin"
Attachment #8851462 - Flags: review?(francois) → review+
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8ce1a738538e
about:url-classifier: Providers information and update button. r=francois
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/8ce1a738538e
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Nice work!  Thank you, Dimi!
Now we have a Safe Browsing debugging page, awesome!!
Depends on: 1362112
You need to log in before you can comment on or make changes to this bug.