Skip to content

Commit b2c7239

Browse files
Merge master into feature/cwltail
2 parents ee562be + 1a00852 commit b2c7239

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

packages/core/src/awsService/ec2/utils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ export function getIconCode(instance: SafeEc2Instance) {
1818
return 'circle-slash'
1919
}
2020

21+
if (instance.LastSeenStatus === 'terminated') {
22+
return 'stop'
23+
}
24+
2125
return 'loading~spin'
2226
}
2327

packages/core/src/test/awsService/ec2/utils.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,14 @@ describe('utils', async function () {
2828
InstanceId: 'XX',
2929
LastSeenStatus: 'stopped',
3030
}
31+
const terminatedInstance: SafeEc2Instance = {
32+
InstanceId: 'XXX',
33+
LastSeenStatus: 'terminated',
34+
}
3135

3236
assert.strictEqual(getIconCode(runningInstance), 'pass')
3337
assert.strictEqual(getIconCode(stoppedInstance), 'circle-slash')
38+
assert.strictEqual(getIconCode(terminatedInstance), 'stop')
3439
})
3540

3641
it('defaults to loading~spin', function () {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "EC2: terminated instances no longer show pending icon"
4+
}

0 commit comments

Comments
 (0)