Skip to content

Commit 8ca33cd

Browse files
authored
Merge branch 'main' into add_repo_move_statement
2 parents 7f52f80 + 9b20b3e commit 8ca33cd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+39904
-15569
lines changed

AI/GenAI-ChatBot-application-sample/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ To get started, you need to configure one of the supported login providers. Conf
6565
- CLERK_SECRET_KEY=YOUR_CLERK_SECRET_KEY
6666
- NEXT_PUBLIC_CLERK_TEMPLATE=YOUR_CLERK_TEMPLATE
6767

68+
## Change the application UI language
69+
The sample application uses the i18next library to add internationalization capability. To configure the application user interface to use a different language, follow these steps:
70+
71+
1. In the `.env.local` file, set the NEXT_PUBLIC_LANGUAGE variable to your selected language. The default language is en.
72+
2. Copy any existing `genAi.json` file and create a new `genAi.json` file containing the UI text. Store the file in `src/locales/<YOUR_SELECTED_LANGUAGE>/`.
73+
3. Translate all UI text in the `genAi.json` file to your preferred language.
74+
4. Reload the sample application.
75+
6876
## Install the application
6977
To install the sample application, run the following command:
7078

AI/GenAI-ChatBot-application-sample/package-lock.json

Lines changed: 56 additions & 56 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AI/GenAI-ChatBot-application-sample/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,25 @@
1414
"@types/react-redux": "^7.1.34",
1515
"aws-amplify": "5.3.11",
1616
"cross-env": "^7.0.3",
17-
"html-react-parser": "^5.2.2",
17+
"html-react-parser": "^5.2.3",
1818
"i18next": "^24.2.3",
1919
"i18next-resources-to-backend": "^1.2.1",
2020
"moment": "^2.30.1",
21-
"next": "15.2.2",
21+
"next": "15.2.4",
2222
"next-i18n-router": "^5.5.1",
2323
"react": "^19",
2424
"react-dom": "^19",
2525
"react-i18next": "^15.4.1",
2626
"react-redux": "^9.2.0",
27-
"sass": "^1.85.1"
27+
"sass": "^1.86.3"
2828
},
2929
"devDependencies": {
3030
"@svgr/webpack": "^8.1.0",
3131
"@types/node": "^22",
3232
"@types/react": "^19",
3333
"@types/react-dom": "^19",
3434
"eslint": "^9",
35-
"eslint-config-next": "15.2.2",
35+
"eslint-config-next": "15.2.4",
3636
"typescript": "^5"
3737
}
3838
}

Management-Utilities/fsx-ontap-aws-cli-scripts/create_fsxn_filesystem

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,13 @@ if [ $size -lt $minSize ]; then
221221
usage
222222
fi
223223

224-
echo aws fsx create-file-system --output=json --file-system-type ONTAP --storage-capacity $size --subnet-ids $subnetID1 $subnetID2 --storage-type SSD --tags "Key=Name,Value=$fileSystemName" $securityGroupOption --ontap-configuration '{
224+
aws fsx create-file-system --output=json --file-system-type ONTAP --storage-capacity $size --subnet-ids $subnetID1 $subnetID2 --storage-type SSD --tags "Key=Name,Value=$fileSystemName" $securityGroupOption --ontap-configuration '{
225225
"PreferredSubnetId": "'$subnetID1'",
226226
'$endpointips'
227227
"DeploymentType": "'$azType'",
228228
"HAPairs": '$numPairs',
229-
"ThroughputCapacityPerHAPair": '$throughput'}' --region=$region
230-
# "ThroughputCapacityPerHAPair": '$throughput'}' --region=$region > $tmpout 2>&1
231-
exit
229+
"ThroughputCapacityPerHAPair": '$throughput'}' --region=$region > $tmpout 2>&1
230+
232231
if [ $? != "0" ]; then
233232
echo "Failed to create FSxN file system." 1>&2
234233
cat $tmpout 1>&2

