params-tab.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. "use strict";
  5. const React = require("devtools/client/shared/vendor/react");
  6. const NetInfoParams = React.createFactory(require("./net-info-params"));
  7. // Shortcuts
  8. const DOM = React.DOM;
  9. const PropTypes = React.PropTypes;
  10. /**
  11. * This template represents 'Params' tab displayed when the user
  12. * expands network log in the Console panel. It's responsible for
  13. * displaying URL parameters (query string).
  14. */
  15. var ParamsTab = React.createClass({
  16. propTypes: {
  17. data: PropTypes.shape({
  18. request: PropTypes.object.isRequired
  19. })
  20. },
  21. displayName: "ParamsTab",
  22. render() {
  23. let data = this.props.data;
  24. return (
  25. DOM.div({className: "paramsTabBox"},
  26. DOM.div({className: "panelContent"},
  27. NetInfoParams({params: data.request.queryString})
  28. )
  29. )
  30. );
  31. }
  32. });
  33. // Exports from this module
  34. module.exports = ParamsTab;