<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/devtools/widgets.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/devtools/netmonitor.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/devtools/common.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/devtools/widgets.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/devtools/netmonitor.css" type="text/css"?>
<!DOCTYPE window [
  <!ENTITY % netmonitorDTD SYSTEM "chrome://browser/locale/devtools/netmonitor.dtd">
  %netmonitorDTD;
]>

<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  <script type="text/javascript" src="netmonitor-controller.js"/>
  <script type="text/javascript" src="netmonitor-view.js"/>

  <box id="body"
       class="devtools-responsive-container"
       flex="1">
    <vbox id="network-table" flex="1">
      <toolbar id="requests-menu-toolbar"
               class="devtools-toolbar"
               align="center">
        <hbox id="toolbar-labels" flex="1">
          <hbox id="requests-menu-status-and-method-header-box"
                class="requests-menu-header requests-menu-status-and-method"
                align="center">
            <button id="requests-menu-status-button"
                    class="requests-menu-header-button requests-menu-status"
                    onclick="NetMonitorView.RequestsMenu.sortBy('status')"
                    label="&netmonitorUI.toolbar.status;">
            </button>
            <button id="requests-menu-method-button"
                    class="requests-menu-header-button requests-menu-method"
                    onclick="NetMonitorView.RequestsMenu.sortBy('method')"
                    label="&netmonitorUI.toolbar.method;"
                    flex="1">
            </button>
          </hbox>
          <hbox id="requests-menu-file-header-box"
                class="requests-menu-header requests-menu-file"
                align="center">
            <button id="requests-menu-file-button"
                    class="requests-menu-header-button requests-menu-file"
                    onclick="NetMonitorView.RequestsMenu.sortBy('file')"
                    label="&netmonitorUI.toolbar.file;"
                    flex="1">
            </button>
          </hbox>
          <hbox id="requests-menu-domain-header-box"
                class="requests-menu-header requests-menu-domain"
                align="center">
            <button id="requests-menu-domain-button"
                    class="requests-menu-header-button requests-menu-domain"
                    onclick="NetMonitorView.RequestsMenu.sortBy('domain')"
                    label="&netmonitorUI.toolbar.domain;"
                    flex="1">
            </button>
          </hbox>
          <hbox id="requests-menu-type-header-box"
                class="requests-menu-header requests-menu-type"
                align="center">
            <button id="requests-menu-type-button"
                    class="requests-menu-header-button requests-menu-type"
                    onclick="NetMonitorView.RequestsMenu.sortBy('type')"
                    label="&netmonitorUI.toolbar.type;"
                    flex="1">
            </button>
          </hbox>
          <hbox id="requests-menu-size-header-box"
                class="requests-menu-header requests-menu-size"
                align="center">
            <button id="requests-menu-size-button"
                    class="requests-menu-header-button requests-menu-size"
                    onclick="NetMonitorView.RequestsMenu.sortBy('size')"
                    label="&netmonitorUI.toolbar.size;"
                    flex="1">
            </button>
          </hbox>
          <hbox id="requests-menu-waterfall-header-box"
                class="requests-menu-header requests-menu-waterfall"
                align="center"
                flex="1">
            <button id="requests-menu-waterfall-button"
                    class="requests-menu-header-button requests-menu-waterfall"
                    onclick="NetMonitorView.RequestsMenu.sortBy('waterfall')"
                    pack="start"
                    flex="1">
              <label id="requests-menu-waterfall-label"
                     class="plain requests-menu-waterfall"
                     value="&netmonitorUI.toolbar.waterfall;"/>
            </button>
          </hbox>
        </hbox>
        <toolbarbutton id="details-pane-toggle"
                       class="devtools-toolbarbutton"
                       tooltiptext="&netmonitorUI.panesButton.tooltip;"
                       disabled="true"
                       tabindex="0"/>
      </toolbar>
      <label id="requests-menu-empty-notice"
             value="&netmonitorUI.emptyNotice2;"/>
      <vbox id="requests-menu-contents" flex="1">
        <hbox id="requests-menu-item-template" hidden="true">
          <hbox class="requests-menu-subitem requests-menu-status-and-method"
                align="center">
            <box class="requests-menu-status"/>
            <label class="plain requests-menu-method"
                   crop="end"
                   flex="1"/>
          </hbox>
          <label class="plain requests-menu-subitem requests-menu-file"
                 crop="end"/>
          <label class="plain requests-menu-subitem requests-menu-domain"
                 crop="end"/>
          <label class="plain requests-menu-subitem requests-menu-type"
                 crop="end"/>
          <label class="plain requests-menu-subitem requests-menu-size"
                 crop="end"/>
          <hbox class="requests-menu-subitem requests-menu-waterfall"
                align="center"
                flex="1">
            <hbox class="requests-menu-timings"
                  align="center">
              <hbox class="start requests-menu-timings-cap" hidden="true"/>
              <hbox class="end requests-menu-timings-cap" hidden="true"/>
              <label class="plain requests-menu-timings-total"/>
            </hbox>
          </hbox>
        </hbox>
      </vbox>
      <hbox id="requests-menu-footer">
        <spacer id="requests-menu-spacer-start"
                class="requests-menu-footer-spacer"
                flex="100"/>
        <button id="requests-menu-filter-all-button"
                class="requests-menu-footer-button"
                checked="true"
                onclick="NetMonitorView.RequestsMenu.filterOn('all')"
                label="&netmonitorUI.footer.filterAll;">
        </button>
        <button id="requests-menu-filter-html-button"
                class="requests-menu-footer-button"
                onclick="NetMonitorView.RequestsMenu.filterOn('html')"
                label="&netmonitorUI.footer.filterHTML;">
        </button>
        <button id="requests-menu-filter-css-button"
                class="requests-menu-footer-button"
                onclick="NetMonitorView.RequestsMenu.filterOn('css')"
                label="&netmonitorUI.footer.filterCSS;">
        </button>
        <button id="requests-menu-filter-js-button"
                class="requests-menu-footer-button"
                onclick="NetMonitorView.RequestsMenu.filterOn('js')"
                label="&netmonitorUI.footer.filterJS;">
        </button>
        <button id="requests-menu-filter-xhr-button"
                class="requests-menu-footer-button"
                onclick="NetMonitorView.RequestsMenu.filterOn('xhr')"
                label="&netmonitorUI.footer.filterXHR;">
        </button>
        <button id="requests-menu-filter-fonts-button"
                class="requests-menu-footer-button"
                onclick="NetMonitorView.RequestsMenu.filterOn('fonts')"
                label="&netmonitorUI.footer.filterFonts;">
        </button>
        <button id="requests-menu-filter-images-button"
                class="requests-menu-footer-button"
                onclick="NetMonitorView.RequestsMenu.filterOn('images')"
                label="&netmonitorUI.footer.filterImages;">
        </button>
        <button id="requests-menu-filter-media-button"
                class="requests-menu-footer-button"
                onclick="NetMonitorView.RequestsMenu.filterOn('media')"
                label="&netmonitorUI.footer.filterMedia;">
        </button>
        <button id="requests-menu-filter-flash-button"
                class="requests-menu-footer-button"
                onclick="NetMonitorView.RequestsMenu.filterOn('flash')"
                label="&netmonitorUI.footer.filterFlash;">
        </button>
        <spacer id="requests-menu-spacer-end"
                class="requests-menu-footer-spacer"
                flex="100"/>
        <label id="request-menu-network-summary"
               class="plain requests-menu-footer-label"
               flex="1"
               crop="end"/>
      </hbox>
    </vbox>

    <splitter class="devtools-side-splitter"/>

    <tabbox id="details-pane"
            class="devtools-sidebar-tabs"
            hidden="true">
      <tabs>
        <tab label="&netmonitorUI.tab.headers;"/>
        <tab label="&netmonitorUI.tab.cookies;"/>
        <tab label="&netmonitorUI.tab.params;"/>
        <tab label="&netmonitorUI.tab.response;"/>
        <tab label="&netmonitorUI.tab.timings;"/>
      </tabs>
      <tabpanels flex="1">
        <tabpanel id="headers-tabppanel"
                  class="tabpanel-content">
          <vbox flex="1">
            <hbox id="headers-summary-url"
                  class="tabpanel-summary-container"
                  align="center">
              <label class="plain tabpanel-summary-label"
                     value="&netmonitorUI.summary.url;"/>
              <label id="headers-summary-url-value"
                     class="plain tabpanel-summary-value"
                     crop="end"
                     flex="1"/>
            </hbox>
            <hbox id="headers-summary-method"
                  class="tabpanel-summary-container"
                  align="center">
              <label class="plain tabpanel-summary-label"
                     value="&netmonitorUI.summary.method;"/>
              <label id="headers-summary-method-value"
                     class="plain tabpanel-summary-value"
                     crop="end"
                     flex="1"/>
            </hbox>
            <hbox id="headers-summary-status"
                  class="tabpanel-summary-container"
                  align="center">
              <label class="plain tabpanel-summary-label"
                     value="&netmonitorUI.summary.status;"/>
              <box id="headers-summary-status-circle"
                   class="requests-menu-status"/>
              <label id="headers-summary-status-value"
                     class="plain tabpanel-summary-value"
                     crop="end"
                     flex="1"/>
            </hbox>
            <hbox id="headers-summary-version"
                  class="tabpanel-summary-container"
                  align="center">
              <label class="plain tabpanel-summary-label"
                     value="&netmonitorUI.summary.version;"/>
              <label id="headers-summary-version-value"
                     class="plain tabpanel-summary-value"
                     crop="end"
                     flex="1"/>
            </hbox>
            <vbox id="all-headers" flex="1"/>
          </vbox>
        </tabpanel>
        <tabpanel id="cookies-tabpanel"
                  class="tabpanel-content">
          <vbox flex="1">
            <vbox id="all-cookies" flex="1"/>
          </vbox>
        </tabpanel>
        <tabpanel id="params-tabpanel"
                  class="tabpanel-content">
          <vbox flex="1">
            <vbox id="request-params-box" flex="1" hidden="true">
              <vbox id="request-params" flex="1"/>
            </vbox>
            <vbox id="request-post-data-textarea-box" flex="1" hidden="true">
              <vbox id="request-post-data-textarea" flex="1"/>
            </vbox>
          </vbox>
        </tabpanel>
        <tabpanel id="response-tabpanel"
                  class="tabpanel-content">
          <vbox flex="1">
            <label id="response-content-info-header"/>
            <vbox id="response-content-json-box" flex="1" hidden="true">
              <vbox id="response-content-json" flex="1"/>
            </vbox>
            <vbox id="response-content-textarea-box" flex="1" hidden="true">
              <vbox id="response-content-textarea" flex="1"/>
            </vbox>
            <vbox id="response-content-image-box" flex="1" hidden="true">
              <image id="response-content-image"/>
              <hbox>
                <label class="plain tabpanel-summary-label"
                       value="&netmonitorUI.response.name;"/>
                <label id="response-content-image-name-value"
                       class="plain tabpanel-summary-value"
                       crop="end"
                       flex="1"/>
              </hbox>
              <hbox>
                <label class="plain tabpanel-summary-label"
                       value="&netmonitorUI.response.dimensions;"/>
                <label id="response-content-image-dimensions-value"
                       class="plain tabpanel-summary-value"
                       crop="end"
                       flex="1"/>
              </hbox>
              <hbox>
                <label class="plain tabpanel-summary-label"
                       value="&netmonitorUI.response.mime;"/>
                <label id="response-content-image-mime-value"
                       class="plain tabpanel-summary-value"
                       crop="end"
                       flex="1"/>
              </hbox>
              <hbox>
                <label class="plain tabpanel-summary-label"
                       value="&netmonitorUI.response.encoding;"/>
                <label id="response-content-image-encoding-value"
                       class="plain tabpanel-summary-value"
                       crop="end"
                       flex="1"/>
              </hbox>
            </vbox>
          </vbox>
        </tabpanel>
        <tabpanel id="timings-tabpanel"
                  class="tabpanel-content">
          <vbox flex="1">
            <hbox id="timings-summary-blocked"
                  class="tabpanel-summary-container"
                  align="center">
              <label class="plain tabpanel-summary-label"
                     value="&netmonitorUI.timings.blocked;"/>
              <hbox class="requests-menu-timings-box blocked"/>
              <label class="plain requests-menu-timings-total"/>
            </hbox>
            <hbox id="timings-summary-dns"
                  class="tabpanel-summary-container"
                  align="center">
              <label class="plain tabpanel-summary-label"
                     value="&netmonitorUI.timings.dns;"/>
              <hbox class="requests-menu-timings-box dns"/>
              <label class="plain requests-menu-timings-total"/>
            </hbox>
            <hbox id="timings-summary-connect"
                  class="tabpanel-summary-container"
                  align="center">
              <label class="plain tabpanel-summary-label"
                     value="&netmonitorUI.timings.connect;"/>
              <hbox class="requests-menu-timings-box connect"/>
              <label class="plain requests-menu-timings-total"/>
            </hbox>
            <hbox id="timings-summary-send"
                  class="tabpanel-summary-container"
                  align="center">
              <label class="plain tabpanel-summary-label"
                     value="&netmonitorUI.timings.send;"/>
              <hbox class="requests-menu-timings-box send"/>
              <label class="plain requests-menu-timings-total"/>
            </hbox>
            <hbox id="timings-summary-wait"
                  class="tabpanel-summary-container"
                  align="center">
              <label class="plain tabpanel-summary-label"
                     value="&netmonitorUI.timings.wait;"/>
              <hbox class="requests-menu-timings-box wait"/>
              <label class="plain requests-menu-timings-total"/>
            </hbox>
            <hbox id="timings-summary-receive"
                  class="tabpanel-summary-container"
                  align="center">
              <label class="plain tabpanel-summary-label"
                     value="&netmonitorUI.timings.receive;"/>
              <hbox class="requests-menu-timings-box receive"/>
              <label class="plain requests-menu-timings-total"/>
            </hbox>
          </vbox>
        </tabpanel>
      </tabpanels>
    </tabbox>
  </box>

</window>
