Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: UI Fix for Team City Integrations Create Page #3024

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,10 @@ export const TeamcityConfigurePage = () => {
}
};

const filteredBuildConfigs = targetBuildConfigs?.concat({
name: "",
buildConfigId: ""
});

return integrationAuth &&
selectedSourceEnvironment &&
integrationAuthApps &&
filteredBuildConfigs &&
targetBuildConfigs &&
targetAppId ? (
<div className="flex h-full w-full items-center justify-center">
<Helmet>
Expand Down Expand Up @@ -185,7 +180,7 @@ export const TeamcityConfigurePage = () => {
))
) : (
<SelectItem value="none" key="target-app-none">
No project found
No projects found
</SelectItem>
)}
</Select>
Expand All @@ -195,15 +190,22 @@ export const TeamcityConfigurePage = () => {
value={targetBuildConfigId}
onValueChange={(val) => setTargetBuildConfigId(val)}
className="w-full border border-mineshaft-500"
isDisabled={targetBuildConfigs.length === 0}
>
{filteredBuildConfigs.map((buildConfig: any) => (
<SelectItem
value={buildConfig.buildConfigId}
key={`target-build-config-${buildConfig.buildConfigId}`}
>
{buildConfig.name}
{targetBuildConfigs.length ? (
targetBuildConfigs.map((buildConfig: any) => (
<SelectItem
value={buildConfig.buildConfigId}
key={`target-build-config-${buildConfig.buildConfigId}`}
>
{buildConfig.name}
</SelectItem>
))
) : (
<SelectItem value="none" key="target-app-none">
No build configs found
</SelectItem>
))}
)}
</Select>
</FormControl>
<Button
Expand Down
Loading