Skip to content

Commit

Permalink
Don't show detailed stats link if there are no stats (#1658)
Browse files Browse the repository at this point in the history
  • Loading branch information
zbynek committed Mar 19, 2024
1 parent 33ac55c commit 7bff115
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions plugins/plugin-site/src/components/PluginPageLayout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ function PluginPageLayout({plugin, children}) {
<div className="sidebarSection">
<PluginReadableInstalls currentInstalls={plugin.stats.currentInstalls}
percentage={plugin.stats.currentInstallPercentage} />
<div className="chart">
<LineChart
installations={plugin.stats.installations}
/>
</div>
<div className="label-link"><a href={`https://stats.jenkins.io/pluginversions/${plugin.name}.html`}>View detailed version information</a></div>
{(plugin.stats.installations || plugin.stats.installations === 0) && <>
<div className="chart">
<LineChart installations={plugin.stats.installations} />
</div>
<div className="label-link"><a href={`https://stats.jenkins.io/pluginversions/${plugin.name}.html`}>View detailed version information</a></div>
</>}
</div>
<div className="sidebarSection">
<h5>Links</h5>
Expand Down

0 comments on commit 7bff115

Please sign in to comment.