Skip to content

Commit

Permalink
Do not show Restart if not running (#519)
Browse files Browse the repository at this point in the history
  • Loading branch information
Janaka-Steph authored Nov 8, 2023
1 parent 993f029 commit 96c7b32
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/modules/service/components/ServiceActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,15 @@ const ServiceActions = ({
<img src={cross} alt="cross" width={22} height={22} className="w-6 h-6" />
</button>
<ul className={clsx("dropdown-menu", { "dropdown-active": dropdownOpen })}>
<li>
<button onClick={onRestart}>Restart</button>
</li>
{status === "running" && isDetailView && (
<li>
<button onClick={onStop}>Stop</button>
</li>
<>
<li>
<button onClick={onRestart}>Restart</button>
</li>
<li>
<button onClick={onStop}>Stop</button>
</li>
</>
)}
{status === "stopped" && (
<li>
Expand Down

0 comments on commit 96c7b32

Please sign in to comment.