Exemple #1
0
  componentWillMount: function() {
    // if our url contains a hash, show that tab
    var selected_item_from_hash = MenuUtils.selectItemFromHash(
      window.location.hash, this.menuItems);

    // when we first came to this page, which tab was shown? Used by the
    // initial data fetching within tabs
    this.initialTab = selected_item_from_hash || 'Commits';

    this.setState({ selectedItem: this.initialTab });

    // initialize our paging objects. Data fetching still doesn't happen
    // till componentDidMount (either ours or the subcomponent.)
    this.setState({
      buildsInteractive: InteractiveData(
        this,
        'buildsInteractive',
        BuildsTab.getEndpoint(this.props.projectSlug)),

      commitsInteractive: InteractiveData(
        this,
        'commitsInteractive',
        CommitsTab.getEndpoint(this.props.projectSlug))
    });
  },
  componentWillMount: function() {
    var selectedItemFromHash = MenuUtils.selectItemFromHash(
      window.location.hash, this.menuItems);

    // when we first came to this page, which tab was shown? Used by the
    // initial data fetching within tabs
    this.initialTab = selectedItemFromHash || NOT_PASSING_TESTS;

    this.setState({ selectedItem: this.initialTab });

    this.setState({
      testList : InteractiveData(this,
        'testList',
        `/api/0/builds/${this.props.buildID}/tests/`),
      targetList : InteractiveData(this,
        'targetList',
        `/api/0/builds/${this.props.buildID}/targets/`),
    });
  },
  componentWillMount: function() {
    var projectID = this.props.projectUUID;
    var testHash = this.props.testHash;

    var historyEndpoint = `/api/0/projects/${projectID}/tests/${testHash}/history/` +
      '?per_page=100&branch=master';

    this.setState({
      history: InteractiveData(this,
        'history',
        historyEndpoint),
    });
  },