Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const displayName = decodeURIComponent(run.pipeline);
// Messages
const branchLabel = run.pullRequest
? t('rundetail.header.pullRequest', { defaultValue: 'Pull Request' })
: t('rundetail.header.branch', { defaultValue: 'Branch' });
const commitLabel = t('rundetail.header.commit', { defaultValue: 'Commit' });
const dateFormatShort = t('common.date.readable.short', { defaultValue: 'MMM DD h:mma Z' });
const dateFormatLong = t('common.date.readable.long', { defaultValue: 'MMM DD YYYY h:mma Z' });
const activityUrl = `${UrlBuilder.buildPipelineUrl(run.organization, pipeline.fullName)}/activity`;
// Sub-trees
const title = (
<h1>
{AppConfig.showOrg() && (
<span>
<a>
{run.organization === AppConfig.getOrganizationName() ? AppConfig.getOrganizationDisplayName() : run.organization}
</a>
<span> / </span>
</span>
)}
</h1>
);
const branchUrl = `${UrlBuilder.buildPipelineUrl(run.organization, pipeline.fullName)}/activity?branch=${run.pipeline}`;
const labelClassName = run.pullRequest ? 'pullRequest' : '';
if (latestRun) {
status = latestRun.result === 'UNKNOWN' ? latestRun.state : latestRun.result;
startTime = latestRun.startTime;
estimatedDuration = latestRun.estimatedDurationInMillis;
commitId = latestRun.commitId;
} else {
status = 'NOT_BUILT';
}
const commitText = commitId ? commitId.substr(0, 7) : '';
const activityUrl = `/organizations/${encodeURIComponent(organizationName)}/` + `${encodeURIComponent(names.fullName)}/activity`;
let displayPath;
if (AppConfig.showOrg()) {
displayPath = `${organizationDisplayName}/${fullDisplayName}`;
} else {
displayPath = fullDisplayName;
}
// Calculate datetime of last run
// we need to make sure that we calculate with the correct time offset
const skewMillis = this.context.config.getServerBrowserTimeSkewMillis();
const dateFormatShort = t('common.date.readable.short', { defaultValue: 'MMM DD h:mma Z' });
const dateFormatLong = t('common.date.readable.long', { defaultValue: 'MMM DD YYYY h:mma Z' });
let runDateTime = null;
if (latestRun) {
pipelines.map(pipeline => {
const key = pipeline._links.self.href;
return ;
});
this.props.setTitle('Jenkins');
return (
<div>
<h1>
{translate('home.header.dashboard', { defaultValue: 'Dashboard' })}
{AppConfig.showOrg() && organizationName && ' / '}
{AppConfig.showOrg() && organizationName && orgLink}
</h1>
<div>
<div>
</div>
<input placeholder="Search pipelines..." value="{this.state.searchText}"> {
this.onChange(e.target.value ? e.target.value : '');
}}
/>
<div></div></div></div>
const baseUrl = UrlBuilder.buildPipelineUrl(organizationName, fullName);
const trendsEnabled = AppConfig.isFeatureEnabled('trends');
const pageTabLinks = [
{translate('pipelinedetail.common.tab.activity', { defaultValue: 'Activity' })},
{translate('pipelinedetail.common.tab.branches', { defaultValue: 'Branches' })},
{translate('pipelinedetail.common.tab.pullrequests', { defaultValue: 'Pull Requests' })},
trendsEnabled && {translate('pipelinedetail.common.tab.trends', { defaultValue: 'Trends' })},
];
const pageHeader = isReady ? (
<h1>
{AppConfig.showOrg() && (
<span>
{organizationDisplayName}
<span> / </span>
</span>
)}
</h1>
{classicConfigLink(pipeline)}
) : (
pipelines.map(pipeline => {
const key = pipeline._links.self.href;
return ;
});