mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
Change starting show screen progress bar condition (#8946)
* Show progress bar when max is not 0 Signed-off-by: Levi Harrison <git@leviharrison.dev> * Added semicolon Signed-off-by: Levi Harrison <git@leviharrison.dev>
This commit is contained in:
parent
a0bac4b488
commit
922f9babb1
|
@ -17,6 +17,17 @@ describe('Starting', () => {
|
|||
expect(progress).toHaveLength(0);
|
||||
});
|
||||
|
||||
it('shows progress bar when max is not 0', () => {
|
||||
const status: WALReplayData = {
|
||||
min: 0,
|
||||
max: 1,
|
||||
current: 0,
|
||||
};
|
||||
const starting = shallow(<StartingContent status={status} isUnexpected={false} />);
|
||||
const progress = starting.find(Progress);
|
||||
expect(progress).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('renders progress correctly', () => {
|
||||
const status: WALReplayData = {
|
||||
min: 0,
|
||||
|
|
|
@ -23,7 +23,7 @@ export const StartingContent: FC<StartingContentProps> = ({ status, isUnexpected
|
|||
<div className="text-center m-3">
|
||||
<div className="m-4">
|
||||
<h2>Starting up...</h2>
|
||||
{status?.current! > status?.min! ? (
|
||||
{status?.max! > 0 ? (
|
||||
<div>
|
||||
<p>
|
||||
Replaying WAL ({status?.current}/{status?.max})
|
||||
|
|
Loading…
Reference in a new issue