Skip to content

Commit bb443b4

Browse files
Merge branch 'dev-v3' into main
2 parents 52f22db + 68625e8 commit bb443b4

File tree

7 files changed

+68
-230
lines changed

7 files changed

+68
-230
lines changed

infra/scripts/Team-Config-And-Data.ps1

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,28 @@ function Get-ValuesFromAzdEnv {
4848
return $true
4949
}
5050

51+
function Get-DeploymentValue {
52+
param(
53+
[object]$DeploymentOutputs,
54+
[string]$PrimaryKey,
55+
[string]$FallbackKey
56+
)
57+
58+
$value = $null
59+
60+
# Try primary key first
61+
if ($DeploymentOutputs.PSObject.Properties[$PrimaryKey]) {
62+
$value = $DeploymentOutputs.$PrimaryKey.value
63+
}
64+
65+
# If primary key failed, try fallback key
66+
if (-not $value -and $DeploymentOutputs.PSObject.Properties[$FallbackKey]) {
67+
$value = $DeploymentOutputs.$FallbackKey.value
68+
}
69+
70+
return $value
71+
}
72+
5173
function Get-ValuesFromAzDeployment {
5274
Write-Host "Getting values from Azure deployment outputs..."
5375

@@ -67,12 +89,12 @@ function Get-ValuesFromAzDeployment {
6789
return $false
6890
}
6991

70-
# Extract specific outputs
71-
$script:storageAccount = $deploymentOutputs.azurE_STORAGE_ACCOUNT_NAME.value
72-
$script:blobContainer = $deploymentOutputs.azurE_STORAGE_CONTAINER_NAME.value
73-
$script:aiSearch = $deploymentOutputs.azurE_AI_SEARCH_NAME.value
74-
$script:aiSearchIndex = $deploymentOutputs.azurE_AI_SEARCH_INDEX_NAME.value
75-
$script:backendUrl = $deploymentOutputs.backenD_URL.value
92+
# Extract specific outputs with fallback logic
93+
$script:storageAccount = Get-DeploymentValue -DeploymentOutputs $deploymentOutputs -PrimaryKey "azurE_STORAGE_ACCOUNT_NAME" -FallbackKey "azureStorageAccountName"
94+
$script:blobContainer = Get-DeploymentValue -DeploymentOutputs $deploymentOutputs -PrimaryKey "azurE_STORAGE_CONTAINER_NAME" -FallbackKey "azureStorageContainerName"
95+
$script:aiSearch = Get-DeploymentValue -DeploymentOutputs $deploymentOutputs -PrimaryKey "azurE_AI_SEARCH_NAME" -FallbackKey "azureAiSearchName"
96+
$script:aiSearchIndex = Get-DeploymentValue -DeploymentOutputs $deploymentOutputs -PrimaryKey "azurE_AI_SEARCH_INDEX_NAME" -FallbackKey "azureAiSearchIndexName"
97+
$script:backendUrl = Get-DeploymentValue -DeploymentOutputs $deploymentOutputs -PrimaryKey "backenD_URL" -FallbackKey "backendUrl"
7698

7799
# Validate that we extracted all required values
78100
if (-not $script:storageAccount -or -not $script:blobContainer -or -not $script:aiSearch -or -not $script:aiSearchIndex -or -not $script:backendUrl) {

infra/scripts/team_config_and_data.sh

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,19 @@ get_values_from_azd_env() {
4747
return 0
4848
}
4949

50+
# Helper function to extract value with fallback
51+
extract_value() {
52+
local primary_key="$1"
53+
local fallback_key="$2"
54+
local result
55+
56+
result=$(echo "$deploymentOutputs" | grep -A 3 "\"$primary_key\"" | grep '"value"' | sed 's/.*"value": *"\([^"]*\)".*/\1/')
57+
if [ -z "$result" ]; then
58+
result=$(echo "$deploymentOutputs" | grep -A 3 "\"$fallback_key\"" | grep '"value"' | sed 's/.*"value": *"\([^"]*\)".*/\1/')
59+
fi
60+
echo "$result"
61+
}
62+
5063
get_values_from_az_deployment() {
5164
echo "Getting values from Azure deployment outputs..."
5265

@@ -66,12 +79,12 @@ get_values_from_az_deployment() {
6679
return 1
6780
fi
6881

69-
# Extract specific outputs
70-
storageAccount=$(echo "$deploymentOutputs" | grep -A 3 '"azurE_STORAGE_ACCOUNT_NAME"' | grep '"value"' | sed 's/.*"value": *"\([^"]*\)".*/\1/')
71-
blobContainer=$(echo "$deploymentOutputs" | grep -A 3 '"azurE_STORAGE_CONTAINER_NAME"' | grep '"value"' | sed 's/.*"value": *"\([^"]*\)".*/\1/')
72-
aiSearch=$(echo "$deploymentOutputs" | grep -A 3 '"azurE_AI_SEARCH_NAME"' | grep '"value"' | sed 's/.*"value": *"\([^"]*\)".*/\1/')
73-
aiSearchIndex=$(echo "$deploymentOutputs" | grep -A 3 '"azurE_AI_SEARCH_INDEX_NAME"' | grep '"value"' | sed 's/.*"value": *"\([^"]*\)".*/\1/')
74-
backendUrl=$(echo "$deploymentOutputs" | grep -A 3 '"backenD_URL"' | grep '"value"' | sed 's/.*"value": *"\([^"]*\)".*/\1/')
82+
# Extract all values using the helper function
83+
storageAccount=$(extract_value "azurE_STORAGE_ACCOUNT_NAME" "azureStorageAccountName")
84+
blobContainer=$(extract_value "azurE_STORAGE_CONTAINER_NAME" "azureStorageContainerName")
85+
aiSearch=$(extract_value "azurE_AI_SEARCH_NAME" "azureAiSearchName")
86+
aiSearchIndex=$(extract_value "azurE_AI_SEARCH_INDEX_NAME" "azureAiSearchIndexName")
87+
backendUrl=$(extract_value "backenD_URL" "backendUrl")
7588

7689
# Validate that we extracted all required values
7790
if [ -z "$storageAccount" ] || [ -z "$blobContainer" ] || [ -z "$aiSearch" ] || [ -z "$aiSearchIndex" ] || [ -z "$backendUrl" ]; then

src/backend/app_kernel.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ async def lifespan(app: FastAPI):
7474
logging.WARNING
7575
)
7676

77+
logging.getLogger("opentelemetry.sdk").setLevel(
78+
logging.ERROR
79+
)
80+
7781
# Initialize the FastAPI app
7882
app = FastAPI(lifespan=lifespan)
7983

src/frontend/src/components/common/TeamSelector.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import {
2929
} from '@fluentui/react-components';
3030
import {
3131
ChevronUpDown16Regular,
32-
MoreHorizontal20Regular,
32+
DeleteRegular,
3333
Search20Regular,
3434
Dismiss20Regular,
3535
CheckmarkCircle20Filled,
@@ -475,21 +475,21 @@ const TeamSelector: React.FC<TeamSelectorProps> = ({
475475
mountNode={document.querySelector('[role="dialog"]') || undefined}
476476
>
477477
<Button
478-
icon={<MoreHorizontal20Regular />}
478+
icon={<DeleteRegular />}
479479
appearance="subtle"
480480
size="small"
481481
disabled={true}
482-
className={`${styles.moreButton} ${styles.moreButtonDisabled || ''}`}
482+
className={`${styles.deleteButton} ${styles.deleteButtonDisabled || ''}`}
483483
onClick={(e: React.MouseEvent) => e.stopPropagation()}
484484
/>
485485
</Tooltip>
486486
) : (
487487
<Button
488-
icon={<MoreHorizontal20Regular />}
488+
icon={<DeleteRegular />}
489489
appearance="subtle"
490490
size="small"
491491
onClick={(e: React.MouseEvent) => handleDeleteTeam(team, e)}
492-
className={styles.moreButton}
492+
className={styles.deleteButton}
493493
/>
494494
)}
495495
</div>

src/frontend/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const AppWrapper = () => {
3535
setEnvData(config);
3636
setApiUrl(config.API_URL);
3737
setConfig(config);
38-
let defaultUserInfo = config.ENABLE_AUTH ? await getUserInfo() : ({} as UserInfo);
38+
let defaultUserInfo = await getUserInfo()
3939
window.userInfo = defaultUserInfo;
4040
setUserInfoGlobal(defaultUserInfo);
4141
const browserLanguage = await apiService.sendUserBrowserLanguage();

src/frontend/src/styles/TeamSelector.module.css

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,8 @@
391391
min-height: auto !important;
392392
}
393393

394-
/* More Button Column */
395-
.moreButton {
394+
/* Delete Button Column */
395+
.deleteButton {
396396
color: var(--colorNeutralForeground2) !important;
397397
background-color: transparent !important;
398398
min-width: 32px !important;
@@ -403,18 +403,18 @@
403403
margin-top: 2px;
404404
}
405405

406-
.moreButton:hover {
407-
background-color: var(--colorNeutralBackground3) !important;
408-
color: var(--colorNeutralForeground1) !important;
406+
.deleteButton:hover {
407+
background-color: var(--colorPaletteRedBackground2) !important;
408+
color: var(--colorPaletteRedForeground1) !important;
409409
}
410-
.moreButtonDisabled {
410+
.deleteButtonDisabled {
411411
color: var(--colorNeutralForeground4) !important;
412412
background-color: transparent !important;
413413
cursor: not-allowed !important;
414414
opacity: 0.6 !important;
415415
}
416416

417-
.moreButtonDisabled:hover {
417+
.deleteButtonDisabled:hover {
418418
background-color: transparent !important;
419419
color: var(--colorNeutralForeground4) !important;
420420
opacity: 0.6 !important;

0 commit comments

Comments
 (0)