Skip to content

Commit 648cfc2

Browse files
mujacicajerryzhou196
authored andcommitted
fix(playstation): Show warning when connection is good, but no errors (#104096)
* Show warning when connection is good, but no errors are available
1 parent d7a9c7a commit 648cfc2

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

static/app/views/settings/project/tempest/CredentialRow.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,15 @@ export function CredentialRow({
6767
}
6868

6969
type StatusTagProps = {
70-
statusType: 'error' | 'success' | 'pending';
70+
statusType: 'error' | 'success' | 'pending' | 'warning';
7171
message?: string;
7272
};
7373

7474
const STATUS_CONFIG = {
7575
error: {label: 'Error', type: 'error'},
7676
success: {label: 'Active', type: 'default'},
7777
pending: {label: 'Pending', type: 'info'},
78+
warning: {label: 'Active', type: 'warning'},
7879
} as const;
7980

8081
function StatusTag({statusType, message}: StatusTagProps) {
@@ -95,5 +96,13 @@ function getStatusType(credential: {
9596
return 'pending';
9697
}
9798

98-
return credential.messageType === MessageType.ERROR ? 'error' : 'success';
99+
if (credential.messageType === MessageType.ERROR) {
100+
return 'error';
101+
}
102+
103+
if (credential.messageType === MessageType.WARNING) {
104+
return 'warning';
105+
}
106+
107+
return 'success';
99108
}

static/app/views/settings/project/tempest/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
export enum MessageType {
22
SUCCESS = 'success',
33
ERROR = 'error',
4+
WARNING = 'warning',
5+
INFO = 'info',
46
}
57

68
export type TempestCredentials = {

0 commit comments

Comments
 (0)