Skip to content

Commit

Permalink
Syncing changes from private repo: Tue Dec 10 11:35:21 UTC 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
Varun-Kumar-R authored and Varun-Kumar-R committed Dec 10, 2024
1 parent b55bb2d commit 8ab2020
Show file tree
Hide file tree
Showing 37 changed files with 741 additions and 348 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@ running benchmarks, and viewing results.
Though the materials provided herein are not supported by the IBM Service organization, your comments are welcomed by the developers, who reserve the right to revise or remove the materials at any time. For reporting a problem, providing suggestions, or comments regarding the IBM Cloud Virtual Servers for VPC Sandbox, users can open a [GitHub issue](https://github.com/IBM-Cloud/sandbox-benchmark-for-vpc/issues). All issues will be addressed as best effort by developers.

Please note that there are no warranties of any kind, and there is no service or technical support available for these materials from IBM. As a recommended practice, carefully review any materials before using them.

4 changes: 2 additions & 2 deletions backend/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/IBM-Cloud/sandbox-benchmark-dashboard-for-vpc
module github.ibm.com/workload-eng-services/sandbox

go 1.21.6

Expand All @@ -7,7 +7,7 @@ require (
github.com/IBM/vpc-go-sdk v0.50.0
github.com/bramvdbogaerde/go-scp v1.4.0
github.com/go-playground/validator/v10 v10.19.0
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/golang-jwt/jwt/v4 v4.5.1
github.com/gorilla/mux v1.8.1
github.com/lib/pq v1.10.9
github.com/rs/cors v1.11.0
Expand Down
91 changes: 91 additions & 0 deletions backend/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
github.com/IBM/go-sdk-core/v5 v5.16.3 h1:GJI62GNAagX2xeTMpTACIqki5rDVO3YbxzMuIpAXSrQ=
github.com/IBM/go-sdk-core/v5 v5.16.3/go.mod h1:aojBkkq4HXkOYdn7YZ6ve8cjPWHdcB3tt8v0b9Cbac8=
github.com/IBM/vpc-go-sdk v0.50.0 h1:+vnXYK0FXFXYqaS/5/X1XEqH0bbRotkzkerRk21ZEjE=
github.com/IBM/vpc-go-sdk v0.50.0/go.mod h1:iBg9UJY1y/XpkweyP6YH7G6guzKPV8BYDoBMTdPupH4=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
github.com/bramvdbogaerde/go-scp v1.4.0 h1:jKMwpwCbcX1KyvDbm/PDJuXcMuNVlLGi0Q0reuzjyKY=
github.com/bramvdbogaerde/go-scp v1.4.0/go.mod h1:on2aH5AxaFb2G0N5Vsdy6B0Ml7k9HuHSwfo1y0QzAbQ=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
github.com/go-openapi/errors v0.21.0 h1:FhChC/duCnfoLj1gZ0BgaBmzhJC2SL/sJr8a2vAobSY=
github.com/go-openapi/errors v0.21.0/go.mod h1:jxNTMUxRCKj65yb/okJGEtahVd7uvWnuWfj53bse4ho=
github.com/go-openapi/strfmt v0.22.1 h1:5Ky8cybT4576C6Ffc+8gYji/wRXCo6Ozm8RaWjPI6jc=
github.com/go-openapi/strfmt v0.22.1/go.mod h1:OfVoytIXJasDkkGvkb1Cceb3BPyMOwk1FgmyyEw7NYg=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
github.com/go-playground/validator/v10 v10.19.0 h1:ol+5Fu+cSq9JD7SoSqe04GMI92cbn0+wvQ3bZ8b/AU4=
github.com/go-playground/validator/v10 v10.19.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
github.com/golang-jwt/jwt/v4 v4.5.1 h1:JdqV9zKUdtaa9gdPlywC3aeoEsR681PlKC+4F5gQgeo=
github.com/golang-jwt/jwt/v4 v4.5.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU=
github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE=
github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po=
github.com/rs/cors v1.11.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80=
go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c=
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8=
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
2 changes: 1 addition & 1 deletion backend/internal/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/IBM/go-sdk-core/v5/core"
"github.com/IBM/vpc-go-sdk/vpcv1"
scp "github.com/bramvdbogaerde/go-scp"
"github.com/golang-jwt/jwt"
"github.com/golang-jwt/jwt/v4"
"golang.org/x/crypto/ssh"
)

Expand Down
2 changes: 1 addition & 1 deletion backend/internal/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http"
"time"

"github.com/golang-jwt/jwt"
"github.com/golang-jwt/jwt/v4"
"golang.org/x/crypto/bcrypt"
)

