diff --git a/client/src/components/pipelines/browser/Pipeline.js b/client/src/components/pipelines/browser/Pipeline.js index 1e88f6e438..7e89519514 100644 --- a/client/src/components/pipelines/browser/Pipeline.js +++ b/client/src/components/pipelines/browser/Pipeline.js @@ -54,6 +54,14 @@ import HiddenObjects from '../../../utils/hidden-objects'; import CloneForm from './forms/CloneForm'; import styles from './Browser.css'; +const LATEST_VERSION_PLACEHOLDER = { + id: 'latest', + key: 'latest', + name: 'latest', + commitId: 'latest', + type: ItemTypes.version +}; + @connect({ pipelinesLibrary, folders, @@ -91,7 +99,8 @@ export default class Pipeline extends localization.LocalizedReactComponent { onReloadTree: PropTypes.func, selectedVersion: PropTypes.string, selectedConfiguration: PropTypes.string, - configurationSelectionMode: PropTypes.bool + configurationSelectionMode: PropTypes.bool, + allowSelectLatestVersion: PropTypes.bool }; state = { @@ -152,6 +161,9 @@ export default class Pipeline extends localization.LocalizedReactComponent { key: 'createdDate', className: `${styles.treeItemName}`, render: (text, item) => { + if (item.id === LATEST_VERSION_PLACEHOLDER.id) { + return null; + } return this.renderTreeItemText( Last updated: { @@ -218,6 +230,9 @@ export default class Pipeline extends localization.LocalizedReactComponent { key: 'createdDate', className: styles.treeItemName, render: (text, item) => { + if (item.id === LATEST_VERSION_PLACEHOLDER.id) { + return null; + } return this.renderTreeItemText( Last updated: {item.author && 'by '} @@ -296,7 +311,7 @@ export default class Pipeline extends localization.LocalizedReactComponent { const configurations = this.state.configurations[item.id].list; return (