diff --git a/scm-ui/src/repos/sources/containers/Content.js b/scm-ui/src/repos/sources/containers/Content.js index ed62e67609..97283a9145 100644 --- a/scm-ui/src/repos/sources/containers/Content.js +++ b/scm-ui/src/repos/sources/containers/Content.js @@ -68,6 +68,16 @@ class Content extends React.Component { const { showHistory, collapsed } = this.state; const icon = collapsed ? "fa-angle-right" : "fa-angle-down"; + const selector = file._links.history ? ( + + this.setShowHistoryState(changeShowHistory) + } + /> + ) : null; + return (
@@ -81,14 +91,7 @@ class Content extends React.Component { /> {file.name} -
- - this.setShowHistoryState(changeShowHistory) - } - /> -
+
{selector}
); @@ -149,16 +152,17 @@ class Content extends React.Component { const { showHistory } = this.state; const header = this.showHeader(); - const content = showHistory ? ( - - ) : ( - - ); + const content = + showHistory && file._links.history ? ( + + ) : ( + + ); const moreInformation = this.showMoreInformation(); return ( diff --git a/scm-ui/src/repos/sources/containers/HistoryView.js b/scm-ui/src/repos/sources/containers/HistoryView.js index 77806d38b2..7a5e971ed5 100644 --- a/scm-ui/src/repos/sources/containers/HistoryView.js +++ b/scm-ui/src/repos/sources/containers/HistoryView.js @@ -87,7 +87,6 @@ class HistoryView extends React.Component { } render() { - console.log(this.state); const { file } = this.props; const { loaded, error } = this.state;