Expand Down
2 changes: 1 addition & 1 deletion backend/internal/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"regexp"

"github.com/go-playground/validator/v10"
"github.com/golang-jwt/jwt"
"github.com/golang-jwt/jwt/v4"
)

// InstanceRequest represents a request for creating a sandbox instance.
Expand Down
2 changes: 1 addition & 1 deletion backend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os/user"
"strconv"

inst "github.com/IBM-Cloud/sandbox-benchmark-dashboard-for-vpc/internal"
inst "github.ibm.com/workload-eng-services/sandbox/internal"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion backend/scripts/huggingface_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ virtualenv /home/ubuntu/inference_env
. /home/ubuntu/inference_env/bin/activate

# Installing Pytorch and transformers
pip3 install torch==2.3.1 -f https://download.pytorch.org/whl/cpu
pip3 install torch==2.3.1 -f https://download.pytorch.org/whl/cpu
pip3 install intel_extension_for_pytorch==2.3.0 -f https://developer.intel.com/ipex-whl-stable-cpu

# Creating & locking requirements.txt for pip3 versions
cat <<'EOF' > requirements.txt
certifi==2024.7.4
Expand Down
10 changes: 5 additions & 5 deletions backend/scripts/presto_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ su ubuntu -c "cd /home/ubuntu/hadoop-3.2.4/sbin && ./start-all.sh"
## install and configure apache hive
su ubuntu -c '
cd /home/ubuntu && \
wget https://downloads.apache.org/hive/hive-3.1.3/apache-hive-3.1.3-bin.tar.gz && \
wget https://archive.apache.org/dist/hive/hive-3.1.3/apache-hive-3.1.3-bin.tar.gz && \
tar xzf apache-hive-3.1.3-bin.tar.gz
'

Expand Down Expand Up @@ -415,11 +415,11 @@ chmod +x application-presto-benchto.yaml; \
chmod +x set_env.sh
'

sed -i -e 's/\(ELIMINATE_CROSS_JOINS\|PARTITIONED\),\?//g' -e 's/\${tpch_[0-9]\+}/\${tpch_10}/g' -e '/tpch_300: tpch_sf300_orc/d; /tpch_1000: tpch_sf1000_orc/d' -e 's/tpch_3000: tpch_sf3000_orc/tpch_10: tpch_10gb_parquet/' -e "s/runs: 6/runs: 2/" /home/ubuntu/presto-0.285.1/presto-benchto-benchmarks/src/main/resources/benchmarks/presto/tpch.yaml
sed -i -e 's/\(ELIMINATE_CROSS_JOINS\|PARTITIONED\),\?//g' -e 's/\${tpch_[0-9]\+}/\${tpch_10}/g' -e '/tpch_300: tpch_sf300_orc/d; /tpch_1000: tpch_sf1000_orc/d' -e 's/tpch_3000: tpch_sf3000_orc/tpch_10: tpch_10gb_parquet/' -e "s/runs: 6/runs: 3/" /home/ubuntu/presto-0.285.1/presto-benchto-benchmarks/src/main/resources/benchmarks/presto/tpch.yaml
sed -i -e '/^ 2:/,$d' -e 's/q05, q07, q08, q09, q17, q18, q21/query/' /home/ubuntu/presto-0.285.1/presto-benchto-benchmarks/src/main/resources/benchmarks/presto/tpch.yaml

cat <<'EOF' >/home/ubuntu/presto-0.285.1/overrides.yaml
runs: 2
runs: 3
tpch_medium: tpch_10gb_parquet
EOF

Expand Down Expand Up @@ -529,7 +529,7 @@ pkill nmon
## gather presto benchmark data and utilization metrics
ExecutionTime=`docker ps | grep postgres | awk '{print $1}' | xargs -I {} docker exec {} bash -c 'psql -U postgres -At -c "select sum(executions_mean_duration) from benchmark_runs;"'`
ExecutionTime=`docker ps | grep postgres | awk '{print $1}' | xargs -I {} docker exec {} bash -c 'psql -U postgres -At -c "SELECT AVG(value) FROM measurements WHERE id IN (11, 18) AND name = '\''duration'\'';"'`
Memtotal=`cat $script_dir/presto.nmon| grep -e MemTotal | awk '{ print $2}'`
MemFree=`cat $script_dir/presto.nmon | grep -e MemFree | awk '{ print $2}'`
MemUtil=$((($Memtotal-$MemFree)*100/$Memtotal))
Expand Down Expand Up @@ -560,4 +560,4 @@ echo "Query $userInput ExecutionTime(ms): $ExecutionTime" >> $script_dir/output.
EOF

