Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/content/crawler.xul

Issue 10233013: Crawler, second version (Closed)
Patch Set: Created April 12, 2013, 1:38 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/content/crawler.js ('k') | chrome/content/crawler_ui.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/crawler.xul
===================================================================
--- a/chrome/content/crawler.xul
+++ b/chrome/content/crawler.xul
@@ -1,42 +1,213 @@
<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<!DOCTYPE dialog SYSTEM "chrome://abpcrawler/locale/crawler.dtd">
<!-- This Source Code is subject to the terms of the Mozilla Public License
- version 2.0 (the "License"). You can obtain a copy of the License at
- http://mozilla.org/MPL/2.0/. -->
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<!-- onload="load();" -->
+<dialog
+ id="abpcrawler-crawler"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ title="&dialog.title;"
+ onload="loader();"
+ onunload="unloader();"
+ buttons=","
+ buttonlabelcancel="&close.label;"
+ buttonaccesskeycancel="&close.accesskey;"
+ width="500px"
+ height="200px"
+ windowtype="abpcrawler:crawl">
-<!DOCTYPE dialog SYSTEM "chrome://abpcrawler/locale/crawler.dtd">
+ <script type="application/x-javascript;version=1.7" src="crawler_ui.js"/>
+ <script type="application/x-javascript;version=1.7" src="task_test_ui.js"/>
+ <script type="application/x-javascript;version=1.7" src="sandbox_ui.js"/>
-<dialog
- id="abpcrawler-crawler"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- title="&dialog.title;"
- onunload="onUnload();"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();"
- buttons="accept,cancel"
- buttonlabelaccept="&crawl.label;"
- buttonaccesskeyaccept="&crawl.accesskey;"
- buttonlabelcancel="&close.label;"
- buttonaccesskeycancel="&close.accesskey;"
- width="500px"
- height="200px"
- windowtype="abpcrawler:crawl">
+ <tabbox selectedIndex="0">
+ <tabs>
+ <tab label="Crawler"/>
+ <tab label="Long_Task Test"/>
+ <tab label="Sandbox"/>
+ </tabs>
+ <tabpanels>
+ <tabpanel>
+ <vbox>
+ <groupbox>
+ <caption label="Instructions"/>
+ <tabbox id="instructions_tabbox" selectedIndex="1">
+ <tabs>
+ <tab label="Server"/>
+ <tab label="Local"/>
+ <tab label="Fixed"/>
+ </tabs>
+ <tabpanels>
+ <tabpanel>
+ <label>Server instructions not implemented.</label>
+ </tabpanel>
+ <tabpanel>
+ <vbox>
+ <label>Read input from the local file system.</label>
+ <hbox align="center">
+ <label>Input File</label>
+ <!-- Icon from http://openiconlibrary.sourceforge.net/ -->
+ <image id="input_file_icon"
+ src="chrome://abpcrawler/skin/text-x-source.png"
+ tooltiptext="Change the input file"/>
+ <textbox id="input_file"
+ placeholder="&lt;no input file&gt;"
+ size="40"/>
+ </hbox>
+ </vbox>
+ </tabpanel>
+ <tabpanel>
+ <label>Use Fixed List</label>
+ </tabpanel>
+ </tabpanels>
+ </tabbox>
+ </groupbox>
+ <groupbox>
+ <caption label="Tabs"/>
+ <vbox>
+ <hbox align="center">
+ <label>Simultaneous Loads</label>
+ <textbox
+ id="number_of_tabs" type="number" min="1" value="12"
+ width="60"
+ persist="value"/>
+ </hbox>
+ <hbox align="center">
+ <label>Time Limit per Tab</label>
+ <textbox
+ id="time_limit" type="number" min="1" value="5"
+ width="60"
+ persist="value"/>
+ <menulist
+ id="time_limit_units">
+ <menupopup>
+ <menuitem label="seconds" value="1000"/>
+ <menuitem label="minutes" value="60000"/>
+ </menupopup>
+ </menulist>
+ </hbox>
+ <checkbox id="leave_open"
+ label="Leave tabs open"
+ checked="false"
+ persist="checked"/>
+ </vbox>
+ </groupbox>
+ <groupbox>
+ <caption label="Output Format"/>
+ <radiogroup id="format">
+ <radio id="json" label="JSON" selected="true"/>
+ <radio id="yaml" label="YAML"/>
+ </radiogroup>
+ </groupbox>
+ <groupbox>
+ <caption label="Storage"/>
+ <tabbox id="storage_tabbox" selectedIndex="1">
+ <tabs>
+ <tab label="Server"/>
+ <tab label="Local"/>
+ <tab label="None"/>
+ </tabs>
+ <tabpanels>
+ <tabpanel>
+ <label>Server reporting not yet implemented.</label>
+ </tabpanel>
+ <tabpanel>
+ <vbox>
+ <label>Write output to the local file system.</label>
+ <hbox align="center">
+ <label>Base Name</label>
+ <textbox id="base_name" value="crawl-results"/>
+ </hbox>
+ <hbox align="center">
+ <label>Directory</label>
+ <!-- Icon from http://openiconlibrary.sourceforge.net/ -->
+ <image id="output_directory_icon"
+ src="chrome://abpcrawler/skin/folder.png"
+ tooltiptext="Change the output directory"/>
+ <textbox id="output_directory"
+ placeholder="&lt;current directory&gt;"
+ size="40"/>
+ </hbox>
+ </vbox>
+ </tabpanel>
+ <tabpanel>
+ <label>No Reporting.</label>
+ </tabpanel>
+ </tabpanels>
+ </tabbox>
+ </groupbox>
+ <button id="crawl_go"
+ oncommand="start_crawl();"
+ align="end" class="dialog"
+ label="&crawl_start.label;"/>
+ <spacer flex="1"/>
+ <hbox>
+ <label id="lower_left"></label>
+ </hbox>
+ </vbox>
+ <vbox>
+ <hbox>
+ <checkbox id="display_log"
+ label="Display output as it's generated"
+ checked="false"/>
+ <spacer flex="1"/>
+ <label id="progress_label"/>
+ <label id="progress"/>
+ </hbox>
+ <textbox id="log_box"
+ multiline="true" cols="120" rows="40" wrap="off"
+ readonly="true"
+ placeholder="Activity Log"/>
+ </vbox>
+ </tabpanel>
+ <tabpanel>
+ <vbox>
+ <radiogroup id="counting_variant">
+ <radio id="continuous" label="Continuous"/>
+ <radio id="segmented_fast" label="Segmented Fast"/>
+ <hbox>
+ <radio id="segmented_slow" label="Segmented Slow" selected="true"/>
+ <textbox id="slow_interval" type="number" value="100"/>
+ </hbox>
+ </radiogroup>
+ <hbox>
+ <label>Number of iterations</label>
+ <textbox id="task_count" type="number" value="100000"/>
+ </hbox>
+ <hbox>
+ <label>Runaway limit</label>
+ <textbox id="task_limit" type="number" value="150000"/>
+ </hbox>
+ <spacer flex="1"/>
+ <hbox>
+ <label>Status:</label>
+ <label id="task_status"></label>
+ </hbox>
+ </vbox>
+ <spacer flex="1"/>
+ <vbox>
+ <spacer flex="1"/>
+ <button id="task_go" label="Start" oncommand="task_start_click();"/>
+ </vbox>
+ </tabpanel>
+ <tabpanel>
+ <button id="sandbox_go"
+ label="Go"
+ maxwidth="100" maxheight="24"
+ flex="0"
+ oncommand="sandbox_start();"/>
+ <vbox flex="1">
+ <textbox id="sandbox_output"
+ multiline="true" wrap="off"
+ rows="40"/>
+ </vbox>
- <script type="application/x-javascript;version=1.7" src="crawler.js"/>
+ </tabpanel>
+ </tabpanels>
+ </tabbox>
- <vbox>
- <label control="backend-url" value="Backend URL:"/>
- <textbox
- id="backend-url" value="https://www.adblockplus.org" flex="1"
- persist="value"/>
- </vbox>
-
- <vbox>
- <label control="parallel-tabs" value="Parallel Tabs:"/>
- <textbox
- id="parallel-tabs" type="number" min="1" value="5"
- persist="value"/>
- </vbox>
</dialog>
« no previous file with comments | « chrome/content/crawler.js ('k') | chrome/content/crawler_ui.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld