Merge remote-tracking branch 'primary/master' into JENKINS-35860-extension-point-types

This commit is contained in:
kzantow 2016-07-17 10:48:33 -06:00
commit 2a808b2295
6 changed files with 13 additions and 30 deletions

View File

@ -35,7 +35,7 @@
"skin-deep": "^0.16.0"
},
"dependencies": {
"@jenkins-cd/design-language": "0.0.62",
"@jenkins-cd/design-language": "0.0.63",
"@jenkins-cd/js-extensions": "0.0.19-beta-2",
"@jenkins-cd/js-modules": "0.0.5",
"@jenkins-cd/sse-gateway": "0.0.5",

View File

@ -18,18 +18,9 @@ const EmptyState = () => (
*/
export class RunDetailsTests extends Component {
componentWillMount() {
if (this.context.config) {
this.props.fetchTestResults(
this.context.config,
{
isMultiBranch: this.props.isMultiBranch,
organization: this.props.params.organization,
pipeline: this.props.params.pipeline,
branch: this.props.params.branch,
runId: this.props.params.runId,
}
);
}
this.props.fetchTestResults(
this.props.result
);
}
componentWillUnmount() {

View File

@ -72,11 +72,11 @@ export default class Node extends Component {
}
const { config = {} } = this.context;
const {
isFocused = false,
title,
durationInMillis,
result,
id,
isFocused,
state,
} = node;

View File

@ -1,11 +1,10 @@
import keymirror from 'keymirror';
import fetch from 'isomorphic-fetch';
import { State } from '../components/records';
import UrlConfig from '../config';
import { getNodesInformation } from '../util/logDisplayHelper';
import { calculateStepsBaseUrl, calculateLogUrl, calculateNodeBaseUrl, buildUrl } from '../util/UrlUtils';
import { calculateStepsBaseUrl, calculateLogUrl, calculateNodeBaseUrl } from '../util/UrlUtils';
// main actin logic
export const ACTION_TYPES = keymirror({
@ -798,17 +797,10 @@ export const actions = {
};
},
fetchTestResults(config, runDetails) {
fetchTestResults(run) {
return (dispatch) => {
const baseUrl = `${config.getAppURLBase()}/rest/organizations/`;
let url;
if (runDetails.isMultiBranch) {
// eslint-disable-next-line max-len
url = `${baseUrl}${buildUrl(runDetails.organization, 'pipelines', runDetails.pipeline, 'branches', runDetails.branch, 'runs', runDetails.runId)}/testReport/result`;
} else {
// eslint-disable-next-line max-len
url = `${baseUrl}${buildUrl(runDetails.organization, 'pipelines', runDetails.branch, 'runs', runDetails.runId)}/testReport/result`;
}
const baseUrl = UrlConfig.jenkinsRootURL;
const url = `${baseUrl}${run._links.self.href}testReport/result`;
return dispatch(actions.generateData(
url,

View File

@ -34,7 +34,7 @@
"react-addons-test-utils": "15.0.1"
},
"dependencies": {
"@jenkins-cd/design-language": "0.0.60",
"@jenkins-cd/design-language": "0.0.63",
"@jenkins-cd/js-extensions": "0.0.17-beta-1",
"@jenkins-cd/js-modules": "0.0.5",
"@jenkins-cd/sse-gateway": "0.0.5",

View File

@ -25,7 +25,7 @@
"zombie": "^4.2.1"
},
"dependencies": {
"@jenkins-cd/design-language": "0.0.62",
"@jenkins-cd/design-language": "0.0.63",
"@jenkins-cd/js-extensions": "0.0.19-beta-2",
"@jenkins-cd/js-modules": "0.0.5",
"history": "2.0.2",