Management-Utilities/fsx-ontap-aws-cli-scripts/list_fsxn_svms

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# o Region
1919
# o File system ID
2020
# o File System Name - optional
21+
# o The managment and NAS IP address of the SVM - optional
2122
# o SVM ID
2223
# o SVM Name
2324
################################################################################
@@ -27,9 +28,10 @@
2728
################################################################################
2829
usage () {
2930
cat 1>&2 <<EOF
30-
Usage $(basename $0) [-r region] [-a] [-n] [-i fileSystemID] [-f fileSystemName]
31+
Usage $(basename $0) [-r region] [-a] [-n] [-p] [-i fileSystemID] [-f fileSystemName]
3132
Where: -a means all regions
3233
-n means to include file systems name
34+
-p means to include the management and NAS IP address
3335
-i means to only include SVMs that reside under the FSxN file system with the fileSystemID.
3436
-f means to only include SVMs that reside under the FSxN file system with the file system name.
3537
EOF
@@ -55,15 +57,18 @@ fi
5557
# Process command line arguments.
5658
allRegions=false
5759
includeFsName=false
60+
includeIp=false
5861
region=$(aws configure list | egrep '^.*egion ' | awk '{print $2}')
59-
while getopts "hanr:i:f:" option; do
62+
while getopts "hanr:i:f:p" option; do
6063
case "$option" in
6164
r) region="$OPTARG"
6265
;;
6366
a) allRegions=true
6467
;;
6568
n) includeFsName=true
6669
;;
70+
p) includeIp=true
71+
;;
6772
i) fileSystemID="$OPTARG"
6873
;;
6974
f) fileSystemName="$OPTARG"
@@ -99,27 +104,41 @@ if [ "$allRegions" = "true" ]; then
99104
else
100105
regions=($region)
101106
fi
102-
103-
if [ ! -z "$fileSystemName" ]; then
104-
fileSystemID=$(aws fsx describe-file-systems --output=json --region=$region 2> /dev/null | jq -r '.FileSystems[] | if((.Tags[] | select(.Key == "Name") .Value) == "'"${fileSystemName}"'") then .FileSystemId else empty end' 2> /dev/null)
105-
if [ -z "$fileSystemID" ]; then
106-
echo "Error, failed to find a file system with the name '$fileSystemName'. Maybe in a different region?" 1>&2
107-
exit 1
108-
fi
109-
fi
110107
#
111108
# Loop on all the regions.
112109
for region in ${regions[*]}; do
110+
if [ ! -z "$fileSystemName" ]; then
111+
fileSystemID=$(aws fsx describe-file-systems --output=json --region=$region 2> /dev/null | jq -r '.FileSystems[] | if((.Tags[] | select(.Key == "Name") .Value) == "'"${fileSystemName}"'") then .FileSystemId else empty end' 2> /dev/null)
112+
if [ -z "$fileSystemID" ]; then
113+
if [ "$allRegions" != "true" ]; then
114+
echo "Error, failed to find a file system with the name '$fileSystemName'. Maybe in a different region?" 1>&2
115+
exit 1
116+
else
117+
#
118+
# If there isn't a file system with that name in this region, then just skip region.
119+
continue
120+
fi
121+
fi
122+
fi
123+
113124
if [ -z "$fileSystemID" ]; then
114-
aws fsx describe-storage-virtual-machines --region=$region | jq -r '.StorageVirtualMachines[] | .FileSystemId + "," + .StorageVirtualMachineId + "," + .Name' | sort > $tmpout
125+
filter=""
126+
else
127+
filter="--filter Name=file-system-id,Values=$fileSystemID"
128+
fi
129+
aws fsx describe-storage-virtual-machines --region=$region $filter | jq -r '.StorageVirtualMachines[] | "\(.FileSystemId),\(.StorageVirtualMachineId),\(.Endpoints.Nfs.IpAddresses[0]),\(.Name)"' | sort > $tmpout
130+
if [ $includeIp == "true" ]; then
131+
ipFmt="%16s"
132+
ipHeader="IP"
115133
else
116-
aws fsx describe-storage-virtual-machines --region=$region | jq -r '.StorageVirtualMachines[] | if(.FileSystemId == "'$fileSystemID'") then .FileSystemId + "," + .StorageVirtualMachineId + "," + .Name else empty end' | sort > $tmpout
134+
ipFmt="%0s"
135+
ipHeader=""
117136
fi
118137

119138
if [ $includeFsName == "true" ]; then
120139
aws fsx describe-file-systems --region=$region | jq -r '.FileSystems[] | .FileSystemId + "," + (.Tags[] | select(.Key == "Name") .Value)' > $tmpout2
121-
awk -F, -v region=$region 'BEGIN {first=1; maxNameLen=0; while(getline < "'$tmpout2'") {fss[$1]=$2; if(length($2) > maxNameLen) {maxNameLen=length($2)}}; maxNameLen +=2; formatStr="%12s %20s%-"maxNameLen"s %23s %s\n"}; {if(first) {printf "\n"; printf formatStr, "Region", "FileSystem ID", "(Name)", "SVM ID", "SVM Name"; first=0}; name="("fss[$1]")"; printf formatStr, region, $1, name, $2, $3}' < $tmpout
140+
awk -F, -v region=$region -v ipFmt=$ipFmt -v ipHeader=$ipHeader 'BEGIN {first=1; maxNameLen=0; while(getline < "'$tmpout2'") {fss[$1]=$2; if(length($2) > maxNameLen) {maxNameLen=length($2)}}; maxNameLen +=2; formatStr="%12s %20s%-"maxNameLen"s %23s "ipFmt" %s\n"}; {if(first) {printf "\n"; printf formatStr, "Region", "FileSystem ID", "(Name)", "SVM ID", ipHeader, "SVM Name"; first=0}; if(ipHeader != "IP") {ip=""} else {ip=$3}; name="("fss[$1]")"; printf formatStr, region, $1, name, $2, ip, $4}' < $tmpout
122141
else
123-
awk -F, -v region=$region 'BEGIN {first=1; formatStr="%12s %23s %23s %s\n"}; {if(first) {printf "\n"; printf formatStr, "Region", "FileSystem ID", "SVM ID", "SVM Name"; first=0}; printf formatStr, region, $1, $2, $3}' < $tmpout
142+
awk -F, -v region=$region -v ipFmt=$ipFmt -v ipHeader=$ipHeader 'BEGIN {first=1; formatStr="%12s %23s %23s "ipFmt" %s\n"}; {if(first) {printf "\n"; printf formatStr, "Region", "FileSystem ID", "SVM ID", ipHeader, "SVM Name"; first=0}; if(ipHeader != "IP") {ip=""} else {ip=$3}; printf formatStr, region, $1, $2, ip, $4}' < $tmpout
124143
fi
125144
done

0 commit comments

Comments
 (0)