sudo chmod 777 /home/ubuntu/presto_runner_metrics.sh
sudo chmod 777 /home/ubuntu/presto_runner_metrics.sh
9 changes: 7 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"axios": "^1.6.2",
"axios": "^1.7.3",
"i18next": "^23.8.1",
"i18next-browser-languagedetector": "^7.2.0",
"i18next-http-backend": "^2.4.2",
Expand Down Expand Up @@ -52,7 +52,12 @@
"svgo": "^3.2.0",
"nth-check": "^2.1.1",
"postcss": "^8.4.35",
"follow-redirects": "^1.15.6"
"follow-redirects": "^1.15.6",
"micromatch": "^4.0.7",
"cookie": "^0.7.0",
"rollup": "^2.79.2",
"express": "^4.21.1",
"http-proxy-middleware": "^2.0.7"
},
"devDependencies": {
"@babel/preset-env": "^7.24.3",
Expand Down
27 changes: 15 additions & 12 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,26 @@ import BenchmarkPage from './content/BenchmarkLogs';
import Supportpage from './content/support';
import LoginPage from './login';
import NotFound from './components/NotFound';
import { NotificationProvider } from './content/component/NotificationManager';

function App() {
return (
<div className="app">
<BrowserRouter>
<Routes>
<Route path="/login" element={<LoginPage />} />
<Route path="/" element={<CommonUI />}>
<Route index path="/" element={<LandingPage />} />
<Route index path="/home" element={<LandingPage />} />
<Route path="/performance-dashboard" element={<RepoPage />} />
<Route path="/configuration-details" element={<ConfigurationPage />} />
<Route path="/benchmarklogs" element={<BenchmarkPage />} />
<Route path="/support" element={<Supportpage />} />
<Route path="*" element={<NotFound />} />
</Route>
</Routes>
<NotificationProvider>
<Routes>
<Route path="/login" element={<LoginPage />} />
<Route path="/" element={<CommonUI />}>
<Route index path="/" element={<LandingPage />} />
<Route index path="/home" element={<LandingPage />} />
<Route path="/performance-dashboard" element={<RepoPage />} />
<Route path="/configuration-details" element={<ConfigurationPage />} />
<Route path="/benchmarklogs" element={<BenchmarkPage />} />
<Route path="/support" element={<Supportpage />} />
<Route path="*" element={<NotFound />} />
</Route>
</Routes>
</NotificationProvider>
</BrowserRouter>
</div>
);
Expand Down
22 changes: 12 additions & 10 deletions frontend/src/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@ body {
}

}

.notification-ui {
position: fixed;
right: $spacing-06;
top: 3rem;
z-index: 999;
}

.login-container {
height: 100%;

Expand Down Expand Up @@ -185,8 +177,18 @@ body {
.error-notification{
margin-bottom: $spacing-05;
}
.hide-notification .notification-ui{
display: none;
.generic-toast-container {
position: fixed;
right: $spacing-06;
top: 3rem;
z-index: 9999;
}

.notification-ui {
position: relative;
display: flex;
margin-top: .5rem;
margin-bottom: .5rem;
}
.session-modal .cds--modal-close-button{
display: none;
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/__test__/BenchmarkLogs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from "react";
import { render, screen, waitFor } from "@testing-library/react";
import '@testing-library/jest-dom';
import BenchmarkPage from "../content/BenchmarkLogs/benchmark";
import { useNotification } from "../content/component/NotificationManager";

jest.mock("react-i18next", () => ({
useTranslation: () => ({
Expand All @@ -11,8 +12,13 @@ jest.mock("react-i18next", () => ({
jest.mock('../content/api/api', () => ({
}));

jest.mock('../content/component/NotificationManager', () => ({
useNotification: jest.fn(),
}));

describe("BenchmarkPage component", () => {
it("renders without errors", async () => {
useNotification.mockReturnValue(jest.fn());
render(<BenchmarkPage />);
const benchmarkLogsElement = await screen.findByText('benchmarkLogs');
await waitFor(() => {
Expand Down
Loading

0 comments on commit 8ab2020

Please sign in to comment.