Skip to content

Commit bd1e674

Browse files
enhancement: disabled non-supported git-platforms
1 parent 107ae1f commit bd1e674

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

ui/src/features/git-platforms-operations/add-or-update-git-platform.tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,24 @@ export const AddOrUpdateGitPlatform = (addOrUpdateGitPlatformProps: AddOrUpdateG
3636
interface SupportedGitPlatform {
3737
name: string;
3838
url: string;
39+
isEnabled: boolean;
3940
}
4041

4142
const supportedGitPlatforms = [
4243
{
4344
name: "github",
44-
url: "https://github.com"
45+
url: "https://github.com",
46+
isEnabled: true
4547
},
4648
{
47-
name: "gitlab",
48-
url: "https://gitlab.com"
49+
name: "gitlab [upcoming]",
50+
url: "https://gitlab.com",
51+
isEnabled: false
4952
},
5053
{
51-
name: "bitbucket",
52-
url: "https://bitbucket.org"
54+
name: "bitbucket[upcoming]",
55+
url: "https://bitbucket.org",
56+
isEnabled: false
5357
}
5458
];
5559

@@ -130,7 +134,8 @@ export const AddOrUpdateGitPlatform = (addOrUpdateGitPlatformProps: AddOrUpdateG
130134
{
131135
supportedGitPlatforms.map((supportedGitPlatform: SupportedGitPlatform) =>
132136
(
133-
<MenuItem key={supportedGitPlatform.name} value={supportedGitPlatform.name}>
137+
<MenuItem key={supportedGitPlatform.name} value={supportedGitPlatform.name}
138+
disabled={!supportedGitPlatform.isEnabled}>
134139
{supportedGitPlatform.name}
135140
</MenuItem>
136141
)

0 commit comments

Comments
 (0)