diff --git a/k8s/operator-console/base/console-deployment.yaml b/k8s/operator-console/base/console-deployment.yaml index 4138d3998..c98795063 100644 --- a/k8s/operator-console/base/console-deployment.yaml +++ b/k8s/operator-console/base/console-deployment.yaml @@ -15,7 +15,7 @@ spec: serviceAccountName: console-sa containers: - name: console - image: minio/console:v0.14.2 + image: minio/console:v0.14.3 imagePullPolicy: "IfNotPresent" env: - name: CONSOLE_OPERATOR_MODE diff --git a/k8s/operator-console/standalone/console-deployment.yaml b/k8s/operator-console/standalone/console-deployment.yaml index e2081b2b7..6d6254cd8 100644 --- a/k8s/operator-console/standalone/console-deployment.yaml +++ b/k8s/operator-console/standalone/console-deployment.yaml @@ -32,7 +32,7 @@ spec: spec: containers: - name: console - image: minio/console:v0.14.2 + image: minio/console:v0.14.3 imagePullPolicy: "IfNotPresent" env: - name: CONSOLE_MINIO_SERVER diff --git a/portal-ui/build/asset-manifest.json b/portal-ui/build/asset-manifest.json index 12085a8aa..fabb133c6 100644 --- a/portal-ui/build/asset-manifest.json +++ b/portal-ui/build/asset-manifest.json @@ -1,319 +1,321 @@ { "files": { "main.css": "./static/css/main.c4c1effe.css", - "main.js": "./static/js/main.c2f8fc5a.js", - "static/js/2178.88de4175.chunk.js": "./static/js/2178.88de4175.chunk.js", + "main.js": "./static/js/main.c7ee1a1d.js", + "static/js/2178.cf1507fb.chunk.js": "./static/js/2178.cf1507fb.chunk.js", "static/js/5282.e51b8c66.chunk.js": "./static/js/5282.e51b8c66.chunk.js", - "static/js/1409.91bb9889.chunk.js": "./static/js/1409.91bb9889.chunk.js", - "static/js/9560.10c70a81.chunk.js": "./static/js/9560.10c70a81.chunk.js", - "static/js/4247.44232cae.chunk.js": "./static/js/4247.44232cae.chunk.js", - "static/js/9330.5e1478d4.chunk.js": "./static/js/9330.5e1478d4.chunk.js", - "static/js/4869.50cc8ccf.chunk.js": "./static/js/4869.50cc8ccf.chunk.js", - "static/js/2202.2a63896a.chunk.js": "./static/js/2202.2a63896a.chunk.js", - "static/js/7436.28cb7507.chunk.js": "./static/js/7436.28cb7507.chunk.js", - "static/js/1056.e9bc9546.chunk.js": "./static/js/1056.e9bc9546.chunk.js", - "static/js/9779.a7220ad4.chunk.js": "./static/js/9779.a7220ad4.chunk.js", - "static/js/3617.b98c7310.chunk.js": "./static/js/3617.b98c7310.chunk.js", - "static/js/7274.05e88a7c.chunk.js": "./static/js/7274.05e88a7c.chunk.js", - "static/js/7842.c2a07bd1.chunk.js": "./static/js/7842.c2a07bd1.chunk.js", - "static/js/4745.629e4e9e.chunk.js": "./static/js/4745.629e4e9e.chunk.js", - "static/js/4515.ff1eef26.chunk.js": "./static/js/4515.ff1eef26.chunk.js", - "static/js/8259.fb1470b5.chunk.js": "./static/js/8259.fb1470b5.chunk.js", - "static/js/4839.b2c804c8.chunk.js": "./static/js/4839.b2c804c8.chunk.js", - "static/js/8853.57d2a963.chunk.js": "./static/js/8853.57d2a963.chunk.js", - "static/js/9275.4da496fa.chunk.js": "./static/js/9275.4da496fa.chunk.js", - "static/js/3795.1d965a32.chunk.js": "./static/js/3795.1d965a32.chunk.js", - "static/js/7314.96da8c61.chunk.js": "./static/js/7314.96da8c61.chunk.js", - "static/js/7456.7a05fd71.chunk.js": "./static/js/7456.7a05fd71.chunk.js", + "static/js/1409.ce8091c2.chunk.js": "./static/js/1409.ce8091c2.chunk.js", + "static/js/9560.6ff6a758.chunk.js": "./static/js/9560.6ff6a758.chunk.js", + "static/js/4247.636fee85.chunk.js": "./static/js/4247.636fee85.chunk.js", + "static/js/9330.5c857d6b.chunk.js": "./static/js/9330.5c857d6b.chunk.js", + "static/js/4869.b14a3a6c.chunk.js": "./static/js/4869.b14a3a6c.chunk.js", + "static/js/2202.516dc033.chunk.js": "./static/js/2202.516dc033.chunk.js", + "static/js/7436.17e2bbf0.chunk.js": "./static/js/7436.17e2bbf0.chunk.js", + "static/js/1056.6f1cb8e0.chunk.js": "./static/js/1056.6f1cb8e0.chunk.js", + "static/js/9779.0e8be0cc.chunk.js": "./static/js/9779.0e8be0cc.chunk.js", + "static/js/3617.38600ea7.chunk.js": "./static/js/3617.38600ea7.chunk.js", + "static/js/7274.64442dfa.chunk.js": "./static/js/7274.64442dfa.chunk.js", + "static/js/7842.6ec32dd7.chunk.js": "./static/js/7842.6ec32dd7.chunk.js", + "static/js/4745.00dcce39.chunk.js": "./static/js/4745.00dcce39.chunk.js", + "static/js/4515.fc843c16.chunk.js": "./static/js/4515.fc843c16.chunk.js", + "static/js/8259.d34a4da6.chunk.js": "./static/js/8259.d34a4da6.chunk.js", + "static/js/4839.cfc74e75.chunk.js": "./static/js/4839.cfc74e75.chunk.js", + "static/js/8853.b298ca0c.chunk.js": "./static/js/8853.b298ca0c.chunk.js", + "static/js/9275.3648f309.chunk.js": "./static/js/9275.3648f309.chunk.js", + "static/js/3795.ca99e16b.chunk.js": "./static/js/3795.ca99e16b.chunk.js", + "static/js/7314.1fb79e31.chunk.js": "./static/js/7314.1fb79e31.chunk.js", + "static/js/7456.99d2d848.chunk.js": "./static/js/7456.99d2d848.chunk.js", "static/css/5673.ce92c9f5.chunk.css": "./static/css/5673.ce92c9f5.chunk.css", - "static/js/5673.dd63b364.chunk.js": "./static/js/5673.dd63b364.chunk.js", - "static/js/2699.a7e96e49.chunk.js": "./static/js/2699.a7e96e49.chunk.js", + "static/js/5673.d3eb036c.chunk.js": "./static/js/5673.d3eb036c.chunk.js", + "static/js/2699.ac935aa8.chunk.js": "./static/js/2699.ac935aa8.chunk.js", "static/js/5808.5e176e4d.chunk.js": "./static/js/5808.5e176e4d.chunk.js", "static/js/1237.f11be969.chunk.js": "./static/js/1237.f11be969.chunk.js", - "static/js/8503.28b44c13.chunk.js": "./static/js/8503.28b44c13.chunk.js", - "static/js/694.1c7df1f4.chunk.js": "./static/js/694.1c7df1f4.chunk.js", + "static/js/8503.6ce0ff69.chunk.js": "./static/js/8503.6ce0ff69.chunk.js", + "static/js/6615.f26600a0.chunk.js": "./static/js/6615.f26600a0.chunk.js", "static/css/9807.ce92c9f5.chunk.css": "./static/css/9807.ce92c9f5.chunk.css", - "static/js/9807.6c6fe25e.chunk.js": "./static/js/9807.6c6fe25e.chunk.js", - "static/js/3806.10e82ab3.chunk.js": "./static/js/3806.10e82ab3.chunk.js", - "static/js/2742.75358a05.chunk.js": "./static/js/2742.75358a05.chunk.js", - "static/js/3474.3727fa8e.chunk.js": "./static/js/3474.3727fa8e.chunk.js", - "static/js/4577.cf49ba7e.chunk.js": "./static/js/4577.cf49ba7e.chunk.js", - "static/js/5947.aa34b55f.chunk.js": "./static/js/5947.aa34b55f.chunk.js", - "static/js/4533.224f8305.chunk.js": "./static/js/4533.224f8305.chunk.js", - "static/js/6147.fa1f52fb.chunk.js": "./static/js/6147.fa1f52fb.chunk.js", + "static/js/9807.3f033821.chunk.js": "./static/js/9807.3f033821.chunk.js", + "static/js/3806.e2daceb3.chunk.js": "./static/js/3806.e2daceb3.chunk.js", + "static/js/2742.f1b14cdb.chunk.js": "./static/js/2742.f1b14cdb.chunk.js", + "static/js/3474.378d2159.chunk.js": "./static/js/3474.378d2159.chunk.js", + "static/js/4577.ee518ba9.chunk.js": "./static/js/4577.ee518ba9.chunk.js", + "static/js/5947.88f9751e.chunk.js": "./static/js/5947.88f9751e.chunk.js", + "static/js/4533.e1a532b6.chunk.js": "./static/js/4533.e1a532b6.chunk.js", + "static/js/6147.aed56e85.chunk.js": "./static/js/6147.aed56e85.chunk.js", "static/js/2805.73cec790.chunk.js": "./static/js/2805.73cec790.chunk.js", "static/js/3143.e6a9621d.chunk.js": "./static/js/3143.e6a9621d.chunk.js", "static/js/428.b5539f2b.chunk.js": "./static/js/428.b5539f2b.chunk.js", - "static/js/1069.b301b69c.chunk.js": "./static/js/1069.b301b69c.chunk.js", - "static/js/1140.c920261b.chunk.js": "./static/js/1140.c920261b.chunk.js", - "static/js/2094.d27076fb.chunk.js": "./static/js/2094.d27076fb.chunk.js", - "static/js/7950.3a3eca23.chunk.js": "./static/js/7950.3a3eca23.chunk.js", - "static/js/671.f558f624.chunk.js": "./static/js/671.f558f624.chunk.js", - "static/js/8961.9d522393.chunk.js": "./static/js/8961.9d522393.chunk.js", - "static/js/3967.028aff54.chunk.js": "./static/js/3967.028aff54.chunk.js", + "static/js/1069.6dfe4ad0.chunk.js": "./static/js/1069.6dfe4ad0.chunk.js", + "static/js/1140.0208375a.chunk.js": "./static/js/1140.0208375a.chunk.js", + "static/js/2094.4854485e.chunk.js": "./static/js/2094.4854485e.chunk.js", + "static/js/7950.455e5528.chunk.js": "./static/js/7950.455e5528.chunk.js", + "static/js/671.18a32329.chunk.js": "./static/js/671.18a32329.chunk.js", + "static/js/8961.8aa802d6.chunk.js": "./static/js/8961.8aa802d6.chunk.js", + "static/js/3967.ef703755.chunk.js": "./static/js/3967.ef703755.chunk.js", "static/css/5677.ce92c9f5.chunk.css": "./static/css/5677.ce92c9f5.chunk.css", - "static/js/5677.d409c330.chunk.js": "./static/js/5677.d409c330.chunk.js", + "static/js/5677.654039a6.chunk.js": "./static/js/5677.654039a6.chunk.js", "static/css/4360.ce92c9f5.chunk.css": "./static/css/4360.ce92c9f5.chunk.css", - "static/js/4360.0eb9c965.chunk.js": "./static/js/4360.0eb9c965.chunk.js", - "static/js/7664.29184378.chunk.js": "./static/js/7664.29184378.chunk.js", - "static/js/9080.62f1f229.chunk.js": "./static/js/9080.62f1f229.chunk.js", - "static/js/5961.3edf7e5a.chunk.js": "./static/js/5961.3edf7e5a.chunk.js", + "static/js/4360.bbbd8faf.chunk.js": "./static/js/4360.bbbd8faf.chunk.js", + "static/js/4109.04a89c2d.chunk.js": "./static/js/4109.04a89c2d.chunk.js", + "static/js/9080.bb419916.chunk.js": "./static/js/9080.bb419916.chunk.js", + "static/js/5961.04fd21a3.chunk.js": "./static/js/5961.04fd21a3.chunk.js", "static/js/6549.e0686e32.chunk.js": "./static/js/6549.e0686e32.chunk.js", - "static/js/7498.afa7399a.chunk.js": "./static/js/7498.afa7399a.chunk.js", - "static/js/9421.d2c1ef7f.chunk.js": "./static/js/9421.d2c1ef7f.chunk.js", - "static/js/5284.80529094.chunk.js": "./static/js/5284.80529094.chunk.js", - "static/js/4818.b8e96cdf.chunk.js": "./static/js/4818.b8e96cdf.chunk.js", + "static/js/7498.07dd467b.chunk.js": "./static/js/7498.07dd467b.chunk.js", + "static/js/9421.a88c8e02.chunk.js": "./static/js/9421.a88c8e02.chunk.js", + "static/js/5284.e23070a0.chunk.js": "./static/js/5284.e23070a0.chunk.js", + "static/js/4818.65ba088c.chunk.js": "./static/js/4818.65ba088c.chunk.js", "static/js/2401.74634660.chunk.js": "./static/js/2401.74634660.chunk.js", "static/css/8724.ce92c9f5.chunk.css": "./static/css/8724.ce92c9f5.chunk.css", - "static/js/8724.f53ed58a.chunk.js": "./static/js/8724.f53ed58a.chunk.js", - "static/js/2182.d8fa5b60.chunk.js": "./static/js/2182.d8fa5b60.chunk.js", + "static/js/8724.cf8fb340.chunk.js": "./static/js/8724.cf8fb340.chunk.js", + "static/js/2182.468a5b4e.chunk.js": "./static/js/2182.468a5b4e.chunk.js", "static/js/7764.3b798da3.chunk.js": "./static/js/7764.3b798da3.chunk.js", - "static/js/4220.1ac654a2.chunk.js": "./static/js/4220.1ac654a2.chunk.js", - "static/js/1719.191f462f.chunk.js": "./static/js/1719.191f462f.chunk.js", - "static/js/3320.4bfb210a.chunk.js": "./static/js/3320.4bfb210a.chunk.js", - "static/js/9923.151a3975.chunk.js": "./static/js/9923.151a3975.chunk.js", + "static/js/4220.308c5fb3.chunk.js": "./static/js/4220.308c5fb3.chunk.js", + "static/js/1719.fbaa408a.chunk.js": "./static/js/1719.fbaa408a.chunk.js", + "static/js/3320.2e853989.chunk.js": "./static/js/3320.2e853989.chunk.js", + "static/js/9923.25fa1a75.chunk.js": "./static/js/9923.25fa1a75.chunk.js", "static/js/9586.c44d8f2b.chunk.js": "./static/js/9586.c44d8f2b.chunk.js", - "static/js/7261.3c0ed539.chunk.js": "./static/js/7261.3c0ed539.chunk.js", - "static/js/6436.cc600064.chunk.js": "./static/js/6436.cc600064.chunk.js", - "static/js/8343.43c0de46.chunk.js": "./static/js/8343.43c0de46.chunk.js", - "static/js/2841.21f2a1a3.chunk.js": "./static/js/2841.21f2a1a3.chunk.js", - "static/js/6167.83706f49.chunk.js": "./static/js/6167.83706f49.chunk.js", - "static/js/3698.3f9b03bb.chunk.js": "./static/js/3698.3f9b03bb.chunk.js", - "static/js/1971.25e3c08e.chunk.js": "./static/js/1971.25e3c08e.chunk.js", - "static/js/7346.39650f87.chunk.js": "./static/js/7346.39650f87.chunk.js", + "static/js/7261.98082dab.chunk.js": "./static/js/7261.98082dab.chunk.js", + "static/js/6436.f2bab163.chunk.js": "./static/js/6436.f2bab163.chunk.js", + "static/js/8343.b174034e.chunk.js": "./static/js/8343.b174034e.chunk.js", + "static/js/2841.95af1213.chunk.js": "./static/js/2841.95af1213.chunk.js", + "static/js/6167.edad2368.chunk.js": "./static/js/6167.edad2368.chunk.js", + "static/js/3698.49eb7411.chunk.js": "./static/js/3698.49eb7411.chunk.js", + "static/js/1971.306de04b.chunk.js": "./static/js/1971.306de04b.chunk.js", + "static/js/7346.8e455eaa.chunk.js": "./static/js/7346.8e455eaa.chunk.js", "static/js/5144.f66d75af.chunk.js": "./static/js/5144.f66d75af.chunk.js", "static/js/5125.9822771e.chunk.js": "./static/js/5125.9822771e.chunk.js", - "static/js/1973.f87dafdc.chunk.js": "./static/js/1973.f87dafdc.chunk.js", - "static/js/7187.c788af65.chunk.js": "./static/js/7187.c788af65.chunk.js", - "static/js/6173.ef152b76.chunk.js": "./static/js/6173.ef152b76.chunk.js", - "static/js/7146.56123dc2.chunk.js": "./static/js/7146.56123dc2.chunk.js", - "static/js/9924.43e44a65.chunk.js": "./static/js/9924.43e44a65.chunk.js", - "static/js/9193.82ed00e1.chunk.js": "./static/js/9193.82ed00e1.chunk.js", - "static/js/7451.0fa5a7e5.chunk.js": "./static/js/7451.0fa5a7e5.chunk.js", + "static/js/1973.55987b98.chunk.js": "./static/js/1973.55987b98.chunk.js", + "static/js/7187.b3ba71a1.chunk.js": "./static/js/7187.b3ba71a1.chunk.js", + "static/js/6173.b70c4e1a.chunk.js": "./static/js/6173.b70c4e1a.chunk.js", + "static/js/7146.09b3a43c.chunk.js": "./static/js/7146.09b3a43c.chunk.js", + "static/js/9924.a7c06331.chunk.js": "./static/js/9924.a7c06331.chunk.js", + "static/js/9193.cbd8d842.chunk.js": "./static/js/9193.cbd8d842.chunk.js", + "static/js/7451.43cf8bf6.chunk.js": "./static/js/7451.43cf8bf6.chunk.js", "static/css/165.ce92c9f5.chunk.css": "./static/css/165.ce92c9f5.chunk.css", - "static/js/165.93b2aa3b.chunk.js": "./static/js/165.93b2aa3b.chunk.js", - "static/js/4121.7f5ade25.chunk.js": "./static/js/4121.7f5ade25.chunk.js", - "static/js/609.70610e5c.chunk.js": "./static/js/609.70610e5c.chunk.js", - "static/js/3421.1091e001.chunk.js": "./static/js/3421.1091e001.chunk.js", - "static/js/2892.24e051ed.chunk.js": "./static/js/2892.24e051ed.chunk.js", - "static/js/7926.85e00b49.chunk.js": "./static/js/7926.85e00b49.chunk.js", - "static/js/6145.3b33e5ef.chunk.js": "./static/js/6145.3b33e5ef.chunk.js", + "static/js/165.6ba70895.chunk.js": "./static/js/165.6ba70895.chunk.js", + "static/js/4121.17b5e70f.chunk.js": "./static/js/4121.17b5e70f.chunk.js", + "static/js/609.218c57b6.chunk.js": "./static/js/609.218c57b6.chunk.js", + "static/js/3421.aa3eeb04.chunk.js": "./static/js/3421.aa3eeb04.chunk.js", + "static/js/2892.f2ab7fe7.chunk.js": "./static/js/2892.f2ab7fe7.chunk.js", + "static/js/7926.d155ef62.chunk.js": "./static/js/7926.d155ef62.chunk.js", + "static/js/6145.819d854c.chunk.js": "./static/js/6145.819d854c.chunk.js", "static/css/6951.ce92c9f5.chunk.css": "./static/css/6951.ce92c9f5.chunk.css", - "static/js/6951.ed01455f.chunk.js": "./static/js/6951.ed01455f.chunk.js", - "static/js/2966.6d679d02.chunk.js": "./static/js/2966.6d679d02.chunk.js", - "static/js/4177.b5885717.chunk.js": "./static/js/4177.b5885717.chunk.js", - "static/js/9679.0e4b32ce.chunk.js": "./static/js/9679.0e4b32ce.chunk.js", + "static/js/6951.e58557fd.chunk.js": "./static/js/6951.e58557fd.chunk.js", + "static/js/2966.c61fbf10.chunk.js": "./static/js/2966.c61fbf10.chunk.js", + "static/js/4177.bfe448c8.chunk.js": "./static/js/4177.bfe448c8.chunk.js", + "static/js/9679.2b8424ba.chunk.js": "./static/js/9679.2b8424ba.chunk.js", "static/js/8333.b0c9e377.chunk.js": "./static/js/8333.b0c9e377.chunk.js", - "static/js/1711.048bf01b.chunk.js": "./static/js/1711.048bf01b.chunk.js", - "static/js/9.4795f15a.chunk.js": "./static/js/9.4795f15a.chunk.js", - "static/js/4487.516ed3d7.chunk.js": "./static/js/4487.516ed3d7.chunk.js", - "static/js/6866.aeb40983.chunk.js": "./static/js/6866.aeb40983.chunk.js", - "static/js/8564.61b6c306.chunk.js": "./static/js/8564.61b6c306.chunk.js", - "static/js/3152.8f45736d.chunk.js": "./static/js/3152.8f45736d.chunk.js", - "static/js/7007.69464c05.chunk.js": "./static/js/7007.69464c05.chunk.js", - "static/js/14.98e91306.chunk.js": "./static/js/14.98e91306.chunk.js", - "static/js/2066.81f72337.chunk.js": "./static/js/2066.81f72337.chunk.js", + "static/js/1711.a046e26c.chunk.js": "./static/js/1711.a046e26c.chunk.js", + "static/js/9.0e073695.chunk.js": "./static/js/9.0e073695.chunk.js", + "static/js/4487.3ad24a2d.chunk.js": "./static/js/4487.3ad24a2d.chunk.js", + "static/js/6866.aa2f03f0.chunk.js": "./static/js/6866.aa2f03f0.chunk.js", + "static/js/8564.11a3023b.chunk.js": "./static/js/8564.11a3023b.chunk.js", + "static/js/3152.daa99377.chunk.js": "./static/js/3152.daa99377.chunk.js", + "static/js/7007.3606231e.chunk.js": "./static/js/7007.3606231e.chunk.js", + "static/js/14.25ecb28d.chunk.js": "./static/js/14.25ecb28d.chunk.js", + "static/js/2066.5180dac0.chunk.js": "./static/js/2066.5180dac0.chunk.js", "static/js/5444.e8727da9.chunk.js": "./static/js/5444.e8727da9.chunk.js", "static/js/892.2aaf58f1.chunk.js": "./static/js/892.2aaf58f1.chunk.js", - "static/js/3690.b0d03a12.chunk.js": "./static/js/3690.b0d03a12.chunk.js", - "static/js/5399.5699b879.chunk.js": "./static/js/5399.5699b879.chunk.js", + "static/js/3690.536fb187.chunk.js": "./static/js/3690.536fb187.chunk.js", + "static/js/5399.6bc650ac.chunk.js": "./static/js/5399.6bc650ac.chunk.js", "static/js/606.28fdb5bc.chunk.js": "./static/js/606.28fdb5bc.chunk.js", - "static/js/9998.e7c54804.chunk.js": "./static/js/9998.e7c54804.chunk.js", - "static/js/9769.733c21d3.chunk.js": "./static/js/9769.733c21d3.chunk.js", + "static/js/9998.1a613ce5.chunk.js": "./static/js/9998.1a613ce5.chunk.js", + "static/js/9769.a2bfb4d7.chunk.js": "./static/js/9769.a2bfb4d7.chunk.js", "static/js/8954.00599ff1.chunk.js": "./static/js/8954.00599ff1.chunk.js", "static/js/7248.1e0c4e19.chunk.js": "./static/js/7248.1e0c4e19.chunk.js", - "static/js/4837.6220832b.chunk.js": "./static/js/4837.6220832b.chunk.js", + "static/js/4837.98af4cfe.chunk.js": "./static/js/4837.98af4cfe.chunk.js", "static/js/3020.3b2e782c.chunk.js": "./static/js/3020.3b2e782c.chunk.js", - "static/js/9056.ad0432f8.chunk.js": "./static/js/9056.ad0432f8.chunk.js", + "static/js/9056.41f0e489.chunk.js": "./static/js/9056.41f0e489.chunk.js", "static/js/3360.453f0701.chunk.js": "./static/js/3360.453f0701.chunk.js", "static/js/8420.68d5dfb4.chunk.js": "./static/js/8420.68d5dfb4.chunk.js", "static/js/1420.517f0e88.chunk.js": "./static/js/1420.517f0e88.chunk.js", "static/js/2309.49be65c5.chunk.js": "./static/js/2309.49be65c5.chunk.js", - "static/js/2364.a32e93a4.chunk.js": "./static/js/2364.a32e93a4.chunk.js", - "static/js/3356.3534f8c0.chunk.js": "./static/js/3356.3534f8c0.chunk.js", + "static/js/1233.9903fc82.chunk.js": "./static/js/1233.9903fc82.chunk.js", + "static/js/3356.05b42758.chunk.js": "./static/js/3356.05b42758.chunk.js", + "static/js/8016.b0ab3b67.chunk.js": "./static/js/8016.b0ab3b67.chunk.js", "static/js/6851.3b47e1b9.chunk.js": "./static/js/6851.3b47e1b9.chunk.js", - "static/js/2253.0ed59cf3.chunk.js": "./static/js/2253.0ed59cf3.chunk.js", - "static/js/6427.9b08fd5a.chunk.js": "./static/js/6427.9b08fd5a.chunk.js", - "static/js/3538.1b5c3c94.chunk.js": "./static/js/3538.1b5c3c94.chunk.js", - "static/js/5708.8fe332b9.chunk.js": "./static/js/5708.8fe332b9.chunk.js", - "static/js/8749.40f40fd4.chunk.js": "./static/js/8749.40f40fd4.chunk.js", - "static/js/7348.18bf40ff.chunk.js": "./static/js/7348.18bf40ff.chunk.js", + "static/js/2253.d527f443.chunk.js": "./static/js/2253.d527f443.chunk.js", + "static/js/6427.028089e0.chunk.js": "./static/js/6427.028089e0.chunk.js", + "static/js/3538.60e98cef.chunk.js": "./static/js/3538.60e98cef.chunk.js", + "static/js/8749.fa0fb710.chunk.js": "./static/js/8749.fa0fb710.chunk.js", + "static/js/7348.b037b952.chunk.js": "./static/js/7348.b037b952.chunk.js", "static/js/1760.8589ea77.chunk.js": "./static/js/1760.8589ea77.chunk.js", - "static/js/7722.f38ca1fa.chunk.js": "./static/js/7722.f38ca1fa.chunk.js", + "static/js/2873.ebf17fc8.chunk.js": "./static/js/2873.ebf17fc8.chunk.js", "static/js/8708.70b62dd5.chunk.js": "./static/js/8708.70b62dd5.chunk.js", - "static/js/2594.a1bd0e0e.chunk.js": "./static/js/2594.a1bd0e0e.chunk.js", + "static/js/2594.77f64a1f.chunk.js": "./static/js/2594.77f64a1f.chunk.js", "static/js/440.5bb0a106.chunk.js": "./static/js/440.5bb0a106.chunk.js", - "static/js/3045.691c66fa.chunk.js": "./static/js/3045.691c66fa.chunk.js", + "static/js/3045.f1cc8d42.chunk.js": "./static/js/3045.f1cc8d42.chunk.js", "static/js/4817.2c511e72.chunk.js": "./static/js/4817.2c511e72.chunk.js", - "static/js/227.30c65ef2.chunk.js": "./static/js/227.30c65ef2.chunk.js", - "static/js/4105.1b1d6fe0.chunk.js": "./static/js/4105.1b1d6fe0.chunk.js", + "static/js/938.8f6a5aa1.chunk.js": "./static/js/938.8f6a5aa1.chunk.js", + "static/js/4105.a498ca05.chunk.js": "./static/js/4105.a498ca05.chunk.js", "static/js/9876.3e5a4f83.chunk.js": "./static/js/9876.3e5a4f83.chunk.js", - "static/js/7777.6f5904c7.chunk.js": "./static/js/7777.6f5904c7.chunk.js", + "static/js/7777.7ea62662.chunk.js": "./static/js/7777.7ea62662.chunk.js", "static/js/7042.343b48b2.chunk.js": "./static/js/7042.343b48b2.chunk.js", - "static/js/3201.8afb9fa9.chunk.js": "./static/js/3201.8afb9fa9.chunk.js", - "static/js/1724.d1b98d6d.chunk.js": "./static/js/1724.d1b98d6d.chunk.js", + "static/js/3201.9f8a570f.chunk.js": "./static/js/3201.9f8a570f.chunk.js", + "static/js/7664.9ba57569.chunk.js": "./static/js/7664.9ba57569.chunk.js", + "static/js/5170.2d3119fa.chunk.js": "./static/js/5170.2d3119fa.chunk.js", "static/js/7454.6a33b546.chunk.js": "./static/js/7454.6a33b546.chunk.js", "static/js/6873.a4c0dde3.chunk.js": "./static/js/6873.a4c0dde3.chunk.js", "static/js/3453.9ef32892.chunk.js": "./static/js/3453.9ef32892.chunk.js", "index.html": "./index.html", "main.c4c1effe.css.map": "./static/css/main.c4c1effe.css.map", - "main.c2f8fc5a.js.map": "./static/js/main.c2f8fc5a.js.map", - "2178.88de4175.chunk.js.map": "./static/js/2178.88de4175.chunk.js.map", + "main.c7ee1a1d.js.map": "./static/js/main.c7ee1a1d.js.map", + "2178.cf1507fb.chunk.js.map": "./static/js/2178.cf1507fb.chunk.js.map", "5282.e51b8c66.chunk.js.map": "./static/js/5282.e51b8c66.chunk.js.map", - "1409.91bb9889.chunk.js.map": "./static/js/1409.91bb9889.chunk.js.map", - "9560.10c70a81.chunk.js.map": "./static/js/9560.10c70a81.chunk.js.map", - "4247.44232cae.chunk.js.map": "./static/js/4247.44232cae.chunk.js.map", - "9330.5e1478d4.chunk.js.map": "./static/js/9330.5e1478d4.chunk.js.map", - "4869.50cc8ccf.chunk.js.map": "./static/js/4869.50cc8ccf.chunk.js.map", - "2202.2a63896a.chunk.js.map": "./static/js/2202.2a63896a.chunk.js.map", - "7436.28cb7507.chunk.js.map": "./static/js/7436.28cb7507.chunk.js.map", - "1056.e9bc9546.chunk.js.map": "./static/js/1056.e9bc9546.chunk.js.map", - "9779.a7220ad4.chunk.js.map": "./static/js/9779.a7220ad4.chunk.js.map", - "3617.b98c7310.chunk.js.map": "./static/js/3617.b98c7310.chunk.js.map", - "7274.05e88a7c.chunk.js.map": "./static/js/7274.05e88a7c.chunk.js.map", - "7842.c2a07bd1.chunk.js.map": "./static/js/7842.c2a07bd1.chunk.js.map", - "4745.629e4e9e.chunk.js.map": "./static/js/4745.629e4e9e.chunk.js.map", - "4515.ff1eef26.chunk.js.map": "./static/js/4515.ff1eef26.chunk.js.map", - "8259.fb1470b5.chunk.js.map": "./static/js/8259.fb1470b5.chunk.js.map", - "4839.b2c804c8.chunk.js.map": "./static/js/4839.b2c804c8.chunk.js.map", - "8853.57d2a963.chunk.js.map": "./static/js/8853.57d2a963.chunk.js.map", - "9275.4da496fa.chunk.js.map": "./static/js/9275.4da496fa.chunk.js.map", - "3795.1d965a32.chunk.js.map": "./static/js/3795.1d965a32.chunk.js.map", - "7314.96da8c61.chunk.js.map": "./static/js/7314.96da8c61.chunk.js.map", - "7456.7a05fd71.chunk.js.map": "./static/js/7456.7a05fd71.chunk.js.map", + "1409.ce8091c2.chunk.js.map": "./static/js/1409.ce8091c2.chunk.js.map", + "9560.6ff6a758.chunk.js.map": "./static/js/9560.6ff6a758.chunk.js.map", + "4247.636fee85.chunk.js.map": "./static/js/4247.636fee85.chunk.js.map", + "9330.5c857d6b.chunk.js.map": "./static/js/9330.5c857d6b.chunk.js.map", + "4869.b14a3a6c.chunk.js.map": "./static/js/4869.b14a3a6c.chunk.js.map", + "2202.516dc033.chunk.js.map": "./static/js/2202.516dc033.chunk.js.map", + "7436.17e2bbf0.chunk.js.map": "./static/js/7436.17e2bbf0.chunk.js.map", + "1056.6f1cb8e0.chunk.js.map": "./static/js/1056.6f1cb8e0.chunk.js.map", + "9779.0e8be0cc.chunk.js.map": "./static/js/9779.0e8be0cc.chunk.js.map", + "3617.38600ea7.chunk.js.map": "./static/js/3617.38600ea7.chunk.js.map", + "7274.64442dfa.chunk.js.map": "./static/js/7274.64442dfa.chunk.js.map", + "7842.6ec32dd7.chunk.js.map": "./static/js/7842.6ec32dd7.chunk.js.map", + "4745.00dcce39.chunk.js.map": "./static/js/4745.00dcce39.chunk.js.map", + "4515.fc843c16.chunk.js.map": "./static/js/4515.fc843c16.chunk.js.map", + "8259.d34a4da6.chunk.js.map": "./static/js/8259.d34a4da6.chunk.js.map", + "4839.cfc74e75.chunk.js.map": "./static/js/4839.cfc74e75.chunk.js.map", + "8853.b298ca0c.chunk.js.map": "./static/js/8853.b298ca0c.chunk.js.map", + "9275.3648f309.chunk.js.map": "./static/js/9275.3648f309.chunk.js.map", + "3795.ca99e16b.chunk.js.map": "./static/js/3795.ca99e16b.chunk.js.map", + "7314.1fb79e31.chunk.js.map": "./static/js/7314.1fb79e31.chunk.js.map", + "7456.99d2d848.chunk.js.map": "./static/js/7456.99d2d848.chunk.js.map", "5673.ce92c9f5.chunk.css.map": "./static/css/5673.ce92c9f5.chunk.css.map", - "5673.dd63b364.chunk.js.map": "./static/js/5673.dd63b364.chunk.js.map", - "2699.a7e96e49.chunk.js.map": "./static/js/2699.a7e96e49.chunk.js.map", + "5673.d3eb036c.chunk.js.map": "./static/js/5673.d3eb036c.chunk.js.map", + "2699.ac935aa8.chunk.js.map": "./static/js/2699.ac935aa8.chunk.js.map", "5808.5e176e4d.chunk.js.map": "./static/js/5808.5e176e4d.chunk.js.map", "1237.f11be969.chunk.js.map": "./static/js/1237.f11be969.chunk.js.map", - "8503.28b44c13.chunk.js.map": "./static/js/8503.28b44c13.chunk.js.map", - "694.1c7df1f4.chunk.js.map": "./static/js/694.1c7df1f4.chunk.js.map", + "8503.6ce0ff69.chunk.js.map": "./static/js/8503.6ce0ff69.chunk.js.map", + "6615.f26600a0.chunk.js.map": "./static/js/6615.f26600a0.chunk.js.map", "9807.ce92c9f5.chunk.css.map": "./static/css/9807.ce92c9f5.chunk.css.map", - "9807.6c6fe25e.chunk.js.map": "./static/js/9807.6c6fe25e.chunk.js.map", - "3806.10e82ab3.chunk.js.map": "./static/js/3806.10e82ab3.chunk.js.map", - "2742.75358a05.chunk.js.map": "./static/js/2742.75358a05.chunk.js.map", - "3474.3727fa8e.chunk.js.map": "./static/js/3474.3727fa8e.chunk.js.map", - "4577.cf49ba7e.chunk.js.map": "./static/js/4577.cf49ba7e.chunk.js.map", - "5947.aa34b55f.chunk.js.map": "./static/js/5947.aa34b55f.chunk.js.map", - "4533.224f8305.chunk.js.map": "./static/js/4533.224f8305.chunk.js.map", - "6147.fa1f52fb.chunk.js.map": "./static/js/6147.fa1f52fb.chunk.js.map", + "9807.3f033821.chunk.js.map": "./static/js/9807.3f033821.chunk.js.map", + "3806.e2daceb3.chunk.js.map": "./static/js/3806.e2daceb3.chunk.js.map", + "2742.f1b14cdb.chunk.js.map": "./static/js/2742.f1b14cdb.chunk.js.map", + "3474.378d2159.chunk.js.map": "./static/js/3474.378d2159.chunk.js.map", + "4577.ee518ba9.chunk.js.map": "./static/js/4577.ee518ba9.chunk.js.map", + "5947.88f9751e.chunk.js.map": "./static/js/5947.88f9751e.chunk.js.map", + "4533.e1a532b6.chunk.js.map": "./static/js/4533.e1a532b6.chunk.js.map", + "6147.aed56e85.chunk.js.map": "./static/js/6147.aed56e85.chunk.js.map", "2805.73cec790.chunk.js.map": "./static/js/2805.73cec790.chunk.js.map", "3143.e6a9621d.chunk.js.map": "./static/js/3143.e6a9621d.chunk.js.map", "428.b5539f2b.chunk.js.map": "./static/js/428.b5539f2b.chunk.js.map", - "1069.b301b69c.chunk.js.map": "./static/js/1069.b301b69c.chunk.js.map", - "1140.c920261b.chunk.js.map": "./static/js/1140.c920261b.chunk.js.map", - "2094.d27076fb.chunk.js.map": "./static/js/2094.d27076fb.chunk.js.map", - "7950.3a3eca23.chunk.js.map": "./static/js/7950.3a3eca23.chunk.js.map", - "671.f558f624.chunk.js.map": "./static/js/671.f558f624.chunk.js.map", - "8961.9d522393.chunk.js.map": "./static/js/8961.9d522393.chunk.js.map", - "3967.028aff54.chunk.js.map": "./static/js/3967.028aff54.chunk.js.map", + "1069.6dfe4ad0.chunk.js.map": "./static/js/1069.6dfe4ad0.chunk.js.map", + "1140.0208375a.chunk.js.map": "./static/js/1140.0208375a.chunk.js.map", + "2094.4854485e.chunk.js.map": "./static/js/2094.4854485e.chunk.js.map", + "7950.455e5528.chunk.js.map": "./static/js/7950.455e5528.chunk.js.map", + "671.18a32329.chunk.js.map": "./static/js/671.18a32329.chunk.js.map", + "8961.8aa802d6.chunk.js.map": "./static/js/8961.8aa802d6.chunk.js.map", + "3967.ef703755.chunk.js.map": "./static/js/3967.ef703755.chunk.js.map", "5677.ce92c9f5.chunk.css.map": "./static/css/5677.ce92c9f5.chunk.css.map", - "5677.d409c330.chunk.js.map": "./static/js/5677.d409c330.chunk.js.map", + "5677.654039a6.chunk.js.map": "./static/js/5677.654039a6.chunk.js.map", "4360.ce92c9f5.chunk.css.map": "./static/css/4360.ce92c9f5.chunk.css.map", - "4360.0eb9c965.chunk.js.map": "./static/js/4360.0eb9c965.chunk.js.map", - "7664.29184378.chunk.js.map": "./static/js/7664.29184378.chunk.js.map", - "9080.62f1f229.chunk.js.map": "./static/js/9080.62f1f229.chunk.js.map", - "5961.3edf7e5a.chunk.js.map": "./static/js/5961.3edf7e5a.chunk.js.map", + "4360.bbbd8faf.chunk.js.map": "./static/js/4360.bbbd8faf.chunk.js.map", + "4109.04a89c2d.chunk.js.map": "./static/js/4109.04a89c2d.chunk.js.map", + "9080.bb419916.chunk.js.map": "./static/js/9080.bb419916.chunk.js.map", + "5961.04fd21a3.chunk.js.map": "./static/js/5961.04fd21a3.chunk.js.map", "6549.e0686e32.chunk.js.map": "./static/js/6549.e0686e32.chunk.js.map", - "7498.afa7399a.chunk.js.map": "./static/js/7498.afa7399a.chunk.js.map", - "9421.d2c1ef7f.chunk.js.map": "./static/js/9421.d2c1ef7f.chunk.js.map", - "5284.80529094.chunk.js.map": "./static/js/5284.80529094.chunk.js.map", - "4818.b8e96cdf.chunk.js.map": "./static/js/4818.b8e96cdf.chunk.js.map", + "7498.07dd467b.chunk.js.map": "./static/js/7498.07dd467b.chunk.js.map", + "9421.a88c8e02.chunk.js.map": "./static/js/9421.a88c8e02.chunk.js.map", + "5284.e23070a0.chunk.js.map": "./static/js/5284.e23070a0.chunk.js.map", + "4818.65ba088c.chunk.js.map": "./static/js/4818.65ba088c.chunk.js.map", "2401.74634660.chunk.js.map": "./static/js/2401.74634660.chunk.js.map", "8724.ce92c9f5.chunk.css.map": "./static/css/8724.ce92c9f5.chunk.css.map", - "8724.f53ed58a.chunk.js.map": "./static/js/8724.f53ed58a.chunk.js.map", - "2182.d8fa5b60.chunk.js.map": "./static/js/2182.d8fa5b60.chunk.js.map", + "8724.cf8fb340.chunk.js.map": "./static/js/8724.cf8fb340.chunk.js.map", + "2182.468a5b4e.chunk.js.map": "./static/js/2182.468a5b4e.chunk.js.map", "7764.3b798da3.chunk.js.map": "./static/js/7764.3b798da3.chunk.js.map", - "4220.1ac654a2.chunk.js.map": "./static/js/4220.1ac654a2.chunk.js.map", - "1719.191f462f.chunk.js.map": "./static/js/1719.191f462f.chunk.js.map", - "3320.4bfb210a.chunk.js.map": "./static/js/3320.4bfb210a.chunk.js.map", - "9923.151a3975.chunk.js.map": "./static/js/9923.151a3975.chunk.js.map", + "4220.308c5fb3.chunk.js.map": "./static/js/4220.308c5fb3.chunk.js.map", + "1719.fbaa408a.chunk.js.map": "./static/js/1719.fbaa408a.chunk.js.map", + "3320.2e853989.chunk.js.map": "./static/js/3320.2e853989.chunk.js.map", + "9923.25fa1a75.chunk.js.map": "./static/js/9923.25fa1a75.chunk.js.map", "9586.c44d8f2b.chunk.js.map": "./static/js/9586.c44d8f2b.chunk.js.map", - "7261.3c0ed539.chunk.js.map": "./static/js/7261.3c0ed539.chunk.js.map", - "6436.cc600064.chunk.js.map": "./static/js/6436.cc600064.chunk.js.map", - "8343.43c0de46.chunk.js.map": "./static/js/8343.43c0de46.chunk.js.map", - "2841.21f2a1a3.chunk.js.map": "./static/js/2841.21f2a1a3.chunk.js.map", - "6167.83706f49.chunk.js.map": "./static/js/6167.83706f49.chunk.js.map", - "3698.3f9b03bb.chunk.js.map": "./static/js/3698.3f9b03bb.chunk.js.map", - "1971.25e3c08e.chunk.js.map": "./static/js/1971.25e3c08e.chunk.js.map", - "7346.39650f87.chunk.js.map": "./static/js/7346.39650f87.chunk.js.map", + "7261.98082dab.chunk.js.map": "./static/js/7261.98082dab.chunk.js.map", + "6436.f2bab163.chunk.js.map": "./static/js/6436.f2bab163.chunk.js.map", + "8343.b174034e.chunk.js.map": "./static/js/8343.b174034e.chunk.js.map", + "2841.95af1213.chunk.js.map": "./static/js/2841.95af1213.chunk.js.map", + "6167.edad2368.chunk.js.map": "./static/js/6167.edad2368.chunk.js.map", + "3698.49eb7411.chunk.js.map": "./static/js/3698.49eb7411.chunk.js.map", + "1971.306de04b.chunk.js.map": "./static/js/1971.306de04b.chunk.js.map", + "7346.8e455eaa.chunk.js.map": "./static/js/7346.8e455eaa.chunk.js.map", "5144.f66d75af.chunk.js.map": "./static/js/5144.f66d75af.chunk.js.map", "5125.9822771e.chunk.js.map": "./static/js/5125.9822771e.chunk.js.map", - "1973.f87dafdc.chunk.js.map": "./static/js/1973.f87dafdc.chunk.js.map", - "7187.c788af65.chunk.js.map": "./static/js/7187.c788af65.chunk.js.map", - "6173.ef152b76.chunk.js.map": "./static/js/6173.ef152b76.chunk.js.map", - "7146.56123dc2.chunk.js.map": "./static/js/7146.56123dc2.chunk.js.map", - "9924.43e44a65.chunk.js.map": "./static/js/9924.43e44a65.chunk.js.map", - "9193.82ed00e1.chunk.js.map": "./static/js/9193.82ed00e1.chunk.js.map", - "7451.0fa5a7e5.chunk.js.map": "./static/js/7451.0fa5a7e5.chunk.js.map", + "1973.55987b98.chunk.js.map": "./static/js/1973.55987b98.chunk.js.map", + "7187.b3ba71a1.chunk.js.map": "./static/js/7187.b3ba71a1.chunk.js.map", + "6173.b70c4e1a.chunk.js.map": "./static/js/6173.b70c4e1a.chunk.js.map", + "7146.09b3a43c.chunk.js.map": "./static/js/7146.09b3a43c.chunk.js.map", + "9924.a7c06331.chunk.js.map": "./static/js/9924.a7c06331.chunk.js.map", + "9193.cbd8d842.chunk.js.map": "./static/js/9193.cbd8d842.chunk.js.map", + "7451.43cf8bf6.chunk.js.map": "./static/js/7451.43cf8bf6.chunk.js.map", "165.ce92c9f5.chunk.css.map": "./static/css/165.ce92c9f5.chunk.css.map", - "165.93b2aa3b.chunk.js.map": "./static/js/165.93b2aa3b.chunk.js.map", - "4121.7f5ade25.chunk.js.map": "./static/js/4121.7f5ade25.chunk.js.map", - "609.70610e5c.chunk.js.map": "./static/js/609.70610e5c.chunk.js.map", - "3421.1091e001.chunk.js.map": "./static/js/3421.1091e001.chunk.js.map", - "2892.24e051ed.chunk.js.map": "./static/js/2892.24e051ed.chunk.js.map", - "7926.85e00b49.chunk.js.map": "./static/js/7926.85e00b49.chunk.js.map", - "6145.3b33e5ef.chunk.js.map": "./static/js/6145.3b33e5ef.chunk.js.map", + "165.6ba70895.chunk.js.map": "./static/js/165.6ba70895.chunk.js.map", + "4121.17b5e70f.chunk.js.map": "./static/js/4121.17b5e70f.chunk.js.map", + "609.218c57b6.chunk.js.map": "./static/js/609.218c57b6.chunk.js.map", + "3421.aa3eeb04.chunk.js.map": "./static/js/3421.aa3eeb04.chunk.js.map", + "2892.f2ab7fe7.chunk.js.map": "./static/js/2892.f2ab7fe7.chunk.js.map", + "7926.d155ef62.chunk.js.map": "./static/js/7926.d155ef62.chunk.js.map", + "6145.819d854c.chunk.js.map": "./static/js/6145.819d854c.chunk.js.map", "6951.ce92c9f5.chunk.css.map": "./static/css/6951.ce92c9f5.chunk.css.map", - "6951.ed01455f.chunk.js.map": "./static/js/6951.ed01455f.chunk.js.map", - "2966.6d679d02.chunk.js.map": "./static/js/2966.6d679d02.chunk.js.map", - "4177.b5885717.chunk.js.map": "./static/js/4177.b5885717.chunk.js.map", - "9679.0e4b32ce.chunk.js.map": "./static/js/9679.0e4b32ce.chunk.js.map", + "6951.e58557fd.chunk.js.map": "./static/js/6951.e58557fd.chunk.js.map", + "2966.c61fbf10.chunk.js.map": "./static/js/2966.c61fbf10.chunk.js.map", + "4177.bfe448c8.chunk.js.map": "./static/js/4177.bfe448c8.chunk.js.map", + "9679.2b8424ba.chunk.js.map": "./static/js/9679.2b8424ba.chunk.js.map", "8333.b0c9e377.chunk.js.map": "./static/js/8333.b0c9e377.chunk.js.map", - "1711.048bf01b.chunk.js.map": "./static/js/1711.048bf01b.chunk.js.map", - "9.4795f15a.chunk.js.map": "./static/js/9.4795f15a.chunk.js.map", - "4487.516ed3d7.chunk.js.map": "./static/js/4487.516ed3d7.chunk.js.map", - "6866.aeb40983.chunk.js.map": "./static/js/6866.aeb40983.chunk.js.map", - "8564.61b6c306.chunk.js.map": "./static/js/8564.61b6c306.chunk.js.map", - "3152.8f45736d.chunk.js.map": "./static/js/3152.8f45736d.chunk.js.map", - "7007.69464c05.chunk.js.map": "./static/js/7007.69464c05.chunk.js.map", - "14.98e91306.chunk.js.map": "./static/js/14.98e91306.chunk.js.map", - "2066.81f72337.chunk.js.map": "./static/js/2066.81f72337.chunk.js.map", + "1711.a046e26c.chunk.js.map": "./static/js/1711.a046e26c.chunk.js.map", + "9.0e073695.chunk.js.map": "./static/js/9.0e073695.chunk.js.map", + "4487.3ad24a2d.chunk.js.map": "./static/js/4487.3ad24a2d.chunk.js.map", + "6866.aa2f03f0.chunk.js.map": "./static/js/6866.aa2f03f0.chunk.js.map", + "8564.11a3023b.chunk.js.map": "./static/js/8564.11a3023b.chunk.js.map", + "3152.daa99377.chunk.js.map": "./static/js/3152.daa99377.chunk.js.map", + "7007.3606231e.chunk.js.map": "./static/js/7007.3606231e.chunk.js.map", + "14.25ecb28d.chunk.js.map": "./static/js/14.25ecb28d.chunk.js.map", + "2066.5180dac0.chunk.js.map": "./static/js/2066.5180dac0.chunk.js.map", "5444.e8727da9.chunk.js.map": "./static/js/5444.e8727da9.chunk.js.map", "892.2aaf58f1.chunk.js.map": "./static/js/892.2aaf58f1.chunk.js.map", - "3690.b0d03a12.chunk.js.map": "./static/js/3690.b0d03a12.chunk.js.map", - "5399.5699b879.chunk.js.map": "./static/js/5399.5699b879.chunk.js.map", + "3690.536fb187.chunk.js.map": "./static/js/3690.536fb187.chunk.js.map", + "5399.6bc650ac.chunk.js.map": "./static/js/5399.6bc650ac.chunk.js.map", "606.28fdb5bc.chunk.js.map": "./static/js/606.28fdb5bc.chunk.js.map", - "9998.e7c54804.chunk.js.map": "./static/js/9998.e7c54804.chunk.js.map", - "9769.733c21d3.chunk.js.map": "./static/js/9769.733c21d3.chunk.js.map", + "9998.1a613ce5.chunk.js.map": "./static/js/9998.1a613ce5.chunk.js.map", + "9769.a2bfb4d7.chunk.js.map": "./static/js/9769.a2bfb4d7.chunk.js.map", "8954.00599ff1.chunk.js.map": "./static/js/8954.00599ff1.chunk.js.map", "7248.1e0c4e19.chunk.js.map": "./static/js/7248.1e0c4e19.chunk.js.map", - "4837.6220832b.chunk.js.map": "./static/js/4837.6220832b.chunk.js.map", + "4837.98af4cfe.chunk.js.map": "./static/js/4837.98af4cfe.chunk.js.map", "3020.3b2e782c.chunk.js.map": "./static/js/3020.3b2e782c.chunk.js.map", - "9056.ad0432f8.chunk.js.map": "./static/js/9056.ad0432f8.chunk.js.map", + "9056.41f0e489.chunk.js.map": "./static/js/9056.41f0e489.chunk.js.map", "3360.453f0701.chunk.js.map": "./static/js/3360.453f0701.chunk.js.map", "8420.68d5dfb4.chunk.js.map": "./static/js/8420.68d5dfb4.chunk.js.map", "1420.517f0e88.chunk.js.map": "./static/js/1420.517f0e88.chunk.js.map", "2309.49be65c5.chunk.js.map": "./static/js/2309.49be65c5.chunk.js.map", - "2364.a32e93a4.chunk.js.map": "./static/js/2364.a32e93a4.chunk.js.map", - "3356.3534f8c0.chunk.js.map": "./static/js/3356.3534f8c0.chunk.js.map", + "1233.9903fc82.chunk.js.map": "./static/js/1233.9903fc82.chunk.js.map", + "3356.05b42758.chunk.js.map": "./static/js/3356.05b42758.chunk.js.map", + "8016.b0ab3b67.chunk.js.map": "./static/js/8016.b0ab3b67.chunk.js.map", "6851.3b47e1b9.chunk.js.map": "./static/js/6851.3b47e1b9.chunk.js.map", - "2253.0ed59cf3.chunk.js.map": "./static/js/2253.0ed59cf3.chunk.js.map", - "6427.9b08fd5a.chunk.js.map": "./static/js/6427.9b08fd5a.chunk.js.map", - "3538.1b5c3c94.chunk.js.map": "./static/js/3538.1b5c3c94.chunk.js.map", - "5708.8fe332b9.chunk.js.map": "./static/js/5708.8fe332b9.chunk.js.map", - "8749.40f40fd4.chunk.js.map": "./static/js/8749.40f40fd4.chunk.js.map", - "7348.18bf40ff.chunk.js.map": "./static/js/7348.18bf40ff.chunk.js.map", + "2253.d527f443.chunk.js.map": "./static/js/2253.d527f443.chunk.js.map", + "6427.028089e0.chunk.js.map": "./static/js/6427.028089e0.chunk.js.map", + "3538.60e98cef.chunk.js.map": "./static/js/3538.60e98cef.chunk.js.map", + "8749.fa0fb710.chunk.js.map": "./static/js/8749.fa0fb710.chunk.js.map", + "7348.b037b952.chunk.js.map": "./static/js/7348.b037b952.chunk.js.map", "1760.8589ea77.chunk.js.map": "./static/js/1760.8589ea77.chunk.js.map", - "7722.f38ca1fa.chunk.js.map": "./static/js/7722.f38ca1fa.chunk.js.map", + "2873.ebf17fc8.chunk.js.map": "./static/js/2873.ebf17fc8.chunk.js.map", "8708.70b62dd5.chunk.js.map": "./static/js/8708.70b62dd5.chunk.js.map", - "2594.a1bd0e0e.chunk.js.map": "./static/js/2594.a1bd0e0e.chunk.js.map", + "2594.77f64a1f.chunk.js.map": "./static/js/2594.77f64a1f.chunk.js.map", "440.5bb0a106.chunk.js.map": "./static/js/440.5bb0a106.chunk.js.map", - "3045.691c66fa.chunk.js.map": "./static/js/3045.691c66fa.chunk.js.map", + "3045.f1cc8d42.chunk.js.map": "./static/js/3045.f1cc8d42.chunk.js.map", "4817.2c511e72.chunk.js.map": "./static/js/4817.2c511e72.chunk.js.map", - "227.30c65ef2.chunk.js.map": "./static/js/227.30c65ef2.chunk.js.map", - "4105.1b1d6fe0.chunk.js.map": "./static/js/4105.1b1d6fe0.chunk.js.map", + "938.8f6a5aa1.chunk.js.map": "./static/js/938.8f6a5aa1.chunk.js.map", + "4105.a498ca05.chunk.js.map": "./static/js/4105.a498ca05.chunk.js.map", "9876.3e5a4f83.chunk.js.map": "./static/js/9876.3e5a4f83.chunk.js.map", - "7777.6f5904c7.chunk.js.map": "./static/js/7777.6f5904c7.chunk.js.map", + "7777.7ea62662.chunk.js.map": "./static/js/7777.7ea62662.chunk.js.map", "7042.343b48b2.chunk.js.map": "./static/js/7042.343b48b2.chunk.js.map", - "3201.8afb9fa9.chunk.js.map": "./static/js/3201.8afb9fa9.chunk.js.map", - "1724.d1b98d6d.chunk.js.map": "./static/js/1724.d1b98d6d.chunk.js.map", + "3201.9f8a570f.chunk.js.map": "./static/js/3201.9f8a570f.chunk.js.map", + "7664.9ba57569.chunk.js.map": "./static/js/7664.9ba57569.chunk.js.map", + "5170.2d3119fa.chunk.js.map": "./static/js/5170.2d3119fa.chunk.js.map", "7454.6a33b546.chunk.js.map": "./static/js/7454.6a33b546.chunk.js.map", "6873.a4c0dde3.chunk.js.map": "./static/js/6873.a4c0dde3.chunk.js.map", "3453.9ef32892.chunk.js.map": "./static/js/3453.9ef32892.chunk.js.map" }, "entrypoints": [ "static/css/main.c4c1effe.css", - "static/js/main.c2f8fc5a.js" + "static/js/main.c7ee1a1d.js" ] } \ No newline at end of file diff --git a/portal-ui/build/index.html b/portal-ui/build/index.html index bcbfe21a1..ba6b7e0ea 100644 --- a/portal-ui/build/index.html +++ b/portal-ui/build/index.html @@ -1 +1 @@ -MinIO Console
\ No newline at end of file +MinIO Console
\ No newline at end of file diff --git a/portal-ui/build/static/js/1056.6f1cb8e0.chunk.js b/portal-ui/build/static/js/1056.6f1cb8e0.chunk.js new file mode 100644 index 000000000..41457b9f0 --- /dev/null +++ b/portal-ui/build/static/js/1056.6f1cb8e0.chunk.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1056],{29316:function(e,t,n){n(50390);var a=n(6369),r=n(86509),i=n(4285),s=n(11387),o=n(62559);t.Z=(0,i.Z)((function(e){return(0,r.Z)({link:{display:"flex",alignItems:"center",textDecoration:"none",maxWidth:"300px",padding:"2rem 2rem 0rem 2rem",color:e.palette.primary.light,fontSize:".8rem","&:hover":{textDecoration:"underline"}},icon:{marginRight:".3rem",display:"flex",alignItems:"center",justifyContent:"center","& svg.min-icon":{width:12}}})}))((function(e){var t=e.to,n=e.label,r=e.classes,i=e.className,l=e.executeOnClick;return(0,o.jsxs)(a.rU,{to:t,className:"".concat(r.link," ").concat(i||""),onClick:function(){l&&l()},children:[(0,o.jsx)("div",{className:r.icon,children:(0,o.jsx)(s.xN,{})}),(0,o.jsx)("div",{className:r.label,children:n})]})}))},70758:function(e,t,n){var a=n(18489),r=n(36222),i=n(83738),s=(n(50390),n(86509)),o=n(4285),l=n(95467),c=n(94187),u=n(44977),d=n(62559),m=["classes","children","variant","tooltip"];t.Z=(0,o.Z)((function(e){return(0,s.Z)({root:{padding:8,marginLeft:8,borderWidth:1,borderColor:"#696969",color:"#696969",borderStyle:"solid",borderRadius:3,"& .min-icon":{width:20},"& .MuiTouchRipple-root span":{backgroundColor:e.palette.primary.main,borderRadius:3,opacity:.3},"&:disabled":{color:"#EBEBEB",borderColor:"#EBEBEB"}},contained:{borderColor:e.palette.primary.main,background:e.palette.primary.main,color:"white","& .MuiTouchRipple-root span":{backgroundColor:e.palette.primary.dark,borderRadius:3,opacity:.3},"&:hover":{backgroundColor:e.palette.primary.light,color:"#FFF"}}})}))((function(e){var t=e.classes,n=e.children,s=e.variant,o=void 0===s?"outlined":s,p=e.tooltip,g=(0,i.Z)(e,m),f=(0,d.jsx)(l.Z,(0,a.Z)((0,a.Z)({},g),{},{className:(0,u.Z)(t.root,(0,r.Z)({},t.contained,"contained"===o)),children:n}));return p&&""!==p?(0,d.jsx)(c.Z,{title:p,children:(0,d.jsx)("span",{children:f})}):f}))},39080:function(e,t,n){n.r(t),n.d(t,{default:function(){return Z}});var a=n(18489),r=n(35531),i=n(50390),s=n(38342),o=n.n(s),l=n(86509),c=n(4285),u=n(66946),d=n(76352),m=n(25594),p=n(58217),g=n(65771),f=n(70758),h=n(33034),x=n.n(h),v=n(11387),y=n(72462),C=n(62559),S=(0,c.Z)((function(e){return(0,l.Z)({container:{display:"flex",flexFlow:"column",padding:"20px 0 8px 0"},inputWithCopy:{"& .MuiInputBase-root ":{width:"100%",background:"#FBFAFA","& .MuiInputBase-input":{height:".8rem"},"& .MuiInputAdornment-positionEnd":{marginRight:".5rem","& .MuiButtonBase-root":{height:"2rem"}}},"& .MuiButtonBase-root .min-icon":{width:".8rem",height:".8rem"}},inputLabel:(0,a.Z)((0,a.Z)({},y.YI.inputLabel),{},{fontSize:".8rem"})})}))((function(e){var t=e.label,n=void 0===t?"":t,a=e.value,r=void 0===a?"":a,i=e.classes,s=void 0===i?{}:i;return(0,C.jsxs)("div",{className:s.container,children:[(0,C.jsxs)("div",{className:s.inputLabel,children:[n,":"]}),(0,C.jsx)("div",{className:s.inputWithCopy,children:(0,C.jsx)(p.Z,{value:r,readOnly:!0,endAdornment:(0,C.jsx)(g.Z,{position:"end",children:(0,C.jsx)(x(),{text:r,children:(0,C.jsx)(f.Z,{"aria-label":"copy",tooltip:"Copy",onClick:function(){},onMouseDown:function(){},edge:"end",children:(0,C.jsx)(v.TI,{})})})})})})]})})),j=n(47424),Z=(0,c.Z)((function(e){return(0,l.Z)({warningBlock:{color:"red",fontSize:".85rem",margin:".5rem 0 .5rem 0",display:"flex",alignItems:"center","& svg ":{marginRight:".3rem",height:16,width:16}},credentialTitle:{padding:".8rem 0 0 0",fontWeight:600,fontSize:".9rem"},buttonContainer:{textAlign:"right",marginTop:"1rem"},credentialsPanel:{overflowY:"auto",maxHeight:350},promptTitle:{display:"flex",alignItems:"center"},buttonSpacer:{marginRight:".9rem"},promptIcon:{marginRight:".1rem",display:"flex",alignItems:"center",height:"2rem",width:"2rem"}})}))((function(e){var t=e.classes,n=e.newServiceAccount,s=e.open,l=e.closeModal,c=e.entity;if(!n)return null;var p=o()(n,"console",null),g=o()(n,"idp",!1);return(0,C.jsx)(d.Z,{modalOpen:s,onClose:function(){l()},title:(0,C.jsx)("div",{className:t.promptTitle,children:(0,C.jsxs)("div",{children:["New ",c," Created"]})}),titleIcon:(0,C.jsx)(v.tV,{}),children:(0,C.jsxs)(m.ZP,{container:!0,children:[(0,C.jsxs)(m.ZP,{item:!0,xs:12,className:t.formScrollable,children:["A new ",c," has been created with the following details:",!g&&p&&(0,C.jsx)(i.Fragment,{children:(0,C.jsxs)(m.ZP,{item:!0,xs:12,className:t.credentialsPanel,children:[(0,C.jsx)("div",{className:t.credentialTitle,children:"Console Credentials"}),Array.isArray(p)&&p.map((function(e,t){return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(S,{label:"Access Key",value:e.accessKey}),(0,C.jsx)(S,{label:"Secret Key",value:e.secretKey})]})})),!Array.isArray(p)&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(S,{label:"Access Key",value:p.accessKey}),(0,C.jsx)(S,{label:"Secret Key",value:p.secretKey})]})]})}),g?(0,C.jsx)("div",{className:t.warningBlock,children:"Please Login via the configured external identity provider."}):(0,C.jsxs)("div",{className:t.warningBlock,children:[(0,C.jsx)(j.Z,{}),(0,C.jsx)("span",{children:"Write these down, as this is the only time the secret will be displayed."})]})]}),(0,C.jsxs)(m.ZP,{item:!0,xs:12,className:t.buttonContainer,children:[(0,C.jsx)(u.Z,{variant:"outlined",className:t.buttonSpacer,onClick:function(){l()},color:"primary",children:"Done"}),!g&&(0,C.jsx)(u.Z,{onClick:function(){var e={};if(p)if(Array.isArray(p)){var t=p.map((function(e){return{access_key:e.accessKey,secret_key:e.secretKey}}));e={console:(0,r.Z)(t)}}else e={console:[{access_key:p.accessKey,secret_key:p.secretKey}]};!function(e,t){var n=document.createElement("a");n.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}("credentials.json",JSON.stringify((0,a.Z)({},e)))},endIcon:(0,C.jsx)(v._8,{}),variant:"contained",color:"primary",children:"Download"})]})]})})}))},82461:function(e,t,n){n.d(t,{Z:function(){return C}});var a=n(23430),r=n(18489),i=n(50390),s=n(38342),o=n.n(s),l=n(25594),c=n(14602),u=n(94187),d=n(95467),m=n(46529),p=n(94258),g=n(86509),f=n(4285),h=n(72462),x=n(97538),v=n(82981),y=n(62559),C=(0,f.Z)((function(e){return(0,g.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},h.YI),h.Hr),{},{valueString:{maxWidth:350,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginTop:2},fileInputField:{margin:"13px 0","@media (max-width: 900px)":{flexFlow:"column"}}},h.bV),{},{inputLabel:(0,r.Z)((0,r.Z)({},h.YI.inputLabel),{},{fontWeight:"normal"}),textBoxContainer:(0,r.Z)((0,r.Z)({},h.YI.textBoxContainer),{},{maxWidth:"100%",border:"1px solid #eaeaea",paddingLeft:"15px"})}))}))((function(e){var t=e.label,n=e.classes,r=e.onChange,s=e.id,g=e.name,f=e.disabled,h=void 0!==f&&f,C=e.tooltip,S=void 0===C?"":C,j=e.required,Z=e.error,b=void 0===Z?"":Z,_=e.accept,P=void 0===_?"":_,N=e.value,I=void 0===N?"":N,A=(0,i.useState)(!1),T=(0,a.Z)(A,2),k=T[0],R=T[1];return(0,y.jsx)(i.Fragment,{children:(0,y.jsxs)(l.ZP,{item:!0,xs:12,className:"".concat(n.fileInputField," ").concat(n.fieldBottom," ").concat(n.fieldContainer," ").concat(""!==b?n.errorInField:""),children:[""!==t&&(0,y.jsxs)(c.Z,{htmlFor:s,className:"".concat(""!==b?n.fieldLabelError:""," ").concat(n.inputLabel),children:[(0,y.jsxs)("span",{children:[t,j?"*":""]}),""!==S&&(0,y.jsx)("div",{className:n.tooltipContainer,children:(0,y.jsx)(u.Z,{title:S,placement:"top-start",children:(0,y.jsx)("div",{className:n.tooltip,children:(0,y.jsx)(x.Z,{})})})})]}),k||""===I?(0,y.jsxs)("div",{className:n.textBoxContainer,children:[(0,y.jsx)("input",{type:"file",name:g,onChange:function(e){var t=o()(e,"target.files[0].name","");!function(e,t){var n=e.target.files[0],a=new FileReader;a.readAsDataURL(n),a.onload=function(){var e=a.result;if(e){var n=e.toString().split("base64,");2===n.length&&t(n[1])}}}(e,(function(e){r(e,t)}))},accept:P,required:j,disabled:h,className:n.fileInputField}),""!==I&&(0,y.jsx)(d.Z,{color:"primary","aria-label":"upload picture",component:"span",onClick:function(){R(!1)},disableRipple:!1,disableFocusRipple:!1,size:"small",children:(0,y.jsx)(p.Z,{})}),""!==b&&(0,y.jsx)(v.Z,{errorMessage:b})]}):(0,y.jsxs)("div",{className:n.fileReselect,children:[(0,y.jsx)("div",{className:n.valueString,children:I}),(0,y.jsx)(d.Z,{color:"primary","aria-label":"upload picture",component:"span",onClick:function(){R(!0)},disableRipple:!1,disableFocusRipple:!1,size:"small",children:(0,y.jsx)(m.Z,{})})]})]})})}))},27207:function(e,t,n){var a=n(36222),r=n(18489),i=(n(50390),n(44977)),s=n(25594),o=n(82420),l=n(66695),c=n(98893),u=n(14602),d=n(94187),m=n(86509),p=n(4285),g=n(62449),f=n(72462),h=n(97538),x=n(62559),v=(0,g.Z)((0,r.Z)({root:{"&:hover":{backgroundColor:"transparent"}}},f.FU)),y=function(e){var t=v();return(0,x.jsx)(c.Z,(0,r.Z)({className:t.root,disableRipple:!0,color:"default",checkedIcon:(0,x.jsx)("span",{className:t.radioSelectedIcon}),icon:(0,x.jsx)("span",{className:t.radioUnselectedIcon})},e))};t.Z=(0,p.Z)((function(e){return(0,m.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},f.YI),f.Hr),{},{optionLabel:{"&.Mui-disabled":{"& .MuiFormControlLabel-label":{color:"#9c9c9c"}},"&:last-child":{marginRight:0},"& .MuiFormControlLabel-label":{fontSize:12,color:"#07193E"}},checkedOption:{"& .MuiFormControlLabel-label":{fontSize:12,color:"#07193E",fontWeight:700}}}))}))((function(e){var t=e.selectorOptions,n=void 0===t?[]:t,r=e.currentSelection,c=e.label,m=e.id,p=e.name,g=e.onChange,f=e.tooltip,v=void 0===f?"":f,C=e.disableOptions,S=void 0!==C&&C,j=e.classes,Z=e.displayInColumn,b=void 0!==Z&&Z;return(0,x.jsxs)(s.ZP,{container:!0,alignItems:"center",children:[(0,x.jsx)(s.ZP,{item:!0,xs:!0,children:(0,x.jsxs)(u.Z,{htmlFor:m,className:j.inputLabel,children:[(0,x.jsx)("span",{children:c}),""!==v&&(0,x.jsx)("div",{className:j.tooltipContainer,children:(0,x.jsx)(d.Z,{title:v,placement:"top-start",children:(0,x.jsx)("div",{children:(0,x.jsx)(h.Z,{})})})})]})}),(0,x.jsx)(s.ZP,{item:!0,xs:!0,className:j.radioOptionsLayout,children:(0,x.jsx)(o.Z,{"aria-label":m,id:m,name:p,value:r,onChange:g,row:!b,style:{display:"block",textAlign:"right"},children:n.map((function(e){return(0,x.jsx)(l.Z,{value:e.value,control:(0,x.jsx)(y,{}),label:e.label,disabled:S,className:(0,i.Z)(j.optionLabel,(0,a.Z)({},j.checkedOption,e.value===r))},"rd-".concat(p,"-").concat(e.value))}))})})]})}))},67754:function(e,t,n){var a=n(18489),r=n(50390),i=n(25594),s=n(46413),o=n(14602),l=n(94187),c=n(47554),u=n(43965),d=n(31680),m=n(86509),p=n(4285),g=n(72462),f=n(97538),h=n(62559),x=(0,p.Z)((function(e){return(0,m.Z)({root:{height:38,lineHeight:1,"label + &":{marginTop:e.spacing(3)}},input:{height:38,position:"relative",color:"#07193E",fontSize:13,fontWeight:600,padding:"8px 20px 10px 10px",border:"#e5e5e5 1px solid",borderRadius:4,display:"flex",alignItems:"center","&:hover":{borderColor:"#393939"},"&:focus":{backgroundColor:"#fff"}}})}))(s.ZP);t.Z=(0,p.Z)((function(e){return(0,m.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},g.YI),g.Hr),{},{inputLabel:(0,a.Z)((0,a.Z)({},g.YI.inputLabel),{},{"& span":{fontWeight:"normal"}}),fieldContainer:{display:"flex","@media (max-width: 600px)":{flexFlow:"column"}}}))}))((function(e){var t=e.classes,n=e.id,a=e.name,s=e.onChange,m=e.options,p=e.label,g=e.tooltip,v=void 0===g?"":g,y=e.value,C=e.disabled,S=void 0!==C&&C;return(0,h.jsx)(r.Fragment,{children:(0,h.jsxs)(i.ZP,{item:!0,xs:12,className:t.fieldContainer,children:[""!==p&&(0,h.jsxs)(o.Z,{htmlFor:n,className:t.inputLabel,children:[(0,h.jsx)("span",{children:p}),""!==v&&(0,h.jsx)("div",{className:t.tooltipContainer,children:(0,h.jsx)(l.Z,{title:v,placement:"top-start",children:(0,h.jsx)("div",{className:t.tooltip,children:(0,h.jsx)(f.Z,{})})})})]}),(0,h.jsx)(c.Z,{fullWidth:!0,children:(0,h.jsx)(u.Z,{id:n,name:a,value:y,onChange:s,input:(0,h.jsx)(x,{}),disabled:S,children:m.map((function(e){return(0,h.jsx)(d.Z,{value:e.value,children:e.label},"select-".concat(a,"-").concat(e.label))}))})})]})})}))},76295:function(e,t,n){n.d(t,{Z:function(){return f}});var a=n(23430),r=n(50390),i=n(86509),s=n(4285),o=n(81378),l=n(66946),c=n(62559),u=(0,s.Z)((function(e){return(0,i.Z)({wizardStepContainer:{display:"flex",flexDirection:"column",flex:1},wizardComponent:{overflowY:"auto",marginBottom:10,height:"calc(100vh - 100px - 80px)",minHeight:400,flex:1,width:"100%"},wizardModal:{overflowY:"auto",marginBottom:10,height:"calc(100vh - 515px)"},buttonsContainer:{display:"flex",flexDirection:"row",justifyContent:"flex-start",padding:"10px 0",borderTop:"#EAEAEA 1px solid","& button":{marginLeft:10},"&.forModal":{paddingBottom:0}},buttonInnerContainer:{width:"100%",textAlign:"right",marginRight:15}})}))((function(e){var t=e.classes,n=e.page,a=e.pageChange,r=e.loadingStep,i=e.forModal;return(0,c.jsxs)("div",{className:t.wizardStepContainer,children:[(0,c.jsx)("div",{className:i?t.wizardModal:t.wizardComponent,children:n.componentRender}),r&&(0,c.jsx)("div",{children:(0,c.jsx)(o.Z,{})}),(0,c.jsx)("div",{className:"".concat(t.buttonsContainer," ").concat(i?"forModal":""),children:(0,c.jsx)("div",{className:t.buttonInnerContainer,children:n.buttons.map((function(e){return(0,c.jsx)(l.Z,{variant:"contained",color:"primary",size:"small",onClick:function(){!function(e){switch(e.type){case"next":a("++");break;case"back":a("--");break;case"to":a(e.toPage||0)}e.action&&e.action(a)}(e)},disabled:!e.enabled,children:e.label},"button-".concat(n.label,"-").concat(e.label))}))})})]})})),d=n(5211),m=n(25594),p=n(14291),g=n(70902),f=(0,s.Z)((function(e){return(0,i.Z)({wizFromContainer:{},wizFromModal:{position:"relative"},modalWizardSteps:{padding:5,borderBottom:"#eaeaea 1px solid","& ul":{padding:0,marginTop:0,display:"flex",justifyContent:"space-evenly","& li":{listStyle:"lower-roman","&::marker":{paddingLeft:15}}}},buttonList:{backgroundColor:"transparent",border:"none",cursor:"pointer","&:not(:disabled):hover":{textDecoration:"underline"},"&:selected, &:active, &:focus, &:focus:active":{border:"none",outline:0,boxShadow:"none"}},paddedContentGrid:{marginTop:8,padding:"0 10px",minHeight:400},stepsLabel:{fontSize:20,color:"#393939",fontWeight:600,margin:"15px 12px","&.stepsModalTitle":{textAlign:"center",width:"100%",marginTop:0,marginBottom:10}},stepsMasterContainer:{position:"sticky",top:0,backgroundColor:"#FFFFFF",width:"100%",maxHeight:90},verticalSteps:{borderRight:"1px solid #E5E5E5",background:"#F8F8F8"},stepsContainer:{paddingTop:0,"& .MuiButtonBase-root.Mui-selected":{background:"#E5E5E5"}},stepItem:{minHeight:60,borderBottom:"1px solid #E5E5E5","&:hover":{background:"rgba(247,247,247,0.7)"}}})}))((function(e){var t=e.classes,n=e.wizardSteps,i=e.loadingStep,s=e.forModal,o=(0,r.useState)(0),l=(0,a.Z)(o,2),f=l[0],h=l[1],x=function(e){var t=n.length-1;if("++"===e){var a=f+1;a>t&&(a=t),h(a)}if("--"===e){var r=f-1;r<0&&(r=0),h(r)}if("number"===typeof e){var i=e;e<0&&(i=0),e>t&&(i=t),h(i)}};if(0===n.length)return null;return(0,c.jsxs)(m.ZP,{container:!0,className:s?t.wizFromModal:t.wizFromContainer,children:[s?(0,c.jsx)(r.Fragment,{children:(0,c.jsxs)("div",{className:t.stepsMasterContainer,children:[(0,c.jsx)("div",{className:"".concat(t.stepsLabel," stepsModalTitle"),children:"Steps"}),(0,c.jsx)("div",{className:t.modalWizardSteps,children:(0,c.jsx)("ul",{children:n.map((function(e,n){return(0,c.jsx)("li",{children:(0,c.jsx)("button",{onClick:function(){return x(n)},disabled:n>f,className:t.buttonList,children:e.label})},"wizard-".concat(n.toString()))}))})})]})}):(0,c.jsx)(r.Fragment,{children:(0,c.jsx)(m.ZP,{item:!0,xs:12,sm:2,md:2,lg:2,xl:2,className:t.verticalSteps,children:(0,c.jsx)(r.Fragment,{children:(0,c.jsx)(d.Z,{component:"nav",dense:!0,classes:{root:t.stepsContainer},children:n.map((function(e,n){return(0,c.jsx)(p.ZP,{button:!0,disableRipple:!0,onClick:function(){return x(n)},selected:f===n,classes:{root:t.stepItem},children:(0,c.jsx)(g.Z,{primary:e.label})},"wizard-".concat(n.toString()))}))})})})}),(0,c.jsx)(m.ZP,{item:!0,xs:12,sm:s?12:10,md:s?12:10,lg:s?12:10,xl:s?12:10,className:s?"":t.paddedContentGrid,children:(0,c.jsx)(u,{page:n[f],pageChange:x,loadingStep:i,forModal:s})})]})}))},25534:function(e,t,n){var a=n(18489),r=(n(50390),n(25594)),i=n(86509),s=n(4285),o=n(72462),l=n(62559);t.Z=(0,s.Z)((function(e){return(0,i.Z)((0,a.Z)({},o.Bw))}))((function(e){var t=e.classes,n=e.className,a=void 0===n?"":n,i=e.children;return(0,l.jsx)("div",{className:t.contentSpacer,children:(0,l.jsx)(r.ZP,{container:!0,children:(0,l.jsx)(r.ZP,{item:!0,xs:12,className:a,children:i})})})}))},35721:function(e,t,n){n(50390);var a=n(34424),r=n(25594),i=n(86509),s=n(4285),o=n(35477),l=n(95467),c=n(26805),u=n(44078),d=n(5265),m=n(11387),p=n(62559),g={toggleList:d.kQ},f=(0,a.$j)((function(e){return{sidebarOpen:e.system.sidebarOpen,operatorMode:e.system.operatorMode,managerObjects:e.objectBrowser.objectManager.objectsToManage}}),g);t.Z=f((0,s.Z)((function(e){return(0,i.Z)({headerContainer:{width:"100%",minHeight:79,display:"flex",backgroundColor:"#fff",left:0,boxShadow:"rgba(0,0,0,.08) 0 3px 10px"},label:{display:"flex",justifyContent:"flex-start",alignItems:"center"},labelStyle:{color:"#000",fontSize:18,fontWeight:700,marginLeft:34,marginTop:8},rightMenu:{textAlign:"right"},logo:{marginLeft:34,fill:e.palette.primary.main,"& .min-icon":{width:120}},middleComponent:{display:"flex",justifyContent:"center",alignItems:"center"}})}))((function(e){var t=e.classes,n=e.label,a=e.actions,i=e.sidebarOpen,s=e.operatorMode,d=e.managerObjects,g=e.toggleList,f=e.middleComponent;return(0,p.jsxs)(r.ZP,{container:!0,className:"".concat(t.headerContainer," page-header"),direction:"row",alignItems:"center",children:[(0,p.jsxs)(r.ZP,{item:!0,xs:12,sm:12,md:f?3:6,className:t.label,sx:{paddingTop:["15px","15px","0","0"]},children:[!i&&(0,p.jsx)("div",{className:t.logo,children:s?(0,p.jsx)(c.Z,{}):(0,p.jsx)(u.Z,{})}),(0,p.jsx)(o.Z,{variant:"h4",className:t.labelStyle,children:n})]}),f&&(0,p.jsx)(r.ZP,{item:!0,xs:12,sm:12,md:6,className:t.middleComponent,sx:{marginTop:["10px","10px","0","0"]},children:f}),(0,p.jsxs)(r.ZP,{item:!0,xs:12,sm:12,md:f?3:6,className:t.rightMenu,children:[a&&a,d&&d.length>0&&(0,p.jsx)(l.Z,{color:"primary","aria-label":"Refresh List",component:"span",onClick:function(){g()},size:"large",children:(0,p.jsx)(m.gx,{})})]})]})})))},1056:function(e,t,n){n.r(t),n.d(t,{default:function(){return ze}});var a,r,i=n(23430),s=n(18489),o=n(50390),l=n(38342),c=n.n(l),u=n(34424),d=n(25594),m=n(81378),p=n(86509),g=n(4285),f=n(72462),h=n(30324),x=n(28948),v=n(76295),y=n(44149),C=n(93127),S=n(39080),j=n(46864),Z=n(35531),b=n(46981),_=n(10369),P=n(84201),N=n(92440),I=n(66964),A=n(67754),T=n(62559),k=(0,u.$j)((function(e){return{storageClasses:e.tenants.createTenant.storageClasses,customImage:e.tenants.createTenant.fields.configure.customImage,imageName:e.tenants.createTenant.fields.configure.imageName,customDockerhub:e.tenants.createTenant.fields.configure.customDockerhub,imageRegistry:e.tenants.createTenant.fields.configure.imageRegistry,imageRegistryUsername:e.tenants.createTenant.fields.configure.imageRegistryUsername,imageRegistryPassword:e.tenants.createTenant.fields.configure.imageRegistryPassword,exposeMinIO:e.tenants.createTenant.fields.configure.exposeMinIO,exposeConsole:e.tenants.createTenant.fields.configure.exposeConsole,prometheusCustom:e.tenants.createTenant.fields.configure.prometheusCustom,tenantCustom:e.tenants.createTenant.fields.configure.tenantCustom,logSearchCustom:e.tenants.createTenant.fields.configure.logSearchCustom,logSearchVolumeSize:e.tenants.createTenant.fields.configure.logSearchVolumeSize,logSearchSizeFactor:e.tenants.createTenant.fields.configure.logSearchSizeFactor,prometheusVolumeSize:e.tenants.createTenant.fields.configure.prometheusVolumeSize,prometheusSizeFactor:e.tenants.createTenant.fields.configure.prometheusSizeFactor,logSearchSelectedStorageClass:e.tenants.createTenant.fields.configure.logSearchSelectedStorageClass,logSearchImage:e.tenants.createTenant.fields.configure.logSearchImage,kesImage:e.tenants.createTenant.fields.configure.kesImage,logSearchPostgresImage:e.tenants.createTenant.fields.configure.logSearchPostgresImage,logSearchPostgresInitImage:e.tenants.createTenant.fields.configure.logSearchPostgresInitImage,prometheusSelectedStorageClass:e.tenants.createTenant.fields.configure.prometheusSelectedStorageClass,prometheusImage:e.tenants.createTenant.fields.configure.prometheusImage,prometheusSidecarImage:e.tenants.createTenant.fields.configure.prometheusSidecarImage,prometheusInitImage:e.tenants.createTenant.fields.configure.prometheusInitImage,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass,tenantSecurityContext:e.tenants.createTenant.fields.configure.tenantSecurityContext,logSearchSecurityContext:e.tenants.createTenant.fields.configure.logSearchSecurityContext,logSearchPostgresSecurityContext:e.tenants.createTenant.fields.configure.logSearchPostgresSecurityContext,prometheusSecurityContext:e.tenants.createTenant.fields.configure.prometheusSecurityContext}}),{updateAddField:j.HM,isPageValid:j.NO}),R=(0,g.Z)((function(e){return(0,p.Z)((0,s.Z)((0,s.Z)({configSectionItem:{marginRight:15,"& .multiContainer":{border:"1px solid red"}},tenantCustomizationFields:{marginLeft:30,width:"88%",margin:"auto"},containerItem:{marginRight:15},fieldGroup:(0,s.Z)((0,s.Z)({},f.QV.fieldGroup),{},{paddingTop:15,marginBottom:25}),responsiveSectionItem:{"@media (max-width: 900px)":{flexFlow:"column",alignItems:"flex-start","& div > div":{marginBottom:5,marginRight:0}}},logSearchCustomFields:{marginLeft:20,padding:10,width:"90%",margin:"auto"},fieldSpaceTop:{marginTop:15},prometheusCustomFields:{marginLeft:20,padding:10,width:"90%",margin:"auto"}},f.oO),f.AK))}))(k((function(e){var t=e.classes,n=e.storageClasses,a=e.customImage,r=e.imageName,l=e.customDockerhub,c=e.imageRegistry,u=e.imageRegistryUsername,m=e.imageRegistryPassword,p=e.exposeMinIO,g=e.exposeConsole,f=e.prometheusCustom,h=e.tenantCustom,x=e.logSearchCustom,v=e.logSearchVolumeSize,y=(e.logSearchSizeFactor,e.logSearchImage),C=e.kesImage,S=e.logSearchPostgresImage,j=e.logSearchPostgresInitImage,k=e.prometheusVolumeSize,R=(e.prometheusSizeFactor,e.logSearchSelectedStorageClass),z=e.prometheusSelectedStorageClass,w=e.prometheusImage,F=e.prometheusSidecarImage,D=e.prometheusInitImage,E=e.updateAddField,U=e.isPageValid,K=e.selectedStorageClass,L=e.tenantSecurityContext,M=e.logSearchSecurityContext,q=e.logSearchPostgresSecurityContext,G=e.prometheusSecurityContext,V=(0,o.useState)({}),O=(0,i.Z)(V,2),B=O[0],$=O[1],W=[{label:"Default",value:"default"}].concat((0,Z.Z)(n)),H=(0,o.useCallback)((function(e,t){E("configure",e,t)}),[E]);(0,o.useEffect)((function(){var e=[];h&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"tenant_securityContext_runAsUser",required:!0,value:L.runAsUser,customValidation:""===L.runAsUser||parseInt(L.runAsUser)<0,customValidationMessage:"runAsUser must be present and be 0 or more"},{fieldKey:"tenant_securityContext_runAsGroup",required:!0,value:L.runAsGroup,customValidation:""===L.runAsGroup||parseInt(L.runAsGroup)<0,customValidationMessage:"runAsGroup must be present and be 0 or more"},{fieldKey:"tenant_securityContext_fsGroup",required:!0,value:L.fsGroup,customValidation:""===L.fsGroup||parseInt(L.fsGroup)<0,customValidationMessage:"fsGroup must be present and be 0 or more"}])),f&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"prometheus_storage_class",required:!0,value:z,customValidation:""===z,customValidationMessage:"Field cannot be empty"},{fieldKey:"prometheus_volume_size",required:!0,value:k,customValidation:""===k||parseInt(k)<=0,customValidationMessage:"Volume size must be present and be greater than 0"},{fieldKey:"prometheus_securityContext_runAsUser",required:!0,value:G.runAsUser,customValidation:""===G.runAsUser||parseInt(G.runAsUser)<0,customValidationMessage:"runAsUser must be present and be 0 or more"},{fieldKey:"prometheus_securityContext_runAsGroup",required:!0,value:G.runAsGroup,customValidation:""===G.runAsGroup||parseInt(G.runAsGroup)<0,customValidationMessage:"runAsGroup must be present and be 0 or more"},{fieldKey:"prometheus_securityContext_fsGroup",required:!0,value:G.fsGroup,customValidation:""===G.fsGroup||parseInt(G.fsGroup)<0,customValidationMessage:"fsGroup must be present and be 0 or more"}])),x&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"log_search_storage_class",required:!0,value:R,customValidation:""===R,customValidationMessage:"Field cannot be empty"},{fieldKey:"log_search_volume_size",required:!0,value:v,customValidation:""===v||parseInt(v)<=0,customValidationMessage:"Volume size must be present and be greatter than 0"},{fieldKey:"logSearch_securityContext_runAsUser",required:!0,value:M.runAsUser,customValidation:""===M.runAsUser||parseInt(M.runAsUser)<0,customValidationMessage:"runAsUser must be present and be 0 or more"},{fieldKey:"logSearch_securityContext_runAsGroup",required:!0,value:M.runAsGroup,customValidation:""===M.runAsGroup||parseInt(M.runAsGroup)<0,customValidationMessage:"runAsGroup must be present and be 0 or more"},{fieldKey:"logSearch_securityContext_fsGroup",required:!0,value:M.fsGroup,customValidation:""===M.fsGroup||parseInt(M.fsGroup)<0,customValidationMessage:"fsGroup must be present and be 0 or more"},{fieldKey:"postgres_securityContext_runAsUser",required:!0,value:q.runAsUser,customValidation:""===q.runAsUser||parseInt(q.runAsUser)<0,customValidationMessage:"runAsUser must be present and be 0 or more"},{fieldKey:"postgres_securityContext_runAsGroup",required:!0,value:G.runAsGroup,customValidation:""===q.runAsGroup||parseInt(q.runAsGroup)<0,customValidationMessage:"runAsGroup must be present and be 0 or more"},{fieldKey:"postgres_securityContext_fsGroup",required:!0,value:q.fsGroup,customValidation:""===q.fsGroup||parseInt(q.fsGroup)<0,customValidationMessage:"fsGroup must be present and be 0 or more"}])),a&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"image",required:!1,value:r,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/minio:VERSION'"},{fieldKey:"logSearchImage",required:!1,value:y,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/logsearchapi:VERSION'"},{fieldKey:"kesImage",required:!1,value:C,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/kes:VERSION'"},{fieldKey:"logSearchPostgresImage",required:!1,value:S,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'library/postgres:VERSION'"},{fieldKey:"logSearchPostgresInitImage",required:!1,value:j,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'library/busybox:VERSION'"},{fieldKey:"prometheusImage",required:!1,value:w,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/prometheus:VERSION'"},{fieldKey:"prometheusSidecarImage",required:!1,value:F,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'project/container:VERSION'"},{fieldKey:"prometheusInitImage",required:!1,value:D,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'library/busybox:VERSION'"}]),l&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"registry",required:!0,value:c},{fieldKey:"registryUsername",required:!0,value:u},{fieldKey:"registryPassword",required:!0,value:m}])));var t=(0,P.R)(e);U("configure",0===Object.keys(t).length),$(t)}),[a,r,y,C,S,j,w,F,D,l,c,u,m,U,f,h,x,z,k,R,v,L,M,q,G]),(0,o.useEffect)((function(){n.length>0&&(0===n.filter((function(e){return e.value===z})).length&&H("prometheusSelectedStorageClass","default"),0===n.filter((function(e){return e.value===R})).length&&H("logSearchSelectedStorageClass","default"))}),[R,z,K,n,H]);var Y=function(e){$((0,_.h)(B,e))};return(0,T.jsxs)(b.Z,{className:t.paperWrapper,children:[(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Configure"}),(0,T.jsx)("span",{className:t.descriptionText,children:"Basic configurations for tenant management"})]}),(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Expose Services"}),(0,T.jsx)("span",{className:t.descriptionText,children:"Whether the tenant's services should request an external IP."})]}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.configSectionItem,children:(0,T.jsx)(N.Z,{value:"expose_minio",id:"expose_minio",name:"expose_minio",checked:p,onChange:function(e){var t=e.target.checked;H("exposeMinIO",t)},label:"Expose MiniO Service"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.configSectionItem,children:(0,T.jsx)(N.Z,{value:"expose_console",id:"expose_console",name:"expose_console",checked:g,onChange:function(e){var t=e.target.checked;H("exposeConsole",t)},label:"Expose Console Service"})}),(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Additional Configurations"}),(0,T.jsx)("span",{className:t.descriptionText,children:"Configure SecurityContext, Storage Classes & Storage size for Log Search, Prometheus add-ons and your Tenant"})]}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.configSectionItem,children:(0,T.jsx)(N.Z,{value:"tenantConfig",id:"tenant_configuration",name:"tenant_configuration",checked:h,onChange:function(e){var t=e.target.checked;H("tenantCustom",t)},label:"Override Tenant defaults"})}),h&&(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.tenantCustomizationFields,children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"SecurityContext for MinIO"}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:"".concat(t.configSectionItem),children:(0,T.jsxs)("div",{className:"".concat(t.multiContainer," ").concat(t.responsiveSectionItem),children:[(0,T.jsx)("div",{className:t.containerItem,children:(0,T.jsx)(I.Z,{type:"number",id:"tenant_securityContext_runAsUser",name:"tenant_securityContext_runAsUser",onChange:function(e){H("tenantSecurityContext",(0,s.Z)((0,s.Z)({},L),{},{runAsUser:e.target.value})),Y("tenant_securityContext_runAsUser")},label:"Run As User",value:L.runAsUser,required:!0,error:B.tenant_securityContext_runAsUser||"",min:"0"})}),(0,T.jsx)("div",{className:t.containerItem,children:(0,T.jsx)(I.Z,{type:"number",id:"tenant_securityContext_runAsGroup",name:"tenant_securityContext_runAsGroup",onChange:function(e){H("tenantSecurityContext",(0,s.Z)((0,s.Z)({},L),{},{runAsGroup:e.target.value})),Y("tenant_securityContext_runAsGroup")},label:"Run As Group",value:L.runAsGroup,required:!0,error:B.tenant_securityContext_runAsGroup||"",min:"0"})}),(0,T.jsx)("div",{className:t.containerItem,children:(0,T.jsx)(I.Z,{type:"number",id:"tenant_securityContext_fsGroup",name:"tenant_securityContext_fsGroup",onChange:function(e){H("tenantSecurityContext",(0,s.Z)((0,s.Z)({},L),{},{fsGroup:e.target.value})),Y("tenant_securityContext_fsGroup")},label:"FsGroup",value:L.fsGroup,required:!0,error:B.tenant_securityContext_fsGroup||"",min:"0"})})]})}),(0,T.jsx)("br",{}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.configSectionItem,children:(0,T.jsx)("div",{className:t.multiContainer,children:(0,T.jsx)(N.Z,{value:"tenantSecurityContextRunAsNonRoot",id:"tenant_securityContext_runAsNonRoot",name:"tenant_securityContext_runAsNonRoot",checked:L.runAsNonRoot,onChange:function(e){var t=e.target.checked;H("tenantSecurityContext",(0,s.Z)((0,s.Z)({},L),{},{runAsNonRoot:t}))},label:"Do not run as Root"})})})]})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.configSectionItem,children:(0,T.jsx)(N.Z,{value:"logSearchConfig",id:"log_search_configuration",name:"log_search_configuration",checked:x,onChange:function(e){var t=e.target.checked;H("logSearchCustom",t)},label:"Override Log Search defaults"})}),x&&(0,T.jsxs)(d.ZP,{xs:12,className:t.logSearchCustomFields,children:[(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsx)(A.Z,{id:"log_search_storage_class",name:"log_search_storage_class",onChange:function(e){H("logSearchSelectedStorageClass",e.target.value)},label:"Log Search Storage Class",value:R,options:W,disabled:W.length<1})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsx)("div",{className:t.multiContainer,children:(0,T.jsx)(I.Z,{type:"number",id:"log_search_volume_size",name:"log_search_volume_size",onChange:function(e){H("logSearchVolumeSize",e.target.value),Y("log_search_volume_size")},label:"Storage Size [Gi]",value:v,required:!0,error:B.log_search_volume_size||"",min:"0"})})}),(0,T.jsxs)("fieldset",{className:"".concat(t.fieldGroup," ").concat(t.fieldSpaceTop),children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"SecurityContext for LogSearch"}),(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsxs)("div",{className:"".concat(t.multiContainer," ").concat(t.responsiveSectionItem),children:[(0,T.jsx)("div",{className:t.configSectionItem,children:(0,T.jsx)(I.Z,{type:"number",id:"logSearch_securityContext_runAsUser",name:"logSearch_securityContext_runAsUser",onChange:function(e){H("logSearchSecurityContext",(0,s.Z)((0,s.Z)({},M),{},{runAsUser:e.target.value})),Y("logSearch_securityContext_runAsUser")},label:"Run As User",value:M.runAsUser,required:!0,error:B.logSearch_securityContext_runAsUser||"",min:"0"})}),(0,T.jsx)("div",{className:t.configSectionItem,children:(0,T.jsx)(I.Z,{type:"number",id:"logSearch_securityContext_runAsGroup",name:"logSearch_securityContext_runAsGroup",onChange:function(e){H("logSearchSecurityContext",(0,s.Z)((0,s.Z)({},M),{},{runAsGroup:e.target.value})),Y("logSearch_securityContext_runAsGroup")},label:"Run As Group",value:M.runAsGroup,required:!0,error:B.logSearch_securityContext_runAsGroup||"",min:"0"})}),(0,T.jsx)("div",{className:t.configSectionItem,children:(0,T.jsx)(I.Z,{type:"number",id:"logSearch_securityContext_fsGroup",name:"logSearch_securityContext_fsGroup",onChange:function(e){H("logSearchSecurityContext",(0,s.Z)((0,s.Z)({},M),{},{fsGroup:e.target.value})),Y("logSearch_securityContext_fsGroup")},label:"FsGroup",value:M.fsGroup,required:!0,error:B.logSearch_securityContext_fsGroup||"",min:"0"})})]})}),(0,T.jsx)("br",{}),(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsx)("div",{className:t.multiContainer,children:(0,T.jsx)(N.Z,{value:"logSearchSecurityContextRunAsNonRoot",id:"logSearch_securityContext_runAsNonRoot",name:"logSearch_securityContext_runAsNonRoot",checked:M.runAsNonRoot,onChange:function(e){var t=e.target.checked;H("logSearchSecurityContext",(0,s.Z)((0,s.Z)({},M),{},{runAsNonRoot:t}))},label:"Do not run as Root"})})})]}),(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"SecurityContext for PostgreSQL"}),(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsxs)("div",{className:"".concat(t.multiContainer," ").concat(t.responsiveSectionItem),children:[(0,T.jsx)("div",{className:t.configSectionItem,children:(0,T.jsx)(I.Z,{type:"number",id:"postgres_securityContext_runAsUser",name:"postgres_securityContext_runAsUser",onChange:function(e){H("logSearchPostgresSecurityContext",(0,s.Z)((0,s.Z)({},q),{},{runAsUser:e.target.value})),Y("postgres_securityContext_runAsUser")},label:"Run As User",value:q.runAsUser,required:!0,error:B.postgres_securityContext_runAsUser||"",min:"0"})}),(0,T.jsx)("div",{className:t.configSectionItem,children:(0,T.jsx)(I.Z,{type:"number",id:"postgres_securityContext_runAsGroup",name:"postgres_securityContext_runAsGroup",onChange:function(e){H("logSearchPostgresSecurityContext",(0,s.Z)((0,s.Z)({},q),{},{runAsGroup:e.target.value})),Y("postgres_securityContext_runAsGroup")},label:"Run As Group",value:q.runAsGroup,required:!0,error:B.postgres_securityContext_runAsGroup||"",min:"0"})}),(0,T.jsx)("div",{className:t.configSectionItem,children:(0,T.jsx)(I.Z,{type:"number",id:"postgres_securityContext_fsGroup",name:"postgres_securityContext_fsGroup",onChange:function(e){H("logSearchPostgresSecurityContext",(0,s.Z)((0,s.Z)({},q),{},{fsGroup:e.target.value})),Y("postgres_securityContext_fsGroup")},label:"FsGroup",value:q.fsGroup,required:!0,error:B.postgres_securityContext_fsGroup||"",min:"0"})})]})}),(0,T.jsx)("br",{}),(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsx)("div",{className:t.multiContainer,children:(0,T.jsx)(N.Z,{value:"postgresSecurityContextRunAsNonRoot",id:"postgres_securityContext_runAsNonRoot",name:"postgres_securityContext_runAsNonRoot",checked:q.runAsNonRoot,onChange:function(e){var t=e.target.checked;H("logSearchPostgresSecurityContext",(0,s.Z)((0,s.Z)({},q),{},{runAsNonRoot:t}))},label:"Do not run as Root"})})})]})]}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.configSectionItem,children:(0,T.jsx)(N.Z,{value:"prometheusConfig",id:"prometheus_configuration",name:"prometheus_configuration",checked:f,onChange:function(e){var t=e.target.checked;H("prometheusCustom",t)},label:"Override Prometheus defaults"})}),f&&(0,T.jsxs)(d.ZP,{xs:12,className:t.prometheusCustomFields,children:[(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsx)(A.Z,{id:"prometheus_storage_class",name:"prometheus_storage_class",onChange:function(e){H("prometheusSelectedStorageClass",e.target.value)},label:"Prometheus Storage Class",value:z,options:W,disabled:W.length<1})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsx)("div",{className:t.multiContainer,children:(0,T.jsx)(I.Z,{type:"number",id:"prometheus_volume_size",name:"prometheus_volume_size",onChange:function(e){H("prometheusVolumeSize",e.target.value),Y("prometheus_volume_size")},label:"Storage Size [Gi]",value:k,required:!0,error:B.prometheus_volume_size||"",min:"0"})})}),(0,T.jsxs)("fieldset",{className:"".concat(t.fieldGroup," ").concat(t.fieldSpaceTop),children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"SecurityContext for Prometheus"}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.configSectionItem,children:(0,T.jsxs)("div",{className:"".concat(t.multiContainer," ").concat(t.responsiveSectionItem),children:[(0,T.jsx)("div",{className:t.configSectionItem,children:(0,T.jsx)(I.Z,{type:"number",id:"prometheus_securityContext_runAsUser",name:"prometheus_securityContext_runAsUser",onChange:function(e){H("prometheusSecurityContext",(0,s.Z)((0,s.Z)({},G),{},{runAsUser:e.target.value})),Y("prometheus_securityContext_runAsUser")},label:"Run As User",value:G.runAsUser,required:!0,error:B.prometheus_securityContext_runAsUser||"",min:"0"})}),(0,T.jsx)("div",{className:t.configSectionItem,children:(0,T.jsx)(I.Z,{type:"number",id:"prometheus_securityContext_runAsGroup",name:"prometheus_securityContext_runAsGroup",onChange:function(e){H("prometheusSecurityContext",(0,s.Z)((0,s.Z)({},G),{},{runAsGroup:e.target.value})),Y("prometheus_securityContext_runAsGroup")},label:"Run As Group",value:G.runAsGroup,required:!0,error:B.prometheus_securityContext_runAsGroup||"",min:"0"})}),(0,T.jsx)("div",{className:t.configSectionItem,children:(0,T.jsx)(I.Z,{type:"number",id:"prometheus_securityContext_fsGroup",name:"prometheus_securityContext_fsGroup",onChange:function(e){H("prometheusSecurityContext",(0,s.Z)((0,s.Z)({},G),{},{fsGroup:e.target.value})),Y("prometheus_securityContext_fsGroup")},label:"FsGroup",value:G.fsGroup,required:!0,error:B.prometheus_securityContext_fsGroup||"",min:"0"})})]})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.configSectionItem,children:(0,T.jsx)("div",{className:"".concat(t.multiContainer," ").concat(t.fieldSpaceTop),children:(0,T.jsx)(N.Z,{value:"prometheusSecurityContextRunAsNonRoot",id:"prometheus_securityContext_runAsNonRoot",name:"prometheus_securityContext_runAsNonRoot",checked:G.runAsNonRoot,onChange:function(e){var t=e.target.checked;H("prometheusSecurityContext",(0,s.Z)((0,s.Z)({},G),{},{runAsNonRoot:t}))},label:"Do not run as Root"})})})]})]})]})}))),z=n(94187),w=n(95467),F=n(35477),D=n(94759),E=n(43615),U=n(27207),K=n(96152),L=n(35150),M=(0,u.$j)((function(e){return{idpSelection:e.tenants.createTenant.fields.identityProvider.idpSelection,accessKeys:e.tenants.createTenant.fields.identityProvider.accessKeys,secretKeys:e.tenants.createTenant.fields.identityProvider.secretKeys,openIDConfigurationURL:e.tenants.createTenant.fields.identityProvider.openIDConfigurationURL,openIDClientID:e.tenants.createTenant.fields.identityProvider.openIDClientID,openIDSecretID:e.tenants.createTenant.fields.identityProvider.openIDSecretID,openIDCallbackURL:e.tenants.createTenant.fields.identityProvider.openIDCallbackURL,openIDClaimName:e.tenants.createTenant.fields.identityProvider.openIDClaimName,openIDScopes:e.tenants.createTenant.fields.identityProvider.openIDScopes,ADURL:e.tenants.createTenant.fields.identityProvider.ADURL,ADSkipTLS:e.tenants.createTenant.fields.identityProvider.ADSkipTLS,ADServerInsecure:e.tenants.createTenant.fields.identityProvider.ADServerInsecure,ADUserNameSearchFilter:e.tenants.createTenant.fields.identityProvider.ADUserNameSearchFilter,ADGroupSearchBaseDN:e.tenants.createTenant.fields.identityProvider.ADGroupSearchBaseDN,ADGroupSearchFilter:e.tenants.createTenant.fields.identityProvider.ADGroupSearchFilter,ADGroupNameAttribute:e.tenants.createTenant.fields.identityProvider.ADGroupNameAttribute,ADUserDNs:e.tenants.createTenant.fields.identityProvider.ADUserDNs,ADUserNameFormat:e.tenants.createTenant.fields.identityProvider.ADUserNameFormat,ADLookupBindDN:e.tenants.createTenant.fields.identityProvider.ADLookupBindDN,ADLookupBindPassword:e.tenants.createTenant.fields.identityProvider.ADLookupBindPassword,ADUserDNSearchBaseDN:e.tenants.createTenant.fields.identityProvider.ADUserDNSearchBaseDN,ADUserDNSearchFilter:e.tenants.createTenant.fields.identityProvider.ADUserDNSearchFilter,ADServerStartTLS:e.tenants.createTenant.fields.identityProvider.ADServerStartTLS}}),{updateAddField:j.HM,isPageValid:j.NO}),q=(0,g.Z)((function(e){return(0,p.Z)((0,s.Z)((0,s.Z)((0,s.Z)((0,s.Z)({shortened:{gridTemplateColumns:"auto auto 50px 50px",display:"grid",gridGap:15,marginBottom:10,"& input":{fontWeight:400}},buttonTray:{marginLeft:10,display:"flex",height:38,"& button":{background:"#EAEAEA"}},overlayAction:{marginLeft:10,"& svg":{maxWidth:15,maxHeight:15},"& button":{background:"#EAEAEA"}},protocolRadioOptions:{display:"flex",flexFlow:"column",marginBottom:10,"& label":{fontSize:14},"& div":{display:"flex",flexFlow:"column",alignItems:"baseline"}},adUserDnRows:{display:"flex"}},f.QV),f.DF),f.oO),f.AK))}))(M((function(e){var t=e.classes,n=e.idpSelection,a=e.accessKeys,r=e.secretKeys,s=e.openIDConfigurationURL,l=e.openIDClientID,c=e.openIDSecretID,u=e.openIDCallbackURL,m=e.openIDClaimName,p=e.openIDScopes,g=e.ADURL,f=e.ADSkipTLS,h=e.ADServerInsecure,x=e.ADUserNameSearchFilter,v=e.ADGroupSearchBaseDN,y=e.ADGroupSearchFilter,C=e.ADGroupNameAttribute,S=e.ADUserDNs,j=e.ADUserNameFormat,A=e.ADLookupBindDN,k=e.ADLookupBindPassword,R=e.ADUserDNSearchBaseDN,M=e.ADUserDNSearchFilter,q=e.ADServerStartTLS,G=e.updateAddField,V=e.isPageValid,O=(0,o.useState)({}),B=(0,i.Z)(O,2),$=B[0],W=B[1],H=(0,o.useCallback)((function(e,t){G("identityProvider",e,t)}),[G]),Y=function(e,t){var n=(0,Z.Z)(a);n[e]=t,H("accessKeys",n)},Q=function(e,t){var n=(0,Z.Z)(r);n[e]=t,H("secretKeys",n)},X=function(e,t){var n=(0,Z.Z)(S);n[e]=t,H("ADUserDNs",n)},J=function(e){W((0,_.h)($,e))};(0,o.useEffect)((function(){var e=[];if("Built-in"===n){e=(0,Z.Z)(e);for(var t=0;t1&&(a.splice(n,1),r.splice(n,1),Y(a.length-1,a[a.length-1]))},children:(0,T.jsx)(L.Z,{})})})}),(0,T.jsx)(z.Z,{title:"Randomize Credentials","aria-label":"add",children:(0,T.jsx)("div",{className:t.overlayAction,children:(0,T.jsx)(w.Z,{onClick:function(){Y(n,(0,_.z)(16)),Q(n,(0,_.z)(32))},size:"small",children:(0,T.jsx)(D.Z,{})})})})]})]})},"identityField-".concat(n.toString()))}))),"AD"===n&&(ee=S.map((function(e,n){return(0,T.jsx)(o.Fragment,{children:(0,T.jsxs)("div",{className:t.adUserDnRows,children:[(0,T.jsx)(I.Z,{id:"ad-userdn-".concat(n.toString()),label:"",placeholder:"",name:"ad-userdn-".concat(n.toString()),value:S[n],onChange:function(e){X(n,e.target.value),J("ad-userdn-".concat(n.toString()))},index:n,error:$["ad-userdn-".concat(n.toString())]||""},"csv-ad-userdn-".concat(n.toString())),(0,T.jsxs)("div",{className:t.buttonTray,children:[(0,T.jsx)(z.Z,{title:"Add User","aria-label":"add",children:(0,T.jsx)(w.Z,{size:"small",onClick:function(){S.push(""),X(S.length-1,"")},children:(0,T.jsx)(K.Z,{})})}),(0,T.jsx)(z.Z,{title:"Remove","aria-label":"add",children:(0,T.jsx)(w.Z,{size:"small",style:{marginLeft:16},onClick:function(){S.length>1&&(S.splice(n,1),Y(S.length-1,S[S.length-1]))},children:(0,T.jsx)(E.Z,{})})})]})]})},"identityField-".concat(n.toString()))}))),(0,T.jsxs)(b.Z,{className:t.paperWrapper,children:[(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Identity Provider"}),(0,T.jsx)("span",{className:t.descriptionText,children:"Access to the tenant can be controlled via an external Identity Manager."})]}),(0,T.jsxs)(d.ZP,{item:!0,xs:12,className:t.protocolRadioOptions,children:[(0,T.jsx)("label",{children:"Protocol"}),(0,T.jsx)(U.Z,{currentSelection:n,id:"idp-options",name:"idp-options",label:" ",onChange:function(e){H("idpSelection",e.target.value)},selectorOptions:[{label:"Built-in",value:"Built-in"},{label:"OpenID",value:"OpenID"},{label:"Active Directory",value:"AD"}]})]}),"Built-in"===n&&(0,T.jsxs)(o.Fragment,{children:["Add additional users",ee]}),"OpenID"===n&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"openID_CONFIGURATION_URL",name:"openID_CONFIGURATION_URL",onChange:function(e){H("openIDConfigurationURL",e.target.value),J("openID_CONFIGURATION_URL")},label:"Configuration URL",value:s,placeholder:"https://your-identity-provider.com/.well-known/openid-configuration",error:$.openID_CONFIGURATION_URL||"",required:!0})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"openID_clientID",name:"openID_clientID",onChange:function(e){H("openIDClientID",e.target.value),J("openID_clientID")},label:"Client ID",value:l,error:$.openID_clientID||"",required:!0})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"openID_secretID",name:"openID_secretID",onChange:function(e){H("openIDSecretID",e.target.value),J("openID_secretID")},label:"Secret ID",value:c,error:$.openID_secretID||"",required:!0})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"openID_callbackURL",name:"openID_callbackURL",onChange:function(e){H("openIDCallbackURL",e.target.value),J("openID_callbackURL")},label:"Callback URL",value:u,placeholder:"https://your-console-endpoint:9443/oauth_callback",error:$.openID_callbackURL||""})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"openID_claimName",name:"openID_claimName",onChange:function(e){H("openIDClaimName",e.target.value),J("openID_claimName")},label:"Claim Name",value:m,error:$.openID_claimName||"",required:!0})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"openID_scopes",name:"openID_scopes",onChange:function(e){H("openIDScopes",e.target.value),J("openID_scopes")},label:"Scopes",value:p})})]}),"AD"===n&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"AD_URL",name:"AD_URL",onChange:function(e){H("ADURL",e.target.value),J("AD_URL")},label:"LDAP Server Address",value:g,placeholder:"ldap-server:636",error:$.AD_URL||"",required:!0})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(N.Z,{value:"ad_skipTLS",id:"ad_skipTLS",name:"ad_skipTLS",checked:f,onChange:function(e){var t=e.target.checked;H("ADSkipTLS",t)},label:"Skip TLS Verification"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(N.Z,{value:"ad_serverInsecure",id:"ad_serverInsecure",name:"ad_serverInsecure",checked:h,onChange:function(e){var t=e.target.checked;H("ADServerInsecure",t)},label:"Server Insecure"})}),h?(0,T.jsxs)(d.ZP,{item:!0,xs:12,children:[(0,T.jsx)(F.Z,{className:t.error,variant:"caption",display:"block",gutterBottom:!0,children:"Warning: All traffic with Active Directory will be unencrypted"}),(0,T.jsx)("br",{})]}):null,(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(N.Z,{value:"ad_serverStartTLS",id:"ad_serverStartTLS",name:"ad_serverStartTLS",checked:q,onChange:function(e){var t=e.target.checked;H("ADServerStartTLS",t)},label:"Start TLS connection to AD/LDAP server"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"ad_userNameFormat",name:"ad_userNameFormat",onChange:function(e){H("ADUserNameFormat",e.target.value)},label:"Username Format",value:j,placeholder:"uid=%s,cn=accounts,dc=myldapserver,dc=com"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"ad_userNameFilter",name:"ad_userNameFilter",onChange:function(e){H("ADUserNameSearchFilter",e.target.value)},label:"Username Search Filter",value:x,placeholder:"(|(objectclass=posixAccount)(uid=%s))"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"ad_groupSearchBaseDN",name:"ad_groupSearchBaseDN",onChange:function(e){H("ADGroupSearchBaseDN",e.target.value)},label:"Group Search Base DN",value:v,placeholder:"ou=hwengg,dc=min,dc=io;ou=swengg,dc=min,dc=io"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"ad_groupSearchFilter",name:"ad_groupSearchFilter",onChange:function(e){H("ADGroupSearchFilter",e.target.value)},label:"Group Search Filter",value:y,placeholder:"(&(objectclass=groupOfNames)(member=%s))"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"ad_groupNameAttribute",name:"ad_groupNameAttribute",onChange:function(e){H("ADGroupNameAttribute",e.target.value)},label:"Group Name Attribute",value:C,placeholder:"cn"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"ad_lookupBindDN",name:"ad_lookupBindDN",onChange:function(e){H("ADLookupBindDN",e.target.value)},label:"Lookup Bind DN",value:A,placeholder:"cn=admin,dc=min,dc=io"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"ad_lookupBindPassword",name:"ad_lookupBindPassword",onChange:function(e){H("ADLookupBindPassword",e.target.value)},label:"Lookup Bind Password",value:k,placeholder:"admin"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"ad_userDNSearchBaseDN",name:"ad_userDNSearchBaseDN",onChange:function(e){H("ADUserDNSearchBaseDN",e.target.value)},label:"User DN Search Base DN",value:R,placeholder:"dc=min,dc=io"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"ad_userDNSearchFilter",name:"ad_userDNSearchFilter",onChange:function(e){H("ADUserDNSearchFilter",e.target.value)},label:"User DN Search Filter",value:M,placeholder:"(uid=%s)"})}),(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"List of user DNs (Distinguished Names) to be Tenant Administrators"}),(0,T.jsx)(d.ZP,{item:!0,xs:12,children:ee})]})]})]})}))),G=n(82461),V=n(14792),O=(0,u.$j)((function(e){return{enableTLS:e.tenants.createTenant.fields.security.enableTLS,enableAutoCert:e.tenants.createTenant.fields.security.enableAutoCert,enableCustomCerts:e.tenants.createTenant.fields.security.enableCustomCerts,minioCertificates:e.tenants.createTenant.certificates.minioCertificates,caCertificates:e.tenants.createTenant.certificates.caCertificates}}),{updateAddField:j.HM,isPageValid:j.NO,addFileToCaCertificates:j.Eq,deleteCaCertificate:j.IG,addCaCertificate:j.fK,addKeyPair:j.Mg,addFileToKeyPair:j.aN,deleteKeyPair:j.XX}),B=(0,g.Z)((function(e){return(0,p.Z)((0,s.Z)((0,s.Z)((0,s.Z)({minioCertificateRows:{display:"flex",alignItems:"center",justifyContent:"flex-start",borderBottom:"1px solid #EAEAEA","&:last-child":{borderBottom:0},"@media (max-width: 900px)":{flex:1}},fileItem:{marginRight:10,display:"flex","& div label":{minWidth:50},"@media (max-width: 900px)":{flexFlow:"column"}},minioCertsContainer:{marginBottom:15},minioCACertsRow:{display:"flex",alignItems:"center",justifyContent:"flex-start",borderBottom:"1px solid #EAEAEA","&:last-child":{borderBottom:0},"@media (max-width: 900px)":{flex:1,"& div label":{minWidth:50}}},rowActions:{display:"flex",justifyContent:"flex-end","@media (max-width: 900px)":{flex:1}},overlayAction:{marginLeft:10,"& svg":{maxWidth:15,maxHeight:15},"& button":{background:"#EAEAEA"}}},f.QV),f.oO),f.AK))}))(O((function(e){var t=e.classes,n=e.enableTLS,a=e.enableAutoCert,r=e.enableCustomCerts,i=e.minioCertificates,s=e.caCertificates,l=e.updateAddField,c=e.isPageValid,u=e.addFileToCaCertificates,m=e.deleteCaCertificate,p=e.addCaCertificate,g=e.addKeyPair,f=e.addFileToKeyPair,h=e.deleteKeyPair,x=(0,o.useCallback)((function(e,t){l("security",e,t)}),[l]);return(0,o.useEffect)((function(){c("security",!n||(!!a||!!r))}),[n,a,r,c]),(0,T.jsxs)(b.Z,{className:t.paperWrapper,children:[(0,T.jsx)("div",{className:t.headerElement,children:(0,T.jsx)("h3",{className:t.h3Section,children:"Security"})}),(0,T.jsxs)(d.ZP,{item:!0,xs:12,children:[(0,T.jsx)(N.Z,{value:"enableTLS",id:"enableTLS",name:"enableTLS",checked:n,onChange:function(e){var t=e.target.checked;x("enableTLS",t)},label:"Enable TLS"}),"Enable TLS for the tenant, this is required for Encryption Configuration",n&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)("br",{}),(0,T.jsx)("br",{}),(0,T.jsx)(F.Z,{variant:"caption",display:"block",gutterBottom:!0,children:"AutoCert: MinIO Operator will generate all TLS certificates automatically"}),(0,T.jsx)(F.Z,{variant:"caption",display:"block",gutterBottom:!0,children:"Custom certificates: Allow user to provide your own certificates"}),(0,T.jsx)("br",{})]})]}),n&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsxs)(d.ZP,{item:!0,xs:12,children:[(0,T.jsx)(N.Z,{value:"enableAutoCert",id:"enableAutoCert",name:"enableAutoCert",checked:a,onChange:function(e){var t=e.target.checked;x("enableAutoCert",t)},label:"Enable AutoCert"}),(0,T.jsx)(N.Z,{value:"enableCustomCerts",id:"enableCustomCerts",name:"enableCustomCerts",checked:r,onChange:function(e){var t=e.target.checked;x("enableCustomCerts",t)},label:"Custom Certificates"})]}),r&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(d.ZP,{container:!0,children:(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.minioCertsContainer,children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"MinIO Certificates"}),i.map((function(e){return(0,T.jsxs)(d.ZP,{item:!0,xs:12,className:t.minioCertificateRows,children:[(0,T.jsxs)(d.ZP,{item:!0,xs:10,className:t.fileItem,children:[(0,T.jsx)(G.Z,{onChange:function(t,n){f(e.id,"cert",n,t)},accept:".cer,.crt,.cert,.pem",id:"tlsCert",name:"tlsCert",label:"Cert",value:e.cert}),(0,T.jsx)(G.Z,{onChange:function(t,n){f(e.id,"key",n,t)},accept:".key,.pem",id:"tlsKey",name:"tlsKey",label:"Key",value:e.key})]}),(0,T.jsxs)(d.ZP,{item:!0,xs:2,className:t.rowActions,children:[(0,T.jsx)("div",{className:t.overlayAction,children:(0,T.jsx)(w.Z,{size:"small",onClick:g,children:(0,T.jsx)(V.Z,{})})}),(0,T.jsx)("div",{className:t.overlayAction,children:(0,T.jsx)(w.Z,{size:"small",onClick:function(){h(e.id)},children:(0,T.jsx)(L.Z,{})})})]})]},e.id)}))]})})}),(0,T.jsx)(d.ZP,{container:!0,children:(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.minioCertsContainer,children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"MinIO CA Certificates"}),s.map((function(e){return(0,T.jsxs)(d.ZP,{item:!0,xs:12,className:t.minioCACertsRow,children:[(0,T.jsx)(d.ZP,{item:!0,xs:6,children:(0,T.jsx)(G.Z,{onChange:function(t,n){u(e.id,"cert",n,t)},accept:".cer,.crt,.cert,.pem",id:"tlsCert",name:"tlsCert",label:"Cert",value:e.cert})}),(0,T.jsx)(d.ZP,{item:!0,xs:6,children:(0,T.jsxs)("div",{className:t.rowActions,children:[(0,T.jsx)("div",{className:t.overlayAction,children:(0,T.jsx)(w.Z,{size:"small",onClick:p,children:(0,T.jsx)(V.Z,{})})}),(0,T.jsx)("div",{className:t.overlayAction,children:(0,T.jsx)(w.Z,{size:"small",onClick:function(){m(e.id)},children:(0,T.jsx)(L.Z,{})})})]})})]},e.id)}))]})})})]})]})]})}))),$=(0,u.$j)((function(e){return{replicas:e.tenants.createTenant.fields.encryption.replicas,enableEncryption:e.tenants.createTenant.fields.encryption.enableEncryption,encryptionType:e.tenants.createTenant.fields.encryption.encryptionType,gemaltoEndpoint:e.tenants.createTenant.fields.encryption.gemaltoEndpoint,gemaltoToken:e.tenants.createTenant.fields.encryption.gemaltoToken,gemaltoDomain:e.tenants.createTenant.fields.encryption.gemaltoDomain,gemaltoRetry:e.tenants.createTenant.fields.encryption.gemaltoRetry,awsEndpoint:e.tenants.createTenant.fields.encryption.awsEndpoint,awsRegion:e.tenants.createTenant.fields.encryption.awsRegion,awsKMSKey:e.tenants.createTenant.fields.encryption.awsKMSKey,awsAccessKey:e.tenants.createTenant.fields.encryption.awsAccessKey,awsSecretKey:e.tenants.createTenant.fields.encryption.awsSecretKey,awsToken:e.tenants.createTenant.fields.encryption.awsToken,vaultEndpoint:e.tenants.createTenant.fields.encryption.vaultEndpoint,vaultEngine:e.tenants.createTenant.fields.encryption.vaultEngine,vaultNamespace:e.tenants.createTenant.fields.encryption.vaultNamespace,vaultPrefix:e.tenants.createTenant.fields.encryption.vaultPrefix,vaultAppRoleEngine:e.tenants.createTenant.fields.encryption.vaultAppRoleEngine,vaultId:e.tenants.createTenant.fields.encryption.vaultId,vaultSecret:e.tenants.createTenant.fields.encryption.vaultSecret,vaultRetry:e.tenants.createTenant.fields.encryption.vaultRetry,vaultPing:e.tenants.createTenant.fields.encryption.vaultPing,azureEndpoint:e.tenants.createTenant.fields.encryption.azureEndpoint,azureTenantID:e.tenants.createTenant.fields.encryption.azureTenantID,azureClientID:e.tenants.createTenant.fields.encryption.azureClientID,azureClientSecret:e.tenants.createTenant.fields.encryption.azureClientSecret,gcpProjectID:e.tenants.createTenant.fields.encryption.gcpProjectID,gcpEndpoint:e.tenants.createTenant.fields.encryption.gcpEndpoint,gcpClientEmail:e.tenants.createTenant.fields.encryption.gcpClientEmail,gcpClientID:e.tenants.createTenant.fields.encryption.gcpClientID,gcpPrivateKeyID:e.tenants.createTenant.fields.encryption.gcpPrivateKeyID,gcpPrivateKey:e.tenants.createTenant.fields.encryption.gcpPrivateKey,enableCustomCertsForKES:e.tenants.createTenant.fields.encryption.enableCustomCertsForKES,enableAutoCert:e.tenants.createTenant.fields.security.enableAutoCert,enableTLS:e.tenants.createTenant.fields.security.enableTLS,minioCertificates:e.tenants.createTenant.certificates.minioCertificates,serverCertificate:e.tenants.createTenant.certificates.serverCertificate,clientCertificate:e.tenants.createTenant.certificates.clientCertificate,vaultCertificate:e.tenants.createTenant.certificates.vaultCertificate,vaultCA:e.tenants.createTenant.certificates.vaultCA,gemaltoCA:e.tenants.createTenant.certificates.gemaltoCA,enableCustomCerts:e.tenants.createTenant.fields.security.enableCustomCerts,kesSecurityContext:e.tenants.createTenant.fields.encryption.kesSecurityContext}}),{updateAddField:j.HM,isPageValid:j.NO,addFileServerCert:j.$1,addFileClientCert:j.BI,addFileVaultCert:j.cl,addFileVaultCa:j.fk,addFileGemaltoCa:j.MX}),W=(0,g.Z)((function(e){return(0,p.Z)((0,s.Z)((0,s.Z)((0,s.Z)((0,s.Z)({encryptionTypeOptions:{marginBottom:15},mutualTlsConfig:{marginTop:15,"& fieldset":{flex:1}},rightSpacer:{marginRight:15},responsiveContainer:{"@media (max-width: 900px)":{display:"flex",flexFlow:"column"}}},f.QV),f.DF),f.oO),f.AK))}))($((function(e){var t=e.classes,n=e.updateAddField,a=e.isPageValid,r=e.addFileServerCert,l=e.addFileClientCert,c=e.addFileVaultCert,u=e.addFileVaultCa,m=e.addFileGemaltoCa,p=e.enableEncryption,g=e.enableCustomCerts,f=e.encryptionType,h=e.gemaltoEndpoint,x=e.gemaltoToken,v=e.gemaltoDomain,y=e.gemaltoRetry,C=e.awsEndpoint,S=e.awsRegion,j=e.awsKMSKey,A=e.awsAccessKey,k=e.awsSecretKey,R=e.awsToken,z=e.vaultEndpoint,w=e.vaultEngine,F=e.vaultNamespace,D=e.vaultPrefix,E=e.vaultAppRoleEngine,K=e.vaultId,L=e.vaultSecret,M=e.vaultRetry,q=e.vaultPing,V=e.azureEndpoint,O=e.azureTenantID,B=e.azureClientID,$=e.azureClientSecret,W=e.gcpProjectID,H=e.gcpEndpoint,Y=e.gcpClientEmail,Q=e.gcpClientID,X=e.gcpPrivateKeyID,J=e.gcpPrivateKey,ee=e.enableCustomCertsForKES,te=e.enableAutoCert,ne=e.enableTLS,ae=e.minioCertificates,re=e.serverCertificate,ie=e.clientCertificate,se=e.vaultCertificate,oe=e.vaultCA,le=e.gemaltoCA,ce=e.kesSecurityContext,ue=e.replicas,de=(0,o.useState)({}),me=(0,i.Z)(de,2),pe=me[0],ge=me[1],fe=!1;ne&&(te||ae&&ae.filter((function(e){return e.encoded_key&&e.encoded_cert})).length>0)&&(fe=!0);var he=(0,o.useCallback)((function(e,t){n("encryption",e,t)}),[n]),xe=function(e){ge((0,_.h)(pe,e))};return(0,o.useEffect)((function(){var e=[];p&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"replicas",required:!0,value:ue,customValidation:parseInt(ue)<1,customValidationMessage:"Replicas needs to be 1 or greater"},{fieldKey:"kes_securityContext_runAsUser",required:!0,value:ce.runAsUser,customValidation:""===ce.runAsUser||parseInt(ce.runAsUser)<0,customValidationMessage:"runAsUser must be present and be 0 or more"},{fieldKey:"kes_securityContext_runAsGroup",required:!0,value:ce.runAsGroup,customValidation:""===ce.runAsGroup||parseInt(ce.runAsGroup)<0,customValidationMessage:"runAsGroup must be present and be 0 or more"},{fieldKey:"kes_securityContext_fsGroup",required:!0,value:ce.fsGroup,customValidation:""===ce.fsGroup||parseInt(ce.fsGroup)<0,customValidationMessage:"fsGroup must be present and be 0 or more"}]),g&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"serverKey",required:!te,value:re.encoded_key},{fieldKey:"serverCert",required:!te,value:re.encoded_cert},{fieldKey:"clientKey",required:!te,value:ie.encoded_key},{fieldKey:"clientCert",required:!te,value:ie.encoded_cert}])),"vault"===f&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"vault_endpoint",required:!0,value:z},{fieldKey:"vault_id",required:!0,value:K},{fieldKey:"vault_secret",required:!0,value:L},{fieldKey:"vault_ping",required:!1,value:q,customValidation:parseInt(q)<0,customValidationMessage:"Value needs to be 0 or greater"},{fieldKey:"vault_retry",required:!1,value:M,customValidation:parseInt(M)<0,customValidationMessage:"Value needs to be 0 or greater"}])),"aws"===f&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"aws_endpoint",required:!0,value:C},{fieldKey:"aws_region",required:!0,value:S},{fieldKey:"aws_accessKey",required:!0,value:A},{fieldKey:"aws_secretKey",required:!0,value:k}])),"gemalto"===f&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"gemalto_endpoint",required:!0,value:h},{fieldKey:"gemalto_token",required:!0,value:x},{fieldKey:"gemalto_domain",required:!0,value:v},{fieldKey:"gemalto_retry",required:!1,value:y,customValidation:parseInt(y)<0,customValidationMessage:"Value needs to be 0 or greater"}])),"azure"===f&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"azure_endpoint",required:!0,value:V},{fieldKey:"azure_tenant_id",required:!0,value:O},{fieldKey:"azure_client_id",required:!0,value:B},{fieldKey:"azure_client_secret",required:!0,value:$}])));var t=(0,P.R)(e);a("encryption",0===Object.keys(t).length),ge(t)}),[p,f,z,w,K,L,q,M,C,S,k,A,h,x,v,y,W,H,Y,Q,X,J,V,O,B,$,a,te,g,re.encoded_key,re.encoded_cert,ie.encoded_key,ie.encoded_cert,ce,ue]),(0,T.jsxs)(b.Z,{className:t.paperWrapper,children:[(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Encryption"}),(0,T.jsx)("span",{className:t.descriptionText,children:"How would you like to encrypt the information at rest."})]}),(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsx)(N.Z,{value:"enableEncryption",id:"enableEncryption",name:"enableEncryption",checked:p,onChange:function(e){var t=e.target.checked;he("enableEncryption",t)},label:"Enable Server Side Encryption",disabled:!fe})}),p&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.encryptionTypeOptions,children:(0,T.jsx)(U.Z,{currentSelection:f,id:"encryptionType",name:"encryptionType",label:"Encryption Options",onChange:function(e){he("encryptionType",e.target.value)},selectorOptions:[{label:"Vault",value:"vault"},{label:"AWS",value:"aws"},{label:"Gemalto",value:"gemalto"},{label:"GCP",value:"gcp"},{label:"Azure",value:"azure"}]})}),"vault"===f&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsx)(N.Z,{value:"enableCustomCertsForKES",id:"enableCustomCertsForKES",name:"enableCustomCertsForKES",checked:ee||!te,onChange:function(e){var t=e.target.checked;he("enableCustomCertsForKES",t)},label:"Custom Certificates",disabled:!te})}),(ee||!te)&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(d.ZP,{container:!0,children:(0,T.jsx)(d.ZP,{item:!0,xs:12,style:{marginBottom:15},children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"Encryption Service Certificates"}),(0,T.jsx)(G.Z,{onChange:function(e,t){r("key",t,e),xe("serverKey")},accept:".key,.pem",id:"serverKey",name:"serverKey",label:"Key",error:pe.serverKey||"",value:re.key,required:!te}),(0,T.jsx)(G.Z,{onChange:function(e,t){r("cert",t,e),xe("serverCert")},accept:".cer,.crt,.cert,.pem",id:"serverCert",name:"serverCert",label:"Cert",error:pe.serverCert||"",value:re.cert,required:!te})]})})}),(0,T.jsx)(d.ZP,{container:!0,style:{marginBottom:15},children:(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"Mutual TLS authentication"}),(0,T.jsx)(G.Z,{onChange:function(e,t){l("key",t,e),xe("clientKey")},accept:".key,.pem",id:"clientKey",name:"clientKey",label:"Key",error:pe.clientKey||"",value:ie.key,required:!te}),(0,T.jsx)(G.Z,{onChange:function(e,t){l("cert",t,e),xe("clientCert")},accept:".cer,.crt,.cert,.pem",id:"clientCert",name:"clientCert",label:"Cert",error:pe.clientCert||"",value:ie.cert,required:!te})]})})})]}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"vault_endpoint",name:"vault_endpoint",onChange:function(e){he("vaultEndpoint",e.target.value),xe("vault_endpoint")},label:"Endpoint",value:z,error:pe.vault_endpoint||"",required:!0})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"vault_engine",name:"vault_engine",onChange:function(e){he("vaultEngine",e.target.value),xe("vault_engine")},label:"Engine",value:w})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"vault_namespace",name:"vault_namespace",onChange:function(e){he("vaultNamespace",e.target.value)},label:"Namespace",value:F})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"vault_prefix",name:"vault_prefix",onChange:function(e){he("vaultPrefix",e.target.value)},label:"Prefix",value:D})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"App Role"}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"vault_approle_engine",name:"vault_approle_engine",onChange:function(e){he("vaultAppRoleEngine",e.target.value)},label:"Engine",value:E})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"vault_id",name:"vault_id",onChange:function(e){he("vaultId",e.target.value),xe("vault_id")},label:"AppRole ID",value:K,error:pe.vault_id||"",required:!0})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"vault_secret",name:"vault_secret",onChange:function(e){he("vaultSecret",e.target.value),xe("vault_secret")},label:"AppRole Secret",value:L,error:pe.vault_secret||"",required:!0})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{type:"number",min:"0",id:"vault_retry",name:"vault_retry",onChange:function(e){he("vaultRetry",e.target.value),xe("vault_retry")},label:"Retry (Seconds)",value:M,error:pe.vault_retry||""})})]})}),(0,T.jsx)(d.ZP,{container:!0,className:t.mutualTlsConfig,children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"Mutual TLS authentication (optional)"}),(0,T.jsx)(G.Z,{onChange:function(e,t){c("key",t,e),xe("vault_key")},accept:".key,.pem",id:"vault_key",name:"vault_key",label:"Key",value:se.key}),(0,T.jsx)(G.Z,{onChange:function(e,t){c("cert",t,e),xe("vault_cert")},accept:".cer,.crt,.cert,.pem",id:"vault_cert",name:"vault_cert",label:"Cert",value:se.cert}),(0,T.jsx)(G.Z,{onChange:function(e,t){u(t,e),xe("vault_ca")},accept:".cer,.crt,.cert,.pem",id:"vault_ca",name:"vault_ca",label:"CA",value:oe.cert})]})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,style:{marginTop:15},children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"Status"}),(0,T.jsx)(I.Z,{type:"number",min:"0",id:"vault_ping",name:"vault_ping",onChange:function(e){he("vaultPing",e.target.value),xe("vault_ping")},label:"Ping (Seconds)",value:q,error:pe.vault_ping||""})]})})]}),"azure"===f&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"azure_endpoint",name:"azure_endpoint",onChange:function(e){he("azureEndpoint",e.target.value),xe("azure_endpoint")},label:"Endpoint",value:V,error:pe.azure_endpoint||""})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"Credentials"}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"azure_tenant_id",name:"azure_tenant_id",onChange:function(e){he("azureTenantID",e.target.value),xe("azure_tenant_id")},label:"Tenant ID",value:O,error:pe.azure_tenant_id||""})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"azure_client_id",name:"azure_client_id",onChange:function(e){he("azureClientID",e.target.value),xe("azure_client_id")},label:"Client ID",value:B,error:pe.azure_client_id||""})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"azure_client_secret",name:"azure_client_secret",onChange:function(e){he("azureClientSecret",e.target.value),xe("azure_client_secret")},label:"Client Secret",value:$,error:pe.azure_client_secret||""})})]})})]}),"gcp"===f&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"gcp_project_id",name:"gcp_project_id",onChange:function(e){he("gcpProjectID",e.target.value)},label:"Project ID",value:W})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"gcp_endpoint",name:"gcp_endpoint",onChange:function(e){he("gcpEndpoint",e.target.value)},label:"Endpoint",value:H})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"Credentials"}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"gcp_client_email",name:"gcp_client_email",onChange:function(e){he("gcpClientEmail",e.target.value)},label:"Client Email",value:Y})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"gcp_client_id",name:"gcp_client_id",onChange:function(e){he("gcpClientID",e.target.value)},label:"Client ID",value:Q})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"gcp_private_key_id",name:"gcp_private_key_id",onChange:function(e){he("gcpPrivateKeyID",e.target.value)},label:"Private Key ID",value:X})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"gcp_private_key",name:"gcp_private_key",onChange:function(e){he("gcpPrivateKey",e.target.value)},label:"Private Key",value:J})})]})})]}),"aws"===f&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"aws_endpoint",name:"aws_endpoint",onChange:function(e){he("awsEndpoint",e.target.value),xe("aws_endpoint")},label:"Endpoint",value:C,error:pe.aws_endpoint||"",required:!0})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"aws_region",name:"aws_region",onChange:function(e){he("awsRegion",e.target.value),xe("aws_region")},label:"Region",value:S,error:pe.aws_region||"",required:!0})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"aws_kmsKey",name:"aws_kmsKey",onChange:function(e){he("awsKMSKey",e.target.value)},label:"KMS Key",value:j})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"Credentials"}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"aws_accessKey",name:"aws_accessKey",onChange:function(e){he("awsAccessKey",e.target.value),xe("aws_accessKey")},label:"Access Key",value:A,error:pe.aws_accessKey||"",required:!0})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"aws_secretKey",name:"aws_secretKey",onChange:function(e){he("awsSecretKey",e.target.value),xe("aws_secretKey")},label:"Secret Key",value:k,error:pe.aws_secretKey||"",required:!0})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"aws_token",name:"aws_token",onChange:function(e){he("awsToken",e.target.value)},label:"Token",value:R})})]})})]}),"gemalto"===f&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"gemalto_endpoint",name:"gemalto_endpoint",onChange:function(e){he("gemaltoEndpoint",e.target.value),xe("gemalto_endpoint")},label:"Endpoint",value:h,error:pe.gemalto_endpoint||"",required:!0})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,style:{marginBottom:15},children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"Credentials"}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"gemalto_token",name:"gemalto_token",onChange:function(e){he("gemaltoToken",e.target.value),xe("gemalto_token")},label:"Token",value:x,error:pe.gemalto_token||"",required:!0})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"gemalto_domain",name:"gemalto_domain",onChange:function(e){he("gemaltoDomain",e.target.value),xe("gemalto_domain")},label:"Domain",value:v,error:pe.gemalto_domain||"",required:!0})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{type:"number",min:"0",id:"gemalto_retry",name:"gemalto_retry",onChange:function(e){he("gemaltoRetry",e.target.value),xe("gemalto_retry")},label:"Retry (seconds)",value:y,error:pe.gemalto_retry||""})})]})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,style:{marginBottom:15},children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"Custom CA Root certificate verification"}),(0,T.jsx)(G.Z,{onChange:function(e,t){m(t,e),xe("gemalto_ca")},accept:".cer,.crt,.cert,.pem",id:"gemalto_ca",name:"gemalto_ca",label:"CA",value:le.cert})]})})]}),(0,T.jsx)("div",{className:t.headerElement,children:(0,T.jsx)("h4",{className:t.h3Section,children:"Additional Configurations"})}),(0,T.jsxs)(d.ZP,{item:!0,xs:12,children:[(0,T.jsx)(d.ZP,{item:!0,xs:12,classes:t.formFieldRow,children:(0,T.jsx)(I.Z,{type:"number",min:"1",id:"replicas",name:"replicas",onChange:function(e){he("replicas",e.target.value),xe("replicas")},label:"Replicas",value:ue,required:!0,error:pe.replicas||""})}),(0,T.jsxs)("fieldset",{className:t.fieldGroup,style:{marginTop:15},children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"SecurityContext for KES pods"}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.kesSecurityContext,children:(0,T.jsxs)("div",{className:"".concat(t.multiContainer," ").concat(t.responsiveContainer),children:[(0,T.jsx)("div",{className:"".concat(t.formFieldRow," ").concat(t.rightSpacer),children:(0,T.jsx)(I.Z,{type:"number",id:"kes_securityContext_runAsUser",name:"kes_securityContext_runAsUser",onChange:function(e){he("kesSecurityContext",(0,s.Z)((0,s.Z)({},ce),{},{runAsUser:e.target.value})),xe("kes_securityContext_runAsUser")},label:"Run As User",value:ce.runAsUser,required:!0,error:pe.kes_securityContext_runAsUser||"",min:"0"})}),(0,T.jsx)("div",{className:"".concat(t.formFieldRow," ").concat(t.rightSpacer),children:(0,T.jsx)(I.Z,{type:"number",id:"kes_securityContext_runAsGroup",name:"kes_securityContext_runAsGroup",onChange:function(e){he("kesSecurityContext",(0,s.Z)((0,s.Z)({},ce),{},{runAsGroup:e.target.value})),xe("kes_securityContext_runAsGroup")},label:"Run As Group",value:ce.runAsGroup,required:!0,error:pe.kes_securityContext_runAsGroup||"",min:"0"})}),(0,T.jsx)("div",{className:"".concat(t.formFieldRow," ").concat(t.rightSpacer),children:(0,T.jsx)(I.Z,{type:"number",id:"kes_securityContext_fsGroup",name:"kes_securityContext_fsGroup",onChange:function(e){he("kesSecurityContext",(0,s.Z)((0,s.Z)({},ce),{},{fsGroup:e.target.value})),xe("kes_securityContext_fsGroup")},label:"FsGroup",value:ce.fsGroup,required:!0,error:pe.kes_securityContext_fsGroup||"",min:"0"})})]})}),(0,T.jsx)("br",{}),(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsx)("div",{className:t.multiContainer,children:(0,T.jsx)(N.Z,{value:"kesSecurityContextRunAsNonRoot",id:"kes_securityContext_runAsNonRoot",name:"kes_securityContext_runAsNonRoot",checked:ce.runAsNonRoot,onChange:function(e){var t=e.target.checked;he("kesSecurityContext",(0,s.Z)((0,s.Z)({},ce),{},{runAsNonRoot:t}))},label:"Do not run as Root"})})})]})]})]})]})}))),H=(0,u.$j)((function(e){var t=e.tenants.createTenant;return{podAffinity:t.fields.affinity.podAffinity,nodeSelectorLabels:t.fields.affinity.nodeSelectorLabels,withPodAntiAffinity:t.fields.affinity.withPodAntiAffinity,keyValuePairs:t.nodeSelectorPairs}}),{setModalErrorSnackMessage:y.zb,updateAddField:j.HM,isPageValid:j.NO,setKeyValuePairs:j.i$}),Y=(0,g.Z)((function(e){return(0,p.Z)((0,s.Z)((0,s.Z)({overlayAction:{marginLeft:10,"& svg":{maxWidth:15,maxHeight:15},"& button":{background:"#EAEAEA"}},affinityConfigField:{display:"flex"},affinityFieldLabel:{display:"flex",flexFlow:"column",flex:1},radioField:{display:"flex",alignItems:"flex-start",marginTop:10,"& div:first-child":{display:"flex",flexFlow:"column",alignItems:"baseline",textAlign:"left !important"}},affinityLabelKey:{"& div:first-child":{marginBottom:0}},affinityLabelValue:{marginLeft:10,"& div:first-child":{marginBottom:0}},rowActions:{display:"flex",alignItems:"center"},fieldContainer:{marginBottom:0},affinityRow:{marginBottom:10,display:"flex"}},f.oO),f.AK))}))(H((function(e){var t=e.classes,n=e.podAffinity,a=e.nodeSelectorLabels,r=e.withPodAntiAffinity,s=e.setModalErrorSnackMessage,l=e.updateAddField,c=e.keyValuePairs,u=e.setKeyValuePairs,m=e.isPageValid,p=(0,o.useState)({}),g=(0,i.Z)(p,2),f=g[0],x=g[1],v=(0,o.useState)(!0),y=(0,i.Z)(v,2),C=y[0],S=y[1],j=(0,o.useState)({}),_=(0,i.Z)(j,2),k=_[0],R=_[1],z=(0,o.useState)([]),F=(0,i.Z)(z,2),D=F[0],E=F[1],K=(0,o.useCallback)((function(e,t){l("affinity",e,t)}),[l]);return(0,o.useEffect)((function(){C&&h.Z.invoke("GET","/api/v1/nodes/labels").then((function(e){S(!1),R(e);var t=[];for(var n in e)t.push({label:n,value:n});E(t)})).catch((function(e){S(!1),s(e),R({})}))}),[s,C]),(0,o.useEffect)((function(){if(c){var e=c.filter((function(e){return""!==e.key})).map((function(e){return"".concat(e.key,"=").concat(e.value)})).filter((function(e,t,n){return n.indexOf(e)===t})).join("&");K("nodeSelectorLabels",e)}}),[c,K]),(0,o.useEffect)((function(){var e=[];if("nodeSelector"===n){var t=!0,r=a.split("&");1===r.length&&""===r[0]&&(t=!1),r.forEach((function(e,n){var a=e.split("=");2!==a.length&&(t=!1),n+1!==r.length&&(""!==a[0]&&""!==a[1]||(t=!1))})),e=[].concat((0,Z.Z)(e),[{fieldKey:"labels",required:!0,value:a,customValidation:!t,customValidationMessage:"You need to add at least one label key-pair"}])}var i=(0,P.R)(e);m("affinity",0===Object.keys(i).length),x(i)}),[m,n,a]),(0,T.jsxs)(b.Z,{className:t.paperWrapper,children:[(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Pod Placement"}),(0,T.jsx)("span",{className:t.descriptionText,children:"Configure how pods will be assigned to nodes"})]}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.affinityConfigField,children:(0,T.jsxs)(d.ZP,{item:!0,className:t.affinityFieldLabel,children:[(0,T.jsx)("div",{className:t.label,children:"Type"}),(0,T.jsx)("div",{className:"".concat(t.descriptionText," ").concat(t.affinityHelpText),children:"MinIO supports multiple configurations for Pod Affinity"}),(0,T.jsx)(d.ZP,{item:!0,className:t.radioField,children:(0,T.jsx)(U.Z,{currentSelection:n,id:"affinity-options",name:"affinity-options",label:" ",onChange:function(e){K("podAffinity",e.target.value)},selectorOptions:[{label:"None",value:"none"},{label:"Default (Pod Anti-Affinnity)",value:"default"},{label:"Node Selector",value:"nodeSelector"}]})})]})}),"nodeSelector"===n&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)("br",{}),(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsx)(N.Z,{value:"with_pod_anti_affinity",id:"with_pod_anti_affinity",name:"with_pod_anti_affinity",checked:r,onChange:function(e){var t=e.target.checked;K("withPodAntiAffinity",t)},label:"With Pod Anti-Affinity"})}),(0,T.jsxs)(d.ZP,{item:!0,xs:12,children:[(0,T.jsx)("h3",{children:"Labels"}),(0,T.jsx)("span",{className:t.error,children:f.labels}),(0,T.jsx)(d.ZP,{container:!0,children:c&&c.map((function(e,n){return(0,T.jsxs)(d.ZP,{item:!0,xs:12,className:t.affinityRow,children:[(0,T.jsxs)(d.ZP,{item:!0,xs:5,className:t.affinityLabelKey,children:[D.length>0&&(0,T.jsx)(A.Z,{onChange:function(e){var t=e.target.value,a=Object.assign([],c);a[n].key=e.target.value,a[n].value=k[t][0],u(a)},id:"select-access-policy",name:"select-access-policy",label:"",value:e.key,options:D}),0===D.length&&(0,T.jsx)(I.Z,{id:"nodeselector-key-".concat(n.toString()),label:"",name:"nodeselector-".concat(n.toString()),value:e.key,onChange:function(e){var t=Object.assign([],c);t[n].key=e.target.value,u(t)},index:n,placeholder:"Key"})]}),(0,T.jsxs)(d.ZP,{item:!0,xs:5,className:t.affinityLabelValue,children:[D.length>0&&(0,T.jsx)(A.Z,{onChange:function(e){var t=Object.assign([],c);t[n].value=e.target.value,u(t)},id:"select-access-policy",name:"select-access-policy",label:"",value:e.value,options:k[e.key]?k[e.key].map((function(e){return{label:e,value:e}})):[]}),0===D.length&&(0,T.jsx)(I.Z,{id:"nodeselector-value-".concat(n.toString()),label:"",name:"nodeselector-".concat(n.toString()),value:e.value,onChange:function(e){var t=Object.assign([],c);t[n].value=e.target.value,u(t)},index:n,placeholder:"value"})]}),(0,T.jsxs)(d.ZP,{item:!0,xs:2,className:t.rowActions,children:[(0,T.jsx)("div",{className:t.overlayAction,children:(0,T.jsx)(w.Z,{size:"small",onClick:function(){var e=Object.assign([],c);D.length>0?e.push({key:D[0].value,value:k[D[0].value][0]}):e.push({key:"",value:""}),u(e)},children:(0,T.jsx)(V.Z,{})})}),c.length>1&&(0,T.jsx)("div",{className:t.overlayAction,children:(0,T.jsx)(w.Z,{size:"small",onClick:function(){var e=c.filter((function(e,t){return t!==n}));u(e)},children:(0,T.jsx)(L.Z,{})})})]})]},"affinity-keyVal-".concat(n.toString()))}))})]})]})]})}))),Q=n(35721),X=n(24442),J=(0,u.$j)((function(e){return{storageClasses:e.tenants.createTenant.storageClasses,customImage:e.tenants.createTenant.fields.configure.customImage,imageName:e.tenants.createTenant.fields.configure.imageName,customDockerhub:e.tenants.createTenant.fields.configure.customDockerhub,imageRegistry:e.tenants.createTenant.fields.configure.imageRegistry,imageRegistryUsername:e.tenants.createTenant.fields.configure.imageRegistryUsername,imageRegistryPassword:e.tenants.createTenant.fields.configure.imageRegistryPassword,exposeMinIO:e.tenants.createTenant.fields.configure.exposeMinIO,exposeConsole:e.tenants.createTenant.fields.configure.exposeConsole,prometheusCustom:e.tenants.createTenant.fields.configure.prometheusCustom,tenantCustom:e.tenants.createTenant.fields.configure.tenantCustom,logSearchCustom:e.tenants.createTenant.fields.configure.logSearchCustom,logSearchVolumeSize:e.tenants.createTenant.fields.configure.logSearchVolumeSize,logSearchSizeFactor:e.tenants.createTenant.fields.configure.logSearchSizeFactor,prometheusVolumeSize:e.tenants.createTenant.fields.configure.prometheusVolumeSize,prometheusSizeFactor:e.tenants.createTenant.fields.configure.prometheusSizeFactor,logSearchSelectedStorageClass:e.tenants.createTenant.fields.configure.logSearchSelectedStorageClass,logSearchImage:e.tenants.createTenant.fields.configure.logSearchImage,kesImage:e.tenants.createTenant.fields.configure.kesImage,logSearchPostgresImage:e.tenants.createTenant.fields.configure.logSearchPostgresImage,logSearchPostgresInitImage:e.tenants.createTenant.fields.configure.logSearchPostgresInitImage,prometheusSelectedStorageClass:e.tenants.createTenant.fields.configure.prometheusSelectedStorageClass,prometheusImage:e.tenants.createTenant.fields.configure.prometheusImage,prometheusSidecarImage:e.tenants.createTenant.fields.configure.prometheusSidecarImage,prometheusInitImage:e.tenants.createTenant.fields.configure.prometheusInitImage,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass}}),{updateAddField:j.HM,isPageValid:j.NO}),ee=(0,g.Z)((function(e){return(0,p.Z)((0,s.Z)((0,s.Z)((0,s.Z)({},f.DF),f.oO),f.AK))}))(J((function(e){var t=e.classes,n=(e.storageClasses,e.customImage),a=e.imageName,r=e.customDockerhub,s=e.imageRegistry,l=e.imageRegistryUsername,c=e.imageRegistryPassword,u=(e.exposeMinIO,e.exposeConsole,e.prometheusCustom),m=e.tenantCustom,p=e.logSearchCustom,g=e.logSearchVolumeSize,f=(e.logSearchSizeFactor,e.logSearchImage),h=e.kesImage,x=e.logSearchPostgresImage,v=e.logSearchPostgresInitImage,y=e.prometheusVolumeSize,C=(e.prometheusSizeFactor,e.logSearchSelectedStorageClass),S=e.prometheusSelectedStorageClass,j=e.prometheusImage,A=e.prometheusSidecarImage,k=e.prometheusInitImage,R=e.updateAddField,z=e.isPageValid,w=(e.selectedStorageClass,(0,o.useState)({})),F=(0,i.Z)(w,2),D=F[0],E=F[1],U=(0,o.useCallback)((function(e,t){R("configure",e,t)}),[R]);(0,o.useEffect)((function(){var e=[];u&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"prometheus_storage_class",required:!0,value:S,customValidation:""===S,customValidationMessage:"Field cannot be empty"},{fieldKey:"prometheus_volume_size",required:!0,value:y,customValidation:""===y||parseInt(y)<=0,customValidationMessage:"Volume size must be present and be greatter than 0"}])),p&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"log_search_storage_class",required:!0,value:C,customValidation:""===C,customValidationMessage:"Field cannot be empty"},{fieldKey:"log_search_volume_size",required:!0,value:g,customValidation:""===g||parseInt(g)<=0,customValidationMessage:"Volume size must be present and be greatter than 0"}])),n&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"image",required:!1,value:a,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/minio:VERSION'"},{fieldKey:"logSearchImage",required:!1,value:f,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/logsearchapi:VERSION'"},{fieldKey:"kesImage",required:!1,value:h,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/kes:VERSION'"},{fieldKey:"logSearchPostgresImage",required:!1,value:x,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'library/postgres:VERSION'"},{fieldKey:"logSearchPostgresInitImage",required:!1,value:v,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'library/busybox:VERSION'"},{fieldKey:"prometheusImage",required:!1,value:j,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/prometheus:VERSION'"},{fieldKey:"prometheusSidecarImage",required:!1,value:A,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'project/container:VERSION'"},{fieldKey:"prometheusInitImage",required:!1,value:k,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'library/busybox:VERSION'"}]),r&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"registry",required:!0,value:s},{fieldKey:"registryUsername",required:!0,value:l},{fieldKey:"registryPassword",required:!0,value:c}])));var t=(0,P.R)(e);z("configure",0===Object.keys(t).length),E(t)}),[n,a,f,h,x,v,j,A,k,r,s,l,c,z,u,m,p,S,y,C,g]);var K=function(e){E((0,_.h)(D,e))};return(0,T.jsxs)(b.Z,{className:t.paperWrapper,children:[(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Container Images"}),(0,T.jsx)("span",{className:t.descriptionText,children:"Images used by the Tenant Deployment"})]}),(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"image",name:"image",onChange:function(e){U("imageName",e.target.value),K("image")},label:"MinIO's Image",value:a,error:D.image||"",placeholder:"E.g. minio/minio:RELEASE.2022-01-08T03-11-54Z"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"logSearchImage",name:"logSearchImage",onChange:function(e){U("logSearchImage",e.target.value),K("logSearchImage")},label:"Log Search API's Image",value:f,error:D.logSearchImage||"",placeholder:"E.g. minio/logsearchapi:v4.1.1"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"kesImage",name:"kesImage",onChange:function(e){U("kesImage",e.target.value),K("kesImage")},label:"KES Image",value:h,error:D.kesImage||"",placeholder:"E.g. minio/kes:v0.14.0"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"logSearchPostgresImage",name:"logSearchPostgresImage",onChange:function(e){U("logSearchPostgresImage",e.target.value),K("logSearchPostgresImage")},label:"Log Search Postgres's Image",value:x,error:D.logSearchPostgresImage||"",placeholder:"E.g. library/postgres:13"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"logSearchPostgresInitImage",name:"logSearchPostgresInitImage",onChange:function(e){U("logSearchPostgresInitImage",e.target.value),K("logSearchPostgresInitImage")},label:"Log Search Postgres's Init Image",value:v,error:D.logSearchPostgresInitImage||"",placeholder:"E.g. library/busybox:1.33.1"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"prometheusImage",name:"prometheusImage",onChange:function(e){U("prometheusImage",e.target.value),K("prometheusImage")},label:"Prometheus Image",value:j,error:D.prometheusImage||"",placeholder:"E.g. quay.io/prometheus/prometheus:latest"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"prometheusSidecarImage",name:"prometheusSidecarImage",onChange:function(e){U("prometheusSidecarImage",e.target.value),K("prometheusSidecarImage")},label:"Prometheus Sidecar Image",value:A,error:D.prometheusSidecarImage||"",placeholder:"E.g. quay.io/prometheus/prometheus:latest"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"prometheusInitImage",name:"prometheusInitImage",onChange:function(e){U("prometheusInitImage",e.target.value),K("prometheusInitImage")},label:"Prometheus Init Image",value:k,error:D.prometheusInitImage||"",placeholder:"E.g. quay.io/prometheus/prometheus:latest"})})]}),n&&(0,T.jsx)(o.Fragment,{children:(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(N.Z,{value:"custom_docker_hub",id:"custom_docker_hub",name:"custom_docker_hub",checked:r,onChange:function(e){var t=e.target.checked;U("customDockerhub",t)},label:"Set/Update Image Registry"})})}),r&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"registry",name:"registry",onChange:function(e){U("imageRegistry",e.target.value)},label:"Endpoint",value:s,error:D.registry||"",placeholder:"E.g. https://index.docker.io/v1/",required:!0})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"registryUsername",name:"registryUsername",onChange:function(e){U("imageRegistryUsername",e.target.value)},label:"Username",value:l,error:D.registryUsername||"",required:!0})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"registryPassword",name:"registryPassword",onChange:function(e){U("imageRegistryPassword",e.target.value)},label:"Password",value:c,error:D.registryPassword||"",required:!0})})]})]})}))),te=n(25534),ne=n(29316),ae=n(3143),re=n.n(ae),ie=n(32120),se=n(23473),oe=n(60656),le=n(11387),ce={setErrorSnackMessage:y.Ih},ue=(0,u.$j)(null,ce),de=(0,g.Z)((function(e){return(0,p.Z)((0,s.Z)((0,s.Z)({wrapText:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"}},f.oO),f.Qw))}))(ue((function(e){var t=e.classes,n=e.namespace,a=e.addNamespaceOpen,r=e.closeAddNamespaceModalAndRefresh,s=e.setErrorSnackMessage,l=(0,o.useState)(!1),c=(0,i.Z)(l,2),u=c[0],d=c[1];(0,o.useEffect)((function(){u&&h.Z.invoke("POST","/api/v1/namespace",{name:n}).then((function(e){d(!1),r(!0)})).catch((function(e){d(!1),s(e)}))}),[u,r,n,s]);return(0,T.jsx)(oe.Z,{title:"New namespace",confirmText:"Create",confirmButtonProps:{color:"primary",variant:"contained"},isOpen:a,titleIcon:(0,T.jsx)(le.Ej,{}),isLoading:u,onConfirm:function(){d(!0)},onClose:function(){r(!1)},confirmationContent:(0,T.jsxs)(o.Fragment,{children:[u&&(0,T.jsx)(m.Z,{}),(0,T.jsxs)(se.Z,{children:["Are you sure you want to add a namespace called",(0,T.jsx)("br",{}),(0,T.jsx)("b",{className:t.wrapText,children:n}),"?"]})]})})}))),me=n(4182),pe=n(35044),ge=n(73481),fe=n(29399),he=n(95995),xe=(0,u.$j)((function(e){return{volumeSize:e.tenants.createTenant.fields.tenantSize.volumeSize,sizeFactor:e.tenants.createTenant.fields.tenantSize.sizeFactor,drivesPerServer:e.tenants.createTenant.fields.tenantSize.drivesPerServer,nodes:e.tenants.createTenant.fields.tenantSize.nodes,memoryNode:e.tenants.createTenant.fields.tenantSize.memoryNode,ecParity:e.tenants.createTenant.fields.tenantSize.ecParity,ecParityChoices:e.tenants.createTenant.fields.tenantSize.ecParityChoices,cleanECChoices:e.tenants.createTenant.fields.tenantSize.cleanECChoices,resourcesSize:e.tenants.createTenant.fields.tenantSize.resourcesSize,distribution:e.tenants.createTenant.fields.tenantSize.distribution,ecParityCalc:e.tenants.createTenant.fields.tenantSize.ecParityCalc,limitSize:e.tenants.createTenant.fields.tenantSize.limitSize,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass,cpuToUse:e.tenants.createTenant.fields.tenantSize.cpuToUse,integrationSelection:e.tenants.createTenant.fields.tenantSize.integrationSelection}}),{updateAddField:j.HM,isPageValid:j.NO}),ve=(0,g.Z)((function(e){return(0,p.Z)((0,s.Z)((0,s.Z)({root:{margin:4},table:{"& .MuiTableCell-root":{fontSize:13}}},f.oO),f.AK))}))(xe((function(e){var t=e.classes,n=(e.updateAddField,e.isPageValid,e.volumeSize,e.sizeFactor,e.drivesPerServer,e.nodes),a=e.memoryNode,r=e.ecParity,i=(e.ecParityChoices,e.cleanECChoices,e.resourcesSize,e.distribution),s=e.ecParityCalc,l=(e.limitSize,e.selectedStorageClass,e.cpuToUse),c=e.integrationSelection,u=s.storageFactors.find((function(e){return e.erasureCode===r}));return(0,T.jsxs)("div",{className:t.root,children:[(0,T.jsx)("h4",{children:"Resource Allocation"}),(0,T.jsx)(he.Z,{}),(0,T.jsx)(me.Z,{className:t.table,"aria-label":"simple table",size:"small",children:(0,T.jsxs)(pe.Z,{children:[(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"Number of Servers"}),(0,T.jsx)(ge.Z,{align:"right",children:parseInt(n)>0?n:"-"})]}),""===c.typeSelection&&""===c.storageClass&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"Drives per Server"}),(0,T.jsx)(ge.Z,{align:"right",children:i?i.disks:"-"})]}),(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"Drive Capacity"}),(0,T.jsx)(ge.Z,{align:"right",children:i?(0,x.ae)(i.pvSize):"-"})]})]}),(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"Total Volumes"}),(0,T.jsx)(ge.Z,{align:"right",children:i?i.persistentVolumes:"-"})]}),""===c.typeSelection&&""===c.storageClass&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"Memory per Node"}),(0,T.jsxs)(ge.Z,{align:"right",children:[a," Gi"]})]}),(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{style:{borderBottom:0},scope:"row",children:"CPU Selection"}),(0,T.jsx)(ge.Z,{style:{borderBottom:0},align:"right",children:l})]})]})]})}),0===s.error&&u&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)("h4",{children:"Erasure Code Configuration"}),(0,T.jsx)(he.Z,{}),(0,T.jsx)(me.Z,{className:t.table,"aria-label":"simple table",size:"small",children:(0,T.jsxs)(pe.Z,{children:[(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"EC Parity"}),(0,T.jsx)(ge.Z,{align:"right",children:""!==r?r:"-"})]}),(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"Raw Capacity"}),(0,T.jsx)(ge.Z,{align:"right",children:(0,x.ae)(s.rawCapacity)})]}),(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"Usable Capacity"}),(0,T.jsx)(ge.Z,{align:"right",children:(0,x.ae)(u.maxCapacity)})]}),(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{style:{borderBottom:0},scope:"row",children:"Server Failures Tolerated"}),(0,T.jsx)(ge.Z,{style:{borderBottom:0},align:"right",children:i?Math.floor(u.maxFailureTolerations/i.disks):"-"})]})]})})]}),""!==c.typeSelection&&""!==c.storageClass&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)("h4",{children:"Single Instance Configuration"}),(0,T.jsx)(he.Z,{}),(0,T.jsx)(me.Z,{className:t.table,"aria-label":"simple table",size:"small",children:(0,T.jsxs)(pe.Z,{children:[(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"CPU"}),(0,T.jsx)(ge.Z,{align:"right",children:0!==c.CPU?c.CPU:"-"})]}),(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"Memory"}),(0,T.jsx)(ge.Z,{align:"right",children:0!==c.memory?"".concat(c.memory," Gi"):"-"})]}),(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"Drives per Server"}),(0,T.jsx)(ge.Z,{align:"right",children:0!==c.drivesPerServer?"".concat(c.drivesPerServer):"-"})]}),(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{style:{borderBottom:0},scope:"row",children:"Drive Size"}),(0,T.jsxs)(ge.Z,{style:{borderBottom:0},align:"right",children:[c.driveSize.driveSize,c.driveSize.sizeUnit]})]})]})})]})]})}))),ye=n(7262),Ce=(0,u.$j)((function(e){return{nodes:e.tenants.createTenant.fields.tenantSize.nodes,resourcesSize:e.tenants.createTenant.fields.tenantSize.resourcesSize,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass,maxAllocatableResources:e.tenants.createTenant.fields.tenantSize.maxAllocatableResources,maxCPUsUse:e.tenants.createTenant.fields.tenantSize.maxCPUsUse,maxMemorySize:e.tenants.createTenant.fields.tenantSize.maxMemorySize,resourcesSpecifyLimit:e.tenants.createTenant.fields.tenantSize.resourcesSpecifyLimit,resourcesCPURequestError:e.tenants.createTenant.fields.tenantSize.resourcesCPURequestError,resourcesCPURequest:e.tenants.createTenant.fields.tenantSize.resourcesCPURequest,resourcesCPULimitError:e.tenants.createTenant.fields.tenantSize.resourcesCPULimitError,resourcesCPULimit:e.tenants.createTenant.fields.tenantSize.resourcesCPULimit,resourcesMemoryRequestError:e.tenants.createTenant.fields.tenantSize.resourcesMemoryRequestError,resourcesMemoryRequest:e.tenants.createTenant.fields.tenantSize.resourcesMemoryRequest,resourcesMemoryLimitError:e.tenants.createTenant.fields.tenantSize.resourcesMemoryLimitError,resourcesMemoryLimit:e.tenants.createTenant.fields.tenantSize.resourcesMemoryLimit}}),{updateAddField:j.HM,isPageValid:j.NO}),Se=(0,g.Z)((function(e){return(0,p.Z)((0,s.Z)((0,s.Z)((0,s.Z)({compositeFieldContainer:{display:"flex",alignItems:"center"},compositeAddOn:{marginLeft:10,"& div":{marginBottom:0},"@media (max-width: 900px)":{"& div":{marginTop:5}}}},f.DF),f.oO),f.AK))}))(Ce((function(e){var t=e.classes,n=e.updateAddField,a=e.isPageValid,r=e.nodes,i=e.resourcesSize,s=e.selectedStorageClass,l=(e.maxAllocatableResources,e.maxCPUsUse),u=e.maxMemorySize,m=e.resourcesSpecifyLimit,p=e.resourcesCPURequestError,g=e.resourcesCPURequest,f=e.resourcesCPULimitError,x=e.resourcesCPULimit,v=e.resourcesMemoryRequestError,y=e.resourcesMemoryRequest,C=e.resourcesMemoryLimitError,S=e.resourcesMemoryLimit,j=(0,o.useCallback)((function(e,t){n("tenantSize",e,t)}),[n]);return(0,o.useEffect)((function(){a("tenantSize",""===v&&""===C&&""===p&&""===f)}),[a,v,C,p,f]),(0,o.useEffect)((function(){h.Z.invoke("GET","api/v1/cluster/allocatable-resources?num_nodes=".concat(r)).then((function(e){j("maxAllocatableResources",e);var t=e,n=c()(t,"min_allocatable_mem",!1),a=c()(t,"min_allocatable_cpu",!1);if(!1===n||!1===a)return j("cpuToUse",0),j("maxMemorySize",""),void j("maxCPUsUse","");var r=(0,ye.floor)(e.mem_priority.max_allocatable_mem/1024/1024/1024);j("maxMemorySize",r.toString()),j("maxCPUsUse",e.cpu_priority.max_allocatable_cpu.toString());var i=c()(t,"cpu_priority.max_allocatable_cpu",0),s=Math.max(1,(0,ye.floor)(i/2));j("resourcesCPURequest",s);var o=Math.max(2,(0,ye.floor)(r/2));j("resourcesMemoryRequest",o)})).catch((function(e){j("maxMemorySize",0),j("resourcesCPURequest",""),console.error(e)}))}),[r,j]),(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Resources"}),(0,T.jsx)("span",{className:t.descriptionText,children:"You may specify the amount of CPU and Memory that MinIO servers should reserve on each node."})]})}),""!==i.error&&(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsx)("div",{className:t.error,children:i.error})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{label:"CPU Request",id:"resourcesCPURequest",name:"resourcesCPURequest",onChange:function(e){var t=parseInt(e.target.value);""===e.target.value?j("resourcesCPURequestError",""):isNaN(t)?j("resourcesCPURequestError","Invalid number"):t>parseInt(l)?j("resourcesCPURequestError","Request exceeds available cores (".concat(l,")")):e.target.validity.valid?j("resourcesCPURequestError",""):j("resourcesCPURequestError","Invalid configuration"),j("resourcesCPURequest",e.target.value)},value:g,disabled:""===s,max:l,error:p,pattern:"[0-9]*"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"resourcesMemoryRequest",name:"resourcesMemoryRequest",onChange:function(e){var t=parseInt(e.target.value);""===e.target.value?j("resourcesMemoryRequestError",""):isNaN(t)?j("resourcesMemoryRequestError","Invalid number"):t>parseInt(u)?j("resourcesMemoryRequestError","Request exceeds available memory across ".concat(r," nodes (").concat(u,"Gi)")):t<2?j("resourcesMemoryRequestError","At least 2Gi must be requested"):e.target.validity.valid?j("resourcesMemoryRequestError",""):j("resourcesMemoryRequestError","Invalid configuration"),j("resourcesMemoryRequest",e.target.value)},label:"Memory Request [Gi]",value:y,disabled:""===s,error:v,pattern:"[0-9]*"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsx)(N.Z,{value:"resourcesSpecifyLimit",id:"resourcesSpecifyLimit",name:"resourcesSpecifyLimit",checked:m,onChange:function(e){var t=e.target.checked;j("resourcesSpecifyLimit",t)},label:"Specify Limit"})}),m&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{label:"CPU Limit",id:"resourcesCPULimit",name:"resourcesCPULimit",onChange:function(e){var t=parseInt(e.target.value);""===e.target.value?j("resourcesCPULimitError",""):isNaN(t)?j("resourcesCPULimitError","Invalid number"):e.target.validity.valid?j("resourcesCPULimitError",""):j("resourcesCPULimitError","Invalid configuration"),j("resourcesCPULimit",e.target.value)},value:x,disabled:""===s,max:l,error:f,pattern:"[0-9]*"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"resourcesMemoryLimit",name:"resourcesMemoryLimit",onChange:function(e){var t=parseInt(e.target.value);console.log("value",t),""===e.target.value?j("resourcesMemoryLimitError",""):isNaN(t)?j("resourcesMemoryLimitError","Invalid number"):e.target.validity.valid?j("resourcesMemoryLimitError",""):j("resourcesMemoryLimitError","Invalid configuration"),j("resourcesMemoryLimit",e.target.value)},label:"Memory Limit [Gi]",value:S,disabled:""===s,error:C,pattern:"[0-9]*"})})]})]})}))),je=(0,u.$j)((function(e){return{volumeSize:e.tenants.createTenant.fields.tenantSize.volumeSize,sizeFactor:e.tenants.createTenant.fields.tenantSize.sizeFactor,drivesPerServer:e.tenants.createTenant.fields.tenantSize.drivesPerServer,nodes:e.tenants.createTenant.fields.tenantSize.nodes,memoryNode:e.tenants.createTenant.fields.tenantSize.memoryNode,ecParity:e.tenants.createTenant.fields.tenantSize.ecParity,ecParityChoices:e.tenants.createTenant.fields.tenantSize.ecParityChoices,cleanECChoices:e.tenants.createTenant.fields.tenantSize.cleanECChoices,resourcesSize:e.tenants.createTenant.fields.tenantSize.resourcesSize,distribution:e.tenants.createTenant.fields.tenantSize.distribution,ecParityCalc:e.tenants.createTenant.fields.tenantSize.ecParityCalc,limitSize:e.tenants.createTenant.limitSize,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass}}),{updateAddField:j.HM,isPageValid:j.NO}),Ze=(0,g.Z)((function(e){return(0,p.Z)((0,s.Z)((0,s.Z)((0,s.Z)({compositeFieldContainer:{display:"flex",alignItems:"center"},compositeAddOn:{marginLeft:10,"& div":{marginBottom:0},"@media (max-width: 900px)":{"& div":{marginTop:5}}}},f.DF),f.oO),f.AK))}))(je((function(e){var t=e.classes,n=e.updateAddField,a=e.isPageValid,r=e.volumeSize,s=e.sizeFactor,l=e.drivesPerServer,c=e.nodes,u=e.memoryNode,m=e.ecParity,p=e.ecParityChoices,g=e.cleanECChoices,f=e.resourcesSize,v=e.distribution,y=e.ecParityCalc,C=e.limitSize,S=e.selectedStorageClass,j=(0,o.useState)({}),Z=(0,i.Z)(j,2),b=Z[0],N=Z[1],k=(0,o.useState)(!1),R=(0,i.Z)(k,2),z=R[0],w=R[1],F=(0,o.useState)(""),D=(0,i.Z)(F,2),E=D[0],U=D[1],K=(0,o.useCallback)((function(e,t){n("tenantSize",e,t)}),[n]),L=function(e){N((0,_.h)(b,e))};return(0,o.useEffect)((function(){if(p.length>0&&""===v.error){var e=(0,x.ES)(g,v.persistentVolumes,v.pvSize,v.nodes);K("ecParityCalc",e),g.includes(m)&&""!==m||K("ecParity",e.defaultEC)}}),[m,p.length,v,g,K]),(0,o.useEffect)((function(){var e=r,t=s,n=(0,x.Pw)("12","Ti",!0),a={unit:t,value:e.toString()},i=(0,x.zg)(a,parseInt(c),parseInt(n),parseInt(l));K("distribution",i),w(!1),U("")}),[c,r,s,K,l]),(0,o.useEffect)((function(){var e=(0,x.Pw)(r,s,!0),t=(0,P.R)([{fieldKey:"nodes",required:!0,value:c,customValidation:z,customValidationMessage:E},{fieldKey:"volume_size",required:!0,value:r,customValidation:parseInt(e)<1073741824||parseInt(e)>C[S],customValidationMessage:"Volume size must be greater than 1Gi and less than ".concat((0,x.ae)(C[S],!0))},{fieldKey:"drivesps",required:!0,value:l,customValidation:parseInt(l)<1,customValidationMessage:"There must be at least one drive"}]);a("tenantSize",!("nodes"in t)&&!("volume_size"in t)&&!("drivesps"in t)&&""===v.error&&0===y.error&&""!==m),N(t)}),[c,r,s,u,v,y,f,C,S,a,z,E,l,m]),(0,o.useEffect)((function(){""===v.error&&""!==c.trim()&&0!==v.disks&&h.Z.invoke("GET","api/v1/get-parity/".concat(c,"/").concat(v.disks)).then((function(e){K("ecParityChoices",(0,ie.dv)(e)),K("cleanECChoices",e)})).catch((function(e){K("ecparityChoices",[]),a("tenantSize",!1),K("ecParity","")}))}),[v,a,K,c]),(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Capacity"}),(0,T.jsx)("span",{className:t.descriptionText,children:"Please select the desired capacity"})]})}),""!==v.error&&(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsx)("div",{className:t.error,children:v.error})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"nodes",name:"nodes",onChange:function(e){e.target.validity.valid&&(K("nodes",e.target.value),L("nodes"))},label:"Number of Servers",disabled:""===S,value:c,min:"4",required:!0,error:b.nodes||"",pattern:"[0-9]*"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"drivesps",name:"drivesps",onChange:function(e){e.target.validity.valid&&(K("drivesPerServer",e.target.value),L("drivesps"))},label:"Drives per Server",value:l,disabled:""===S,min:"1",required:!0,error:b.drivesps||"",pattern:"[0-9]*"})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsx)("div",{className:t.multiContainer,children:(0,T.jsx)("div",{className:t.formFieldRow,children:(0,T.jsxs)("div",{className:t.compositeFieldContainer,children:[(0,T.jsx)(I.Z,{type:"number",id:"volume_size",name:"volume_size",onChange:function(e){K("volumeSize",e.target.value),L("volume_size")},label:"Total Size",value:r,disabled:""===S,required:!0,error:b.volume_size||"",min:"0"}),(0,T.jsx)("div",{className:t.compositeAddOn,children:(0,T.jsx)(A.Z,{label:"",id:"size_factor",name:"size_factor",value:s,disabled:""===S,onChange:function(e){K("sizeFactor",e.target.value)},options:(0,x.QU)()})})]})})})}),(0,T.jsxs)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:[(0,T.jsx)(A.Z,{id:"ec_parity",name:"ec_parity",onChange:function(e){K("ecParity",e.target.value)},label:"Erasure Code Parity",disabled:""===S,value:m,options:p}),(0,T.jsx)("span",{className:t.descriptionText,children:"Please select the desired parity. This setting will change the max usable capacity in the cluster"})]}),(0,T.jsx)(Se,{})]})}))),be=n(36222),_e=(0,u.$j)((function(e){return function(){var t=e.tenants.createTenant,n=t.fields.tenantSize,a=n.memoryNode,r=n.ecParityChoices,i=n.distribution,s=n.cleanECChoices,o=n.sizeFactor,l=n.ecParity,c=n.cpuToUse,u=n.integrationSelection,d=n.resourcesSize,m=n.drivesPerServer,p=n.maxCPUsUse,g=n.ecParityCalc;return{volumeSize:n.volumeSize,sizeFactor:o,drivesPerServer:m,nodes:n.nodes,memoryNode:a,ecParity:l,ecParityChoices:r,cleanECChoices:s,resourcesSize:d,distribution:i,ecParityCalc:g,cpuToUse:c,maxCPUsUse:p,integrationSelection:u,limitSize:t.limitSize,selectedStorageType:t.fields.nameTenant.selectedStorageType}}}),{updateAddField:j.HM,isPageValid:j.NO}),Pe=(0,g.Z)((function(e){return(0,p.Z)((0,s.Z)((0,s.Z)((0,s.Z)({compositeFieldContainer:{display:"flex",alignItems:"center"},compositeAddOn:{marginLeft:10,"& div":{marginBottom:0},"@media (max-width: 900px)":{"& div":{marginTop:5}}}},f.DF),f.oO),f.AK))}))(_e((function(e){var t=e.classes,n=e.updateAddField,a=e.isPageValid,r=e.volumeSize,s=e.sizeFactor,l=e.drivesPerServer,u=e.nodes,m=e.memoryNode,p=e.ecParity,g=e.ecParityChoices,f=e.cleanECChoices,v=e.resourcesSize,y=e.distribution,C=e.ecParityCalc,S=e.limitSize,j=e.cpuToUse,Z=e.selectedStorageType,b=e.maxCPUsUse,N=e.formToRender,k=e.integrationSelection,R=(0,o.useState)({}),z=(0,i.Z)(R,2),w=z[0],F=z[1],D=(0,o.useCallback)((function(e,t){n("tenantSize",e,t)}),[n]),E=(0,o.useCallback)((function(e,t){n("nameTenant",e,t)}),[n]);return(0,o.useEffect)((function(){if(g.length>0&&""===y.error){var e=(0,x.ES)(f,y.persistentVolumes,y.pvSize,y.nodes);D("ecParityCalc",e),f.includes(p)&&""!==p||D("ecParity",e.defaultEC)}}),[p,g,y,f,D]),(0,o.useEffect)((function(){if(void 0!==N&&parseInt(u)>=4){var e=Ie[N];if(Object.keys(e).length>0){var t=c()(e,"configurations",[]).find((function(e){return e.typeSelection===Z}));if(t){D("integrationSelection",t),E("selectedStorageClass",t.storageClass);var n={pvSize:parseInt((0,x.Pw)(t.driveSize.driveSize,t.driveSize.sizeUnit,!0),10),nodes:parseInt(u),disks:t.drivesPerServer,persistentVolumes:t.drivesPerServer*parseInt(u),error:""};D("distribution",n),D("resourcesCPURequest",Math.max(1,t.CPU/2)),D("resourcesMemoryRequest",Math.max(2,t.memory/2))}}}}),[u,Z,N,D,E]),(0,o.useEffect)((function(){var e=(0,P.R)([{fieldKey:"nodes",required:!0,value:u,customValidation:parseInt(u)<4,customValidationMessage:"Al least 4 servers must be selected"}]);a("tenantSize",!("nodes"in e)&&""===y.error&&0===C.error&&""===v.error&&""!==p&&parseInt(u)>=4),F(e)}),[u,r,s,m,y,C,v,S,Z,j,b,a,l,p]),(0,o.useEffect)((function(){0!==k.drivesPerServer&&""!==u.trim()&&h.Z.invoke("GET","api/v1/get-parity/".concat(u,"/").concat(k.drivesPerServer)).then((function(e){D("ecParityChoices",(0,ie.dv)(e)),D("cleanECChoices",e)})).catch((function(e){D("ecparityChoices",[]),a("tenantSize",!1),D("ecParity","")}))}),[k,u,a,D]),(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Tenant Size"}),(0,T.jsx)("span",{className:t.descriptionText,children:"Please select the desired capacity"})]})}),""!==y.error&&(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsx)("div",{className:t.error,children:y.error})}),""!==v.error&&(0,T.jsx)(d.ZP,{item:!0,xs:12,children:(0,T.jsx)("div",{className:t.error,children:v.error})}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"nodes",name:"nodes",onChange:function(e){var t;e.target.validity.valid&&(D("nodes",e.target.value),t="nodes",F((0,_.h)(w,t)))},label:"Number of Servers",disabled:""===Z,value:u,min:"4",required:!0,error:w.nodes||"",pattern:"[0-9]*"})}),(0,T.jsxs)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:[(0,T.jsx)(A.Z,{id:"ec_parity",name:"ec_parity",onChange:function(e){D("ecParity",e.target.value)},label:"Erasure Code Parity",disabled:""===Z,value:p,options:g}),(0,T.jsx)("span",{className:t.descriptionText,children:"Please select the desired parity. This setting will change the max usable capacity in the cluster"})]})]})})));!function(e){e[e.aws=0]="aws",e[e.azure=1]="azure",e[e.gcp=2]="gcp",e[e.default=3]="default",e[e[void 0]=4]="undefined"}(r||(r={}));var Ne={"mp-mode-aws":r.aws,"mp-mode-azure":r.azure,"mp-mode-gcp":r.gcp},Ie=(a={},(0,be.Z)(a,r.aws,{variantSelectorLabel:"Storage Type",variantSelectorValues:[{label:"NVME",value:"nvme"},{label:"HDD",value:"hdd"}],configurations:[{typeSelection:"nvme",storageClass:"nvme-i3en-12xlarge",CPU:48,memory:384,driveSize:{driveSize:"7500",sizeUnit:"Gi"},drivesPerServer:4},{typeSelection:"hdd",storageClass:"hdd-d3en-12xlarge",CPU:8,memory:32,driveSize:{driveSize:"12.7",sizeUnit:"Ti"},drivesPerServer:4}],sizingComponent:(0,T.jsx)(Pe,{formToRender:r.aws})}),(0,be.Z)(a,r.azure,{variantSelectorLabel:"VM Size",variantSelectorValues:[{label:"Standard_L32s_v2",value:"Standard_L32s_v2"},{label:"Standard_L48s_v2",value:"Standard_L48s_v2"},{label:"Standard_L64s_v2",value:"Standard_L64s_v2"}],configurations:[{typeSelection:"Standard_L8s_v2",storageClass:"local-nvme",CPU:8,memory:64,driveSize:{driveSize:"1787",sizeUnit:"Gi"},drivesPerServer:1},{typeSelection:"Standard_L16s_v2",storageClass:"local-nvme",CPU:16,memory:128,driveSize:{driveSize:"1787",sizeUnit:"Gi"},drivesPerServer:2},{typeSelection:"Standard_L32s_v2",storageClass:"local-nvme",CPU:32,memory:256,driveSize:{driveSize:"1787",sizeUnit:"Gi"},drivesPerServer:4},{typeSelection:"Standard_L48s_v2",storageClass:"local-nvme",CPU:48,memory:384,driveSize:{driveSize:"1787",sizeUnit:"Gi"},drivesPerServer:6},{typeSelection:"Standard_L64s_v2",storageClass:"local-nvme",CPU:64,memory:512,driveSize:{driveSize:"1787",sizeUnit:"Gi"},drivesPerServer:8}],sizingComponent:(0,T.jsx)(Pe,{formToRender:r.azure})}),(0,be.Z)(a,r.gcp,{variantSelectorLabel:"Storage Type",variantSelectorValues:[{label:"SSD",value:"ssd"}],configurations:[{typeSelection:"ssd",storageClass:"local-ssd",CPU:32,memory:128,driveSize:{driveSize:"368",sizeUnit:"Gi"},drivesPerServer:24}],sizingComponent:(0,T.jsx)(Pe,{formToRender:r.gcp})}),(0,be.Z)(a,r.default,{}),(0,be.Z)(a,r.undefined,{}),a),Ae=(0,u.$j)((function(e){return{tenantName:e.tenants.createTenant.fields.nameTenant.tenantName,namespace:e.tenants.createTenant.fields.nameTenant.namespace,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass,selectedStorageType:e.tenants.createTenant.fields.nameTenant.selectedStorageType,storageClasses:e.tenants.createTenant.storageClasses}}),{setModalErrorSnackMessage:y.zb,updateAddField:j.HM,setStorageClassesList:j.wZ,setLimitSize:j.DH,isPageValid:j.NO}),Te=(0,g.Z)((function(e){return(0,p.Z)((0,s.Z)((0,s.Z)((0,s.Z)({sizePreview:{position:"fixed",marginLeft:10,background:"#FFFFFF",border:"1px solid #EAEAEA",padding:2}},f.DF),f.oO),f.AK))}))(Ae((function(e){var t=e.classes,n=e.storageClasses,a=e.tenantName,s=e.namespace,l=e.selectedStorageClass,u=e.selectedStorageType,m=e.formToRender,p=void 0===m?r.default:m,g=e.updateAddField,f=e.setStorageClassesList,x=e.setLimitSize,v=e.isPageValid,y=e.setModalErrorSnackMessage,C=(0,o.useState)({}),S=(0,i.Z)(C,2),j=S[0],Z=S[1],N=(0,o.useState)(!0),k=(0,i.Z)(N,2),R=k[0],z=k[1],w=(0,o.useState)(!1),F=(0,i.Z)(w,2),D=F[0],E=F[1],U=(0,o.useState)(!1),K=(0,i.Z)(U,2),L=K[0],M=K[1],q=(0,o.useState)(!1),G=(0,i.Z)(q,2),O=G[0],B=G[1],$=(0,o.useCallback)((function(e,t){g("nameTenant",e,t)}),[g]),W=(0,o.useCallback)((function(){M(!1),h.Z.invoke("GET","/api/v1/namespaces/".concat(s,"/tenants")).then((function(e){var t=c()(e,"tenants",[]);if(t&&t.length>0)return z(!1),void E(!1);z(!0),h.Z.invoke("GET","/api/v1/namespaces/".concat(s,"/resourcequotas/").concat(s,"-storagequota")).then((function(e){var t=c()(e,"elements",[]);x((0,ie.OU)(e));var n=t.map((function(e){var t=c()(e,"name","").split(".storageclass.storage.k8s.io/requests.storage")[0];return{label:t,value:t}}));f(n);var a=n.findIndex((function(e){return e.value===l}));n.length>0&&-1===a?$("selectedStorageClass",n[0].value):0===n.length&&($("selectedStorageClass",""),f([])),E(!1)})).catch((function(e){E(!1),M(!0),$("selectedStorageClass",""),f([]),console.error("Namespace error: ",e)}))})).catch((function(e){y({errorMessage:"Error validating if namespace already has tenants",detailedError:e.detailedError})}))}),[s,x,y,f,$,l]),H=(0,o.useMemo)((function(){return re()(W,500)}),[W]);(0,o.useEffect)((function(){if(""!==s)return H(),E(!0),H.cancel}),[H,s]),(0,o.useEffect)((function(){var e=!1,t="";R||D?n.length<1&&R&&!D&&(e=!0,t="Please enter a valid namespace"):(e=!0,t="You can only create one tenant per namespace");var i=(0,P.R)([{fieldKey:"tenant-name",required:!0,pattern:/^[a-z0-9-]{3,63}$/,customPatternMessage:"Name only can contain lowercase letters, numbers and '-'. Min. Length: 3",value:a},{fieldKey:"namespace",required:!0,value:s,customValidation:e,customValidationMessage:t}]),o=!("tenant-name"in i)&&!("namespace"in i)&&(p===r.default&&n.length>0||p!==r.default&&""!==u);v("nameTenant",o),Z(i)}),[n,s,a,v,R,D,u,p]);var Y=function(e){Z((0,_.h)(j,e))};return(0,T.jsxs)(o.Fragment,{children:[O&&(0,T.jsx)(de,{addNamespaceOpen:O,closeAddNamespaceModalAndRefresh:function(e){B(!1),e&&H()},namespace:s}),(0,T.jsxs)(d.ZP,{container:!0,children:[(0,T.jsx)(d.ZP,{item:!0,xs:8,md:9,children:(0,T.jsx)(b.Z,{className:t.paperWrapper,sx:{minHeight:550},children:(0,T.jsxs)(d.ZP,{container:!0,children:[(0,T.jsxs)(d.ZP,{item:!0,xs:12,children:[(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Name"}),(0,T.jsx)("span",{className:t.descriptionText,children:"How would you like to name this new tenant?"})]}),(0,T.jsx)("div",{className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"tenant-name",name:"tenant-name",onChange:function(e){$("tenantName",e.target.value),Y("tenant-name")},label:"Name",value:a,required:!0,error:j["tenant-name"]||""})})]}),(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"namespace",name:"namespace",onChange:function(e){$("namespace",e.target.value),Y("namespace")},label:"Namespace",value:s,error:j.namespace||"",overlayIcon:L?(0,T.jsx)(V.Z,{}):null,overlayAction:function(){B(!0)},required:!0})}),p===r.default?(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(A.Z,{id:"storage_class",name:"storage_class",onChange:function(e){$("selectedStorageClass",e.target.value)},label:"Storage Class",value:l,options:n,disabled:n.length<1})}):(0,T.jsx)(d.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(A.Z,{id:"storage_type",name:"storage_type",onChange:function(e){$("selectedStorageType",e.target.value)},label:c()(Ie,"".concat(p,".variantSelectorLabel"),"Storage Type"),value:u,options:c()(Ie,"".concat(p,".variantSelectorValues"),[])})}),p===r.default?(0,T.jsx)(Ze,{}):c()(Ie,"".concat(p,".sizingComponent"),null)]})})}),(0,T.jsx)(d.ZP,{item:!0,xs:4,md:3,children:(0,T.jsx)("div",{className:t.sizePreview,children:(0,T.jsx)(ve,{})})})]})]})}))),ke=(0,u.$j)((function(e){return{features:e.console.session.features}}),null)((function(e){var t=e.features,n=(0,o.useState)(null),a=(0,i.Z)(n,2),s=a[0],l=a[1];return(0,o.useEffect)((function(){var e=r.default;t&&0!==t.length&&Object.keys(Ne).forEach((function(n){t.includes(n)&&(e=c()(Ne,n,r.default))}));l(e)}),[t]),null===s?null:(0,T.jsx)(Te,{formToRender:s})})),Re=(0,u.$j)((function(e){return{namespace:e.tenants.createTenant.fields.nameTenant.namespace,validPages:e.tenants.createTenant.validPages,fields:e.tenants.createTenant.fields,certificates:e.tenants.createTenant.certificates,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass}}),{setErrorSnackMessage:y.Ih,updateAddField:j.HM,resetAddTenantForm:j.dS}),ze=(0,g.Z)((function(e){return(0,p.Z)((0,s.Z)((0,s.Z)((0,s.Z)({pageBox:{border:"1px solid #EAEAEA"}},f.oO),f.AK),f.Je))}))(Re((function(e){var t=e.classes,n=e.fields,a=e.certificates,r=e.selectedStorageClass,l=e.namespace,u=e.validPages,p=e.setErrorSnackMessage,g=e.resetAddTenantForm,f=(0,o.useState)(!1),y=(0,i.Z)(f,2),j=y[0],Z=y[1],b=(0,o.useState)(null),_=(0,i.Z)(b,2),P=_[0],N=_[1],I=(0,o.useState)(!1),A=(0,i.Z)(I,2),k=A[0],z=A[1];(0,o.useEffect)((function(){var e=n.nameTenant.tenantName,t=n.nameTenant.selectedStorageClass,r=n.configure.imageName,i=n.configure.customDockerhub,o=n.configure.imageRegistry,u=n.configure.imageRegistryUsername,d=n.configure.imageRegistryPassword,m=n.configure.exposeMinIO,g=n.configure.exposeConsole,f=n.identityProvider.idpSelection,v=n.identityProvider.openIDConfigurationURL,y=n.identityProvider.openIDClientID,S=n.identityProvider.openIDClaimName,j=n.identityProvider.openIDCallbackURL,b=n.identityProvider.openIDScopes,_=n.identityProvider.openIDSecretID,P=n.identityProvider.ADURL,I=n.identityProvider.ADSkipTLS,A=n.identityProvider.ADServerInsecure,T=n.identityProvider.ADUserNameSearchFilter,R=n.identityProvider.ADGroupSearchBaseDN,w=n.identityProvider.ADGroupSearchFilter,F=n.identityProvider.ADGroupNameAttribute,D=n.identityProvider.ADUserDNs,E=n.identityProvider.ADUserNameFormat,U=n.identityProvider.ADLookupBindDN,K=n.identityProvider.ADLookupBindPassword,L=n.identityProvider.ADUserDNSearchBaseDN,M=n.identityProvider.ADUserDNSearchFilter,q=n.identityProvider.ADServerStartTLS,G=n.identityProvider.accessKeys,V=n.identityProvider.secretKeys,O=a.minioCertificates,B=a.caCertificates,$=a.consoleCaCertificates,W=a.consoleCertificate,H=a.serverCertificate,Y=a.clientCertificate,Q=a.vaultCertificate,X=a.vaultCA,J=a.gemaltoCA,ee=n.encryption.enableEncryption,te=n.encryption.encryptionType,ne=n.encryption.gemaltoEndpoint,ae=n.encryption.gemaltoToken,re=n.encryption.gemaltoDomain,ie=n.encryption.gemaltoRetry,se=n.encryption.awsEndpoint,oe=n.encryption.awsRegion,le=n.encryption.awsKMSKey,ce=n.encryption.awsAccessKey,ue=n.encryption.awsSecretKey,de=n.encryption.awsToken,me=n.encryption.vaultEndpoint,pe=n.encryption.vaultEngine,ge=n.encryption.vaultNamespace,fe=n.encryption.vaultPrefix,he=n.encryption.vaultAppRoleEngine,xe=n.encryption.vaultId,ve=n.encryption.vaultSecret,ye=n.encryption.vaultRetry,Ce=n.encryption.vaultPing,Se=n.encryption.azureEndpoint,je=n.encryption.azureTenantID,Ze=n.encryption.azureClientID,be=n.encryption.azureClientSecret,_e=n.encryption.gcpProjectID,Pe=n.encryption.gcpEndpoint,Ne=n.encryption.gcpClientEmail,Ie=n.encryption.gcpClientID,Ae=n.encryption.gcpPrivateKeyID,Te=n.encryption.gcpPrivateKey,ke=n.security.enableAutoCert,Re=n.security.enableTLS,ze=n.tenantSize.ecParity,we=n.tenantSize.distribution,Fe=n.configure.tenantCustom,De=n.configure.logSearchCustom,Ee=n.configure.prometheusCustom,Ue=n.configure.logSearchVolumeSize,Ke=n.configure.logSearchSelectedStorageClass,Le=n.configure.logSearchImage,Me=n.configure.kesImage,qe=n.configure.logSearchPostgresImage,Ge=n.configure.logSearchPostgresInitImage,Ve=n.configure.prometheusImage,Oe=n.configure.prometheusSidecarImage,Be=n.configure.prometheusInitImage,$e=n.configure.prometheusSelectedStorageClass,We=n.configure.prometheusVolumeSize,He=n.affinity.podAffinity,Ye=n.affinity.nodeSelectorLabels,Qe=n.affinity.withPodAntiAffinity,Xe=n.configure.tenantSecurityContext,Je=n.configure.logSearchSecurityContext,et=n.configure.logSearchPostgresSecurityContext,tt=n.configure.prometheusSecurityContext,nt=n.encryption.kesSecurityContext,at=n.encryption.replicas;if(k){var rt=(0,x.en)([]),it={};switch(He){case"default":it={affinity:(0,C.P)(e,rt)};break;case"nodeSelector":it={affinity:(0,C.q)(Ye,Qe,e,rt)}}var st=ze.split(":")[1],ot={name:e,namespace:l,access_key:"",secret_key:"",access_keys:[],secret_keys:[],enable_tls:Re&&ke,enable_console:!0,enable_prometheus:!0,service_name:"",image:r,expose_minio:m,expose_console:g,pools:[(0,s.Z)({name:rt,servers:we.nodes,volumes_per_server:we.disks,volume_configuration:{size:we.pvSize,storage_class_name:t},securityContext:Fe?Xe:null},it)],erasureCodingParity:parseInt(st,10)};""===n.tenantSize.resourcesCPURequest&&""===n.tenantSize.resourcesCPULimit&&""===n.tenantSize.resourcesMemoryRequest&&""===n.tenantSize.resourcesMemoryLimit||(ot.pools[0].resources={},""===n.tenantSize.resourcesCPURequest&&""===n.tenantSize.resourcesMemoryRequest||(ot.pools[0].resources.requests={},""!==n.tenantSize.resourcesCPURequest&&(ot.pools[0].resources.requests.cpu=parseInt(n.tenantSize.resourcesCPURequest)),""!==n.tenantSize.resourcesMemoryRequest&&(ot.pools[0].resources.requests.memory=parseInt(n.tenantSize.resourcesMemoryRequest))),""===n.tenantSize.resourcesCPULimit&&""===n.tenantSize.resourcesMemoryLimit||(ot.pools[0].resources.limits={},""!==n.tenantSize.resourcesCPULimit&&(ot.pools[0].resources.limits.cpu=parseInt(n.tenantSize.resourcesCPULimit)),""!==n.tenantSize.resourcesMemoryLimit&&(ot.pools[0].resources.limits.memory=parseInt(n.tenantSize.resourcesMemoryLimit)))),i&&(ot=(0,s.Z)((0,s.Z)({},ot),{},{image_registry:{registry:o,username:u,password:d}})),ot=De?(0,s.Z)((0,s.Z)({},ot),{},{logSearchConfiguration:{storageClass:"default"===Ke?"":Ke,storageSize:parseInt(Ue),image:Le,postgres_image:qe,postgres_init_image:Ge,securityContext:Je,postgres_securityContext:et}}):(0,s.Z)((0,s.Z)({},ot),{},{logSearchConfiguration:{image:Le,postgres_image:qe,postgres_init_image:Ge}}),ot=Ee?(0,s.Z)((0,s.Z)({},ot),{},{prometheusConfiguration:{storageClass:"default"===$e?"":$e,storageSize:parseInt(We),image:Ve,sidecar_image:Oe,init_image:Be,securityContext:tt}}):(0,s.Z)((0,s.Z)({},ot),{},{prometheusConfiguration:{image:Ve,sidecar_image:Oe,init_image:Be}});var lt=null,ct=null,ut=null,dt=null;if(B.length>0&&(ut={ca_certificates:B.map((function(e){return e.encoded_cert})).filter((function(e){return e}))}),$.length>0&&(dt={console_ca_certificates:$.map((function(e){return e.encoded_cert})).filter((function(e){return e}))}),Re&&O.length>0&&(lt={minio:O.map((function(e){return{crt:e.encoded_cert,key:e.encoded_key}})).filter((function(e){return e.crt&&e.key}))}),Re&&""!==W.encoded_cert&&""!==W.encoded_key&&(ct={console:{crt:W.encoded_cert,key:W.encoded_key}}),(lt||ct||ut||dt)&&(ot=(0,s.Z)((0,s.Z)({},ot),{},{tls:(0,s.Z)((0,s.Z)((0,s.Z)((0,s.Z)({},lt),ct),ut),dt)})),ee){var mt={};switch(te){case"gemalto":var pt={};""!==J.encoded_cert&&(pt={ca:J.encoded_cert}),mt={gemalto:{keysecure:{endpoint:ne,credentials:{token:ae,domain:re,retry:parseInt(ie)},tls:(0,s.Z)({},pt)}}};break;case"aws":mt={aws:{secretsmanager:{endpoint:se,region:oe,kmskey:le,credentials:{accesskey:ce,secretkey:ue,token:de}}}};break;case"azure":mt={azure:{keyvault:{endpoint:Se,credentials:{tenant_id:je,client_id:Ze,client_secret:be}}}};break;case"gcp":mt={gcp:{secretmanager:{project_id:_e,endpoint:Pe,credentials:{client_email:Ne,client_id:Ie,private_key_id:Ae,private_key:Te}}}};break;case"vault":var gt=null,ft=null;""!==Q.encoded_key&&""!==Q.encoded_cert&&(gt={key:Q.encoded_key,crt:Q.encoded_cert}),""!==X.encoded_cert&&(ft={ca:X.encoded_cert});var ht=null;(gt||X)&&(ht={tls:(0,s.Z)((0,s.Z)({},gt),ft)}),mt={vault:(0,s.Z)((0,s.Z)({endpoint:me,engine:pe,namespace:ge,prefix:fe,approle:{engine:he,id:xe,secret:ve,retry:parseInt(ye)}},ht),{},{status:{ping:parseInt(Ce)}})}}var xt={},vt={};""!==Y.encoded_key&&""!==Y.encoded_cert&&(vt={client:{key:Y.encoded_key,crt:Y.encoded_cert}}),""!==H.encoded_key&&""!==H.encoded_cert&&(xt={server:{key:H.encoded_key,crt:H.encoded_cert}}),ot=(0,s.Z)((0,s.Z)({},ot),{},{encryption:(0,s.Z)((0,s.Z)((0,s.Z)({replicas:at,securityContext:nt,image:Me},vt),xt),mt)})}var yt={};switch(f){case"Built-in":for(var Ct=[],St=0;St.\n\nimport React from \"react\";\nimport { Link } from \"react-router-dom\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { BackSettingsIcon } from \"../icons\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n link: {\n display: \"flex\",\n alignItems: \"center\",\n textDecoration: \"none\",\n maxWidth: \"300px\",\n padding: \"2rem 2rem 0rem 2rem\",\n color: theme.palette.primary.light,\n fontSize: \".8rem\",\n \"&:hover\": {\n textDecoration: \"underline\",\n },\n },\n icon: {\n marginRight: \".3rem\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n \"& svg.min-icon\": {\n width: 12,\n },\n },\n });\n\ninterface IBackLink {\n classes: any;\n to: string;\n label: string;\n className?: any;\n executeOnClick?: () => void;\n}\n\nconst BackLink = ({ to, label, classes, className, executeOnClick }: IBackLink) => {\n return (\n {\n if (executeOnClick) {\n executeOnClick();\n }\n }}\n >\n
\n \n
\n
{label}
\n \n );\n};\n\nexport default withStyles(styles)(BackLink);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { IconButton, IconButtonProps, Tooltip } from \"@mui/material\";\nimport clsx from \"clsx\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n root: {\n padding: 8,\n marginLeft: 8,\n borderWidth: 1,\n borderColor: \"#696969\",\n color: \"#696969\",\n borderStyle: \"solid\",\n borderRadius: 3,\n \"& .min-icon\": {\n // height: 20,\n width: 20,\n },\n \"& .MuiTouchRipple-root span\": {\n backgroundColor: theme.palette.primary.main,\n borderRadius: 3,\n opacity: 0.3,\n },\n \"&:disabled\": {\n color: \"#EBEBEB\",\n borderColor: \"#EBEBEB\",\n },\n },\n contained: {\n borderColor: theme.palette.primary.main,\n background: theme.palette.primary.main,\n color: \"white\",\n \"& .MuiTouchRipple-root span\": {\n backgroundColor: theme.palette.primary.dark,\n borderRadius: 3,\n opacity: 0.3,\n },\n \"&:hover\": {\n backgroundColor: theme.palette.primary.light,\n color: \"#FFF\",\n },\n },\n });\n\ninterface IBoxIconButton extends IconButtonProps {\n classes: any;\n children: any;\n variant?: \"outlined\" | \"contained\";\n tooltip?: string;\n}\n\nconst BoxIconButton = ({\n classes,\n children,\n variant = \"outlined\",\n tooltip,\n ...rest\n}: IBoxIconButton) => {\n const button = (\n \n {children}\n \n );\n\n if (tooltip && tooltip !== \"\") {\n return (\n \n {button}\n \n );\n }\n\n return button;\n};\n\nexport default withStyles(styles)(BoxIconButton);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { InputAdornment, OutlinedInput } from \"@mui/material\";\nimport BoxIconButton from \"../BoxIconButton/BoxIconButton\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport CopyToClipboard from \"react-copy-to-clipboard\";\nimport { CopyIcon } from \"../../../../icons\";\nimport { fieldBasic } from \"../FormComponents/common/styleLibrary\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n container: {\n display: \"flex\",\n flexFlow: \"column\",\n padding: \"20px 0 8px 0\",\n },\n inputWithCopy: {\n \"& .MuiInputBase-root \": {\n width: \"100%\",\n background: \"#FBFAFA\",\n \"& .MuiInputBase-input\": {\n height: \".8rem\",\n },\n \"& .MuiInputAdornment-positionEnd\": {\n marginRight: \".5rem\",\n \"& .MuiButtonBase-root\": {\n height: \"2rem\",\n },\n },\n },\n \"& .MuiButtonBase-root .min-icon\": {\n width: \".8rem\",\n height: \".8rem\",\n },\n },\n inputLabel: {\n ...fieldBasic.inputLabel,\n fontSize: \".8rem\",\n },\n });\n\nconst CredentialItem = ({\n label = \"\",\n value = \"\",\n classes = {},\n}: {\n label: string;\n value: string;\n classes: any;\n}) => {\n return (\n
\n
{label}:
\n
\n \n \n {}}\n onMouseDown={() => {}}\n edge=\"end\"\n >\n \n \n \n \n }\n />\n
\n
\n );\n};\n\nexport default withStyles(styles)(CredentialItem);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport get from \"lodash/get\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { NewServiceAccount } from \"./types\";\nimport { Button } from \"@mui/material\";\nimport ModalWrapper from \"../ModalWrapper/ModalWrapper\";\nimport Grid from \"@mui/material/Grid\";\nimport CredentialItem from \"./CredentialItem\";\nimport WarnIcon from \"../../../../icons/WarnIcon\";\nimport { DownloadIcon, ServiceAccountCredentialsIcon } from \"../../../../icons\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n warningBlock: {\n color: \"red\",\n fontSize: \".85rem\",\n margin: \".5rem 0 .5rem 0\",\n display: \"flex\",\n alignItems: \"center\",\n \"& svg \": {\n marginRight: \".3rem\",\n height: 16,\n width: 16,\n },\n },\n credentialTitle: {\n padding: \".8rem 0 0 0\",\n fontWeight: 600,\n fontSize: \".9rem\",\n },\n buttonContainer: {\n textAlign: \"right\",\n marginTop: \"1rem\",\n },\n credentialsPanel: {\n overflowY: \"auto\",\n maxHeight: 350,\n },\n promptTitle: {\n display: \"flex\",\n alignItems: \"center\",\n },\n buttonSpacer: {\n marginRight: \".9rem\",\n },\n promptIcon: {\n marginRight: \".1rem\",\n display: \"flex\",\n alignItems: \"center\",\n height: \"2rem\",\n width: \"2rem\",\n },\n });\n\ninterface ICredentialsPromptProps {\n classes: any;\n newServiceAccount: NewServiceAccount | null;\n open: boolean;\n entity: string;\n closeModal: () => void;\n}\n\nconst download = (filename: string, text: string) => {\n let element = document.createElement(\"a\");\n element.setAttribute(\n \"href\",\n \"data:text/plain;charset=utf-8,\" + encodeURIComponent(text)\n );\n element.setAttribute(\"download\", filename);\n\n element.style.display = \"none\";\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n};\n\nconst CredentialsPrompt = ({\n classes,\n newServiceAccount,\n open,\n closeModal,\n entity,\n}: ICredentialsPromptProps) => {\n if (!newServiceAccount) {\n return null;\n }\n\n const consoleCreds = get(newServiceAccount, \"console\", null);\n const idp = get(newServiceAccount, \"idp\", false);\n\n return (\n {\n closeModal();\n }}\n title={\n
\n
New {entity} Created
\n
\n }\n titleIcon={}\n >\n \n \n A new {entity} has been created with the following details:\n {!idp && consoleCreds && (\n \n \n
\n Console Credentials\n
\n {Array.isArray(consoleCreds) &&\n consoleCreds.map((credentialsPair, index) => {\n return (\n <>\n \n \n \n );\n })}\n {!Array.isArray(consoleCreds) && (\n <>\n \n \n \n )}\n
\n
\n )}\n {idp ? (\n
\n Please Login via the configured external identity provider.\n
\n ) : (\n
\n \n \n Write these down, as this is the only time the secret will be\n displayed.\n \n
\n )}\n
\n \n {\n closeModal();\n }}\n color=\"primary\"\n >\n Done\n \n\n {!idp && (\n {\n let consoleExtras = {};\n\n if (consoleCreds) {\n if (!Array.isArray(consoleCreds)) {\n consoleExtras = {\n console: [\n {\n access_key: consoleCreds.accessKey,\n secret_key: consoleCreds.secretKey,\n },\n ],\n };\n } else {\n const cCreds = consoleCreds.map((itemMap) => {\n return {\n access_key: itemMap.accessKey,\n secret_key: itemMap.secretKey,\n };\n });\n\n consoleExtras = {\n console: [...cCreds],\n };\n }\n }\n\n download(\n \"credentials.json\",\n JSON.stringify({\n ...consoleExtras,\n })\n );\n }}\n endIcon={}\n variant=\"contained\"\n color=\"primary\"\n >\n Download\n \n )}\n \n
\n \n );\n};\n\nexport default withStyles(styles)(CredentialsPrompt);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useState } from \"react\";\nimport get from \"lodash/get\";\nimport { Grid, InputLabel, Tooltip } from \"@mui/material\";\nimport IconButton from \"@mui/material/IconButton\";\nimport AttachFileIcon from \"@mui/icons-material/AttachFile\";\nimport CancelIcon from \"@mui/icons-material/Cancel\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n fieldBasic,\n fileInputStyles,\n tooltipHelper,\n} from \"../common/styleLibrary\";\nimport { fileProcess } from \"./utils\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport ErrorBlock from \"../../../../shared/ErrorBlock\";\n\ninterface InputBoxProps {\n label: string;\n classes: any;\n onChange: (e: string, i: string) => void;\n id: string;\n name: string;\n disabled?: boolean;\n tooltip?: string;\n required?: boolean;\n error?: string;\n accept?: string;\n value?: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n valueString: {\n maxWidth: 350,\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n marginTop: 2,\n },\n fileInputField: {\n margin: \"13px 0\",\n \"@media (max-width: 900px)\": {\n flexFlow: \"column\",\n },\n },\n ...fileInputStyles,\n inputLabel: {\n ...fieldBasic.inputLabel,\n fontWeight: \"normal\",\n },\n textBoxContainer: {\n ...fieldBasic.textBoxContainer,\n maxWidth: \"100%\",\n border: \"1px solid #eaeaea\",\n paddingLeft: \"15px\",\n },\n });\n\nconst FileSelector = ({\n label,\n classes,\n onChange,\n id,\n name,\n disabled = false,\n tooltip = \"\",\n required,\n error = \"\",\n accept = \"\",\n value = \"\",\n}: InputBoxProps) => {\n const [showFileSelector, setShowSelector] = useState(false);\n\n return (\n \n \n {label !== \"\" && (\n \n \n {label}\n {required ? \"*\" : \"\"}\n \n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n \n )}\n\n {showFileSelector || value === \"\" ? (\n
\n {\n const fileName = get(e, \"target.files[0].name\", \"\");\n fileProcess(e, (data: any) => {\n onChange(data, fileName);\n });\n }}\n accept={accept}\n required={required}\n disabled={disabled}\n className={classes.fileInputField}\n />\n\n {value !== \"\" && (\n {\n setShowSelector(false);\n }}\n disableRipple={false}\n disableFocusRipple={false}\n size=\"small\"\n >\n \n \n )}\n\n {error !== \"\" && }\n
\n ) : (\n
\n
{value}
\n {\n setShowSelector(true);\n }}\n disableRipple={false}\n disableFocusRipple={false}\n size=\"small\"\n >\n \n \n
\n )}\n \n
\n );\n};\n\nexport default withStyles(styles)(FileSelector);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nexport const fileProcess = (evt: any, callback: any) => {\n const file = evt.target.files[0];\n const reader = new FileReader();\n reader.readAsDataURL(file);\n\n reader.onload = () => {\n // reader.readAsDataURL(file) output will be something like: data:application/x-x509-ca-cert;base64,LS0tLS1CRUdJTiBDRVJUSU\n // we care only about the actual base64 part (everything after \"data:application/x-x509-ca-cert;base64,\")\n const fileBase64 = reader.result;\n if (fileBase64) {\n const fileArray = fileBase64.toString().split(\"base64,\");\n\n if (fileArray.length === 2) {\n callback(fileArray[1]);\n }\n }\n };\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React from \"react\";\nimport clsx from \"clsx\";\nimport Grid from \"@mui/material/Grid\";\nimport RadioGroup from \"@mui/material/RadioGroup\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Radio, { RadioProps } from \"@mui/material/Radio\";\nimport { InputLabel, Tooltip } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport { fieldBasic, radioIcons, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\n\nexport interface SelectorTypes {\n label: string;\n value: string;\n}\n\ninterface RadioGroupProps {\n selectorOptions: SelectorTypes[];\n currentSelection: string;\n label: string;\n id: string;\n name: string;\n tooltip?: string;\n disableOptions?: boolean;\n onChange: (e: React.ChangeEvent) => void;\n classes: any;\n displayInColumn?: boolean;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n optionLabel: {\n \"&.Mui-disabled\": {\n \"& .MuiFormControlLabel-label\": {\n color: \"#9c9c9c\",\n },\n },\n \"&:last-child\": {\n marginRight: 0,\n },\n \"& .MuiFormControlLabel-label\": {\n fontSize: 12,\n color: \"#07193E\",\n },\n },\n checkedOption: {\n \"& .MuiFormControlLabel-label\": {\n fontSize: 12,\n color: \"#07193E\",\n fontWeight: 700,\n },\n },\n });\n\nconst radioStyles = makeStyles({\n root: {\n \"&:hover\": {\n backgroundColor: \"transparent\",\n },\n },\n ...radioIcons,\n});\n\nconst RadioButton = (props: RadioProps) => {\n const classes = radioStyles();\n\n return (\n }\n icon={}\n {...props}\n />\n );\n};\n\nexport const RadioGroupSelector = ({\n selectorOptions = [],\n currentSelection,\n label,\n id,\n name,\n onChange,\n tooltip = \"\",\n disableOptions = false,\n classes,\n displayInColumn = false,\n}: RadioGroupProps) => {\n return (\n \n \n \n {label}\n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n
\n \n \n {selectorOptions.map((selectorOption) => {\n return (\n }\n label={selectorOption.label}\n disabled={disableOptions}\n className={clsx(classes.optionLabel, {\n [classes.checkedOption]:\n selectorOption.value === currentSelection,\n })}\n />\n );\n })}\n \n \n
\n );\n};\n\nexport default withStyles(styles)(RadioGroupSelector);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport {\n FormControl,\n InputLabel,\n MenuItem,\n Select,\n InputBase,\n Tooltip,\n SelectChangeEvent,\n} from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\n\nexport interface selectorTypes {\n label: string;\n value: string;\n}\n\ninterface SelectProps {\n options: selectorTypes[];\n value: string;\n label: string;\n id: string;\n name: string;\n tooltip?: string;\n onChange: (e: SelectChangeEvent) => void;\n disabled?: boolean;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n inputLabel: {\n ...fieldBasic.inputLabel,\n \"& span\": {\n fontWeight: \"normal\",\n },\n },\n fieldContainer: {\n display: \"flex\",\n \"@media (max-width: 600px)\": {\n flexFlow: \"column\",\n },\n },\n });\n\nconst SelectStyled = withStyles((theme: Theme) =>\n createStyles({\n root: {\n height: 38,\n lineHeight: 1,\n \"label + &\": {\n marginTop: theme.spacing(3),\n },\n },\n input: {\n height: 38,\n position: \"relative\",\n color: \"#07193E\",\n fontSize: 13,\n fontWeight: 600,\n padding: \"8px 20px 10px 10px\",\n border: \"#e5e5e5 1px solid\",\n borderRadius: 4,\n display: \"flex\",\n alignItems: \"center\",\n \"&:hover\": {\n borderColor: \"#393939\",\n },\n \"&:focus\": {\n backgroundColor: \"#fff\",\n },\n },\n })\n)(InputBase);\n\nconst SelectWrapper = ({\n classes,\n id,\n name,\n onChange,\n options,\n label,\n tooltip = \"\",\n value,\n disabled = false,\n}: SelectProps) => {\n return (\n \n \n {label !== \"\" && (\n \n {label}\n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n )}\n \n }\n disabled={disabled}\n >\n {options.map((option) => (\n \n {option.label}\n \n ))}\n \n \n
\n
\n );\n};\n\nexport default withStyles(styles)(SelectWrapper);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { IWizardButton, IWizardPage } from \"./types\";\nimport { Button, LinearProgress } from \"@mui/material\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n wizardStepContainer: {\n display: \"flex\",\n flexDirection: \"column\",\n flex: 1,\n },\n wizardComponent: {\n overflowY: \"auto\",\n marginBottom: 10,\n height: \"calc(100vh - 100px - 80px)\",\n minHeight: 400,\n flex: 1,\n width: \"100%\",\n },\n wizardModal: {\n overflowY: \"auto\",\n marginBottom: 10,\n height: \"calc(100vh - 515px)\",\n },\n buttonsContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"flex-start\" as const,\n padding: \"10px 0\",\n borderTop: \"#EAEAEA 1px solid\",\n \"& button\": {\n marginLeft: 10,\n },\n \"&.forModal\": {\n paddingBottom: 0,\n },\n },\n buttonInnerContainer: {\n width: \"100%\",\n textAlign: \"right\" as const,\n marginRight: 15,\n },\n });\n\nconst WizardPage = ({\n classes,\n page,\n pageChange,\n loadingStep,\n forModal,\n}: IWizardPage) => {\n const buttonAction = (btn: IWizardButton) => {\n switch (btn.type) {\n case \"next\":\n pageChange(\"++\");\n break;\n case \"back\":\n pageChange(\"--\");\n break;\n case \"to\":\n pageChange(btn.toPage || 0);\n break;\n case \"custom\":\n default:\n }\n\n if (btn.action) {\n btn.action(pageChange);\n }\n };\n\n return (\n
\n
\n {page.componentRender}\n
\n {loadingStep && (\n
\n \n
\n )}\n \n
\n {page.buttons.map((btn) => {\n return (\n {\n buttonAction(btn);\n }}\n disabled={!btn.enabled}\n key={`button-${page.label}-${btn.label}`}\n >\n {btn.label}\n \n );\n })}\n
\n
\n \n );\n};\n\nexport default withStyles(styles)(WizardPage);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useState } from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { IWizardMain } from \"./types\";\nimport WizardPage from \"./WizardPage\";\nimport { Grid, List } from \"@mui/material\";\nimport ListItem from \"@mui/material/ListItem\";\nimport ListItemText from \"@mui/material/ListItemText\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n wizFromContainer: {},\n wizFromModal: {\n position: \"relative\",\n },\n modalWizardSteps: {\n padding: 5,\n borderBottom: \"#eaeaea 1px solid\",\n \"& ul\": {\n padding: 0,\n marginTop: 0,\n display: \"flex\",\n justifyContent: \"space-evenly\",\n\n \"& li\": {\n listStyle: \"lower-roman\",\n \"&::marker\": {\n paddingLeft: 15,\n },\n },\n },\n },\n buttonList: {\n backgroundColor: \"transparent\",\n border: \"none\",\n cursor: \"pointer\",\n \"&:not(:disabled):hover\": {\n textDecoration: \"underline\",\n },\n \"&:selected, &:active, &:focus, &:focus:active\": {\n border: \"none\",\n outline: 0,\n boxShadow: \"none\",\n },\n },\n paddedContentGrid: {\n marginTop: 8,\n padding: \"0 10px\",\n minHeight: 400,\n },\n stepsLabel: {\n fontSize: 20,\n color: \"#393939\",\n fontWeight: 600,\n margin: \"15px 12px\",\n \"&.stepsModalTitle\": {\n textAlign: \"center\",\n width: \"100%\",\n marginTop: 0,\n marginBottom: 10,\n },\n },\n stepsMasterContainer: {\n position: \"sticky\",\n top: 0,\n backgroundColor: \"#FFFFFF\",\n width: \"100%\",\n maxHeight: 90,\n },\n verticalSteps: {\n borderRight: \"1px solid #E5E5E5\",\n background: \"#F8F8F8\",\n },\n stepsContainer: {\n paddingTop: 0,\n \"& .MuiButtonBase-root.Mui-selected\": {\n background: \"#E5E5E5\",\n },\n },\n stepItem: {\n minHeight: 60,\n borderBottom: \"1px solid #E5E5E5\",\n \"&:hover\": {\n background: \"rgba(247,247,247,0.7)\",\n },\n },\n });\n\nconst GenericWizard = ({\n classes,\n wizardSteps,\n loadingStep,\n forModal,\n}: IWizardMain) => {\n const [currentStep, setCurrentStep] = useState(0);\n\n const pageChange = (toElement: string | number) => {\n const lastPage = wizardSteps.length - 1;\n\n if (toElement === \"++\") {\n let nextPage = currentStep + 1;\n\n if (nextPage > lastPage) {\n nextPage = lastPage;\n }\n\n setCurrentStep(nextPage);\n }\n\n if (toElement === \"--\") {\n let prevPage = currentStep - 1;\n\n if (prevPage < 0) {\n prevPage = 0;\n }\n\n setCurrentStep(prevPage);\n }\n\n if (typeof toElement === \"number\") {\n let pg = toElement;\n if (toElement < 0) {\n pg = 0;\n }\n\n if (toElement > lastPage) {\n pg = lastPage;\n }\n\n setCurrentStep(pg);\n }\n };\n\n if (wizardSteps.length === 0) {\n return null;\n }\n\n const stepsList = () => {\n return (\n \n \n {wizardSteps.map((step, index) => {\n return (\n pageChange(index)}\n key={`wizard-${index.toString()}`}\n selected={currentStep === index}\n classes={{\n root: classes.stepItem,\n }}\n >\n \n \n );\n })}\n \n \n );\n };\n const stepsListModal = () => {\n return (\n
    \n {wizardSteps.map((step, index) => {\n return (\n
  • \n pageChange(index)}\n disabled={index > currentStep}\n className={classes.buttonList}\n >\n {step.label}\n \n
  • \n );\n })}\n
\n );\n };\n\n return (\n \n {forModal ? (\n \n
\n
Steps
\n
{stepsListModal()}
\n
\n
\n ) : (\n \n \n {stepsList()}\n \n \n )}\n\n \n \n \n \n );\n};\n\nexport default withStyles(styles)(GenericWizard);\n","import React from \"react\";\nimport { Grid } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { pageContentStyles } from \"../FormComponents/common/styleLibrary\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...pageContentStyles,\n });\n\ntype PageLayoutProps = {\n className?: string;\n classes?: any;\n children: any;\n};\n\nconst PageLayout = ({ classes, className = \"\", children }: PageLayoutProps) => {\n return (\n
\n \n \n {children}\n \n \n
\n );\n};\n\nexport default withStyles(styles)(PageLayout);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@mui/material/Grid\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport Typography from \"@mui/material/Typography\";\nimport IconButton from \"@mui/material/IconButton\";\nimport { AppState } from \"../../../../store\";\nimport OperatorLogo from \"../../../../icons/OperatorLogo\";\nimport ConsoleLogo from \"../../../../icons/ConsoleLogo\";\nimport { IFileItem } from \"../../ObjectBrowser/reducers\";\nimport { toggleList } from \"../../ObjectBrowser/actions\";\nimport { ObjectManagerIcon } from \"../../../../icons\";\n\ninterface IPageHeader {\n classes: any;\n sidebarOpen?: boolean;\n operatorMode?: boolean;\n label: any;\n actions?: any;\n managerObjects?: IFileItem[];\n toggleList: typeof toggleList;\n middleComponent?: React.ReactNode;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n headerContainer: {\n width: \"100%\",\n minHeight: 79,\n display: \"flex\",\n backgroundColor: \"#fff\",\n left: 0,\n boxShadow: \"rgba(0,0,0,.08) 0 3px 10px\",\n },\n label: {\n display: \"flex\",\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n },\n labelStyle: {\n color: \"#000\",\n fontSize: 18,\n fontWeight: 700,\n marginLeft: 34,\n marginTop: 8,\n },\n rightMenu: {\n textAlign: \"right\",\n },\n logo: {\n marginLeft: 34,\n fill: theme.palette.primary.main,\n \"& .min-icon\": {\n width: 120,\n },\n },\n middleComponent: {\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n });\n\nconst PageHeader = ({\n classes,\n label,\n actions,\n sidebarOpen,\n operatorMode,\n managerObjects,\n toggleList,\n middleComponent,\n}: IPageHeader) => {\n return (\n \n \n {!sidebarOpen && (\n
\n {operatorMode ? : }\n
\n )}\n \n {label}\n \n \n {middleComponent && (\n \n {middleComponent}\n \n )}\n \n {actions && actions}\n {managerObjects && managerObjects.length > 0 && (\n {\n toggleList();\n }}\n size=\"large\"\n >\n \n \n )}\n \n \n );\n};\n\nconst mapState = (state: AppState) => ({\n sidebarOpen: state.system.sidebarOpen,\n operatorMode: state.system.operatorMode,\n managerObjects: state.objectBrowser.objectManager.objectsToManage,\n});\n\nconst mapDispatchToProps = {\n toggleList,\n};\n\nconst connector = connect(mapState, mapDispatchToProps);\n\nexport default connector(withStyles(styles)(PageHeader));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { Opts } from \"../../../ListTenants/utils\";\nimport TenantSizeMK from \"./TenantSizeMK\";\n\nexport enum IMkEnvs {\n \"aws\",\n \"azure\",\n \"gcp\",\n \"default\",\n undefined,\n}\n\nexport interface IDriveSizing {\n driveSize: string;\n sizeUnit: string;\n}\n\nexport interface IntegrationConfiguration {\n typeSelection: string;\n storageClass: string;\n CPU: number;\n memory: number;\n drivesPerServer: number;\n driveSize: IDriveSizing;\n}\n\nexport const AWSStorageTypes: Opts[] = [\n { label: \"NVME\", value: \"nvme\" },\n { label: \"HDD\", value: \"hdd\" },\n];\n\nexport const AzureStorageTypes: Opts[] = [\n { label: \"Standard_L32s_v2\", value: \"Standard_L32s_v2\" },\n { label: \"Standard_L48s_v2\", value: \"Standard_L48s_v2\" },\n { label: \"Standard_L64s_v2\", value: \"Standard_L64s_v2\" },\n];\n\nexport const resourcesConfigurations = {\n \"mp-mode-aws\": IMkEnvs.aws,\n \"mp-mode-azure\": IMkEnvs.azure,\n \"mp-mode-gcp\": IMkEnvs.gcp,\n};\n\nexport const AWSConfigurations: IntegrationConfiguration[] = [\n {\n typeSelection: \"nvme\",\n storageClass: \"nvme-i3en-12xlarge\",\n CPU: 48,\n memory: 384,\n driveSize: { driveSize: \"7500\", sizeUnit: \"Gi\" },\n drivesPerServer: 4,\n },\n {\n typeSelection: \"hdd\",\n storageClass: \"hdd-d3en-12xlarge\",\n CPU: 8,\n memory: 32,\n driveSize: { driveSize: \"12.7\", sizeUnit: \"Ti\" },\n drivesPerServer: 4,\n },\n];\n\nexport const AzureConfigurations: IntegrationConfiguration[] = [\n {\n typeSelection: \"Standard_L8s_v2\",\n storageClass: \"local-nvme\",\n CPU: 8,\n memory: 64,\n driveSize: { driveSize: \"1787\", sizeUnit: \"Gi\" },\n drivesPerServer: 1,\n },\n {\n typeSelection: \"Standard_L16s_v2\",\n storageClass: \"local-nvme\",\n CPU: 16,\n memory: 128,\n driveSize: { driveSize: \"1787\", sizeUnit: \"Gi\" },\n drivesPerServer: 2,\n },\n {\n typeSelection: \"Standard_L32s_v2\",\n storageClass: \"local-nvme\",\n CPU: 32,\n memory: 256,\n driveSize: { driveSize: \"1787\", sizeUnit: \"Gi\" },\n drivesPerServer: 4,\n },\n {\n typeSelection: \"Standard_L48s_v2\",\n storageClass: \"local-nvme\",\n CPU: 48,\n memory: 384,\n driveSize: { driveSize: \"1787\", sizeUnit: \"Gi\" },\n drivesPerServer: 6,\n },\n {\n typeSelection: \"Standard_L64s_v2\",\n storageClass: \"local-nvme\",\n CPU: 64,\n memory: 512,\n driveSize: { driveSize: \"1787\", sizeUnit: \"Gi\" },\n drivesPerServer: 8,\n },\n];\n\nexport const GCPStorageTypes: Opts[] = [{ label: \"SSD\", value: \"ssd\" }];\n\nexport const GCPConfigurations: IntegrationConfiguration[] = [\n {\n typeSelection: \"ssd\",\n storageClass: \"local-ssd\",\n CPU: 32,\n memory: 128,\n driveSize: { driveSize: \"368\", sizeUnit: \"Gi\" },\n drivesPerServer: 24,\n },\n];\n\nexport const mkPanelConfigurations = {\n [IMkEnvs.aws]: {\n variantSelectorLabel: \"Storage Type\",\n variantSelectorValues: AWSStorageTypes,\n configurations: AWSConfigurations,\n sizingComponent: ,\n },\n [IMkEnvs.azure]: {\n variantSelectorLabel: \"VM Size\",\n variantSelectorValues: AzureStorageTypes,\n configurations: AzureConfigurations,\n sizingComponent: ,\n },\n [IMkEnvs.gcp]: {\n variantSelectorLabel: \"Storage Type\",\n variantSelectorValues: GCPStorageTypes,\n configurations: GCPConfigurations,\n sizingComponent: ,\n },\n [IMkEnvs.default]: {},\n [IMkEnvs.undefined]: {},\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Grid, Paper, SelectChangeEvent } from \"@mui/material\";\nimport {\n createTenantCommon,\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { isPageValid, updateAddField } from \"../../actions\";\nimport { AppState } from \"../../../../../store\";\nimport { clearValidationError } from \"../../utils\";\nimport {\n commonFormValidation,\n IValidation,\n} from \"../../../../../utils/validationFunctions\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport InputBoxWrapper from \"../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport { ISecurityContext } from \"../../types\";\n\ninterface IConfigureProps {\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n storageClasses: any;\n classes: any;\n customImage: boolean;\n imageName: string;\n customDockerhub: boolean;\n imageRegistry: string;\n imageRegistryUsername: string;\n imageRegistryPassword: string;\n exposeMinIO: boolean;\n exposeConsole: boolean;\n prometheusCustom: boolean;\n tenantCustom: boolean;\n logSearchCustom: boolean;\n logSearchVolumeSize: string;\n logSearchSizeFactor: string;\n prometheusVolumeSize: string;\n prometheusSizeFactor: string;\n logSearchSelectedStorageClass: string;\n logSearchImage: string;\n kesImage: string;\n logSearchPostgresImage: string;\n logSearchPostgresInitImage: string;\n prometheusSelectedStorageClass: string;\n prometheusImage: string;\n prometheusSidecarImage: string;\n prometheusInitImage: string;\n selectedStorageClass: string;\n tenantSecurityContext: ISecurityContext;\n logSearchSecurityContext: ISecurityContext;\n logSearchPostgresSecurityContext: ISecurityContext;\n prometheusSecurityContext: ISecurityContext;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n configSectionItem: {\n marginRight: 15,\n\n \"& .multiContainer\": {\n border: \"1px solid red\",\n },\n },\n tenantCustomizationFields: {\n marginLeft: 30, // 2nd Level(15+15)\n width: \"88%\",\n margin: \"auto\",\n },\n containerItem: {\n marginRight: 15,\n },\n fieldGroup: {\n ...createTenantCommon.fieldGroup,\n paddingTop: 15,\n marginBottom: 25,\n },\n responsiveSectionItem: {\n \"@media (max-width: 900px)\": {\n flexFlow: \"column\",\n alignItems: \"flex-start\",\n\n \"& div > div\": {\n marginBottom: 5,\n marginRight: 0,\n },\n },\n },\n\n logSearchCustomFields: {\n marginLeft: 20, // 2nd Level(15+15)\n padding: 10,\n width: \"90%\",\n margin: \"auto\",\n },\n fieldSpaceTop: {\n marginTop: 15,\n },\n prometheusCustomFields: {\n marginLeft: 20, // 2nd Level(15+15)\n padding: 10,\n width: \"90%\",\n margin: \"auto\",\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst Configure = ({\n classes,\n storageClasses,\n customImage,\n imageName,\n customDockerhub,\n imageRegistry,\n imageRegistryUsername,\n imageRegistryPassword,\n exposeMinIO,\n exposeConsole,\n prometheusCustom,\n tenantCustom,\n logSearchCustom,\n logSearchVolumeSize,\n logSearchSizeFactor,\n logSearchImage,\n kesImage,\n logSearchPostgresImage,\n logSearchPostgresInitImage,\n prometheusVolumeSize,\n prometheusSizeFactor,\n logSearchSelectedStorageClass,\n prometheusSelectedStorageClass,\n prometheusImage,\n prometheusSidecarImage,\n prometheusInitImage,\n updateAddField,\n isPageValid,\n selectedStorageClass,\n tenantSecurityContext,\n logSearchSecurityContext,\n logSearchPostgresSecurityContext,\n prometheusSecurityContext,\n}: IConfigureProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n\n const configureSTClasses = [\n { label: \"Default\", value: \"default\" },\n ...storageClasses,\n ];\n\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"configure\", field, value);\n },\n [updateAddField]\n );\n\n // Validation\n useEffect(() => {\n let customAccountValidation: IValidation[] = [];\n if (tenantCustom) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"tenant_securityContext_runAsUser\",\n required: true,\n value: tenantSecurityContext.runAsUser,\n customValidation:\n tenantSecurityContext.runAsUser === \"\" ||\n parseInt(tenantSecurityContext.runAsUser) < 0,\n customValidationMessage: `runAsUser must be present and be 0 or more`,\n },\n {\n fieldKey: \"tenant_securityContext_runAsGroup\",\n required: true,\n value: tenantSecurityContext.runAsGroup,\n customValidation:\n tenantSecurityContext.runAsGroup === \"\" ||\n parseInt(tenantSecurityContext.runAsGroup) < 0,\n customValidationMessage: `runAsGroup must be present and be 0 or more`,\n },\n {\n fieldKey: \"tenant_securityContext_fsGroup\",\n required: true,\n value: tenantSecurityContext.fsGroup,\n customValidation:\n tenantSecurityContext.fsGroup === \"\" ||\n parseInt(tenantSecurityContext.fsGroup) < 0,\n customValidationMessage: `fsGroup must be present and be 0 or more`,\n },\n ];\n }\n if (prometheusCustom) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"prometheus_storage_class\",\n required: true,\n value: prometheusSelectedStorageClass,\n customValidation: prometheusSelectedStorageClass === \"\",\n customValidationMessage: \"Field cannot be empty\",\n },\n {\n fieldKey: \"prometheus_volume_size\",\n required: true,\n value: prometheusVolumeSize,\n customValidation:\n prometheusVolumeSize === \"\" || parseInt(prometheusVolumeSize) <= 0,\n customValidationMessage: `Volume size must be present and be greater than 0`,\n },\n {\n fieldKey: \"prometheus_securityContext_runAsUser\",\n required: true,\n value: prometheusSecurityContext.runAsUser,\n customValidation:\n prometheusSecurityContext.runAsUser === \"\" ||\n parseInt(prometheusSecurityContext.runAsUser) < 0,\n customValidationMessage: `runAsUser must be present and be 0 or more`,\n },\n {\n fieldKey: \"prometheus_securityContext_runAsGroup\",\n required: true,\n value: prometheusSecurityContext.runAsGroup,\n customValidation:\n prometheusSecurityContext.runAsGroup === \"\" ||\n parseInt(prometheusSecurityContext.runAsGroup) < 0,\n customValidationMessage: `runAsGroup must be present and be 0 or more`,\n },\n {\n fieldKey: \"prometheus_securityContext_fsGroup\",\n required: true,\n value: prometheusSecurityContext.fsGroup,\n customValidation:\n prometheusSecurityContext.fsGroup === \"\" ||\n parseInt(prometheusSecurityContext.fsGroup) < 0,\n customValidationMessage: `fsGroup must be present and be 0 or more`,\n },\n ];\n }\n if (logSearchCustom) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"log_search_storage_class\",\n required: true,\n value: logSearchSelectedStorageClass,\n customValidation: logSearchSelectedStorageClass === \"\",\n customValidationMessage: \"Field cannot be empty\",\n },\n {\n fieldKey: \"log_search_volume_size\",\n required: true,\n value: logSearchVolumeSize,\n customValidation:\n logSearchVolumeSize === \"\" || parseInt(logSearchVolumeSize) <= 0,\n customValidationMessage: `Volume size must be present and be greatter than 0`,\n },\n {\n fieldKey: \"logSearch_securityContext_runAsUser\",\n required: true,\n value: logSearchSecurityContext.runAsUser,\n customValidation:\n logSearchSecurityContext.runAsUser === \"\" ||\n parseInt(logSearchSecurityContext.runAsUser) < 0,\n customValidationMessage: `runAsUser must be present and be 0 or more`,\n },\n {\n fieldKey: \"logSearch_securityContext_runAsGroup\",\n required: true,\n value: logSearchSecurityContext.runAsGroup,\n customValidation:\n logSearchSecurityContext.runAsGroup === \"\" ||\n parseInt(logSearchSecurityContext.runAsGroup) < 0,\n customValidationMessage: `runAsGroup must be present and be 0 or more`,\n },\n {\n fieldKey: \"logSearch_securityContext_fsGroup\",\n required: true,\n value: logSearchSecurityContext.fsGroup,\n customValidation:\n logSearchSecurityContext.fsGroup === \"\" ||\n parseInt(logSearchSecurityContext.fsGroup) < 0,\n customValidationMessage: `fsGroup must be present and be 0 or more`,\n },\n {\n fieldKey: \"postgres_securityContext_runAsUser\",\n required: true,\n value: logSearchPostgresSecurityContext.runAsUser,\n customValidation:\n logSearchPostgresSecurityContext.runAsUser === \"\" ||\n parseInt(logSearchPostgresSecurityContext.runAsUser) < 0,\n customValidationMessage: `runAsUser must be present and be 0 or more`,\n },\n {\n fieldKey: \"postgres_securityContext_runAsGroup\",\n required: true,\n value: prometheusSecurityContext.runAsGroup,\n customValidation:\n logSearchPostgresSecurityContext.runAsGroup === \"\" ||\n parseInt(logSearchPostgresSecurityContext.runAsGroup) < 0,\n customValidationMessage: `runAsGroup must be present and be 0 or more`,\n },\n {\n fieldKey: \"postgres_securityContext_fsGroup\",\n required: true,\n value: logSearchPostgresSecurityContext.fsGroup,\n customValidation:\n logSearchPostgresSecurityContext.fsGroup === \"\" ||\n parseInt(logSearchPostgresSecurityContext.fsGroup) < 0,\n customValidationMessage: `fsGroup must be present and be 0 or more`,\n },\n ];\n }\n\n if (customImage) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"image\",\n required: false,\n value: imageName,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage: \"Format must be of form: 'minio/minio:VERSION'\",\n },\n {\n fieldKey: \"logSearchImage\",\n required: false,\n value: logSearchImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'minio/logsearchapi:VERSION'\",\n },\n {\n fieldKey: \"kesImage\",\n required: false,\n value: kesImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage: \"Format must be of form: 'minio/kes:VERSION'\",\n },\n {\n fieldKey: \"logSearchPostgresImage\",\n required: false,\n value: logSearchPostgresImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'library/postgres:VERSION'\",\n },\n {\n fieldKey: \"logSearchPostgresInitImage\",\n required: false,\n value: logSearchPostgresInitImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'library/busybox:VERSION'\",\n },\n {\n fieldKey: \"prometheusImage\",\n required: false,\n value: prometheusImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'minio/prometheus:VERSION'\",\n },\n {\n fieldKey: \"prometheusSidecarImage\",\n required: false,\n value: prometheusSidecarImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'project/container:VERSION'\",\n },\n {\n fieldKey: \"prometheusInitImage\",\n required: false,\n value: prometheusInitImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'library/busybox:VERSION'\",\n },\n ];\n if (customDockerhub) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"registry\",\n required: true,\n value: imageRegistry,\n },\n {\n fieldKey: \"registryUsername\",\n required: true,\n value: imageRegistryUsername,\n },\n {\n fieldKey: \"registryPassword\",\n required: true,\n value: imageRegistryPassword,\n },\n ];\n }\n }\n\n const commonVal = commonFormValidation(customAccountValidation);\n\n isPageValid(\"configure\", Object.keys(commonVal).length === 0);\n\n setValidationErrors(commonVal);\n }, [\n customImage,\n imageName,\n logSearchImage,\n kesImage,\n logSearchPostgresImage,\n logSearchPostgresInitImage,\n prometheusImage,\n prometheusSidecarImage,\n prometheusInitImage,\n customDockerhub,\n imageRegistry,\n imageRegistryUsername,\n imageRegistryPassword,\n isPageValid,\n prometheusCustom,\n tenantCustom,\n logSearchCustom,\n prometheusSelectedStorageClass,\n prometheusVolumeSize,\n logSearchSelectedStorageClass,\n logSearchVolumeSize,\n tenantSecurityContext,\n logSearchSecurityContext,\n logSearchPostgresSecurityContext,\n prometheusSecurityContext,\n ]);\n\n useEffect(() => {\n // New default values in current selection is invalid\n if (storageClasses.length > 0) {\n const filterPrometheus = storageClasses.filter(\n (item: any) => item.value === prometheusSelectedStorageClass\n );\n if (filterPrometheus.length === 0) {\n updateField(\"prometheusSelectedStorageClass\", \"default\");\n }\n\n const filterLogSearch = storageClasses.filter(\n (item: any) => item.value === logSearchSelectedStorageClass\n );\n if (filterLogSearch.length === 0) {\n updateField(\"logSearchSelectedStorageClass\", \"default\");\n }\n }\n }, [\n logSearchSelectedStorageClass,\n prometheusSelectedStorageClass,\n selectedStorageClass,\n storageClasses,\n updateField,\n ]);\n\n const cleanValidation = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n return (\n \n
\n

Configure

\n \n Basic configurations for tenant management\n \n
\n
\n

Expose Services

\n \n Whether the tenant's services should request an external IP.\n \n
\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"exposeMinIO\", checked);\n }}\n label={\"Expose MiniO Service\"}\n />\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"exposeConsole\", checked);\n }}\n label={\"Expose Console Service\"}\n />\n \n\n
\n

Additional Configurations

\n \n Configure SecurityContext, Storage Classes & Storage size for Log\n Search, Prometheus add-ons and your Tenant\n \n
\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"tenantCustom\", checked);\n }}\n label={\"Override Tenant defaults\"}\n />\n \n {tenantCustom && (\n \n
\n \n SecurityContext for MinIO\n \n \n \n
\n ) => {\n updateField(\"tenantSecurityContext\", {\n ...tenantSecurityContext,\n runAsUser: e.target.value,\n });\n cleanValidation(\"tenant_securityContext_runAsUser\");\n }}\n label=\"Run As User\"\n value={tenantSecurityContext.runAsUser}\n required\n error={\n validationErrors[\"tenant_securityContext_runAsUser\"] || \"\"\n }\n min=\"0\"\n />\n
\n
\n ) => {\n updateField(\"tenantSecurityContext\", {\n ...tenantSecurityContext,\n runAsGroup: e.target.value,\n });\n cleanValidation(\"tenant_securityContext_runAsGroup\");\n }}\n label=\"Run As Group\"\n value={tenantSecurityContext.runAsGroup}\n required\n error={\n validationErrors[\"tenant_securityContext_runAsGroup\"] ||\n \"\"\n }\n min=\"0\"\n />\n
\n
\n ) => {\n updateField(\"tenantSecurityContext\", {\n ...tenantSecurityContext,\n fsGroup: e.target.value,\n });\n cleanValidation(\"tenant_securityContext_fsGroup\");\n }}\n label=\"FsGroup\"\n value={tenantSecurityContext.fsGroup}\n required\n error={\n validationErrors[\"tenant_securityContext_fsGroup\"] || \"\"\n }\n min=\"0\"\n />\n
\n \n
\n
\n \n
\n {\n const targetD = e.target;\n const checked = targetD.checked;\n updateField(\"tenantSecurityContext\", {\n ...tenantSecurityContext,\n runAsNonRoot: checked,\n });\n }}\n label={\"Do not run as Root\"}\n />\n
\n
\n
\n
\n )}\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"logSearchCustom\", checked);\n }}\n label={\"Override Log Search defaults\"}\n />\n \n {logSearchCustom && (\n \n \n ) => {\n updateField(\n \"logSearchSelectedStorageClass\",\n e.target.value as string\n );\n }}\n label=\"Log Search Storage Class\"\n value={logSearchSelectedStorageClass}\n options={configureSTClasses}\n disabled={configureSTClasses.length < 1}\n />\n \n \n
\n ) => {\n updateField(\"logSearchVolumeSize\", e.target.value);\n cleanValidation(\"log_search_volume_size\");\n }}\n label=\"Storage Size [Gi]\"\n value={logSearchVolumeSize}\n required\n error={validationErrors[\"log_search_volume_size\"] || \"\"}\n min=\"0\"\n />\n
\n
\n\n \n \n SecurityContext for LogSearch\n \n\n \n \n
\n ) => {\n updateField(\"logSearchSecurityContext\", {\n ...logSearchSecurityContext,\n runAsUser: e.target.value,\n });\n cleanValidation(\"logSearch_securityContext_runAsUser\");\n }}\n label=\"Run As User\"\n value={logSearchSecurityContext.runAsUser}\n required\n error={\n validationErrors[\"logSearch_securityContext_runAsUser\"] ||\n \"\"\n }\n min=\"0\"\n />\n
\n
\n ) => {\n updateField(\"logSearchSecurityContext\", {\n ...logSearchSecurityContext,\n runAsGroup: e.target.value,\n });\n cleanValidation(\"logSearch_securityContext_runAsGroup\");\n }}\n label=\"Run As Group\"\n value={logSearchSecurityContext.runAsGroup}\n required\n error={\n validationErrors[\n \"logSearch_securityContext_runAsGroup\"\n ] || \"\"\n }\n min=\"0\"\n />\n
\n
\n ) => {\n updateField(\"logSearchSecurityContext\", {\n ...logSearchSecurityContext,\n fsGroup: e.target.value,\n });\n cleanValidation(\"logSearch_securityContext_fsGroup\");\n }}\n label=\"FsGroup\"\n value={logSearchSecurityContext.fsGroup}\n required\n error={\n validationErrors[\"logSearch_securityContext_fsGroup\"] ||\n \"\"\n }\n min=\"0\"\n />\n
\n \n
\n
\n \n
\n {\n const targetD = e.target;\n const checked = targetD.checked;\n updateField(\"logSearchSecurityContext\", {\n ...logSearchSecurityContext,\n runAsNonRoot: checked,\n });\n }}\n label={\"Do not run as Root\"}\n />\n
\n
\n \n
\n \n SecurityContext for PostgreSQL\n \n\n \n \n
\n ) => {\n updateField(\"logSearchPostgresSecurityContext\", {\n ...logSearchPostgresSecurityContext,\n runAsUser: e.target.value,\n });\n cleanValidation(\"postgres_securityContext_runAsUser\");\n }}\n label=\"Run As User\"\n value={logSearchPostgresSecurityContext.runAsUser}\n required\n error={\n validationErrors[\"postgres_securityContext_runAsUser\"] ||\n \"\"\n }\n min=\"0\"\n />\n
\n
\n ) => {\n updateField(\"logSearchPostgresSecurityContext\", {\n ...logSearchPostgresSecurityContext,\n runAsGroup: e.target.value,\n });\n cleanValidation(\"postgres_securityContext_runAsGroup\");\n }}\n label=\"Run As Group\"\n value={logSearchPostgresSecurityContext.runAsGroup}\n required\n error={\n validationErrors[\"postgres_securityContext_runAsGroup\"] ||\n \"\"\n }\n min=\"0\"\n />\n
\n
\n ) => {\n updateField(\"logSearchPostgresSecurityContext\", {\n ...logSearchPostgresSecurityContext,\n fsGroup: e.target.value,\n });\n cleanValidation(\"postgres_securityContext_fsGroup\");\n }}\n label=\"FsGroup\"\n value={logSearchPostgresSecurityContext.fsGroup}\n required\n error={\n validationErrors[\"postgres_securityContext_fsGroup\"] || \"\"\n }\n min=\"0\"\n />\n
\n \n
\n
\n \n
\n {\n const targetD = e.target;\n const checked = targetD.checked;\n updateField(\"logSearchPostgresSecurityContext\", {\n ...logSearchPostgresSecurityContext,\n runAsNonRoot: checked,\n });\n }}\n label={\"Do not run as Root\"}\n />\n
\n
\n
\n
\n )}\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"prometheusCustom\", checked);\n }}\n label={\"Override Prometheus defaults\"}\n />\n \n {prometheusCustom && (\n \n \n ) => {\n updateField(\n \"prometheusSelectedStorageClass\",\n e.target.value as string\n );\n }}\n label=\"Prometheus Storage Class\"\n value={prometheusSelectedStorageClass}\n options={configureSTClasses}\n disabled={configureSTClasses.length < 1}\n />\n \n \n
\n ) => {\n updateField(\"prometheusVolumeSize\", e.target.value);\n cleanValidation(\"prometheus_volume_size\");\n }}\n label=\"Storage Size [Gi]\"\n value={prometheusVolumeSize}\n required\n error={validationErrors[\"prometheus_volume_size\"] || \"\"}\n min=\"0\"\n />\n
\n
\n \n \n SecurityContext for Prometheus\n \n \n \n
\n ) => {\n updateField(\"prometheusSecurityContext\", {\n ...prometheusSecurityContext,\n runAsUser: e.target.value,\n });\n cleanValidation(\"prometheus_securityContext_runAsUser\");\n }}\n label=\"Run As User\"\n value={prometheusSecurityContext.runAsUser}\n required\n error={\n validationErrors[\n \"prometheus_securityContext_runAsUser\"\n ] || \"\"\n }\n min=\"0\"\n />\n
\n
\n ) => {\n updateField(\"prometheusSecurityContext\", {\n ...prometheusSecurityContext,\n runAsGroup: e.target.value,\n });\n cleanValidation(\"prometheus_securityContext_runAsGroup\");\n }}\n label=\"Run As Group\"\n value={prometheusSecurityContext.runAsGroup}\n required\n error={\n validationErrors[\n \"prometheus_securityContext_runAsGroup\"\n ] || \"\"\n }\n min=\"0\"\n />\n
\n
\n ) => {\n updateField(\"prometheusSecurityContext\", {\n ...prometheusSecurityContext,\n fsGroup: e.target.value,\n });\n cleanValidation(\"prometheus_securityContext_fsGroup\");\n }}\n label=\"FsGroup\"\n value={prometheusSecurityContext.fsGroup}\n required\n error={\n validationErrors[\"prometheus_securityContext_fsGroup\"] ||\n \"\"\n }\n min=\"0\"\n />\n
\n \n
\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n updateField(\"prometheusSecurityContext\", {\n ...prometheusSecurityContext,\n runAsNonRoot: checked,\n });\n }}\n label={\"Do not run as Root\"}\n />\n \n \n \n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n storageClasses: state.tenants.createTenant.storageClasses,\n customImage: state.tenants.createTenant.fields.configure.customImage,\n imageName: state.tenants.createTenant.fields.configure.imageName,\n customDockerhub: state.tenants.createTenant.fields.configure.customDockerhub,\n imageRegistry: state.tenants.createTenant.fields.configure.imageRegistry,\n imageRegistryUsername:\n state.tenants.createTenant.fields.configure.imageRegistryUsername,\n imageRegistryPassword:\n state.tenants.createTenant.fields.configure.imageRegistryPassword,\n exposeMinIO: state.tenants.createTenant.fields.configure.exposeMinIO,\n exposeConsole: state.tenants.createTenant.fields.configure.exposeConsole,\n prometheusCustom:\n state.tenants.createTenant.fields.configure.prometheusCustom,\n tenantCustom: state.tenants.createTenant.fields.configure.tenantCustom,\n logSearchCustom: state.tenants.createTenant.fields.configure.logSearchCustom,\n logSearchVolumeSize:\n state.tenants.createTenant.fields.configure.logSearchVolumeSize,\n logSearchSizeFactor:\n state.tenants.createTenant.fields.configure.logSearchSizeFactor,\n prometheusVolumeSize:\n state.tenants.createTenant.fields.configure.prometheusVolumeSize,\n prometheusSizeFactor:\n state.tenants.createTenant.fields.configure.prometheusSizeFactor,\n logSearchSelectedStorageClass:\n state.tenants.createTenant.fields.configure.logSearchSelectedStorageClass,\n logSearchImage: state.tenants.createTenant.fields.configure.logSearchImage,\n kesImage: state.tenants.createTenant.fields.configure.kesImage,\n logSearchPostgresImage:\n state.tenants.createTenant.fields.configure.logSearchPostgresImage,\n logSearchPostgresInitImage:\n state.tenants.createTenant.fields.configure.logSearchPostgresInitImage,\n prometheusSelectedStorageClass:\n state.tenants.createTenant.fields.configure.prometheusSelectedStorageClass,\n prometheusImage: state.tenants.createTenant.fields.configure.prometheusImage,\n prometheusSidecarImage:\n state.tenants.createTenant.fields.configure.prometheusSidecarImage,\n prometheusInitImage:\n state.tenants.createTenant.fields.configure.prometheusInitImage,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n tenantSecurityContext:\n state.tenants.createTenant.fields.configure.tenantSecurityContext,\n logSearchSecurityContext:\n state.tenants.createTenant.fields.configure.logSearchSecurityContext,\n logSearchPostgresSecurityContext:\n state.tenants.createTenant.fields.configure\n .logSearchPostgresSecurityContext,\n prometheusSecurityContext:\n state.tenants.createTenant.fields.configure.prometheusSecurityContext,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(Configure));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Grid, IconButton, Paper, Tooltip, Typography } from \"@mui/material\";\nimport CasinoIcon from \"@mui/icons-material/Casino\";\nimport DeleteIcon from \"@mui/icons-material/Delete\";\nimport {\n createTenantCommon,\n formFieldStyles,\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { isPageValid, updateAddField } from \"../../actions\";\nimport {\n commonFormValidation,\n IValidation,\n} from \"../../../../../utils/validationFunctions\";\nimport { AppState } from \"../../../../../store\";\nimport { clearValidationError, getRandomString } from \"../../utils\";\nimport RadioGroupSelector from \"../../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport InputBoxWrapper from \"../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport AddIcon from \"@mui/icons-material/Add\";\nimport RemoveIcon from \"../../../../../icons/RemoveIcon\";\n\ninterface IIdentityProviderProps {\n classes: any;\n idpSelection: string;\n accessKeys: string[];\n secretKeys: string[];\n openIDConfigurationURL: string;\n openIDClientID: string;\n openIDSecretID: string;\n openIDCallbackURL: string;\n openIDClaimName: string;\n openIDScopes: string;\n ADURL: string;\n ADSkipTLS: boolean;\n ADServerInsecure: boolean;\n ADUserNameSearchFilter: string;\n ADGroupSearchBaseDN: string;\n ADGroupSearchFilter: string;\n ADGroupNameAttribute: string;\n ADUserDNs: string[];\n ADUserNameFormat: string;\n ADLookupBindDN: string;\n ADLookupBindPassword: string;\n ADUserDNSearchBaseDN: string;\n ADUserDNSearchFilter: string;\n ADServerStartTLS: boolean;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n shortened: {\n gridTemplateColumns: \"auto auto 50px 50px\",\n display: \"grid\",\n gridGap: 15,\n marginBottom: 10,\n \"& input\": {\n fontWeight: 400,\n },\n },\n buttonTray: {\n marginLeft: 10,\n display: \"flex\",\n height: 38,\n \"& button\": {\n background: \"#EAEAEA\",\n },\n },\n overlayAction: {\n marginLeft: 10,\n \"& svg\": {\n maxWidth: 15,\n maxHeight: 15,\n },\n \"& button\": {\n background: \"#EAEAEA\",\n },\n },\n protocolRadioOptions: {\n display: \"flex\",\n flexFlow: \"column\",\n marginBottom: 10,\n\n \"& label\": {\n fontSize: 14,\n },\n \"& div\": {\n display: \"flex\",\n flexFlow: \"column\",\n alignItems: \"baseline\",\n },\n },\n adUserDnRows: {\n display: \"flex\",\n },\n ...createTenantCommon,\n ...formFieldStyles,\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst IdentityProvider = ({\n classes,\n idpSelection,\n accessKeys,\n secretKeys,\n openIDConfigurationURL,\n openIDClientID,\n openIDSecretID,\n openIDCallbackURL,\n openIDClaimName,\n openIDScopes,\n ADURL,\n ADSkipTLS,\n ADServerInsecure,\n ADUserNameSearchFilter,\n ADGroupSearchBaseDN,\n ADGroupSearchFilter,\n ADGroupNameAttribute,\n ADUserDNs,\n ADUserNameFormat,\n ADLookupBindDN,\n ADLookupBindPassword,\n ADUserDNSearchBaseDN,\n ADUserDNSearchFilter,\n ADServerStartTLS,\n updateAddField,\n isPageValid,\n}: IIdentityProviderProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"identityProvider\", field, value);\n },\n [updateAddField]\n );\n const updateUserField = (index: number, value: string) => {\n const newUserField = [...accessKeys];\n newUserField[index] = value;\n updateField(\"accessKeys\", newUserField);\n };\n const updatePwordField = (index: number, value: string) => {\n const newUserField = [...secretKeys];\n newUserField[index] = value;\n updateField(\"secretKeys\", newUserField);\n };\n const updateADUserField = (index: number, value: string) => {\n const newADUserDNsField = [...ADUserDNs];\n newADUserDNsField[index] = value;\n updateField(\"ADUserDNs\", newADUserDNsField);\n };\n const cleanValidation = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n // Validation\n\n useEffect(() => {\n let customIDPValidation: IValidation[] = [];\n\n if (idpSelection === \"Built-in\") {\n customIDPValidation = [...customIDPValidation];\n for (var i = 0; i < accessKeys.length; i++) {\n customIDPValidation.push({\n fieldKey: `accesskey-${i.toString()}`,\n required: true,\n value: accessKeys[i],\n pattern: /^[a-zA-Z0-9-]{8,63}$/,\n customPatternMessage: \"Keys must be at least length 8\",\n });\n customIDPValidation.push({\n fieldKey: `secretkey-${i.toString()}`,\n required: true,\n value: secretKeys[i],\n pattern: /^[a-zA-Z0-9-]{8,63}$/,\n customPatternMessage: \"Keys must be at least length 8\",\n });\n }\n }\n\n if (idpSelection === \"OpenID\") {\n customIDPValidation = [\n ...customIDPValidation,\n {\n fieldKey: \"openID_CONFIGURATION_URL\",\n required: true,\n value: openIDConfigurationURL,\n },\n {\n fieldKey: \"openID_clientID\",\n required: true,\n value: openIDClientID,\n },\n {\n fieldKey: \"openID_secretID\",\n required: true,\n value: openIDSecretID,\n },\n {\n fieldKey: \"openID_claimName\",\n required: true,\n value: openIDClaimName,\n },\n ];\n }\n\n if (idpSelection === \"AD\") {\n customIDPValidation = [\n ...customIDPValidation,\n {\n fieldKey: \"AD_URL\",\n required: true,\n value: ADURL,\n },\n ];\n // validate user DNs\n for (let i = 0; i < ADUserDNs.length; i++) {\n customIDPValidation.push({\n fieldKey: `ad-userdn-${i.toString()}`,\n required: true,\n value: ADUserDNs[i],\n });\n }\n }\n\n const commonVal = commonFormValidation(customIDPValidation);\n\n isPageValid(\"identityProvider\", Object.keys(commonVal).length === 0);\n\n setValidationErrors(commonVal);\n }, [\n idpSelection,\n accessKeys,\n secretKeys,\n openIDClientID,\n openIDSecretID,\n ADURL,\n ADUserNameSearchFilter,\n ADGroupSearchBaseDN,\n ADGroupSearchFilter,\n ADGroupNameAttribute,\n ADUserDNs,\n isPageValid,\n openIDConfigurationURL,\n openIDClaimName,\n ]);\n let inputs = null;\n if (idpSelection === \"Built-in\") {\n inputs = accessKeys.map((_, index) => {\n return (\n \n
\n ) => {\n updateUserField(index, e.target.value);\n cleanValidation(`accesskey-${index.toString()}`);\n }}\n index={index}\n key={`csv-accesskey-${index.toString()}`}\n error={validationErrors[`accesskey-${index.toString()}`] || \"\"}\n />\n ) => {\n updatePwordField(index, e.target.value);\n cleanValidation(`secretkey-${index.toString()}`);\n }}\n index={index}\n key={`csv-secretkey-${index.toString()}`}\n error={validationErrors[`secretkey-${index.toString()}`] || \"\"}\n />\n
\n \n
\n {\n accessKeys.push(\"\");\n secretKeys.push(\"\");\n updateUserField(accessKeys.length - 1, \"\");\n updatePwordField(secretKeys.length - 1, \"\");\n }}\n >\n \n \n
\n
\n \n
\n {\n if (accessKeys.length > 1) {\n accessKeys.splice(index, 1);\n secretKeys.splice(index, 1);\n updateUserField(\n accessKeys.length - 1,\n accessKeys[accessKeys.length - 1]\n );\n }\n }}\n >\n \n \n
\n
\n \n
\n {\n updateUserField(index, getRandomString(16));\n updatePwordField(index, getRandomString(32));\n }}\n size={\"small\"}\n >\n \n \n
\n
\n
\n
\n
\n );\n });\n }\n if (idpSelection === \"AD\") {\n inputs = ADUserDNs.map((_, index) => {\n return (\n \n
\n ) => {\n updateADUserField(index, e.target.value);\n cleanValidation(`ad-userdn-${index.toString()}`);\n }}\n index={index}\n key={`csv-ad-userdn-${index.toString()}`}\n error={validationErrors[`ad-userdn-${index.toString()}`] || \"\"}\n />\n
\n \n {\n ADUserDNs.push(\"\");\n updateADUserField(ADUserDNs.length - 1, \"\");\n }}\n >\n \n \n \n \n {\n if (ADUserDNs.length > 1) {\n ADUserDNs.splice(index, 1);\n updateUserField(\n ADUserDNs.length - 1,\n ADUserDNs[ADUserDNs.length - 1]\n );\n }\n }}\n >\n \n \n \n
\n
\n
\n );\n });\n }\n return (\n \n
\n

Identity Provider

\n \n Access to the tenant can be controlled via an external Identity\n Manager.\n \n
\n \n \n {\n updateField(\"idpSelection\", e.target.value);\n }}\n selectorOptions={[\n { label: \"Built-in\", value: \"Built-in\" },\n { label: \"OpenID\", value: \"OpenID\" },\n { label: \"Active Directory\", value: \"AD\" },\n ]}\n />\n \n {idpSelection === \"Built-in\" && (\n \n Add additional users\n {inputs}\n \n )}\n {idpSelection === \"OpenID\" && (\n \n \n ) => {\n updateField(\"openIDConfigurationURL\", e.target.value);\n cleanValidation(\"openID_CONFIGURATION_URL\");\n }}\n label=\"Configuration URL\"\n value={openIDConfigurationURL}\n placeholder=\"https://your-identity-provider.com/.well-known/openid-configuration\"\n error={validationErrors[\"openID_CONFIGURATION_URL\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"openIDClientID\", e.target.value);\n cleanValidation(\"openID_clientID\");\n }}\n label=\"Client ID\"\n value={openIDClientID}\n error={validationErrors[\"openID_clientID\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"openIDSecretID\", e.target.value);\n cleanValidation(\"openID_secretID\");\n }}\n label=\"Secret ID\"\n value={openIDSecretID}\n error={validationErrors[\"openID_secretID\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"openIDCallbackURL\", e.target.value);\n cleanValidation(\"openID_callbackURL\");\n }}\n label=\"Callback URL\"\n value={openIDCallbackURL}\n placeholder=\"https://your-console-endpoint:9443/oauth_callback\"\n error={validationErrors[\"openID_callbackURL\"] || \"\"}\n />\n \n \n ) => {\n updateField(\"openIDClaimName\", e.target.value);\n cleanValidation(\"openID_claimName\");\n }}\n label=\"Claim Name\"\n value={openIDClaimName}\n error={validationErrors[\"openID_claimName\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"openIDScopes\", e.target.value);\n cleanValidation(\"openID_scopes\");\n }}\n label=\"Scopes\"\n value={openIDScopes}\n />\n \n \n )}\n {idpSelection === \"AD\" && (\n \n \n ) => {\n updateField(\"ADURL\", e.target.value);\n cleanValidation(\"AD_URL\");\n }}\n label=\"LDAP Server Address\"\n value={ADURL}\n placeholder=\"ldap-server:636\"\n error={validationErrors[\"AD_URL\"] || \"\"}\n required\n />\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n updateField(\"ADSkipTLS\", checked);\n }}\n label={\"Skip TLS Verification\"}\n />\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n updateField(\"ADServerInsecure\", checked);\n }}\n label={\"Server Insecure\"}\n />\n \n {ADServerInsecure ? (\n \n \n Warning: All traffic with Active Directory will be unencrypted\n \n
\n
\n ) : null}\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n updateField(\"ADServerStartTLS\", checked);\n }}\n label={\"Start TLS connection to AD/LDAP server\"}\n />\n \n \n ) => {\n updateField(\"ADUserNameFormat\", e.target.value);\n }}\n label=\"Username Format\"\n value={ADUserNameFormat}\n placeholder=\"uid=%s,cn=accounts,dc=myldapserver,dc=com\"\n />\n \n \n ) => {\n updateField(\"ADUserNameSearchFilter\", e.target.value);\n }}\n label=\"Username Search Filter\"\n value={ADUserNameSearchFilter}\n placeholder=\"(|(objectclass=posixAccount)(uid=%s))\"\n />\n \n \n ) => {\n updateField(\"ADGroupSearchBaseDN\", e.target.value);\n }}\n label=\"Group Search Base DN\"\n value={ADGroupSearchBaseDN}\n placeholder=\"ou=hwengg,dc=min,dc=io;ou=swengg,dc=min,dc=io\"\n />\n \n \n ) => {\n updateField(\"ADGroupSearchFilter\", e.target.value);\n }}\n label=\"Group Search Filter\"\n value={ADGroupSearchFilter}\n placeholder=\"(&(objectclass=groupOfNames)(member=%s))\"\n />\n \n \n ) => {\n updateField(\"ADGroupNameAttribute\", e.target.value);\n }}\n label=\"Group Name Attribute\"\n value={ADGroupNameAttribute}\n placeholder=\"cn\"\n />\n \n \n ) => {\n updateField(\"ADLookupBindDN\", e.target.value);\n }}\n label=\"Lookup Bind DN\"\n value={ADLookupBindDN}\n placeholder=\"cn=admin,dc=min,dc=io\"\n />\n \n \n ) => {\n updateField(\"ADLookupBindPassword\", e.target.value);\n }}\n label=\"Lookup Bind Password\"\n value={ADLookupBindPassword}\n placeholder=\"admin\"\n />\n \n \n ) => {\n updateField(\"ADUserDNSearchBaseDN\", e.target.value);\n }}\n label=\"User DN Search Base DN\"\n value={ADUserDNSearchBaseDN}\n placeholder=\"dc=min,dc=io\"\n />\n \n \n ) => {\n updateField(\"ADUserDNSearchFilter\", e.target.value);\n }}\n label=\"User DN Search Filter\"\n value={ADUserDNSearchFilter}\n placeholder=\"(uid=%s)\"\n />\n \n
\n \n List of user DNs (Distinguished Names) to be Tenant Administrators\n \n \n {inputs}\n \n
\n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n idpSelection: state.tenants.createTenant.fields.identityProvider.idpSelection,\n accessKeys: state.tenants.createTenant.fields.identityProvider.accessKeys,\n secretKeys: state.tenants.createTenant.fields.identityProvider.secretKeys,\n openIDConfigurationURL:\n state.tenants.createTenant.fields.identityProvider.openIDConfigurationURL,\n openIDClientID:\n state.tenants.createTenant.fields.identityProvider.openIDClientID,\n openIDSecretID:\n state.tenants.createTenant.fields.identityProvider.openIDSecretID,\n openIDCallbackURL:\n state.tenants.createTenant.fields.identityProvider.openIDCallbackURL,\n openIDClaimName:\n state.tenants.createTenant.fields.identityProvider.openIDClaimName,\n openIDScopes: state.tenants.createTenant.fields.identityProvider.openIDScopes,\n ADURL: state.tenants.createTenant.fields.identityProvider.ADURL,\n ADSkipTLS: state.tenants.createTenant.fields.identityProvider.ADSkipTLS,\n ADServerInsecure:\n state.tenants.createTenant.fields.identityProvider.ADServerInsecure,\n ADUserNameSearchFilter:\n state.tenants.createTenant.fields.identityProvider.ADUserNameSearchFilter,\n ADGroupSearchBaseDN:\n state.tenants.createTenant.fields.identityProvider.ADGroupSearchBaseDN,\n ADGroupSearchFilter:\n state.tenants.createTenant.fields.identityProvider.ADGroupSearchFilter,\n ADGroupNameAttribute:\n state.tenants.createTenant.fields.identityProvider.ADGroupNameAttribute,\n ADUserDNs: state.tenants.createTenant.fields.identityProvider.ADUserDNs,\n ADUserNameFormat:\n state.tenants.createTenant.fields.identityProvider.ADUserNameFormat,\n ADLookupBindDN:\n state.tenants.createTenant.fields.identityProvider.ADLookupBindDN,\n ADLookupBindPassword:\n state.tenants.createTenant.fields.identityProvider.ADLookupBindPassword,\n ADUserDNSearchBaseDN:\n state.tenants.createTenant.fields.identityProvider.ADUserDNSearchBaseDN,\n ADUserDNSearchFilter:\n state.tenants.createTenant.fields.identityProvider.ADUserDNSearchFilter,\n ADServerStartTLS:\n state.tenants.createTenant.fields.identityProvider.ADServerStartTLS,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(IdentityProvider));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Grid, IconButton, Paper, Typography } from \"@mui/material\";\nimport {\n createTenantCommon,\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport {\n addCaCertificate,\n addFileToCaCertificates,\n addFileToKeyPair,\n addKeyPair,\n deleteCaCertificate,\n deleteKeyPair,\n isPageValid,\n updateAddField,\n} from \"../../actions\";\nimport { AppState } from \"../../../../../store\";\nimport { KeyPair } from \"../../ListTenants/utils\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport FileSelector from \"../../../Common/FormComponents/FileSelector/FileSelector\";\nimport AddIcon from \"../../../../../icons/AddIcon\";\nimport RemoveIcon from \"../../../../../icons/RemoveIcon\";\n\ninterface ISecurityProps {\n classes: any;\n enableTLS: boolean;\n enableAutoCert: boolean;\n enableCustomCerts: boolean;\n minioCertificates: KeyPair[];\n caCertificates: KeyPair[];\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n addFileToCaCertificates: typeof addFileToCaCertificates;\n deleteCaCertificate: typeof deleteCaCertificate;\n addCaCertificate: typeof addCaCertificate;\n addKeyPair: typeof addKeyPair;\n addFileToKeyPair: typeof addFileToKeyPair;\n deleteKeyPair: typeof deleteKeyPair;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n minioCertificateRows: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n borderBottom: \"1px solid #EAEAEA\",\n \"&:last-child\": {\n borderBottom: 0,\n },\n \"@media (max-width: 900px)\": {\n flex: 1,\n },\n },\n fileItem: {\n marginRight: 10,\n display: \"flex\",\n \"& div label\": {\n minWidth: 50,\n },\n\n \"@media (max-width: 900px)\": {\n flexFlow: \"column\",\n },\n },\n minioCertsContainer: {\n marginBottom: 15,\n },\n minioCACertsRow: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n\n borderBottom: \"1px solid #EAEAEA\",\n \"&:last-child\": {\n borderBottom: 0,\n },\n \"@media (max-width: 900px)\": {\n flex: 1,\n\n \"& div label\": {\n minWidth: 50,\n },\n },\n },\n rowActions: {\n display: \"flex\",\n justifyContent: \"flex-end\",\n \"@media (max-width: 900px)\": {\n flex: 1,\n },\n },\n overlayAction: {\n marginLeft: 10,\n \"& svg\": {\n maxWidth: 15,\n maxHeight: 15,\n },\n \"& button\": {\n background: \"#EAEAEA\",\n },\n },\n\n ...createTenantCommon,\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst Security = ({\n classes,\n enableTLS,\n enableAutoCert,\n enableCustomCerts,\n minioCertificates,\n caCertificates,\n updateAddField,\n isPageValid,\n addFileToCaCertificates,\n deleteCaCertificate,\n addCaCertificate,\n addKeyPair,\n addFileToKeyPair,\n deleteKeyPair,\n}: ISecurityProps) => {\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"security\", field, value);\n },\n [updateAddField]\n );\n\n // Validation\n\n useEffect(() => {\n if (!enableTLS) {\n isPageValid(\"security\", true);\n return;\n }\n if (enableAutoCert) {\n isPageValid(\"security\", true);\n return;\n }\n if (enableCustomCerts) {\n isPageValid(\"security\", true);\n return;\n }\n isPageValid(\"security\", false);\n }, [enableTLS, enableAutoCert, enableCustomCerts, isPageValid]);\n\n return (\n \n
\n

Security

\n
\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"enableTLS\", checked);\n }}\n label={\"Enable TLS\"}\n />\n Enable TLS for the tenant, this is required for Encryption Configuration\n {enableTLS && (\n \n
\n
\n \n AutoCert: MinIO Operator will generate all TLS certificates\n automatically\n \n \n Custom certificates: Allow user to provide your own certificates\n \n
\n
\n )}\n
\n {enableTLS && (\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"enableAutoCert\", checked);\n }}\n label={\"Enable AutoCert\"}\n />\n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"enableCustomCerts\", checked);\n }}\n label={\"Custom Certificates\"}\n />\n \n {enableCustomCerts && (\n \n \n \n
\n \n MinIO Certificates\n \n {minioCertificates.map((keyPair: KeyPair) => (\n \n \n {\n addFileToKeyPair(\n keyPair.id,\n \"cert\",\n fileName,\n encodedValue\n );\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"tlsCert\"\n name=\"tlsCert\"\n label=\"Cert\"\n value={keyPair.cert}\n />\n {\n addFileToKeyPair(\n keyPair.id,\n \"key\",\n fileName,\n encodedValue\n );\n }}\n accept=\".key,.pem\"\n id=\"tlsKey\"\n name=\"tlsKey\"\n label=\"Key\"\n value={keyPair.key}\n />\n \n\n \n
\n \n \n \n
\n
\n {\n deleteKeyPair(keyPair.id);\n }}\n >\n \n \n
\n
\n \n ))}\n
\n
\n
\n\n \n \n
\n \n MinIO CA Certificates\n \n\n {caCertificates.map((keyPair: KeyPair) => (\n \n \n {\n addFileToCaCertificates(\n keyPair.id,\n \"cert\",\n fileName,\n encodedValue\n );\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"tlsCert\"\n name=\"tlsCert\"\n label=\"Cert\"\n value={keyPair.cert}\n />\n \n \n
\n
\n \n \n \n
\n
\n {\n deleteCaCertificate(keyPair.id);\n }}\n >\n \n \n
\n
\n
\n \n ))}\n
\n
\n
\n
\n )}\n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n enableTLS: state.tenants.createTenant.fields.security.enableTLS,\n enableAutoCert: state.tenants.createTenant.fields.security.enableAutoCert,\n enableCustomCerts:\n state.tenants.createTenant.fields.security.enableCustomCerts,\n minioCertificates: state.tenants.createTenant.certificates.minioCertificates,\n caCertificates: state.tenants.createTenant.certificates.caCertificates,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n addFileToCaCertificates,\n deleteCaCertificate,\n addCaCertificate,\n addKeyPair,\n addFileToKeyPair,\n deleteKeyPair,\n});\n\nexport default withStyles(styles)(connector(Security));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Paper } from \"@mui/material\";\nimport Grid from \"@mui/material/Grid\";\nimport {\n addFileClientCert,\n addFileGemaltoCa,\n addFileServerCert,\n addFileVaultCa,\n addFileVaultCert,\n isPageValid,\n updateAddField,\n} from \"../../actions\";\nimport {\n createTenantCommon,\n formFieldStyles,\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { AppState } from \"../../../../../store\";\nimport { clearValidationError } from \"../../utils\";\nimport InputBoxWrapper from \"../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport FileSelector from \"../../../Common/FormComponents/FileSelector/FileSelector\";\nimport RadioGroupSelector from \"../../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport {\n commonFormValidation,\n IValidation,\n} from \"../../../../../utils/validationFunctions\";\nimport { KeyPair } from \"../../ListTenants/utils\";\nimport { ISecurityContext } from \"../../types\";\n\ninterface IEncryptionProps {\n classes: any;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n addFileServerCert: typeof addFileServerCert;\n addFileClientCert: typeof addFileClientCert;\n addFileVaultCert: typeof addFileVaultCert;\n addFileVaultCa: typeof addFileVaultCa;\n addFileGemaltoCa: typeof addFileGemaltoCa;\n enableEncryption: boolean;\n encryptionType: string;\n gemaltoEndpoint: string;\n gemaltoToken: string;\n gemaltoDomain: string;\n gemaltoRetry: string;\n awsEndpoint: string;\n awsRegion: string;\n awsKMSKey: string;\n awsAccessKey: string;\n awsSecretKey: string;\n awsToken: string;\n vaultEndpoint: string;\n vaultEngine: string;\n vaultNamespace: string;\n vaultPrefix: string;\n vaultAppRoleEngine: string;\n vaultId: string;\n vaultSecret: string;\n vaultRetry: string;\n vaultPing: string;\n azureEndpoint: string;\n azureTenantID: string;\n azureClientID: string;\n azureClientSecret: string;\n gcpProjectID: string;\n gcpEndpoint: string;\n gcpClientEmail: string;\n gcpClientID: string;\n gcpPrivateKeyID: string;\n gcpPrivateKey: string;\n enableCustomCertsForKES: boolean;\n enableAutoCert: boolean;\n enableTLS: boolean;\n enableCustomCerts: boolean;\n minioCertificates: KeyPair[];\n serverCertificate: KeyPair;\n clientCertificate: KeyPair;\n vaultCertificate: KeyPair;\n vaultCA: KeyPair;\n gemaltoCA: KeyPair;\n kesSecurityContext: ISecurityContext;\n replicas: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n encryptionTypeOptions: {\n marginBottom: 15,\n },\n mutualTlsConfig: {\n marginTop: 15,\n \"& fieldset\": {\n flex: 1,\n },\n },\n rightSpacer: {\n marginRight: 15,\n },\n responsiveContainer: {\n \"@media (max-width: 900px)\": {\n display: \"flex\",\n flexFlow: \"column\",\n },\n },\n ...createTenantCommon,\n ...formFieldStyles,\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst Encryption = ({\n classes,\n updateAddField,\n isPageValid,\n addFileServerCert,\n addFileClientCert,\n addFileVaultCert,\n addFileVaultCa,\n addFileGemaltoCa,\n enableEncryption,\n enableCustomCerts,\n encryptionType,\n gemaltoEndpoint,\n gemaltoToken,\n gemaltoDomain,\n gemaltoRetry,\n awsEndpoint,\n awsRegion,\n awsKMSKey,\n awsAccessKey,\n awsSecretKey,\n awsToken,\n vaultEndpoint,\n vaultEngine,\n vaultNamespace,\n vaultPrefix,\n vaultAppRoleEngine,\n vaultId,\n vaultSecret,\n vaultRetry,\n vaultPing,\n azureEndpoint,\n azureTenantID,\n azureClientID,\n azureClientSecret,\n gcpProjectID,\n gcpEndpoint,\n gcpClientEmail,\n gcpClientID,\n gcpPrivateKeyID,\n gcpPrivateKey,\n enableCustomCertsForKES,\n enableAutoCert,\n enableTLS,\n minioCertificates,\n serverCertificate,\n clientCertificate,\n vaultCertificate,\n vaultCA,\n gemaltoCA,\n kesSecurityContext,\n replicas,\n}: IEncryptionProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n\n let encryptionAvailable = false;\n if (\n enableTLS &&\n (enableAutoCert ||\n (minioCertificates &&\n minioCertificates.filter(\n (item) => item.encoded_key && item.encoded_cert\n ).length > 0))\n ) {\n encryptionAvailable = true;\n }\n\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"encryption\", field, value);\n },\n [updateAddField]\n );\n\n const cleanValidation = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n // Validation\n useEffect(() => {\n let encryptionValidation: IValidation[] = [];\n\n if (enableEncryption) {\n encryptionValidation = [\n ...encryptionValidation,\n {\n fieldKey: \"replicas\",\n required: true,\n value: replicas,\n customValidation: parseInt(replicas) < 1,\n customValidationMessage: \"Replicas needs to be 1 or greater\",\n },\n {\n fieldKey: \"kes_securityContext_runAsUser\",\n required: true,\n value: kesSecurityContext.runAsUser,\n customValidation:\n kesSecurityContext.runAsUser === \"\" ||\n parseInt(kesSecurityContext.runAsUser) < 0,\n customValidationMessage: `runAsUser must be present and be 0 or more`,\n },\n {\n fieldKey: \"kes_securityContext_runAsGroup\",\n required: true,\n value: kesSecurityContext.runAsGroup,\n customValidation:\n kesSecurityContext.runAsGroup === \"\" ||\n parseInt(kesSecurityContext.runAsGroup) < 0,\n customValidationMessage: `runAsGroup must be present and be 0 or more`,\n },\n {\n fieldKey: \"kes_securityContext_fsGroup\",\n required: true,\n value: kesSecurityContext.fsGroup,\n customValidation:\n kesSecurityContext.fsGroup === \"\" ||\n parseInt(kesSecurityContext.fsGroup) < 0,\n customValidationMessage: `fsGroup must be present and be 0 or more`,\n },\n ];\n\n if (enableCustomCerts) {\n encryptionValidation = [\n ...encryptionValidation,\n {\n fieldKey: \"serverKey\",\n required: !enableAutoCert,\n value: serverCertificate.encoded_key,\n },\n {\n fieldKey: \"serverCert\",\n required: !enableAutoCert,\n value: serverCertificate.encoded_cert,\n },\n {\n fieldKey: \"clientKey\",\n required: !enableAutoCert,\n value: clientCertificate.encoded_key,\n },\n {\n fieldKey: \"clientCert\",\n required: !enableAutoCert,\n value: clientCertificate.encoded_cert,\n },\n ];\n }\n\n if (encryptionType === \"vault\") {\n encryptionValidation = [\n ...encryptionValidation,\n {\n fieldKey: \"vault_endpoint\",\n required: true,\n value: vaultEndpoint,\n },\n {\n fieldKey: \"vault_id\",\n required: true,\n value: vaultId,\n },\n {\n fieldKey: \"vault_secret\",\n required: true,\n value: vaultSecret,\n },\n {\n fieldKey: \"vault_ping\",\n required: false,\n value: vaultPing,\n customValidation: parseInt(vaultPing) < 0,\n customValidationMessage: \"Value needs to be 0 or greater\",\n },\n {\n fieldKey: \"vault_retry\",\n required: false,\n value: vaultRetry,\n customValidation: parseInt(vaultRetry) < 0,\n customValidationMessage: \"Value needs to be 0 or greater\",\n },\n ];\n }\n\n if (encryptionType === \"aws\") {\n encryptionValidation = [\n ...encryptionValidation,\n {\n fieldKey: \"aws_endpoint\",\n required: true,\n value: awsEndpoint,\n },\n {\n fieldKey: \"aws_region\",\n required: true,\n value: awsRegion,\n },\n {\n fieldKey: \"aws_accessKey\",\n required: true,\n value: awsAccessKey,\n },\n {\n fieldKey: \"aws_secretKey\",\n required: true,\n value: awsSecretKey,\n },\n ];\n }\n\n if (encryptionType === \"gemalto\") {\n encryptionValidation = [\n ...encryptionValidation,\n {\n fieldKey: \"gemalto_endpoint\",\n required: true,\n value: gemaltoEndpoint,\n },\n {\n fieldKey: \"gemalto_token\",\n required: true,\n value: gemaltoToken,\n },\n {\n fieldKey: \"gemalto_domain\",\n required: true,\n value: gemaltoDomain,\n },\n {\n fieldKey: \"gemalto_retry\",\n required: false,\n value: gemaltoRetry,\n customValidation: parseInt(gemaltoRetry) < 0,\n customValidationMessage: \"Value needs to be 0 or greater\",\n },\n ];\n }\n\n if (encryptionType === \"azure\") {\n encryptionValidation = [\n ...encryptionValidation,\n {\n fieldKey: \"azure_endpoint\",\n required: true,\n value: azureEndpoint,\n },\n {\n fieldKey: \"azure_tenant_id\",\n required: true,\n value: azureTenantID,\n },\n {\n fieldKey: \"azure_client_id\",\n required: true,\n value: azureClientID,\n },\n {\n fieldKey: \"azure_client_secret\",\n required: true,\n value: azureClientSecret,\n },\n ];\n }\n }\n\n const commonVal = commonFormValidation(encryptionValidation);\n\n isPageValid(\"encryption\", Object.keys(commonVal).length === 0);\n\n setValidationErrors(commonVal);\n }, [\n enableEncryption,\n encryptionType,\n vaultEndpoint,\n vaultEngine,\n vaultId,\n vaultSecret,\n vaultPing,\n vaultRetry,\n awsEndpoint,\n awsRegion,\n awsSecretKey,\n awsAccessKey,\n gemaltoEndpoint,\n gemaltoToken,\n gemaltoDomain,\n gemaltoRetry,\n gcpProjectID,\n gcpEndpoint,\n gcpClientEmail,\n gcpClientID,\n gcpPrivateKeyID,\n gcpPrivateKey,\n azureEndpoint,\n azureTenantID,\n azureClientID,\n azureClientSecret,\n isPageValid,\n enableAutoCert,\n enableCustomCerts,\n serverCertificate.encoded_key,\n serverCertificate.encoded_cert,\n clientCertificate.encoded_key,\n clientCertificate.encoded_cert,\n kesSecurityContext,\n replicas,\n ]);\n\n return (\n \n
\n

Encryption

\n \n How would you like to encrypt the information at rest.\n \n
\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"enableEncryption\", checked);\n }}\n label={\"Enable Server Side Encryption\"}\n disabled={!encryptionAvailable}\n />\n \n {enableEncryption && (\n \n \n {\n updateField(\"encryptionType\", e.target.value);\n }}\n selectorOptions={[\n { label: \"Vault\", value: \"vault\" },\n { label: \"AWS\", value: \"aws\" },\n { label: \"Gemalto\", value: \"gemalto\" },\n { label: \"GCP\", value: \"gcp\" },\n { label: \"Azure\", value: \"azure\" },\n ]}\n />\n \n {encryptionType === \"vault\" && (\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"enableCustomCertsForKES\", checked);\n }}\n label={\"Custom Certificates\"}\n disabled={!enableAutoCert}\n />\n \n {(enableCustomCertsForKES || !enableAutoCert) && (\n \n \n \n
\n \n Encryption Service Certificates\n \n {\n addFileServerCert(\"key\", fileName, encodedValue);\n cleanValidation(\"serverKey\");\n }}\n accept=\".key,.pem\"\n id=\"serverKey\"\n name=\"serverKey\"\n label=\"Key\"\n error={validationErrors[\"serverKey\"] || \"\"}\n value={serverCertificate.key}\n required={!enableAutoCert}\n />\n {\n addFileServerCert(\"cert\", fileName, encodedValue);\n cleanValidation(\"serverCert\");\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"serverCert\"\n name=\"serverCert\"\n label=\"Cert\"\n error={validationErrors[\"serverCert\"] || \"\"}\n value={serverCertificate.cert}\n required={!enableAutoCert}\n />\n
\n
\n
\n\n \n \n
\n \n Mutual TLS authentication\n \n {\n addFileClientCert(\"key\", fileName, encodedValue);\n cleanValidation(\"clientKey\");\n }}\n accept=\".key,.pem\"\n id=\"clientKey\"\n name=\"clientKey\"\n label=\"Key\"\n error={validationErrors[\"clientKey\"] || \"\"}\n value={clientCertificate.key}\n required={!enableAutoCert}\n />\n {\n addFileClientCert(\"cert\", fileName, encodedValue);\n cleanValidation(\"clientCert\");\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"clientCert\"\n name=\"clientCert\"\n label=\"Cert\"\n error={validationErrors[\"clientCert\"] || \"\"}\n value={clientCertificate.cert}\n required={!enableAutoCert}\n />\n
\n
\n
\n
\n )}\n \n ) => {\n updateField(\"vaultEndpoint\", e.target.value);\n cleanValidation(\"vault_endpoint\");\n }}\n label=\"Endpoint\"\n value={vaultEndpoint}\n error={validationErrors[\"vault_endpoint\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"vaultEngine\", e.target.value);\n cleanValidation(\"vault_engine\");\n }}\n label=\"Engine\"\n value={vaultEngine}\n />\n \n \n ) => {\n updateField(\"vaultNamespace\", e.target.value);\n }}\n label=\"Namespace\"\n value={vaultNamespace}\n />\n \n \n ) => {\n updateField(\"vaultPrefix\", e.target.value);\n }}\n label=\"Prefix\"\n value={vaultPrefix}\n />\n \n\n \n
\n App Role\n \n ) => {\n updateField(\"vaultAppRoleEngine\", e.target.value);\n }}\n label=\"Engine\"\n value={vaultAppRoleEngine}\n />\n \n \n ) => {\n updateField(\"vaultId\", e.target.value);\n cleanValidation(\"vault_id\");\n }}\n label=\"AppRole ID\"\n value={vaultId}\n error={validationErrors[\"vault_id\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"vaultSecret\", e.target.value);\n cleanValidation(\"vault_secret\");\n }}\n label=\"AppRole Secret\"\n value={vaultSecret}\n error={validationErrors[\"vault_secret\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"vaultRetry\", e.target.value);\n cleanValidation(\"vault_retry\");\n }}\n label=\"Retry (Seconds)\"\n value={vaultRetry}\n error={validationErrors[\"vault_retry\"] || \"\"}\n />\n \n
\n
\n\n \n
\n \n Mutual TLS authentication (optional)\n \n {\n addFileVaultCert(\"key\", fileName, encodedValue);\n cleanValidation(\"vault_key\");\n }}\n accept=\".key,.pem\"\n id=\"vault_key\"\n name=\"vault_key\"\n label=\"Key\"\n value={vaultCertificate.key}\n />\n {\n addFileVaultCert(\"cert\", fileName, encodedValue);\n cleanValidation(\"vault_cert\");\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"vault_cert\"\n name=\"vault_cert\"\n label=\"Cert\"\n value={vaultCertificate.cert}\n />\n {\n addFileVaultCa(fileName, encodedValue);\n cleanValidation(\"vault_ca\");\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"vault_ca\"\n name=\"vault_ca\"\n label=\"CA\"\n value={vaultCA.cert}\n />\n
\n
\n \n
\n Status\n ) => {\n updateField(\"vaultPing\", e.target.value);\n cleanValidation(\"vault_ping\");\n }}\n label=\"Ping (Seconds)\"\n value={vaultPing}\n error={validationErrors[\"vault_ping\"] || \"\"}\n />\n
\n \n
\n )}\n {encryptionType === \"azure\" && (\n \n \n ) => {\n updateField(\"azureEndpoint\", e.target.value);\n cleanValidation(\"azure_endpoint\");\n }}\n label=\"Endpoint\"\n value={azureEndpoint}\n error={validationErrors[\"azure_endpoint\"] || \"\"}\n />\n \n \n
\n \n Credentials\n \n \n ) => {\n updateField(\"azureTenantID\", e.target.value);\n cleanValidation(\"azure_tenant_id\");\n }}\n label=\"Tenant ID\"\n value={azureTenantID}\n error={validationErrors[\"azure_tenant_id\"] || \"\"}\n />\n \n \n ) => {\n updateField(\"azureClientID\", e.target.value);\n cleanValidation(\"azure_client_id\");\n }}\n label=\"Client ID\"\n value={azureClientID}\n error={validationErrors[\"azure_client_id\"] || \"\"}\n />\n \n \n ) => {\n updateField(\"azureClientSecret\", e.target.value);\n cleanValidation(\"azure_client_secret\");\n }}\n label=\"Client Secret\"\n value={azureClientSecret}\n error={validationErrors[\"azure_client_secret\"] || \"\"}\n />\n \n
\n
\n
\n )}\n {encryptionType === \"gcp\" && (\n \n \n ) => {\n updateField(\"gcpProjectID\", e.target.value);\n }}\n label=\"Project ID\"\n value={gcpProjectID}\n />\n \n \n ) => {\n updateField(\"gcpEndpoint\", e.target.value);\n }}\n label=\"Endpoint\"\n value={gcpEndpoint}\n />\n \n \n
\n \n Credentials\n \n \n ) => {\n updateField(\"gcpClientEmail\", e.target.value);\n }}\n label=\"Client Email\"\n value={gcpClientEmail}\n />\n \n \n ) => {\n updateField(\"gcpClientID\", e.target.value);\n }}\n label=\"Client ID\"\n value={gcpClientID}\n />\n \n \n ) => {\n updateField(\"gcpPrivateKeyID\", e.target.value);\n }}\n label=\"Private Key ID\"\n value={gcpPrivateKeyID}\n />\n \n \n ) => {\n updateField(\"gcpPrivateKey\", e.target.value);\n }}\n label=\"Private Key\"\n value={gcpPrivateKey}\n />\n \n
\n
\n
\n )}\n {encryptionType === \"aws\" && (\n \n \n ) => {\n updateField(\"awsEndpoint\", e.target.value);\n cleanValidation(\"aws_endpoint\");\n }}\n label=\"Endpoint\"\n value={awsEndpoint}\n error={validationErrors[\"aws_endpoint\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"awsRegion\", e.target.value);\n cleanValidation(\"aws_region\");\n }}\n label=\"Region\"\n value={awsRegion}\n error={validationErrors[\"aws_region\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"awsKMSKey\", e.target.value);\n }}\n label=\"KMS Key\"\n value={awsKMSKey}\n />\n \n \n
\n \n Credentials\n \n \n ) => {\n updateField(\"awsAccessKey\", e.target.value);\n cleanValidation(\"aws_accessKey\");\n }}\n label=\"Access Key\"\n value={awsAccessKey}\n error={validationErrors[\"aws_accessKey\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"awsSecretKey\", e.target.value);\n cleanValidation(\"aws_secretKey\");\n }}\n label=\"Secret Key\"\n value={awsSecretKey}\n error={validationErrors[\"aws_secretKey\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"awsToken\", e.target.value);\n }}\n label=\"Token\"\n value={awsToken}\n />\n \n
\n
\n
\n )}\n {encryptionType === \"gemalto\" && (\n \n \n ) => {\n updateField(\"gemaltoEndpoint\", e.target.value);\n cleanValidation(\"gemalto_endpoint\");\n }}\n label=\"Endpoint\"\n value={gemaltoEndpoint}\n error={validationErrors[\"gemalto_endpoint\"] || \"\"}\n required\n />\n \n \n
\n \n Credentials\n \n \n ) => {\n updateField(\"gemaltoToken\", e.target.value);\n cleanValidation(\"gemalto_token\");\n }}\n label=\"Token\"\n value={gemaltoToken}\n error={validationErrors[\"gemalto_token\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"gemaltoDomain\", e.target.value);\n cleanValidation(\"gemalto_domain\");\n }}\n label=\"Domain\"\n value={gemaltoDomain}\n error={validationErrors[\"gemalto_domain\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"gemaltoRetry\", e.target.value);\n cleanValidation(\"gemalto_retry\");\n }}\n label=\"Retry (seconds)\"\n value={gemaltoRetry}\n error={validationErrors[\"gemalto_retry\"] || \"\"}\n />\n \n
\n \n \n
\n \n Custom CA Root certificate verification\n \n\n {\n addFileGemaltoCa(fileName, encodedValue);\n cleanValidation(\"gemalto_ca\");\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"gemalto_ca\"\n name=\"gemalto_ca\"\n label=\"CA\"\n value={gemaltoCA.cert}\n />\n
\n \n
\n )}\n
\n

Additional Configurations

\n
\n \n \n ) => {\n updateField(\"replicas\", e.target.value);\n cleanValidation(\"replicas\");\n }}\n label=\"Replicas\"\n value={replicas}\n required\n error={validationErrors[\"replicas\"] || \"\"}\n />\n \n\n
\n \n SecurityContext for KES pods\n \n \n \n \n ) => {\n updateField(\"kesSecurityContext\", {\n ...kesSecurityContext,\n runAsUser: e.target.value,\n });\n cleanValidation(\"kes_securityContext_runAsUser\");\n }}\n label=\"Run As User\"\n value={kesSecurityContext.runAsUser}\n required\n error={\n validationErrors[\"kes_securityContext_runAsUser\"] || \"\"\n }\n min=\"0\"\n />\n \n \n ) => {\n updateField(\"kesSecurityContext\", {\n ...kesSecurityContext,\n runAsGroup: e.target.value,\n });\n cleanValidation(\"kes_securityContext_runAsGroup\");\n }}\n label=\"Run As Group\"\n value={kesSecurityContext.runAsGroup}\n required\n error={\n validationErrors[\"kes_securityContext_runAsGroup\"] || \"\"\n }\n min=\"0\"\n />\n \n \n ) => {\n updateField(\"kesSecurityContext\", {\n ...kesSecurityContext,\n fsGroup: e.target.value,\n });\n cleanValidation(\"kes_securityContext_fsGroup\");\n }}\n label=\"FsGroup\"\n value={kesSecurityContext.fsGroup}\n required\n error={\n validationErrors[\"kes_securityContext_fsGroup\"] || \"\"\n }\n min=\"0\"\n />\n \n \n \n
\n \n
\n {\n const targetD = e.target;\n const checked = targetD.checked;\n updateField(\"kesSecurityContext\", {\n ...kesSecurityContext,\n runAsNonRoot: checked,\n });\n }}\n label={\"Do not run as Root\"}\n />\n
\n
\n
\n
\n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n replicas: state.tenants.createTenant.fields.encryption.replicas,\n enableEncryption:\n state.tenants.createTenant.fields.encryption.enableEncryption,\n encryptionType: state.tenants.createTenant.fields.encryption.encryptionType,\n gemaltoEndpoint: state.tenants.createTenant.fields.encryption.gemaltoEndpoint,\n gemaltoToken: state.tenants.createTenant.fields.encryption.gemaltoToken,\n gemaltoDomain: state.tenants.createTenant.fields.encryption.gemaltoDomain,\n gemaltoRetry: state.tenants.createTenant.fields.encryption.gemaltoRetry,\n awsEndpoint: state.tenants.createTenant.fields.encryption.awsEndpoint,\n awsRegion: state.tenants.createTenant.fields.encryption.awsRegion,\n awsKMSKey: state.tenants.createTenant.fields.encryption.awsKMSKey,\n awsAccessKey: state.tenants.createTenant.fields.encryption.awsAccessKey,\n awsSecretKey: state.tenants.createTenant.fields.encryption.awsSecretKey,\n awsToken: state.tenants.createTenant.fields.encryption.awsToken,\n vaultEndpoint: state.tenants.createTenant.fields.encryption.vaultEndpoint,\n vaultEngine: state.tenants.createTenant.fields.encryption.vaultEngine,\n vaultNamespace: state.tenants.createTenant.fields.encryption.vaultNamespace,\n vaultPrefix: state.tenants.createTenant.fields.encryption.vaultPrefix,\n vaultAppRoleEngine:\n state.tenants.createTenant.fields.encryption.vaultAppRoleEngine,\n vaultId: state.tenants.createTenant.fields.encryption.vaultId,\n vaultSecret: state.tenants.createTenant.fields.encryption.vaultSecret,\n vaultRetry: state.tenants.createTenant.fields.encryption.vaultRetry,\n vaultPing: state.tenants.createTenant.fields.encryption.vaultPing,\n azureEndpoint: state.tenants.createTenant.fields.encryption.azureEndpoint,\n azureTenantID: state.tenants.createTenant.fields.encryption.azureTenantID,\n azureClientID: state.tenants.createTenant.fields.encryption.azureClientID,\n azureClientSecret:\n state.tenants.createTenant.fields.encryption.azureClientSecret,\n gcpProjectID: state.tenants.createTenant.fields.encryption.gcpProjectID,\n gcpEndpoint: state.tenants.createTenant.fields.encryption.gcpEndpoint,\n gcpClientEmail: state.tenants.createTenant.fields.encryption.gcpClientEmail,\n gcpClientID: state.tenants.createTenant.fields.encryption.gcpClientID,\n gcpPrivateKeyID: state.tenants.createTenant.fields.encryption.gcpPrivateKeyID,\n gcpPrivateKey: state.tenants.createTenant.fields.encryption.gcpPrivateKey,\n enableCustomCertsForKES:\n state.tenants.createTenant.fields.encryption.enableCustomCertsForKES,\n enableAutoCert: state.tenants.createTenant.fields.security.enableAutoCert,\n enableTLS: state.tenants.createTenant.fields.security.enableTLS,\n minioCertificates: state.tenants.createTenant.certificates.minioCertificates,\n serverCertificate: state.tenants.createTenant.certificates.serverCertificate,\n clientCertificate: state.tenants.createTenant.certificates.clientCertificate,\n vaultCertificate: state.tenants.createTenant.certificates.vaultCertificate,\n vaultCA: state.tenants.createTenant.certificates.vaultCA,\n gemaltoCA: state.tenants.createTenant.certificates.gemaltoCA,\n enableCustomCerts:\n state.tenants.createTenant.fields.security.enableCustomCerts,\n kesSecurityContext:\n state.tenants.createTenant.fields.encryption.kesSecurityContext,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n addFileServerCert,\n addFileClientCert,\n addFileVaultCert,\n addFileVaultCa,\n addFileGemaltoCa,\n});\n\nexport default withStyles(styles)(connector(Encryption));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Grid, IconButton, Paper, SelectChangeEvent } from \"@mui/material\";\nimport { AppState } from \"../../../../../store\";\nimport { isPageValid, setKeyValuePairs, updateAddField } from \"../../actions\";\nimport { setModalErrorSnackMessage } from \"../../../../../actions\";\nimport {\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport {\n commonFormValidation,\n IValidation,\n} from \"../../../../../utils/validationFunctions\";\nimport { ErrorResponseHandler } from \"../../../../../common/types\";\nimport { LabelKeyPair } from \"../../types\";\nimport RadioGroupSelector from \"../../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport api from \"../../../../../common/api\";\nimport InputBoxWrapper from \"../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport AddIcon from \"../../../../../icons/AddIcon\";\nimport RemoveIcon from \"../../../../../icons/RemoveIcon\";\nimport SelectWrapper from \"../../../Common/FormComponents/SelectWrapper/SelectWrapper\";\n\ninterface IAffinityProps {\n classes: any;\n podAffinity: string;\n nodeSelectorLabels: string;\n withPodAntiAffinity: boolean;\n keyValuePairs: LabelKeyPair[];\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n setKeyValuePairs: typeof setKeyValuePairs;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n overlayAction: {\n marginLeft: 10,\n \"& svg\": {\n maxWidth: 15,\n maxHeight: 15,\n },\n \"& button\": {\n background: \"#EAEAEA\",\n },\n },\n affinityConfigField: {\n display: \"flex\",\n },\n affinityFieldLabel: {\n display: \"flex\",\n flexFlow: \"column\",\n flex: 1,\n },\n radioField: {\n display: \"flex\",\n alignItems: \"flex-start\",\n marginTop: 10,\n \"& div:first-child\": {\n display: \"flex\",\n flexFlow: \"column\",\n alignItems: \"baseline\",\n textAlign: \"left !important\",\n },\n },\n affinityLabelKey: {\n \"& div:first-child\": {\n marginBottom: 0,\n },\n },\n affinityLabelValue: {\n marginLeft: 10,\n \"& div:first-child\": {\n marginBottom: 0,\n },\n },\n rowActions: {\n display: \"flex\",\n alignItems: \"center\",\n },\n fieldContainer: {\n marginBottom: 0,\n },\n affinityRow: {\n marginBottom: 10,\n display: \"flex\",\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\ninterface OptionPair {\n label: string;\n value: string;\n}\n\nconst Affinity = ({\n classes,\n podAffinity,\n nodeSelectorLabels,\n withPodAntiAffinity,\n setModalErrorSnackMessage,\n updateAddField,\n keyValuePairs,\n setKeyValuePairs,\n isPageValid,\n}: IAffinityProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n const [loading, setLoading] = useState(true);\n const [keyValueMap, setKeyValueMap] = useState<{ [key: string]: string[] }>(\n {}\n );\n const [keyOptions, setKeyOptions] = useState([]);\n\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"affinity\", field, value);\n },\n [updateAddField]\n );\n\n useEffect(() => {\n if (loading) {\n api\n .invoke(\"GET\", `/api/v1/nodes/labels`)\n .then((res: { [key: string]: string[] }) => {\n setLoading(false);\n setKeyValueMap(res);\n let keys: OptionPair[] = [];\n for (let k in res) {\n keys.push({\n label: k,\n value: k,\n });\n }\n setKeyOptions(keys);\n })\n .catch((err: ErrorResponseHandler) => {\n setLoading(false);\n setModalErrorSnackMessage(err);\n setKeyValueMap({});\n });\n }\n }, [setModalErrorSnackMessage, loading]);\n\n useEffect(() => {\n if (keyValuePairs) {\n const vlr = keyValuePairs\n .filter((kvp) => kvp.key !== \"\")\n .map((kvp) => `${kvp.key}=${kvp.value}`)\n .filter((kvs, i, a) => a.indexOf(kvs) === i);\n const vl = vlr.join(\"&\");\n updateField(\"nodeSelectorLabels\", vl);\n }\n }, [keyValuePairs, updateField]);\n\n // Validation\n useEffect(() => {\n let customAccountValidation: IValidation[] = [];\n\n if (podAffinity === \"nodeSelector\") {\n let valid = true;\n\n const splittedLabels = nodeSelectorLabels.split(\"&\");\n\n if (splittedLabels.length === 1 && splittedLabels[0] === \"\") {\n valid = false;\n }\n\n splittedLabels.forEach((item: string, index: number) => {\n const splitItem = item.split(\"=\");\n\n if (splitItem.length !== 2) {\n valid = false;\n }\n\n if (index + 1 !== splittedLabels.length) {\n if (splitItem[0] === \"\" || splitItem[1] === \"\") {\n valid = false;\n }\n }\n });\n\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"labels\",\n required: true,\n value: nodeSelectorLabels,\n customValidation: !valid,\n customValidationMessage:\n \"You need to add at least one label key-pair\",\n },\n ];\n }\n\n const commonVal = commonFormValidation(customAccountValidation);\n\n isPageValid(\"affinity\", Object.keys(commonVal).length === 0);\n\n setValidationErrors(commonVal);\n }, [isPageValid, podAffinity, nodeSelectorLabels]);\n\n return (\n \n
\n

Pod Placement

\n \n Configure how pods will be assigned to nodes\n \n
\n \n \n
Type
\n \n MinIO supports multiple configurations for Pod Affinity\n \n \n {\n updateField(\"podAffinity\", e.target.value);\n }}\n selectorOptions={[\n { label: \"None\", value: \"none\" },\n { label: \"Default (Pod Anti-Affinnity)\", value: \"default\" },\n { label: \"Node Selector\", value: \"nodeSelector\" },\n ]}\n />\n \n
\n
\n {podAffinity === \"nodeSelector\" && (\n \n
\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"withPodAntiAffinity\", checked);\n }}\n label={\"With Pod Anti-Affinity\"}\n />\n \n \n

Labels

\n {validationErrors[\"labels\"]}\n \n {keyValuePairs &&\n keyValuePairs.map((kvp, i) => {\n return (\n \n \n {keyOptions.length > 0 && (\n ) => {\n const newKey = e.target.value as string;\n const arrCp: LabelKeyPair[] = Object.assign(\n [],\n keyValuePairs\n );\n\n arrCp[i].key = e.target.value as string;\n arrCp[i].value = keyValueMap[newKey][0];\n setKeyValuePairs(arrCp);\n }}\n id=\"select-access-policy\"\n name=\"select-access-policy\"\n label={\"\"}\n value={kvp.key}\n options={keyOptions}\n />\n )}\n {keyOptions.length === 0 && (\n {\n const arrCp: LabelKeyPair[] = Object.assign(\n [],\n keyValuePairs\n );\n arrCp[i].key = e.target.value;\n setKeyValuePairs(arrCp);\n }}\n index={i}\n placeholder={\"Key\"}\n />\n )}\n \n \n {keyOptions.length > 0 && (\n ) => {\n const arrCp: LabelKeyPair[] = Object.assign(\n [],\n keyValuePairs\n );\n arrCp[i].value = e.target.value as string;\n setKeyValuePairs(arrCp);\n }}\n id=\"select-access-policy\"\n name=\"select-access-policy\"\n label={\"\"}\n value={kvp.value}\n options={\n keyValueMap[kvp.key]\n ? keyValueMap[kvp.key].map((v) => {\n return { label: v, value: v };\n })\n : []\n }\n />\n )}\n {keyOptions.length === 0 && (\n {\n const arrCp: LabelKeyPair[] = Object.assign(\n [],\n keyValuePairs\n );\n arrCp[i].value = e.target.value;\n setKeyValuePairs(arrCp);\n }}\n index={i}\n placeholder={\"value\"}\n />\n )}\n \n \n
\n {\n const arrCp = Object.assign([], keyValuePairs);\n if (keyOptions.length > 0) {\n arrCp.push({\n key: keyOptions[0].value,\n value: keyValueMap[keyOptions[0].value][0],\n });\n } else {\n arrCp.push({ key: \"\", value: \"\" });\n }\n\n setKeyValuePairs(arrCp);\n }}\n >\n \n \n
\n {keyValuePairs.length > 1 && (\n
\n {\n const arrCp = keyValuePairs.filter(\n (item, index) => index !== i\n );\n setKeyValuePairs(arrCp);\n }}\n >\n \n \n
\n )}\n
\n
\n );\n })}\n
\n
\n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => {\n const createTenant = state.tenants.createTenant;\n\n return {\n podAffinity: createTenant.fields.affinity.podAffinity,\n nodeSelectorLabels: createTenant.fields.affinity.nodeSelectorLabels,\n withPodAntiAffinity: createTenant.fields.affinity.withPodAntiAffinity,\n keyValuePairs: createTenant.nodeSelectorPairs,\n };\n};\n\nconst connector = connect(mapState, {\n setModalErrorSnackMessage,\n updateAddField,\n isPageValid,\n setKeyValuePairs,\n});\n\nexport default withStyles(styles)(connector(Affinity));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Grid, Paper } from \"@mui/material\";\nimport {\n formFieldStyles,\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { isPageValid, updateAddField } from \"../../actions\";\nimport { AppState } from \"../../../../../store\";\nimport { clearValidationError } from \"../../utils\";\nimport {\n commonFormValidation,\n IValidation,\n} from \"../../../../../utils/validationFunctions\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport InputBoxWrapper from \"../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\n\ninterface IImagesProps {\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n storageClasses: any;\n classes: any;\n customImage: boolean;\n imageName: string;\n customDockerhub: boolean;\n imageRegistry: string;\n imageRegistryUsername: string;\n imageRegistryPassword: string;\n exposeMinIO: boolean;\n exposeConsole: boolean;\n prometheusCustom: boolean;\n tenantCustom: boolean;\n logSearchCustom: boolean;\n logSearchVolumeSize: string;\n logSearchSizeFactor: string;\n prometheusVolumeSize: string;\n prometheusSizeFactor: string;\n logSearchSelectedStorageClass: string;\n logSearchImage: string;\n kesImage: string;\n logSearchPostgresImage: string;\n logSearchPostgresInitImage: string;\n prometheusSelectedStorageClass: string;\n prometheusImage: string;\n prometheusSidecarImage: string;\n prometheusInitImage: string;\n selectedStorageClass: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...formFieldStyles,\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst Images = ({\n classes,\n storageClasses,\n customImage,\n imageName,\n customDockerhub,\n imageRegistry,\n imageRegistryUsername,\n imageRegistryPassword,\n exposeMinIO,\n exposeConsole,\n prometheusCustom,\n tenantCustom,\n logSearchCustom,\n logSearchVolumeSize,\n logSearchSizeFactor,\n logSearchImage,\n kesImage,\n logSearchPostgresImage,\n logSearchPostgresInitImage,\n prometheusVolumeSize,\n prometheusSizeFactor,\n logSearchSelectedStorageClass,\n prometheusSelectedStorageClass,\n prometheusImage,\n prometheusSidecarImage,\n prometheusInitImage,\n updateAddField,\n isPageValid,\n selectedStorageClass,\n}: IImagesProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"configure\", field, value);\n },\n [updateAddField]\n );\n\n // Validation\n useEffect(() => {\n let customAccountValidation: IValidation[] = [];\n\n if (prometheusCustom) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"prometheus_storage_class\",\n required: true,\n value: prometheusSelectedStorageClass,\n customValidation: prometheusSelectedStorageClass === \"\",\n customValidationMessage: \"Field cannot be empty\",\n },\n {\n fieldKey: \"prometheus_volume_size\",\n required: true,\n value: prometheusVolumeSize,\n customValidation:\n prometheusVolumeSize === \"\" || parseInt(prometheusVolumeSize) <= 0,\n customValidationMessage: `Volume size must be present and be greatter than 0`,\n },\n ];\n }\n if (logSearchCustom) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"log_search_storage_class\",\n required: true,\n value: logSearchSelectedStorageClass,\n customValidation: logSearchSelectedStorageClass === \"\",\n customValidationMessage: \"Field cannot be empty\",\n },\n {\n fieldKey: \"log_search_volume_size\",\n required: true,\n value: logSearchVolumeSize,\n customValidation:\n logSearchVolumeSize === \"\" || parseInt(logSearchVolumeSize) <= 0,\n customValidationMessage: `Volume size must be present and be greatter than 0`,\n },\n ];\n }\n\n if (customImage) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"image\",\n required: false,\n value: imageName,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage: \"Format must be of form: 'minio/minio:VERSION'\",\n },\n {\n fieldKey: \"logSearchImage\",\n required: false,\n value: logSearchImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'minio/logsearchapi:VERSION'\",\n },\n {\n fieldKey: \"kesImage\",\n required: false,\n value: kesImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage: \"Format must be of form: 'minio/kes:VERSION'\",\n },\n {\n fieldKey: \"logSearchPostgresImage\",\n required: false,\n value: logSearchPostgresImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'library/postgres:VERSION'\",\n },\n {\n fieldKey: \"logSearchPostgresInitImage\",\n required: false,\n value: logSearchPostgresInitImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'library/busybox:VERSION'\",\n },\n {\n fieldKey: \"prometheusImage\",\n required: false,\n value: prometheusImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'minio/prometheus:VERSION'\",\n },\n {\n fieldKey: \"prometheusSidecarImage\",\n required: false,\n value: prometheusSidecarImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'project/container:VERSION'\",\n },\n {\n fieldKey: \"prometheusInitImage\",\n required: false,\n value: prometheusInitImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'library/busybox:VERSION'\",\n },\n ];\n if (customDockerhub) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"registry\",\n required: true,\n value: imageRegistry,\n },\n {\n fieldKey: \"registryUsername\",\n required: true,\n value: imageRegistryUsername,\n },\n {\n fieldKey: \"registryPassword\",\n required: true,\n value: imageRegistryPassword,\n },\n ];\n }\n }\n\n const commonVal = commonFormValidation(customAccountValidation);\n\n isPageValid(\"configure\", Object.keys(commonVal).length === 0);\n\n setValidationErrors(commonVal);\n }, [\n customImage,\n imageName,\n logSearchImage,\n kesImage,\n logSearchPostgresImage,\n logSearchPostgresInitImage,\n prometheusImage,\n prometheusSidecarImage,\n prometheusInitImage,\n customDockerhub,\n imageRegistry,\n imageRegistryUsername,\n imageRegistryPassword,\n isPageValid,\n prometheusCustom,\n tenantCustom,\n logSearchCustom,\n prometheusSelectedStorageClass,\n prometheusVolumeSize,\n logSearchSelectedStorageClass,\n logSearchVolumeSize,\n ]);\n\n const cleanValidation = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n return (\n \n
\n

Container Images

\n \n Images used by the Tenant Deployment\n \n
\n\n \n \n ) => {\n updateField(\"imageName\", e.target.value);\n cleanValidation(\"image\");\n }}\n label=\"MinIO's Image\"\n value={imageName}\n error={validationErrors[\"image\"] || \"\"}\n placeholder=\"E.g. minio/minio:RELEASE.2022-01-08T03-11-54Z\"\n />\n \n \n ) => {\n updateField(\"logSearchImage\", e.target.value);\n cleanValidation(\"logSearchImage\");\n }}\n label=\"Log Search API's Image\"\n value={logSearchImage}\n error={validationErrors[\"logSearchImage\"] || \"\"}\n placeholder=\"E.g. minio/logsearchapi:v4.1.1\"\n />\n \n \n ) => {\n updateField(\"kesImage\", e.target.value);\n cleanValidation(\"kesImage\");\n }}\n label=\"KES Image\"\n value={kesImage}\n error={validationErrors[\"kesImage\"] || \"\"}\n placeholder=\"E.g. minio/kes:v0.14.0\"\n />\n \n \n ) => {\n updateField(\"logSearchPostgresImage\", e.target.value);\n cleanValidation(\"logSearchPostgresImage\");\n }}\n label=\"Log Search Postgres's Image\"\n value={logSearchPostgresImage}\n error={validationErrors[\"logSearchPostgresImage\"] || \"\"}\n placeholder=\"E.g. library/postgres:13\"\n />\n \n \n ) => {\n updateField(\"logSearchPostgresInitImage\", e.target.value);\n cleanValidation(\"logSearchPostgresInitImage\");\n }}\n label=\"Log Search Postgres's Init Image\"\n value={logSearchPostgresInitImage}\n error={validationErrors[\"logSearchPostgresInitImage\"] || \"\"}\n placeholder=\"E.g. library/busybox:1.33.1\"\n />\n \n \n ) => {\n updateField(\"prometheusImage\", e.target.value);\n cleanValidation(\"prometheusImage\");\n }}\n label=\"Prometheus Image\"\n value={prometheusImage}\n error={validationErrors[\"prometheusImage\"] || \"\"}\n placeholder=\"E.g. quay.io/prometheus/prometheus:latest\"\n />\n \n \n ) => {\n updateField(\"prometheusSidecarImage\", e.target.value);\n cleanValidation(\"prometheusSidecarImage\");\n }}\n label=\"Prometheus Sidecar Image\"\n value={prometheusSidecarImage}\n error={validationErrors[\"prometheusSidecarImage\"] || \"\"}\n placeholder=\"E.g. quay.io/prometheus/prometheus:latest\"\n />\n \n \n ) => {\n updateField(\"prometheusInitImage\", e.target.value);\n cleanValidation(\"prometheusInitImage\");\n }}\n label=\"Prometheus Init Image\"\n value={prometheusInitImage}\n error={validationErrors[\"prometheusInitImage\"] || \"\"}\n placeholder=\"E.g. quay.io/prometheus/prometheus:latest\"\n />\n \n \n\n {customImage && (\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"customDockerhub\", checked);\n }}\n label={\"Set/Update Image Registry\"}\n />\n \n \n )}\n {customDockerhub && (\n \n \n ) => {\n updateField(\"imageRegistry\", e.target.value);\n }}\n label=\"Endpoint\"\n value={imageRegistry}\n error={validationErrors[\"registry\"] || \"\"}\n placeholder=\"E.g. https://index.docker.io/v1/\"\n required\n />\n \n \n ) => {\n updateField(\"imageRegistryUsername\", e.target.value);\n }}\n label=\"Username\"\n value={imageRegistryUsername}\n error={validationErrors[\"registryUsername\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"imageRegistryPassword\", e.target.value);\n }}\n label=\"Password\"\n value={imageRegistryPassword}\n error={validationErrors[\"registryPassword\"] || \"\"}\n required\n />\n \n \n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n storageClasses: state.tenants.createTenant.storageClasses,\n customImage: state.tenants.createTenant.fields.configure.customImage,\n imageName: state.tenants.createTenant.fields.configure.imageName,\n customDockerhub: state.tenants.createTenant.fields.configure.customDockerhub,\n imageRegistry: state.tenants.createTenant.fields.configure.imageRegistry,\n imageRegistryUsername:\n state.tenants.createTenant.fields.configure.imageRegistryUsername,\n imageRegistryPassword:\n state.tenants.createTenant.fields.configure.imageRegistryPassword,\n exposeMinIO: state.tenants.createTenant.fields.configure.exposeMinIO,\n exposeConsole: state.tenants.createTenant.fields.configure.exposeConsole,\n prometheusCustom:\n state.tenants.createTenant.fields.configure.prometheusCustom,\n tenantCustom: state.tenants.createTenant.fields.configure.tenantCustom,\n logSearchCustom: state.tenants.createTenant.fields.configure.logSearchCustom,\n logSearchVolumeSize:\n state.tenants.createTenant.fields.configure.logSearchVolumeSize,\n logSearchSizeFactor:\n state.tenants.createTenant.fields.configure.logSearchSizeFactor,\n prometheusVolumeSize:\n state.tenants.createTenant.fields.configure.prometheusVolumeSize,\n prometheusSizeFactor:\n state.tenants.createTenant.fields.configure.prometheusSizeFactor,\n logSearchSelectedStorageClass:\n state.tenants.createTenant.fields.configure.logSearchSelectedStorageClass,\n logSearchImage: state.tenants.createTenant.fields.configure.logSearchImage,\n kesImage: state.tenants.createTenant.fields.configure.kesImage,\n logSearchPostgresImage:\n state.tenants.createTenant.fields.configure.logSearchPostgresImage,\n logSearchPostgresInitImage:\n state.tenants.createTenant.fields.configure.logSearchPostgresInitImage,\n prometheusSelectedStorageClass:\n state.tenants.createTenant.fields.configure.prometheusSelectedStorageClass,\n prometheusImage: state.tenants.createTenant.fields.configure.prometheusImage,\n prometheusSidecarImage:\n state.tenants.createTenant.fields.configure.prometheusSidecarImage,\n prometheusInitImage:\n state.tenants.createTenant.fields.configure.prometheusInitImage,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(Images));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { DialogContentText, LinearProgress } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n deleteDialogStyles,\n modalBasic,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { setErrorSnackMessage } from \"../../../../../../actions\";\nimport { ErrorResponseHandler } from \"../../../../../../common/types\";\nimport api from \"../../../../../../common/api\";\nimport ConfirmDialog from \"../../../../Common/ModalWrapper/ConfirmDialog\";\nimport { ConfirmModalIcon } from \"../../../../../../icons\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n wrapText: {\n maxWidth: \"200px\",\n whiteSpace: \"normal\",\n wordWrap: \"break-word\",\n },\n ...modalBasic,\n ...deleteDialogStyles,\n });\n\ninterface IAddNamespace {\n classes: any;\n namespace: string;\n addNamespaceOpen: boolean;\n closeAddNamespaceModalAndRefresh: (reloadNamespaceData: boolean) => void;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst AddNamespaceModal = ({\n classes,\n namespace,\n addNamespaceOpen,\n closeAddNamespaceModalAndRefresh,\n setErrorSnackMessage,\n}: IAddNamespace) => {\n const [addNamespaceLoading, setAddNamespaceLoading] =\n useState(false);\n\n useEffect(() => {\n if (addNamespaceLoading) {\n api\n .invoke(\"POST\", \"/api/v1/namespace\", {\n name: namespace,\n })\n .then((res) => {\n setAddNamespaceLoading(false);\n closeAddNamespaceModalAndRefresh(true);\n })\n .catch((err: ErrorResponseHandler) => {\n setAddNamespaceLoading(false);\n setErrorSnackMessage(err);\n });\n }\n }, [\n addNamespaceLoading,\n closeAddNamespaceModalAndRefresh,\n namespace,\n setErrorSnackMessage,\n ]);\n\n const addNamespace = () => {\n setAddNamespaceLoading(true);\n };\n\n return (\n }\n isLoading={addNamespaceLoading}\n onConfirm={addNamespace}\n onClose={() => {\n closeAddNamespaceModalAndRefresh(false);\n }}\n confirmationContent={\n \n {addNamespaceLoading && }\n \n Are you sure you want to add a namespace called\n
\n {namespace}?\n
\n
\n }\n />\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(AddNamespaceModal));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"../../../../../store\";\nimport { isPageValid, updateAddField } from \"../../actions\";\nimport {\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableRow from \"@mui/material/TableRow\";\nimport { niceBytes } from \"../../../../../common/utils\";\nimport { Opts } from \"../../ListTenants/utils\";\nimport { IResourcesSize } from \"../../ListTenants/types\";\nimport { IErasureCodeCalc } from \"../../../../../common/types\";\n\nimport { Divider } from \"@mui/material\";\nimport { IntegrationConfiguration } from \"./TenantResources/utils\";\n\ninterface ISizePreviewProps {\n classes: any;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n volumeSize: string;\n sizeFactor: string;\n drivesPerServer: string;\n nodes: string;\n memoryNode: string;\n ecParity: string;\n ecParityChoices: Opts[];\n cleanECChoices: string[];\n resourcesSize: IResourcesSize;\n distribution: any;\n ecParityCalc: IErasureCodeCalc;\n limitSize: any;\n selectedStorageClass: string;\n cpuToUse: string;\n integrationSelection: IntegrationConfiguration;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n root: {\n margin: 4,\n },\n table: {\n \"& .MuiTableCell-root\": {\n fontSize: 13,\n },\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst SizePreview = ({\n classes,\n updateAddField,\n isPageValid,\n volumeSize,\n sizeFactor,\n drivesPerServer,\n nodes,\n memoryNode,\n ecParity,\n ecParityChoices,\n cleanECChoices,\n resourcesSize,\n distribution,\n ecParityCalc,\n limitSize,\n selectedStorageClass,\n cpuToUse,\n integrationSelection,\n}: ISizePreviewProps) => {\n const usableInformation = ecParityCalc.storageFactors.find(\n (element) => element.erasureCode === ecParity\n );\n\n return (\n
\n

Resource Allocation

\n \n \n \n \n Number of Servers\n \n {parseInt(nodes) > 0 ? nodes : \"-\"}\n \n \n {integrationSelection.typeSelection === \"\" &&\n integrationSelection.storageClass === \"\" && (\n \n \n Drives per Server\n \n {distribution ? distribution.disks : \"-\"}\n \n \n \n Drive Capacity\n \n {distribution ? niceBytes(distribution.pvSize) : \"-\"}\n \n \n \n )}\n\n \n Total Volumes\n \n {distribution ? distribution.persistentVolumes : \"-\"}\n \n \n {integrationSelection.typeSelection === \"\" &&\n integrationSelection.storageClass === \"\" && (\n \n \n Memory per Node\n {memoryNode} Gi\n \n \n \n CPU Selection\n \n \n {cpuToUse}\n \n \n \n )}\n \n
\n {ecParityCalc.error === 0 && usableInformation && (\n \n

Erasure Code Configuration

\n \n \n \n \n EC Parity\n \n {ecParity !== \"\" ? ecParity : \"-\"}\n \n \n \n Raw Capacity\n \n {niceBytes(ecParityCalc.rawCapacity)}\n \n \n \n Usable Capacity\n \n {niceBytes(usableInformation.maxCapacity)}\n \n \n \n \n Server Failures Tolerated\n \n \n {distribution\n ? Math.floor(\n usableInformation.maxFailureTolerations /\n distribution.disks\n )\n : \"-\"}\n \n \n \n \n
\n )}\n {integrationSelection.typeSelection !== \"\" &&\n integrationSelection.storageClass !== \"\" && (\n \n

Single Instance Configuration

\n \n \n \n \n CPU\n \n {integrationSelection.CPU !== 0\n ? integrationSelection.CPU\n : \"-\"}\n \n \n \n Memory\n \n {integrationSelection.memory !== 0\n ? `${integrationSelection.memory} Gi`\n : \"-\"}\n \n \n \n Drives per Server\n \n {integrationSelection.drivesPerServer !== 0\n ? `${integrationSelection.drivesPerServer}`\n : \"-\"}\n \n \n \n \n Drive Size\n \n \n {integrationSelection.driveSize.driveSize}\n {integrationSelection.driveSize.sizeUnit}\n \n \n \n \n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n volumeSize: state.tenants.createTenant.fields.tenantSize.volumeSize,\n sizeFactor: state.tenants.createTenant.fields.tenantSize.sizeFactor,\n drivesPerServer: state.tenants.createTenant.fields.tenantSize.drivesPerServer,\n nodes: state.tenants.createTenant.fields.tenantSize.nodes,\n memoryNode: state.tenants.createTenant.fields.tenantSize.memoryNode,\n ecParity: state.tenants.createTenant.fields.tenantSize.ecParity,\n ecParityChoices: state.tenants.createTenant.fields.tenantSize.ecParityChoices,\n cleanECChoices: state.tenants.createTenant.fields.tenantSize.cleanECChoices,\n resourcesSize: state.tenants.createTenant.fields.tenantSize.resourcesSize,\n distribution: state.tenants.createTenant.fields.tenantSize.distribution,\n ecParityCalc: state.tenants.createTenant.fields.tenantSize.ecParityCalc,\n limitSize: state.tenants.createTenant.fields.tenantSize.limitSize,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n cpuToUse: state.tenants.createTenant.fields.tenantSize.cpuToUse,\n integrationSelection:\n state.tenants.createTenant.fields.tenantSize.integrationSelection,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(SizePreview));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport get from \"lodash/get\";\nimport { AppState } from \"../../../../../../store\";\nimport { isPageValid, updateAddField } from \"../../../actions\";\nimport {\n formFieldStyles,\n modalBasic,\n wizardCommon,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport Grid from \"@mui/material/Grid\";\nimport { IResourcesSize } from \"../../../ListTenants/types\";\nimport { AllocableResourcesResponse } from \"../../../types\";\nimport api from \"../../../../../../common/api\";\nimport InputBoxWrapper from \"../../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport { floor } from \"lodash\";\n\ninterface ITenantSizeResourcesProps {\n classes: any;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n nodes: string;\n resourcesSize: IResourcesSize;\n selectedStorageClass: string;\n maxAllocatableResources: AllocableResourcesResponse;\n maxCPUsUse: string;\n maxMemorySize: string;\n\n resourcesSpecifyLimit: boolean;\n resourcesCPURequestError: string;\n resourcesCPURequest: string;\n resourcesCPULimitError: string;\n resourcesCPULimit: string;\n resourcesMemoryRequestError: string;\n resourcesMemoryRequest: string;\n resourcesMemoryLimitError: string;\n resourcesMemoryLimit: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n compositeFieldContainer: {\n display: \"flex\",\n alignItems: \"center\",\n },\n compositeAddOn: {\n marginLeft: 10,\n \"& div\": {\n marginBottom: 0,\n },\n \"@media (max-width: 900px)\": {\n \"& div\": {\n marginTop: 5,\n },\n },\n },\n ...formFieldStyles,\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst TenantSizeResources = ({\n classes,\n updateAddField,\n isPageValid,\n nodes,\n\n resourcesSize,\n selectedStorageClass,\n maxAllocatableResources,\n maxCPUsUse,\n maxMemorySize,\n resourcesSpecifyLimit,\n resourcesCPURequestError,\n resourcesCPURequest,\n resourcesCPULimitError,\n resourcesCPULimit,\n resourcesMemoryRequestError,\n resourcesMemoryRequest,\n resourcesMemoryLimitError,\n resourcesMemoryLimit,\n}: ITenantSizeResourcesProps) => {\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"tenantSize\", field, value);\n },\n [updateAddField]\n );\n\n /*Debounce functions*/\n\n useEffect(() => {\n isPageValid(\n \"tenantSize\",\n resourcesMemoryRequestError === \"\" &&\n resourcesMemoryLimitError === \"\" &&\n resourcesCPURequestError === \"\" &&\n resourcesCPULimitError === \"\"\n );\n }, [\n isPageValid,\n resourcesMemoryRequestError,\n resourcesMemoryLimitError,\n resourcesCPURequestError,\n resourcesCPULimitError,\n ]);\n\n /*End debounce functions*/\n\n /*Calculate Allocation*/\n useEffect(() => {\n // Get allocatable Resources\n api\n .invoke(\"GET\", `api/v1/cluster/allocatable-resources?num_nodes=${nodes}`)\n .then((res: AllocableResourcesResponse) => {\n updateField(\"maxAllocatableResources\", res);\n\n const maxAllocatableResources = res;\n\n const memoryExists = get(\n maxAllocatableResources,\n \"min_allocatable_mem\",\n false\n );\n\n const cpuExists = get(\n maxAllocatableResources,\n \"min_allocatable_cpu\",\n false\n );\n\n if (memoryExists === false || cpuExists === false) {\n updateField(\"cpuToUse\", 0);\n\n updateField(\"maxMemorySize\", \"\");\n updateField(\"maxCPUsUse\", \"\");\n\n return;\n }\n\n const maxMemory = floor(\n res.mem_priority.max_allocatable_mem / 1024 / 1024 / 1024\n );\n // We default to Best CPU Configuration\n updateField(\"maxMemorySize\", maxMemory.toString());\n updateField(\n \"maxCPUsUse\",\n res.cpu_priority.max_allocatable_cpu.toString()\n );\n\n const maxAllocatableCPU = get(\n maxAllocatableResources,\n \"cpu_priority.max_allocatable_cpu\",\n 0\n );\n\n const baseCpuUse = Math.max(1, floor(maxAllocatableCPU / 2));\n updateField(\"resourcesCPURequest\", baseCpuUse);\n\n const baseMemoryUse = Math.max(2, floor(maxMemory / 2));\n updateField(\"resourcesMemoryRequest\", baseMemoryUse);\n })\n .catch((err: any) => {\n updateField(\"maxMemorySize\", 0);\n updateField(\"resourcesCPURequest\", \"\");\n\n console.error(err);\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [nodes, updateField]);\n\n /*Calculate Allocation End*/\n\n return (\n \n \n
\n

Resources

\n \n You may specify the amount of CPU and Memory that MinIO servers\n should reserve on each node.\n \n
\n
\n {resourcesSize.error !== \"\" && (\n \n
{resourcesSize.error}
\n
\n )}\n\n \n {\n let value = parseInt(e.target.value);\n if (e.target.value === \"\") {\n updateField(\"resourcesCPURequestError\", \"\");\n } else if (isNaN(value)) {\n updateField(\"resourcesCPURequestError\", \"Invalid number\");\n } else if (value > parseInt(maxCPUsUse)) {\n updateField(\n \"resourcesCPURequestError\",\n `Request exceeds available cores (${maxCPUsUse})`\n );\n } else if (e.target.validity.valid) {\n updateField(\"resourcesCPURequestError\", \"\");\n } else {\n updateField(\"resourcesCPURequestError\", \"Invalid configuration\");\n }\n updateField(\"resourcesCPURequest\", e.target.value);\n }}\n value={resourcesCPURequest}\n disabled={selectedStorageClass === \"\"}\n max={maxCPUsUse}\n error={resourcesCPURequestError}\n pattern={\"[0-9]*\"}\n />\n \n\n \n ) => {\n let value = parseInt(e.target.value);\n if (e.target.value === \"\") {\n updateField(\"resourcesMemoryRequestError\", \"\");\n } else if (isNaN(value)) {\n updateField(\"resourcesMemoryRequestError\", \"Invalid number\");\n } else if (value > parseInt(maxMemorySize)) {\n updateField(\n \"resourcesMemoryRequestError\",\n `Request exceeds available memory across ${nodes} nodes (${maxMemorySize}Gi)`\n );\n } else if (value < 2) {\n updateField(\n \"resourcesMemoryRequestError\",\n \"At least 2Gi must be requested\"\n );\n } else if (e.target.validity.valid) {\n updateField(\"resourcesMemoryRequestError\", \"\");\n } else {\n updateField(\n \"resourcesMemoryRequestError\",\n \"Invalid configuration\"\n );\n }\n updateField(\"resourcesMemoryRequest\", e.target.value);\n }}\n label=\"Memory Request [Gi]\"\n value={resourcesMemoryRequest}\n disabled={selectedStorageClass === \"\"}\n error={resourcesMemoryRequestError}\n pattern={\"[0-9]*\"}\n />\n \n\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"resourcesSpecifyLimit\", checked);\n }}\n label={\"Specify Limit\"}\n />\n \n\n {resourcesSpecifyLimit && (\n \n \n {\n let value = parseInt(e.target.value);\n if (e.target.value === \"\") {\n updateField(\"resourcesCPULimitError\", \"\");\n } else if (isNaN(value)) {\n updateField(\"resourcesCPULimitError\", \"Invalid number\");\n } else if (e.target.validity.valid) {\n updateField(\"resourcesCPULimitError\", \"\");\n } else {\n updateField(\n \"resourcesCPULimitError\",\n \"Invalid configuration\"\n );\n }\n updateField(\"resourcesCPULimit\", e.target.value);\n }}\n value={resourcesCPULimit}\n disabled={selectedStorageClass === \"\"}\n max={maxCPUsUse}\n error={resourcesCPULimitError}\n pattern={\"[0-9]*\"}\n />\n \n\n \n ) => {\n let value = parseInt(e.target.value);\n console.log(\"value\", value);\n if (e.target.value === \"\") {\n updateField(\"resourcesMemoryLimitError\", \"\");\n } else if (isNaN(value)) {\n updateField(\"resourcesMemoryLimitError\", \"Invalid number\");\n } else if (e.target.validity.valid) {\n updateField(\"resourcesMemoryLimitError\", \"\");\n } else {\n updateField(\n \"resourcesMemoryLimitError\",\n \"Invalid configuration\"\n );\n }\n updateField(\"resourcesMemoryLimit\", e.target.value);\n }}\n label=\"Memory Limit [Gi]\"\n value={resourcesMemoryLimit}\n disabled={selectedStorageClass === \"\"}\n error={resourcesMemoryLimitError}\n pattern={\"[0-9]*\"}\n />\n \n \n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n nodes: state.tenants.createTenant.fields.tenantSize.nodes,\n\n resourcesSize: state.tenants.createTenant.fields.tenantSize.resourcesSize,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n maxAllocatableResources:\n state.tenants.createTenant.fields.tenantSize.maxAllocatableResources,\n maxCPUsUse: state.tenants.createTenant.fields.tenantSize.maxCPUsUse,\n maxMemorySize: state.tenants.createTenant.fields.tenantSize.maxMemorySize,\n\n resourcesSpecifyLimit:\n state.tenants.createTenant.fields.tenantSize.resourcesSpecifyLimit,\n\n resourcesCPURequestError:\n state.tenants.createTenant.fields.tenantSize.resourcesCPURequestError,\n resourcesCPURequest:\n state.tenants.createTenant.fields.tenantSize.resourcesCPURequest,\n resourcesCPULimitError:\n state.tenants.createTenant.fields.tenantSize.resourcesCPULimitError,\n resourcesCPULimit:\n state.tenants.createTenant.fields.tenantSize.resourcesCPULimit,\n\n resourcesMemoryRequestError:\n state.tenants.createTenant.fields.tenantSize.resourcesMemoryRequestError,\n resourcesMemoryRequest:\n state.tenants.createTenant.fields.tenantSize.resourcesMemoryRequest,\n resourcesMemoryLimitError:\n state.tenants.createTenant.fields.tenantSize.resourcesMemoryLimitError,\n resourcesMemoryLimit:\n state.tenants.createTenant.fields.tenantSize.resourcesMemoryLimit,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(TenantSizeResources));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport { SelectChangeEvent } from \"@mui/material\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"../../../../../../store\";\nimport { isPageValid, updateAddField } from \"../../../actions\";\nimport {\n formFieldStyles,\n modalBasic,\n wizardCommon,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport Grid from \"@mui/material/Grid\";\nimport {\n calculateDistribution,\n erasureCodeCalc,\n getBytes,\n k8sfactorForDropdown,\n niceBytes,\n} from \"../../../../../../common/utils\";\nimport { clearValidationError } from \"../../../utils\";\nimport { ecListTransform, Opts } from \"../../../ListTenants/utils\";\nimport { IResourcesSize } from \"../../../ListTenants/types\";\nimport { ICapacity, IErasureCodeCalc } from \"../../../../../../common/types\";\nimport { commonFormValidation } from \"../../../../../../utils/validationFunctions\";\nimport api from \"../../../../../../common/api\";\nimport InputBoxWrapper from \"../../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport TenantSizeResources from \"./TenantSizeResources\";\n\ninterface ITenantSizeProps {\n classes: any;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n volumeSize: string;\n sizeFactor: string;\n drivesPerServer: string;\n nodes: string;\n memoryNode: string;\n ecParity: string;\n ecParityChoices: Opts[];\n cleanECChoices: string[];\n resourcesSize: IResourcesSize;\n distribution: any;\n ecParityCalc: IErasureCodeCalc;\n limitSize: any;\n selectedStorageClass: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n compositeFieldContainer: {\n display: \"flex\",\n alignItems: \"center\",\n },\n compositeAddOn: {\n marginLeft: 10,\n \"& div\": {\n marginBottom: 0,\n },\n \"@media (max-width: 900px)\": {\n \"& div\": {\n marginTop: 5,\n },\n },\n },\n ...formFieldStyles,\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst TenantSize = ({\n classes,\n updateAddField,\n isPageValid,\n volumeSize,\n sizeFactor,\n drivesPerServer,\n nodes,\n memoryNode,\n ecParity,\n ecParityChoices,\n cleanECChoices,\n resourcesSize,\n distribution,\n ecParityCalc,\n limitSize,\n selectedStorageClass,\n}: ITenantSizeProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n const [errorFlag, setErrorFlag] = useState(false);\n const [nodeError, setNodeError] = useState(\"\");\n\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"tenantSize\", field, value);\n },\n [updateAddField]\n );\n\n const cleanValidation = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n /*Debounce functions*/\n\n // Storage Quotas\n\n useEffect(() => {\n if (ecParityChoices.length > 0 && distribution.error === \"\") {\n const ecCodeValidated = erasureCodeCalc(\n cleanECChoices,\n distribution.persistentVolumes,\n distribution.pvSize,\n distribution.nodes\n );\n\n updateField(\"ecParityCalc\", ecCodeValidated);\n if (!cleanECChoices.includes(ecParity) || ecParity === \"\") {\n updateField(\"ecParity\", ecCodeValidated.defaultEC);\n }\n }\n }, [\n ecParity,\n ecParityChoices.length,\n distribution,\n cleanECChoices,\n updateField,\n ]);\n /*End debounce functions*/\n\n /*Calculate Allocation*/\n useEffect(() => {\n //Validate Cluster Size\n const size = volumeSize;\n const factor = sizeFactor;\n const limitSize = getBytes(\"12\", \"Ti\", true);\n\n const clusterCapacity: ICapacity = {\n unit: factor,\n value: size.toString(),\n };\n\n const distrCalculate = calculateDistribution(\n clusterCapacity,\n parseInt(nodes),\n parseInt(limitSize),\n parseInt(drivesPerServer)\n );\n\n updateField(\"distribution\", distrCalculate);\n setErrorFlag(false);\n setNodeError(\"\");\n }, [nodes, volumeSize, sizeFactor, updateField, drivesPerServer]);\n\n /*Calculate Allocation End*/\n\n /* Validations of pages */\n\n useEffect(() => {\n const parsedSize = getBytes(volumeSize, sizeFactor, true);\n\n const commonValidation = commonFormValidation([\n {\n fieldKey: \"nodes\",\n required: true,\n value: nodes,\n customValidation: errorFlag,\n customValidationMessage: nodeError,\n },\n {\n fieldKey: \"volume_size\",\n required: true,\n value: volumeSize,\n customValidation:\n parseInt(parsedSize) < 1073741824 ||\n parseInt(parsedSize) > limitSize[selectedStorageClass],\n customValidationMessage: `Volume size must be greater than 1Gi and less than ${niceBytes(\n limitSize[selectedStorageClass],\n true\n )}`,\n },\n {\n fieldKey: \"drivesps\",\n required: true,\n value: drivesPerServer,\n customValidation: parseInt(drivesPerServer) < 1,\n customValidationMessage: \"There must be at least one drive\",\n },\n ]);\n\n isPageValid(\n \"tenantSize\",\n !(\"nodes\" in commonValidation) &&\n !(\"volume_size\" in commonValidation) &&\n !(\"drivesps\" in commonValidation) &&\n distribution.error === \"\" &&\n ecParityCalc.error === 0 &&\n ecParity !== \"\"\n );\n\n setValidationErrors(commonValidation);\n }, [\n nodes,\n volumeSize,\n sizeFactor,\n memoryNode,\n distribution,\n ecParityCalc,\n resourcesSize,\n limitSize,\n selectedStorageClass,\n isPageValid,\n errorFlag,\n nodeError,\n drivesPerServer,\n ecParity,\n ]);\n\n useEffect(() => {\n if (distribution.error === \"\") {\n // Get EC Value\n if (nodes.trim() !== \"\" && distribution.disks !== 0) {\n api\n .invoke(\"GET\", `api/v1/get-parity/${nodes}/${distribution.disks}`)\n .then((ecList: string[]) => {\n updateField(\"ecParityChoices\", ecListTransform(ecList));\n updateField(\"cleanECChoices\", ecList);\n })\n .catch((err: any) => {\n updateField(\"ecparityChoices\", []);\n isPageValid(\"tenantSize\", false);\n updateField(\"ecParity\", \"\");\n });\n }\n }\n }, [distribution, isPageValid, updateField, nodes]);\n\n /* End Validation of pages */\n\n return (\n \n \n
\n

Capacity

\n \n Please select the desired capacity\n \n
\n
\n {distribution.error !== \"\" && (\n \n
{distribution.error}
\n
\n )}\n \n ) => {\n if (e.target.validity.valid) {\n updateField(\"nodes\", e.target.value);\n cleanValidation(\"nodes\");\n }\n }}\n label=\"Number of Servers\"\n disabled={selectedStorageClass === \"\"}\n value={nodes}\n min=\"4\"\n required\n error={validationErrors[\"nodes\"] || \"\"}\n pattern={\"[0-9]*\"}\n />\n \n \n ) => {\n if (e.target.validity.valid) {\n updateField(\"drivesPerServer\", e.target.value);\n cleanValidation(\"drivesps\");\n }\n }}\n label=\"Drives per Server\"\n value={drivesPerServer}\n disabled={selectedStorageClass === \"\"}\n min=\"1\"\n required\n error={validationErrors[\"drivesps\"] || \"\"}\n pattern={\"[0-9]*\"}\n />\n \n \n
\n
\n
\n ) => {\n updateField(\"volumeSize\", e.target.value);\n cleanValidation(\"volume_size\");\n }}\n label=\"Total Size\"\n value={volumeSize}\n disabled={selectedStorageClass === \"\"}\n required\n error={validationErrors[\"volume_size\"] || \"\"}\n min=\"0\"\n />\n
\n ) => {\n updateField(\"sizeFactor\", e.target.value as string);\n }}\n options={k8sfactorForDropdown()}\n />\n
\n
\n
\n
\n
\n\n \n ) => {\n updateField(\"ecParity\", e.target.value as string);\n }}\n label=\"Erasure Code Parity\"\n disabled={selectedStorageClass === \"\"}\n value={ecParity}\n options={ecParityChoices}\n />\n \n Please select the desired parity. This setting will change the max\n usable capacity in the cluster\n \n \n\n \n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n volumeSize: state.tenants.createTenant.fields.tenantSize.volumeSize,\n sizeFactor: state.tenants.createTenant.fields.tenantSize.sizeFactor,\n drivesPerServer: state.tenants.createTenant.fields.tenantSize.drivesPerServer,\n nodes: state.tenants.createTenant.fields.tenantSize.nodes,\n memoryNode: state.tenants.createTenant.fields.tenantSize.memoryNode,\n ecParity: state.tenants.createTenant.fields.tenantSize.ecParity,\n ecParityChoices: state.tenants.createTenant.fields.tenantSize.ecParityChoices,\n cleanECChoices: state.tenants.createTenant.fields.tenantSize.cleanECChoices,\n\n resourcesSize: state.tenants.createTenant.fields.tenantSize.resourcesSize,\n distribution: state.tenants.createTenant.fields.tenantSize.distribution,\n ecParityCalc: state.tenants.createTenant.fields.tenantSize.ecParityCalc,\n limitSize: state.tenants.createTenant.limitSize,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(TenantSize));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport { SelectChangeEvent } from \"@mui/material\";\nimport get from \"lodash/get\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"../../../../../../store\";\nimport { isPageValid, updateAddField } from \"../../../actions\";\nimport {\n formFieldStyles,\n modalBasic,\n wizardCommon,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport Grid from \"@mui/material/Grid\";\nimport { erasureCodeCalc, getBytes } from \"../../../../../../common/utils\";\nimport { clearValidationError } from \"../../../utils\";\nimport { ecListTransform, Opts } from \"../../../ListTenants/utils\";\nimport { IResourcesSize } from \"../../../ListTenants/types\";\nimport {\n IErasureCodeCalc,\n IStorageDistribution,\n} from \"../../../../../../common/types\";\nimport { commonFormValidation } from \"../../../../../../utils/validationFunctions\";\nimport api from \"../../../../../../common/api\";\nimport InputBoxWrapper from \"../../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport {\n IMkEnvs,\n IntegrationConfiguration,\n mkPanelConfigurations,\n} from \"./utils\";\n\ninterface ITenantSizeAWSProps {\n classes: any;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n volumeSize: string;\n sizeFactor: string;\n drivesPerServer: string;\n nodes: string;\n memoryNode: string;\n ecParity: string;\n ecParityChoices: Opts[];\n cleanECChoices: string[];\n resourcesSize: IResourcesSize;\n distribution: any;\n ecParityCalc: IErasureCodeCalc;\n limitSize: any;\n selectedStorageType: string;\n cpuToUse: string;\n maxCPUsUse: string;\n formToRender?: IMkEnvs;\n integrationSelection: IntegrationConfiguration;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n compositeFieldContainer: {\n display: \"flex\",\n alignItems: \"center\",\n },\n compositeAddOn: {\n marginLeft: 10,\n \"& div\": {\n marginBottom: 0,\n },\n \"@media (max-width: 900px)\": {\n \"& div\": {\n marginTop: 5,\n },\n },\n },\n ...formFieldStyles,\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst TenantSizeMK = ({\n classes,\n updateAddField,\n isPageValid,\n volumeSize,\n sizeFactor,\n drivesPerServer,\n nodes,\n memoryNode,\n ecParity,\n ecParityChoices,\n cleanECChoices,\n resourcesSize,\n distribution,\n ecParityCalc,\n limitSize,\n cpuToUse,\n selectedStorageType,\n maxCPUsUse,\n formToRender,\n integrationSelection,\n}: ITenantSizeAWSProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"tenantSize\", field, value);\n },\n [updateAddField]\n );\n\n const updateMainField = useCallback(\n (field: string, value: string) => {\n updateAddField(\"nameTenant\", field, value);\n },\n [updateAddField]\n );\n\n const cleanValidation = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n /*Debounce functions*/\n\n // Storage Quotas\n useEffect(() => {\n if (ecParityChoices.length > 0 && distribution.error === \"\") {\n const ecCodeValidated = erasureCodeCalc(\n cleanECChoices,\n distribution.persistentVolumes,\n distribution.pvSize,\n distribution.nodes\n );\n\n updateField(\"ecParityCalc\", ecCodeValidated);\n\n if (!cleanECChoices.includes(ecParity) || ecParity === \"\") {\n updateField(\"ecParity\", ecCodeValidated.defaultEC);\n }\n }\n }, [ecParity, ecParityChoices, distribution, cleanECChoices, updateField]);\n /*End debounce functions*/\n\n /*Set location Storage Types*/\n useEffect(() => {\n if (formToRender !== undefined && parseInt(nodes) >= 4) {\n const setConfigs = mkPanelConfigurations[formToRender];\n const keyCount = Object.keys(setConfigs).length;\n\n //Configuration is filled\n if (keyCount > 0) {\n const configs: IntegrationConfiguration[] = get(\n setConfigs,\n \"configurations\",\n []\n );\n\n const mainSelection = configs.find(\n (item) => item.typeSelection === selectedStorageType\n );\n\n if (mainSelection) {\n updateField(\"integrationSelection\", mainSelection);\n updateMainField(\"selectedStorageClass\", mainSelection.storageClass);\n\n let pvSize = parseInt(\n getBytes(\n mainSelection.driveSize.driveSize,\n mainSelection.driveSize.sizeUnit,\n true\n ),\n 10\n );\n\n const distrCalculate: IStorageDistribution = {\n pvSize,\n nodes: parseInt(nodes),\n disks: mainSelection.drivesPerServer,\n persistentVolumes: mainSelection.drivesPerServer * parseInt(nodes),\n error: \"\",\n };\n\n updateField(\"distribution\", distrCalculate);\n // apply requests, half of the available resources\n updateField(\n \"resourcesCPURequest\",\n Math.max(1, mainSelection.CPU / 2)\n );\n updateField(\n \"resourcesMemoryRequest\",\n Math.max(2, mainSelection.memory / 2)\n );\n }\n }\n }\n }, [nodes, selectedStorageType, formToRender, updateField, updateMainField]);\n\n /*Calculate Allocation End*/\n\n /* Validations of pages */\n\n useEffect(() => {\n const commonValidation = commonFormValidation([\n {\n fieldKey: \"nodes\",\n required: true,\n value: nodes,\n customValidation: parseInt(nodes) < 4,\n customValidationMessage: \"Al least 4 servers must be selected\",\n },\n ]);\n\n isPageValid(\n \"tenantSize\",\n !(\"nodes\" in commonValidation) &&\n distribution.error === \"\" &&\n ecParityCalc.error === 0 &&\n resourcesSize.error === \"\" &&\n ecParity !== \"\" &&\n parseInt(nodes) >= 4\n );\n\n setValidationErrors(commonValidation);\n }, [\n nodes,\n volumeSize,\n sizeFactor,\n memoryNode,\n distribution,\n ecParityCalc,\n resourcesSize,\n limitSize,\n selectedStorageType,\n cpuToUse,\n maxCPUsUse,\n isPageValid,\n drivesPerServer,\n ecParity,\n ]);\n\n useEffect(() => {\n if (integrationSelection.drivesPerServer !== 0) {\n // Get EC Value\n if (nodes.trim() !== \"\") {\n api\n .invoke(\n \"GET\",\n `api/v1/get-parity/${nodes}/${integrationSelection.drivesPerServer}`\n )\n .then((ecList: string[]) => {\n updateField(\"ecParityChoices\", ecListTransform(ecList));\n updateField(\"cleanECChoices\", ecList);\n })\n .catch((err: any) => {\n updateField(\"ecparityChoices\", []);\n isPageValid(\"tenantSize\", false);\n updateField(\"ecParity\", \"\");\n });\n }\n }\n }, [integrationSelection, nodes, isPageValid, updateField]);\n\n /* End Validation of pages */\n\n return (\n \n \n
\n

Tenant Size

\n \n Please select the desired capacity\n \n
\n
\n {distribution.error !== \"\" && (\n \n
{distribution.error}
\n
\n )}\n {resourcesSize.error !== \"\" && (\n \n
{resourcesSize.error}
\n
\n )}\n \n ) => {\n if (e.target.validity.valid) {\n updateField(\"nodes\", e.target.value);\n cleanValidation(\"nodes\");\n }\n }}\n label=\"Number of Servers\"\n disabled={selectedStorageType === \"\"}\n value={nodes}\n min=\"4\"\n required\n error={validationErrors[\"nodes\"] || \"\"}\n pattern={\"[0-9]*\"}\n />\n \n \n ) => {\n updateField(\"ecParity\", e.target.value as string);\n }}\n label=\"Erasure Code Parity\"\n disabled={selectedStorageType === \"\"}\n value={ecParity}\n options={ecParityChoices}\n />\n \n Please select the desired parity. This setting will change the max\n usable capacity in the cluster\n \n \n
\n );\n};\n\nconst mapState = (state: AppState) => () => {\n const createTenant = state.tenants.createTenant;\n\n const {\n memoryNode,\n ecParityChoices,\n distribution,\n cleanECChoices,\n sizeFactor,\n ecParity,\n cpuToUse,\n integrationSelection,\n resourcesSize,\n drivesPerServer,\n maxCPUsUse,\n ecParityCalc,\n volumeSize,\n nodes,\n } = createTenant.fields.tenantSize;\n\n return {\n volumeSize,\n sizeFactor,\n drivesPerServer,\n nodes,\n memoryNode,\n ecParity,\n ecParityChoices,\n cleanECChoices,\n resourcesSize,\n distribution,\n ecParityCalc,\n cpuToUse,\n maxCPUsUse,\n integrationSelection,\n limitSize: createTenant.limitSize,\n selectedStorageType: createTenant.fields.nameTenant.selectedStorageType,\n };\n};\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(TenantSizeMK));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, {\n Fragment,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport get from \"lodash/get\";\nimport debounce from \"lodash/debounce\";\nimport Grid from \"@mui/material/Grid\";\nimport {\n formFieldStyles,\n modalBasic,\n wizardCommon,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../../../actions\";\nimport {\n isPageValid,\n setLimitSize,\n setStorageClassesList,\n updateAddField,\n} from \"../../../actions\";\nimport {\n getLimitSizes,\n IQuotaElement,\n IQuotas,\n Opts,\n} from \"../../../ListTenants/utils\";\nimport { AppState } from \"../../../../../../store\";\nimport { commonFormValidation } from \"../../../../../../utils/validationFunctions\";\nimport { clearValidationError } from \"../../../utils\";\nimport { ErrorResponseHandler } from \"../../../../../../common/types\";\nimport api from \"../../../../../../common/api\";\nimport InputBoxWrapper from \"../../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport AddIcon from \"../../../../../../icons/AddIcon\";\nimport AddNamespaceModal from \"../helpers/AddNamespaceModal\";\nimport SizePreview from \"../SizePreview\";\nimport TenantSize from \"./TenantSize\";\nimport { Paper, SelectChangeEvent } from \"@mui/material\";\nimport { IMkEnvs, mkPanelConfigurations } from \"./utils\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n sizePreview: {\n position: \"fixed\",\n marginLeft: 10,\n background: \"#FFFFFF\",\n border: \"1px solid #EAEAEA\",\n padding: 2,\n },\n ...formFieldStyles,\n ...modalBasic,\n ...wizardCommon,\n });\n\ninterface INameTenantMainScreen {\n classes: any;\n storageClasses: Opts[];\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n setStorageClassesList: typeof setStorageClassesList;\n setLimitSize: typeof setLimitSize;\n tenantName: string;\n namespace: string;\n selectedStorageClass: string;\n selectedStorageType: string;\n formToRender?: IMkEnvs;\n}\n\nconst NameTenantMain = ({\n classes,\n storageClasses,\n tenantName,\n namespace,\n selectedStorageClass,\n selectedStorageType,\n formToRender = IMkEnvs.default,\n updateAddField,\n setStorageClassesList,\n setLimitSize,\n isPageValid,\n setModalErrorSnackMessage,\n}: INameTenantMainScreen) => {\n const [validationErrors, setValidationErrors] = useState({});\n const [emptyNamespace, setEmptyNamespace] = useState(true);\n const [loadingNamespaceInfo, setLoadingNamespaceInfo] =\n useState(false);\n const [showCreateButton, setShowCreateButton] = useState(false);\n const [openAddNSConfirm, setOpenAddNSConfirm] = useState(false);\n\n // Common\n const updateField = useCallback(\n (field: string, value: string) => {\n updateAddField(\"nameTenant\", field, value);\n },\n [updateAddField]\n );\n\n // Storage classes retrieval\n const getNamespaceInformation = useCallback(() => {\n setShowCreateButton(false);\n // Empty tenantValidation\n api\n .invoke(\"GET\", `/api/v1/namespaces/${namespace}/tenants`)\n .then((res: any[]) => {\n const tenantsList = get(res, \"tenants\", []);\n\n if (tenantsList && tenantsList.length > 0) {\n setEmptyNamespace(false);\n setLoadingNamespaceInfo(false);\n return;\n }\n setEmptyNamespace(true);\n\n // Storagequotas retrieval\n api\n .invoke(\n \"GET\",\n `/api/v1/namespaces/${namespace}/resourcequotas/${namespace}-storagequota`\n )\n .then((res: IQuotas) => {\n const elements: IQuotaElement[] = get(res, \"elements\", []);\n setLimitSize(getLimitSizes(res));\n\n const newStorage = elements.map((storageClass: any) => {\n const name = get(storageClass, \"name\", \"\").split(\n \".storageclass.storage.k8s.io/requests.storage\"\n )[0];\n\n return { label: name, value: name };\n });\n\n setStorageClassesList(newStorage);\n\n const stExists = newStorage.findIndex(\n (storageClass) => storageClass.value === selectedStorageClass\n );\n\n if (newStorage.length > 0 && stExists === -1) {\n updateField(\"selectedStorageClass\", newStorage[0].value);\n } else if (newStorage.length === 0) {\n updateField(\"selectedStorageClass\", \"\");\n setStorageClassesList([]);\n }\n setLoadingNamespaceInfo(false);\n })\n .catch((err: ErrorResponseHandler) => {\n setLoadingNamespaceInfo(false);\n setShowCreateButton(true);\n updateField(\"selectedStorageClass\", \"\");\n setStorageClassesList([]);\n console.error(\"Namespace error: \", err);\n });\n })\n .catch((err: ErrorResponseHandler) => {\n setModalErrorSnackMessage({\n errorMessage: \"Error validating if namespace already has tenants\",\n detailedError: err.detailedError,\n });\n });\n }, [\n namespace,\n setLimitSize,\n setModalErrorSnackMessage,\n setStorageClassesList,\n updateField,\n selectedStorageClass,\n ]);\n\n const debounceNamespace = useMemo(\n () => debounce(getNamespaceInformation, 500),\n [getNamespaceInformation]\n );\n\n useEffect(() => {\n if (namespace !== \"\") {\n debounceNamespace();\n setLoadingNamespaceInfo(true);\n\n // Cancel previous debounce calls during useEffect cleanup.\n return debounceNamespace.cancel;\n }\n }, [debounceNamespace, namespace]);\n\n // Validation\n useEffect(() => {\n let customNamespaceError = false;\n let errorMessage = \"\";\n\n if (!emptyNamespace && !loadingNamespaceInfo) {\n customNamespaceError = true;\n errorMessage = \"You can only create one tenant per namespace\";\n } else if (\n storageClasses.length < 1 &&\n emptyNamespace &&\n !loadingNamespaceInfo\n ) {\n customNamespaceError = true;\n errorMessage = \"Please enter a valid namespace\";\n }\n\n const commonValidation = commonFormValidation([\n {\n fieldKey: \"tenant-name\",\n required: true,\n pattern: /^[a-z0-9-]{3,63}$/,\n customPatternMessage:\n \"Name only can contain lowercase letters, numbers and '-'. Min. Length: 3\",\n value: tenantName,\n },\n {\n fieldKey: \"namespace\",\n required: true,\n value: namespace,\n customValidation: customNamespaceError,\n customValidationMessage: errorMessage,\n },\n ]);\n\n const isValid =\n !(\"tenant-name\" in commonValidation) &&\n !(\"namespace\" in commonValidation) &&\n ((formToRender === IMkEnvs.default && storageClasses.length > 0) ||\n (formToRender !== IMkEnvs.default && selectedStorageType !== \"\"));\n\n isPageValid(\"nameTenant\", isValid);\n\n setValidationErrors(commonValidation);\n }, [\n storageClasses,\n namespace,\n tenantName,\n isPageValid,\n emptyNamespace,\n loadingNamespaceInfo,\n selectedStorageType,\n formToRender,\n ]);\n\n const frmValidationCleanup = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n const addNamespace = () => {\n setOpenAddNSConfirm(true);\n };\n\n const closeAddNamespace = (refresh: boolean) => {\n setOpenAddNSConfirm(false);\n\n if (refresh) {\n debounceNamespace();\n }\n };\n\n return (\n \n {openAddNSConfirm && (\n \n )}\n \n \n \n \n \n
\n

Name

\n \n How would you like to name this new tenant?\n \n
\n
\n ) => {\n updateField(\"tenantName\", e.target.value);\n frmValidationCleanup(\"tenant-name\");\n }}\n label=\"Name\"\n value={tenantName}\n required\n error={validationErrors[\"tenant-name\"] || \"\"}\n />\n
\n
\n \n ) => {\n updateField(\"namespace\", e.target.value);\n frmValidationCleanup(\"namespace\");\n }}\n label=\"Namespace\"\n value={namespace}\n error={validationErrors[\"namespace\"] || \"\"}\n overlayIcon={showCreateButton ? : null}\n overlayAction={addNamespace}\n required\n />\n \n {formToRender === IMkEnvs.default ? (\n \n ) => {\n updateField(\n \"selectedStorageClass\",\n e.target.value as string\n );\n }}\n label=\"Storage Class\"\n value={selectedStorageClass}\n options={storageClasses}\n disabled={storageClasses.length < 1}\n />\n \n ) : (\n \n ) => {\n updateField(\n \"selectedStorageType\",\n e.target.value as string\n );\n }}\n label={get(\n mkPanelConfigurations,\n `${formToRender}.variantSelectorLabel`,\n \"Storage Type\"\n )}\n value={selectedStorageType}\n options={get(\n mkPanelConfigurations,\n `${formToRender}.variantSelectorValues`,\n []\n )}\n />\n \n )}\n {formToRender === IMkEnvs.default ? (\n \n ) : (\n get(\n mkPanelConfigurations,\n `${formToRender}.sizingComponent`,\n null\n )\n )}\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n tenantName: state.tenants.createTenant.fields.nameTenant.tenantName,\n namespace: state.tenants.createTenant.fields.nameTenant.namespace,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n selectedStorageType:\n state.tenants.createTenant.fields.nameTenant.selectedStorageType,\n storageClasses: state.tenants.createTenant.storageClasses,\n});\n\nconst connector = connect(mapState, {\n setModalErrorSnackMessage,\n updateAddField,\n setStorageClassesList,\n setLimitSize,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(NameTenantMain));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport NameTenantMain from \"./NameTenantMain\";\nimport { IMkEnvs, resourcesConfigurations } from \"./utils\";\nimport { AppState } from \"../../../../../../store\";\n\ninterface ITenantResources {\n features?: string[];\n}\n\nconst TenantResources = ({ features }: ITenantResources) => {\n const [formRender, setFormRender] = useState(null);\n\n useEffect(() => {\n let setConfiguration = IMkEnvs.default;\n\n if (features && features.length !== 0) {\n const possibleVariables = Object.keys(resourcesConfigurations);\n\n possibleVariables.forEach((element) => {\n if (features.includes(element)) {\n setConfiguration = get(\n resourcesConfigurations,\n element,\n IMkEnvs.default\n );\n }\n });\n }\n\n setFormRender(setConfiguration);\n }, [features]);\n\n if (formRender === null) {\n return null;\n }\n\n return ;\n};\n\nconst mapState = (state: AppState) => ({\n features: state.console.session.features,\n});\n\nconst connector = connect(mapState, null);\n\nexport default connector(TenantResources);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport get from \"lodash/get\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@mui/material/Grid\";\nimport { LinearProgress } from \"@mui/material\";\n\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n modalBasic,\n settingsCommon,\n wizardCommon,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport api from \"../../../../common/api\";\nimport { generatePoolName } from \"../../../../common/utils\";\nimport GenericWizard from \"../../Common/GenericWizard/GenericWizard\";\nimport { IWizardElement } from \"../../Common/GenericWizard/types\";\nimport { NewServiceAccount } from \"../../Common/CredentialsPrompt/types\";\nimport { ErrorResponseHandler, ITenantCreator } from \"../../../../common/types\";\nimport { KeyPair } from \"../ListTenants/utils\";\n\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport { getDefaultAffinity, getNodeSelector } from \"../TenantDetails/utils\";\nimport CredentialsPrompt from \"../../Common/CredentialsPrompt/CredentialsPrompt\";\nimport { AppState } from \"../../../../store\";\nimport { ICertificatesItems, IFieldStore } from \"../types\";\nimport { resetAddTenantForm, updateAddField } from \"../actions\";\nimport Configure from \"./Steps/Configure\";\nimport IdentityProvider from \"./Steps/IdentityProvider\";\nimport Security from \"./Steps/Security\";\nimport Encryption from \"./Steps/Encryption\";\nimport Affinity from \"./Steps/Affinity\";\nimport PageHeader from \"../../Common/PageHeader/PageHeader\";\nimport history from \"../../../../history\";\nimport Images from \"./Steps/Images\";\nimport PageLayout from \"../../Common/Layout/PageLayout\";\nimport BackLink from \"../../../../common/BackLink\";\nimport TenantResources from \"./Steps/TenantResources/TenantResources\";\n\ninterface IAddTenantProps {\n setErrorSnackMessage: typeof setErrorSnackMessage;\n resetAddTenantForm: typeof resetAddTenantForm;\n updateAddField: typeof updateAddField;\n fields: IFieldStore;\n certificates: ICertificatesItems;\n selectedStorageClass: string;\n namespace: string;\n validPages: string[];\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n pageBox: {\n border: \"1px solid #EAEAEA\",\n },\n ...modalBasic,\n ...wizardCommon,\n ...settingsCommon,\n });\n\nconst AddTenant = ({\n classes,\n fields,\n certificates,\n selectedStorageClass,\n namespace,\n validPages,\n setErrorSnackMessage,\n resetAddTenantForm,\n}: IAddTenantProps) => {\n // Modals\n const [showNewCredentials, setShowNewCredentials] = useState(false);\n const [createdAccount, setCreatedAccount] =\n useState(null);\n\n // Fields\n const [addSending, setAddSending] = useState(false);\n\n /* Send Information to backend */\n useEffect(() => {\n const tenantName = fields.nameTenant.tenantName;\n const selectedStorageClass = fields.nameTenant.selectedStorageClass;\n const imageName = fields.configure.imageName;\n const customDockerhub = fields.configure.customDockerhub;\n const imageRegistry = fields.configure.imageRegistry;\n const imageRegistryUsername = fields.configure.imageRegistryUsername;\n const imageRegistryPassword = fields.configure.imageRegistryPassword;\n const exposeMinIO = fields.configure.exposeMinIO;\n const exposeConsole = fields.configure.exposeConsole;\n const idpSelection = fields.identityProvider.idpSelection;\n const openIDConfigurationURL =\n fields.identityProvider.openIDConfigurationURL;\n const openIDClientID = fields.identityProvider.openIDClientID;\n const openIDClaimName = fields.identityProvider.openIDClaimName;\n const openIDCallbackURL = fields.identityProvider.openIDCallbackURL;\n const openIDScopes = fields.identityProvider.openIDScopes;\n const openIDSecretID = fields.identityProvider.openIDSecretID;\n const ADURL = fields.identityProvider.ADURL;\n const ADSkipTLS = fields.identityProvider.ADSkipTLS;\n const ADServerInsecure = fields.identityProvider.ADServerInsecure;\n const ADUserNameSearchFilter =\n fields.identityProvider.ADUserNameSearchFilter;\n const ADGroupSearchBaseDN = fields.identityProvider.ADGroupSearchBaseDN;\n const ADGroupSearchFilter = fields.identityProvider.ADGroupSearchFilter;\n const ADGroupNameAttribute = fields.identityProvider.ADGroupNameAttribute;\n const ADUserDNs = fields.identityProvider.ADUserDNs;\n const ADUserNameFormat = fields.identityProvider.ADUserNameFormat;\n const ADLookupBindDN = fields.identityProvider.ADLookupBindDN;\n const ADLookupBindPassword = fields.identityProvider.ADLookupBindPassword;\n const ADUserDNSearchBaseDN = fields.identityProvider.ADUserDNSearchBaseDN;\n const ADUserDNSearchFilter = fields.identityProvider.ADUserDNSearchFilter;\n const ADServerStartTLS = fields.identityProvider.ADServerStartTLS;\n const accessKeys = fields.identityProvider.accessKeys;\n const secretKeys = fields.identityProvider.secretKeys;\n const minioCertificates = certificates.minioCertificates;\n const caCertificates = certificates.caCertificates;\n const consoleCaCertificates = certificates.consoleCaCertificates;\n const consoleCertificate = certificates.consoleCertificate;\n const serverCertificate = certificates.serverCertificate;\n const clientCertificate = certificates.clientCertificate;\n const vaultCertificate = certificates.vaultCertificate;\n const vaultCA = certificates.vaultCA;\n const gemaltoCA = certificates.gemaltoCA;\n const enableEncryption = fields.encryption.enableEncryption;\n const encryptionType = fields.encryption.encryptionType;\n const gemaltoEndpoint = fields.encryption.gemaltoEndpoint;\n const gemaltoToken = fields.encryption.gemaltoToken;\n const gemaltoDomain = fields.encryption.gemaltoDomain;\n const gemaltoRetry = fields.encryption.gemaltoRetry;\n const awsEndpoint = fields.encryption.awsEndpoint;\n const awsRegion = fields.encryption.awsRegion;\n const awsKMSKey = fields.encryption.awsKMSKey;\n const awsAccessKey = fields.encryption.awsAccessKey;\n const awsSecretKey = fields.encryption.awsSecretKey;\n const awsToken = fields.encryption.awsToken;\n const vaultEndpoint = fields.encryption.vaultEndpoint;\n const vaultEngine = fields.encryption.vaultEngine;\n const vaultNamespace = fields.encryption.vaultNamespace;\n const vaultPrefix = fields.encryption.vaultPrefix;\n const vaultAppRoleEngine = fields.encryption.vaultAppRoleEngine;\n const vaultId = fields.encryption.vaultId;\n const vaultSecret = fields.encryption.vaultSecret;\n const vaultRetry = fields.encryption.vaultRetry;\n const vaultPing = fields.encryption.vaultPing;\n const azureEndpoint = fields.encryption.azureEndpoint;\n const azureTenantID = fields.encryption.azureTenantID;\n const azureClientID = fields.encryption.azureClientID;\n const azureClientSecret = fields.encryption.azureClientSecret;\n const gcpProjectID = fields.encryption.gcpProjectID;\n const gcpEndpoint = fields.encryption.gcpEndpoint;\n const gcpClientEmail = fields.encryption.gcpClientEmail;\n const gcpClientID = fields.encryption.gcpClientID;\n const gcpPrivateKeyID = fields.encryption.gcpPrivateKeyID;\n const gcpPrivateKey = fields.encryption.gcpPrivateKey;\n const enableAutoCert = fields.security.enableAutoCert;\n const enableTLS = fields.security.enableTLS;\n const ecParity = fields.tenantSize.ecParity;\n const distribution = fields.tenantSize.distribution;\n const tenantCustom = fields.configure.tenantCustom;\n const logSearchCustom = fields.configure.logSearchCustom;\n const prometheusCustom = fields.configure.prometheusCustom;\n const logSearchVolumeSize = fields.configure.logSearchVolumeSize;\n const logSearchSelectedStorageClass =\n fields.configure.logSearchSelectedStorageClass;\n const logSearchImage = fields.configure.logSearchImage;\n const kesImage = fields.configure.kesImage;\n const logSearchPostgresImage = fields.configure.logSearchPostgresImage;\n const logSearchPostgresInitImage =\n fields.configure.logSearchPostgresInitImage;\n const prometheusImage = fields.configure.prometheusImage;\n const prometheusSidecarImage = fields.configure.prometheusSidecarImage;\n const prometheusInitImage = fields.configure.prometheusInitImage;\n const prometheusSelectedStorageClass =\n fields.configure.prometheusSelectedStorageClass;\n const prometheusVolumeSize = fields.configure.prometheusVolumeSize;\n const affinityType = fields.affinity.podAffinity;\n const nodeSelectorLabels = fields.affinity.nodeSelectorLabels;\n const withPodAntiAffinity = fields.affinity.withPodAntiAffinity;\n\n const tenantSecurityContext = fields.configure.tenantSecurityContext;\n const logSearchSecurityContext = fields.configure.logSearchSecurityContext;\n const logSearchPostgresSecurityContext =\n fields.configure.logSearchPostgresSecurityContext;\n const prometheusSecurityContext =\n fields.configure.prometheusSecurityContext;\n const kesSecurityContext = fields.encryption.kesSecurityContext;\n const kesReplicas = fields.encryption.replicas;\n\n if (addSending) {\n const poolName = generatePoolName([]);\n\n let affinityObject = {};\n\n switch (affinityType) {\n case \"default\":\n affinityObject = {\n affinity: getDefaultAffinity(tenantName, poolName),\n };\n break;\n case \"nodeSelector\":\n affinityObject = {\n affinity: getNodeSelector(\n nodeSelectorLabels,\n withPodAntiAffinity,\n tenantName,\n poolName\n ),\n };\n break;\n }\n\n const erasureCode = ecParity.split(\":\")[1];\n\n let dataSend: ITenantCreator = {\n name: tenantName,\n namespace: namespace,\n access_key: \"\",\n secret_key: \"\",\n access_keys: [],\n secret_keys: [],\n enable_tls: enableTLS && enableAutoCert,\n enable_console: true,\n enable_prometheus: true,\n service_name: \"\",\n image: imageName,\n expose_minio: exposeMinIO,\n expose_console: exposeConsole,\n pools: [\n {\n name: poolName,\n servers: distribution.nodes,\n volumes_per_server: distribution.disks,\n volume_configuration: {\n size: distribution.pvSize,\n storage_class_name: selectedStorageClass,\n },\n securityContext: tenantCustom ? tenantSecurityContext : null,\n ...affinityObject,\n },\n ],\n erasureCodingParity: parseInt(erasureCode, 10),\n };\n\n // Set Resources\n if (\n fields.tenantSize.resourcesCPURequest !== \"\" ||\n fields.tenantSize.resourcesCPULimit !== \"\" ||\n fields.tenantSize.resourcesMemoryRequest !== \"\" ||\n fields.tenantSize.resourcesMemoryLimit !== \"\"\n ) {\n dataSend.pools[0].resources = {};\n // requests\n if (\n fields.tenantSize.resourcesCPURequest !== \"\" ||\n fields.tenantSize.resourcesMemoryRequest !== \"\"\n ) {\n dataSend.pools[0].resources.requests = {};\n if (fields.tenantSize.resourcesCPURequest !== \"\") {\n dataSend.pools[0].resources.requests.cpu = parseInt(\n fields.tenantSize.resourcesCPURequest\n );\n }\n if (fields.tenantSize.resourcesMemoryRequest !== \"\") {\n dataSend.pools[0].resources.requests.memory = parseInt(\n fields.tenantSize.resourcesMemoryRequest\n );\n }\n }\n // limits\n if (\n fields.tenantSize.resourcesCPULimit !== \"\" ||\n fields.tenantSize.resourcesMemoryLimit !== \"\"\n ) {\n dataSend.pools[0].resources.limits = {};\n if (fields.tenantSize.resourcesCPULimit !== \"\") {\n dataSend.pools[0].resources.limits.cpu = parseInt(\n fields.tenantSize.resourcesCPULimit\n );\n }\n if (fields.tenantSize.resourcesMemoryLimit !== \"\") {\n dataSend.pools[0].resources.limits.memory = parseInt(\n fields.tenantSize.resourcesMemoryLimit\n );\n }\n }\n }\n if (customDockerhub) {\n dataSend = {\n ...dataSend,\n image_registry: {\n registry: imageRegistry,\n username: imageRegistryUsername,\n password: imageRegistryPassword,\n },\n };\n }\n\n if (logSearchCustom) {\n dataSend = {\n ...dataSend,\n logSearchConfiguration: {\n storageClass:\n logSearchSelectedStorageClass === \"default\"\n ? \"\"\n : logSearchSelectedStorageClass,\n storageSize: parseInt(logSearchVolumeSize),\n image: logSearchImage,\n postgres_image: logSearchPostgresImage,\n postgres_init_image: logSearchPostgresInitImage,\n securityContext: logSearchSecurityContext,\n postgres_securityContext: logSearchPostgresSecurityContext,\n },\n };\n } else {\n dataSend = {\n ...dataSend,\n logSearchConfiguration: {\n image: logSearchImage,\n postgres_image: logSearchPostgresImage,\n postgres_init_image: logSearchPostgresInitImage,\n },\n };\n }\n\n if (prometheusCustom) {\n dataSend = {\n ...dataSend,\n prometheusConfiguration: {\n storageClass:\n prometheusSelectedStorageClass === \"default\"\n ? \"\"\n : prometheusSelectedStorageClass,\n storageSize: parseInt(prometheusVolumeSize),\n image: prometheusImage,\n sidecar_image: prometheusSidecarImage,\n init_image: prometheusInitImage,\n securityContext: prometheusSecurityContext,\n },\n };\n } else {\n dataSend = {\n ...dataSend,\n prometheusConfiguration: {\n image: prometheusImage,\n sidecar_image: prometheusSidecarImage,\n init_image: prometheusInitImage,\n },\n };\n }\n\n let tenantCerts: any = null;\n let consoleCerts: any = null;\n let caCerts: any = null;\n let consoleCaCerts: any = null;\n\n if (caCertificates.length > 0) {\n caCerts = {\n ca_certificates: caCertificates\n .map((keyPair: KeyPair) => keyPair.encoded_cert)\n .filter((keyPair) => keyPair),\n };\n }\n\n if (consoleCaCertificates.length > 0) {\n consoleCaCerts = {\n console_ca_certificates: consoleCaCertificates\n .map((keyPair: KeyPair) => keyPair.encoded_cert)\n .filter((keyPair) => keyPair),\n };\n }\n\n if (enableTLS && minioCertificates.length > 0) {\n tenantCerts = {\n minio: minioCertificates\n .map((keyPair: KeyPair) => ({\n crt: keyPair.encoded_cert,\n key: keyPair.encoded_key,\n }))\n .filter((keyPair) => keyPair.crt && keyPair.key),\n };\n }\n\n if (\n enableTLS &&\n consoleCertificate.encoded_cert !== \"\" &&\n consoleCertificate.encoded_key !== \"\"\n ) {\n consoleCerts = {\n console: {\n crt: consoleCertificate.encoded_cert,\n key: consoleCertificate.encoded_key,\n },\n };\n }\n\n if (tenantCerts || consoleCerts || caCerts || consoleCaCerts) {\n dataSend = {\n ...dataSend,\n tls: {\n ...tenantCerts,\n ...consoleCerts,\n ...caCerts,\n ...consoleCaCerts,\n },\n };\n }\n\n if (enableEncryption) {\n let insertEncrypt = {};\n\n switch (encryptionType) {\n case \"gemalto\":\n let gemaltoCAIntroduce = {};\n\n if (gemaltoCA.encoded_cert !== \"\") {\n gemaltoCAIntroduce = {\n ca: gemaltoCA.encoded_cert,\n };\n }\n insertEncrypt = {\n gemalto: {\n keysecure: {\n endpoint: gemaltoEndpoint,\n credentials: {\n token: gemaltoToken,\n domain: gemaltoDomain,\n retry: parseInt(gemaltoRetry),\n },\n tls: {\n ...gemaltoCAIntroduce,\n },\n },\n },\n };\n break;\n case \"aws\":\n insertEncrypt = {\n aws: {\n secretsmanager: {\n endpoint: awsEndpoint,\n region: awsRegion,\n kmskey: awsKMSKey,\n credentials: {\n accesskey: awsAccessKey,\n secretkey: awsSecretKey,\n token: awsToken,\n },\n },\n },\n };\n break;\n case \"azure\":\n insertEncrypt = {\n azure: {\n keyvault: {\n endpoint: azureEndpoint,\n credentials: {\n tenant_id: azureTenantID,\n client_id: azureClientID,\n client_secret: azureClientSecret,\n },\n },\n },\n };\n break;\n case \"gcp\":\n insertEncrypt = {\n gcp: {\n secretmanager: {\n project_id: gcpProjectID,\n endpoint: gcpEndpoint,\n credentials: {\n client_email: gcpClientEmail,\n client_id: gcpClientID,\n private_key_id: gcpPrivateKeyID,\n private_key: gcpPrivateKey,\n },\n },\n },\n };\n break;\n case \"vault\":\n let vaultKeyPair = null;\n let vaultCAInsert = null;\n if (\n vaultCertificate.encoded_key !== \"\" &&\n vaultCertificate.encoded_cert !== \"\"\n ) {\n vaultKeyPair = {\n key: vaultCertificate.encoded_key,\n crt: vaultCertificate.encoded_cert,\n };\n }\n if (vaultCA.encoded_cert !== \"\") {\n vaultCAInsert = {\n ca: vaultCA.encoded_cert,\n };\n }\n let vaultTLS = null;\n if (vaultKeyPair || vaultCA) {\n vaultTLS = {\n tls: {\n ...vaultKeyPair,\n ...vaultCAInsert,\n },\n };\n }\n insertEncrypt = {\n vault: {\n endpoint: vaultEndpoint,\n engine: vaultEngine,\n namespace: vaultNamespace,\n prefix: vaultPrefix,\n approle: {\n engine: vaultAppRoleEngine,\n id: vaultId,\n secret: vaultSecret,\n retry: parseInt(vaultRetry),\n },\n ...vaultTLS,\n status: {\n ping: parseInt(vaultPing),\n },\n },\n };\n break;\n }\n\n let encryptionServerKeyPair: any = {};\n let encryptionClientKeyPair: any = {};\n\n if (\n clientCertificate.encoded_key !== \"\" &&\n clientCertificate.encoded_cert !== \"\"\n ) {\n encryptionClientKeyPair = {\n client: {\n key: clientCertificate.encoded_key,\n crt: clientCertificate.encoded_cert,\n },\n };\n }\n\n if (\n serverCertificate.encoded_key !== \"\" &&\n serverCertificate.encoded_cert !== \"\"\n ) {\n encryptionServerKeyPair = {\n server: {\n key: serverCertificate.encoded_key,\n crt: serverCertificate.encoded_cert,\n },\n };\n }\n\n dataSend = {\n ...dataSend,\n encryption: {\n replicas: kesReplicas,\n securityContext: kesSecurityContext,\n image: kesImage,\n ...encryptionClientKeyPair,\n ...encryptionServerKeyPair,\n ...insertEncrypt,\n },\n };\n }\n\n let dataIDP: any = {};\n switch (idpSelection) {\n case \"Built-in\":\n let keyarray = [];\n for (let i = 0; i < accessKeys.length; i++) {\n keyarray.push({\n access_key: accessKeys[i],\n secret_key: secretKeys[i],\n });\n }\n dataIDP = {\n keys: keyarray,\n };\n break;\n case \"OpenID\":\n dataIDP = {\n oidc: {\n configuration_url: openIDConfigurationURL,\n client_id: openIDClientID,\n secret_id: openIDSecretID,\n claim_name: openIDClaimName,\n callback_url: openIDCallbackURL,\n scopes: openIDScopes,\n },\n };\n break;\n case \"AD\":\n dataIDP = {\n active_directory: {\n url: ADURL,\n skip_tls_verification: ADSkipTLS,\n server_insecure: ADServerInsecure,\n username_format: ADUserNameFormat,\n username_search_filter: ADUserNameSearchFilter,\n group_search_base_dn: ADGroupSearchBaseDN,\n group_search_filter: ADGroupSearchFilter,\n group_name_attribute: ADGroupNameAttribute,\n user_dns: ADUserDNs,\n lookup_bind_dn: ADLookupBindDN,\n lookup_bind_password: ADLookupBindPassword,\n user_dn_search_base_dn: ADUserDNSearchBaseDN,\n user_dn_search_filter: ADUserDNSearchFilter,\n server_start_tls: ADServerStartTLS,\n },\n };\n break;\n }\n\n dataSend = {\n ...dataSend,\n idp: { ...dataIDP },\n };\n api\n .invoke(\"POST\", `/api/v1/tenants`, dataSend)\n .then((res) => {\n const consoleSAList = get(res, \"console\", []);\n\n let newSrvAcc: NewServiceAccount = {\n idp: get(res, \"externalIDP\", false),\n console: [],\n };\n\n if (consoleSAList) {\n if (Array.isArray(consoleSAList)) {\n const consoleItem = consoleSAList.map((consoleKey) => {\n return {\n accessKey: consoleKey.access_key,\n secretKey: consoleKey.secret_key,\n };\n });\n\n newSrvAcc.console = consoleItem;\n } else {\n newSrvAcc = {\n console: {\n accessKey: res.console.access_key,\n secretKey: res.console.secret_key,\n },\n };\n }\n }\n setAddSending(false);\n setShowNewCredentials(true);\n setCreatedAccount(newSrvAcc);\n })\n .catch((err: ErrorResponseHandler) => {\n setAddSending(false);\n setErrorSnackMessage(err);\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [addSending]);\n\n const cancelButton = {\n label: \"Cancel\",\n type: \"other\",\n enabled: true,\n action: () => {\n resetAddTenantForm();\n history.push(\"/tenants\");\n },\n };\n const requiredPages = [\n \"nameTenant\",\n \"tenantSize\",\n \"configure\",\n \"affinity\",\n \"identityProvider\",\n \"security\",\n \"encryption\",\n ];\n const createButton = {\n label: \"Create\",\n type: \"submit\",\n enabled:\n !addSending &&\n selectedStorageClass !== \"\" &&\n requiredPages.every((v) => validPages.includes(v)),\n action: () => {\n setAddSending(true);\n },\n };\n\n const wizardSteps: IWizardElement[] = [\n {\n label: \"Setup\",\n componentRender: ,\n buttons: [cancelButton, createButton],\n },\n {\n label: \"Configure\",\n advancedOnly: true,\n componentRender: ,\n buttons: [cancelButton, createButton],\n },\n {\n label: \"Images\",\n advancedOnly: true,\n componentRender: ,\n buttons: [cancelButton, createButton],\n },\n {\n label: \"Pod Placement\",\n advancedOnly: true,\n componentRender: ,\n buttons: [cancelButton, createButton],\n },\n {\n label: \"Identity Provider\",\n advancedOnly: true,\n componentRender: ,\n buttons: [cancelButton, createButton],\n },\n {\n label: \"Security\",\n advancedOnly: true,\n componentRender: ,\n buttons: [cancelButton, createButton],\n },\n {\n label: \"Encryption\",\n advancedOnly: true,\n componentRender: ,\n buttons: [cancelButton, createButton],\n },\n ];\n\n let filteredWizardSteps = wizardSteps;\n\n const closeCredentialsModal = () => {\n resetAddTenantForm();\n history.push(\"/tenants\");\n };\n\n return (\n \n {showNewCredentials && (\n {\n closeCredentialsModal();\n }}\n entity=\"Tenant\"\n />\n )}\n \n \n \n {addSending && (\n \n \n \n )}\n \n \n \n \n \n );\n};\n\nconst mapState = (state: AppState) => ({\n namespace: state.tenants.createTenant.fields.nameTenant.namespace,\n validPages: state.tenants.createTenant.validPages,\n fields: state.tenants.createTenant.fields,\n certificates: state.tenants.createTenant.certificates,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n});\n\nconst connector = connect(mapState, {\n setErrorSnackMessage,\n updateAddField,\n resetAddTenantForm,\n});\n\nexport default withStyles(styles)(connector(AddTenant));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport get from \"lodash/get\";\nimport { ITenant } from \"./types\";\n\nexport interface Opts {\n label: string;\n value: string;\n}\n\nexport interface IQuotaElement {\n hard: number;\n name: string;\n}\n\nexport interface IQuotas {\n elements?: IQuotaElement[];\n name: string;\n}\n\nexport const minMemReq = 2147483648;\n\nexport interface KeyPair {\n id: string;\n encoded_cert: string;\n encoded_key: string;\n cert: string;\n key: string;\n}\n\nexport const ecListTransform = (ecList: string[]): Opts[] => {\n return ecList.map((value) => {\n return { label: value, value };\n });\n};\n\nexport const getLimitSizes = (resourceQuotas: IQuotas) => {\n const quotas: IQuotaElement[] = get(resourceQuotas, \"elements\", []);\n\n const returnQuotas: any = {};\n\n quotas.forEach((rsQuota) => {\n const stCName = rsQuota.name.split(\n \".storageclass.storage.k8s.io/requests.storage\"\n )[0];\n const hard = get(rsQuota, \"hard\", 0);\n const used = get(rsQuota, \"used\", 0);\n\n returnQuotas[stCName] = hard - used;\n });\n\n return returnQuotas;\n};\n\nexport const tenantIsOnline = (tenant: ITenant): boolean => {\n if (tenant.currentState === \"\") {\n return false;\n }\n if (\n !tenant.status &&\n tenant.health_status !== \"green\" &&\n tenant.health_status !== \"yellow\"\n ) {\n return false;\n }\n if (\n tenant.status &&\n tenant.status.health_status !== \"green\" &&\n tenant.status.health_status !== \"yellow\"\n ) {\n return false;\n }\n return true;\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport { IAffinityModel } from \"../../../../common/types\";\n\nexport const getDefaultAffinity = (tenantName: string, poolName: string) => {\n const defaultAffinity: IAffinityModel = {\n podAntiAffinity: {\n requiredDuringSchedulingIgnoredDuringExecution: [\n {\n labelSelector: {\n matchExpressions: [\n {\n key: \"v1.min.io/tenant\",\n operator: \"In\",\n values: [tenantName],\n },\n {\n key: \"v1.min.io/pool\",\n operator: \"In\",\n values: [poolName],\n },\n ],\n },\n topologyKey: \"kubernetes.io/hostname\",\n },\n ],\n },\n };\n return defaultAffinity;\n};\n\nexport const getNodeSelector = (\n labels: string,\n withPodAntiAffinity: boolean,\n tenantName: string,\n poolName: string\n) => {\n // Labels in the form of key1=value1&key2=value2&key3=value3...\n const splittedLabels = labels.split(\"&\");\n let matchExpressions: any = [];\n\n splittedLabels.forEach((label: string) => {\n const splitKeyValue = label.split(\"=\");\n if (splitKeyValue.length === 2) {\n matchExpressions.push({\n key: splitKeyValue[0],\n operator: \"In\",\n values: [splitKeyValue[1]],\n });\n }\n });\n\n const nodeSelector: IAffinityModel = {\n nodeAffinity: {\n requiredDuringSchedulingIgnoredDuringExecution: {\n nodeSelectorTerms: [\n {\n matchExpressions: matchExpressions,\n },\n ],\n },\n },\n };\n if (withPodAntiAffinity) {\n const def = getDefaultAffinity(tenantName, poolName);\n nodeSelector.podAntiAffinity = def.podAntiAffinity;\n }\n console.log(nodeSelector);\n return nodeSelector;\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport { ITenant } from \"./ListTenants/types\";\nimport { Opts } from \"./ListTenants/utils\";\nimport {\n ADD_TENANT_ADD_CA_KEYPAIR,\n ADD_TENANT_ADD_CONSOLE_CA_KEYPAIR,\n ADD_TENANT_ADD_CONSOLE_CERT,\n ADD_TENANT_ADD_FILE_TO_CA_KEYPAIR,\n ADD_TENANT_ADD_FILE_TO_CONSOLE_CA_KEYPAIR,\n ADD_TENANT_ADD_FILE_TO_MINIO_KEYPAIR,\n ADD_TENANT_ADD_MINIO_KEYPAIR,\n ADD_TENANT_DELETE_CA_KEYPAIR,\n ADD_TENANT_DELETE_CONSOLE_CA_KEYPAIR,\n ADD_TENANT_DELETE_MINIO_KEYPAIR,\n ADD_TENANT_ENCRYPTION_CLIENT_CERT,\n ADD_TENANT_ENCRYPTION_GEMALTO_CA,\n ADD_TENANT_ENCRYPTION_SERVER_CERT,\n ADD_TENANT_ENCRYPTION_VAULT_CA,\n ADD_TENANT_ENCRYPTION_VAULT_CERT,\n ADD_TENANT_RESET_FORM,\n ADD_TENANT_SET_CURRENT_PAGE,\n ADD_TENANT_SET_LIMIT_SIZE,\n ADD_TENANT_SET_PAGE_VALID,\n ADD_TENANT_SET_STORAGE_CLASSES_LIST,\n ADD_TENANT_UPDATE_FIELD,\n TENANT_DETAILS_SET_CURRENT_TENANT,\n TENANT_DETAILS_SET_LOADING,\n TENANT_DETAILS_SET_TAB,\n TENANT_DETAILS_SET_TENANT,\n ADD_TENANT_SET_KEY_PAIR_VALUE,\n LabelKeyPair,\n} from \"./types\";\n\n// Basic actions\nexport const setWizardPage = (page: number) => {\n return {\n type: ADD_TENANT_SET_CURRENT_PAGE,\n page,\n };\n};\n\nexport const updateAddField = (\n pageName: string,\n fieldName: string,\n value: any\n) => {\n return {\n type: ADD_TENANT_UPDATE_FIELD,\n pageName,\n field: fieldName,\n value,\n };\n};\n\nexport const isPageValid = (pageName: string, valid: boolean) => {\n return {\n type: ADD_TENANT_SET_PAGE_VALID,\n pageName,\n valid,\n };\n};\n\n// Name Tenant actions\n\nexport const setStorageClassesList = (storageClasses: Opts[]) => {\n return {\n type: ADD_TENANT_SET_STORAGE_CLASSES_LIST,\n storageClasses,\n };\n};\n\nexport const setLimitSize = (limitSize: any) => {\n return {\n type: ADD_TENANT_SET_LIMIT_SIZE,\n limitSize,\n };\n};\n\n// Security actions\n\nexport const addCaCertificate = () => {\n return {\n type: ADD_TENANT_ADD_CA_KEYPAIR,\n };\n};\n\nexport const deleteCaCertificate = (id: string) => {\n return {\n type: ADD_TENANT_DELETE_CA_KEYPAIR,\n id,\n };\n};\n\nexport const addFileToCaCertificates = (\n id: string,\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ADD_FILE_TO_CA_KEYPAIR,\n id,\n key,\n fileName,\n value,\n };\n};\n\nexport const addConsoleCaCertificate = () => {\n return {\n type: ADD_TENANT_ADD_CONSOLE_CA_KEYPAIR,\n };\n};\n\nexport const deleteConsoleCaCertificate = (id: string) => {\n return {\n type: ADD_TENANT_DELETE_CONSOLE_CA_KEYPAIR,\n id,\n };\n};\n\nexport const addFileToConsoleCaCertificates = (\n id: string,\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ADD_FILE_TO_CONSOLE_CA_KEYPAIR,\n id,\n key,\n fileName,\n value,\n };\n};\n\nexport const addKeyPair = () => {\n return {\n type: ADD_TENANT_ADD_MINIO_KEYPAIR,\n };\n};\n\nexport const deleteKeyPair = (id: string) => {\n return {\n type: ADD_TENANT_DELETE_MINIO_KEYPAIR,\n id,\n };\n};\n\nexport const addFileToKeyPair = (\n id: string,\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ADD_FILE_TO_MINIO_KEYPAIR,\n id,\n key,\n fileName,\n value,\n };\n};\n\nexport const addConsoleCertificate = (\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ADD_CONSOLE_CERT,\n key,\n fileName,\n value,\n };\n};\n\nexport const addFileServerCert = (\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ENCRYPTION_SERVER_CERT,\n key,\n fileName,\n value,\n };\n};\n\nexport const addFileClientCert = (\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ENCRYPTION_CLIENT_CERT,\n key,\n fileName,\n value,\n };\n};\n\nexport const addFileVaultCert = (\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ENCRYPTION_VAULT_CERT,\n key,\n fileName,\n value,\n };\n};\n\nexport const addFileVaultCa = (fileName: string, value: string) => {\n return {\n type: ADD_TENANT_ENCRYPTION_VAULT_CA,\n fileName,\n value,\n };\n};\n\nexport const addFileGemaltoCa = (fileName: string, value: string) => {\n return {\n type: ADD_TENANT_ENCRYPTION_GEMALTO_CA,\n fileName,\n value,\n };\n};\n\nexport const resetAddTenantForm = () => {\n return {\n type: ADD_TENANT_RESET_FORM,\n };\n};\n\nexport const setTenantDetailsLoad = (loading: boolean) => {\n return {\n type: TENANT_DETAILS_SET_LOADING,\n state: loading,\n };\n};\n\nexport const setTenantName = (tenantName: string, tenantNamespace: string) => {\n return {\n type: TENANT_DETAILS_SET_CURRENT_TENANT,\n name: tenantName,\n namespace: tenantNamespace,\n };\n};\n\nexport const setTenantInfo = (tenant: ITenant | null) => {\n return {\n type: TENANT_DETAILS_SET_TENANT,\n tenant,\n };\n};\n\nexport const setTenantTab = (tab: string) => {\n return {\n type: TENANT_DETAILS_SET_TAB,\n tab,\n };\n};\n\nexport const setKeyValuePairs = (newArray: LabelKeyPair[]) => {\n return {\n type: ADD_TENANT_SET_KEY_PAIR_VALUE,\n newArray,\n };\n};\n","import React from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport { Theme } from \"@mui/material/styles\";\n\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n errorBlock: {\n color: theme.palette?.error.main || \"#C83B51\",\n },\n });\n\ninterface IErrorBlockProps {\n classes: any;\n errorMessage: string;\n withBreak?: boolean;\n}\n\nconst ErrorBlock = ({\n classes,\n errorMessage,\n withBreak = true,\n}: IErrorBlockProps) => {\n return (\n \n {withBreak &&
}\n \n {errorMessage}\n \n
\n );\n};\n\nexport default withStyles(styles)(ErrorBlock);\n"],"names":["withStyles","theme","createStyles","link","display","alignItems","textDecoration","maxWidth","padding","color","palette","primary","light","fontSize","icon","marginRight","justifyContent","width","to","label","classes","className","executeOnClick","onClick","root","marginLeft","borderWidth","borderColor","borderStyle","borderRadius","backgroundColor","main","opacity","contained","background","dark","children","variant","tooltip","rest","button","clsx","title","container","flexFlow","inputWithCopy","height","inputLabel","fieldBasic","value","OutlinedInput","readOnly","endAdornment","InputAdornment","position","text","BoxIconButton","onMouseDown","edge","warningBlock","margin","credentialTitle","fontWeight","buttonContainer","textAlign","marginTop","credentialsPanel","overflowY","maxHeight","promptTitle","buttonSpacer","promptIcon","newServiceAccount","open","closeModal","entity","consoleCreds","get","idp","ModalWrapper","modalOpen","onClose","titleIcon","Grid","item","xs","formScrollable","Array","isArray","map","credentialsPair","index","accessKey","secretKey","WarnIcon","Button","consoleExtras","cCreds","itemMap","access_key","secret_key","console","filename","element","document","createElement","setAttribute","encodeURIComponent","style","body","appendChild","click","removeChild","download","JSON","stringify","endIcon","tooltipHelper","valueString","whiteSpace","overflow","textOverflow","fileInputField","fileInputStyles","textBoxContainer","border","paddingLeft","onChange","id","name","disabled","required","error","accept","useState","showFileSelector","setShowSelector","fieldBottom","fieldContainer","errorInField","InputLabel","htmlFor","fieldLabelError","tooltipContainer","Tooltip","placement","HelpIcon","type","e","fileName","evt","callback","file","target","files","reader","FileReader","readAsDataURL","onload","fileBase64","result","fileArray","toString","split","length","fileProcess","data","IconButton","component","disableRipple","disableFocusRipple","size","Cancel","ErrorBlock","errorMessage","fileReselect","AttachFile","radioStyles","makeStyles","radioIcons","RadioButton","props","checkedIcon","radioSelectedIcon","radioUnselectedIcon","optionLabel","checkedOption","selectorOptions","currentSelection","disableOptions","displayInColumn","radioOptionsLayout","row","selectorOption","control","SelectStyled","lineHeight","spacing","input","InputBase","options","fullWidth","option","wizardStepContainer","flexDirection","flex","wizardComponent","marginBottom","minHeight","wizardModal","buttonsContainer","borderTop","paddingBottom","buttonInnerContainer","page","pageChange","loadingStep","forModal","componentRender","LinearProgress","buttons","btn","toPage","action","buttonAction","enabled","wizFromContainer","wizFromModal","modalWizardSteps","borderBottom","listStyle","buttonList","cursor","outline","boxShadow","paddedContentGrid","stepsLabel","stepsMasterContainer","top","verticalSteps","borderRight","stepsContainer","paddingTop","stepItem","wizardSteps","currentStep","setCurrentStep","toElement","lastPage","nextPage","prevPage","pg","Fragment","step","sm","md","lg","xl","List","dense","ListItem","selected","ListItemText","pageContentStyles","contentSpacer","mapDispatchToProps","toggleList","connector","connect","state","sidebarOpen","system","operatorMode","managerObjects","objectBrowser","objectManager","objectsToManage","headerContainer","left","labelStyle","rightMenu","logo","fill","middleComponent","actions","direction","sx","IMkEnvs","storageClasses","tenants","createTenant","customImage","fields","configure","imageName","customDockerhub","imageRegistry","imageRegistryUsername","imageRegistryPassword","exposeMinIO","exposeConsole","prometheusCustom","tenantCustom","logSearchCustom","logSearchVolumeSize","logSearchSizeFactor","prometheusVolumeSize","prometheusSizeFactor","logSearchSelectedStorageClass","logSearchImage","kesImage","logSearchPostgresImage","logSearchPostgresInitImage","prometheusSelectedStorageClass","prometheusImage","prometheusSidecarImage","prometheusInitImage","selectedStorageClass","nameTenant","tenantSecurityContext","logSearchSecurityContext","logSearchPostgresSecurityContext","prometheusSecurityContext","updateAddField","isPageValid","configSectionItem","tenantCustomizationFields","containerItem","fieldGroup","createTenantCommon","responsiveSectionItem","logSearchCustomFields","fieldSpaceTop","prometheusCustomFields","modalBasic","wizardCommon","validationErrors","setValidationErrors","configureSTClasses","updateField","useCallback","field","useEffect","customAccountValidation","fieldKey","runAsUser","customValidation","parseInt","customValidationMessage","runAsGroup","fsGroup","pattern","customPatternMessage","commonVal","commonFormValidation","Object","keys","filter","cleanValidation","fieldName","clearValidationError","Paper","paperWrapper","headerElement","h3Section","descriptionText","FormSwitchWrapper","checked","multiContainer","InputBoxWrapper","min","runAsNonRoot","SelectWrapper","idpSelection","identityProvider","accessKeys","secretKeys","openIDConfigurationURL","openIDClientID","openIDSecretID","openIDCallbackURL","openIDClaimName","openIDScopes","ADURL","ADSkipTLS","ADServerInsecure","ADUserNameSearchFilter","ADGroupSearchBaseDN","ADGroupSearchFilter","ADGroupNameAttribute","ADUserDNs","ADUserNameFormat","ADLookupBindDN","ADLookupBindPassword","ADUserDNSearchBaseDN","ADUserDNSearchFilter","ADServerStartTLS","shortened","gridTemplateColumns","gridGap","buttonTray","overlayAction","protocolRadioOptions","adUserDnRows","formFieldStyles","updateUserField","newUserField","updatePwordField","updateADUserField","newADUserDNsField","customIDPValidation","i","push","inputs","_","placeholder","Add","splice","RemoveIcon","getRandomString","Casino","Delete","RadioGroupSelector","formFieldRow","Typography","gutterBottom","enableTLS","security","enableAutoCert","enableCustomCerts","minioCertificates","certificates","caCertificates","addFileToCaCertificates","deleteCaCertificate","addCaCertificate","addKeyPair","addFileToKeyPair","deleteKeyPair","minioCertificateRows","fileItem","minWidth","minioCertsContainer","minioCACertsRow","rowActions","keyPair","FileSelector","encodedValue","cert","key","AddIcon","replicas","encryption","enableEncryption","encryptionType","gemaltoEndpoint","gemaltoToken","gemaltoDomain","gemaltoRetry","awsEndpoint","awsRegion","awsKMSKey","awsAccessKey","awsSecretKey","awsToken","vaultEndpoint","vaultEngine","vaultNamespace","vaultPrefix","vaultAppRoleEngine","vaultId","vaultSecret","vaultRetry","vaultPing","azureEndpoint","azureTenantID","azureClientID","azureClientSecret","gcpProjectID","gcpEndpoint","gcpClientEmail","gcpClientID","gcpPrivateKeyID","gcpPrivateKey","enableCustomCertsForKES","serverCertificate","clientCertificate","vaultCertificate","vaultCA","gemaltoCA","kesSecurityContext","addFileServerCert","addFileClientCert","addFileVaultCert","addFileVaultCa","addFileGemaltoCa","encryptionTypeOptions","mutualTlsConfig","rightSpacer","responsiveContainer","encryptionAvailable","encoded_key","encoded_cert","encryptionValidation","podAffinity","affinity","nodeSelectorLabels","withPodAntiAffinity","keyValuePairs","nodeSelectorPairs","setModalErrorSnackMessage","setKeyValuePairs","affinityConfigField","affinityFieldLabel","radioField","affinityLabelKey","affinityLabelValue","affinityRow","loading","setLoading","keyValueMap","setKeyValueMap","keyOptions","setKeyOptions","api","then","res","k","catch","err","vl","kvp","kvs","a","indexOf","join","valid","splittedLabels","forEach","splitItem","affinityHelpText","newKey","arrCp","assign","v","setErrorSnackMessage","wrapText","wordWrap","deleteDialogStyles","namespace","addNamespaceOpen","closeAddNamespaceModalAndRefresh","addNamespaceLoading","setAddNamespaceLoading","ConfirmDialog","confirmText","confirmButtonProps","isOpen","isLoading","onConfirm","confirmationContent","DialogContentText","volumeSize","tenantSize","sizeFactor","drivesPerServer","nodes","memoryNode","ecParity","ecParityChoices","cleanECChoices","resourcesSize","distribution","ecParityCalc","limitSize","cpuToUse","integrationSelection","table","usableInformation","storageFactors","find","erasureCode","Divider","Table","TableBody","TableRow","TableCell","scope","align","typeSelection","storageClass","disks","niceBytes","pvSize","persistentVolumes","rawCapacity","maxCapacity","Math","floor","maxFailureTolerations","CPU","memory","driveSize","sizeUnit","maxAllocatableResources","maxCPUsUse","maxMemorySize","resourcesSpecifyLimit","resourcesCPURequestError","resourcesCPURequest","resourcesCPULimitError","resourcesCPULimit","resourcesMemoryRequestError","resourcesMemoryRequest","resourcesMemoryLimitError","resourcesMemoryLimit","compositeFieldContainer","compositeAddOn","memoryExists","cpuExists","maxMemory","mem_priority","max_allocatable_mem","cpu_priority","max_allocatable_cpu","maxAllocatableCPU","baseCpuUse","max","baseMemoryUse","isNaN","validity","log","errorFlag","setErrorFlag","nodeError","setNodeError","ecCodeValidated","erasureCodeCalc","includes","defaultEC","factor","getBytes","clusterCapacity","unit","distrCalculate","calculateDistribution","parsedSize","commonValidation","trim","ecList","ecListTransform","k8sfactorForDropdown","selectedStorageType","formToRender","updateMainField","undefined","setConfigs","mkPanelConfigurations","mainSelection","resourcesConfigurations","aws","azure","gcp","variantSelectorLabel","variantSelectorValues","configurations","sizingComponent","default","tenantName","setStorageClassesList","setLimitSize","sizePreview","emptyNamespace","setEmptyNamespace","loadingNamespaceInfo","setLoadingNamespaceInfo","showCreateButton","setShowCreateButton","openAddNSConfirm","setOpenAddNSConfirm","getNamespaceInformation","tenantsList","elements","getLimitSizes","newStorage","stExists","findIndex","detailedError","debounceNamespace","useMemo","debounce","cancel","customNamespaceError","isValid","frmValidationCleanup","refresh","overlayIcon","features","session","formRender","setFormRender","setConfiguration","validPages","resetAddTenantForm","pageBox","settingsCommon","showNewCredentials","setShowNewCredentials","createdAccount","setCreatedAccount","addSending","setAddSending","consoleCaCertificates","consoleCertificate","affinityType","kesReplicas","poolName","generatePoolName","affinityObject","getDefaultAffinity","getNodeSelector","dataSend","access_keys","secret_keys","enable_tls","enable_console","enable_prometheus","service_name","image","expose_minio","expose_console","pools","servers","volumes_per_server","volume_configuration","storage_class_name","securityContext","erasureCodingParity","resources","requests","cpu","limits","image_registry","registry","username","password","logSearchConfiguration","storageSize","postgres_image","postgres_init_image","postgres_securityContext","prometheusConfiguration","sidecar_image","init_image","tenantCerts","consoleCerts","caCerts","consoleCaCerts","ca_certificates","console_ca_certificates","minio","crt","tls","insertEncrypt","gemaltoCAIntroduce","ca","gemalto","keysecure","endpoint","credentials","token","domain","retry","secretsmanager","region","kmskey","accesskey","secretkey","keyvault","tenant_id","client_id","client_secret","secretmanager","project_id","client_email","private_key_id","private_key","vaultKeyPair","vaultCAInsert","vaultTLS","vault","engine","prefix","approle","secret","status","ping","encryptionServerKeyPair","encryptionClientKeyPair","client","server","dataIDP","keyarray","oidc","configuration_url","secret_id","claim_name","callback_url","scopes","active_directory","url","skip_tls_verification","server_insecure","username_format","username_search_filter","group_search_base_dn","group_search_filter","group_name_attribute","user_dns","lookup_bind_dn","lookup_bind_password","user_dn_search_base_dn","user_dn_search_filter","server_start_tls","consoleSAList","newSrvAcc","consoleItem","consoleKey","cancelButton","history","createButton","every","filteredWizardSteps","advancedOnly","CredentialsPrompt","PageHeader","BackLink","PageLayout","GenericWizard","resourceQuotas","quotas","returnQuotas","rsQuota","stCName","hard","used","tenantIsOnline","tenant","currentState","health_status","podAntiAffinity","requiredDuringSchedulingIgnoredDuringExecution","labelSelector","matchExpressions","operator","values","topologyKey","labels","splitKeyValue","nodeSelector","nodeAffinity","nodeSelectorTerms","def","pageName","ADD_TENANT_UPDATE_FIELD","ADD_TENANT_SET_PAGE_VALID","ADD_TENANT_SET_STORAGE_CLASSES_LIST","ADD_TENANT_SET_LIMIT_SIZE","ADD_TENANT_ADD_CA_KEYPAIR","ADD_TENANT_DELETE_CA_KEYPAIR","ADD_TENANT_ADD_FILE_TO_CA_KEYPAIR","ADD_TENANT_ADD_MINIO_KEYPAIR","ADD_TENANT_DELETE_MINIO_KEYPAIR","ADD_TENANT_ADD_FILE_TO_MINIO_KEYPAIR","ADD_TENANT_ENCRYPTION_SERVER_CERT","ADD_TENANT_ENCRYPTION_CLIENT_CERT","ADD_TENANT_ENCRYPTION_VAULT_CERT","ADD_TENANT_ENCRYPTION_VAULT_CA","ADD_TENANT_ENCRYPTION_GEMALTO_CA","ADD_TENANT_RESET_FORM","setTenantDetailsLoad","TENANT_DETAILS_SET_LOADING","setTenantName","tenantNamespace","TENANT_DETAILS_SET_CURRENT_TENANT","setTenantInfo","TENANT_DETAILS_SET_TENANT","setTenantTab","tab","TENANT_DETAILS_SET_TAB","newArray","ADD_TENANT_SET_KEY_PAIR_VALUE","errorBlock","withBreak"],"sourceRoot":""} \ No newline at end of file diff --git a/portal-ui/build/static/js/1056.e9bc9546.chunk.js b/portal-ui/build/static/js/1056.e9bc9546.chunk.js deleted file mode 100644 index 2f03141d1..000000000 --- a/portal-ui/build/static/js/1056.e9bc9546.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1056],{29316:function(e,t,n){n(50390);var a=n(6369),r=n(86509),s=n(4285),i=n(77138),o=n(62559);t.Z=(0,s.Z)((function(e){return(0,r.Z)({link:{display:"flex",alignItems:"center",textDecoration:"none",maxWidth:"300px",padding:"2rem 2rem 0rem 2rem",color:e.palette.primary.light,fontSize:".8rem","&:hover":{textDecoration:"underline"}},icon:{marginRight:".3rem",display:"flex",alignItems:"center",justifyContent:"center","& svg.min-icon":{width:12}}})}))((function(e){var t=e.to,n=e.label,r=e.classes,s=e.className;return(0,o.jsxs)(a.rU,{to:t,className:"".concat(r.link," ").concat(s||""),children:[(0,o.jsx)("div",{className:r.icon,children:(0,o.jsx)(i.xN,{})}),(0,o.jsx)("div",{className:r.label,children:n})]})}))},70758:function(e,t,n){var a=n(18489),r=n(36222),s=n(83738),i=(n(50390),n(86509)),o=n(4285),l=n(95467),c=n(94187),d=n(44977),u=n(62559),m=["classes","children","variant","tooltip"];t.Z=(0,o.Z)((function(e){return(0,i.Z)({root:{padding:8,marginLeft:8,borderWidth:1,borderColor:"#696969",color:"#696969",borderStyle:"solid",borderRadius:3,"& .min-icon":{width:20},"& .MuiTouchRipple-root span":{backgroundColor:e.palette.primary.main,borderRadius:3,opacity:.3},"&:disabled":{color:"#EBEBEB",borderColor:"#EBEBEB"}},contained:{borderColor:e.palette.primary.main,background:e.palette.primary.main,color:"white","& .MuiTouchRipple-root span":{backgroundColor:e.palette.primary.dark,borderRadius:3,opacity:.3},"&:hover":{backgroundColor:e.palette.primary.light,color:"#FFF"}}})}))((function(e){var t=e.classes,n=e.children,i=e.variant,o=void 0===i?"outlined":i,p=e.tooltip,g=(0,s.Z)(e,m),f=(0,u.jsx)(l.Z,(0,a.Z)((0,a.Z)({},g),{},{className:(0,d.Z)(t.root,(0,r.Z)({},t.contained,"contained"===o)),children:n}));return p&&""!==p?(0,u.jsx)(c.Z,{title:p,children:(0,u.jsx)("span",{children:f})}):f}))},39080:function(e,t,n){n.r(t),n.d(t,{default:function(){return Z}});var a=n(18489),r=n(35531),s=n(50390),i=n(38342),o=n.n(i),l=n(86509),c=n(4285),d=n(66946),u=n(76352),m=n(25594),p=n(58217),g=n(65771),f=n(70758),h=n(33034),x=n.n(h),v=n(77138),y=n(72462),C=n(62559),S=(0,c.Z)((function(e){return(0,l.Z)({container:{display:"flex",flexFlow:"column",padding:"20px 0 8px 0"},inputWithCopy:{"& .MuiInputBase-root ":{width:"100%",background:"#FBFAFA","& .MuiInputBase-input":{height:".8rem"},"& .MuiInputAdornment-positionEnd":{marginRight:".5rem","& .MuiButtonBase-root":{height:"2rem"}}},"& .MuiButtonBase-root .min-icon":{width:".8rem",height:".8rem"}},inputLabel:(0,a.Z)((0,a.Z)({},y.YI.inputLabel),{},{fontSize:".8rem"})})}))((function(e){var t=e.label,n=void 0===t?"":t,a=e.value,r=void 0===a?"":a,s=e.classes,i=void 0===s?{}:s;return(0,C.jsxs)("div",{className:i.container,children:[(0,C.jsxs)("div",{className:i.inputLabel,children:[n,":"]}),(0,C.jsx)("div",{className:i.inputWithCopy,children:(0,C.jsx)(p.Z,{value:r,readOnly:!0,endAdornment:(0,C.jsx)(g.Z,{position:"end",children:(0,C.jsx)(x(),{text:r,children:(0,C.jsx)(f.Z,{"aria-label":"copy",tooltip:"Copy",onClick:function(){},onMouseDown:function(){},edge:"end",children:(0,C.jsx)(v.TI,{})})})})})})]})})),j=n(47424),Z=(0,c.Z)((function(e){return(0,l.Z)({warningBlock:{color:"red",fontSize:".85rem",margin:".5rem 0 .5rem 0",display:"flex",alignItems:"center","& svg ":{marginRight:".3rem",height:16,width:16}},credentialTitle:{padding:".8rem 0 0 0",fontWeight:600,fontSize:".9rem"},buttonContainer:{textAlign:"right",marginTop:"1rem"},credentialsPanel:{overflowY:"auto",maxHeight:350},promptTitle:{display:"flex",alignItems:"center"},buttonSpacer:{marginRight:".9rem"},promptIcon:{marginRight:".1rem",display:"flex",alignItems:"center",height:"2rem",width:"2rem"}})}))((function(e){var t=e.classes,n=e.newServiceAccount,i=e.open,l=e.closeModal,c=e.entity;if(!n)return null;var p=o()(n,"console",null),g=o()(n,"idp",!1);return(0,C.jsx)(u.Z,{modalOpen:i,onClose:function(){l()},title:(0,C.jsx)("div",{className:t.promptTitle,children:(0,C.jsxs)("div",{children:["New ",c," Created"]})}),titleIcon:(0,C.jsx)(v.tV,{}),children:(0,C.jsxs)(m.ZP,{container:!0,children:[(0,C.jsxs)(m.ZP,{item:!0,xs:12,className:t.formScrollable,children:["A new ",c," has been created with the following details:",!g&&p&&(0,C.jsx)(s.Fragment,{children:(0,C.jsxs)(m.ZP,{item:!0,xs:12,className:t.credentialsPanel,children:[(0,C.jsx)("div",{className:t.credentialTitle,children:"Console Credentials"}),Array.isArray(p)&&p.map((function(e,t){return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(S,{label:"Access Key",value:e.accessKey}),(0,C.jsx)(S,{label:"Secret Key",value:e.secretKey})]})})),!Array.isArray(p)&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(S,{label:"Access Key",value:p.accessKey}),(0,C.jsx)(S,{label:"Secret Key",value:p.secretKey})]})]})}),g?(0,C.jsx)("div",{className:t.warningBlock,children:"Please Login via the configured external identity provider."}):(0,C.jsxs)("div",{className:t.warningBlock,children:[(0,C.jsx)(j.Z,{}),(0,C.jsx)("span",{children:"Write these down, as this is the only time the secret will be displayed."})]})]}),(0,C.jsxs)(m.ZP,{item:!0,xs:12,className:t.buttonContainer,children:[(0,C.jsx)(d.Z,{variant:"outlined",className:t.buttonSpacer,onClick:function(){l()},color:"primary",children:"Done"}),!g&&(0,C.jsx)(d.Z,{onClick:function(){var e={};if(p)if(Array.isArray(p)){var t=p.map((function(e){return{access_key:e.accessKey,secret_key:e.secretKey}}));e={console:(0,r.Z)(t)}}else e={console:[{access_key:p.accessKey,secret_key:p.secretKey}]};!function(e,t){var n=document.createElement("a");n.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}("credentials.json",JSON.stringify((0,a.Z)({},e)))},endIcon:(0,C.jsx)(v._8,{}),variant:"contained",color:"primary",children:"Download"})]})]})})}))},82461:function(e,t,n){n.d(t,{Z:function(){return C}});var a=n(23430),r=n(18489),s=n(50390),i=n(38342),o=n.n(i),l=n(25594),c=n(14602),d=n(94187),u=n(95467),m=n(46529),p=n(94258),g=n(86509),f=n(4285),h=n(72462),x=n(97538),v=n(82981),y=n(62559),C=(0,f.Z)((function(e){return(0,g.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},h.YI),h.Hr),{},{valueString:{maxWidth:350,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginTop:2},fileInputField:{margin:"13px 0","@media (max-width: 900px)":{flexFlow:"column"}}},h.bV),{},{inputLabel:(0,r.Z)((0,r.Z)({},h.YI.inputLabel),{},{fontWeight:"normal"}),textBoxContainer:(0,r.Z)((0,r.Z)({},h.YI.textBoxContainer),{},{maxWidth:"100%",border:"1px solid #eaeaea",paddingLeft:"15px"})}))}))((function(e){var t=e.label,n=e.classes,r=e.onChange,i=e.id,g=e.name,f=e.disabled,h=void 0!==f&&f,C=e.tooltip,S=void 0===C?"":C,j=e.required,Z=e.error,b=void 0===Z?"":Z,_=e.accept,P=void 0===_?"":_,N=e.value,I=void 0===N?"":N,A=(0,s.useState)(!1),T=(0,a.Z)(A,2),k=T[0],R=T[1];return(0,y.jsx)(s.Fragment,{children:(0,y.jsxs)(l.ZP,{item:!0,xs:12,className:"".concat(n.fileInputField," ").concat(n.fieldBottom," ").concat(n.fieldContainer," ").concat(""!==b?n.errorInField:""),children:[""!==t&&(0,y.jsxs)(c.Z,{htmlFor:i,className:"".concat(""!==b?n.fieldLabelError:""," ").concat(n.inputLabel),children:[(0,y.jsxs)("span",{children:[t,j?"*":""]}),""!==S&&(0,y.jsx)("div",{className:n.tooltipContainer,children:(0,y.jsx)(d.Z,{title:S,placement:"top-start",children:(0,y.jsx)("div",{className:n.tooltip,children:(0,y.jsx)(x.Z,{})})})})]}),k||""===I?(0,y.jsxs)("div",{className:n.textBoxContainer,children:[(0,y.jsx)("input",{type:"file",name:g,onChange:function(e){var t=o()(e,"target.files[0].name","");!function(e,t){var n=e.target.files[0],a=new FileReader;a.readAsDataURL(n),a.onload=function(){var e=a.result;if(e){var n=e.toString().split("base64,");2===n.length&&t(n[1])}}}(e,(function(e){r(e,t)}))},accept:P,required:j,disabled:h,className:n.fileInputField}),""!==I&&(0,y.jsx)(u.Z,{color:"primary","aria-label":"upload picture",component:"span",onClick:function(){R(!1)},disableRipple:!1,disableFocusRipple:!1,size:"small",children:(0,y.jsx)(p.Z,{})}),""!==b&&(0,y.jsx)(v.Z,{errorMessage:b})]}):(0,y.jsxs)("div",{className:n.fileReselect,children:[(0,y.jsx)("div",{className:n.valueString,children:I}),(0,y.jsx)(u.Z,{color:"primary","aria-label":"upload picture",component:"span",onClick:function(){R(!0)},disableRipple:!1,disableFocusRipple:!1,size:"small",children:(0,y.jsx)(m.Z,{})})]})]})})}))},27207:function(e,t,n){var a=n(36222),r=n(18489),s=(n(50390),n(44977)),i=n(25594),o=n(82420),l=n(66695),c=n(98893),d=n(14602),u=n(94187),m=n(86509),p=n(4285),g=n(62449),f=n(72462),h=n(97538),x=n(62559),v=(0,g.Z)((0,r.Z)({root:{"&:hover":{backgroundColor:"transparent"}}},f.FU)),y=function(e){var t=v();return(0,x.jsx)(c.Z,(0,r.Z)({className:t.root,disableRipple:!0,color:"default",checkedIcon:(0,x.jsx)("span",{className:t.radioSelectedIcon}),icon:(0,x.jsx)("span",{className:t.radioUnselectedIcon})},e))};t.Z=(0,p.Z)((function(e){return(0,m.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},f.YI),f.Hr),{},{optionLabel:{"&.Mui-disabled":{"& .MuiFormControlLabel-label":{color:"#9c9c9c"}},"&:last-child":{marginRight:0},"& .MuiFormControlLabel-label":{fontSize:12,color:"#07193E"}},checkedOption:{"& .MuiFormControlLabel-label":{fontSize:12,color:"#07193E",fontWeight:700}}}))}))((function(e){var t=e.selectorOptions,n=void 0===t?[]:t,r=e.currentSelection,c=e.label,m=e.id,p=e.name,g=e.onChange,f=e.tooltip,v=void 0===f?"":f,C=e.disableOptions,S=void 0!==C&&C,j=e.classes,Z=e.displayInColumn,b=void 0!==Z&&Z;return(0,x.jsxs)(i.ZP,{container:!0,alignItems:"center",children:[(0,x.jsx)(i.ZP,{item:!0,xs:!0,children:(0,x.jsxs)(d.Z,{htmlFor:m,className:j.inputLabel,children:[(0,x.jsx)("span",{children:c}),""!==v&&(0,x.jsx)("div",{className:j.tooltipContainer,children:(0,x.jsx)(u.Z,{title:v,placement:"top-start",children:(0,x.jsx)("div",{children:(0,x.jsx)(h.Z,{})})})})]})}),(0,x.jsx)(i.ZP,{item:!0,xs:!0,className:j.radioOptionsLayout,children:(0,x.jsx)(o.Z,{"aria-label":m,id:m,name:p,value:r,onChange:g,row:!b,style:{display:"block",textAlign:"right"},children:n.map((function(e){return(0,x.jsx)(l.Z,{value:e.value,control:(0,x.jsx)(y,{}),label:e.label,disabled:S,className:(0,s.Z)(j.optionLabel,(0,a.Z)({},j.checkedOption,e.value===r))},"rd-".concat(p,"-").concat(e.value))}))})})]})}))},67754:function(e,t,n){var a=n(18489),r=n(50390),s=n(25594),i=n(46413),o=n(14602),l=n(94187),c=n(47554),d=n(43965),u=n(31680),m=n(86509),p=n(4285),g=n(72462),f=n(97538),h=n(62559),x=(0,p.Z)((function(e){return(0,m.Z)({root:{height:38,lineHeight:1,"label + &":{marginTop:e.spacing(3)}},input:{height:38,position:"relative",color:"#07193E",fontSize:13,fontWeight:600,padding:"8px 20px 10px 10px",border:"#e5e5e5 1px solid",borderRadius:4,display:"flex",alignItems:"center","&:hover":{borderColor:"#393939"},"&:focus":{backgroundColor:"#fff"}}})}))(i.ZP);t.Z=(0,p.Z)((function(e){return(0,m.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},g.YI),g.Hr),{},{inputLabel:(0,a.Z)((0,a.Z)({},g.YI.inputLabel),{},{"& span":{fontWeight:"normal"}}),fieldContainer:{display:"flex","@media (max-width: 600px)":{flexFlow:"column"}}}))}))((function(e){var t=e.classes,n=e.id,a=e.name,i=e.onChange,m=e.options,p=e.label,g=e.tooltip,v=void 0===g?"":g,y=e.value,C=e.disabled,S=void 0!==C&&C;return(0,h.jsx)(r.Fragment,{children:(0,h.jsxs)(s.ZP,{item:!0,xs:12,className:t.fieldContainer,children:[""!==p&&(0,h.jsxs)(o.Z,{htmlFor:n,className:t.inputLabel,children:[(0,h.jsx)("span",{children:p}),""!==v&&(0,h.jsx)("div",{className:t.tooltipContainer,children:(0,h.jsx)(l.Z,{title:v,placement:"top-start",children:(0,h.jsx)("div",{className:t.tooltip,children:(0,h.jsx)(f.Z,{})})})})]}),(0,h.jsx)(c.Z,{fullWidth:!0,children:(0,h.jsx)(d.Z,{id:n,name:a,value:y,onChange:i,input:(0,h.jsx)(x,{}),disabled:S,children:m.map((function(e){return(0,h.jsx)(u.Z,{value:e.value,children:e.label},"select-".concat(a,"-").concat(e.label))}))})})]})})}))},76295:function(e,t,n){n.d(t,{Z:function(){return f}});var a=n(23430),r=n(50390),s=n(86509),i=n(4285),o=n(81378),l=n(66946),c=n(62559),d=(0,i.Z)((function(e){return(0,s.Z)({wizardStepContainer:{display:"flex",flexDirection:"column",flex:1},wizardComponent:{overflowY:"auto",marginBottom:10,height:"calc(100vh - 100px - 80px)",minHeight:400,flex:1,width:"100%"},wizardModal:{overflowY:"auto",marginBottom:10,height:"calc(100vh - 515px)"},buttonsContainer:{display:"flex",flexDirection:"row",justifyContent:"flex-start",padding:"10px 0",borderTop:"#EAEAEA 1px solid","& button":{marginLeft:10},"&.forModal":{paddingBottom:0}},buttonInnerContainer:{width:"100%",textAlign:"right",marginRight:15}})}))((function(e){var t=e.classes,n=e.page,a=e.pageChange,r=e.loadingStep,s=e.forModal;return(0,c.jsxs)("div",{className:t.wizardStepContainer,children:[(0,c.jsx)("div",{className:s?t.wizardModal:t.wizardComponent,children:n.componentRender}),r&&(0,c.jsx)("div",{children:(0,c.jsx)(o.Z,{})}),(0,c.jsx)("div",{className:"".concat(t.buttonsContainer," ").concat(s?"forModal":""),children:(0,c.jsx)("div",{className:t.buttonInnerContainer,children:n.buttons.map((function(e){return(0,c.jsx)(l.Z,{variant:"contained",color:"primary",size:"small",onClick:function(){!function(e){switch(e.type){case"next":a("++");break;case"back":a("--");break;case"to":a(e.toPage||0)}e.action&&e.action(a)}(e)},disabled:!e.enabled,children:e.label},"button-".concat(n.label,"-").concat(e.label))}))})})]})})),u=n(5211),m=n(25594),p=n(89446),g=n(70902),f=(0,i.Z)((function(e){return(0,s.Z)({wizFromContainer:{},wizFromModal:{position:"relative"},modalWizardSteps:{padding:5,borderBottom:"#eaeaea 1px solid","& ul":{padding:0,marginTop:0,display:"flex",justifyContent:"space-evenly","& li":{listStyle:"lower-roman","&::marker":{paddingLeft:15}}}},buttonList:{backgroundColor:"transparent",border:"none",cursor:"pointer","&:not(:disabled):hover":{textDecoration:"underline"},"&:selected, &:active, &:focus, &:focus:active":{border:"none",outline:0,boxShadow:"none"}},paddedContentGrid:{marginTop:8,padding:"0 10px",minHeight:400},stepsLabel:{fontSize:20,color:"#393939",fontWeight:600,margin:"15px 12px","&.stepsModalTitle":{textAlign:"center",width:"100%",marginTop:0,marginBottom:10}},stepsMasterContainer:{position:"sticky",top:0,backgroundColor:"#FFFFFF",width:"100%",maxHeight:90},verticalSteps:{borderRight:"1px solid #E5E5E5",background:"#F8F8F8"},stepsContainer:{paddingTop:0,"& .MuiButtonBase-root.Mui-selected":{background:"#E5E5E5"}},stepItem:{minHeight:60,borderBottom:"1px solid #E5E5E5","&:hover":{background:"rgba(247,247,247,0.7)"}}})}))((function(e){var t=e.classes,n=e.wizardSteps,s=e.loadingStep,i=e.forModal,o=(0,r.useState)(0),l=(0,a.Z)(o,2),f=l[0],h=l[1],x=function(e){var t=n.length-1;if("++"===e){var a=f+1;a>t&&(a=t),h(a)}if("--"===e){var r=f-1;r<0&&(r=0),h(r)}if("number"===typeof e){var s=e;e<0&&(s=0),e>t&&(s=t),h(s)}};if(0===n.length)return null;return(0,c.jsxs)(m.ZP,{container:!0,className:i?t.wizFromModal:t.wizFromContainer,children:[i?(0,c.jsx)(r.Fragment,{children:(0,c.jsxs)("div",{className:t.stepsMasterContainer,children:[(0,c.jsx)("div",{className:"".concat(t.stepsLabel," stepsModalTitle"),children:"Steps"}),(0,c.jsx)("div",{className:t.modalWizardSteps,children:(0,c.jsx)("ul",{children:n.map((function(e,n){return(0,c.jsx)("li",{children:(0,c.jsx)("button",{onClick:function(){return x(n)},disabled:n>f,className:t.buttonList,children:e.label})},"wizard-".concat(n.toString()))}))})})]})}):(0,c.jsx)(r.Fragment,{children:(0,c.jsx)(m.ZP,{item:!0,xs:12,sm:2,md:2,lg:2,xl:2,className:t.verticalSteps,children:(0,c.jsx)(r.Fragment,{children:(0,c.jsx)(u.Z,{component:"nav",dense:!0,classes:{root:t.stepsContainer},children:n.map((function(e,n){return(0,c.jsx)(p.ZP,{button:!0,disableRipple:!0,onClick:function(){return x(n)},selected:f===n,classes:{root:t.stepItem},children:(0,c.jsx)(g.Z,{primary:e.label})},"wizard-".concat(n.toString()))}))})})})}),(0,c.jsx)(m.ZP,{item:!0,xs:12,sm:i?12:10,md:i?12:10,lg:i?12:10,xl:i?12:10,className:i?"":t.paddedContentGrid,children:(0,c.jsx)(d,{page:n[f],pageChange:x,loadingStep:s,forModal:i})})]})}))},25534:function(e,t,n){var a=n(18489),r=(n(50390),n(25594)),s=n(86509),i=n(4285),o=n(72462),l=n(62559);t.Z=(0,i.Z)((function(e){return(0,s.Z)((0,a.Z)({},o.Bw))}))((function(e){var t=e.classes,n=e.className,a=void 0===n?"":n,s=e.children;return(0,l.jsx)("div",{className:t.contentSpacer,children:(0,l.jsx)(r.ZP,{container:!0,children:(0,l.jsx)(r.ZP,{item:!0,xs:12,className:a,children:s})})})}))},35721:function(e,t,n){n(50390);var a=n(34424),r=n(25594),s=n(86509),i=n(4285),o=n(35477),l=n(95467),c=n(26805),d=n(44078),u=n(5265),m=n(77138),p=n(62559),g={toggleList:u.kQ},f=(0,a.$j)((function(e){return{sidebarOpen:e.system.sidebarOpen,operatorMode:e.system.operatorMode,managerObjects:e.objectBrowser.objectManager.objectsToManage}}),g);t.Z=f((0,i.Z)((function(e){return(0,s.Z)({headerContainer:{width:"100%",minHeight:79,display:"flex",backgroundColor:"#fff",left:0,boxShadow:"rgba(0,0,0,.08) 0 3px 10px"},label:{display:"flex",justifyContent:"flex-start",alignItems:"center"},labelStyle:{color:"#000",fontSize:18,fontWeight:700,marginLeft:34,marginTop:8},rightMenu:{textAlign:"right"},logo:{marginLeft:34,fill:e.palette.primary.main,"& .min-icon":{width:120}},middleComponent:{display:"flex",justifyContent:"center",alignItems:"center"}})}))((function(e){var t=e.classes,n=e.label,a=e.actions,s=e.sidebarOpen,i=e.operatorMode,u=e.managerObjects,g=e.toggleList,f=e.middleComponent;return(0,p.jsxs)(r.ZP,{container:!0,className:"".concat(t.headerContainer," page-header"),direction:"row",alignItems:"center",children:[(0,p.jsxs)(r.ZP,{item:!0,xs:12,sm:12,md:f?3:6,className:t.label,sx:{paddingTop:["15px","15px","0","0"]},children:[!s&&(0,p.jsx)("div",{className:t.logo,children:i?(0,p.jsx)(c.Z,{}):(0,p.jsx)(d.Z,{})}),(0,p.jsx)(o.Z,{variant:"h4",className:t.labelStyle,children:n})]}),f&&(0,p.jsx)(r.ZP,{item:!0,xs:12,sm:12,md:6,className:t.middleComponent,sx:{marginTop:["10px","10px","0","0"]},children:f}),(0,p.jsxs)(r.ZP,{item:!0,xs:12,sm:12,md:f?3:6,className:t.rightMenu,children:[a&&a,u&&u.length>0&&(0,p.jsx)(l.Z,{color:"primary","aria-label":"Refresh List",component:"span",onClick:function(){g()},size:"large",children:(0,p.jsx)(m.gx,{})})]})]})})))},1056:function(e,t,n){n.r(t),n.d(t,{default:function(){return ze}});var a,r,s=n(23430),i=n(18489),o=n(50390),l=n(38342),c=n.n(l),d=n(34424),u=n(25594),m=n(81378),p=n(86509),g=n(4285),f=n(72462),h=n(30324),x=n(28948),v=n(76295),y=n(44149),C=n(93127),S=n(39080),j=n(46864),Z=n(35531),b=n(46981),_=n(10369),P=n(84201),N=n(92440),I=n(66964),A=n(67754),T=n(62559),k=(0,d.$j)((function(e){return{storageClasses:e.tenants.createTenant.storageClasses,customImage:e.tenants.createTenant.fields.configure.customImage,imageName:e.tenants.createTenant.fields.configure.imageName,customDockerhub:e.tenants.createTenant.fields.configure.customDockerhub,imageRegistry:e.tenants.createTenant.fields.configure.imageRegistry,imageRegistryUsername:e.tenants.createTenant.fields.configure.imageRegistryUsername,imageRegistryPassword:e.tenants.createTenant.fields.configure.imageRegistryPassword,exposeMinIO:e.tenants.createTenant.fields.configure.exposeMinIO,exposeConsole:e.tenants.createTenant.fields.configure.exposeConsole,prometheusCustom:e.tenants.createTenant.fields.configure.prometheusCustom,tenantCustom:e.tenants.createTenant.fields.configure.tenantCustom,logSearchCustom:e.tenants.createTenant.fields.configure.logSearchCustom,logSearchVolumeSize:e.tenants.createTenant.fields.configure.logSearchVolumeSize,logSearchSizeFactor:e.tenants.createTenant.fields.configure.logSearchSizeFactor,prometheusVolumeSize:e.tenants.createTenant.fields.configure.prometheusVolumeSize,prometheusSizeFactor:e.tenants.createTenant.fields.configure.prometheusSizeFactor,logSearchSelectedStorageClass:e.tenants.createTenant.fields.configure.logSearchSelectedStorageClass,logSearchImage:e.tenants.createTenant.fields.configure.logSearchImage,kesImage:e.tenants.createTenant.fields.configure.kesImage,logSearchPostgresImage:e.tenants.createTenant.fields.configure.logSearchPostgresImage,logSearchPostgresInitImage:e.tenants.createTenant.fields.configure.logSearchPostgresInitImage,prometheusSelectedStorageClass:e.tenants.createTenant.fields.configure.prometheusSelectedStorageClass,prometheusImage:e.tenants.createTenant.fields.configure.prometheusImage,prometheusSidecarImage:e.tenants.createTenant.fields.configure.prometheusSidecarImage,prometheusInitImage:e.tenants.createTenant.fields.configure.prometheusInitImage,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass,tenantSecurityContext:e.tenants.createTenant.fields.configure.tenantSecurityContext,logSearchSecurityContext:e.tenants.createTenant.fields.configure.logSearchSecurityContext,logSearchPostgresSecurityContext:e.tenants.createTenant.fields.configure.logSearchPostgresSecurityContext,prometheusSecurityContext:e.tenants.createTenant.fields.configure.prometheusSecurityContext}}),{updateAddField:j.HM,isPageValid:j.NO}),R=(0,g.Z)((function(e){return(0,p.Z)((0,i.Z)((0,i.Z)({configSectionItem:{marginRight:15,"& .multiContainer":{border:"1px solid red"}},tenantCustomizationFields:{marginLeft:30,width:"88%",margin:"auto"},containerItem:{marginRight:15},fieldGroup:(0,i.Z)((0,i.Z)({},f.QV.fieldGroup),{},{paddingTop:15,marginBottom:25}),responsiveSectionItem:{"@media (max-width: 900px)":{flexFlow:"column",alignItems:"flex-start","& div > div":{marginBottom:5,marginRight:0}}},logSearchCustomFields:{marginLeft:20,padding:10,width:"90%",margin:"auto"},fieldSpaceTop:{marginTop:15},prometheusCustomFields:{marginLeft:20,padding:10,width:"90%",margin:"auto"}},f.oO),f.AK))}))(k((function(e){var t=e.classes,n=e.storageClasses,a=e.customImage,r=e.imageName,l=e.customDockerhub,c=e.imageRegistry,d=e.imageRegistryUsername,m=e.imageRegistryPassword,p=e.exposeMinIO,g=e.exposeConsole,f=e.prometheusCustom,h=e.tenantCustom,x=e.logSearchCustom,v=e.logSearchVolumeSize,y=(e.logSearchSizeFactor,e.logSearchImage),C=e.kesImage,S=e.logSearchPostgresImage,j=e.logSearchPostgresInitImage,k=e.prometheusVolumeSize,R=(e.prometheusSizeFactor,e.logSearchSelectedStorageClass),z=e.prometheusSelectedStorageClass,w=e.prometheusImage,F=e.prometheusSidecarImage,D=e.prometheusInitImage,E=e.updateAddField,U=e.isPageValid,L=e.selectedStorageClass,K=e.tenantSecurityContext,M=e.logSearchSecurityContext,q=e.logSearchPostgresSecurityContext,G=e.prometheusSecurityContext,V=(0,o.useState)({}),O=(0,s.Z)(V,2),B=O[0],$=O[1],W=[{label:"Default",value:"default"}].concat((0,Z.Z)(n)),H=(0,o.useCallback)((function(e,t){E("configure",e,t)}),[E]);(0,o.useEffect)((function(){var e=[];h&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"tenant_securityContext_runAsUser",required:!0,value:K.runAsUser,customValidation:""===K.runAsUser||parseInt(K.runAsUser)<0,customValidationMessage:"runAsUser must be present and be 0 or more"},{fieldKey:"tenant_securityContext_runAsGroup",required:!0,value:K.runAsGroup,customValidation:""===K.runAsGroup||parseInt(K.runAsGroup)<0,customValidationMessage:"runAsGroup must be present and be 0 or more"},{fieldKey:"tenant_securityContext_fsGroup",required:!0,value:K.fsGroup,customValidation:""===K.fsGroup||parseInt(K.fsGroup)<0,customValidationMessage:"fsGroup must be present and be 0 or more"}])),f&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"prometheus_storage_class",required:!0,value:z,customValidation:""===z,customValidationMessage:"Field cannot be empty"},{fieldKey:"prometheus_volume_size",required:!0,value:k,customValidation:""===k||parseInt(k)<=0,customValidationMessage:"Volume size must be present and be greater than 0"},{fieldKey:"prometheus_securityContext_runAsUser",required:!0,value:G.runAsUser,customValidation:""===G.runAsUser||parseInt(G.runAsUser)<0,customValidationMessage:"runAsUser must be present and be 0 or more"},{fieldKey:"prometheus_securityContext_runAsGroup",required:!0,value:G.runAsGroup,customValidation:""===G.runAsGroup||parseInt(G.runAsGroup)<0,customValidationMessage:"runAsGroup must be present and be 0 or more"},{fieldKey:"prometheus_securityContext_fsGroup",required:!0,value:G.fsGroup,customValidation:""===G.fsGroup||parseInt(G.fsGroup)<0,customValidationMessage:"fsGroup must be present and be 0 or more"}])),x&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"log_search_storage_class",required:!0,value:R,customValidation:""===R,customValidationMessage:"Field cannot be empty"},{fieldKey:"log_search_volume_size",required:!0,value:v,customValidation:""===v||parseInt(v)<=0,customValidationMessage:"Volume size must be present and be greatter than 0"},{fieldKey:"logSearch_securityContext_runAsUser",required:!0,value:M.runAsUser,customValidation:""===M.runAsUser||parseInt(M.runAsUser)<0,customValidationMessage:"runAsUser must be present and be 0 or more"},{fieldKey:"logSearch_securityContext_runAsGroup",required:!0,value:M.runAsGroup,customValidation:""===M.runAsGroup||parseInt(M.runAsGroup)<0,customValidationMessage:"runAsGroup must be present and be 0 or more"},{fieldKey:"logSearch_securityContext_fsGroup",required:!0,value:M.fsGroup,customValidation:""===M.fsGroup||parseInt(M.fsGroup)<0,customValidationMessage:"fsGroup must be present and be 0 or more"},{fieldKey:"postgres_securityContext_runAsUser",required:!0,value:q.runAsUser,customValidation:""===q.runAsUser||parseInt(q.runAsUser)<0,customValidationMessage:"runAsUser must be present and be 0 or more"},{fieldKey:"postgres_securityContext_runAsGroup",required:!0,value:G.runAsGroup,customValidation:""===q.runAsGroup||parseInt(q.runAsGroup)<0,customValidationMessage:"runAsGroup must be present and be 0 or more"},{fieldKey:"postgres_securityContext_fsGroup",required:!0,value:q.fsGroup,customValidation:""===q.fsGroup||parseInt(q.fsGroup)<0,customValidationMessage:"fsGroup must be present and be 0 or more"}])),a&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"image",required:!1,value:r,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/minio:VERSION'"},{fieldKey:"logSearchImage",required:!1,value:y,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/logsearchapi:VERSION'"},{fieldKey:"kesImage",required:!1,value:C,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/kes:VERSION'"},{fieldKey:"logSearchPostgresImage",required:!1,value:S,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'library/postgres:VERSION'"},{fieldKey:"logSearchPostgresInitImage",required:!1,value:j,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'library/busybox:VERSION'"},{fieldKey:"prometheusImage",required:!1,value:w,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/prometheus:VERSION'"},{fieldKey:"prometheusSidecarImage",required:!1,value:F,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'project/container:VERSION'"},{fieldKey:"prometheusInitImage",required:!1,value:D,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'library/busybox:VERSION'"}]),l&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"registry",required:!0,value:c},{fieldKey:"registryUsername",required:!0,value:d},{fieldKey:"registryPassword",required:!0,value:m}])));var t=(0,P.R)(e);U("configure",0===Object.keys(t).length),$(t)}),[a,r,y,C,S,j,w,F,D,l,c,d,m,U,f,h,x,z,k,R,v,K,M,q,G]),(0,o.useEffect)((function(){n.length>0&&(0===n.filter((function(e){return e.value===z})).length&&H("prometheusSelectedStorageClass","default"),0===n.filter((function(e){return e.value===R})).length&&H("logSearchSelectedStorageClass","default"))}),[R,z,L,n,H]);var Y=function(e){$((0,_.h)(B,e))};return(0,T.jsxs)(b.Z,{className:t.paperWrapper,children:[(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Configure"}),(0,T.jsx)("span",{className:t.descriptionText,children:"Basic configurations for tenant management"})]}),(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Expose Services"}),(0,T.jsx)("span",{className:t.descriptionText,children:"Whether the tenant's services should request an external IP."})]}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.configSectionItem,children:(0,T.jsx)(N.Z,{value:"expose_minio",id:"expose_minio",name:"expose_minio",checked:p,onChange:function(e){var t=e.target.checked;H("exposeMinIO",t)},label:"Expose MiniO Service"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.configSectionItem,children:(0,T.jsx)(N.Z,{value:"expose_console",id:"expose_console",name:"expose_console",checked:g,onChange:function(e){var t=e.target.checked;H("exposeConsole",t)},label:"Expose Console Service"})}),(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Additional Configurations"}),(0,T.jsx)("span",{className:t.descriptionText,children:"Configure SecurityContext, Storage Classes & Storage size for Log Search, Prometheus add-ons and your Tenant"})]}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.configSectionItem,children:(0,T.jsx)(N.Z,{value:"tenantConfig",id:"tenant_configuration",name:"tenant_configuration",checked:h,onChange:function(e){var t=e.target.checked;H("tenantCustom",t)},label:"Override Tenant defaults"})}),h&&(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.tenantCustomizationFields,children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"SecurityContext for MinIO"}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:"".concat(t.configSectionItem),children:(0,T.jsxs)("div",{className:"".concat(t.multiContainer," ").concat(t.responsiveSectionItem),children:[(0,T.jsx)("div",{className:t.containerItem,children:(0,T.jsx)(I.Z,{type:"number",id:"tenant_securityContext_runAsUser",name:"tenant_securityContext_runAsUser",onChange:function(e){H("tenantSecurityContext",(0,i.Z)((0,i.Z)({},K),{},{runAsUser:e.target.value})),Y("tenant_securityContext_runAsUser")},label:"Run As User",value:K.runAsUser,required:!0,error:B.tenant_securityContext_runAsUser||"",min:"0"})}),(0,T.jsx)("div",{className:t.containerItem,children:(0,T.jsx)(I.Z,{type:"number",id:"tenant_securityContext_runAsGroup",name:"tenant_securityContext_runAsGroup",onChange:function(e){H("tenantSecurityContext",(0,i.Z)((0,i.Z)({},K),{},{runAsGroup:e.target.value})),Y("tenant_securityContext_runAsGroup")},label:"Run As Group",value:K.runAsGroup,required:!0,error:B.tenant_securityContext_runAsGroup||"",min:"0"})}),(0,T.jsx)("div",{className:t.containerItem,children:(0,T.jsx)(I.Z,{type:"number",id:"tenant_securityContext_fsGroup",name:"tenant_securityContext_fsGroup",onChange:function(e){H("tenantSecurityContext",(0,i.Z)((0,i.Z)({},K),{},{fsGroup:e.target.value})),Y("tenant_securityContext_fsGroup")},label:"FsGroup",value:K.fsGroup,required:!0,error:B.tenant_securityContext_fsGroup||"",min:"0"})})]})}),(0,T.jsx)("br",{}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.configSectionItem,children:(0,T.jsx)("div",{className:t.multiContainer,children:(0,T.jsx)(N.Z,{value:"tenantSecurityContextRunAsNonRoot",id:"tenant_securityContext_runAsNonRoot",name:"tenant_securityContext_runAsNonRoot",checked:K.runAsNonRoot,onChange:function(e){var t=e.target.checked;H("tenantSecurityContext",(0,i.Z)((0,i.Z)({},K),{},{runAsNonRoot:t}))},label:"Do not run as Root"})})})]})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.configSectionItem,children:(0,T.jsx)(N.Z,{value:"logSearchConfig",id:"log_search_configuration",name:"log_search_configuration",checked:x,onChange:function(e){var t=e.target.checked;H("logSearchCustom",t)},label:"Override Log Search defaults"})}),x&&(0,T.jsxs)(u.ZP,{xs:12,className:t.logSearchCustomFields,children:[(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsx)(A.Z,{id:"log_search_storage_class",name:"log_search_storage_class",onChange:function(e){H("logSearchSelectedStorageClass",e.target.value)},label:"Log Search Storage Class",value:R,options:W,disabled:W.length<1})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsx)("div",{className:t.multiContainer,children:(0,T.jsx)(I.Z,{type:"number",id:"log_search_volume_size",name:"log_search_volume_size",onChange:function(e){H("logSearchVolumeSize",e.target.value),Y("log_search_volume_size")},label:"Storage Size [Gi]",value:v,required:!0,error:B.log_search_volume_size||"",min:"0"})})}),(0,T.jsxs)("fieldset",{className:"".concat(t.fieldGroup," ").concat(t.fieldSpaceTop),children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"SecurityContext for LogSearch"}),(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsxs)("div",{className:"".concat(t.multiContainer," ").concat(t.responsiveSectionItem),children:[(0,T.jsx)("div",{className:t.configSectionItem,children:(0,T.jsx)(I.Z,{type:"number",id:"logSearch_securityContext_runAsUser",name:"logSearch_securityContext_runAsUser",onChange:function(e){H("logSearchSecurityContext",(0,i.Z)((0,i.Z)({},M),{},{runAsUser:e.target.value})),Y("logSearch_securityContext_runAsUser")},label:"Run As User",value:M.runAsUser,required:!0,error:B.logSearch_securityContext_runAsUser||"",min:"0"})}),(0,T.jsx)("div",{className:t.configSectionItem,children:(0,T.jsx)(I.Z,{type:"number",id:"logSearch_securityContext_runAsGroup",name:"logSearch_securityContext_runAsGroup",onChange:function(e){H("logSearchSecurityContext",(0,i.Z)((0,i.Z)({},M),{},{runAsGroup:e.target.value})),Y("logSearch_securityContext_runAsGroup")},label:"Run As Group",value:M.runAsGroup,required:!0,error:B.logSearch_securityContext_runAsGroup||"",min:"0"})}),(0,T.jsx)("div",{className:t.configSectionItem,children:(0,T.jsx)(I.Z,{type:"number",id:"logSearch_securityContext_fsGroup",name:"logSearch_securityContext_fsGroup",onChange:function(e){H("logSearchSecurityContext",(0,i.Z)((0,i.Z)({},M),{},{fsGroup:e.target.value})),Y("logSearch_securityContext_fsGroup")},label:"FsGroup",value:M.fsGroup,required:!0,error:B.logSearch_securityContext_fsGroup||"",min:"0"})})]})}),(0,T.jsx)("br",{}),(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsx)("div",{className:t.multiContainer,children:(0,T.jsx)(N.Z,{value:"logSearchSecurityContextRunAsNonRoot",id:"logSearch_securityContext_runAsNonRoot",name:"logSearch_securityContext_runAsNonRoot",checked:M.runAsNonRoot,onChange:function(e){var t=e.target.checked;H("logSearchSecurityContext",(0,i.Z)((0,i.Z)({},M),{},{runAsNonRoot:t}))},label:"Do not run as Root"})})})]}),(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"SecurityContext for PostgreSQL"}),(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsxs)("div",{className:"".concat(t.multiContainer," ").concat(t.responsiveSectionItem),children:[(0,T.jsx)("div",{className:t.configSectionItem,children:(0,T.jsx)(I.Z,{type:"number",id:"postgres_securityContext_runAsUser",name:"postgres_securityContext_runAsUser",onChange:function(e){H("logSearchPostgresSecurityContext",(0,i.Z)((0,i.Z)({},q),{},{runAsUser:e.target.value})),Y("postgres_securityContext_runAsUser")},label:"Run As User",value:q.runAsUser,required:!0,error:B.postgres_securityContext_runAsUser||"",min:"0"})}),(0,T.jsx)("div",{className:t.configSectionItem,children:(0,T.jsx)(I.Z,{type:"number",id:"postgres_securityContext_runAsGroup",name:"postgres_securityContext_runAsGroup",onChange:function(e){H("logSearchPostgresSecurityContext",(0,i.Z)((0,i.Z)({},q),{},{runAsGroup:e.target.value})),Y("postgres_securityContext_runAsGroup")},label:"Run As Group",value:q.runAsGroup,required:!0,error:B.postgres_securityContext_runAsGroup||"",min:"0"})}),(0,T.jsx)("div",{className:t.configSectionItem,children:(0,T.jsx)(I.Z,{type:"number",id:"postgres_securityContext_fsGroup",name:"postgres_securityContext_fsGroup",onChange:function(e){H("logSearchPostgresSecurityContext",(0,i.Z)((0,i.Z)({},q),{},{fsGroup:e.target.value})),Y("postgres_securityContext_fsGroup")},label:"FsGroup",value:q.fsGroup,required:!0,error:B.postgres_securityContext_fsGroup||"",min:"0"})})]})}),(0,T.jsx)("br",{}),(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsx)("div",{className:t.multiContainer,children:(0,T.jsx)(N.Z,{value:"postgresSecurityContextRunAsNonRoot",id:"postgres_securityContext_runAsNonRoot",name:"postgres_securityContext_runAsNonRoot",checked:q.runAsNonRoot,onChange:function(e){var t=e.target.checked;H("logSearchPostgresSecurityContext",(0,i.Z)((0,i.Z)({},q),{},{runAsNonRoot:t}))},label:"Do not run as Root"})})})]})]}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.configSectionItem,children:(0,T.jsx)(N.Z,{value:"prometheusConfig",id:"prometheus_configuration",name:"prometheus_configuration",checked:f,onChange:function(e){var t=e.target.checked;H("prometheusCustom",t)},label:"Override Prometheus defaults"})}),f&&(0,T.jsxs)(u.ZP,{xs:12,className:t.prometheusCustomFields,children:[(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsx)(A.Z,{id:"prometheus_storage_class",name:"prometheus_storage_class",onChange:function(e){H("prometheusSelectedStorageClass",e.target.value)},label:"Prometheus Storage Class",value:z,options:W,disabled:W.length<1})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsx)("div",{className:t.multiContainer,children:(0,T.jsx)(I.Z,{type:"number",id:"prometheus_volume_size",name:"prometheus_volume_size",onChange:function(e){H("prometheusVolumeSize",e.target.value),Y("prometheus_volume_size")},label:"Storage Size [Gi]",value:k,required:!0,error:B.prometheus_volume_size||"",min:"0"})})}),(0,T.jsxs)("fieldset",{className:"".concat(t.fieldGroup," ").concat(t.fieldSpaceTop),children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"SecurityContext for Prometheus"}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.configSectionItem,children:(0,T.jsxs)("div",{className:"".concat(t.multiContainer," ").concat(t.responsiveSectionItem),children:[(0,T.jsx)("div",{className:t.configSectionItem,children:(0,T.jsx)(I.Z,{type:"number",id:"prometheus_securityContext_runAsUser",name:"prometheus_securityContext_runAsUser",onChange:function(e){H("prometheusSecurityContext",(0,i.Z)((0,i.Z)({},G),{},{runAsUser:e.target.value})),Y("prometheus_securityContext_runAsUser")},label:"Run As User",value:G.runAsUser,required:!0,error:B.prometheus_securityContext_runAsUser||"",min:"0"})}),(0,T.jsx)("div",{className:t.configSectionItem,children:(0,T.jsx)(I.Z,{type:"number",id:"prometheus_securityContext_runAsGroup",name:"prometheus_securityContext_runAsGroup",onChange:function(e){H("prometheusSecurityContext",(0,i.Z)((0,i.Z)({},G),{},{runAsGroup:e.target.value})),Y("prometheus_securityContext_runAsGroup")},label:"Run As Group",value:G.runAsGroup,required:!0,error:B.prometheus_securityContext_runAsGroup||"",min:"0"})}),(0,T.jsx)("div",{className:t.configSectionItem,children:(0,T.jsx)(I.Z,{type:"number",id:"prometheus_securityContext_fsGroup",name:"prometheus_securityContext_fsGroup",onChange:function(e){H("prometheusSecurityContext",(0,i.Z)((0,i.Z)({},G),{},{fsGroup:e.target.value})),Y("prometheus_securityContext_fsGroup")},label:"FsGroup",value:G.fsGroup,required:!0,error:B.prometheus_securityContext_fsGroup||"",min:"0"})})]})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.configSectionItem,children:(0,T.jsx)("div",{className:"".concat(t.multiContainer," ").concat(t.fieldSpaceTop),children:(0,T.jsx)(N.Z,{value:"prometheusSecurityContextRunAsNonRoot",id:"prometheus_securityContext_runAsNonRoot",name:"prometheus_securityContext_runAsNonRoot",checked:G.runAsNonRoot,onChange:function(e){var t=e.target.checked;H("prometheusSecurityContext",(0,i.Z)((0,i.Z)({},G),{},{runAsNonRoot:t}))},label:"Do not run as Root"})})})]})]})]})}))),z=n(94187),w=n(95467),F=n(35477),D=n(94759),E=n(43615),U=n(27207),L=n(96152),K=n(35150),M=(0,d.$j)((function(e){return{idpSelection:e.tenants.createTenant.fields.identityProvider.idpSelection,accessKeys:e.tenants.createTenant.fields.identityProvider.accessKeys,secretKeys:e.tenants.createTenant.fields.identityProvider.secretKeys,openIDConfigurationURL:e.tenants.createTenant.fields.identityProvider.openIDConfigurationURL,openIDClientID:e.tenants.createTenant.fields.identityProvider.openIDClientID,openIDSecretID:e.tenants.createTenant.fields.identityProvider.openIDSecretID,openIDCallbackURL:e.tenants.createTenant.fields.identityProvider.openIDCallbackURL,openIDClaimName:e.tenants.createTenant.fields.identityProvider.openIDClaimName,openIDScopes:e.tenants.createTenant.fields.identityProvider.openIDScopes,ADURL:e.tenants.createTenant.fields.identityProvider.ADURL,ADSkipTLS:e.tenants.createTenant.fields.identityProvider.ADSkipTLS,ADServerInsecure:e.tenants.createTenant.fields.identityProvider.ADServerInsecure,ADUserNameSearchFilter:e.tenants.createTenant.fields.identityProvider.ADUserNameSearchFilter,ADGroupSearchBaseDN:e.tenants.createTenant.fields.identityProvider.ADGroupSearchBaseDN,ADGroupSearchFilter:e.tenants.createTenant.fields.identityProvider.ADGroupSearchFilter,ADGroupNameAttribute:e.tenants.createTenant.fields.identityProvider.ADGroupNameAttribute,ADUserDNs:e.tenants.createTenant.fields.identityProvider.ADUserDNs,ADUserNameFormat:e.tenants.createTenant.fields.identityProvider.ADUserNameFormat,ADLookupBindDN:e.tenants.createTenant.fields.identityProvider.ADLookupBindDN,ADLookupBindPassword:e.tenants.createTenant.fields.identityProvider.ADLookupBindPassword,ADUserDNSearchBaseDN:e.tenants.createTenant.fields.identityProvider.ADUserDNSearchBaseDN,ADUserDNSearchFilter:e.tenants.createTenant.fields.identityProvider.ADUserDNSearchFilter,ADServerStartTLS:e.tenants.createTenant.fields.identityProvider.ADServerStartTLS}}),{updateAddField:j.HM,isPageValid:j.NO}),q=(0,g.Z)((function(e){return(0,p.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({shortened:{gridTemplateColumns:"auto auto 50px 50px",display:"grid",gridGap:15,marginBottom:10,"& input":{fontWeight:400}},buttonTray:{marginLeft:10,display:"flex",height:38,"& button":{background:"#EAEAEA"}},overlayAction:{marginLeft:10,"& svg":{maxWidth:15,maxHeight:15},"& button":{background:"#EAEAEA"}},protocolRadioOptions:{display:"flex",flexFlow:"column",marginBottom:10,"& label":{fontSize:14},"& div":{display:"flex",flexFlow:"column",alignItems:"baseline"}},adUserDnRows:{display:"flex"}},f.QV),f.DF),f.oO),f.AK))}))(M((function(e){var t=e.classes,n=e.idpSelection,a=e.accessKeys,r=e.secretKeys,i=e.openIDConfigurationURL,l=e.openIDClientID,c=e.openIDSecretID,d=e.openIDCallbackURL,m=e.openIDClaimName,p=e.openIDScopes,g=e.ADURL,f=e.ADSkipTLS,h=e.ADServerInsecure,x=e.ADUserNameSearchFilter,v=e.ADGroupSearchBaseDN,y=e.ADGroupSearchFilter,C=e.ADGroupNameAttribute,S=e.ADUserDNs,j=e.ADUserNameFormat,A=e.ADLookupBindDN,k=e.ADLookupBindPassword,R=e.ADUserDNSearchBaseDN,M=e.ADUserDNSearchFilter,q=e.ADServerStartTLS,G=e.updateAddField,V=e.isPageValid,O=(0,o.useState)({}),B=(0,s.Z)(O,2),$=B[0],W=B[1],H=(0,o.useCallback)((function(e,t){G("identityProvider",e,t)}),[G]),Y=function(e,t){var n=(0,Z.Z)(a);n[e]=t,H("accessKeys",n)},Q=function(e,t){var n=(0,Z.Z)(r);n[e]=t,H("secretKeys",n)},X=function(e,t){var n=(0,Z.Z)(S);n[e]=t,H("ADUserDNs",n)},J=function(e){W((0,_.h)($,e))};(0,o.useEffect)((function(){var e=[];if("Built-in"===n){e=(0,Z.Z)(e);for(var t=0;t1&&(a.splice(n,1),r.splice(n,1),Y(a.length-1,a[a.length-1]))},children:(0,T.jsx)(K.Z,{})})})}),(0,T.jsx)(z.Z,{title:"Randomize Credentials","aria-label":"add",children:(0,T.jsx)("div",{className:t.overlayAction,children:(0,T.jsx)(w.Z,{onClick:function(){Y(n,(0,_.z)(16)),Q(n,(0,_.z)(32))},size:"small",children:(0,T.jsx)(D.Z,{})})})})]})]})},"identityField-".concat(n.toString()))}))),"AD"===n&&(ee=S.map((function(e,n){return(0,T.jsx)(o.Fragment,{children:(0,T.jsxs)("div",{className:t.adUserDnRows,children:[(0,T.jsx)(I.Z,{id:"ad-userdn-".concat(n.toString()),label:"",placeholder:"",name:"ad-userdn-".concat(n.toString()),value:S[n],onChange:function(e){X(n,e.target.value),J("ad-userdn-".concat(n.toString()))},index:n,error:$["ad-userdn-".concat(n.toString())]||""},"csv-ad-userdn-".concat(n.toString())),(0,T.jsxs)("div",{className:t.buttonTray,children:[(0,T.jsx)(z.Z,{title:"Add User","aria-label":"add",children:(0,T.jsx)(w.Z,{size:"small",onClick:function(){S.push(""),X(S.length-1,"")},children:(0,T.jsx)(L.Z,{})})}),(0,T.jsx)(z.Z,{title:"Remove","aria-label":"add",children:(0,T.jsx)(w.Z,{size:"small",style:{marginLeft:16},onClick:function(){S.length>1&&(S.splice(n,1),Y(S.length-1,S[S.length-1]))},children:(0,T.jsx)(E.Z,{})})})]})]})},"identityField-".concat(n.toString()))}))),(0,T.jsxs)(b.Z,{className:t.paperWrapper,children:[(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Identity Provider"}),(0,T.jsx)("span",{className:t.descriptionText,children:"Access to the tenant can be controlled via an external Identity Manager."})]}),(0,T.jsxs)(u.ZP,{item:!0,xs:12,className:t.protocolRadioOptions,children:[(0,T.jsx)("label",{children:"Protocol"}),(0,T.jsx)(U.Z,{currentSelection:n,id:"idp-options",name:"idp-options",label:" ",onChange:function(e){H("idpSelection",e.target.value)},selectorOptions:[{label:"Built-in",value:"Built-in"},{label:"OpenID",value:"OpenID"},{label:"Active Directory",value:"AD"}]})]}),"Built-in"===n&&(0,T.jsxs)(o.Fragment,{children:["Add additional users",ee]}),"OpenID"===n&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"openID_CONFIGURATION_URL",name:"openID_CONFIGURATION_URL",onChange:function(e){H("openIDConfigurationURL",e.target.value),J("openID_CONFIGURATION_URL")},label:"Configuration URL",value:i,placeholder:"https://your-identity-provider.com/.well-known/openid-configuration",error:$.openID_CONFIGURATION_URL||"",required:!0})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"openID_clientID",name:"openID_clientID",onChange:function(e){H("openIDClientID",e.target.value),J("openID_clientID")},label:"Client ID",value:l,error:$.openID_clientID||"",required:!0})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"openID_secretID",name:"openID_secretID",onChange:function(e){H("openIDSecretID",e.target.value),J("openID_secretID")},label:"Secret ID",value:c,error:$.openID_secretID||"",required:!0})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"openID_callbackURL",name:"openID_callbackURL",onChange:function(e){H("openIDCallbackURL",e.target.value),J("openID_callbackURL")},label:"Callback URL",value:d,placeholder:"https://your-console-endpoint:9443/oauth_callback",error:$.openID_callbackURL||""})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"openID_claimName",name:"openID_claimName",onChange:function(e){H("openIDClaimName",e.target.value),J("openID_claimName")},label:"Claim Name",value:m,error:$.openID_claimName||"",required:!0})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"openID_scopes",name:"openID_scopes",onChange:function(e){H("openIDScopes",e.target.value),J("openID_scopes")},label:"Scopes",value:p})})]}),"AD"===n&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"AD_URL",name:"AD_URL",onChange:function(e){H("ADURL",e.target.value),J("AD_URL")},label:"LDAP Server Address",value:g,placeholder:"ldap-server:636",error:$.AD_URL||"",required:!0})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(N.Z,{value:"ad_skipTLS",id:"ad_skipTLS",name:"ad_skipTLS",checked:f,onChange:function(e){var t=e.target.checked;H("ADSkipTLS",t)},label:"Skip TLS Verification"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(N.Z,{value:"ad_serverInsecure",id:"ad_serverInsecure",name:"ad_serverInsecure",checked:h,onChange:function(e){var t=e.target.checked;H("ADServerInsecure",t)},label:"Server Insecure"})}),h?(0,T.jsxs)(u.ZP,{item:!0,xs:12,children:[(0,T.jsx)(F.Z,{className:t.error,variant:"caption",display:"block",gutterBottom:!0,children:"Warning: All traffic with Active Directory will be unencrypted"}),(0,T.jsx)("br",{})]}):null,(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(N.Z,{value:"ad_serverStartTLS",id:"ad_serverStartTLS",name:"ad_serverStartTLS",checked:q,onChange:function(e){var t=e.target.checked;H("ADServerStartTLS",t)},label:"Start TLS connection to AD/LDAP server"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"ad_userNameFormat",name:"ad_userNameFormat",onChange:function(e){H("ADUserNameFormat",e.target.value)},label:"Username Format",value:j,placeholder:"uid=%s,cn=accounts,dc=myldapserver,dc=com"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"ad_userNameFilter",name:"ad_userNameFilter",onChange:function(e){H("ADUserNameSearchFilter",e.target.value)},label:"Username Search Filter",value:x,placeholder:"(|(objectclass=posixAccount)(uid=%s))"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"ad_groupSearchBaseDN",name:"ad_groupSearchBaseDN",onChange:function(e){H("ADGroupSearchBaseDN",e.target.value)},label:"Group Search Base DN",value:v,placeholder:"ou=hwengg,dc=min,dc=io;ou=swengg,dc=min,dc=io"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"ad_groupSearchFilter",name:"ad_groupSearchFilter",onChange:function(e){H("ADGroupSearchFilter",e.target.value)},label:"Group Search Filter",value:y,placeholder:"(&(objectclass=groupOfNames)(member=%s))"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"ad_groupNameAttribute",name:"ad_groupNameAttribute",onChange:function(e){H("ADGroupNameAttribute",e.target.value)},label:"Group Name Attribute",value:C,placeholder:"cn"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"ad_lookupBindDN",name:"ad_lookupBindDN",onChange:function(e){H("ADLookupBindDN",e.target.value)},label:"Lookup Bind DN",value:A,placeholder:"cn=admin,dc=min,dc=io"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"ad_lookupBindPassword",name:"ad_lookupBindPassword",onChange:function(e){H("ADLookupBindPassword",e.target.value)},label:"Lookup Bind Password",value:k,placeholder:"admin"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"ad_userDNSearchBaseDN",name:"ad_userDNSearchBaseDN",onChange:function(e){H("ADUserDNSearchBaseDN",e.target.value)},label:"User DN Search Base DN",value:R,placeholder:"dc=min,dc=io"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"ad_userDNSearchFilter",name:"ad_userDNSearchFilter",onChange:function(e){H("ADUserDNSearchFilter",e.target.value)},label:"User DN Search Filter",value:M,placeholder:"(uid=%s)"})}),(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"List of user DNs (Distinguished Names) to be Tenant Administrators"}),(0,T.jsx)(u.ZP,{item:!0,xs:12,children:ee})]})]})]})}))),G=n(82461),V=n(14792),O=(0,d.$j)((function(e){return{enableTLS:e.tenants.createTenant.fields.security.enableTLS,enableAutoCert:e.tenants.createTenant.fields.security.enableAutoCert,enableCustomCerts:e.tenants.createTenant.fields.security.enableCustomCerts,minioCertificates:e.tenants.createTenant.certificates.minioCertificates,caCertificates:e.tenants.createTenant.certificates.caCertificates}}),{updateAddField:j.HM,isPageValid:j.NO,addFileToCaCertificates:j.Eq,deleteCaCertificate:j.IG,addCaCertificate:j.fK,addKeyPair:j.Mg,addFileToKeyPair:j.aN,deleteKeyPair:j.XX}),B=(0,g.Z)((function(e){return(0,p.Z)((0,i.Z)((0,i.Z)((0,i.Z)({minioCertificateRows:{display:"flex",alignItems:"center",justifyContent:"flex-start",borderBottom:"1px solid #EAEAEA","&:last-child":{borderBottom:0},"@media (max-width: 900px)":{flex:1}},fileItem:{marginRight:10,display:"flex","& div label":{minWidth:50},"@media (max-width: 900px)":{flexFlow:"column"}},minioCertsContainer:{marginBottom:15},minioCACertsRow:{display:"flex",alignItems:"center",justifyContent:"flex-start",borderBottom:"1px solid #EAEAEA","&:last-child":{borderBottom:0},"@media (max-width: 900px)":{flex:1,"& div label":{minWidth:50}}},rowActions:{display:"flex",justifyContent:"flex-end","@media (max-width: 900px)":{flex:1}},overlayAction:{marginLeft:10,"& svg":{maxWidth:15,maxHeight:15},"& button":{background:"#EAEAEA"}}},f.QV),f.oO),f.AK))}))(O((function(e){var t=e.classes,n=e.enableTLS,a=e.enableAutoCert,r=e.enableCustomCerts,s=e.minioCertificates,i=e.caCertificates,l=e.updateAddField,c=e.isPageValid,d=e.addFileToCaCertificates,m=e.deleteCaCertificate,p=e.addCaCertificate,g=e.addKeyPair,f=e.addFileToKeyPair,h=e.deleteKeyPair,x=(0,o.useCallback)((function(e,t){l("security",e,t)}),[l]);return(0,o.useEffect)((function(){c("security",!n||(!!a||!!r))}),[n,a,r,c]),(0,T.jsxs)(b.Z,{className:t.paperWrapper,children:[(0,T.jsx)("div",{className:t.headerElement,children:(0,T.jsx)("h3",{className:t.h3Section,children:"Security"})}),(0,T.jsxs)(u.ZP,{item:!0,xs:12,children:[(0,T.jsx)(N.Z,{value:"enableTLS",id:"enableTLS",name:"enableTLS",checked:n,onChange:function(e){var t=e.target.checked;x("enableTLS",t)},label:"Enable TLS"}),"Enable TLS for the tenant, this is required for Encryption Configuration",n&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)("br",{}),(0,T.jsx)("br",{}),(0,T.jsx)(F.Z,{variant:"caption",display:"block",gutterBottom:!0,children:"AutoCert: MinIO Operator will generate all TLS certificates automatically"}),(0,T.jsx)(F.Z,{variant:"caption",display:"block",gutterBottom:!0,children:"Custom certificates: Allow user to provide your own certificates"}),(0,T.jsx)("br",{})]})]}),n&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsxs)(u.ZP,{item:!0,xs:12,children:[(0,T.jsx)(N.Z,{value:"enableAutoCert",id:"enableAutoCert",name:"enableAutoCert",checked:a,onChange:function(e){var t=e.target.checked;x("enableAutoCert",t)},label:"Enable AutoCert"}),(0,T.jsx)(N.Z,{value:"enableCustomCerts",id:"enableCustomCerts",name:"enableCustomCerts",checked:r,onChange:function(e){var t=e.target.checked;x("enableCustomCerts",t)},label:"Custom Certificates"})]}),r&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(u.ZP,{container:!0,children:(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.minioCertsContainer,children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"MinIO Certificates"}),s.map((function(e){return(0,T.jsxs)(u.ZP,{item:!0,xs:12,className:t.minioCertificateRows,children:[(0,T.jsxs)(u.ZP,{item:!0,xs:10,className:t.fileItem,children:[(0,T.jsx)(G.Z,{onChange:function(t,n){f(e.id,"cert",n,t)},accept:".cer,.crt,.cert,.pem",id:"tlsCert",name:"tlsCert",label:"Cert",value:e.cert}),(0,T.jsx)(G.Z,{onChange:function(t,n){f(e.id,"key",n,t)},accept:".key,.pem",id:"tlsKey",name:"tlsKey",label:"Key",value:e.key})]}),(0,T.jsxs)(u.ZP,{item:!0,xs:2,className:t.rowActions,children:[(0,T.jsx)("div",{className:t.overlayAction,children:(0,T.jsx)(w.Z,{size:"small",onClick:g,children:(0,T.jsx)(V.Z,{})})}),(0,T.jsx)("div",{className:t.overlayAction,children:(0,T.jsx)(w.Z,{size:"small",onClick:function(){h(e.id)},children:(0,T.jsx)(K.Z,{})})})]})]},e.id)}))]})})}),(0,T.jsx)(u.ZP,{container:!0,children:(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.minioCertsContainer,children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"MinIO CA Certificates"}),i.map((function(e){return(0,T.jsxs)(u.ZP,{item:!0,xs:12,className:t.minioCACertsRow,children:[(0,T.jsx)(u.ZP,{item:!0,xs:6,children:(0,T.jsx)(G.Z,{onChange:function(t,n){d(e.id,"cert",n,t)},accept:".cer,.crt,.cert,.pem",id:"tlsCert",name:"tlsCert",label:"Cert",value:e.cert})}),(0,T.jsx)(u.ZP,{item:!0,xs:6,children:(0,T.jsxs)("div",{className:t.rowActions,children:[(0,T.jsx)("div",{className:t.overlayAction,children:(0,T.jsx)(w.Z,{size:"small",onClick:p,children:(0,T.jsx)(V.Z,{})})}),(0,T.jsx)("div",{className:t.overlayAction,children:(0,T.jsx)(w.Z,{size:"small",onClick:function(){m(e.id)},children:(0,T.jsx)(K.Z,{})})})]})})]},e.id)}))]})})})]})]})]})}))),$=(0,d.$j)((function(e){return{replicas:e.tenants.createTenant.fields.encryption.replicas,enableEncryption:e.tenants.createTenant.fields.encryption.enableEncryption,encryptionType:e.tenants.createTenant.fields.encryption.encryptionType,gemaltoEndpoint:e.tenants.createTenant.fields.encryption.gemaltoEndpoint,gemaltoToken:e.tenants.createTenant.fields.encryption.gemaltoToken,gemaltoDomain:e.tenants.createTenant.fields.encryption.gemaltoDomain,gemaltoRetry:e.tenants.createTenant.fields.encryption.gemaltoRetry,awsEndpoint:e.tenants.createTenant.fields.encryption.awsEndpoint,awsRegion:e.tenants.createTenant.fields.encryption.awsRegion,awsKMSKey:e.tenants.createTenant.fields.encryption.awsKMSKey,awsAccessKey:e.tenants.createTenant.fields.encryption.awsAccessKey,awsSecretKey:e.tenants.createTenant.fields.encryption.awsSecretKey,awsToken:e.tenants.createTenant.fields.encryption.awsToken,vaultEndpoint:e.tenants.createTenant.fields.encryption.vaultEndpoint,vaultEngine:e.tenants.createTenant.fields.encryption.vaultEngine,vaultNamespace:e.tenants.createTenant.fields.encryption.vaultNamespace,vaultPrefix:e.tenants.createTenant.fields.encryption.vaultPrefix,vaultAppRoleEngine:e.tenants.createTenant.fields.encryption.vaultAppRoleEngine,vaultId:e.tenants.createTenant.fields.encryption.vaultId,vaultSecret:e.tenants.createTenant.fields.encryption.vaultSecret,vaultRetry:e.tenants.createTenant.fields.encryption.vaultRetry,vaultPing:e.tenants.createTenant.fields.encryption.vaultPing,azureEndpoint:e.tenants.createTenant.fields.encryption.azureEndpoint,azureTenantID:e.tenants.createTenant.fields.encryption.azureTenantID,azureClientID:e.tenants.createTenant.fields.encryption.azureClientID,azureClientSecret:e.tenants.createTenant.fields.encryption.azureClientSecret,gcpProjectID:e.tenants.createTenant.fields.encryption.gcpProjectID,gcpEndpoint:e.tenants.createTenant.fields.encryption.gcpEndpoint,gcpClientEmail:e.tenants.createTenant.fields.encryption.gcpClientEmail,gcpClientID:e.tenants.createTenant.fields.encryption.gcpClientID,gcpPrivateKeyID:e.tenants.createTenant.fields.encryption.gcpPrivateKeyID,gcpPrivateKey:e.tenants.createTenant.fields.encryption.gcpPrivateKey,enableCustomCertsForKES:e.tenants.createTenant.fields.encryption.enableCustomCertsForKES,enableAutoCert:e.tenants.createTenant.fields.security.enableAutoCert,enableTLS:e.tenants.createTenant.fields.security.enableTLS,minioCertificates:e.tenants.createTenant.certificates.minioCertificates,serverCertificate:e.tenants.createTenant.certificates.serverCertificate,clientCertificate:e.tenants.createTenant.certificates.clientCertificate,vaultCertificate:e.tenants.createTenant.certificates.vaultCertificate,vaultCA:e.tenants.createTenant.certificates.vaultCA,gemaltoCA:e.tenants.createTenant.certificates.gemaltoCA,enableCustomCerts:e.tenants.createTenant.fields.security.enableCustomCerts,kesSecurityContext:e.tenants.createTenant.fields.encryption.kesSecurityContext}}),{updateAddField:j.HM,isPageValid:j.NO,addFileServerCert:j.$1,addFileClientCert:j.BI,addFileVaultCert:j.cl,addFileVaultCa:j.fk,addFileGemaltoCa:j.MX}),W=(0,g.Z)((function(e){return(0,p.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({encryptionTypeOptions:{marginBottom:15},mutualTlsConfig:{marginTop:15,"& fieldset":{flex:1}},rightSpacer:{marginRight:15},responsiveContainer:{"@media (max-width: 900px)":{display:"flex",flexFlow:"column"}}},f.QV),f.DF),f.oO),f.AK))}))($((function(e){var t=e.classes,n=e.updateAddField,a=e.isPageValid,r=e.addFileServerCert,l=e.addFileClientCert,c=e.addFileVaultCert,d=e.addFileVaultCa,m=e.addFileGemaltoCa,p=e.enableEncryption,g=e.enableCustomCerts,f=e.encryptionType,h=e.gemaltoEndpoint,x=e.gemaltoToken,v=e.gemaltoDomain,y=e.gemaltoRetry,C=e.awsEndpoint,S=e.awsRegion,j=e.awsKMSKey,A=e.awsAccessKey,k=e.awsSecretKey,R=e.awsToken,z=e.vaultEndpoint,w=e.vaultEngine,F=e.vaultNamespace,D=e.vaultPrefix,E=e.vaultAppRoleEngine,L=e.vaultId,K=e.vaultSecret,M=e.vaultRetry,q=e.vaultPing,V=e.azureEndpoint,O=e.azureTenantID,B=e.azureClientID,$=e.azureClientSecret,W=e.gcpProjectID,H=e.gcpEndpoint,Y=e.gcpClientEmail,Q=e.gcpClientID,X=e.gcpPrivateKeyID,J=e.gcpPrivateKey,ee=e.enableCustomCertsForKES,te=e.enableAutoCert,ne=e.enableTLS,ae=e.minioCertificates,re=e.serverCertificate,se=e.clientCertificate,ie=e.vaultCertificate,oe=e.vaultCA,le=e.gemaltoCA,ce=e.kesSecurityContext,de=e.replicas,ue=(0,o.useState)({}),me=(0,s.Z)(ue,2),pe=me[0],ge=me[1],fe=!1;ne&&(te||ae&&ae.filter((function(e){return e.encoded_key&&e.encoded_cert})).length>0)&&(fe=!0);var he=(0,o.useCallback)((function(e,t){n("encryption",e,t)}),[n]),xe=function(e){ge((0,_.h)(pe,e))};return(0,o.useEffect)((function(){var e=[];p&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"replicas",required:!0,value:de,customValidation:parseInt(de)<1,customValidationMessage:"Replicas needs to be 1 or greater"},{fieldKey:"kes_securityContext_runAsUser",required:!0,value:ce.runAsUser,customValidation:""===ce.runAsUser||parseInt(ce.runAsUser)<0,customValidationMessage:"runAsUser must be present and be 0 or more"},{fieldKey:"kes_securityContext_runAsGroup",required:!0,value:ce.runAsGroup,customValidation:""===ce.runAsGroup||parseInt(ce.runAsGroup)<0,customValidationMessage:"runAsGroup must be present and be 0 or more"},{fieldKey:"kes_securityContext_fsGroup",required:!0,value:ce.fsGroup,customValidation:""===ce.fsGroup||parseInt(ce.fsGroup)<0,customValidationMessage:"fsGroup must be present and be 0 or more"}]),g&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"serverKey",required:!te,value:re.encoded_key},{fieldKey:"serverCert",required:!te,value:re.encoded_cert},{fieldKey:"clientKey",required:!te,value:se.encoded_key},{fieldKey:"clientCert",required:!te,value:se.encoded_cert}])),"vault"===f&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"vault_endpoint",required:!0,value:z},{fieldKey:"vault_id",required:!0,value:L},{fieldKey:"vault_secret",required:!0,value:K},{fieldKey:"vault_ping",required:!1,value:q,customValidation:parseInt(q)<0,customValidationMessage:"Value needs to be 0 or greater"},{fieldKey:"vault_retry",required:!1,value:M,customValidation:parseInt(M)<0,customValidationMessage:"Value needs to be 0 or greater"}])),"aws"===f&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"aws_endpoint",required:!0,value:C},{fieldKey:"aws_region",required:!0,value:S},{fieldKey:"aws_accessKey",required:!0,value:A},{fieldKey:"aws_secretKey",required:!0,value:k}])),"gemalto"===f&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"gemalto_endpoint",required:!0,value:h},{fieldKey:"gemalto_token",required:!0,value:x},{fieldKey:"gemalto_domain",required:!0,value:v},{fieldKey:"gemalto_retry",required:!1,value:y,customValidation:parseInt(y)<0,customValidationMessage:"Value needs to be 0 or greater"}])),"azure"===f&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"azure_endpoint",required:!0,value:V},{fieldKey:"azure_tenant_id",required:!0,value:O},{fieldKey:"azure_client_id",required:!0,value:B},{fieldKey:"azure_client_secret",required:!0,value:$}])));var t=(0,P.R)(e);a("encryption",0===Object.keys(t).length),ge(t)}),[p,f,z,w,L,K,q,M,C,S,k,A,h,x,v,y,W,H,Y,Q,X,J,V,O,B,$,a,te,g,re.encoded_key,re.encoded_cert,se.encoded_key,se.encoded_cert,ce,de]),(0,T.jsxs)(b.Z,{className:t.paperWrapper,children:[(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Encryption"}),(0,T.jsx)("span",{className:t.descriptionText,children:"How would you like to encrypt the information at rest."})]}),(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsx)(N.Z,{value:"enableEncryption",id:"enableEncryption",name:"enableEncryption",checked:p,onChange:function(e){var t=e.target.checked;he("enableEncryption",t)},label:"Enable Server Side Encryption",disabled:!fe})}),p&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.encryptionTypeOptions,children:(0,T.jsx)(U.Z,{currentSelection:f,id:"encryptionType",name:"encryptionType",label:"Encryption Options",onChange:function(e){he("encryptionType",e.target.value)},selectorOptions:[{label:"Vault",value:"vault"},{label:"AWS",value:"aws"},{label:"Gemalto",value:"gemalto"},{label:"GCP",value:"gcp"},{label:"Azure",value:"azure"}]})}),"vault"===f&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsx)(N.Z,{value:"enableCustomCertsForKES",id:"enableCustomCertsForKES",name:"enableCustomCertsForKES",checked:ee||!te,onChange:function(e){var t=e.target.checked;he("enableCustomCertsForKES",t)},label:"Custom Certificates",disabled:!te})}),(ee||!te)&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(u.ZP,{container:!0,children:(0,T.jsx)(u.ZP,{item:!0,xs:12,style:{marginBottom:15},children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"Encryption Service Certificates"}),(0,T.jsx)(G.Z,{onChange:function(e,t){r("key",t,e),xe("serverKey")},accept:".key,.pem",id:"serverKey",name:"serverKey",label:"Key",error:pe.serverKey||"",value:re.key,required:!te}),(0,T.jsx)(G.Z,{onChange:function(e,t){r("cert",t,e),xe("serverCert")},accept:".cer,.crt,.cert,.pem",id:"serverCert",name:"serverCert",label:"Cert",error:pe.serverCert||"",value:re.cert,required:!te})]})})}),(0,T.jsx)(u.ZP,{container:!0,style:{marginBottom:15},children:(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"Mutual TLS authentication"}),(0,T.jsx)(G.Z,{onChange:function(e,t){l("key",t,e),xe("clientKey")},accept:".key,.pem",id:"clientKey",name:"clientKey",label:"Key",error:pe.clientKey||"",value:se.key,required:!te}),(0,T.jsx)(G.Z,{onChange:function(e,t){l("cert",t,e),xe("clientCert")},accept:".cer,.crt,.cert,.pem",id:"clientCert",name:"clientCert",label:"Cert",error:pe.clientCert||"",value:se.cert,required:!te})]})})})]}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"vault_endpoint",name:"vault_endpoint",onChange:function(e){he("vaultEndpoint",e.target.value),xe("vault_endpoint")},label:"Endpoint",value:z,error:pe.vault_endpoint||"",required:!0})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"vault_engine",name:"vault_engine",onChange:function(e){he("vaultEngine",e.target.value),xe("vault_engine")},label:"Engine",value:w})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"vault_namespace",name:"vault_namespace",onChange:function(e){he("vaultNamespace",e.target.value)},label:"Namespace",value:F})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"vault_prefix",name:"vault_prefix",onChange:function(e){he("vaultPrefix",e.target.value)},label:"Prefix",value:D})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"App Role"}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"vault_approle_engine",name:"vault_approle_engine",onChange:function(e){he("vaultAppRoleEngine",e.target.value)},label:"Engine",value:E})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"vault_id",name:"vault_id",onChange:function(e){he("vaultId",e.target.value),xe("vault_id")},label:"AppRole ID",value:L,error:pe.vault_id||"",required:!0})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"vault_secret",name:"vault_secret",onChange:function(e){he("vaultSecret",e.target.value),xe("vault_secret")},label:"AppRole Secret",value:K,error:pe.vault_secret||"",required:!0})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{type:"number",min:"0",id:"vault_retry",name:"vault_retry",onChange:function(e){he("vaultRetry",e.target.value),xe("vault_retry")},label:"Retry (Seconds)",value:M,error:pe.vault_retry||""})})]})}),(0,T.jsx)(u.ZP,{container:!0,className:t.mutualTlsConfig,children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"Mutual TLS authentication (optional)"}),(0,T.jsx)(G.Z,{onChange:function(e,t){c("key",t,e),xe("vault_key")},accept:".key,.pem",id:"vault_key",name:"vault_key",label:"Key",value:ie.key}),(0,T.jsx)(G.Z,{onChange:function(e,t){c("cert",t,e),xe("vault_cert")},accept:".cer,.crt,.cert,.pem",id:"vault_cert",name:"vault_cert",label:"Cert",value:ie.cert}),(0,T.jsx)(G.Z,{onChange:function(e,t){d(t,e),xe("vault_ca")},accept:".cer,.crt,.cert,.pem",id:"vault_ca",name:"vault_ca",label:"CA",value:oe.cert})]})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,style:{marginTop:15},children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"Status"}),(0,T.jsx)(I.Z,{type:"number",min:"0",id:"vault_ping",name:"vault_ping",onChange:function(e){he("vaultPing",e.target.value),xe("vault_ping")},label:"Ping (Seconds)",value:q,error:pe.vault_ping||""})]})})]}),"azure"===f&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"azure_endpoint",name:"azure_endpoint",onChange:function(e){he("azureEndpoint",e.target.value),xe("azure_endpoint")},label:"Endpoint",value:V,error:pe.azure_endpoint||""})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"Credentials"}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"azure_tenant_id",name:"azure_tenant_id",onChange:function(e){he("azureTenantID",e.target.value),xe("azure_tenant_id")},label:"Tenant ID",value:O,error:pe.azure_tenant_id||""})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"azure_client_id",name:"azure_client_id",onChange:function(e){he("azureClientID",e.target.value),xe("azure_client_id")},label:"Client ID",value:B,error:pe.azure_client_id||""})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"azure_client_secret",name:"azure_client_secret",onChange:function(e){he("azureClientSecret",e.target.value),xe("azure_client_secret")},label:"Client Secret",value:$,error:pe.azure_client_secret||""})})]})})]}),"gcp"===f&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"gcp_project_id",name:"gcp_project_id",onChange:function(e){he("gcpProjectID",e.target.value)},label:"Project ID",value:W})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"gcp_endpoint",name:"gcp_endpoint",onChange:function(e){he("gcpEndpoint",e.target.value)},label:"Endpoint",value:H})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"Credentials"}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"gcp_client_email",name:"gcp_client_email",onChange:function(e){he("gcpClientEmail",e.target.value)},label:"Client Email",value:Y})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"gcp_client_id",name:"gcp_client_id",onChange:function(e){he("gcpClientID",e.target.value)},label:"Client ID",value:Q})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"gcp_private_key_id",name:"gcp_private_key_id",onChange:function(e){he("gcpPrivateKeyID",e.target.value)},label:"Private Key ID",value:X})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"gcp_private_key",name:"gcp_private_key",onChange:function(e){he("gcpPrivateKey",e.target.value)},label:"Private Key",value:J})})]})})]}),"aws"===f&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"aws_endpoint",name:"aws_endpoint",onChange:function(e){he("awsEndpoint",e.target.value),xe("aws_endpoint")},label:"Endpoint",value:C,error:pe.aws_endpoint||"",required:!0})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"aws_region",name:"aws_region",onChange:function(e){he("awsRegion",e.target.value),xe("aws_region")},label:"Region",value:S,error:pe.aws_region||"",required:!0})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"aws_kmsKey",name:"aws_kmsKey",onChange:function(e){he("awsKMSKey",e.target.value)},label:"KMS Key",value:j})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"Credentials"}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"aws_accessKey",name:"aws_accessKey",onChange:function(e){he("awsAccessKey",e.target.value),xe("aws_accessKey")},label:"Access Key",value:A,error:pe.aws_accessKey||"",required:!0})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"aws_secretKey",name:"aws_secretKey",onChange:function(e){he("awsSecretKey",e.target.value),xe("aws_secretKey")},label:"Secret Key",value:k,error:pe.aws_secretKey||"",required:!0})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"aws_token",name:"aws_token",onChange:function(e){he("awsToken",e.target.value)},label:"Token",value:R})})]})})]}),"gemalto"===f&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"gemalto_endpoint",name:"gemalto_endpoint",onChange:function(e){he("gemaltoEndpoint",e.target.value),xe("gemalto_endpoint")},label:"Endpoint",value:h,error:pe.gemalto_endpoint||"",required:!0})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,style:{marginBottom:15},children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"Credentials"}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"gemalto_token",name:"gemalto_token",onChange:function(e){he("gemaltoToken",e.target.value),xe("gemalto_token")},label:"Token",value:x,error:pe.gemalto_token||"",required:!0})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"gemalto_domain",name:"gemalto_domain",onChange:function(e){he("gemaltoDomain",e.target.value),xe("gemalto_domain")},label:"Domain",value:v,error:pe.gemalto_domain||"",required:!0})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{type:"number",min:"0",id:"gemalto_retry",name:"gemalto_retry",onChange:function(e){he("gemaltoRetry",e.target.value),xe("gemalto_retry")},label:"Retry (seconds)",value:y,error:pe.gemalto_retry||""})})]})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,style:{marginBottom:15},children:(0,T.jsxs)("fieldset",{className:t.fieldGroup,children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"Custom CA Root certificate verification"}),(0,T.jsx)(G.Z,{onChange:function(e,t){m(t,e),xe("gemalto_ca")},accept:".cer,.crt,.cert,.pem",id:"gemalto_ca",name:"gemalto_ca",label:"CA",value:le.cert})]})})]}),(0,T.jsx)("div",{className:t.headerElement,children:(0,T.jsx)("h4",{className:t.h3Section,children:"Additional Configurations"})}),(0,T.jsxs)(u.ZP,{item:!0,xs:12,children:[(0,T.jsx)(u.ZP,{item:!0,xs:12,classes:t.formFieldRow,children:(0,T.jsx)(I.Z,{type:"number",min:"1",id:"replicas",name:"replicas",onChange:function(e){he("replicas",e.target.value),xe("replicas")},label:"Replicas",value:de,required:!0,error:pe.replicas||""})}),(0,T.jsxs)("fieldset",{className:t.fieldGroup,style:{marginTop:15},children:[(0,T.jsx)("legend",{className:t.descriptionText,children:"SecurityContext for KES pods"}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.kesSecurityContext,children:(0,T.jsxs)("div",{className:"".concat(t.multiContainer," ").concat(t.responsiveContainer),children:[(0,T.jsx)("div",{className:"".concat(t.formFieldRow," ").concat(t.rightSpacer),children:(0,T.jsx)(I.Z,{type:"number",id:"kes_securityContext_runAsUser",name:"kes_securityContext_runAsUser",onChange:function(e){he("kesSecurityContext",(0,i.Z)((0,i.Z)({},ce),{},{runAsUser:e.target.value})),xe("kes_securityContext_runAsUser")},label:"Run As User",value:ce.runAsUser,required:!0,error:pe.kes_securityContext_runAsUser||"",min:"0"})}),(0,T.jsx)("div",{className:"".concat(t.formFieldRow," ").concat(t.rightSpacer),children:(0,T.jsx)(I.Z,{type:"number",id:"kes_securityContext_runAsGroup",name:"kes_securityContext_runAsGroup",onChange:function(e){he("kesSecurityContext",(0,i.Z)((0,i.Z)({},ce),{},{runAsGroup:e.target.value})),xe("kes_securityContext_runAsGroup")},label:"Run As Group",value:ce.runAsGroup,required:!0,error:pe.kes_securityContext_runAsGroup||"",min:"0"})}),(0,T.jsx)("div",{className:"".concat(t.formFieldRow," ").concat(t.rightSpacer),children:(0,T.jsx)(I.Z,{type:"number",id:"kes_securityContext_fsGroup",name:"kes_securityContext_fsGroup",onChange:function(e){he("kesSecurityContext",(0,i.Z)((0,i.Z)({},ce),{},{fsGroup:e.target.value})),xe("kes_securityContext_fsGroup")},label:"FsGroup",value:ce.fsGroup,required:!0,error:pe.kes_securityContext_fsGroup||"",min:"0"})})]})}),(0,T.jsx)("br",{}),(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsx)("div",{className:t.multiContainer,children:(0,T.jsx)(N.Z,{value:"kesSecurityContextRunAsNonRoot",id:"kes_securityContext_runAsNonRoot",name:"kes_securityContext_runAsNonRoot",checked:ce.runAsNonRoot,onChange:function(e){var t=e.target.checked;he("kesSecurityContext",(0,i.Z)((0,i.Z)({},ce),{},{runAsNonRoot:t}))},label:"Do not run as Root"})})})]})]})]})]})}))),H=(0,d.$j)((function(e){return{podAffinity:e.tenants.createTenant.fields.affinity.podAffinity,nodeSelectorLabels:e.tenants.createTenant.fields.affinity.nodeSelectorLabels,withPodAntiAffinity:e.tenants.createTenant.fields.affinity.withPodAntiAffinity}}),{setModalErrorSnackMessage:y.zb,updateAddField:j.HM,isPageValid:j.NO}),Y=(0,g.Z)((function(e){return(0,p.Z)((0,i.Z)((0,i.Z)({overlayAction:{marginLeft:10,"& svg":{maxWidth:15,maxHeight:15},"& button":{background:"#EAEAEA"}},affinityConfigField:{display:"flex"},affinityFieldLabel:{display:"flex",flexFlow:"column",flex:1},radioField:{display:"flex",alignItems:"flex-start",marginTop:10,"& div:first-child":{display:"flex",flexFlow:"column",alignItems:"baseline",textAlign:"left !important"}},affinityLabelKey:{"& div:first-child":{marginBottom:0}},affinityLabelValue:{marginLeft:10,"& div:first-child":{marginBottom:0}},rowActions:{display:"flex",alignItems:"center"},fieldContainer:{marginBottom:0},affinityRow:{marginBottom:10,display:"flex"}},f.oO),f.AK))}))(H((function(e){var t=e.classes,n=e.podAffinity,a=e.nodeSelectorLabels,r=e.withPodAntiAffinity,i=e.setModalErrorSnackMessage,l=e.updateAddField,c=e.isPageValid,d=(0,o.useState)({}),m=(0,s.Z)(d,2),p=m[0],g=m[1],f=(0,o.useState)(!0),x=(0,s.Z)(f,2),v=x[0],y=x[1],C=(0,o.useState)({}),S=(0,s.Z)(C,2),j=S[0],_=S[1],k=(0,o.useState)([{key:"",value:""}]),R=(0,s.Z)(k,2),z=R[0],F=R[1],D=(0,o.useState)([]),E=(0,s.Z)(D,2),L=E[0],M=E[1],q=(0,o.useCallback)((function(e,t){l("affinity",e,t)}),[l]);return(0,o.useEffect)((function(){v&&h.Z.invoke("GET","/api/v1/nodes/labels").then((function(e){y(!1),_(e);var t=[];for(var n in e)t.push({label:n,value:n});M(t),F([{key:t[0].value,value:t[0].value}])})).catch((function(e){y(!1),i(e),_({})}))}),[i,v]),(0,o.useEffect)((function(){if(z){var e=z.filter((function(e){return""!==e.key})).map((function(e){return"".concat(e.key,"=").concat(e.value)})).filter((function(e,t,n){return n.indexOf(e)===t})).join("&");q("nodeSelectorLabels",e)}}),[z,q]),(0,o.useEffect)((function(){var e=[];if("nodeSelector"===n){var t=!0,r=a.split("&");1===r.length&&""===r[0]&&(t=!1),r.forEach((function(e,n){var a=e.split("=");2!==a.length&&(t=!1),n+1!==r.length&&(""!==a[0]&&""!==a[1]||(t=!1))})),e=[].concat((0,Z.Z)(e),[{fieldKey:"labels",required:!0,value:a,customValidation:!t,customValidationMessage:"You need to add at least one label key-pair"}])}var s=(0,P.R)(e);c("affinity",0===Object.keys(s).length),g(s)}),[c,n,a]),(0,T.jsxs)(b.Z,{className:t.paperWrapper,children:[(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Pod Placement"}),(0,T.jsx)("span",{className:t.descriptionText,children:"Configure how pods will be assigned to nodes"})]}),(0,T.jsx)(u.ZP,{xs:12,className:t.affinityConfigField,children:(0,T.jsxs)(u.ZP,{item:!0,className:t.affinityFieldLabel,children:[(0,T.jsx)("div",{className:t.label,children:"Type"}),(0,T.jsx)("div",{className:"".concat(t.descriptionText," ").concat(t.affinityHelpText),children:"MinIO supports multiple configurations for Pod Affinity"}),(0,T.jsx)(u.ZP,{item:!0,className:t.radioField,children:(0,T.jsx)(U.Z,{currentSelection:n,id:"affinity-options",name:"affinity-options",label:" ",onChange:function(e){q("podAffinity",e.target.value)},selectorOptions:[{label:"None",value:"none"},{label:"Default (Pod Anti-Affinnity)",value:"default"},{label:"Node Selector",value:"nodeSelector"}]})})]})}),"nodeSelector"===n&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)("br",{}),(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsx)(N.Z,{value:"with_pod_anti_affinity",id:"with_pod_anti_affinity",name:"with_pod_anti_affinity",checked:r,onChange:function(e){var t=e.target.checked;q("withPodAntiAffinity",t)},label:"With Pod Anti-Affinity"})}),(0,T.jsxs)(u.ZP,{item:!0,xs:12,children:[(0,T.jsx)("h3",{children:"Labels"}),(0,T.jsx)("span",{className:t.error,children:p.labels}),(0,T.jsx)(u.ZP,{container:!0,children:z&&z.map((function(e,n){return(0,T.jsxs)(u.ZP,{item:!0,xs:12,className:t.affinityRow,children:[(0,T.jsxs)(u.ZP,{item:!0,xs:5,className:t.affinityLabelKey,children:[L.length>0&&(0,T.jsx)(A.Z,{onChange:function(e){var t=e.target.value,a=Object.assign([],z);a[n].key=e.target.value,a[n].value=j[t][0],F(a)},id:"select-access-policy",name:"select-access-policy",label:"",value:e.key,options:L,classes:t.fieldContainer}),0===L.length&&(0,T.jsx)(I.Z,{id:"nodeselector-key-".concat(n.toString()),label:"",name:"nodeselector-".concat(n.toString()),value:e.key,onChange:function(e){var t=Object.assign([],z);t[n].key=e.target.value,F(t)},index:n,placeholder:"Key",classes:t.fieldContainer})]}),(0,T.jsxs)(u.ZP,{item:!0,xs:5,className:t.affinityLabelValue,children:[L.length>0&&(0,T.jsx)(A.Z,{onChange:function(e){var t=Object.assign([],z);t[n].value=e.target.value,F(t)},id:"select-access-policy",name:"select-access-policy",label:"",value:e.value,options:j[e.key]?j[e.key].map((function(e){return{label:e,value:e}})):[],classes:t.fieldContainer}),0===L.length&&(0,T.jsx)(I.Z,{id:"nodeselector-value-".concat(n.toString()),label:"",name:"nodeselector-".concat(n.toString()),value:e.value,onChange:function(e){var t=Object.assign([],z);t[n].value=e.target.value,F(t)},index:n,placeholder:"value",classes:t.fieldContainer})]}),(0,T.jsxs)(u.ZP,{item:!0,xs:2,className:t.rowActions,children:[(0,T.jsx)("div",{className:t.overlayAction,children:(0,T.jsx)(w.Z,{size:"small",onClick:function(){var e=Object.assign([],z);L.length>0?e.push({key:L[0].value,value:j[L[0].value][0]}):e.push({key:"",value:""}),F(e)},children:(0,T.jsx)(V.Z,{})})}),z.length>1&&(0,T.jsx)("div",{className:t.overlayAction,children:(0,T.jsx)(w.Z,{size:"small",onClick:function(){var e=z.filter((function(e,t){return t!==n}));F(e)},children:(0,T.jsx)(K.Z,{})})})]})]})}))})]})]})]})}))),Q=n(35721),X=n(24442),J=(0,d.$j)((function(e){return{storageClasses:e.tenants.createTenant.storageClasses,customImage:e.tenants.createTenant.fields.configure.customImage,imageName:e.tenants.createTenant.fields.configure.imageName,customDockerhub:e.tenants.createTenant.fields.configure.customDockerhub,imageRegistry:e.tenants.createTenant.fields.configure.imageRegistry,imageRegistryUsername:e.tenants.createTenant.fields.configure.imageRegistryUsername,imageRegistryPassword:e.tenants.createTenant.fields.configure.imageRegistryPassword,exposeMinIO:e.tenants.createTenant.fields.configure.exposeMinIO,exposeConsole:e.tenants.createTenant.fields.configure.exposeConsole,prometheusCustom:e.tenants.createTenant.fields.configure.prometheusCustom,tenantCustom:e.tenants.createTenant.fields.configure.tenantCustom,logSearchCustom:e.tenants.createTenant.fields.configure.logSearchCustom,logSearchVolumeSize:e.tenants.createTenant.fields.configure.logSearchVolumeSize,logSearchSizeFactor:e.tenants.createTenant.fields.configure.logSearchSizeFactor,prometheusVolumeSize:e.tenants.createTenant.fields.configure.prometheusVolumeSize,prometheusSizeFactor:e.tenants.createTenant.fields.configure.prometheusSizeFactor,logSearchSelectedStorageClass:e.tenants.createTenant.fields.configure.logSearchSelectedStorageClass,logSearchImage:e.tenants.createTenant.fields.configure.logSearchImage,kesImage:e.tenants.createTenant.fields.configure.kesImage,logSearchPostgresImage:e.tenants.createTenant.fields.configure.logSearchPostgresImage,logSearchPostgresInitImage:e.tenants.createTenant.fields.configure.logSearchPostgresInitImage,prometheusSelectedStorageClass:e.tenants.createTenant.fields.configure.prometheusSelectedStorageClass,prometheusImage:e.tenants.createTenant.fields.configure.prometheusImage,prometheusSidecarImage:e.tenants.createTenant.fields.configure.prometheusSidecarImage,prometheusInitImage:e.tenants.createTenant.fields.configure.prometheusInitImage,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass}}),{updateAddField:j.HM,isPageValid:j.NO}),ee=(0,g.Z)((function(e){return(0,p.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},f.DF),f.oO),f.AK))}))(J((function(e){var t=e.classes,n=(e.storageClasses,e.customImage),a=e.imageName,r=e.customDockerhub,i=e.imageRegistry,l=e.imageRegistryUsername,c=e.imageRegistryPassword,d=(e.exposeMinIO,e.exposeConsole,e.prometheusCustom),m=e.tenantCustom,p=e.logSearchCustom,g=e.logSearchVolumeSize,f=(e.logSearchSizeFactor,e.logSearchImage),h=e.kesImage,x=e.logSearchPostgresImage,v=e.logSearchPostgresInitImage,y=e.prometheusVolumeSize,C=(e.prometheusSizeFactor,e.logSearchSelectedStorageClass),S=e.prometheusSelectedStorageClass,j=e.prometheusImage,A=e.prometheusSidecarImage,k=e.prometheusInitImage,R=e.updateAddField,z=e.isPageValid,w=(e.selectedStorageClass,(0,o.useState)({})),F=(0,s.Z)(w,2),D=F[0],E=F[1],U=(0,o.useCallback)((function(e,t){R("configure",e,t)}),[R]);(0,o.useEffect)((function(){var e=[];d&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"prometheus_storage_class",required:!0,value:S,customValidation:""===S,customValidationMessage:"Field cannot be empty"},{fieldKey:"prometheus_volume_size",required:!0,value:y,customValidation:""===y||parseInt(y)<=0,customValidationMessage:"Volume size must be present and be greatter than 0"}])),p&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"log_search_storage_class",required:!0,value:C,customValidation:""===C,customValidationMessage:"Field cannot be empty"},{fieldKey:"log_search_volume_size",required:!0,value:g,customValidation:""===g||parseInt(g)<=0,customValidationMessage:"Volume size must be present and be greatter than 0"}])),n&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"image",required:!1,value:a,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/minio:VERSION'"},{fieldKey:"logSearchImage",required:!1,value:f,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/logsearchapi:VERSION'"},{fieldKey:"kesImage",required:!1,value:h,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/kes:VERSION'"},{fieldKey:"logSearchPostgresImage",required:!1,value:x,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'library/postgres:VERSION'"},{fieldKey:"logSearchPostgresInitImage",required:!1,value:v,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'library/busybox:VERSION'"},{fieldKey:"prometheusImage",required:!1,value:j,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/prometheus:VERSION'"},{fieldKey:"prometheusSidecarImage",required:!1,value:A,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'project/container:VERSION'"},{fieldKey:"prometheusInitImage",required:!1,value:k,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'library/busybox:VERSION'"}]),r&&(e=[].concat((0,Z.Z)(e),[{fieldKey:"registry",required:!0,value:i},{fieldKey:"registryUsername",required:!0,value:l},{fieldKey:"registryPassword",required:!0,value:c}])));var t=(0,P.R)(e);z("configure",0===Object.keys(t).length),E(t)}),[n,a,f,h,x,v,j,A,k,r,i,l,c,z,d,m,p,S,y,C,g]);var L=function(e){E((0,_.h)(D,e))};return(0,T.jsxs)(b.Z,{className:t.paperWrapper,children:[(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Container Images"}),(0,T.jsx)("span",{className:t.descriptionText,children:"Images used by the Tenant Deployment"})]}),(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"image",name:"image",onChange:function(e){U("imageName",e.target.value),L("image")},label:"MinIO's Image",value:a,error:D.image||"",placeholder:"E.g. minio/minio:RELEASE.2022-01-08T03-11-54Z"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"logSearchImage",name:"logSearchImage",onChange:function(e){U("logSearchImage",e.target.value),L("logSearchImage")},label:"Log Search API's Image",value:f,error:D.logSearchImage||"",placeholder:"E.g. minio/logsearchapi:v4.1.1"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"kesImage",name:"kesImage",onChange:function(e){U("kesImage",e.target.value),L("kesImage")},label:"KES Image",value:h,error:D.kesImage||"",placeholder:"E.g. minio/kes:v0.14.0"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"logSearchPostgresImage",name:"logSearchPostgresImage",onChange:function(e){U("logSearchPostgresImage",e.target.value),L("logSearchPostgresImage")},label:"Log Search Postgres's Image",value:x,error:D.logSearchPostgresImage||"",placeholder:"E.g. library/postgres:13"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"logSearchPostgresInitImage",name:"logSearchPostgresInitImage",onChange:function(e){U("logSearchPostgresInitImage",e.target.value),L("logSearchPostgresInitImage")},label:"Log Search Postgres's Init Image",value:v,error:D.logSearchPostgresInitImage||"",placeholder:"E.g. library/busybox:1.33.1"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"prometheusImage",name:"prometheusImage",onChange:function(e){U("prometheusImage",e.target.value),L("prometheusImage")},label:"Prometheus Image",value:j,error:D.prometheusImage||"",placeholder:"E.g. quay.io/prometheus/prometheus:latest"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"prometheusSidecarImage",name:"prometheusSidecarImage",onChange:function(e){U("prometheusSidecarImage",e.target.value),L("prometheusSidecarImage")},label:"Prometheus Sidecar Image",value:A,error:D.prometheusSidecarImage||"",placeholder:"E.g. quay.io/prometheus/prometheus:latest"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"prometheusInitImage",name:"prometheusInitImage",onChange:function(e){U("prometheusInitImage",e.target.value),L("prometheusInitImage")},label:"Prometheus Init Image",value:k,error:D.prometheusInitImage||"",placeholder:"E.g. quay.io/prometheus/prometheus:latest"})})]}),n&&(0,T.jsx)(o.Fragment,{children:(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(N.Z,{value:"custom_docker_hub",id:"custom_docker_hub",name:"custom_docker_hub",checked:r,onChange:function(e){var t=e.target.checked;U("customDockerhub",t)},label:"Set/Update Image Registry"})})}),r&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"registry",name:"registry",onChange:function(e){U("imageRegistry",e.target.value)},label:"Endpoint",value:i,error:D.registry||"",placeholder:"E.g. https://index.docker.io/v1/",required:!0})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"registryUsername",name:"registryUsername",onChange:function(e){U("imageRegistryUsername",e.target.value)},label:"Username",value:l,error:D.registryUsername||"",required:!0})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"registryPassword",name:"registryPassword",onChange:function(e){U("imageRegistryPassword",e.target.value)},label:"Password",value:c,error:D.registryPassword||"",required:!0})})]})]})}))),te=n(25534),ne=n(29316),ae=n(3143),re=n.n(ae),se=n(32120),ie=n(23473),oe=n(60656),le=n(77138),ce={setErrorSnackMessage:y.Ih},de=(0,d.$j)(null,ce),ue=(0,g.Z)((function(e){return(0,p.Z)((0,i.Z)((0,i.Z)({wrapText:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"}},f.oO),f.Qw))}))(de((function(e){var t=e.classes,n=e.namespace,a=e.addNamespaceOpen,r=e.closeAddNamespaceModalAndRefresh,i=e.setErrorSnackMessage,l=(0,o.useState)(!1),c=(0,s.Z)(l,2),d=c[0],u=c[1];(0,o.useEffect)((function(){d&&h.Z.invoke("POST","/api/v1/namespace",{name:n}).then((function(e){u(!1),r(!0)})).catch((function(e){u(!1),i(e)}))}),[d,r,n,i]);return(0,T.jsx)(oe.Z,{title:"New namespace",confirmText:"Create",confirmButtonProps:{color:"primary",variant:"contained"},isOpen:a,titleIcon:(0,T.jsx)(le.Ej,{}),isLoading:d,onConfirm:function(){u(!0)},onClose:function(){r(!1)},confirmationContent:(0,T.jsxs)(o.Fragment,{children:[d&&(0,T.jsx)(m.Z,{}),(0,T.jsxs)(ie.Z,{children:["Are you sure you want to add a namespace called",(0,T.jsx)("br",{}),(0,T.jsx)("b",{className:t.wrapText,children:n}),"?"]})]})})}))),me=n(4182),pe=n(35044),ge=n(73481),fe=n(29399),he=n(95995),xe=(0,d.$j)((function(e){return{volumeSize:e.tenants.createTenant.fields.tenantSize.volumeSize,sizeFactor:e.tenants.createTenant.fields.tenantSize.sizeFactor,drivesPerServer:e.tenants.createTenant.fields.tenantSize.drivesPerServer,nodes:e.tenants.createTenant.fields.tenantSize.nodes,memoryNode:e.tenants.createTenant.fields.tenantSize.memoryNode,ecParity:e.tenants.createTenant.fields.tenantSize.ecParity,ecParityChoices:e.tenants.createTenant.fields.tenantSize.ecParityChoices,cleanECChoices:e.tenants.createTenant.fields.tenantSize.cleanECChoices,resourcesSize:e.tenants.createTenant.fields.tenantSize.resourcesSize,distribution:e.tenants.createTenant.fields.tenantSize.distribution,ecParityCalc:e.tenants.createTenant.fields.tenantSize.ecParityCalc,limitSize:e.tenants.createTenant.fields.tenantSize.limitSize,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass,cpuToUse:e.tenants.createTenant.fields.tenantSize.cpuToUse,integrationSelection:e.tenants.createTenant.fields.tenantSize.integrationSelection}}),{updateAddField:j.HM,isPageValid:j.NO}),ve=(0,g.Z)((function(e){return(0,p.Z)((0,i.Z)((0,i.Z)({root:{margin:4},table:{"& .MuiTableCell-root":{fontSize:13}}},f.oO),f.AK))}))(xe((function(e){var t=e.classes,n=(e.updateAddField,e.isPageValid,e.volumeSize,e.sizeFactor,e.drivesPerServer,e.nodes),a=e.memoryNode,r=e.ecParity,s=(e.ecParityChoices,e.cleanECChoices,e.resourcesSize,e.distribution),i=e.ecParityCalc,l=(e.limitSize,e.selectedStorageClass,e.cpuToUse),c=e.integrationSelection,d=i.storageFactors.find((function(e){return e.erasureCode===r}));return(0,T.jsxs)("div",{className:t.root,children:[(0,T.jsx)("h4",{children:"Resource Allocation"}),(0,T.jsx)(he.Z,{}),(0,T.jsx)(me.Z,{className:t.table,"aria-label":"simple table",size:"small",children:(0,T.jsxs)(pe.Z,{children:[(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"Number of Servers"}),(0,T.jsx)(ge.Z,{align:"right",children:parseInt(n)>0?n:"-"})]}),""===c.typeSelection&&""===c.storageClass&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"Drives per Server"}),(0,T.jsx)(ge.Z,{align:"right",children:s?s.disks:"-"})]}),(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"Drive Capacity"}),(0,T.jsx)(ge.Z,{align:"right",children:s?(0,x.ae)(s.pvSize):"-"})]})]}),(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"Total Volumes"}),(0,T.jsx)(ge.Z,{align:"right",children:s?s.persistentVolumes:"-"})]}),""===c.typeSelection&&""===c.storageClass&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"Memory per Node"}),(0,T.jsxs)(ge.Z,{align:"right",children:[a," Gi"]})]}),(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{style:{borderBottom:0},scope:"row",children:"CPU Selection"}),(0,T.jsx)(ge.Z,{style:{borderBottom:0},align:"right",children:l})]})]})]})}),0===i.error&&d&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)("h4",{children:"Erasure Code Configuration"}),(0,T.jsx)(he.Z,{}),(0,T.jsx)(me.Z,{className:t.table,"aria-label":"simple table",size:"small",children:(0,T.jsxs)(pe.Z,{children:[(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"EC Parity"}),(0,T.jsx)(ge.Z,{align:"right",children:""!==r?r:"-"})]}),(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"Raw Capacity"}),(0,T.jsx)(ge.Z,{align:"right",children:(0,x.ae)(i.rawCapacity)})]}),(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"Usable Capacity"}),(0,T.jsx)(ge.Z,{align:"right",children:(0,x.ae)(d.maxCapacity)})]}),(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{style:{borderBottom:0},scope:"row",children:"Server Failures Tolerated"}),(0,T.jsx)(ge.Z,{style:{borderBottom:0},align:"right",children:s?Math.floor(d.maxFailureTolerations/s.disks):"-"})]})]})})]}),""!==c.typeSelection&&""!==c.storageClass&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)("h4",{children:"Single Instance Configuration"}),(0,T.jsx)(he.Z,{}),(0,T.jsx)(me.Z,{className:t.table,"aria-label":"simple table",size:"small",children:(0,T.jsxs)(pe.Z,{children:[(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"CPU"}),(0,T.jsx)(ge.Z,{align:"right",children:0!==c.CPU?c.CPU:"-"})]}),(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"Memory"}),(0,T.jsx)(ge.Z,{align:"right",children:0!==c.memory?"".concat(c.memory," Gi"):"-"})]}),(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{scope:"row",children:"Drives per Server"}),(0,T.jsx)(ge.Z,{align:"right",children:0!==c.drivesPerServer?"".concat(c.drivesPerServer):"-"})]}),(0,T.jsxs)(fe.Z,{children:[(0,T.jsx)(ge.Z,{style:{borderBottom:0},scope:"row",children:"Drive Size"}),(0,T.jsxs)(ge.Z,{style:{borderBottom:0},align:"right",children:[c.driveSize.driveSize,c.driveSize.sizeUnit]})]})]})})]})]})}))),ye=n(7262),Ce=(0,d.$j)((function(e){return{nodes:e.tenants.createTenant.fields.tenantSize.nodes,resourcesSize:e.tenants.createTenant.fields.tenantSize.resourcesSize,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass,maxAllocatableResources:e.tenants.createTenant.fields.tenantSize.maxAllocatableResources,maxCPUsUse:e.tenants.createTenant.fields.tenantSize.maxCPUsUse,maxMemorySize:e.tenants.createTenant.fields.tenantSize.maxMemorySize,resourcesSpecifyLimit:e.tenants.createTenant.fields.tenantSize.resourcesSpecifyLimit,resourcesCPURequestError:e.tenants.createTenant.fields.tenantSize.resourcesCPURequestError,resourcesCPURequest:e.tenants.createTenant.fields.tenantSize.resourcesCPURequest,resourcesCPULimitError:e.tenants.createTenant.fields.tenantSize.resourcesCPULimitError,resourcesCPULimit:e.tenants.createTenant.fields.tenantSize.resourcesCPULimit,resourcesMemoryRequestError:e.tenants.createTenant.fields.tenantSize.resourcesMemoryRequestError,resourcesMemoryRequest:e.tenants.createTenant.fields.tenantSize.resourcesMemoryRequest,resourcesMemoryLimitError:e.tenants.createTenant.fields.tenantSize.resourcesMemoryLimitError,resourcesMemoryLimit:e.tenants.createTenant.fields.tenantSize.resourcesMemoryLimit}}),{updateAddField:j.HM,isPageValid:j.NO}),Se=(0,g.Z)((function(e){return(0,p.Z)((0,i.Z)((0,i.Z)((0,i.Z)({compositeFieldContainer:{display:"flex",alignItems:"center"},compositeAddOn:{marginLeft:10,"& div":{marginBottom:0},"@media (max-width: 900px)":{"& div":{marginTop:5}}}},f.DF),f.oO),f.AK))}))(Ce((function(e){var t=e.classes,n=e.updateAddField,a=e.isPageValid,r=e.nodes,s=e.resourcesSize,i=e.selectedStorageClass,l=(e.maxAllocatableResources,e.maxCPUsUse),d=e.maxMemorySize,m=e.resourcesSpecifyLimit,p=e.resourcesCPURequestError,g=e.resourcesCPURequest,f=e.resourcesCPULimitError,x=e.resourcesCPULimit,v=e.resourcesMemoryRequestError,y=e.resourcesMemoryRequest,C=e.resourcesMemoryLimitError,S=e.resourcesMemoryLimit,j=(0,o.useCallback)((function(e,t){n("tenantSize",e,t)}),[n]);return(0,o.useEffect)((function(){a("tenantSize",""===v&&""===C&&""===p&&""===f)}),[a,v,C,p,f]),(0,o.useEffect)((function(){h.Z.invoke("GET","api/v1/cluster/allocatable-resources?num_nodes=".concat(r)).then((function(e){j("maxAllocatableResources",e);var t=e,n=c()(t,"min_allocatable_mem",!1),a=c()(t,"min_allocatable_cpu",!1);if(!1===n||!1===a)return j("cpuToUse",0),j("maxMemorySize",""),void j("maxCPUsUse","");var r=(0,ye.floor)(e.mem_priority.max_allocatable_mem/1024/1024/1024);j("maxMemorySize",r.toString()),j("maxCPUsUse",e.cpu_priority.max_allocatable_cpu.toString());var s=c()(t,"cpu_priority.max_allocatable_cpu",0),i=Math.max(1,(0,ye.floor)(s/2));j("resourcesCPURequest",i);var o=Math.max(2,(0,ye.floor)(r/2));j("resourcesMemoryRequest",o)})).catch((function(e){j("maxMemorySize",0),j("resourcesCPURequest",""),console.error(e)}))}),[r,j]),(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Resources"}),(0,T.jsx)("span",{className:t.descriptionText,children:"You may specify the amount of CPU and Memory that MinIO servers should reserve on each node."})]})}),""!==s.error&&(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsx)("div",{className:t.error,children:s.error})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{label:"CPU Request",id:"resourcesCPURequest",name:"resourcesCPURequest",onChange:function(e){var t=parseInt(e.target.value);""===e.target.value?j("resourcesCPURequestError",""):isNaN(t)?j("resourcesCPURequestError","Invalid number"):t>parseInt(l)?j("resourcesCPURequestError","Request exceeds available cores (".concat(l,")")):e.target.validity.valid?j("resourcesCPURequestError",""):j("resourcesCPURequestError","Invalid configuration"),j("resourcesCPURequest",e.target.value)},value:g,disabled:""===i,max:l,error:p,pattern:"[0-9]*"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"resourcesMemoryRequest",name:"resourcesMemoryRequest",onChange:function(e){var t=parseInt(e.target.value);""===e.target.value?j("resourcesMemoryRequestError",""):isNaN(t)?j("resourcesMemoryRequestError","Invalid number"):t>parseInt(d)?j("resourcesMemoryRequestError","Request exceeds available memory across ".concat(r," nodes (").concat(d,"Gi)")):t<2?j("resourcesMemoryRequestError","At least 2Gi must be requested"):e.target.validity.valid?j("resourcesMemoryRequestError",""):j("resourcesMemoryRequestError","Invalid configuration"),j("resourcesMemoryRequest",e.target.value)},label:"Memory Request [Gi]",value:y,disabled:""===i,error:v,pattern:"[0-9]*"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsx)(N.Z,{value:"resourcesSpecifyLimit",id:"resourcesSpecifyLimit",name:"resourcesSpecifyLimit",checked:m,onChange:function(e){var t=e.target.checked;j("resourcesSpecifyLimit",t)},label:"Specify Limit"})}),m&&(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{label:"CPU Limit",id:"resourcesCPULimit",name:"resourcesCPULimit",onChange:function(e){var t=parseInt(e.target.value);""===e.target.value?j("resourcesCPULimitError",""):isNaN(t)?j("resourcesCPULimitError","Invalid number"):e.target.validity.valid?j("resourcesCPULimitError",""):j("resourcesCPULimitError","Invalid configuration"),j("resourcesCPULimit",e.target.value)},value:x,disabled:""===i,max:l,error:f,pattern:"[0-9]*"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"resourcesMemoryLimit",name:"resourcesMemoryLimit",onChange:function(e){var t=parseInt(e.target.value);console.log("value",t),""===e.target.value?j("resourcesMemoryLimitError",""):isNaN(t)?j("resourcesMemoryLimitError","Invalid number"):e.target.validity.valid?j("resourcesMemoryLimitError",""):j("resourcesMemoryLimitError","Invalid configuration"),j("resourcesMemoryLimit",e.target.value)},label:"Memory Limit [Gi]",value:S,disabled:""===i,error:C,pattern:"[0-9]*"})})]})]})}))),je=(0,d.$j)((function(e){return{volumeSize:e.tenants.createTenant.fields.tenantSize.volumeSize,sizeFactor:e.tenants.createTenant.fields.tenantSize.sizeFactor,drivesPerServer:e.tenants.createTenant.fields.tenantSize.drivesPerServer,nodes:e.tenants.createTenant.fields.tenantSize.nodes,memoryNode:e.tenants.createTenant.fields.tenantSize.memoryNode,ecParity:e.tenants.createTenant.fields.tenantSize.ecParity,ecParityChoices:e.tenants.createTenant.fields.tenantSize.ecParityChoices,cleanECChoices:e.tenants.createTenant.fields.tenantSize.cleanECChoices,resourcesSize:e.tenants.createTenant.fields.tenantSize.resourcesSize,distribution:e.tenants.createTenant.fields.tenantSize.distribution,ecParityCalc:e.tenants.createTenant.fields.tenantSize.ecParityCalc,limitSize:e.tenants.createTenant.limitSize,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass}}),{updateAddField:j.HM,isPageValid:j.NO}),Ze=(0,g.Z)((function(e){return(0,p.Z)((0,i.Z)((0,i.Z)((0,i.Z)({compositeFieldContainer:{display:"flex",alignItems:"center"},compositeAddOn:{marginLeft:10,"& div":{marginBottom:0},"@media (max-width: 900px)":{"& div":{marginTop:5}}}},f.DF),f.oO),f.AK))}))(je((function(e){var t=e.classes,n=e.updateAddField,a=e.isPageValid,r=e.volumeSize,i=e.sizeFactor,l=e.drivesPerServer,c=e.nodes,d=e.memoryNode,m=e.ecParity,p=e.ecParityChoices,g=e.cleanECChoices,f=e.resourcesSize,v=e.distribution,y=e.ecParityCalc,C=e.limitSize,S=e.selectedStorageClass,j=(0,o.useState)({}),Z=(0,s.Z)(j,2),b=Z[0],N=Z[1],k=(0,o.useState)(!1),R=(0,s.Z)(k,2),z=R[0],w=R[1],F=(0,o.useState)(""),D=(0,s.Z)(F,2),E=D[0],U=D[1],L=(0,o.useCallback)((function(e,t){n("tenantSize",e,t)}),[n]),K=function(e){N((0,_.h)(b,e))};return(0,o.useEffect)((function(){if(p.length>0&&""===v.error){var e=(0,x.ES)(g,v.persistentVolumes,v.pvSize,v.nodes);L("ecParityCalc",e),g.includes(m)&&""!==m||L("ecParity",e.defaultEC)}}),[m,p.length,v,g,L]),(0,o.useEffect)((function(){var e=r,t=i,n=(0,x.Pw)("12","Ti",!0),a={unit:t,value:e.toString()},s=(0,x.zg)(a,parseInt(c),parseInt(n),parseInt(l));L("distribution",s),w(!1),U("")}),[c,r,i,L,l]),(0,o.useEffect)((function(){var e=(0,x.Pw)(r,i,!0),t=(0,P.R)([{fieldKey:"nodes",required:!0,value:c,customValidation:z,customValidationMessage:E},{fieldKey:"volume_size",required:!0,value:r,customValidation:parseInt(e)<1073741824||parseInt(e)>C[S],customValidationMessage:"Volume size must be greater than 1Gi and less than ".concat((0,x.ae)(C[S],!0))},{fieldKey:"drivesps",required:!0,value:l,customValidation:parseInt(l)<1,customValidationMessage:"There must be at least one drive"}]);a("tenantSize",!("nodes"in t)&&!("volume_size"in t)&&!("drivesps"in t)&&""===v.error&&0===y.error&&""!==m),N(t)}),[c,r,i,d,v,y,f,C,S,a,z,E,l,m]),(0,o.useEffect)((function(){""===v.error&&""!==c.trim()&&0!==v.disks&&h.Z.invoke("GET","api/v1/get-parity/".concat(c,"/").concat(v.disks)).then((function(e){L("ecParityChoices",(0,se.dv)(e)),L("cleanECChoices",e)})).catch((function(e){L("ecparityChoices",[]),a("tenantSize",!1),L("ecParity","")}))}),[v,a,L,c]),(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Capacity"}),(0,T.jsx)("span",{className:t.descriptionText,children:"Please select the desired capacity"})]})}),""!==v.error&&(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsx)("div",{className:t.error,children:v.error})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"nodes",name:"nodes",onChange:function(e){e.target.validity.valid&&(L("nodes",e.target.value),K("nodes"))},label:"Number of Servers",disabled:""===S,value:c,min:"4",required:!0,error:b.nodes||"",pattern:"[0-9]*"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"drivesps",name:"drivesps",onChange:function(e){e.target.validity.valid&&(L("drivesPerServer",e.target.value),K("drivesps"))},label:"Drives per Server",value:l,disabled:""===S,min:"1",required:!0,error:b.drivesps||"",pattern:"[0-9]*"})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsx)("div",{className:t.multiContainer,children:(0,T.jsx)("div",{className:t.formFieldRow,children:(0,T.jsxs)("div",{className:t.compositeFieldContainer,children:[(0,T.jsx)(I.Z,{type:"number",id:"volume_size",name:"volume_size",onChange:function(e){L("volumeSize",e.target.value),K("volume_size")},label:"Total Size",value:r,disabled:""===S,required:!0,error:b.volume_size||"",min:"0"}),(0,T.jsx)("div",{className:t.compositeAddOn,children:(0,T.jsx)(A.Z,{label:"",id:"size_factor",name:"size_factor",value:i,disabled:""===S,onChange:function(e){L("sizeFactor",e.target.value)},options:(0,x.QU)()})})]})})})}),(0,T.jsxs)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:[(0,T.jsx)(A.Z,{id:"ec_parity",name:"ec_parity",onChange:function(e){L("ecParity",e.target.value)},label:"Erasure Code Parity",disabled:""===S,value:m,options:p}),(0,T.jsx)("span",{className:t.descriptionText,children:"Please select the desired parity. This setting will change the max usable capacity in the cluster"})]}),(0,T.jsx)(Se,{})]})}))),be=n(36222),_e=(0,d.$j)((function(e){return function(){var t=e.tenants.createTenant,n=t.fields.tenantSize,a=n.memoryNode,r=n.ecParityChoices,s=n.distribution,i=n.cleanECChoices,o=n.sizeFactor,l=n.ecParity,c=n.cpuToUse,d=n.integrationSelection,u=n.resourcesSize,m=n.drivesPerServer,p=n.maxCPUsUse,g=n.ecParityCalc;return{volumeSize:n.volumeSize,sizeFactor:o,drivesPerServer:m,nodes:n.nodes,memoryNode:a,ecParity:l,ecParityChoices:r,cleanECChoices:i,resourcesSize:u,distribution:s,ecParityCalc:g,cpuToUse:c,maxCPUsUse:p,integrationSelection:d,limitSize:t.limitSize,selectedStorageType:t.fields.nameTenant.selectedStorageType}}}),{updateAddField:j.HM,isPageValid:j.NO}),Pe=(0,g.Z)((function(e){return(0,p.Z)((0,i.Z)((0,i.Z)((0,i.Z)({compositeFieldContainer:{display:"flex",alignItems:"center"},compositeAddOn:{marginLeft:10,"& div":{marginBottom:0},"@media (max-width: 900px)":{"& div":{marginTop:5}}}},f.DF),f.oO),f.AK))}))(_e((function(e){var t=e.classes,n=e.updateAddField,a=e.isPageValid,r=e.volumeSize,i=e.sizeFactor,l=e.drivesPerServer,d=e.nodes,m=e.memoryNode,p=e.ecParity,g=e.ecParityChoices,f=e.cleanECChoices,v=e.resourcesSize,y=e.distribution,C=e.ecParityCalc,S=e.limitSize,j=e.cpuToUse,Z=e.selectedStorageType,b=e.maxCPUsUse,N=e.formToRender,k=e.integrationSelection,R=(0,o.useState)({}),z=(0,s.Z)(R,2),w=z[0],F=z[1],D=(0,o.useCallback)((function(e,t){n("tenantSize",e,t)}),[n]),E=(0,o.useCallback)((function(e,t){n("nameTenant",e,t)}),[n]);return(0,o.useEffect)((function(){if(g.length>0&&""===y.error){var e=(0,x.ES)(f,y.persistentVolumes,y.pvSize,y.nodes);D("ecParityCalc",e),f.includes(p)&&""!==p||D("ecParity",e.defaultEC)}}),[p,g,y,f,D]),(0,o.useEffect)((function(){if(void 0!==N&&parseInt(d)>=4){var e=Ie[N];if(Object.keys(e).length>0){var t=c()(e,"configurations",[]).find((function(e){return e.typeSelection===Z}));if(t){D("integrationSelection",t),E("selectedStorageClass",t.storageClass);var n={pvSize:parseInt((0,x.Pw)(t.driveSize.driveSize,t.driveSize.sizeUnit,!0),10),nodes:parseInt(d),disks:t.drivesPerServer,persistentVolumes:t.drivesPerServer*parseInt(d),error:""};D("distribution",n),D("resourcesCPURequest",Math.max(1,t.CPU/2)),D("resourcesMemoryRequest",Math.max(2,t.memory/2))}}}}),[d,Z,N,D,E]),(0,o.useEffect)((function(){var e=(0,P.R)([{fieldKey:"nodes",required:!0,value:d,customValidation:parseInt(d)<4,customValidationMessage:"Al least 4 servers must be selected"}]);a("tenantSize",!("nodes"in e)&&""===y.error&&0===C.error&&""===v.error&&""!==p&&parseInt(d)>=4),F(e)}),[d,r,i,m,y,C,v,S,Z,j,b,a,l,p]),(0,o.useEffect)((function(){0!==k.drivesPerServer&&""!==d.trim()&&h.Z.invoke("GET","api/v1/get-parity/".concat(d,"/").concat(k.drivesPerServer)).then((function(e){D("ecParityChoices",(0,se.dv)(e)),D("cleanECChoices",e)})).catch((function(e){D("ecparityChoices",[]),a("tenantSize",!1),D("ecParity","")}))}),[k,d,a,D]),(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Tenant Size"}),(0,T.jsx)("span",{className:t.descriptionText,children:"Please select the desired capacity"})]})}),""!==y.error&&(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsx)("div",{className:t.error,children:y.error})}),""!==v.error&&(0,T.jsx)(u.ZP,{item:!0,xs:12,children:(0,T.jsx)("div",{className:t.error,children:v.error})}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"nodes",name:"nodes",onChange:function(e){var t;e.target.validity.valid&&(D("nodes",e.target.value),t="nodes",F((0,_.h)(w,t)))},label:"Number of Servers",disabled:""===Z,value:d,min:"4",required:!0,error:w.nodes||"",pattern:"[0-9]*"})}),(0,T.jsxs)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:[(0,T.jsx)(A.Z,{id:"ec_parity",name:"ec_parity",onChange:function(e){D("ecParity",e.target.value)},label:"Erasure Code Parity",disabled:""===Z,value:p,options:g}),(0,T.jsx)("span",{className:t.descriptionText,children:"Please select the desired parity. This setting will change the max usable capacity in the cluster"})]})]})})));!function(e){e[e.aws=0]="aws",e[e.azure=1]="azure",e[e.gcp=2]="gcp",e[e.default=3]="default",e[e[void 0]=4]="undefined"}(r||(r={}));var Ne={"mp-mode-aws":r.aws,"mp-mode-azure":r.azure,"mp-mode-gcp":r.gcp},Ie=(a={},(0,be.Z)(a,r.aws,{variantSelectorLabel:"Storage Type",variantSelectorValues:[{label:"NVME",value:"nvme"},{label:"HDD",value:"hdd"}],configurations:[{typeSelection:"nvme",storageClass:"nvme-i3en-12xlarge",CPU:48,memory:384,driveSize:{driveSize:"7500",sizeUnit:"Gi"},drivesPerServer:4},{typeSelection:"hdd",storageClass:"hdd-d3en-12xlarge",CPU:8,memory:32,driveSize:{driveSize:"12.7",sizeUnit:"Ti"},drivesPerServer:4}],sizingComponent:(0,T.jsx)(Pe,{formToRender:r.aws})}),(0,be.Z)(a,r.azure,{variantSelectorLabel:"VM Size",variantSelectorValues:[{label:"Standard_L32s_v2",value:"Standard_L32s_v2"},{label:"Standard_L48s_v2",value:"Standard_L48s_v2"},{label:"Standard_L64s_v2",value:"Standard_L64s_v2"}],configurations:[{typeSelection:"Standard_L8s_v2",storageClass:"local-nvme",CPU:8,memory:64,driveSize:{driveSize:"1787",sizeUnit:"Gi"},drivesPerServer:1},{typeSelection:"Standard_L16s_v2",storageClass:"local-nvme",CPU:16,memory:128,driveSize:{driveSize:"1787",sizeUnit:"Gi"},drivesPerServer:2},{typeSelection:"Standard_L32s_v2",storageClass:"local-nvme",CPU:32,memory:256,driveSize:{driveSize:"1787",sizeUnit:"Gi"},drivesPerServer:4},{typeSelection:"Standard_L48s_v2",storageClass:"local-nvme",CPU:48,memory:384,driveSize:{driveSize:"1787",sizeUnit:"Gi"},drivesPerServer:6},{typeSelection:"Standard_L64s_v2",storageClass:"local-nvme",CPU:64,memory:512,driveSize:{driveSize:"1787",sizeUnit:"Gi"},drivesPerServer:8}],sizingComponent:(0,T.jsx)(Pe,{formToRender:r.azure})}),(0,be.Z)(a,r.gcp,{variantSelectorLabel:"Storage Type",variantSelectorValues:[{label:"SSD",value:"ssd"}],configurations:[{typeSelection:"ssd",storageClass:"local-ssd",CPU:32,memory:128,driveSize:{driveSize:"368",sizeUnit:"Gi"},drivesPerServer:24}],sizingComponent:(0,T.jsx)(Pe,{formToRender:r.gcp})}),(0,be.Z)(a,r.default,{}),(0,be.Z)(a,r.undefined,{}),a),Ae=(0,d.$j)((function(e){return{tenantName:e.tenants.createTenant.fields.nameTenant.tenantName,namespace:e.tenants.createTenant.fields.nameTenant.namespace,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass,selectedStorageType:e.tenants.createTenant.fields.nameTenant.selectedStorageType,storageClasses:e.tenants.createTenant.storageClasses}}),{setModalErrorSnackMessage:y.zb,updateAddField:j.HM,setStorageClassesList:j.wZ,setLimitSize:j.DH,isPageValid:j.NO}),Te=(0,g.Z)((function(e){return(0,p.Z)((0,i.Z)((0,i.Z)((0,i.Z)({sizePreview:{position:"fixed",marginLeft:10,background:"#FFFFFF",border:"1px solid #EAEAEA",padding:2}},f.DF),f.oO),f.AK))}))(Ae((function(e){var t=e.classes,n=e.storageClasses,a=e.tenantName,i=e.namespace,l=e.selectedStorageClass,d=e.selectedStorageType,m=e.formToRender,p=void 0===m?r.default:m,g=e.updateAddField,f=e.setStorageClassesList,x=e.setLimitSize,v=e.isPageValid,y=e.setModalErrorSnackMessage,C=(0,o.useState)({}),S=(0,s.Z)(C,2),j=S[0],Z=S[1],N=(0,o.useState)(!0),k=(0,s.Z)(N,2),R=k[0],z=k[1],w=(0,o.useState)(!1),F=(0,s.Z)(w,2),D=F[0],E=F[1],U=(0,o.useState)(!1),L=(0,s.Z)(U,2),K=L[0],M=L[1],q=(0,o.useState)(!1),G=(0,s.Z)(q,2),O=G[0],B=G[1],$=(0,o.useCallback)((function(e,t){g("nameTenant",e,t)}),[g]),W=(0,o.useCallback)((function(){M(!1),h.Z.invoke("GET","/api/v1/namespaces/".concat(i,"/tenants")).then((function(e){var t=c()(e,"tenants",[]);if(t&&t.length>0)return z(!1),void E(!1);z(!0),h.Z.invoke("GET","/api/v1/namespaces/".concat(i,"/resourcequotas/").concat(i,"-storagequota")).then((function(e){var t=c()(e,"elements",[]);x((0,se.OU)(e));var n=t.map((function(e){var t=c()(e,"name","").split(".storageclass.storage.k8s.io/requests.storage")[0];return{label:t,value:t}}));f(n);var a=n.findIndex((function(e){return e.value===l}));n.length>0&&-1===a?$("selectedStorageClass",n[0].value):0===n.length&&($("selectedStorageClass",""),f([])),E(!1)})).catch((function(e){E(!1),M(!0),$("selectedStorageClass",""),f([]),console.error("Namespace error: ",e)}))})).catch((function(e){y({errorMessage:"Error validating if namespace already has tenants",detailedError:e.detailedError})}))}),[i,x,y,f,$,l]),H=(0,o.useMemo)((function(){return re()(W,500)}),[W]);(0,o.useEffect)((function(){if(""!==i)return H(),E(!0),H.cancel}),[H,i]),(0,o.useEffect)((function(){var e=!1,t="";R||D?n.length<1&&R&&!D&&(e=!0,t="Please enter a valid namespace"):(e=!0,t="You can only create one tenant per namespace");var s=(0,P.R)([{fieldKey:"tenant-name",required:!0,pattern:/^[a-z0-9-]{3,63}$/,customPatternMessage:"Name only can contain lowercase letters, numbers and '-'. Min. Length: 3",value:a},{fieldKey:"namespace",required:!0,value:i,customValidation:e,customValidationMessage:t}]),o=!("tenant-name"in s)&&!("namespace"in s)&&(p===r.default&&n.length>0||p!==r.default&&""!==d);v("nameTenant",o),Z(s)}),[n,i,a,v,R,D,d,p]);var Y=function(e){Z((0,_.h)(j,e))};return(0,T.jsxs)(o.Fragment,{children:[O&&(0,T.jsx)(ue,{addNamespaceOpen:O,closeAddNamespaceModalAndRefresh:function(e){B(!1),e&&H()},namespace:i}),(0,T.jsxs)(u.ZP,{container:!0,children:[(0,T.jsx)(u.ZP,{item:!0,xs:8,md:9,children:(0,T.jsx)(b.Z,{className:t.paperWrapper,sx:{minHeight:550},children:(0,T.jsxs)(u.ZP,{container:!0,children:[(0,T.jsxs)(u.ZP,{item:!0,xs:12,children:[(0,T.jsxs)("div",{className:t.headerElement,children:[(0,T.jsx)("h3",{className:t.h3Section,children:"Name"}),(0,T.jsx)("span",{className:t.descriptionText,children:"How would you like to name this new tenant?"})]}),(0,T.jsx)("div",{className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"tenant-name",name:"tenant-name",onChange:function(e){$("tenantName",e.target.value),Y("tenant-name")},label:"Name",value:a,required:!0,error:j["tenant-name"]||""})})]}),(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(I.Z,{id:"namespace",name:"namespace",onChange:function(e){$("namespace",e.target.value),Y("namespace")},label:"Namespace",value:i,error:j.namespace||"",overlayIcon:K?(0,T.jsx)(V.Z,{}):null,overlayAction:function(){B(!0)},required:!0})}),p===r.default?(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(A.Z,{id:"storage_class",name:"storage_class",onChange:function(e){$("selectedStorageClass",e.target.value)},label:"Storage Class",value:l,options:n,disabled:n.length<1})}):(0,T.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,T.jsx)(A.Z,{id:"storage_type",name:"storage_type",onChange:function(e){$("selectedStorageType",e.target.value)},label:c()(Ie,"".concat(p,".variantSelectorLabel"),"Storage Type"),value:d,options:c()(Ie,"".concat(p,".variantSelectorValues"),[])})}),p===r.default?(0,T.jsx)(Ze,{}):c()(Ie,"".concat(p,".sizingComponent"),null)]})})}),(0,T.jsx)(u.ZP,{item:!0,xs:4,md:3,children:(0,T.jsx)("div",{className:t.sizePreview,children:(0,T.jsx)(ve,{})})})]})]})}))),ke=(0,d.$j)((function(e){return{features:e.console.session.features}}),null)((function(e){var t=e.features,n=(0,o.useState)(null),a=(0,s.Z)(n,2),i=a[0],l=a[1];return(0,o.useEffect)((function(){var e=r.default;t&&0!==t.length&&Object.keys(Ne).forEach((function(n){t.includes(n)&&(e=c()(Ne,n,r.default))}));l(e)}),[t]),null===i?null:(0,T.jsx)(Te,{formToRender:i})})),Re=(0,d.$j)((function(e){return{namespace:e.tenants.createTenant.fields.nameTenant.namespace,validPages:e.tenants.createTenant.validPages,fields:e.tenants.createTenant.fields,certificates:e.tenants.createTenant.certificates,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass}}),{setErrorSnackMessage:y.Ih,updateAddField:j.HM,resetAddTenantForm:j.dS}),ze=(0,g.Z)((function(e){return(0,p.Z)((0,i.Z)((0,i.Z)((0,i.Z)({pageBox:{border:"1px solid #EAEAEA"}},f.oO),f.AK),f.Je))}))(Re((function(e){var t=e.classes,n=e.fields,a=e.certificates,r=e.selectedStorageClass,l=e.namespace,d=e.validPages,p=e.setErrorSnackMessage,g=e.resetAddTenantForm,f=(0,o.useState)(!1),y=(0,s.Z)(f,2),j=y[0],Z=y[1],b=(0,o.useState)(null),_=(0,s.Z)(b,2),P=_[0],N=_[1],I=(0,o.useState)(!1),A=(0,s.Z)(I,2),k=A[0],z=A[1];(0,o.useEffect)((function(){var e=n.nameTenant.tenantName,t=n.nameTenant.selectedStorageClass,r=n.configure.imageName,s=n.configure.customDockerhub,o=n.configure.imageRegistry,d=n.configure.imageRegistryUsername,u=n.configure.imageRegistryPassword,m=n.configure.exposeMinIO,g=n.configure.exposeConsole,f=n.identityProvider.idpSelection,v=n.identityProvider.openIDConfigurationURL,y=n.identityProvider.openIDClientID,S=n.identityProvider.openIDClaimName,j=n.identityProvider.openIDCallbackURL,b=n.identityProvider.openIDScopes,_=n.identityProvider.openIDSecretID,P=n.identityProvider.ADURL,I=n.identityProvider.ADSkipTLS,A=n.identityProvider.ADServerInsecure,T=n.identityProvider.ADUserNameSearchFilter,R=n.identityProvider.ADGroupSearchBaseDN,w=n.identityProvider.ADGroupSearchFilter,F=n.identityProvider.ADGroupNameAttribute,D=n.identityProvider.ADUserDNs,E=n.identityProvider.ADUserNameFormat,U=n.identityProvider.ADLookupBindDN,L=n.identityProvider.ADLookupBindPassword,K=n.identityProvider.ADUserDNSearchBaseDN,M=n.identityProvider.ADUserDNSearchFilter,q=n.identityProvider.ADServerStartTLS,G=n.identityProvider.accessKeys,V=n.identityProvider.secretKeys,O=a.minioCertificates,B=a.caCertificates,$=a.consoleCaCertificates,W=a.consoleCertificate,H=a.serverCertificate,Y=a.clientCertificate,Q=a.vaultCertificate,X=a.vaultCA,J=a.gemaltoCA,ee=n.encryption.enableEncryption,te=n.encryption.encryptionType,ne=n.encryption.gemaltoEndpoint,ae=n.encryption.gemaltoToken,re=n.encryption.gemaltoDomain,se=n.encryption.gemaltoRetry,ie=n.encryption.awsEndpoint,oe=n.encryption.awsRegion,le=n.encryption.awsKMSKey,ce=n.encryption.awsAccessKey,de=n.encryption.awsSecretKey,ue=n.encryption.awsToken,me=n.encryption.vaultEndpoint,pe=n.encryption.vaultEngine,ge=n.encryption.vaultNamespace,fe=n.encryption.vaultPrefix,he=n.encryption.vaultAppRoleEngine,xe=n.encryption.vaultId,ve=n.encryption.vaultSecret,ye=n.encryption.vaultRetry,Ce=n.encryption.vaultPing,Se=n.encryption.azureEndpoint,je=n.encryption.azureTenantID,Ze=n.encryption.azureClientID,be=n.encryption.azureClientSecret,_e=n.encryption.gcpProjectID,Pe=n.encryption.gcpEndpoint,Ne=n.encryption.gcpClientEmail,Ie=n.encryption.gcpClientID,Ae=n.encryption.gcpPrivateKeyID,Te=n.encryption.gcpPrivateKey,ke=n.security.enableAutoCert,Re=n.security.enableTLS,ze=n.tenantSize.ecParity,we=n.tenantSize.distribution,Fe=n.configure.tenantCustom,De=n.configure.logSearchCustom,Ee=n.configure.prometheusCustom,Ue=n.configure.logSearchVolumeSize,Le=n.configure.logSearchSelectedStorageClass,Ke=n.configure.logSearchImage,Me=n.configure.kesImage,qe=n.configure.logSearchPostgresImage,Ge=n.configure.logSearchPostgresInitImage,Ve=n.configure.prometheusImage,Oe=n.configure.prometheusSidecarImage,Be=n.configure.prometheusInitImage,$e=n.configure.prometheusSelectedStorageClass,We=n.configure.prometheusVolumeSize,He=n.affinity.podAffinity,Ye=n.affinity.nodeSelectorLabels,Qe=n.affinity.withPodAntiAffinity,Xe=n.configure.tenantSecurityContext,Je=n.configure.logSearchSecurityContext,et=n.configure.logSearchPostgresSecurityContext,tt=n.configure.prometheusSecurityContext,nt=n.encryption.kesSecurityContext,at=n.encryption.replicas;if(k){var rt=(0,x.en)([]),st={};switch(He){case"default":st={affinity:(0,C.P)(e,rt)};break;case"nodeSelector":st={affinity:(0,C.q)(Ye,Qe,e,rt)}}var it=ze.split(":")[1],ot={name:e,namespace:l,access_key:"",secret_key:"",access_keys:[],secret_keys:[],enable_tls:Re&&ke,enable_console:!0,enable_prometheus:!0,service_name:"",image:r,expose_minio:m,expose_console:g,pools:[(0,i.Z)({name:rt,servers:we.nodes,volumes_per_server:we.disks,volume_configuration:{size:we.pvSize,storage_class_name:t},securityContext:Fe?Xe:null},st)],erasureCodingParity:parseInt(it,10)};""===n.tenantSize.resourcesCPURequest&&""===n.tenantSize.resourcesCPULimit&&""===n.tenantSize.resourcesMemoryRequest&&""===n.tenantSize.resourcesMemoryLimit||(ot.pools[0].resources={},""===n.tenantSize.resourcesCPURequest&&""===n.tenantSize.resourcesMemoryRequest||(ot.pools[0].resources.requests={},""!==n.tenantSize.resourcesCPURequest&&(ot.pools[0].resources.requests.cpu=parseInt(n.tenantSize.resourcesCPURequest)),""!==n.tenantSize.resourcesMemoryRequest&&(ot.pools[0].resources.requests.memory=parseInt(n.tenantSize.resourcesMemoryRequest))),""===n.tenantSize.resourcesCPULimit&&""===n.tenantSize.resourcesMemoryLimit||(ot.pools[0].resources.limits={},""!==n.tenantSize.resourcesCPULimit&&(ot.pools[0].resources.limits.cpu=parseInt(n.tenantSize.resourcesCPULimit)),""!==n.tenantSize.resourcesMemoryLimit&&(ot.pools[0].resources.limits.memory=parseInt(n.tenantSize.resourcesMemoryLimit)))),s&&(ot=(0,i.Z)((0,i.Z)({},ot),{},{image_registry:{registry:o,username:d,password:u}})),ot=De?(0,i.Z)((0,i.Z)({},ot),{},{logSearchConfiguration:{storageClass:"default"===Le?"":Le,storageSize:parseInt(Ue),image:Ke,postgres_image:qe,postgres_init_image:Ge,securityContext:Je,postgres_securityContext:et}}):(0,i.Z)((0,i.Z)({},ot),{},{logSearchConfiguration:{image:Ke,postgres_image:qe,postgres_init_image:Ge}}),ot=Ee?(0,i.Z)((0,i.Z)({},ot),{},{prometheusConfiguration:{storageClass:"default"===$e?"":$e,storageSize:parseInt(We),image:Ve,sidecar_image:Oe,init_image:Be,securityContext:tt}}):(0,i.Z)((0,i.Z)({},ot),{},{prometheusConfiguration:{image:Ve,sidecar_image:Oe,init_image:Be}});var lt=null,ct=null,dt=null,ut=null;if(B.length>0&&(dt={ca_certificates:B.map((function(e){return e.encoded_cert})).filter((function(e){return e}))}),$.length>0&&(ut={console_ca_certificates:$.map((function(e){return e.encoded_cert})).filter((function(e){return e}))}),Re&&O.length>0&&(lt={minio:O.map((function(e){return{crt:e.encoded_cert,key:e.encoded_key}})).filter((function(e){return e.crt&&e.key}))}),Re&&""!==W.encoded_cert&&""!==W.encoded_key&&(ct={console:{crt:W.encoded_cert,key:W.encoded_key}}),(lt||ct||dt||ut)&&(ot=(0,i.Z)((0,i.Z)({},ot),{},{tls:(0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},lt),ct),dt),ut)})),ee){var mt={};switch(te){case"gemalto":var pt={};""!==J.encoded_cert&&(pt={ca:J.encoded_cert}),mt={gemalto:{keysecure:{endpoint:ne,credentials:{token:ae,domain:re,retry:parseInt(se)},tls:(0,i.Z)({},pt)}}};break;case"aws":mt={aws:{secretsmanager:{endpoint:ie,region:oe,kmskey:le,credentials:{accesskey:ce,secretkey:de,token:ue}}}};break;case"azure":mt={azure:{keyvault:{endpoint:Se,credentials:{tenant_id:je,client_id:Ze,client_secret:be}}}};break;case"gcp":mt={gcp:{secretmanager:{project_id:_e,endpoint:Pe,credentials:{client_email:Ne,client_id:Ie,private_key_id:Ae,private_key:Te}}}};break;case"vault":var gt=null,ft=null;""!==Q.encoded_key&&""!==Q.encoded_cert&&(gt={key:Q.encoded_key,crt:Q.encoded_cert}),""!==X.encoded_cert&&(ft={ca:X.encoded_cert});var ht=null;(gt||X)&&(ht={tls:(0,i.Z)((0,i.Z)({},gt),ft)}),mt={vault:(0,i.Z)((0,i.Z)({endpoint:me,engine:pe,namespace:ge,prefix:fe,approle:{engine:he,id:xe,secret:ve,retry:parseInt(ye)}},ht),{},{status:{ping:parseInt(Ce)}})}}var xt={},vt={};""!==Y.encoded_key&&""!==Y.encoded_cert&&(vt={client:{key:Y.encoded_key,crt:Y.encoded_cert}}),""!==H.encoded_key&&""!==H.encoded_cert&&(xt={server:{key:H.encoded_key,crt:H.encoded_cert}}),ot=(0,i.Z)((0,i.Z)({},ot),{},{encryption:(0,i.Z)((0,i.Z)((0,i.Z)({replicas:at,securityContext:nt,image:Me},vt),xt),mt)})}var yt={};switch(f){case"Built-in":for(var Ct=[],St=0;St.\n\nimport React from \"react\";\nimport { Link } from \"react-router-dom\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { BackSettingsIcon } from \"../icons\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n link: {\n display: \"flex\",\n alignItems: \"center\",\n textDecoration: \"none\",\n maxWidth: \"300px\",\n padding: \"2rem 2rem 0rem 2rem\",\n color: theme.palette.primary.light,\n fontSize: \".8rem\",\n \"&:hover\": {\n textDecoration: \"underline\",\n },\n },\n icon: {\n marginRight: \".3rem\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n \"& svg.min-icon\": {\n width: 12,\n },\n },\n });\n\ninterface IBackLink {\n classes: any;\n to: string;\n label: string;\n className?: any;\n}\n\nconst BackLink = ({ to, label, classes, className }: IBackLink) => {\n return (\n \n
\n \n
\n
{label}
\n \n );\n};\n\nexport default withStyles(styles)(BackLink);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { IconButton, IconButtonProps, Tooltip } from \"@mui/material\";\nimport clsx from \"clsx\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n root: {\n padding: 8,\n marginLeft: 8,\n borderWidth: 1,\n borderColor: \"#696969\",\n color: \"#696969\",\n borderStyle: \"solid\",\n borderRadius: 3,\n \"& .min-icon\": {\n // height: 20,\n width: 20,\n },\n \"& .MuiTouchRipple-root span\": {\n backgroundColor: theme.palette.primary.main,\n borderRadius: 3,\n opacity: 0.3,\n },\n \"&:disabled\": {\n color: \"#EBEBEB\",\n borderColor: \"#EBEBEB\",\n },\n },\n contained: {\n borderColor: theme.palette.primary.main,\n background: theme.palette.primary.main,\n color: \"white\",\n \"& .MuiTouchRipple-root span\": {\n backgroundColor: theme.palette.primary.dark,\n borderRadius: 3,\n opacity: 0.3,\n },\n \"&:hover\": {\n backgroundColor: theme.palette.primary.light,\n color: \"#FFF\",\n },\n },\n });\n\ninterface IBoxIconButton extends IconButtonProps {\n classes: any;\n children: any;\n variant?: \"outlined\" | \"contained\";\n tooltip?: string;\n}\n\nconst BoxIconButton = ({\n classes,\n children,\n variant = \"outlined\",\n tooltip,\n ...rest\n}: IBoxIconButton) => {\n const button = (\n \n {children}\n \n );\n\n if (tooltip && tooltip !== \"\") {\n return (\n \n {button}\n \n );\n }\n\n return button;\n};\n\nexport default withStyles(styles)(BoxIconButton);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { InputAdornment, OutlinedInput } from \"@mui/material\";\nimport BoxIconButton from \"../BoxIconButton/BoxIconButton\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport CopyToClipboard from \"react-copy-to-clipboard\";\nimport { CopyIcon } from \"../../../../icons\";\nimport { fieldBasic } from \"../FormComponents/common/styleLibrary\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n container: {\n display: \"flex\",\n flexFlow: \"column\",\n padding: \"20px 0 8px 0\",\n },\n inputWithCopy: {\n \"& .MuiInputBase-root \": {\n width: \"100%\",\n background: \"#FBFAFA\",\n \"& .MuiInputBase-input\": {\n height: \".8rem\",\n },\n \"& .MuiInputAdornment-positionEnd\": {\n marginRight: \".5rem\",\n \"& .MuiButtonBase-root\": {\n height: \"2rem\",\n },\n },\n },\n \"& .MuiButtonBase-root .min-icon\": {\n width: \".8rem\",\n height: \".8rem\",\n },\n },\n inputLabel: {\n ...fieldBasic.inputLabel,\n fontSize: \".8rem\",\n },\n });\n\nconst CredentialItem = ({\n label = \"\",\n value = \"\",\n classes = {},\n}: {\n label: string;\n value: string;\n classes: any;\n}) => {\n return (\n
\n
{label}:
\n
\n \n \n {}}\n onMouseDown={() => {}}\n edge=\"end\"\n >\n \n \n \n \n }\n />\n
\n
\n );\n};\n\nexport default withStyles(styles)(CredentialItem);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport get from \"lodash/get\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { NewServiceAccount } from \"./types\";\nimport { Button } from \"@mui/material\";\nimport ModalWrapper from \"../ModalWrapper/ModalWrapper\";\nimport Grid from \"@mui/material/Grid\";\nimport CredentialItem from \"./CredentialItem\";\nimport WarnIcon from \"../../../../icons/WarnIcon\";\nimport { DownloadIcon, ServiceAccountCredentialsIcon } from \"../../../../icons\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n warningBlock: {\n color: \"red\",\n fontSize: \".85rem\",\n margin: \".5rem 0 .5rem 0\",\n display: \"flex\",\n alignItems: \"center\",\n \"& svg \": {\n marginRight: \".3rem\",\n height: 16,\n width: 16,\n },\n },\n credentialTitle: {\n padding: \".8rem 0 0 0\",\n fontWeight: 600,\n fontSize: \".9rem\",\n },\n buttonContainer: {\n textAlign: \"right\",\n marginTop: \"1rem\",\n },\n credentialsPanel: {\n overflowY: \"auto\",\n maxHeight: 350,\n },\n promptTitle: {\n display: \"flex\",\n alignItems: \"center\",\n },\n buttonSpacer: {\n marginRight: \".9rem\",\n },\n promptIcon: {\n marginRight: \".1rem\",\n display: \"flex\",\n alignItems: \"center\",\n height: \"2rem\",\n width: \"2rem\",\n },\n });\n\ninterface ICredentialsPromptProps {\n classes: any;\n newServiceAccount: NewServiceAccount | null;\n open: boolean;\n entity: string;\n closeModal: () => void;\n}\n\nconst download = (filename: string, text: string) => {\n let element = document.createElement(\"a\");\n element.setAttribute(\n \"href\",\n \"data:text/plain;charset=utf-8,\" + encodeURIComponent(text)\n );\n element.setAttribute(\"download\", filename);\n\n element.style.display = \"none\";\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n};\n\nconst CredentialsPrompt = ({\n classes,\n newServiceAccount,\n open,\n closeModal,\n entity,\n}: ICredentialsPromptProps) => {\n if (!newServiceAccount) {\n return null;\n }\n\n const consoleCreds = get(newServiceAccount, \"console\", null);\n const idp = get(newServiceAccount, \"idp\", false);\n\n return (\n {\n closeModal();\n }}\n title={\n
\n
New {entity} Created
\n
\n }\n titleIcon={}\n >\n \n \n A new {entity} has been created with the following details:\n {!idp && consoleCreds && (\n \n \n
\n Console Credentials\n
\n {Array.isArray(consoleCreds) &&\n consoleCreds.map((credentialsPair, index) => {\n return (\n <>\n \n \n \n );\n })}\n {!Array.isArray(consoleCreds) && (\n <>\n \n \n \n )}\n
\n
\n )}\n {idp ? (\n
\n Please Login via the configured external identity provider.\n
\n ) : (\n
\n \n \n Write these down, as this is the only time the secret will be\n displayed.\n \n
\n )}\n
\n \n {\n closeModal();\n }}\n color=\"primary\"\n >\n Done\n \n\n {!idp && (\n {\n let consoleExtras = {};\n\n if (consoleCreds) {\n if (!Array.isArray(consoleCreds)) {\n consoleExtras = {\n console: [\n {\n access_key: consoleCreds.accessKey,\n secret_key: consoleCreds.secretKey,\n },\n ],\n };\n } else {\n const cCreds = consoleCreds.map((itemMap) => {\n return {\n access_key: itemMap.accessKey,\n secret_key: itemMap.secretKey,\n };\n });\n\n consoleExtras = {\n console: [...cCreds],\n };\n }\n }\n\n download(\n \"credentials.json\",\n JSON.stringify({\n ...consoleExtras,\n })\n );\n }}\n endIcon={}\n variant=\"contained\"\n color=\"primary\"\n >\n Download\n \n )}\n \n
\n \n );\n};\n\nexport default withStyles(styles)(CredentialsPrompt);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useState } from \"react\";\nimport get from \"lodash/get\";\nimport { Grid, InputLabel, Tooltip } from \"@mui/material\";\nimport IconButton from \"@mui/material/IconButton\";\nimport AttachFileIcon from \"@mui/icons-material/AttachFile\";\nimport CancelIcon from \"@mui/icons-material/Cancel\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n fieldBasic,\n fileInputStyles,\n tooltipHelper,\n} from \"../common/styleLibrary\";\nimport { fileProcess } from \"./utils\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport ErrorBlock from \"../../../../shared/ErrorBlock\";\n\ninterface InputBoxProps {\n label: string;\n classes: any;\n onChange: (e: string, i: string) => void;\n id: string;\n name: string;\n disabled?: boolean;\n tooltip?: string;\n required?: boolean;\n error?: string;\n accept?: string;\n value?: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n valueString: {\n maxWidth: 350,\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n marginTop: 2,\n },\n fileInputField: {\n margin: \"13px 0\",\n \"@media (max-width: 900px)\": {\n flexFlow: \"column\",\n },\n },\n ...fileInputStyles,\n inputLabel: {\n ...fieldBasic.inputLabel,\n fontWeight: \"normal\",\n },\n textBoxContainer: {\n ...fieldBasic.textBoxContainer,\n maxWidth: \"100%\",\n border: \"1px solid #eaeaea\",\n paddingLeft: \"15px\",\n },\n });\n\nconst FileSelector = ({\n label,\n classes,\n onChange,\n id,\n name,\n disabled = false,\n tooltip = \"\",\n required,\n error = \"\",\n accept = \"\",\n value = \"\",\n}: InputBoxProps) => {\n const [showFileSelector, setShowSelector] = useState(false);\n\n return (\n \n \n {label !== \"\" && (\n \n \n {label}\n {required ? \"*\" : \"\"}\n \n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n \n )}\n\n {showFileSelector || value === \"\" ? (\n
\n {\n const fileName = get(e, \"target.files[0].name\", \"\");\n fileProcess(e, (data: any) => {\n onChange(data, fileName);\n });\n }}\n accept={accept}\n required={required}\n disabled={disabled}\n className={classes.fileInputField}\n />\n\n {value !== \"\" && (\n {\n setShowSelector(false);\n }}\n disableRipple={false}\n disableFocusRipple={false}\n size=\"small\"\n >\n \n \n )}\n\n {error !== \"\" && }\n
\n ) : (\n
\n
{value}
\n {\n setShowSelector(true);\n }}\n disableRipple={false}\n disableFocusRipple={false}\n size=\"small\"\n >\n \n \n
\n )}\n \n
\n );\n};\n\nexport default withStyles(styles)(FileSelector);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nexport const fileProcess = (evt: any, callback: any) => {\n const file = evt.target.files[0];\n const reader = new FileReader();\n reader.readAsDataURL(file);\n\n reader.onload = () => {\n // reader.readAsDataURL(file) output will be something like: data:application/x-x509-ca-cert;base64,LS0tLS1CRUdJTiBDRVJUSU\n // we care only about the actual base64 part (everything after \"data:application/x-x509-ca-cert;base64,\")\n const fileBase64 = reader.result;\n if (fileBase64) {\n const fileArray = fileBase64.toString().split(\"base64,\");\n\n if (fileArray.length === 2) {\n callback(fileArray[1]);\n }\n }\n };\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React from \"react\";\nimport clsx from \"clsx\";\nimport Grid from \"@mui/material/Grid\";\nimport RadioGroup from \"@mui/material/RadioGroup\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Radio, { RadioProps } from \"@mui/material/Radio\";\nimport { InputLabel, Tooltip } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport { fieldBasic, radioIcons, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\n\nexport interface SelectorTypes {\n label: string;\n value: string;\n}\n\ninterface RadioGroupProps {\n selectorOptions: SelectorTypes[];\n currentSelection: string;\n label: string;\n id: string;\n name: string;\n tooltip?: string;\n disableOptions?: boolean;\n onChange: (e: React.ChangeEvent) => void;\n classes: any;\n displayInColumn?: boolean;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n optionLabel: {\n \"&.Mui-disabled\": {\n \"& .MuiFormControlLabel-label\": {\n color: \"#9c9c9c\",\n },\n },\n \"&:last-child\": {\n marginRight: 0,\n },\n \"& .MuiFormControlLabel-label\": {\n fontSize: 12,\n color: \"#07193E\",\n },\n },\n checkedOption: {\n \"& .MuiFormControlLabel-label\": {\n fontSize: 12,\n color: \"#07193E\",\n fontWeight: 700,\n },\n },\n });\n\nconst radioStyles = makeStyles({\n root: {\n \"&:hover\": {\n backgroundColor: \"transparent\",\n },\n },\n ...radioIcons,\n});\n\nconst RadioButton = (props: RadioProps) => {\n const classes = radioStyles();\n\n return (\n }\n icon={}\n {...props}\n />\n );\n};\n\nexport const RadioGroupSelector = ({\n selectorOptions = [],\n currentSelection,\n label,\n id,\n name,\n onChange,\n tooltip = \"\",\n disableOptions = false,\n classes,\n displayInColumn = false,\n}: RadioGroupProps) => {\n return (\n \n \n \n {label}\n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n
\n \n \n {selectorOptions.map((selectorOption) => {\n return (\n }\n label={selectorOption.label}\n disabled={disableOptions}\n className={clsx(classes.optionLabel, {\n [classes.checkedOption]:\n selectorOption.value === currentSelection,\n })}\n />\n );\n })}\n \n \n
\n );\n};\n\nexport default withStyles(styles)(RadioGroupSelector);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport {\n FormControl,\n InputLabel,\n MenuItem,\n Select,\n InputBase,\n Tooltip,\n SelectChangeEvent,\n} from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\n\nexport interface selectorTypes {\n label: string;\n value: string;\n}\n\ninterface SelectProps {\n options: selectorTypes[];\n value: string;\n label: string;\n id: string;\n name: string;\n tooltip?: string;\n onChange: (e: SelectChangeEvent) => void;\n disabled?: boolean;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n inputLabel: {\n ...fieldBasic.inputLabel,\n \"& span\": {\n fontWeight: \"normal\",\n },\n },\n fieldContainer: {\n display: \"flex\",\n \"@media (max-width: 600px)\": {\n flexFlow: \"column\",\n },\n },\n });\n\nconst SelectStyled = withStyles((theme: Theme) =>\n createStyles({\n root: {\n height: 38,\n lineHeight: 1,\n \"label + &\": {\n marginTop: theme.spacing(3),\n },\n },\n input: {\n height: 38,\n position: \"relative\",\n color: \"#07193E\",\n fontSize: 13,\n fontWeight: 600,\n padding: \"8px 20px 10px 10px\",\n border: \"#e5e5e5 1px solid\",\n borderRadius: 4,\n display: \"flex\",\n alignItems: \"center\",\n \"&:hover\": {\n borderColor: \"#393939\",\n },\n \"&:focus\": {\n backgroundColor: \"#fff\",\n },\n },\n })\n)(InputBase);\n\nconst SelectWrapper = ({\n classes,\n id,\n name,\n onChange,\n options,\n label,\n tooltip = \"\",\n value,\n disabled = false,\n}: SelectProps) => {\n return (\n \n \n {label !== \"\" && (\n \n {label}\n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n )}\n \n }\n disabled={disabled}\n >\n {options.map((option) => (\n \n {option.label}\n \n ))}\n \n \n
\n
\n );\n};\n\nexport default withStyles(styles)(SelectWrapper);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { IWizardButton, IWizardPage } from \"./types\";\nimport { Button, LinearProgress } from \"@mui/material\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n wizardStepContainer: {\n display: \"flex\",\n flexDirection: \"column\",\n flex: 1,\n },\n wizardComponent: {\n overflowY: \"auto\",\n marginBottom: 10,\n height: \"calc(100vh - 100px - 80px)\",\n minHeight: 400,\n flex: 1,\n width: \"100%\",\n },\n wizardModal: {\n overflowY: \"auto\",\n marginBottom: 10,\n height: \"calc(100vh - 515px)\",\n },\n buttonsContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"flex-start\" as const,\n padding: \"10px 0\",\n borderTop: \"#EAEAEA 1px solid\",\n \"& button\": {\n marginLeft: 10,\n },\n \"&.forModal\": {\n paddingBottom: 0,\n },\n },\n buttonInnerContainer: {\n width: \"100%\",\n textAlign: \"right\" as const,\n marginRight: 15,\n },\n });\n\nconst WizardPage = ({\n classes,\n page,\n pageChange,\n loadingStep,\n forModal,\n}: IWizardPage) => {\n const buttonAction = (btn: IWizardButton) => {\n switch (btn.type) {\n case \"next\":\n pageChange(\"++\");\n break;\n case \"back\":\n pageChange(\"--\");\n break;\n case \"to\":\n pageChange(btn.toPage || 0);\n break;\n case \"custom\":\n default:\n }\n\n if (btn.action) {\n btn.action(pageChange);\n }\n };\n\n return (\n
\n
\n {page.componentRender}\n
\n {loadingStep && (\n
\n \n
\n )}\n \n
\n {page.buttons.map((btn) => {\n return (\n {\n buttonAction(btn);\n }}\n disabled={!btn.enabled}\n key={`button-${page.label}-${btn.label}`}\n >\n {btn.label}\n \n );\n })}\n
\n
\n \n );\n};\n\nexport default withStyles(styles)(WizardPage);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useState } from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { IWizardMain } from \"./types\";\nimport WizardPage from \"./WizardPage\";\nimport { Grid, List } from \"@mui/material\";\nimport ListItem from \"@mui/material/ListItem\";\nimport ListItemText from \"@mui/material/ListItemText\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n wizFromContainer: {},\n wizFromModal: {\n position: \"relative\",\n },\n modalWizardSteps: {\n padding: 5,\n borderBottom: \"#eaeaea 1px solid\",\n \"& ul\": {\n padding: 0,\n marginTop: 0,\n display: \"flex\",\n justifyContent: \"space-evenly\",\n\n \"& li\": {\n listStyle: \"lower-roman\",\n \"&::marker\": {\n paddingLeft: 15,\n },\n },\n },\n },\n buttonList: {\n backgroundColor: \"transparent\",\n border: \"none\",\n cursor: \"pointer\",\n \"&:not(:disabled):hover\": {\n textDecoration: \"underline\",\n },\n \"&:selected, &:active, &:focus, &:focus:active\": {\n border: \"none\",\n outline: 0,\n boxShadow: \"none\",\n },\n },\n paddedContentGrid: {\n marginTop: 8,\n padding: \"0 10px\",\n minHeight: 400,\n },\n stepsLabel: {\n fontSize: 20,\n color: \"#393939\",\n fontWeight: 600,\n margin: \"15px 12px\",\n \"&.stepsModalTitle\": {\n textAlign: \"center\",\n width: \"100%\",\n marginTop: 0,\n marginBottom: 10,\n },\n },\n stepsMasterContainer: {\n position: \"sticky\",\n top: 0,\n backgroundColor: \"#FFFFFF\",\n width: \"100%\",\n maxHeight: 90,\n },\n verticalSteps: {\n borderRight: \"1px solid #E5E5E5\",\n background: \"#F8F8F8\",\n },\n stepsContainer: {\n paddingTop: 0,\n \"& .MuiButtonBase-root.Mui-selected\": {\n background: \"#E5E5E5\",\n },\n },\n stepItem: {\n minHeight: 60,\n borderBottom: \"1px solid #E5E5E5\",\n \"&:hover\": {\n background: \"rgba(247,247,247,0.7)\",\n },\n },\n });\n\nconst GenericWizard = ({\n classes,\n wizardSteps,\n loadingStep,\n forModal,\n}: IWizardMain) => {\n const [currentStep, setCurrentStep] = useState(0);\n\n const pageChange = (toElement: string | number) => {\n const lastPage = wizardSteps.length - 1;\n\n if (toElement === \"++\") {\n let nextPage = currentStep + 1;\n\n if (nextPage > lastPage) {\n nextPage = lastPage;\n }\n\n setCurrentStep(nextPage);\n }\n\n if (toElement === \"--\") {\n let prevPage = currentStep - 1;\n\n if (prevPage < 0) {\n prevPage = 0;\n }\n\n setCurrentStep(prevPage);\n }\n\n if (typeof toElement === \"number\") {\n let pg = toElement;\n if (toElement < 0) {\n pg = 0;\n }\n\n if (toElement > lastPage) {\n pg = lastPage;\n }\n\n setCurrentStep(pg);\n }\n };\n\n if (wizardSteps.length === 0) {\n return null;\n }\n\n const stepsList = () => {\n return (\n \n \n {wizardSteps.map((step, index) => {\n return (\n pageChange(index)}\n key={`wizard-${index.toString()}`}\n selected={currentStep === index}\n classes={{\n root: classes.stepItem,\n }}\n >\n \n \n );\n })}\n \n \n );\n };\n const stepsListModal = () => {\n return (\n
    \n {wizardSteps.map((step, index) => {\n return (\n
  • \n pageChange(index)}\n disabled={index > currentStep}\n className={classes.buttonList}\n >\n {step.label}\n \n
  • \n );\n })}\n
\n );\n };\n\n return (\n \n {forModal ? (\n \n
\n
Steps
\n
{stepsListModal()}
\n
\n
\n ) : (\n \n \n {stepsList()}\n \n \n )}\n\n \n \n \n \n );\n};\n\nexport default withStyles(styles)(GenericWizard);\n","import React from \"react\";\nimport { Grid } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { pageContentStyles } from \"../FormComponents/common/styleLibrary\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...pageContentStyles,\n });\n\ntype PageLayoutProps = {\n className?: string;\n classes?: any;\n children: any;\n};\n\nconst PageLayout = ({ classes, className = \"\", children }: PageLayoutProps) => {\n return (\n
\n \n \n {children}\n \n \n
\n );\n};\n\nexport default withStyles(styles)(PageLayout);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@mui/material/Grid\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport Typography from \"@mui/material/Typography\";\nimport IconButton from \"@mui/material/IconButton\";\nimport { AppState } from \"../../../../store\";\nimport OperatorLogo from \"../../../../icons/OperatorLogo\";\nimport ConsoleLogo from \"../../../../icons/ConsoleLogo\";\nimport { IFileItem } from \"../../ObjectBrowser/reducers\";\nimport { toggleList } from \"../../ObjectBrowser/actions\";\nimport { ObjectManagerIcon } from \"../../../../icons\";\n\ninterface IPageHeader {\n classes: any;\n sidebarOpen?: boolean;\n operatorMode?: boolean;\n label: any;\n actions?: any;\n managerObjects?: IFileItem[];\n toggleList: typeof toggleList;\n middleComponent?: React.ReactNode;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n headerContainer: {\n width: \"100%\",\n minHeight: 79,\n display: \"flex\",\n backgroundColor: \"#fff\",\n left: 0,\n boxShadow: \"rgba(0,0,0,.08) 0 3px 10px\",\n },\n label: {\n display: \"flex\",\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n },\n labelStyle: {\n color: \"#000\",\n fontSize: 18,\n fontWeight: 700,\n marginLeft: 34,\n marginTop: 8,\n },\n rightMenu: {\n textAlign: \"right\",\n },\n logo: {\n marginLeft: 34,\n fill: theme.palette.primary.main,\n \"& .min-icon\": {\n width: 120,\n },\n },\n middleComponent: {\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n });\n\nconst PageHeader = ({\n classes,\n label,\n actions,\n sidebarOpen,\n operatorMode,\n managerObjects,\n toggleList,\n middleComponent,\n}: IPageHeader) => {\n return (\n \n \n {!sidebarOpen && (\n
\n {operatorMode ? : }\n
\n )}\n \n {label}\n \n \n {middleComponent && (\n \n {middleComponent}\n \n )}\n \n {actions && actions}\n {managerObjects && managerObjects.length > 0 && (\n {\n toggleList();\n }}\n size=\"large\"\n >\n \n \n )}\n \n \n );\n};\n\nconst mapState = (state: AppState) => ({\n sidebarOpen: state.system.sidebarOpen,\n operatorMode: state.system.operatorMode,\n managerObjects: state.objectBrowser.objectManager.objectsToManage,\n});\n\nconst mapDispatchToProps = {\n toggleList,\n};\n\nconst connector = connect(mapState, mapDispatchToProps);\n\nexport default connector(withStyles(styles)(PageHeader));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { Opts } from \"../../../ListTenants/utils\";\nimport TenantSizeMK from \"./TenantSizeMK\";\n\nexport enum IMkEnvs {\n \"aws\",\n \"azure\",\n \"gcp\",\n \"default\",\n undefined,\n}\n\nexport interface IDriveSizing {\n driveSize: string;\n sizeUnit: string;\n}\n\nexport interface IntegrationConfiguration {\n typeSelection: string;\n storageClass: string;\n CPU: number;\n memory: number;\n drivesPerServer: number;\n driveSize: IDriveSizing;\n}\n\nexport const AWSStorageTypes: Opts[] = [\n { label: \"NVME\", value: \"nvme\" },\n { label: \"HDD\", value: \"hdd\" },\n];\n\nexport const AzureStorageTypes: Opts[] = [\n { label: \"Standard_L32s_v2\", value: \"Standard_L32s_v2\" },\n { label: \"Standard_L48s_v2\", value: \"Standard_L48s_v2\" },\n { label: \"Standard_L64s_v2\", value: \"Standard_L64s_v2\" },\n];\n\nexport const resourcesConfigurations = {\n \"mp-mode-aws\": IMkEnvs.aws,\n \"mp-mode-azure\": IMkEnvs.azure,\n \"mp-mode-gcp\": IMkEnvs.gcp,\n};\n\nexport const AWSConfigurations: IntegrationConfiguration[] = [\n {\n typeSelection: \"nvme\",\n storageClass: \"nvme-i3en-12xlarge\",\n CPU: 48,\n memory: 384,\n driveSize: { driveSize: \"7500\", sizeUnit: \"Gi\" },\n drivesPerServer: 4,\n },\n {\n typeSelection: \"hdd\",\n storageClass: \"hdd-d3en-12xlarge\",\n CPU: 8,\n memory: 32,\n driveSize: { driveSize: \"12.7\", sizeUnit: \"Ti\" },\n drivesPerServer: 4,\n },\n];\n\nexport const AzureConfigurations: IntegrationConfiguration[] = [\n {\n typeSelection: \"Standard_L8s_v2\",\n storageClass: \"local-nvme\",\n CPU: 8,\n memory: 64,\n driveSize: { driveSize: \"1787\", sizeUnit: \"Gi\" },\n drivesPerServer: 1,\n },\n {\n typeSelection: \"Standard_L16s_v2\",\n storageClass: \"local-nvme\",\n CPU: 16,\n memory: 128,\n driveSize: { driveSize: \"1787\", sizeUnit: \"Gi\" },\n drivesPerServer: 2,\n },\n {\n typeSelection: \"Standard_L32s_v2\",\n storageClass: \"local-nvme\",\n CPU: 32,\n memory: 256,\n driveSize: { driveSize: \"1787\", sizeUnit: \"Gi\" },\n drivesPerServer: 4,\n },\n {\n typeSelection: \"Standard_L48s_v2\",\n storageClass: \"local-nvme\",\n CPU: 48,\n memory: 384,\n driveSize: { driveSize: \"1787\", sizeUnit: \"Gi\" },\n drivesPerServer: 6,\n },\n {\n typeSelection: \"Standard_L64s_v2\",\n storageClass: \"local-nvme\",\n CPU: 64,\n memory: 512,\n driveSize: { driveSize: \"1787\", sizeUnit: \"Gi\" },\n drivesPerServer: 8,\n },\n];\n\nexport const GCPStorageTypes: Opts[] = [{ label: \"SSD\", value: \"ssd\" }];\n\nexport const GCPConfigurations: IntegrationConfiguration[] = [\n {\n typeSelection: \"ssd\",\n storageClass: \"local-ssd\",\n CPU: 32,\n memory: 128,\n driveSize: { driveSize: \"368\", sizeUnit: \"Gi\" },\n drivesPerServer: 24,\n },\n];\n\nexport const mkPanelConfigurations = {\n [IMkEnvs.aws]: {\n variantSelectorLabel: \"Storage Type\",\n variantSelectorValues: AWSStorageTypes,\n configurations: AWSConfigurations,\n sizingComponent: ,\n },\n [IMkEnvs.azure]: {\n variantSelectorLabel: \"VM Size\",\n variantSelectorValues: AzureStorageTypes,\n configurations: AzureConfigurations,\n sizingComponent: ,\n },\n [IMkEnvs.gcp]: {\n variantSelectorLabel: \"Storage Type\",\n variantSelectorValues: GCPStorageTypes,\n configurations: GCPConfigurations,\n sizingComponent: ,\n },\n [IMkEnvs.default]: {},\n [IMkEnvs.undefined]: {},\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Grid, Paper, SelectChangeEvent } from \"@mui/material\";\nimport {\n createTenantCommon,\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { isPageValid, updateAddField } from \"../../actions\";\nimport { AppState } from \"../../../../../store\";\nimport { clearValidationError } from \"../../utils\";\nimport {\n commonFormValidation,\n IValidation,\n} from \"../../../../../utils/validationFunctions\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport InputBoxWrapper from \"../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport { ISecurityContext } from \"../../types\";\n\ninterface IConfigureProps {\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n storageClasses: any;\n classes: any;\n customImage: boolean;\n imageName: string;\n customDockerhub: boolean;\n imageRegistry: string;\n imageRegistryUsername: string;\n imageRegistryPassword: string;\n exposeMinIO: boolean;\n exposeConsole: boolean;\n prometheusCustom: boolean;\n tenantCustom: boolean;\n logSearchCustom: boolean;\n logSearchVolumeSize: string;\n logSearchSizeFactor: string;\n prometheusVolumeSize: string;\n prometheusSizeFactor: string;\n logSearchSelectedStorageClass: string;\n logSearchImage: string;\n kesImage: string;\n logSearchPostgresImage: string;\n logSearchPostgresInitImage: string;\n prometheusSelectedStorageClass: string;\n prometheusImage: string;\n prometheusSidecarImage: string;\n prometheusInitImage: string;\n selectedStorageClass: string;\n tenantSecurityContext: ISecurityContext;\n logSearchSecurityContext: ISecurityContext;\n logSearchPostgresSecurityContext: ISecurityContext;\n prometheusSecurityContext: ISecurityContext;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n configSectionItem: {\n marginRight: 15,\n\n \"& .multiContainer\": {\n border: \"1px solid red\",\n },\n },\n tenantCustomizationFields: {\n marginLeft: 30, // 2nd Level(15+15)\n width: \"88%\",\n margin: \"auto\",\n },\n containerItem: {\n marginRight: 15,\n },\n fieldGroup: {\n ...createTenantCommon.fieldGroup,\n paddingTop: 15,\n marginBottom: 25,\n },\n responsiveSectionItem: {\n \"@media (max-width: 900px)\": {\n flexFlow: \"column\",\n alignItems: \"flex-start\",\n\n \"& div > div\": {\n marginBottom: 5,\n marginRight: 0,\n },\n },\n },\n\n logSearchCustomFields: {\n marginLeft: 20, // 2nd Level(15+15)\n padding: 10,\n width: \"90%\",\n margin: \"auto\",\n },\n fieldSpaceTop: {\n marginTop: 15,\n },\n prometheusCustomFields: {\n marginLeft: 20, // 2nd Level(15+15)\n padding: 10,\n width: \"90%\",\n margin: \"auto\",\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst Configure = ({\n classes,\n storageClasses,\n customImage,\n imageName,\n customDockerhub,\n imageRegistry,\n imageRegistryUsername,\n imageRegistryPassword,\n exposeMinIO,\n exposeConsole,\n prometheusCustom,\n tenantCustom,\n logSearchCustom,\n logSearchVolumeSize,\n logSearchSizeFactor,\n logSearchImage,\n kesImage,\n logSearchPostgresImage,\n logSearchPostgresInitImage,\n prometheusVolumeSize,\n prometheusSizeFactor,\n logSearchSelectedStorageClass,\n prometheusSelectedStorageClass,\n prometheusImage,\n prometheusSidecarImage,\n prometheusInitImage,\n updateAddField,\n isPageValid,\n selectedStorageClass,\n tenantSecurityContext,\n logSearchSecurityContext,\n logSearchPostgresSecurityContext,\n prometheusSecurityContext,\n}: IConfigureProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n\n const configureSTClasses = [\n { label: \"Default\", value: \"default\" },\n ...storageClasses,\n ];\n\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"configure\", field, value);\n },\n [updateAddField]\n );\n\n // Validation\n useEffect(() => {\n let customAccountValidation: IValidation[] = [];\n if (tenantCustom) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"tenant_securityContext_runAsUser\",\n required: true,\n value: tenantSecurityContext.runAsUser,\n customValidation:\n tenantSecurityContext.runAsUser === \"\" ||\n parseInt(tenantSecurityContext.runAsUser) < 0,\n customValidationMessage: `runAsUser must be present and be 0 or more`,\n },\n {\n fieldKey: \"tenant_securityContext_runAsGroup\",\n required: true,\n value: tenantSecurityContext.runAsGroup,\n customValidation:\n tenantSecurityContext.runAsGroup === \"\" ||\n parseInt(tenantSecurityContext.runAsGroup) < 0,\n customValidationMessage: `runAsGroup must be present and be 0 or more`,\n },\n {\n fieldKey: \"tenant_securityContext_fsGroup\",\n required: true,\n value: tenantSecurityContext.fsGroup,\n customValidation:\n tenantSecurityContext.fsGroup === \"\" ||\n parseInt(tenantSecurityContext.fsGroup) < 0,\n customValidationMessage: `fsGroup must be present and be 0 or more`,\n },\n ];\n }\n if (prometheusCustom) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"prometheus_storage_class\",\n required: true,\n value: prometheusSelectedStorageClass,\n customValidation: prometheusSelectedStorageClass === \"\",\n customValidationMessage: \"Field cannot be empty\",\n },\n {\n fieldKey: \"prometheus_volume_size\",\n required: true,\n value: prometheusVolumeSize,\n customValidation:\n prometheusVolumeSize === \"\" || parseInt(prometheusVolumeSize) <= 0,\n customValidationMessage: `Volume size must be present and be greater than 0`,\n },\n {\n fieldKey: \"prometheus_securityContext_runAsUser\",\n required: true,\n value: prometheusSecurityContext.runAsUser,\n customValidation:\n prometheusSecurityContext.runAsUser === \"\" ||\n parseInt(prometheusSecurityContext.runAsUser) < 0,\n customValidationMessage: `runAsUser must be present and be 0 or more`,\n },\n {\n fieldKey: \"prometheus_securityContext_runAsGroup\",\n required: true,\n value: prometheusSecurityContext.runAsGroup,\n customValidation:\n prometheusSecurityContext.runAsGroup === \"\" ||\n parseInt(prometheusSecurityContext.runAsGroup) < 0,\n customValidationMessage: `runAsGroup must be present and be 0 or more`,\n },\n {\n fieldKey: \"prometheus_securityContext_fsGroup\",\n required: true,\n value: prometheusSecurityContext.fsGroup,\n customValidation:\n prometheusSecurityContext.fsGroup === \"\" ||\n parseInt(prometheusSecurityContext.fsGroup) < 0,\n customValidationMessage: `fsGroup must be present and be 0 or more`,\n },\n ];\n }\n if (logSearchCustom) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"log_search_storage_class\",\n required: true,\n value: logSearchSelectedStorageClass,\n customValidation: logSearchSelectedStorageClass === \"\",\n customValidationMessage: \"Field cannot be empty\",\n },\n {\n fieldKey: \"log_search_volume_size\",\n required: true,\n value: logSearchVolumeSize,\n customValidation:\n logSearchVolumeSize === \"\" || parseInt(logSearchVolumeSize) <= 0,\n customValidationMessage: `Volume size must be present and be greatter than 0`,\n },\n {\n fieldKey: \"logSearch_securityContext_runAsUser\",\n required: true,\n value: logSearchSecurityContext.runAsUser,\n customValidation:\n logSearchSecurityContext.runAsUser === \"\" ||\n parseInt(logSearchSecurityContext.runAsUser) < 0,\n customValidationMessage: `runAsUser must be present and be 0 or more`,\n },\n {\n fieldKey: \"logSearch_securityContext_runAsGroup\",\n required: true,\n value: logSearchSecurityContext.runAsGroup,\n customValidation:\n logSearchSecurityContext.runAsGroup === \"\" ||\n parseInt(logSearchSecurityContext.runAsGroup) < 0,\n customValidationMessage: `runAsGroup must be present and be 0 or more`,\n },\n {\n fieldKey: \"logSearch_securityContext_fsGroup\",\n required: true,\n value: logSearchSecurityContext.fsGroup,\n customValidation:\n logSearchSecurityContext.fsGroup === \"\" ||\n parseInt(logSearchSecurityContext.fsGroup) < 0,\n customValidationMessage: `fsGroup must be present and be 0 or more`,\n },\n {\n fieldKey: \"postgres_securityContext_runAsUser\",\n required: true,\n value: logSearchPostgresSecurityContext.runAsUser,\n customValidation:\n logSearchPostgresSecurityContext.runAsUser === \"\" ||\n parseInt(logSearchPostgresSecurityContext.runAsUser) < 0,\n customValidationMessage: `runAsUser must be present and be 0 or more`,\n },\n {\n fieldKey: \"postgres_securityContext_runAsGroup\",\n required: true,\n value: prometheusSecurityContext.runAsGroup,\n customValidation:\n logSearchPostgresSecurityContext.runAsGroup === \"\" ||\n parseInt(logSearchPostgresSecurityContext.runAsGroup) < 0,\n customValidationMessage: `runAsGroup must be present and be 0 or more`,\n },\n {\n fieldKey: \"postgres_securityContext_fsGroup\",\n required: true,\n value: logSearchPostgresSecurityContext.fsGroup,\n customValidation:\n logSearchPostgresSecurityContext.fsGroup === \"\" ||\n parseInt(logSearchPostgresSecurityContext.fsGroup) < 0,\n customValidationMessage: `fsGroup must be present and be 0 or more`,\n },\n ];\n }\n\n if (customImage) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"image\",\n required: false,\n value: imageName,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage: \"Format must be of form: 'minio/minio:VERSION'\",\n },\n {\n fieldKey: \"logSearchImage\",\n required: false,\n value: logSearchImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'minio/logsearchapi:VERSION'\",\n },\n {\n fieldKey: \"kesImage\",\n required: false,\n value: kesImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage: \"Format must be of form: 'minio/kes:VERSION'\",\n },\n {\n fieldKey: \"logSearchPostgresImage\",\n required: false,\n value: logSearchPostgresImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'library/postgres:VERSION'\",\n },\n {\n fieldKey: \"logSearchPostgresInitImage\",\n required: false,\n value: logSearchPostgresInitImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'library/busybox:VERSION'\",\n },\n {\n fieldKey: \"prometheusImage\",\n required: false,\n value: prometheusImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'minio/prometheus:VERSION'\",\n },\n {\n fieldKey: \"prometheusSidecarImage\",\n required: false,\n value: prometheusSidecarImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'project/container:VERSION'\",\n },\n {\n fieldKey: \"prometheusInitImage\",\n required: false,\n value: prometheusInitImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'library/busybox:VERSION'\",\n },\n ];\n if (customDockerhub) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"registry\",\n required: true,\n value: imageRegistry,\n },\n {\n fieldKey: \"registryUsername\",\n required: true,\n value: imageRegistryUsername,\n },\n {\n fieldKey: \"registryPassword\",\n required: true,\n value: imageRegistryPassword,\n },\n ];\n }\n }\n\n const commonVal = commonFormValidation(customAccountValidation);\n\n isPageValid(\"configure\", Object.keys(commonVal).length === 0);\n\n setValidationErrors(commonVal);\n }, [\n customImage,\n imageName,\n logSearchImage,\n kesImage,\n logSearchPostgresImage,\n logSearchPostgresInitImage,\n prometheusImage,\n prometheusSidecarImage,\n prometheusInitImage,\n customDockerhub,\n imageRegistry,\n imageRegistryUsername,\n imageRegistryPassword,\n isPageValid,\n prometheusCustom,\n tenantCustom,\n logSearchCustom,\n prometheusSelectedStorageClass,\n prometheusVolumeSize,\n logSearchSelectedStorageClass,\n logSearchVolumeSize,\n tenantSecurityContext,\n logSearchSecurityContext,\n logSearchPostgresSecurityContext,\n prometheusSecurityContext,\n ]);\n\n useEffect(() => {\n // New default values in current selection is invalid\n if (storageClasses.length > 0) {\n const filterPrometheus = storageClasses.filter(\n (item: any) => item.value === prometheusSelectedStorageClass\n );\n if (filterPrometheus.length === 0) {\n updateField(\"prometheusSelectedStorageClass\", \"default\");\n }\n\n const filterLogSearch = storageClasses.filter(\n (item: any) => item.value === logSearchSelectedStorageClass\n );\n if (filterLogSearch.length === 0) {\n updateField(\"logSearchSelectedStorageClass\", \"default\");\n }\n }\n }, [\n logSearchSelectedStorageClass,\n prometheusSelectedStorageClass,\n selectedStorageClass,\n storageClasses,\n updateField,\n ]);\n\n const cleanValidation = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n return (\n \n
\n

Configure

\n \n Basic configurations for tenant management\n \n
\n
\n

Expose Services

\n \n Whether the tenant's services should request an external IP.\n \n
\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"exposeMinIO\", checked);\n }}\n label={\"Expose MiniO Service\"}\n />\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"exposeConsole\", checked);\n }}\n label={\"Expose Console Service\"}\n />\n \n\n
\n

Additional Configurations

\n \n Configure SecurityContext, Storage Classes & Storage size for Log\n Search, Prometheus add-ons and your Tenant\n \n
\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"tenantCustom\", checked);\n }}\n label={\"Override Tenant defaults\"}\n />\n \n {tenantCustom && (\n \n
\n \n SecurityContext for MinIO\n \n \n \n
\n ) => {\n updateField(\"tenantSecurityContext\", {\n ...tenantSecurityContext,\n runAsUser: e.target.value,\n });\n cleanValidation(\"tenant_securityContext_runAsUser\");\n }}\n label=\"Run As User\"\n value={tenantSecurityContext.runAsUser}\n required\n error={\n validationErrors[\"tenant_securityContext_runAsUser\"] || \"\"\n }\n min=\"0\"\n />\n
\n
\n ) => {\n updateField(\"tenantSecurityContext\", {\n ...tenantSecurityContext,\n runAsGroup: e.target.value,\n });\n cleanValidation(\"tenant_securityContext_runAsGroup\");\n }}\n label=\"Run As Group\"\n value={tenantSecurityContext.runAsGroup}\n required\n error={\n validationErrors[\"tenant_securityContext_runAsGroup\"] ||\n \"\"\n }\n min=\"0\"\n />\n
\n
\n ) => {\n updateField(\"tenantSecurityContext\", {\n ...tenantSecurityContext,\n fsGroup: e.target.value,\n });\n cleanValidation(\"tenant_securityContext_fsGroup\");\n }}\n label=\"FsGroup\"\n value={tenantSecurityContext.fsGroup}\n required\n error={\n validationErrors[\"tenant_securityContext_fsGroup\"] || \"\"\n }\n min=\"0\"\n />\n
\n \n
\n
\n \n
\n {\n const targetD = e.target;\n const checked = targetD.checked;\n updateField(\"tenantSecurityContext\", {\n ...tenantSecurityContext,\n runAsNonRoot: checked,\n });\n }}\n label={\"Do not run as Root\"}\n />\n
\n
\n
\n
\n )}\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"logSearchCustom\", checked);\n }}\n label={\"Override Log Search defaults\"}\n />\n \n {logSearchCustom && (\n \n \n ) => {\n updateField(\n \"logSearchSelectedStorageClass\",\n e.target.value as string\n );\n }}\n label=\"Log Search Storage Class\"\n value={logSearchSelectedStorageClass}\n options={configureSTClasses}\n disabled={configureSTClasses.length < 1}\n />\n \n \n
\n ) => {\n updateField(\"logSearchVolumeSize\", e.target.value);\n cleanValidation(\"log_search_volume_size\");\n }}\n label=\"Storage Size [Gi]\"\n value={logSearchVolumeSize}\n required\n error={validationErrors[\"log_search_volume_size\"] || \"\"}\n min=\"0\"\n />\n
\n
\n\n \n \n SecurityContext for LogSearch\n \n\n \n \n
\n ) => {\n updateField(\"logSearchSecurityContext\", {\n ...logSearchSecurityContext,\n runAsUser: e.target.value,\n });\n cleanValidation(\"logSearch_securityContext_runAsUser\");\n }}\n label=\"Run As User\"\n value={logSearchSecurityContext.runAsUser}\n required\n error={\n validationErrors[\"logSearch_securityContext_runAsUser\"] ||\n \"\"\n }\n min=\"0\"\n />\n
\n
\n ) => {\n updateField(\"logSearchSecurityContext\", {\n ...logSearchSecurityContext,\n runAsGroup: e.target.value,\n });\n cleanValidation(\"logSearch_securityContext_runAsGroup\");\n }}\n label=\"Run As Group\"\n value={logSearchSecurityContext.runAsGroup}\n required\n error={\n validationErrors[\n \"logSearch_securityContext_runAsGroup\"\n ] || \"\"\n }\n min=\"0\"\n />\n
\n
\n ) => {\n updateField(\"logSearchSecurityContext\", {\n ...logSearchSecurityContext,\n fsGroup: e.target.value,\n });\n cleanValidation(\"logSearch_securityContext_fsGroup\");\n }}\n label=\"FsGroup\"\n value={logSearchSecurityContext.fsGroup}\n required\n error={\n validationErrors[\"logSearch_securityContext_fsGroup\"] ||\n \"\"\n }\n min=\"0\"\n />\n
\n \n
\n
\n \n
\n {\n const targetD = e.target;\n const checked = targetD.checked;\n updateField(\"logSearchSecurityContext\", {\n ...logSearchSecurityContext,\n runAsNonRoot: checked,\n });\n }}\n label={\"Do not run as Root\"}\n />\n
\n
\n \n
\n \n SecurityContext for PostgreSQL\n \n\n \n \n
\n ) => {\n updateField(\"logSearchPostgresSecurityContext\", {\n ...logSearchPostgresSecurityContext,\n runAsUser: e.target.value,\n });\n cleanValidation(\"postgres_securityContext_runAsUser\");\n }}\n label=\"Run As User\"\n value={logSearchPostgresSecurityContext.runAsUser}\n required\n error={\n validationErrors[\"postgres_securityContext_runAsUser\"] ||\n \"\"\n }\n min=\"0\"\n />\n
\n
\n ) => {\n updateField(\"logSearchPostgresSecurityContext\", {\n ...logSearchPostgresSecurityContext,\n runAsGroup: e.target.value,\n });\n cleanValidation(\"postgres_securityContext_runAsGroup\");\n }}\n label=\"Run As Group\"\n value={logSearchPostgresSecurityContext.runAsGroup}\n required\n error={\n validationErrors[\"postgres_securityContext_runAsGroup\"] ||\n \"\"\n }\n min=\"0\"\n />\n
\n
\n ) => {\n updateField(\"logSearchPostgresSecurityContext\", {\n ...logSearchPostgresSecurityContext,\n fsGroup: e.target.value,\n });\n cleanValidation(\"postgres_securityContext_fsGroup\");\n }}\n label=\"FsGroup\"\n value={logSearchPostgresSecurityContext.fsGroup}\n required\n error={\n validationErrors[\"postgres_securityContext_fsGroup\"] || \"\"\n }\n min=\"0\"\n />\n
\n \n
\n
\n \n
\n {\n const targetD = e.target;\n const checked = targetD.checked;\n updateField(\"logSearchPostgresSecurityContext\", {\n ...logSearchPostgresSecurityContext,\n runAsNonRoot: checked,\n });\n }}\n label={\"Do not run as Root\"}\n />\n
\n
\n
\n
\n )}\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"prometheusCustom\", checked);\n }}\n label={\"Override Prometheus defaults\"}\n />\n \n {prometheusCustom && (\n \n \n ) => {\n updateField(\n \"prometheusSelectedStorageClass\",\n e.target.value as string\n );\n }}\n label=\"Prometheus Storage Class\"\n value={prometheusSelectedStorageClass}\n options={configureSTClasses}\n disabled={configureSTClasses.length < 1}\n />\n \n \n
\n ) => {\n updateField(\"prometheusVolumeSize\", e.target.value);\n cleanValidation(\"prometheus_volume_size\");\n }}\n label=\"Storage Size [Gi]\"\n value={prometheusVolumeSize}\n required\n error={validationErrors[\"prometheus_volume_size\"] || \"\"}\n min=\"0\"\n />\n
\n
\n \n \n SecurityContext for Prometheus\n \n \n \n
\n ) => {\n updateField(\"prometheusSecurityContext\", {\n ...prometheusSecurityContext,\n runAsUser: e.target.value,\n });\n cleanValidation(\"prometheus_securityContext_runAsUser\");\n }}\n label=\"Run As User\"\n value={prometheusSecurityContext.runAsUser}\n required\n error={\n validationErrors[\n \"prometheus_securityContext_runAsUser\"\n ] || \"\"\n }\n min=\"0\"\n />\n
\n
\n ) => {\n updateField(\"prometheusSecurityContext\", {\n ...prometheusSecurityContext,\n runAsGroup: e.target.value,\n });\n cleanValidation(\"prometheus_securityContext_runAsGroup\");\n }}\n label=\"Run As Group\"\n value={prometheusSecurityContext.runAsGroup}\n required\n error={\n validationErrors[\n \"prometheus_securityContext_runAsGroup\"\n ] || \"\"\n }\n min=\"0\"\n />\n
\n
\n ) => {\n updateField(\"prometheusSecurityContext\", {\n ...prometheusSecurityContext,\n fsGroup: e.target.value,\n });\n cleanValidation(\"prometheus_securityContext_fsGroup\");\n }}\n label=\"FsGroup\"\n value={prometheusSecurityContext.fsGroup}\n required\n error={\n validationErrors[\"prometheus_securityContext_fsGroup\"] ||\n \"\"\n }\n min=\"0\"\n />\n
\n \n
\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n updateField(\"prometheusSecurityContext\", {\n ...prometheusSecurityContext,\n runAsNonRoot: checked,\n });\n }}\n label={\"Do not run as Root\"}\n />\n \n \n \n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n storageClasses: state.tenants.createTenant.storageClasses,\n customImage: state.tenants.createTenant.fields.configure.customImage,\n imageName: state.tenants.createTenant.fields.configure.imageName,\n customDockerhub: state.tenants.createTenant.fields.configure.customDockerhub,\n imageRegistry: state.tenants.createTenant.fields.configure.imageRegistry,\n imageRegistryUsername:\n state.tenants.createTenant.fields.configure.imageRegistryUsername,\n imageRegistryPassword:\n state.tenants.createTenant.fields.configure.imageRegistryPassword,\n exposeMinIO: state.tenants.createTenant.fields.configure.exposeMinIO,\n exposeConsole: state.tenants.createTenant.fields.configure.exposeConsole,\n prometheusCustom:\n state.tenants.createTenant.fields.configure.prometheusCustom,\n tenantCustom: state.tenants.createTenant.fields.configure.tenantCustom,\n logSearchCustom: state.tenants.createTenant.fields.configure.logSearchCustom,\n logSearchVolumeSize:\n state.tenants.createTenant.fields.configure.logSearchVolumeSize,\n logSearchSizeFactor:\n state.tenants.createTenant.fields.configure.logSearchSizeFactor,\n prometheusVolumeSize:\n state.tenants.createTenant.fields.configure.prometheusVolumeSize,\n prometheusSizeFactor:\n state.tenants.createTenant.fields.configure.prometheusSizeFactor,\n logSearchSelectedStorageClass:\n state.tenants.createTenant.fields.configure.logSearchSelectedStorageClass,\n logSearchImage: state.tenants.createTenant.fields.configure.logSearchImage,\n kesImage: state.tenants.createTenant.fields.configure.kesImage,\n logSearchPostgresImage:\n state.tenants.createTenant.fields.configure.logSearchPostgresImage,\n logSearchPostgresInitImage:\n state.tenants.createTenant.fields.configure.logSearchPostgresInitImage,\n prometheusSelectedStorageClass:\n state.tenants.createTenant.fields.configure.prometheusSelectedStorageClass,\n prometheusImage: state.tenants.createTenant.fields.configure.prometheusImage,\n prometheusSidecarImage:\n state.tenants.createTenant.fields.configure.prometheusSidecarImage,\n prometheusInitImage:\n state.tenants.createTenant.fields.configure.prometheusInitImage,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n tenantSecurityContext:\n state.tenants.createTenant.fields.configure.tenantSecurityContext,\n logSearchSecurityContext:\n state.tenants.createTenant.fields.configure.logSearchSecurityContext,\n logSearchPostgresSecurityContext:\n state.tenants.createTenant.fields.configure\n .logSearchPostgresSecurityContext,\n prometheusSecurityContext:\n state.tenants.createTenant.fields.configure.prometheusSecurityContext,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(Configure));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Grid, IconButton, Paper, Tooltip, Typography } from \"@mui/material\";\nimport CasinoIcon from \"@mui/icons-material/Casino\";\nimport DeleteIcon from \"@mui/icons-material/Delete\";\nimport {\n createTenantCommon,\n formFieldStyles,\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { isPageValid, updateAddField } from \"../../actions\";\nimport {\n commonFormValidation,\n IValidation,\n} from \"../../../../../utils/validationFunctions\";\nimport { AppState } from \"../../../../../store\";\nimport { clearValidationError, getRandomString } from \"../../utils\";\nimport RadioGroupSelector from \"../../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport InputBoxWrapper from \"../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport AddIcon from \"@mui/icons-material/Add\";\nimport RemoveIcon from \"../../../../../icons/RemoveIcon\";\n\ninterface IIdentityProviderProps {\n classes: any;\n idpSelection: string;\n accessKeys: string[];\n secretKeys: string[];\n openIDConfigurationURL: string;\n openIDClientID: string;\n openIDSecretID: string;\n openIDCallbackURL: string;\n openIDClaimName: string;\n openIDScopes: string;\n ADURL: string;\n ADSkipTLS: boolean;\n ADServerInsecure: boolean;\n ADUserNameSearchFilter: string;\n ADGroupSearchBaseDN: string;\n ADGroupSearchFilter: string;\n ADGroupNameAttribute: string;\n ADUserDNs: string[];\n ADUserNameFormat: string;\n ADLookupBindDN: string;\n ADLookupBindPassword: string;\n ADUserDNSearchBaseDN: string;\n ADUserDNSearchFilter: string;\n ADServerStartTLS: boolean;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n shortened: {\n gridTemplateColumns: \"auto auto 50px 50px\",\n display: \"grid\",\n gridGap: 15,\n marginBottom: 10,\n \"& input\": {\n fontWeight: 400,\n },\n },\n buttonTray: {\n marginLeft: 10,\n display: \"flex\",\n height: 38,\n \"& button\": {\n background: \"#EAEAEA\",\n },\n },\n overlayAction: {\n marginLeft: 10,\n \"& svg\": {\n maxWidth: 15,\n maxHeight: 15,\n },\n \"& button\": {\n background: \"#EAEAEA\",\n },\n },\n protocolRadioOptions: {\n display: \"flex\",\n flexFlow: \"column\",\n marginBottom: 10,\n\n \"& label\": {\n fontSize: 14,\n },\n \"& div\": {\n display: \"flex\",\n flexFlow: \"column\",\n alignItems: \"baseline\",\n },\n },\n adUserDnRows: {\n display: \"flex\",\n },\n ...createTenantCommon,\n ...formFieldStyles,\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst IdentityProvider = ({\n classes,\n idpSelection,\n accessKeys,\n secretKeys,\n openIDConfigurationURL,\n openIDClientID,\n openIDSecretID,\n openIDCallbackURL,\n openIDClaimName,\n openIDScopes,\n ADURL,\n ADSkipTLS,\n ADServerInsecure,\n ADUserNameSearchFilter,\n ADGroupSearchBaseDN,\n ADGroupSearchFilter,\n ADGroupNameAttribute,\n ADUserDNs,\n ADUserNameFormat,\n ADLookupBindDN,\n ADLookupBindPassword,\n ADUserDNSearchBaseDN,\n ADUserDNSearchFilter,\n ADServerStartTLS,\n updateAddField,\n isPageValid,\n}: IIdentityProviderProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"identityProvider\", field, value);\n },\n [updateAddField]\n );\n const updateUserField = (index: number, value: string) => {\n const newUserField = [...accessKeys];\n newUserField[index] = value;\n updateField(\"accessKeys\", newUserField);\n };\n const updatePwordField = (index: number, value: string) => {\n const newUserField = [...secretKeys];\n newUserField[index] = value;\n updateField(\"secretKeys\", newUserField);\n };\n const updateADUserField = (index: number, value: string) => {\n const newADUserDNsField = [...ADUserDNs];\n newADUserDNsField[index] = value;\n updateField(\"ADUserDNs\", newADUserDNsField);\n };\n const cleanValidation = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n // Validation\n\n useEffect(() => {\n let customIDPValidation: IValidation[] = [];\n\n if (idpSelection === \"Built-in\") {\n customIDPValidation = [...customIDPValidation];\n for (var i = 0; i < accessKeys.length; i++) {\n customIDPValidation.push({\n fieldKey: `accesskey-${i.toString()}`,\n required: true,\n value: accessKeys[i],\n pattern: /^[a-zA-Z0-9-]{8,63}$/,\n customPatternMessage: \"Keys must be at least length 8\",\n });\n customIDPValidation.push({\n fieldKey: `secretkey-${i.toString()}`,\n required: true,\n value: secretKeys[i],\n pattern: /^[a-zA-Z0-9-]{8,63}$/,\n customPatternMessage: \"Keys must be at least length 8\",\n });\n }\n }\n\n if (idpSelection === \"OpenID\") {\n customIDPValidation = [\n ...customIDPValidation,\n {\n fieldKey: \"openID_CONFIGURATION_URL\",\n required: true,\n value: openIDConfigurationURL,\n },\n {\n fieldKey: \"openID_clientID\",\n required: true,\n value: openIDClientID,\n },\n {\n fieldKey: \"openID_secretID\",\n required: true,\n value: openIDSecretID,\n },\n {\n fieldKey: \"openID_claimName\",\n required: true,\n value: openIDClaimName,\n },\n ];\n }\n\n if (idpSelection === \"AD\") {\n customIDPValidation = [\n ...customIDPValidation,\n {\n fieldKey: \"AD_URL\",\n required: true,\n value: ADURL,\n },\n ];\n // validate user DNs\n for (let i = 0; i < ADUserDNs.length; i++) {\n customIDPValidation.push({\n fieldKey: `ad-userdn-${i.toString()}`,\n required: true,\n value: ADUserDNs[i],\n });\n }\n }\n\n const commonVal = commonFormValidation(customIDPValidation);\n\n isPageValid(\"identityProvider\", Object.keys(commonVal).length === 0);\n\n setValidationErrors(commonVal);\n }, [\n idpSelection,\n accessKeys,\n secretKeys,\n openIDClientID,\n openIDSecretID,\n ADURL,\n ADUserNameSearchFilter,\n ADGroupSearchBaseDN,\n ADGroupSearchFilter,\n ADGroupNameAttribute,\n ADUserDNs,\n isPageValid,\n openIDConfigurationURL,\n openIDClaimName,\n ]);\n let inputs = null;\n if (idpSelection === \"Built-in\") {\n inputs = accessKeys.map((_, index) => {\n return (\n \n
\n ) => {\n updateUserField(index, e.target.value);\n cleanValidation(`accesskey-${index.toString()}`);\n }}\n index={index}\n key={`csv-accesskey-${index.toString()}`}\n error={validationErrors[`accesskey-${index.toString()}`] || \"\"}\n />\n ) => {\n updatePwordField(index, e.target.value);\n cleanValidation(`secretkey-${index.toString()}`);\n }}\n index={index}\n key={`csv-secretkey-${index.toString()}`}\n error={validationErrors[`secretkey-${index.toString()}`] || \"\"}\n />\n
\n \n
\n {\n accessKeys.push(\"\");\n secretKeys.push(\"\");\n updateUserField(accessKeys.length - 1, \"\");\n updatePwordField(secretKeys.length - 1, \"\");\n }}\n >\n \n \n
\n
\n \n
\n {\n if (accessKeys.length > 1) {\n accessKeys.splice(index, 1);\n secretKeys.splice(index, 1);\n updateUserField(\n accessKeys.length - 1,\n accessKeys[accessKeys.length - 1]\n );\n }\n }}\n >\n \n \n
\n
\n \n
\n {\n updateUserField(index, getRandomString(16));\n updatePwordField(index, getRandomString(32));\n }}\n size={\"small\"}\n >\n \n \n
\n
\n
\n
\n
\n );\n });\n }\n if (idpSelection === \"AD\") {\n inputs = ADUserDNs.map((_, index) => {\n return (\n \n
\n ) => {\n updateADUserField(index, e.target.value);\n cleanValidation(`ad-userdn-${index.toString()}`);\n }}\n index={index}\n key={`csv-ad-userdn-${index.toString()}`}\n error={validationErrors[`ad-userdn-${index.toString()}`] || \"\"}\n />\n
\n \n {\n ADUserDNs.push(\"\");\n updateADUserField(ADUserDNs.length - 1, \"\");\n }}\n >\n \n \n \n \n {\n if (ADUserDNs.length > 1) {\n ADUserDNs.splice(index, 1);\n updateUserField(\n ADUserDNs.length - 1,\n ADUserDNs[ADUserDNs.length - 1]\n );\n }\n }}\n >\n \n \n \n
\n
\n
\n );\n });\n }\n return (\n \n
\n

Identity Provider

\n \n Access to the tenant can be controlled via an external Identity\n Manager.\n \n
\n \n \n {\n updateField(\"idpSelection\", e.target.value);\n }}\n selectorOptions={[\n { label: \"Built-in\", value: \"Built-in\" },\n { label: \"OpenID\", value: \"OpenID\" },\n { label: \"Active Directory\", value: \"AD\" },\n ]}\n />\n \n {idpSelection === \"Built-in\" && (\n \n Add additional users\n {inputs}\n \n )}\n {idpSelection === \"OpenID\" && (\n \n \n ) => {\n updateField(\"openIDConfigurationURL\", e.target.value);\n cleanValidation(\"openID_CONFIGURATION_URL\");\n }}\n label=\"Configuration URL\"\n value={openIDConfigurationURL}\n placeholder=\"https://your-identity-provider.com/.well-known/openid-configuration\"\n error={validationErrors[\"openID_CONFIGURATION_URL\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"openIDClientID\", e.target.value);\n cleanValidation(\"openID_clientID\");\n }}\n label=\"Client ID\"\n value={openIDClientID}\n error={validationErrors[\"openID_clientID\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"openIDSecretID\", e.target.value);\n cleanValidation(\"openID_secretID\");\n }}\n label=\"Secret ID\"\n value={openIDSecretID}\n error={validationErrors[\"openID_secretID\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"openIDCallbackURL\", e.target.value);\n cleanValidation(\"openID_callbackURL\");\n }}\n label=\"Callback URL\"\n value={openIDCallbackURL}\n placeholder=\"https://your-console-endpoint:9443/oauth_callback\"\n error={validationErrors[\"openID_callbackURL\"] || \"\"}\n />\n \n \n ) => {\n updateField(\"openIDClaimName\", e.target.value);\n cleanValidation(\"openID_claimName\");\n }}\n label=\"Claim Name\"\n value={openIDClaimName}\n error={validationErrors[\"openID_claimName\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"openIDScopes\", e.target.value);\n cleanValidation(\"openID_scopes\");\n }}\n label=\"Scopes\"\n value={openIDScopes}\n />\n \n \n )}\n {idpSelection === \"AD\" && (\n \n \n ) => {\n updateField(\"ADURL\", e.target.value);\n cleanValidation(\"AD_URL\");\n }}\n label=\"LDAP Server Address\"\n value={ADURL}\n placeholder=\"ldap-server:636\"\n error={validationErrors[\"AD_URL\"] || \"\"}\n required\n />\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n updateField(\"ADSkipTLS\", checked);\n }}\n label={\"Skip TLS Verification\"}\n />\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n updateField(\"ADServerInsecure\", checked);\n }}\n label={\"Server Insecure\"}\n />\n \n {ADServerInsecure ? (\n \n \n Warning: All traffic with Active Directory will be unencrypted\n \n
\n
\n ) : null}\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n updateField(\"ADServerStartTLS\", checked);\n }}\n label={\"Start TLS connection to AD/LDAP server\"}\n />\n \n \n ) => {\n updateField(\"ADUserNameFormat\", e.target.value);\n }}\n label=\"Username Format\"\n value={ADUserNameFormat}\n placeholder=\"uid=%s,cn=accounts,dc=myldapserver,dc=com\"\n />\n \n \n ) => {\n updateField(\"ADUserNameSearchFilter\", e.target.value);\n }}\n label=\"Username Search Filter\"\n value={ADUserNameSearchFilter}\n placeholder=\"(|(objectclass=posixAccount)(uid=%s))\"\n />\n \n \n ) => {\n updateField(\"ADGroupSearchBaseDN\", e.target.value);\n }}\n label=\"Group Search Base DN\"\n value={ADGroupSearchBaseDN}\n placeholder=\"ou=hwengg,dc=min,dc=io;ou=swengg,dc=min,dc=io\"\n />\n \n \n ) => {\n updateField(\"ADGroupSearchFilter\", e.target.value);\n }}\n label=\"Group Search Filter\"\n value={ADGroupSearchFilter}\n placeholder=\"(&(objectclass=groupOfNames)(member=%s))\"\n />\n \n \n ) => {\n updateField(\"ADGroupNameAttribute\", e.target.value);\n }}\n label=\"Group Name Attribute\"\n value={ADGroupNameAttribute}\n placeholder=\"cn\"\n />\n \n \n ) => {\n updateField(\"ADLookupBindDN\", e.target.value);\n }}\n label=\"Lookup Bind DN\"\n value={ADLookupBindDN}\n placeholder=\"cn=admin,dc=min,dc=io\"\n />\n \n \n ) => {\n updateField(\"ADLookupBindPassword\", e.target.value);\n }}\n label=\"Lookup Bind Password\"\n value={ADLookupBindPassword}\n placeholder=\"admin\"\n />\n \n \n ) => {\n updateField(\"ADUserDNSearchBaseDN\", e.target.value);\n }}\n label=\"User DN Search Base DN\"\n value={ADUserDNSearchBaseDN}\n placeholder=\"dc=min,dc=io\"\n />\n \n \n ) => {\n updateField(\"ADUserDNSearchFilter\", e.target.value);\n }}\n label=\"User DN Search Filter\"\n value={ADUserDNSearchFilter}\n placeholder=\"(uid=%s)\"\n />\n \n
\n \n List of user DNs (Distinguished Names) to be Tenant Administrators\n \n \n {inputs}\n \n
\n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n idpSelection: state.tenants.createTenant.fields.identityProvider.idpSelection,\n accessKeys: state.tenants.createTenant.fields.identityProvider.accessKeys,\n secretKeys: state.tenants.createTenant.fields.identityProvider.secretKeys,\n openIDConfigurationURL:\n state.tenants.createTenant.fields.identityProvider.openIDConfigurationURL,\n openIDClientID:\n state.tenants.createTenant.fields.identityProvider.openIDClientID,\n openIDSecretID:\n state.tenants.createTenant.fields.identityProvider.openIDSecretID,\n openIDCallbackURL:\n state.tenants.createTenant.fields.identityProvider.openIDCallbackURL,\n openIDClaimName:\n state.tenants.createTenant.fields.identityProvider.openIDClaimName,\n openIDScopes: state.tenants.createTenant.fields.identityProvider.openIDScopes,\n ADURL: state.tenants.createTenant.fields.identityProvider.ADURL,\n ADSkipTLS: state.tenants.createTenant.fields.identityProvider.ADSkipTLS,\n ADServerInsecure:\n state.tenants.createTenant.fields.identityProvider.ADServerInsecure,\n ADUserNameSearchFilter:\n state.tenants.createTenant.fields.identityProvider.ADUserNameSearchFilter,\n ADGroupSearchBaseDN:\n state.tenants.createTenant.fields.identityProvider.ADGroupSearchBaseDN,\n ADGroupSearchFilter:\n state.tenants.createTenant.fields.identityProvider.ADGroupSearchFilter,\n ADGroupNameAttribute:\n state.tenants.createTenant.fields.identityProvider.ADGroupNameAttribute,\n ADUserDNs: state.tenants.createTenant.fields.identityProvider.ADUserDNs,\n ADUserNameFormat:\n state.tenants.createTenant.fields.identityProvider.ADUserNameFormat,\n ADLookupBindDN:\n state.tenants.createTenant.fields.identityProvider.ADLookupBindDN,\n ADLookupBindPassword:\n state.tenants.createTenant.fields.identityProvider.ADLookupBindPassword,\n ADUserDNSearchBaseDN:\n state.tenants.createTenant.fields.identityProvider.ADUserDNSearchBaseDN,\n ADUserDNSearchFilter:\n state.tenants.createTenant.fields.identityProvider.ADUserDNSearchFilter,\n ADServerStartTLS:\n state.tenants.createTenant.fields.identityProvider.ADServerStartTLS,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(IdentityProvider));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Grid, IconButton, Paper, Typography } from \"@mui/material\";\nimport {\n createTenantCommon,\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport {\n addCaCertificate,\n addFileToCaCertificates,\n addFileToKeyPair,\n addKeyPair,\n deleteCaCertificate,\n deleteKeyPair,\n isPageValid,\n updateAddField,\n} from \"../../actions\";\nimport { AppState } from \"../../../../../store\";\nimport { KeyPair } from \"../../ListTenants/utils\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport FileSelector from \"../../../Common/FormComponents/FileSelector/FileSelector\";\nimport AddIcon from \"../../../../../icons/AddIcon\";\nimport RemoveIcon from \"../../../../../icons/RemoveIcon\";\n\ninterface ISecurityProps {\n classes: any;\n enableTLS: boolean;\n enableAutoCert: boolean;\n enableCustomCerts: boolean;\n minioCertificates: KeyPair[];\n caCertificates: KeyPair[];\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n addFileToCaCertificates: typeof addFileToCaCertificates;\n deleteCaCertificate: typeof deleteCaCertificate;\n addCaCertificate: typeof addCaCertificate;\n addKeyPair: typeof addKeyPair;\n addFileToKeyPair: typeof addFileToKeyPair;\n deleteKeyPair: typeof deleteKeyPair;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n minioCertificateRows: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n borderBottom: \"1px solid #EAEAEA\",\n \"&:last-child\": {\n borderBottom: 0,\n },\n \"@media (max-width: 900px)\": {\n flex: 1,\n },\n },\n fileItem: {\n marginRight: 10,\n display: \"flex\",\n \"& div label\": {\n minWidth: 50,\n },\n\n \"@media (max-width: 900px)\": {\n flexFlow: \"column\",\n },\n },\n minioCertsContainer: {\n marginBottom: 15,\n },\n minioCACertsRow: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n\n borderBottom: \"1px solid #EAEAEA\",\n \"&:last-child\": {\n borderBottom: 0,\n },\n \"@media (max-width: 900px)\": {\n flex: 1,\n\n \"& div label\": {\n minWidth: 50,\n },\n },\n },\n rowActions: {\n display: \"flex\",\n justifyContent: \"flex-end\",\n \"@media (max-width: 900px)\": {\n flex: 1,\n },\n },\n overlayAction: {\n marginLeft: 10,\n \"& svg\": {\n maxWidth: 15,\n maxHeight: 15,\n },\n \"& button\": {\n background: \"#EAEAEA\",\n },\n },\n\n ...createTenantCommon,\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst Security = ({\n classes,\n enableTLS,\n enableAutoCert,\n enableCustomCerts,\n minioCertificates,\n caCertificates,\n updateAddField,\n isPageValid,\n addFileToCaCertificates,\n deleteCaCertificate,\n addCaCertificate,\n addKeyPair,\n addFileToKeyPair,\n deleteKeyPair,\n}: ISecurityProps) => {\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"security\", field, value);\n },\n [updateAddField]\n );\n\n // Validation\n\n useEffect(() => {\n if (!enableTLS) {\n isPageValid(\"security\", true);\n return;\n }\n if (enableAutoCert) {\n isPageValid(\"security\", true);\n return;\n }\n if (enableCustomCerts) {\n isPageValid(\"security\", true);\n return;\n }\n isPageValid(\"security\", false);\n }, [enableTLS, enableAutoCert, enableCustomCerts, isPageValid]);\n\n return (\n \n
\n

Security

\n
\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"enableTLS\", checked);\n }}\n label={\"Enable TLS\"}\n />\n Enable TLS for the tenant, this is required for Encryption Configuration\n {enableTLS && (\n \n
\n
\n \n AutoCert: MinIO Operator will generate all TLS certificates\n automatically\n \n \n Custom certificates: Allow user to provide your own certificates\n \n
\n
\n )}\n
\n {enableTLS && (\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"enableAutoCert\", checked);\n }}\n label={\"Enable AutoCert\"}\n />\n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"enableCustomCerts\", checked);\n }}\n label={\"Custom Certificates\"}\n />\n \n {enableCustomCerts && (\n \n \n \n
\n \n MinIO Certificates\n \n {minioCertificates.map((keyPair: KeyPair) => (\n \n \n {\n addFileToKeyPair(\n keyPair.id,\n \"cert\",\n fileName,\n encodedValue\n );\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"tlsCert\"\n name=\"tlsCert\"\n label=\"Cert\"\n value={keyPair.cert}\n />\n {\n addFileToKeyPair(\n keyPair.id,\n \"key\",\n fileName,\n encodedValue\n );\n }}\n accept=\".key,.pem\"\n id=\"tlsKey\"\n name=\"tlsKey\"\n label=\"Key\"\n value={keyPair.key}\n />\n \n\n \n
\n \n \n \n
\n
\n {\n deleteKeyPair(keyPair.id);\n }}\n >\n \n \n
\n
\n \n ))}\n
\n
\n
\n\n \n \n
\n \n MinIO CA Certificates\n \n\n {caCertificates.map((keyPair: KeyPair) => (\n \n \n {\n addFileToCaCertificates(\n keyPair.id,\n \"cert\",\n fileName,\n encodedValue\n );\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"tlsCert\"\n name=\"tlsCert\"\n label=\"Cert\"\n value={keyPair.cert}\n />\n \n \n
\n
\n \n \n \n
\n
\n {\n deleteCaCertificate(keyPair.id);\n }}\n >\n \n \n
\n
\n
\n \n ))}\n
\n
\n
\n
\n )}\n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n enableTLS: state.tenants.createTenant.fields.security.enableTLS,\n enableAutoCert: state.tenants.createTenant.fields.security.enableAutoCert,\n enableCustomCerts:\n state.tenants.createTenant.fields.security.enableCustomCerts,\n minioCertificates: state.tenants.createTenant.certificates.minioCertificates,\n caCertificates: state.tenants.createTenant.certificates.caCertificates,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n addFileToCaCertificates,\n deleteCaCertificate,\n addCaCertificate,\n addKeyPair,\n addFileToKeyPair,\n deleteKeyPair,\n});\n\nexport default withStyles(styles)(connector(Security));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Paper } from \"@mui/material\";\nimport Grid from \"@mui/material/Grid\";\nimport {\n addFileClientCert,\n addFileGemaltoCa,\n addFileServerCert,\n addFileVaultCa,\n addFileVaultCert,\n isPageValid,\n updateAddField,\n} from \"../../actions\";\nimport {\n createTenantCommon,\n formFieldStyles,\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { AppState } from \"../../../../../store\";\nimport { clearValidationError } from \"../../utils\";\nimport InputBoxWrapper from \"../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport FileSelector from \"../../../Common/FormComponents/FileSelector/FileSelector\";\nimport RadioGroupSelector from \"../../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport {\n commonFormValidation,\n IValidation,\n} from \"../../../../../utils/validationFunctions\";\nimport { KeyPair } from \"../../ListTenants/utils\";\nimport { ISecurityContext } from \"../../types\";\n\ninterface IEncryptionProps {\n classes: any;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n addFileServerCert: typeof addFileServerCert;\n addFileClientCert: typeof addFileClientCert;\n addFileVaultCert: typeof addFileVaultCert;\n addFileVaultCa: typeof addFileVaultCa;\n addFileGemaltoCa: typeof addFileGemaltoCa;\n enableEncryption: boolean;\n encryptionType: string;\n gemaltoEndpoint: string;\n gemaltoToken: string;\n gemaltoDomain: string;\n gemaltoRetry: string;\n awsEndpoint: string;\n awsRegion: string;\n awsKMSKey: string;\n awsAccessKey: string;\n awsSecretKey: string;\n awsToken: string;\n vaultEndpoint: string;\n vaultEngine: string;\n vaultNamespace: string;\n vaultPrefix: string;\n vaultAppRoleEngine: string;\n vaultId: string;\n vaultSecret: string;\n vaultRetry: string;\n vaultPing: string;\n azureEndpoint: string;\n azureTenantID: string;\n azureClientID: string;\n azureClientSecret: string;\n gcpProjectID: string;\n gcpEndpoint: string;\n gcpClientEmail: string;\n gcpClientID: string;\n gcpPrivateKeyID: string;\n gcpPrivateKey: string;\n enableCustomCertsForKES: boolean;\n enableAutoCert: boolean;\n enableTLS: boolean;\n enableCustomCerts: boolean;\n minioCertificates: KeyPair[];\n serverCertificate: KeyPair;\n clientCertificate: KeyPair;\n vaultCertificate: KeyPair;\n vaultCA: KeyPair;\n gemaltoCA: KeyPair;\n kesSecurityContext: ISecurityContext;\n replicas: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n encryptionTypeOptions: {\n marginBottom: 15,\n },\n mutualTlsConfig: {\n marginTop: 15,\n \"& fieldset\": {\n flex: 1,\n },\n },\n rightSpacer: {\n marginRight: 15,\n },\n responsiveContainer: {\n \"@media (max-width: 900px)\": {\n display: \"flex\",\n flexFlow: \"column\",\n },\n },\n ...createTenantCommon,\n ...formFieldStyles,\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst Encryption = ({\n classes,\n updateAddField,\n isPageValid,\n addFileServerCert,\n addFileClientCert,\n addFileVaultCert,\n addFileVaultCa,\n addFileGemaltoCa,\n enableEncryption,\n enableCustomCerts,\n encryptionType,\n gemaltoEndpoint,\n gemaltoToken,\n gemaltoDomain,\n gemaltoRetry,\n awsEndpoint,\n awsRegion,\n awsKMSKey,\n awsAccessKey,\n awsSecretKey,\n awsToken,\n vaultEndpoint,\n vaultEngine,\n vaultNamespace,\n vaultPrefix,\n vaultAppRoleEngine,\n vaultId,\n vaultSecret,\n vaultRetry,\n vaultPing,\n azureEndpoint,\n azureTenantID,\n azureClientID,\n azureClientSecret,\n gcpProjectID,\n gcpEndpoint,\n gcpClientEmail,\n gcpClientID,\n gcpPrivateKeyID,\n gcpPrivateKey,\n enableCustomCertsForKES,\n enableAutoCert,\n enableTLS,\n minioCertificates,\n serverCertificate,\n clientCertificate,\n vaultCertificate,\n vaultCA,\n gemaltoCA,\n kesSecurityContext,\n replicas,\n}: IEncryptionProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n\n let encryptionAvailable = false;\n if (\n enableTLS &&\n (enableAutoCert ||\n (minioCertificates &&\n minioCertificates.filter(\n (item) => item.encoded_key && item.encoded_cert\n ).length > 0))\n ) {\n encryptionAvailable = true;\n }\n\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"encryption\", field, value);\n },\n [updateAddField]\n );\n\n const cleanValidation = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n // Validation\n useEffect(() => {\n let encryptionValidation: IValidation[] = [];\n\n if (enableEncryption) {\n encryptionValidation = [\n ...encryptionValidation,\n {\n fieldKey: \"replicas\",\n required: true,\n value: replicas,\n customValidation: parseInt(replicas) < 1,\n customValidationMessage: \"Replicas needs to be 1 or greater\",\n },\n {\n fieldKey: \"kes_securityContext_runAsUser\",\n required: true,\n value: kesSecurityContext.runAsUser,\n customValidation:\n kesSecurityContext.runAsUser === \"\" ||\n parseInt(kesSecurityContext.runAsUser) < 0,\n customValidationMessage: `runAsUser must be present and be 0 or more`,\n },\n {\n fieldKey: \"kes_securityContext_runAsGroup\",\n required: true,\n value: kesSecurityContext.runAsGroup,\n customValidation:\n kesSecurityContext.runAsGroup === \"\" ||\n parseInt(kesSecurityContext.runAsGroup) < 0,\n customValidationMessage: `runAsGroup must be present and be 0 or more`,\n },\n {\n fieldKey: \"kes_securityContext_fsGroup\",\n required: true,\n value: kesSecurityContext.fsGroup,\n customValidation:\n kesSecurityContext.fsGroup === \"\" ||\n parseInt(kesSecurityContext.fsGroup) < 0,\n customValidationMessage: `fsGroup must be present and be 0 or more`,\n },\n ];\n\n if (enableCustomCerts) {\n encryptionValidation = [\n ...encryptionValidation,\n {\n fieldKey: \"serverKey\",\n required: !enableAutoCert,\n value: serverCertificate.encoded_key,\n },\n {\n fieldKey: \"serverCert\",\n required: !enableAutoCert,\n value: serverCertificate.encoded_cert,\n },\n {\n fieldKey: \"clientKey\",\n required: !enableAutoCert,\n value: clientCertificate.encoded_key,\n },\n {\n fieldKey: \"clientCert\",\n required: !enableAutoCert,\n value: clientCertificate.encoded_cert,\n },\n ];\n }\n\n if (encryptionType === \"vault\") {\n encryptionValidation = [\n ...encryptionValidation,\n {\n fieldKey: \"vault_endpoint\",\n required: true,\n value: vaultEndpoint,\n },\n {\n fieldKey: \"vault_id\",\n required: true,\n value: vaultId,\n },\n {\n fieldKey: \"vault_secret\",\n required: true,\n value: vaultSecret,\n },\n {\n fieldKey: \"vault_ping\",\n required: false,\n value: vaultPing,\n customValidation: parseInt(vaultPing) < 0,\n customValidationMessage: \"Value needs to be 0 or greater\",\n },\n {\n fieldKey: \"vault_retry\",\n required: false,\n value: vaultRetry,\n customValidation: parseInt(vaultRetry) < 0,\n customValidationMessage: \"Value needs to be 0 or greater\",\n },\n ];\n }\n\n if (encryptionType === \"aws\") {\n encryptionValidation = [\n ...encryptionValidation,\n {\n fieldKey: \"aws_endpoint\",\n required: true,\n value: awsEndpoint,\n },\n {\n fieldKey: \"aws_region\",\n required: true,\n value: awsRegion,\n },\n {\n fieldKey: \"aws_accessKey\",\n required: true,\n value: awsAccessKey,\n },\n {\n fieldKey: \"aws_secretKey\",\n required: true,\n value: awsSecretKey,\n },\n ];\n }\n\n if (encryptionType === \"gemalto\") {\n encryptionValidation = [\n ...encryptionValidation,\n {\n fieldKey: \"gemalto_endpoint\",\n required: true,\n value: gemaltoEndpoint,\n },\n {\n fieldKey: \"gemalto_token\",\n required: true,\n value: gemaltoToken,\n },\n {\n fieldKey: \"gemalto_domain\",\n required: true,\n value: gemaltoDomain,\n },\n {\n fieldKey: \"gemalto_retry\",\n required: false,\n value: gemaltoRetry,\n customValidation: parseInt(gemaltoRetry) < 0,\n customValidationMessage: \"Value needs to be 0 or greater\",\n },\n ];\n }\n\n if (encryptionType === \"azure\") {\n encryptionValidation = [\n ...encryptionValidation,\n {\n fieldKey: \"azure_endpoint\",\n required: true,\n value: azureEndpoint,\n },\n {\n fieldKey: \"azure_tenant_id\",\n required: true,\n value: azureTenantID,\n },\n {\n fieldKey: \"azure_client_id\",\n required: true,\n value: azureClientID,\n },\n {\n fieldKey: \"azure_client_secret\",\n required: true,\n value: azureClientSecret,\n },\n ];\n }\n }\n\n const commonVal = commonFormValidation(encryptionValidation);\n\n isPageValid(\"encryption\", Object.keys(commonVal).length === 0);\n\n setValidationErrors(commonVal);\n }, [\n enableEncryption,\n encryptionType,\n vaultEndpoint,\n vaultEngine,\n vaultId,\n vaultSecret,\n vaultPing,\n vaultRetry,\n awsEndpoint,\n awsRegion,\n awsSecretKey,\n awsAccessKey,\n gemaltoEndpoint,\n gemaltoToken,\n gemaltoDomain,\n gemaltoRetry,\n gcpProjectID,\n gcpEndpoint,\n gcpClientEmail,\n gcpClientID,\n gcpPrivateKeyID,\n gcpPrivateKey,\n azureEndpoint,\n azureTenantID,\n azureClientID,\n azureClientSecret,\n isPageValid,\n enableAutoCert,\n enableCustomCerts,\n serverCertificate.encoded_key,\n serverCertificate.encoded_cert,\n clientCertificate.encoded_key,\n clientCertificate.encoded_cert,\n kesSecurityContext,\n replicas,\n ]);\n\n return (\n \n
\n

Encryption

\n \n How would you like to encrypt the information at rest.\n \n
\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"enableEncryption\", checked);\n }}\n label={\"Enable Server Side Encryption\"}\n disabled={!encryptionAvailable}\n />\n \n {enableEncryption && (\n \n \n {\n updateField(\"encryptionType\", e.target.value);\n }}\n selectorOptions={[\n { label: \"Vault\", value: \"vault\" },\n { label: \"AWS\", value: \"aws\" },\n { label: \"Gemalto\", value: \"gemalto\" },\n { label: \"GCP\", value: \"gcp\" },\n { label: \"Azure\", value: \"azure\" },\n ]}\n />\n \n {encryptionType === \"vault\" && (\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"enableCustomCertsForKES\", checked);\n }}\n label={\"Custom Certificates\"}\n disabled={!enableAutoCert}\n />\n \n {(enableCustomCertsForKES || !enableAutoCert) && (\n \n \n \n
\n \n Encryption Service Certificates\n \n {\n addFileServerCert(\"key\", fileName, encodedValue);\n cleanValidation(\"serverKey\");\n }}\n accept=\".key,.pem\"\n id=\"serverKey\"\n name=\"serverKey\"\n label=\"Key\"\n error={validationErrors[\"serverKey\"] || \"\"}\n value={serverCertificate.key}\n required={!enableAutoCert}\n />\n {\n addFileServerCert(\"cert\", fileName, encodedValue);\n cleanValidation(\"serverCert\");\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"serverCert\"\n name=\"serverCert\"\n label=\"Cert\"\n error={validationErrors[\"serverCert\"] || \"\"}\n value={serverCertificate.cert}\n required={!enableAutoCert}\n />\n
\n
\n
\n\n \n \n
\n \n Mutual TLS authentication\n \n {\n addFileClientCert(\"key\", fileName, encodedValue);\n cleanValidation(\"clientKey\");\n }}\n accept=\".key,.pem\"\n id=\"clientKey\"\n name=\"clientKey\"\n label=\"Key\"\n error={validationErrors[\"clientKey\"] || \"\"}\n value={clientCertificate.key}\n required={!enableAutoCert}\n />\n {\n addFileClientCert(\"cert\", fileName, encodedValue);\n cleanValidation(\"clientCert\");\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"clientCert\"\n name=\"clientCert\"\n label=\"Cert\"\n error={validationErrors[\"clientCert\"] || \"\"}\n value={clientCertificate.cert}\n required={!enableAutoCert}\n />\n
\n
\n
\n
\n )}\n \n ) => {\n updateField(\"vaultEndpoint\", e.target.value);\n cleanValidation(\"vault_endpoint\");\n }}\n label=\"Endpoint\"\n value={vaultEndpoint}\n error={validationErrors[\"vault_endpoint\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"vaultEngine\", e.target.value);\n cleanValidation(\"vault_engine\");\n }}\n label=\"Engine\"\n value={vaultEngine}\n />\n \n \n ) => {\n updateField(\"vaultNamespace\", e.target.value);\n }}\n label=\"Namespace\"\n value={vaultNamespace}\n />\n \n \n ) => {\n updateField(\"vaultPrefix\", e.target.value);\n }}\n label=\"Prefix\"\n value={vaultPrefix}\n />\n \n\n \n
\n App Role\n \n ) => {\n updateField(\"vaultAppRoleEngine\", e.target.value);\n }}\n label=\"Engine\"\n value={vaultAppRoleEngine}\n />\n \n \n ) => {\n updateField(\"vaultId\", e.target.value);\n cleanValidation(\"vault_id\");\n }}\n label=\"AppRole ID\"\n value={vaultId}\n error={validationErrors[\"vault_id\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"vaultSecret\", e.target.value);\n cleanValidation(\"vault_secret\");\n }}\n label=\"AppRole Secret\"\n value={vaultSecret}\n error={validationErrors[\"vault_secret\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"vaultRetry\", e.target.value);\n cleanValidation(\"vault_retry\");\n }}\n label=\"Retry (Seconds)\"\n value={vaultRetry}\n error={validationErrors[\"vault_retry\"] || \"\"}\n />\n \n
\n
\n\n \n
\n \n Mutual TLS authentication (optional)\n \n {\n addFileVaultCert(\"key\", fileName, encodedValue);\n cleanValidation(\"vault_key\");\n }}\n accept=\".key,.pem\"\n id=\"vault_key\"\n name=\"vault_key\"\n label=\"Key\"\n value={vaultCertificate.key}\n />\n {\n addFileVaultCert(\"cert\", fileName, encodedValue);\n cleanValidation(\"vault_cert\");\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"vault_cert\"\n name=\"vault_cert\"\n label=\"Cert\"\n value={vaultCertificate.cert}\n />\n {\n addFileVaultCa(fileName, encodedValue);\n cleanValidation(\"vault_ca\");\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"vault_ca\"\n name=\"vault_ca\"\n label=\"CA\"\n value={vaultCA.cert}\n />\n
\n
\n \n
\n Status\n ) => {\n updateField(\"vaultPing\", e.target.value);\n cleanValidation(\"vault_ping\");\n }}\n label=\"Ping (Seconds)\"\n value={vaultPing}\n error={validationErrors[\"vault_ping\"] || \"\"}\n />\n
\n \n
\n )}\n {encryptionType === \"azure\" && (\n \n \n ) => {\n updateField(\"azureEndpoint\", e.target.value);\n cleanValidation(\"azure_endpoint\");\n }}\n label=\"Endpoint\"\n value={azureEndpoint}\n error={validationErrors[\"azure_endpoint\"] || \"\"}\n />\n \n \n
\n \n Credentials\n \n \n ) => {\n updateField(\"azureTenantID\", e.target.value);\n cleanValidation(\"azure_tenant_id\");\n }}\n label=\"Tenant ID\"\n value={azureTenantID}\n error={validationErrors[\"azure_tenant_id\"] || \"\"}\n />\n \n \n ) => {\n updateField(\"azureClientID\", e.target.value);\n cleanValidation(\"azure_client_id\");\n }}\n label=\"Client ID\"\n value={azureClientID}\n error={validationErrors[\"azure_client_id\"] || \"\"}\n />\n \n \n ) => {\n updateField(\"azureClientSecret\", e.target.value);\n cleanValidation(\"azure_client_secret\");\n }}\n label=\"Client Secret\"\n value={azureClientSecret}\n error={validationErrors[\"azure_client_secret\"] || \"\"}\n />\n \n
\n
\n
\n )}\n {encryptionType === \"gcp\" && (\n \n \n ) => {\n updateField(\"gcpProjectID\", e.target.value);\n }}\n label=\"Project ID\"\n value={gcpProjectID}\n />\n \n \n ) => {\n updateField(\"gcpEndpoint\", e.target.value);\n }}\n label=\"Endpoint\"\n value={gcpEndpoint}\n />\n \n \n
\n \n Credentials\n \n \n ) => {\n updateField(\"gcpClientEmail\", e.target.value);\n }}\n label=\"Client Email\"\n value={gcpClientEmail}\n />\n \n \n ) => {\n updateField(\"gcpClientID\", e.target.value);\n }}\n label=\"Client ID\"\n value={gcpClientID}\n />\n \n \n ) => {\n updateField(\"gcpPrivateKeyID\", e.target.value);\n }}\n label=\"Private Key ID\"\n value={gcpPrivateKeyID}\n />\n \n \n ) => {\n updateField(\"gcpPrivateKey\", e.target.value);\n }}\n label=\"Private Key\"\n value={gcpPrivateKey}\n />\n \n
\n
\n
\n )}\n {encryptionType === \"aws\" && (\n \n \n ) => {\n updateField(\"awsEndpoint\", e.target.value);\n cleanValidation(\"aws_endpoint\");\n }}\n label=\"Endpoint\"\n value={awsEndpoint}\n error={validationErrors[\"aws_endpoint\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"awsRegion\", e.target.value);\n cleanValidation(\"aws_region\");\n }}\n label=\"Region\"\n value={awsRegion}\n error={validationErrors[\"aws_region\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"awsKMSKey\", e.target.value);\n }}\n label=\"KMS Key\"\n value={awsKMSKey}\n />\n \n \n
\n \n Credentials\n \n \n ) => {\n updateField(\"awsAccessKey\", e.target.value);\n cleanValidation(\"aws_accessKey\");\n }}\n label=\"Access Key\"\n value={awsAccessKey}\n error={validationErrors[\"aws_accessKey\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"awsSecretKey\", e.target.value);\n cleanValidation(\"aws_secretKey\");\n }}\n label=\"Secret Key\"\n value={awsSecretKey}\n error={validationErrors[\"aws_secretKey\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"awsToken\", e.target.value);\n }}\n label=\"Token\"\n value={awsToken}\n />\n \n
\n
\n
\n )}\n {encryptionType === \"gemalto\" && (\n \n \n ) => {\n updateField(\"gemaltoEndpoint\", e.target.value);\n cleanValidation(\"gemalto_endpoint\");\n }}\n label=\"Endpoint\"\n value={gemaltoEndpoint}\n error={validationErrors[\"gemalto_endpoint\"] || \"\"}\n required\n />\n \n \n
\n \n Credentials\n \n \n ) => {\n updateField(\"gemaltoToken\", e.target.value);\n cleanValidation(\"gemalto_token\");\n }}\n label=\"Token\"\n value={gemaltoToken}\n error={validationErrors[\"gemalto_token\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"gemaltoDomain\", e.target.value);\n cleanValidation(\"gemalto_domain\");\n }}\n label=\"Domain\"\n value={gemaltoDomain}\n error={validationErrors[\"gemalto_domain\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"gemaltoRetry\", e.target.value);\n cleanValidation(\"gemalto_retry\");\n }}\n label=\"Retry (seconds)\"\n value={gemaltoRetry}\n error={validationErrors[\"gemalto_retry\"] || \"\"}\n />\n \n
\n \n \n
\n \n Custom CA Root certificate verification\n \n\n {\n addFileGemaltoCa(fileName, encodedValue);\n cleanValidation(\"gemalto_ca\");\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"gemalto_ca\"\n name=\"gemalto_ca\"\n label=\"CA\"\n value={gemaltoCA.cert}\n />\n
\n \n
\n )}\n
\n

Additional Configurations

\n
\n \n \n ) => {\n updateField(\"replicas\", e.target.value);\n cleanValidation(\"replicas\");\n }}\n label=\"Replicas\"\n value={replicas}\n required\n error={validationErrors[\"replicas\"] || \"\"}\n />\n \n\n
\n \n SecurityContext for KES pods\n \n \n \n \n ) => {\n updateField(\"kesSecurityContext\", {\n ...kesSecurityContext,\n runAsUser: e.target.value,\n });\n cleanValidation(\"kes_securityContext_runAsUser\");\n }}\n label=\"Run As User\"\n value={kesSecurityContext.runAsUser}\n required\n error={\n validationErrors[\"kes_securityContext_runAsUser\"] || \"\"\n }\n min=\"0\"\n />\n \n \n ) => {\n updateField(\"kesSecurityContext\", {\n ...kesSecurityContext,\n runAsGroup: e.target.value,\n });\n cleanValidation(\"kes_securityContext_runAsGroup\");\n }}\n label=\"Run As Group\"\n value={kesSecurityContext.runAsGroup}\n required\n error={\n validationErrors[\"kes_securityContext_runAsGroup\"] || \"\"\n }\n min=\"0\"\n />\n \n \n ) => {\n updateField(\"kesSecurityContext\", {\n ...kesSecurityContext,\n fsGroup: e.target.value,\n });\n cleanValidation(\"kes_securityContext_fsGroup\");\n }}\n label=\"FsGroup\"\n value={kesSecurityContext.fsGroup}\n required\n error={\n validationErrors[\"kes_securityContext_fsGroup\"] || \"\"\n }\n min=\"0\"\n />\n \n \n \n
\n \n
\n {\n const targetD = e.target;\n const checked = targetD.checked;\n updateField(\"kesSecurityContext\", {\n ...kesSecurityContext,\n runAsNonRoot: checked,\n });\n }}\n label={\"Do not run as Root\"}\n />\n
\n
\n
\n
\n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n replicas: state.tenants.createTenant.fields.encryption.replicas,\n enableEncryption:\n state.tenants.createTenant.fields.encryption.enableEncryption,\n encryptionType: state.tenants.createTenant.fields.encryption.encryptionType,\n gemaltoEndpoint: state.tenants.createTenant.fields.encryption.gemaltoEndpoint,\n gemaltoToken: state.tenants.createTenant.fields.encryption.gemaltoToken,\n gemaltoDomain: state.tenants.createTenant.fields.encryption.gemaltoDomain,\n gemaltoRetry: state.tenants.createTenant.fields.encryption.gemaltoRetry,\n awsEndpoint: state.tenants.createTenant.fields.encryption.awsEndpoint,\n awsRegion: state.tenants.createTenant.fields.encryption.awsRegion,\n awsKMSKey: state.tenants.createTenant.fields.encryption.awsKMSKey,\n awsAccessKey: state.tenants.createTenant.fields.encryption.awsAccessKey,\n awsSecretKey: state.tenants.createTenant.fields.encryption.awsSecretKey,\n awsToken: state.tenants.createTenant.fields.encryption.awsToken,\n vaultEndpoint: state.tenants.createTenant.fields.encryption.vaultEndpoint,\n vaultEngine: state.tenants.createTenant.fields.encryption.vaultEngine,\n vaultNamespace: state.tenants.createTenant.fields.encryption.vaultNamespace,\n vaultPrefix: state.tenants.createTenant.fields.encryption.vaultPrefix,\n vaultAppRoleEngine:\n state.tenants.createTenant.fields.encryption.vaultAppRoleEngine,\n vaultId: state.tenants.createTenant.fields.encryption.vaultId,\n vaultSecret: state.tenants.createTenant.fields.encryption.vaultSecret,\n vaultRetry: state.tenants.createTenant.fields.encryption.vaultRetry,\n vaultPing: state.tenants.createTenant.fields.encryption.vaultPing,\n azureEndpoint: state.tenants.createTenant.fields.encryption.azureEndpoint,\n azureTenantID: state.tenants.createTenant.fields.encryption.azureTenantID,\n azureClientID: state.tenants.createTenant.fields.encryption.azureClientID,\n azureClientSecret:\n state.tenants.createTenant.fields.encryption.azureClientSecret,\n gcpProjectID: state.tenants.createTenant.fields.encryption.gcpProjectID,\n gcpEndpoint: state.tenants.createTenant.fields.encryption.gcpEndpoint,\n gcpClientEmail: state.tenants.createTenant.fields.encryption.gcpClientEmail,\n gcpClientID: state.tenants.createTenant.fields.encryption.gcpClientID,\n gcpPrivateKeyID: state.tenants.createTenant.fields.encryption.gcpPrivateKeyID,\n gcpPrivateKey: state.tenants.createTenant.fields.encryption.gcpPrivateKey,\n enableCustomCertsForKES:\n state.tenants.createTenant.fields.encryption.enableCustomCertsForKES,\n enableAutoCert: state.tenants.createTenant.fields.security.enableAutoCert,\n enableTLS: state.tenants.createTenant.fields.security.enableTLS,\n minioCertificates: state.tenants.createTenant.certificates.minioCertificates,\n serverCertificate: state.tenants.createTenant.certificates.serverCertificate,\n clientCertificate: state.tenants.createTenant.certificates.clientCertificate,\n vaultCertificate: state.tenants.createTenant.certificates.vaultCertificate,\n vaultCA: state.tenants.createTenant.certificates.vaultCA,\n gemaltoCA: state.tenants.createTenant.certificates.gemaltoCA,\n enableCustomCerts:\n state.tenants.createTenant.fields.security.enableCustomCerts,\n kesSecurityContext:\n state.tenants.createTenant.fields.encryption.kesSecurityContext,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n addFileServerCert,\n addFileClientCert,\n addFileVaultCert,\n addFileVaultCa,\n addFileGemaltoCa,\n});\n\nexport default withStyles(styles)(connector(Encryption));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Grid, IconButton, Paper, SelectChangeEvent } from \"@mui/material\";\nimport { AppState } from \"../../../../../store\";\nimport { isPageValid, updateAddField } from \"../../actions\";\nimport { setModalErrorSnackMessage } from \"../../../../../actions\";\nimport {\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport {\n commonFormValidation,\n IValidation,\n} from \"../../../../../utils/validationFunctions\";\nimport { ErrorResponseHandler } from \"../../../../../common/types\";\nimport RadioGroupSelector from \"../../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport api from \"../../../../../common/api\";\nimport InputBoxWrapper from \"../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport AddIcon from \"../../../../../icons/AddIcon\";\nimport RemoveIcon from \"../../../../../icons/RemoveIcon\";\nimport SelectWrapper from \"../../../Common/FormComponents/SelectWrapper/SelectWrapper\";\n\ninterface IAffinityProps {\n classes: any;\n podAffinity: string;\n nodeSelectorLabels: string;\n withPodAntiAffinity: boolean;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n overlayAction: {\n marginLeft: 10,\n \"& svg\": {\n maxWidth: 15,\n maxHeight: 15,\n },\n \"& button\": {\n background: \"#EAEAEA\",\n },\n },\n affinityConfigField: {\n display: \"flex\",\n },\n affinityFieldLabel: {\n display: \"flex\",\n flexFlow: \"column\",\n flex: 1,\n },\n radioField: {\n display: \"flex\",\n alignItems: \"flex-start\",\n marginTop: 10,\n \"& div:first-child\": {\n display: \"flex\",\n flexFlow: \"column\",\n alignItems: \"baseline\",\n textAlign: \"left !important\",\n },\n },\n affinityLabelKey: {\n \"& div:first-child\": {\n marginBottom: 0,\n },\n },\n affinityLabelValue: {\n marginLeft: 10,\n \"& div:first-child\": {\n marginBottom: 0,\n },\n },\n rowActions: {\n display: \"flex\",\n alignItems: \"center\",\n },\n fieldContainer: {\n marginBottom: 0,\n },\n affinityRow: {\n marginBottom: 10,\n display: \"flex\",\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\ninterface LabelKeyPair {\n key: string;\n value: string;\n}\n\ninterface OptionPair {\n label: string;\n value: string;\n}\n\nconst Affinity = ({\n classes,\n podAffinity,\n nodeSelectorLabels,\n withPodAntiAffinity,\n setModalErrorSnackMessage,\n updateAddField,\n isPageValid,\n}: IAffinityProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n const [loading, setLoading] = useState(true);\n const [keyValueMap, setKeyValueMap] = useState<{ [key: string]: string[] }>(\n {}\n );\n const [keyValuePairs, setKeyValuePairs] = useState([\n { key: \"\", value: \"\" },\n ]);\n\n const [keyOptions, setKeyOptions] = useState([]);\n\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"affinity\", field, value);\n },\n [updateAddField]\n );\n\n useEffect(() => {\n if (loading) {\n api\n .invoke(\"GET\", `/api/v1/nodes/labels`)\n .then((res: { [key: string]: string[] }) => {\n setLoading(false);\n setKeyValueMap(res);\n let keys: OptionPair[] = [];\n for (let k in res) {\n keys.push({\n label: k,\n value: k,\n });\n }\n setKeyOptions(keys);\n setKeyValuePairs([{ key: keys[0].value, value: keys[0].value }]);\n })\n .catch((err: ErrorResponseHandler) => {\n setLoading(false);\n setModalErrorSnackMessage(err);\n setKeyValueMap({});\n });\n }\n }, [setModalErrorSnackMessage, loading]);\n\n useEffect(() => {\n if (keyValuePairs) {\n const vlr = keyValuePairs\n .filter((kvp) => kvp.key !== \"\")\n .map((kvp) => `${kvp.key}=${kvp.value}`)\n .filter((kvs, i, a) => a.indexOf(kvs) === i);\n const vl = vlr.join(\"&\");\n updateField(\"nodeSelectorLabels\", vl);\n }\n }, [keyValuePairs, updateField]);\n\n // Validation\n useEffect(() => {\n let customAccountValidation: IValidation[] = [];\n\n if (podAffinity === \"nodeSelector\") {\n let valid = true;\n\n const splittedLabels = nodeSelectorLabels.split(\"&\");\n\n if (splittedLabels.length === 1 && splittedLabels[0] === \"\") {\n valid = false;\n }\n\n splittedLabels.forEach((item: string, index: number) => {\n const splitItem = item.split(\"=\");\n\n if (splitItem.length !== 2) {\n valid = false;\n }\n\n if (index + 1 !== splittedLabels.length) {\n if (splitItem[0] === \"\" || splitItem[1] === \"\") {\n valid = false;\n }\n }\n });\n\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"labels\",\n required: true,\n value: nodeSelectorLabels,\n customValidation: !valid,\n customValidationMessage:\n \"You need to add at least one label key-pair\",\n },\n ];\n }\n\n const commonVal = commonFormValidation(customAccountValidation);\n\n isPageValid(\"affinity\", Object.keys(commonVal).length === 0);\n\n setValidationErrors(commonVal);\n }, [isPageValid, podAffinity, nodeSelectorLabels]);\n\n return (\n \n
\n

Pod Placement

\n \n Configure how pods will be assigned to nodes\n \n
\n \n \n
Type
\n \n MinIO supports multiple configurations for Pod Affinity\n \n \n {\n updateField(\"podAffinity\", e.target.value);\n }}\n selectorOptions={[\n { label: \"None\", value: \"none\" },\n { label: \"Default (Pod Anti-Affinnity)\", value: \"default\" },\n { label: \"Node Selector\", value: \"nodeSelector\" },\n ]}\n />\n \n
\n
\n {podAffinity === \"nodeSelector\" && (\n \n
\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"withPodAntiAffinity\", checked);\n }}\n label={\"With Pod Anti-Affinity\"}\n />\n \n \n

Labels

\n {validationErrors[\"labels\"]}\n \n {keyValuePairs &&\n keyValuePairs.map((kvp, i) => {\n return (\n \n \n {keyOptions.length > 0 && (\n ) => {\n const newKey = e.target.value as string;\n const arrCp: LabelKeyPair[] = Object.assign(\n [],\n keyValuePairs\n );\n\n arrCp[i].key = e.target.value as string;\n arrCp[i].value = keyValueMap[newKey][0];\n setKeyValuePairs(arrCp);\n }}\n id=\"select-access-policy\"\n name=\"select-access-policy\"\n label={\"\"}\n value={kvp.key}\n options={keyOptions}\n classes={classes.fieldContainer}\n />\n )}\n {keyOptions.length === 0 && (\n {\n const arrCp: LabelKeyPair[] = Object.assign(\n [],\n keyValuePairs\n );\n arrCp[i].key = e.target.value;\n setKeyValuePairs(arrCp);\n }}\n index={i}\n placeholder={\"Key\"}\n classes={classes.fieldContainer}\n />\n )}\n \n \n {keyOptions.length > 0 && (\n ) => {\n const arrCp: LabelKeyPair[] = Object.assign(\n [],\n keyValuePairs\n );\n arrCp[i].value = e.target.value as string;\n setKeyValuePairs(arrCp);\n }}\n id=\"select-access-policy\"\n name=\"select-access-policy\"\n label={\"\"}\n value={kvp.value}\n options={\n keyValueMap[kvp.key]\n ? keyValueMap[kvp.key].map((v) => {\n return { label: v, value: v };\n })\n : []\n }\n classes={classes.fieldContainer}\n />\n )}\n {keyOptions.length === 0 && (\n {\n const arrCp: LabelKeyPair[] = Object.assign(\n [],\n keyValuePairs\n );\n arrCp[i].value = e.target.value;\n setKeyValuePairs(arrCp);\n }}\n index={i}\n placeholder={\"value\"}\n classes={classes.fieldContainer}\n />\n )}\n \n \n
\n {\n const arrCp = Object.assign([], keyValuePairs);\n if (keyOptions.length > 0) {\n arrCp.push({\n key: keyOptions[0].value,\n value: keyValueMap[keyOptions[0].value][0],\n });\n } else {\n arrCp.push({ key: \"\", value: \"\" });\n }\n\n setKeyValuePairs(arrCp);\n }}\n >\n \n \n
\n {keyValuePairs.length > 1 && (\n
\n {\n const arrCp = keyValuePairs.filter(\n (item, index) => index !== i\n );\n setKeyValuePairs(arrCp);\n }}\n >\n \n \n
\n )}\n
\n
\n );\n })}\n
\n
\n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n podAffinity: state.tenants.createTenant.fields.affinity.podAffinity,\n nodeSelectorLabels:\n state.tenants.createTenant.fields.affinity.nodeSelectorLabels,\n withPodAntiAffinity:\n state.tenants.createTenant.fields.affinity.withPodAntiAffinity,\n});\n\nconst connector = connect(mapState, {\n setModalErrorSnackMessage,\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(Affinity));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Grid, Paper } from \"@mui/material\";\nimport {\n formFieldStyles,\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { isPageValid, updateAddField } from \"../../actions\";\nimport { AppState } from \"../../../../../store\";\nimport { clearValidationError } from \"../../utils\";\nimport {\n commonFormValidation,\n IValidation,\n} from \"../../../../../utils/validationFunctions\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport InputBoxWrapper from \"../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\n\ninterface IImagesProps {\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n storageClasses: any;\n classes: any;\n customImage: boolean;\n imageName: string;\n customDockerhub: boolean;\n imageRegistry: string;\n imageRegistryUsername: string;\n imageRegistryPassword: string;\n exposeMinIO: boolean;\n exposeConsole: boolean;\n prometheusCustom: boolean;\n tenantCustom: boolean;\n logSearchCustom: boolean;\n logSearchVolumeSize: string;\n logSearchSizeFactor: string;\n prometheusVolumeSize: string;\n prometheusSizeFactor: string;\n logSearchSelectedStorageClass: string;\n logSearchImage: string;\n kesImage: string;\n logSearchPostgresImage: string;\n logSearchPostgresInitImage: string;\n prometheusSelectedStorageClass: string;\n prometheusImage: string;\n prometheusSidecarImage: string;\n prometheusInitImage: string;\n selectedStorageClass: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...formFieldStyles,\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst Images = ({\n classes,\n storageClasses,\n customImage,\n imageName,\n customDockerhub,\n imageRegistry,\n imageRegistryUsername,\n imageRegistryPassword,\n exposeMinIO,\n exposeConsole,\n prometheusCustom,\n tenantCustom,\n logSearchCustom,\n logSearchVolumeSize,\n logSearchSizeFactor,\n logSearchImage,\n kesImage,\n logSearchPostgresImage,\n logSearchPostgresInitImage,\n prometheusVolumeSize,\n prometheusSizeFactor,\n logSearchSelectedStorageClass,\n prometheusSelectedStorageClass,\n prometheusImage,\n prometheusSidecarImage,\n prometheusInitImage,\n updateAddField,\n isPageValid,\n selectedStorageClass,\n}: IImagesProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"configure\", field, value);\n },\n [updateAddField]\n );\n\n // Validation\n useEffect(() => {\n let customAccountValidation: IValidation[] = [];\n\n if (prometheusCustom) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"prometheus_storage_class\",\n required: true,\n value: prometheusSelectedStorageClass,\n customValidation: prometheusSelectedStorageClass === \"\",\n customValidationMessage: \"Field cannot be empty\",\n },\n {\n fieldKey: \"prometheus_volume_size\",\n required: true,\n value: prometheusVolumeSize,\n customValidation:\n prometheusVolumeSize === \"\" || parseInt(prometheusVolumeSize) <= 0,\n customValidationMessage: `Volume size must be present and be greatter than 0`,\n },\n ];\n }\n if (logSearchCustom) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"log_search_storage_class\",\n required: true,\n value: logSearchSelectedStorageClass,\n customValidation: logSearchSelectedStorageClass === \"\",\n customValidationMessage: \"Field cannot be empty\",\n },\n {\n fieldKey: \"log_search_volume_size\",\n required: true,\n value: logSearchVolumeSize,\n customValidation:\n logSearchVolumeSize === \"\" || parseInt(logSearchVolumeSize) <= 0,\n customValidationMessage: `Volume size must be present and be greatter than 0`,\n },\n ];\n }\n\n if (customImage) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"image\",\n required: false,\n value: imageName,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage: \"Format must be of form: 'minio/minio:VERSION'\",\n },\n {\n fieldKey: \"logSearchImage\",\n required: false,\n value: logSearchImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'minio/logsearchapi:VERSION'\",\n },\n {\n fieldKey: \"kesImage\",\n required: false,\n value: kesImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage: \"Format must be of form: 'minio/kes:VERSION'\",\n },\n {\n fieldKey: \"logSearchPostgresImage\",\n required: false,\n value: logSearchPostgresImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'library/postgres:VERSION'\",\n },\n {\n fieldKey: \"logSearchPostgresInitImage\",\n required: false,\n value: logSearchPostgresInitImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'library/busybox:VERSION'\",\n },\n {\n fieldKey: \"prometheusImage\",\n required: false,\n value: prometheusImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'minio/prometheus:VERSION'\",\n },\n {\n fieldKey: \"prometheusSidecarImage\",\n required: false,\n value: prometheusSidecarImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'project/container:VERSION'\",\n },\n {\n fieldKey: \"prometheusInitImage\",\n required: false,\n value: prometheusInitImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'library/busybox:VERSION'\",\n },\n ];\n if (customDockerhub) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"registry\",\n required: true,\n value: imageRegistry,\n },\n {\n fieldKey: \"registryUsername\",\n required: true,\n value: imageRegistryUsername,\n },\n {\n fieldKey: \"registryPassword\",\n required: true,\n value: imageRegistryPassword,\n },\n ];\n }\n }\n\n const commonVal = commonFormValidation(customAccountValidation);\n\n isPageValid(\"configure\", Object.keys(commonVal).length === 0);\n\n setValidationErrors(commonVal);\n }, [\n customImage,\n imageName,\n logSearchImage,\n kesImage,\n logSearchPostgresImage,\n logSearchPostgresInitImage,\n prometheusImage,\n prometheusSidecarImage,\n prometheusInitImage,\n customDockerhub,\n imageRegistry,\n imageRegistryUsername,\n imageRegistryPassword,\n isPageValid,\n prometheusCustom,\n tenantCustom,\n logSearchCustom,\n prometheusSelectedStorageClass,\n prometheusVolumeSize,\n logSearchSelectedStorageClass,\n logSearchVolumeSize,\n ]);\n\n const cleanValidation = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n return (\n \n
\n

Container Images

\n \n Images used by the Tenant Deployment\n \n
\n\n \n \n ) => {\n updateField(\"imageName\", e.target.value);\n cleanValidation(\"image\");\n }}\n label=\"MinIO's Image\"\n value={imageName}\n error={validationErrors[\"image\"] || \"\"}\n placeholder=\"E.g. minio/minio:RELEASE.2022-01-08T03-11-54Z\"\n />\n \n \n ) => {\n updateField(\"logSearchImage\", e.target.value);\n cleanValidation(\"logSearchImage\");\n }}\n label=\"Log Search API's Image\"\n value={logSearchImage}\n error={validationErrors[\"logSearchImage\"] || \"\"}\n placeholder=\"E.g. minio/logsearchapi:v4.1.1\"\n />\n \n \n ) => {\n updateField(\"kesImage\", e.target.value);\n cleanValidation(\"kesImage\");\n }}\n label=\"KES Image\"\n value={kesImage}\n error={validationErrors[\"kesImage\"] || \"\"}\n placeholder=\"E.g. minio/kes:v0.14.0\"\n />\n \n \n ) => {\n updateField(\"logSearchPostgresImage\", e.target.value);\n cleanValidation(\"logSearchPostgresImage\");\n }}\n label=\"Log Search Postgres's Image\"\n value={logSearchPostgresImage}\n error={validationErrors[\"logSearchPostgresImage\"] || \"\"}\n placeholder=\"E.g. library/postgres:13\"\n />\n \n \n ) => {\n updateField(\"logSearchPostgresInitImage\", e.target.value);\n cleanValidation(\"logSearchPostgresInitImage\");\n }}\n label=\"Log Search Postgres's Init Image\"\n value={logSearchPostgresInitImage}\n error={validationErrors[\"logSearchPostgresInitImage\"] || \"\"}\n placeholder=\"E.g. library/busybox:1.33.1\"\n />\n \n \n ) => {\n updateField(\"prometheusImage\", e.target.value);\n cleanValidation(\"prometheusImage\");\n }}\n label=\"Prometheus Image\"\n value={prometheusImage}\n error={validationErrors[\"prometheusImage\"] || \"\"}\n placeholder=\"E.g. quay.io/prometheus/prometheus:latest\"\n />\n \n \n ) => {\n updateField(\"prometheusSidecarImage\", e.target.value);\n cleanValidation(\"prometheusSidecarImage\");\n }}\n label=\"Prometheus Sidecar Image\"\n value={prometheusSidecarImage}\n error={validationErrors[\"prometheusSidecarImage\"] || \"\"}\n placeholder=\"E.g. quay.io/prometheus/prometheus:latest\"\n />\n \n \n ) => {\n updateField(\"prometheusInitImage\", e.target.value);\n cleanValidation(\"prometheusInitImage\");\n }}\n label=\"Prometheus Init Image\"\n value={prometheusInitImage}\n error={validationErrors[\"prometheusInitImage\"] || \"\"}\n placeholder=\"E.g. quay.io/prometheus/prometheus:latest\"\n />\n \n \n\n {customImage && (\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"customDockerhub\", checked);\n }}\n label={\"Set/Update Image Registry\"}\n />\n \n \n )}\n {customDockerhub && (\n \n \n ) => {\n updateField(\"imageRegistry\", e.target.value);\n }}\n label=\"Endpoint\"\n value={imageRegistry}\n error={validationErrors[\"registry\"] || \"\"}\n placeholder=\"E.g. https://index.docker.io/v1/\"\n required\n />\n \n \n ) => {\n updateField(\"imageRegistryUsername\", e.target.value);\n }}\n label=\"Username\"\n value={imageRegistryUsername}\n error={validationErrors[\"registryUsername\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"imageRegistryPassword\", e.target.value);\n }}\n label=\"Password\"\n value={imageRegistryPassword}\n error={validationErrors[\"registryPassword\"] || \"\"}\n required\n />\n \n \n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n storageClasses: state.tenants.createTenant.storageClasses,\n customImage: state.tenants.createTenant.fields.configure.customImage,\n imageName: state.tenants.createTenant.fields.configure.imageName,\n customDockerhub: state.tenants.createTenant.fields.configure.customDockerhub,\n imageRegistry: state.tenants.createTenant.fields.configure.imageRegistry,\n imageRegistryUsername:\n state.tenants.createTenant.fields.configure.imageRegistryUsername,\n imageRegistryPassword:\n state.tenants.createTenant.fields.configure.imageRegistryPassword,\n exposeMinIO: state.tenants.createTenant.fields.configure.exposeMinIO,\n exposeConsole: state.tenants.createTenant.fields.configure.exposeConsole,\n prometheusCustom:\n state.tenants.createTenant.fields.configure.prometheusCustom,\n tenantCustom: state.tenants.createTenant.fields.configure.tenantCustom,\n logSearchCustom: state.tenants.createTenant.fields.configure.logSearchCustom,\n logSearchVolumeSize:\n state.tenants.createTenant.fields.configure.logSearchVolumeSize,\n logSearchSizeFactor:\n state.tenants.createTenant.fields.configure.logSearchSizeFactor,\n prometheusVolumeSize:\n state.tenants.createTenant.fields.configure.prometheusVolumeSize,\n prometheusSizeFactor:\n state.tenants.createTenant.fields.configure.prometheusSizeFactor,\n logSearchSelectedStorageClass:\n state.tenants.createTenant.fields.configure.logSearchSelectedStorageClass,\n logSearchImage: state.tenants.createTenant.fields.configure.logSearchImage,\n kesImage: state.tenants.createTenant.fields.configure.kesImage,\n logSearchPostgresImage:\n state.tenants.createTenant.fields.configure.logSearchPostgresImage,\n logSearchPostgresInitImage:\n state.tenants.createTenant.fields.configure.logSearchPostgresInitImage,\n prometheusSelectedStorageClass:\n state.tenants.createTenant.fields.configure.prometheusSelectedStorageClass,\n prometheusImage: state.tenants.createTenant.fields.configure.prometheusImage,\n prometheusSidecarImage:\n state.tenants.createTenant.fields.configure.prometheusSidecarImage,\n prometheusInitImage:\n state.tenants.createTenant.fields.configure.prometheusInitImage,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(Images));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { DialogContentText, LinearProgress } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n deleteDialogStyles,\n modalBasic,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { setErrorSnackMessage } from \"../../../../../../actions\";\nimport { ErrorResponseHandler } from \"../../../../../../common/types\";\nimport api from \"../../../../../../common/api\";\nimport ConfirmDialog from \"../../../../Common/ModalWrapper/ConfirmDialog\";\nimport { ConfirmModalIcon } from \"../../../../../../icons\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n wrapText: {\n maxWidth: \"200px\",\n whiteSpace: \"normal\",\n wordWrap: \"break-word\",\n },\n ...modalBasic,\n ...deleteDialogStyles,\n });\n\ninterface IAddNamespace {\n classes: any;\n namespace: string;\n addNamespaceOpen: boolean;\n closeAddNamespaceModalAndRefresh: (reloadNamespaceData: boolean) => void;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst AddNamespaceModal = ({\n classes,\n namespace,\n addNamespaceOpen,\n closeAddNamespaceModalAndRefresh,\n setErrorSnackMessage,\n}: IAddNamespace) => {\n const [addNamespaceLoading, setAddNamespaceLoading] =\n useState(false);\n\n useEffect(() => {\n if (addNamespaceLoading) {\n api\n .invoke(\"POST\", \"/api/v1/namespace\", {\n name: namespace,\n })\n .then((res) => {\n setAddNamespaceLoading(false);\n closeAddNamespaceModalAndRefresh(true);\n })\n .catch((err: ErrorResponseHandler) => {\n setAddNamespaceLoading(false);\n setErrorSnackMessage(err);\n });\n }\n }, [\n addNamespaceLoading,\n closeAddNamespaceModalAndRefresh,\n namespace,\n setErrorSnackMessage,\n ]);\n\n const addNamespace = () => {\n setAddNamespaceLoading(true);\n };\n\n return (\n }\n isLoading={addNamespaceLoading}\n onConfirm={addNamespace}\n onClose={() => {\n closeAddNamespaceModalAndRefresh(false);\n }}\n confirmationContent={\n \n {addNamespaceLoading && }\n \n Are you sure you want to add a namespace called\n
\n {namespace}?\n
\n
\n }\n />\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(AddNamespaceModal));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"../../../../../store\";\nimport { isPageValid, updateAddField } from \"../../actions\";\nimport {\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableRow from \"@mui/material/TableRow\";\nimport { niceBytes } from \"../../../../../common/utils\";\nimport { Opts } from \"../../ListTenants/utils\";\nimport { IResourcesSize } from \"../../ListTenants/types\";\nimport { IErasureCodeCalc } from \"../../../../../common/types\";\n\nimport { Divider } from \"@mui/material\";\nimport { IntegrationConfiguration } from \"./TenantResources/utils\";\n\ninterface ISizePreviewProps {\n classes: any;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n volumeSize: string;\n sizeFactor: string;\n drivesPerServer: string;\n nodes: string;\n memoryNode: string;\n ecParity: string;\n ecParityChoices: Opts[];\n cleanECChoices: string[];\n resourcesSize: IResourcesSize;\n distribution: any;\n ecParityCalc: IErasureCodeCalc;\n limitSize: any;\n selectedStorageClass: string;\n cpuToUse: string;\n integrationSelection: IntegrationConfiguration;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n root: {\n margin: 4,\n },\n table: {\n \"& .MuiTableCell-root\": {\n fontSize: 13,\n },\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst SizePreview = ({\n classes,\n updateAddField,\n isPageValid,\n volumeSize,\n sizeFactor,\n drivesPerServer,\n nodes,\n memoryNode,\n ecParity,\n ecParityChoices,\n cleanECChoices,\n resourcesSize,\n distribution,\n ecParityCalc,\n limitSize,\n selectedStorageClass,\n cpuToUse,\n integrationSelection,\n}: ISizePreviewProps) => {\n const usableInformation = ecParityCalc.storageFactors.find(\n (element) => element.erasureCode === ecParity\n );\n\n return (\n
\n

Resource Allocation

\n \n \n \n \n Number of Servers\n \n {parseInt(nodes) > 0 ? nodes : \"-\"}\n \n \n {integrationSelection.typeSelection === \"\" &&\n integrationSelection.storageClass === \"\" && (\n \n \n Drives per Server\n \n {distribution ? distribution.disks : \"-\"}\n \n \n \n Drive Capacity\n \n {distribution ? niceBytes(distribution.pvSize) : \"-\"}\n \n \n \n )}\n\n \n Total Volumes\n \n {distribution ? distribution.persistentVolumes : \"-\"}\n \n \n {integrationSelection.typeSelection === \"\" &&\n integrationSelection.storageClass === \"\" && (\n \n \n Memory per Node\n {memoryNode} Gi\n \n \n \n CPU Selection\n \n \n {cpuToUse}\n \n \n \n )}\n \n
\n {ecParityCalc.error === 0 && usableInformation && (\n \n

Erasure Code Configuration

\n \n \n \n \n EC Parity\n \n {ecParity !== \"\" ? ecParity : \"-\"}\n \n \n \n Raw Capacity\n \n {niceBytes(ecParityCalc.rawCapacity)}\n \n \n \n Usable Capacity\n \n {niceBytes(usableInformation.maxCapacity)}\n \n \n \n \n Server Failures Tolerated\n \n \n {distribution\n ? Math.floor(\n usableInformation.maxFailureTolerations /\n distribution.disks\n )\n : \"-\"}\n \n \n \n \n
\n )}\n {integrationSelection.typeSelection !== \"\" &&\n integrationSelection.storageClass !== \"\" && (\n \n

Single Instance Configuration

\n \n \n \n \n CPU\n \n {integrationSelection.CPU !== 0\n ? integrationSelection.CPU\n : \"-\"}\n \n \n \n Memory\n \n {integrationSelection.memory !== 0\n ? `${integrationSelection.memory} Gi`\n : \"-\"}\n \n \n \n Drives per Server\n \n {integrationSelection.drivesPerServer !== 0\n ? `${integrationSelection.drivesPerServer}`\n : \"-\"}\n \n \n \n \n Drive Size\n \n \n {integrationSelection.driveSize.driveSize}\n {integrationSelection.driveSize.sizeUnit}\n \n \n \n \n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n volumeSize: state.tenants.createTenant.fields.tenantSize.volumeSize,\n sizeFactor: state.tenants.createTenant.fields.tenantSize.sizeFactor,\n drivesPerServer: state.tenants.createTenant.fields.tenantSize.drivesPerServer,\n nodes: state.tenants.createTenant.fields.tenantSize.nodes,\n memoryNode: state.tenants.createTenant.fields.tenantSize.memoryNode,\n ecParity: state.tenants.createTenant.fields.tenantSize.ecParity,\n ecParityChoices: state.tenants.createTenant.fields.tenantSize.ecParityChoices,\n cleanECChoices: state.tenants.createTenant.fields.tenantSize.cleanECChoices,\n resourcesSize: state.tenants.createTenant.fields.tenantSize.resourcesSize,\n distribution: state.tenants.createTenant.fields.tenantSize.distribution,\n ecParityCalc: state.tenants.createTenant.fields.tenantSize.ecParityCalc,\n limitSize: state.tenants.createTenant.fields.tenantSize.limitSize,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n cpuToUse: state.tenants.createTenant.fields.tenantSize.cpuToUse,\n integrationSelection:\n state.tenants.createTenant.fields.tenantSize.integrationSelection,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(SizePreview));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport get from \"lodash/get\";\nimport { AppState } from \"../../../../../../store\";\nimport { isPageValid, updateAddField } from \"../../../actions\";\nimport {\n formFieldStyles,\n modalBasic,\n wizardCommon,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport Grid from \"@mui/material/Grid\";\nimport { IResourcesSize } from \"../../../ListTenants/types\";\nimport { AllocableResourcesResponse } from \"../../../types\";\nimport api from \"../../../../../../common/api\";\nimport InputBoxWrapper from \"../../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport { floor } from \"lodash\";\n\ninterface ITenantSizeResourcesProps {\n classes: any;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n nodes: string;\n resourcesSize: IResourcesSize;\n selectedStorageClass: string;\n maxAllocatableResources: AllocableResourcesResponse;\n maxCPUsUse: string;\n maxMemorySize: string;\n\n resourcesSpecifyLimit: boolean;\n resourcesCPURequestError: string;\n resourcesCPURequest: string;\n resourcesCPULimitError: string;\n resourcesCPULimit: string;\n resourcesMemoryRequestError: string;\n resourcesMemoryRequest: string;\n resourcesMemoryLimitError: string;\n resourcesMemoryLimit: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n compositeFieldContainer: {\n display: \"flex\",\n alignItems: \"center\",\n },\n compositeAddOn: {\n marginLeft: 10,\n \"& div\": {\n marginBottom: 0,\n },\n \"@media (max-width: 900px)\": {\n \"& div\": {\n marginTop: 5,\n },\n },\n },\n ...formFieldStyles,\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst TenantSizeResources = ({\n classes,\n updateAddField,\n isPageValid,\n nodes,\n\n resourcesSize,\n selectedStorageClass,\n maxAllocatableResources,\n maxCPUsUse,\n maxMemorySize,\n resourcesSpecifyLimit,\n resourcesCPURequestError,\n resourcesCPURequest,\n resourcesCPULimitError,\n resourcesCPULimit,\n resourcesMemoryRequestError,\n resourcesMemoryRequest,\n resourcesMemoryLimitError,\n resourcesMemoryLimit,\n}: ITenantSizeResourcesProps) => {\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"tenantSize\", field, value);\n },\n [updateAddField]\n );\n\n /*Debounce functions*/\n\n useEffect(() => {\n isPageValid(\n \"tenantSize\",\n resourcesMemoryRequestError === \"\" &&\n resourcesMemoryLimitError === \"\" &&\n resourcesCPURequestError === \"\" &&\n resourcesCPULimitError === \"\"\n );\n }, [\n isPageValid,\n resourcesMemoryRequestError,\n resourcesMemoryLimitError,\n resourcesCPURequestError,\n resourcesCPULimitError,\n ]);\n\n /*End debounce functions*/\n\n /*Calculate Allocation*/\n useEffect(() => {\n // Get allocatable Resources\n api\n .invoke(\"GET\", `api/v1/cluster/allocatable-resources?num_nodes=${nodes}`)\n .then((res: AllocableResourcesResponse) => {\n updateField(\"maxAllocatableResources\", res);\n\n const maxAllocatableResources = res;\n\n const memoryExists = get(\n maxAllocatableResources,\n \"min_allocatable_mem\",\n false\n );\n\n const cpuExists = get(\n maxAllocatableResources,\n \"min_allocatable_cpu\",\n false\n );\n\n if (memoryExists === false || cpuExists === false) {\n updateField(\"cpuToUse\", 0);\n\n updateField(\"maxMemorySize\", \"\");\n updateField(\"maxCPUsUse\", \"\");\n\n return;\n }\n\n const maxMemory = floor(\n res.mem_priority.max_allocatable_mem / 1024 / 1024 / 1024\n );\n // We default to Best CPU Configuration\n updateField(\"maxMemorySize\", maxMemory.toString());\n updateField(\n \"maxCPUsUse\",\n res.cpu_priority.max_allocatable_cpu.toString()\n );\n\n const maxAllocatableCPU = get(\n maxAllocatableResources,\n \"cpu_priority.max_allocatable_cpu\",\n 0\n );\n\n const baseCpuUse = Math.max(1, floor(maxAllocatableCPU / 2));\n updateField(\"resourcesCPURequest\", baseCpuUse);\n\n const baseMemoryUse = Math.max(2, floor(maxMemory / 2));\n updateField(\"resourcesMemoryRequest\", baseMemoryUse);\n })\n .catch((err: any) => {\n updateField(\"maxMemorySize\", 0);\n updateField(\"resourcesCPURequest\", \"\");\n\n console.error(err);\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [nodes, updateField]);\n\n /*Calculate Allocation End*/\n\n return (\n \n \n
\n

Resources

\n \n You may specify the amount of CPU and Memory that MinIO servers\n should reserve on each node.\n \n
\n
\n {resourcesSize.error !== \"\" && (\n \n
{resourcesSize.error}
\n
\n )}\n\n \n {\n let value = parseInt(e.target.value);\n if (e.target.value === \"\") {\n updateField(\"resourcesCPURequestError\", \"\");\n } else if (isNaN(value)) {\n updateField(\"resourcesCPURequestError\", \"Invalid number\");\n } else if (value > parseInt(maxCPUsUse)) {\n updateField(\n \"resourcesCPURequestError\",\n `Request exceeds available cores (${maxCPUsUse})`\n );\n } else if (e.target.validity.valid) {\n updateField(\"resourcesCPURequestError\", \"\");\n } else {\n updateField(\"resourcesCPURequestError\", \"Invalid configuration\");\n }\n updateField(\"resourcesCPURequest\", e.target.value);\n }}\n value={resourcesCPURequest}\n disabled={selectedStorageClass === \"\"}\n max={maxCPUsUse}\n error={resourcesCPURequestError}\n pattern={\"[0-9]*\"}\n />\n \n\n \n ) => {\n let value = parseInt(e.target.value);\n if (e.target.value === \"\") {\n updateField(\"resourcesMemoryRequestError\", \"\");\n } else if (isNaN(value)) {\n updateField(\"resourcesMemoryRequestError\", \"Invalid number\");\n } else if (value > parseInt(maxMemorySize)) {\n updateField(\n \"resourcesMemoryRequestError\",\n `Request exceeds available memory across ${nodes} nodes (${maxMemorySize}Gi)`\n );\n } else if (value < 2) {\n updateField(\n \"resourcesMemoryRequestError\",\n \"At least 2Gi must be requested\"\n );\n } else if (e.target.validity.valid) {\n updateField(\"resourcesMemoryRequestError\", \"\");\n } else {\n updateField(\n \"resourcesMemoryRequestError\",\n \"Invalid configuration\"\n );\n }\n updateField(\"resourcesMemoryRequest\", e.target.value);\n }}\n label=\"Memory Request [Gi]\"\n value={resourcesMemoryRequest}\n disabled={selectedStorageClass === \"\"}\n error={resourcesMemoryRequestError}\n pattern={\"[0-9]*\"}\n />\n \n\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"resourcesSpecifyLimit\", checked);\n }}\n label={\"Specify Limit\"}\n />\n \n\n {resourcesSpecifyLimit && (\n \n \n {\n let value = parseInt(e.target.value);\n if (e.target.value === \"\") {\n updateField(\"resourcesCPULimitError\", \"\");\n } else if (isNaN(value)) {\n updateField(\"resourcesCPULimitError\", \"Invalid number\");\n } else if (e.target.validity.valid) {\n updateField(\"resourcesCPULimitError\", \"\");\n } else {\n updateField(\n \"resourcesCPULimitError\",\n \"Invalid configuration\"\n );\n }\n updateField(\"resourcesCPULimit\", e.target.value);\n }}\n value={resourcesCPULimit}\n disabled={selectedStorageClass === \"\"}\n max={maxCPUsUse}\n error={resourcesCPULimitError}\n pattern={\"[0-9]*\"}\n />\n \n\n \n ) => {\n let value = parseInt(e.target.value);\n console.log(\"value\", value);\n if (e.target.value === \"\") {\n updateField(\"resourcesMemoryLimitError\", \"\");\n } else if (isNaN(value)) {\n updateField(\"resourcesMemoryLimitError\", \"Invalid number\");\n } else if (e.target.validity.valid) {\n updateField(\"resourcesMemoryLimitError\", \"\");\n } else {\n updateField(\n \"resourcesMemoryLimitError\",\n \"Invalid configuration\"\n );\n }\n updateField(\"resourcesMemoryLimit\", e.target.value);\n }}\n label=\"Memory Limit [Gi]\"\n value={resourcesMemoryLimit}\n disabled={selectedStorageClass === \"\"}\n error={resourcesMemoryLimitError}\n pattern={\"[0-9]*\"}\n />\n \n \n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n nodes: state.tenants.createTenant.fields.tenantSize.nodes,\n\n resourcesSize: state.tenants.createTenant.fields.tenantSize.resourcesSize,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n maxAllocatableResources:\n state.tenants.createTenant.fields.tenantSize.maxAllocatableResources,\n maxCPUsUse: state.tenants.createTenant.fields.tenantSize.maxCPUsUse,\n maxMemorySize: state.tenants.createTenant.fields.tenantSize.maxMemorySize,\n\n resourcesSpecifyLimit:\n state.tenants.createTenant.fields.tenantSize.resourcesSpecifyLimit,\n\n resourcesCPURequestError:\n state.tenants.createTenant.fields.tenantSize.resourcesCPURequestError,\n resourcesCPURequest:\n state.tenants.createTenant.fields.tenantSize.resourcesCPURequest,\n resourcesCPULimitError:\n state.tenants.createTenant.fields.tenantSize.resourcesCPULimitError,\n resourcesCPULimit:\n state.tenants.createTenant.fields.tenantSize.resourcesCPULimit,\n\n resourcesMemoryRequestError:\n state.tenants.createTenant.fields.tenantSize.resourcesMemoryRequestError,\n resourcesMemoryRequest:\n state.tenants.createTenant.fields.tenantSize.resourcesMemoryRequest,\n resourcesMemoryLimitError:\n state.tenants.createTenant.fields.tenantSize.resourcesMemoryLimitError,\n resourcesMemoryLimit:\n state.tenants.createTenant.fields.tenantSize.resourcesMemoryLimit,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(TenantSizeResources));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport { SelectChangeEvent } from \"@mui/material\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"../../../../../../store\";\nimport { isPageValid, updateAddField } from \"../../../actions\";\nimport {\n formFieldStyles,\n modalBasic,\n wizardCommon,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport Grid from \"@mui/material/Grid\";\nimport {\n calculateDistribution,\n erasureCodeCalc,\n getBytes,\n k8sfactorForDropdown,\n niceBytes,\n} from \"../../../../../../common/utils\";\nimport { clearValidationError } from \"../../../utils\";\nimport { ecListTransform, Opts } from \"../../../ListTenants/utils\";\nimport { IResourcesSize } from \"../../../ListTenants/types\";\nimport { ICapacity, IErasureCodeCalc } from \"../../../../../../common/types\";\nimport { commonFormValidation } from \"../../../../../../utils/validationFunctions\";\nimport api from \"../../../../../../common/api\";\nimport InputBoxWrapper from \"../../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport TenantSizeResources from \"./TenantSizeResources\";\n\ninterface ITenantSizeProps {\n classes: any;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n volumeSize: string;\n sizeFactor: string;\n drivesPerServer: string;\n nodes: string;\n memoryNode: string;\n ecParity: string;\n ecParityChoices: Opts[];\n cleanECChoices: string[];\n resourcesSize: IResourcesSize;\n distribution: any;\n ecParityCalc: IErasureCodeCalc;\n limitSize: any;\n selectedStorageClass: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n compositeFieldContainer: {\n display: \"flex\",\n alignItems: \"center\",\n },\n compositeAddOn: {\n marginLeft: 10,\n \"& div\": {\n marginBottom: 0,\n },\n \"@media (max-width: 900px)\": {\n \"& div\": {\n marginTop: 5,\n },\n },\n },\n ...formFieldStyles,\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst TenantSize = ({\n classes,\n updateAddField,\n isPageValid,\n volumeSize,\n sizeFactor,\n drivesPerServer,\n nodes,\n memoryNode,\n ecParity,\n ecParityChoices,\n cleanECChoices,\n resourcesSize,\n distribution,\n ecParityCalc,\n limitSize,\n selectedStorageClass,\n}: ITenantSizeProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n const [errorFlag, setErrorFlag] = useState(false);\n const [nodeError, setNodeError] = useState(\"\");\n\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"tenantSize\", field, value);\n },\n [updateAddField]\n );\n\n const cleanValidation = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n /*Debounce functions*/\n\n // Storage Quotas\n\n useEffect(() => {\n if (ecParityChoices.length > 0 && distribution.error === \"\") {\n const ecCodeValidated = erasureCodeCalc(\n cleanECChoices,\n distribution.persistentVolumes,\n distribution.pvSize,\n distribution.nodes\n );\n\n updateField(\"ecParityCalc\", ecCodeValidated);\n if (!cleanECChoices.includes(ecParity) || ecParity === \"\") {\n updateField(\"ecParity\", ecCodeValidated.defaultEC);\n }\n }\n }, [\n ecParity,\n ecParityChoices.length,\n distribution,\n cleanECChoices,\n updateField,\n ]);\n /*End debounce functions*/\n\n /*Calculate Allocation*/\n useEffect(() => {\n //Validate Cluster Size\n const size = volumeSize;\n const factor = sizeFactor;\n const limitSize = getBytes(\"12\", \"Ti\", true);\n\n const clusterCapacity: ICapacity = {\n unit: factor,\n value: size.toString(),\n };\n\n const distrCalculate = calculateDistribution(\n clusterCapacity,\n parseInt(nodes),\n parseInt(limitSize),\n parseInt(drivesPerServer)\n );\n\n updateField(\"distribution\", distrCalculate);\n setErrorFlag(false);\n setNodeError(\"\");\n }, [nodes, volumeSize, sizeFactor, updateField, drivesPerServer]);\n\n /*Calculate Allocation End*/\n\n /* Validations of pages */\n\n useEffect(() => {\n const parsedSize = getBytes(volumeSize, sizeFactor, true);\n\n const commonValidation = commonFormValidation([\n {\n fieldKey: \"nodes\",\n required: true,\n value: nodes,\n customValidation: errorFlag,\n customValidationMessage: nodeError,\n },\n {\n fieldKey: \"volume_size\",\n required: true,\n value: volumeSize,\n customValidation:\n parseInt(parsedSize) < 1073741824 ||\n parseInt(parsedSize) > limitSize[selectedStorageClass],\n customValidationMessage: `Volume size must be greater than 1Gi and less than ${niceBytes(\n limitSize[selectedStorageClass],\n true\n )}`,\n },\n {\n fieldKey: \"drivesps\",\n required: true,\n value: drivesPerServer,\n customValidation: parseInt(drivesPerServer) < 1,\n customValidationMessage: \"There must be at least one drive\",\n },\n ]);\n\n isPageValid(\n \"tenantSize\",\n !(\"nodes\" in commonValidation) &&\n !(\"volume_size\" in commonValidation) &&\n !(\"drivesps\" in commonValidation) &&\n distribution.error === \"\" &&\n ecParityCalc.error === 0 &&\n ecParity !== \"\"\n );\n\n setValidationErrors(commonValidation);\n }, [\n nodes,\n volumeSize,\n sizeFactor,\n memoryNode,\n distribution,\n ecParityCalc,\n resourcesSize,\n limitSize,\n selectedStorageClass,\n isPageValid,\n errorFlag,\n nodeError,\n drivesPerServer,\n ecParity,\n ]);\n\n useEffect(() => {\n if (distribution.error === \"\") {\n // Get EC Value\n if (nodes.trim() !== \"\" && distribution.disks !== 0) {\n api\n .invoke(\"GET\", `api/v1/get-parity/${nodes}/${distribution.disks}`)\n .then((ecList: string[]) => {\n updateField(\"ecParityChoices\", ecListTransform(ecList));\n updateField(\"cleanECChoices\", ecList);\n })\n .catch((err: any) => {\n updateField(\"ecparityChoices\", []);\n isPageValid(\"tenantSize\", false);\n updateField(\"ecParity\", \"\");\n });\n }\n }\n }, [distribution, isPageValid, updateField, nodes]);\n\n /* End Validation of pages */\n\n return (\n \n \n
\n

Capacity

\n \n Please select the desired capacity\n \n
\n
\n {distribution.error !== \"\" && (\n \n
{distribution.error}
\n
\n )}\n \n ) => {\n if (e.target.validity.valid) {\n updateField(\"nodes\", e.target.value);\n cleanValidation(\"nodes\");\n }\n }}\n label=\"Number of Servers\"\n disabled={selectedStorageClass === \"\"}\n value={nodes}\n min=\"4\"\n required\n error={validationErrors[\"nodes\"] || \"\"}\n pattern={\"[0-9]*\"}\n />\n \n \n ) => {\n if (e.target.validity.valid) {\n updateField(\"drivesPerServer\", e.target.value);\n cleanValidation(\"drivesps\");\n }\n }}\n label=\"Drives per Server\"\n value={drivesPerServer}\n disabled={selectedStorageClass === \"\"}\n min=\"1\"\n required\n error={validationErrors[\"drivesps\"] || \"\"}\n pattern={\"[0-9]*\"}\n />\n \n \n
\n
\n
\n ) => {\n updateField(\"volumeSize\", e.target.value);\n cleanValidation(\"volume_size\");\n }}\n label=\"Total Size\"\n value={volumeSize}\n disabled={selectedStorageClass === \"\"}\n required\n error={validationErrors[\"volume_size\"] || \"\"}\n min=\"0\"\n />\n
\n ) => {\n updateField(\"sizeFactor\", e.target.value as string);\n }}\n options={k8sfactorForDropdown()}\n />\n
\n
\n
\n
\n
\n\n \n ) => {\n updateField(\"ecParity\", e.target.value as string);\n }}\n label=\"Erasure Code Parity\"\n disabled={selectedStorageClass === \"\"}\n value={ecParity}\n options={ecParityChoices}\n />\n \n Please select the desired parity. This setting will change the max\n usable capacity in the cluster\n \n \n\n \n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n volumeSize: state.tenants.createTenant.fields.tenantSize.volumeSize,\n sizeFactor: state.tenants.createTenant.fields.tenantSize.sizeFactor,\n drivesPerServer: state.tenants.createTenant.fields.tenantSize.drivesPerServer,\n nodes: state.tenants.createTenant.fields.tenantSize.nodes,\n memoryNode: state.tenants.createTenant.fields.tenantSize.memoryNode,\n ecParity: state.tenants.createTenant.fields.tenantSize.ecParity,\n ecParityChoices: state.tenants.createTenant.fields.tenantSize.ecParityChoices,\n cleanECChoices: state.tenants.createTenant.fields.tenantSize.cleanECChoices,\n\n resourcesSize: state.tenants.createTenant.fields.tenantSize.resourcesSize,\n distribution: state.tenants.createTenant.fields.tenantSize.distribution,\n ecParityCalc: state.tenants.createTenant.fields.tenantSize.ecParityCalc,\n limitSize: state.tenants.createTenant.limitSize,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(TenantSize));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport { SelectChangeEvent } from \"@mui/material\";\nimport get from \"lodash/get\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"../../../../../../store\";\nimport { isPageValid, updateAddField } from \"../../../actions\";\nimport {\n formFieldStyles,\n modalBasic,\n wizardCommon,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport Grid from \"@mui/material/Grid\";\nimport { erasureCodeCalc, getBytes } from \"../../../../../../common/utils\";\nimport { clearValidationError } from \"../../../utils\";\nimport { ecListTransform, Opts } from \"../../../ListTenants/utils\";\nimport { IResourcesSize } from \"../../../ListTenants/types\";\nimport {\n IErasureCodeCalc,\n IStorageDistribution,\n} from \"../../../../../../common/types\";\nimport { commonFormValidation } from \"../../../../../../utils/validationFunctions\";\nimport api from \"../../../../../../common/api\";\nimport InputBoxWrapper from \"../../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport {\n IMkEnvs,\n IntegrationConfiguration,\n mkPanelConfigurations,\n} from \"./utils\";\n\ninterface ITenantSizeAWSProps {\n classes: any;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n volumeSize: string;\n sizeFactor: string;\n drivesPerServer: string;\n nodes: string;\n memoryNode: string;\n ecParity: string;\n ecParityChoices: Opts[];\n cleanECChoices: string[];\n resourcesSize: IResourcesSize;\n distribution: any;\n ecParityCalc: IErasureCodeCalc;\n limitSize: any;\n selectedStorageType: string;\n cpuToUse: string;\n maxCPUsUse: string;\n formToRender?: IMkEnvs;\n integrationSelection: IntegrationConfiguration;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n compositeFieldContainer: {\n display: \"flex\",\n alignItems: \"center\",\n },\n compositeAddOn: {\n marginLeft: 10,\n \"& div\": {\n marginBottom: 0,\n },\n \"@media (max-width: 900px)\": {\n \"& div\": {\n marginTop: 5,\n },\n },\n },\n ...formFieldStyles,\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst TenantSizeMK = ({\n classes,\n updateAddField,\n isPageValid,\n volumeSize,\n sizeFactor,\n drivesPerServer,\n nodes,\n memoryNode,\n ecParity,\n ecParityChoices,\n cleanECChoices,\n resourcesSize,\n distribution,\n ecParityCalc,\n limitSize,\n cpuToUse,\n selectedStorageType,\n maxCPUsUse,\n formToRender,\n integrationSelection,\n}: ITenantSizeAWSProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"tenantSize\", field, value);\n },\n [updateAddField]\n );\n\n const updateMainField = useCallback(\n (field: string, value: string) => {\n updateAddField(\"nameTenant\", field, value);\n },\n [updateAddField]\n );\n\n const cleanValidation = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n /*Debounce functions*/\n\n // Storage Quotas\n useEffect(() => {\n if (ecParityChoices.length > 0 && distribution.error === \"\") {\n const ecCodeValidated = erasureCodeCalc(\n cleanECChoices,\n distribution.persistentVolumes,\n distribution.pvSize,\n distribution.nodes\n );\n\n updateField(\"ecParityCalc\", ecCodeValidated);\n\n if (!cleanECChoices.includes(ecParity) || ecParity === \"\") {\n updateField(\"ecParity\", ecCodeValidated.defaultEC);\n }\n }\n }, [ecParity, ecParityChoices, distribution, cleanECChoices, updateField]);\n /*End debounce functions*/\n\n /*Set location Storage Types*/\n useEffect(() => {\n if (formToRender !== undefined && parseInt(nodes) >= 4) {\n const setConfigs = mkPanelConfigurations[formToRender];\n const keyCount = Object.keys(setConfigs).length;\n\n //Configuration is filled\n if (keyCount > 0) {\n const configs: IntegrationConfiguration[] = get(\n setConfigs,\n \"configurations\",\n []\n );\n\n const mainSelection = configs.find(\n (item) => item.typeSelection === selectedStorageType\n );\n\n if (mainSelection) {\n updateField(\"integrationSelection\", mainSelection);\n updateMainField(\"selectedStorageClass\", mainSelection.storageClass);\n\n let pvSize = parseInt(\n getBytes(\n mainSelection.driveSize.driveSize,\n mainSelection.driveSize.sizeUnit,\n true\n ),\n 10\n );\n\n const distrCalculate: IStorageDistribution = {\n pvSize,\n nodes: parseInt(nodes),\n disks: mainSelection.drivesPerServer,\n persistentVolumes: mainSelection.drivesPerServer * parseInt(nodes),\n error: \"\",\n };\n\n updateField(\"distribution\", distrCalculate);\n // apply requests, half of the available resources\n updateField(\n \"resourcesCPURequest\",\n Math.max(1, mainSelection.CPU / 2)\n );\n updateField(\n \"resourcesMemoryRequest\",\n Math.max(2, mainSelection.memory / 2)\n );\n }\n }\n }\n }, [nodes, selectedStorageType, formToRender, updateField, updateMainField]);\n\n /*Calculate Allocation End*/\n\n /* Validations of pages */\n\n useEffect(() => {\n const commonValidation = commonFormValidation([\n {\n fieldKey: \"nodes\",\n required: true,\n value: nodes,\n customValidation: parseInt(nodes) < 4,\n customValidationMessage: \"Al least 4 servers must be selected\",\n },\n ]);\n\n isPageValid(\n \"tenantSize\",\n !(\"nodes\" in commonValidation) &&\n distribution.error === \"\" &&\n ecParityCalc.error === 0 &&\n resourcesSize.error === \"\" &&\n ecParity !== \"\" &&\n parseInt(nodes) >= 4\n );\n\n setValidationErrors(commonValidation);\n }, [\n nodes,\n volumeSize,\n sizeFactor,\n memoryNode,\n distribution,\n ecParityCalc,\n resourcesSize,\n limitSize,\n selectedStorageType,\n cpuToUse,\n maxCPUsUse,\n isPageValid,\n drivesPerServer,\n ecParity,\n ]);\n\n useEffect(() => {\n if (integrationSelection.drivesPerServer !== 0) {\n // Get EC Value\n if (nodes.trim() !== \"\") {\n api\n .invoke(\n \"GET\",\n `api/v1/get-parity/${nodes}/${integrationSelection.drivesPerServer}`\n )\n .then((ecList: string[]) => {\n updateField(\"ecParityChoices\", ecListTransform(ecList));\n updateField(\"cleanECChoices\", ecList);\n })\n .catch((err: any) => {\n updateField(\"ecparityChoices\", []);\n isPageValid(\"tenantSize\", false);\n updateField(\"ecParity\", \"\");\n });\n }\n }\n }, [integrationSelection, nodes, isPageValid, updateField]);\n\n /* End Validation of pages */\n\n return (\n \n \n
\n

Tenant Size

\n \n Please select the desired capacity\n \n
\n
\n {distribution.error !== \"\" && (\n \n
{distribution.error}
\n
\n )}\n {resourcesSize.error !== \"\" && (\n \n
{resourcesSize.error}
\n
\n )}\n \n ) => {\n if (e.target.validity.valid) {\n updateField(\"nodes\", e.target.value);\n cleanValidation(\"nodes\");\n }\n }}\n label=\"Number of Servers\"\n disabled={selectedStorageType === \"\"}\n value={nodes}\n min=\"4\"\n required\n error={validationErrors[\"nodes\"] || \"\"}\n pattern={\"[0-9]*\"}\n />\n \n \n ) => {\n updateField(\"ecParity\", e.target.value as string);\n }}\n label=\"Erasure Code Parity\"\n disabled={selectedStorageType === \"\"}\n value={ecParity}\n options={ecParityChoices}\n />\n \n Please select the desired parity. This setting will change the max\n usable capacity in the cluster\n \n \n
\n );\n};\n\nconst mapState = (state: AppState) => () => {\n const createTenant = state.tenants.createTenant;\n\n const {\n memoryNode,\n ecParityChoices,\n distribution,\n cleanECChoices,\n sizeFactor,\n ecParity,\n cpuToUse,\n integrationSelection,\n resourcesSize,\n drivesPerServer,\n maxCPUsUse,\n ecParityCalc,\n volumeSize,\n nodes,\n } = createTenant.fields.tenantSize;\n\n return {\n volumeSize,\n sizeFactor,\n drivesPerServer,\n nodes,\n memoryNode,\n ecParity,\n ecParityChoices,\n cleanECChoices,\n resourcesSize,\n distribution,\n ecParityCalc,\n cpuToUse,\n maxCPUsUse,\n integrationSelection,\n limitSize: createTenant.limitSize,\n selectedStorageType: createTenant.fields.nameTenant.selectedStorageType,\n };\n};\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(TenantSizeMK));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, {\n Fragment,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport get from \"lodash/get\";\nimport debounce from \"lodash/debounce\";\nimport Grid from \"@mui/material/Grid\";\nimport {\n formFieldStyles,\n modalBasic,\n wizardCommon,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../../../actions\";\nimport {\n isPageValid,\n setLimitSize,\n setStorageClassesList,\n updateAddField,\n} from \"../../../actions\";\nimport {\n getLimitSizes,\n IQuotaElement,\n IQuotas,\n Opts,\n} from \"../../../ListTenants/utils\";\nimport { AppState } from \"../../../../../../store\";\nimport { commonFormValidation } from \"../../../../../../utils/validationFunctions\";\nimport { clearValidationError } from \"../../../utils\";\nimport { ErrorResponseHandler } from \"../../../../../../common/types\";\nimport api from \"../../../../../../common/api\";\nimport InputBoxWrapper from \"../../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport AddIcon from \"../../../../../../icons/AddIcon\";\nimport AddNamespaceModal from \"../helpers/AddNamespaceModal\";\nimport SizePreview from \"../SizePreview\";\nimport TenantSize from \"./TenantSize\";\nimport { Paper, SelectChangeEvent } from \"@mui/material\";\nimport { IMkEnvs, mkPanelConfigurations } from \"./utils\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n sizePreview: {\n position: \"fixed\",\n marginLeft: 10,\n background: \"#FFFFFF\",\n border: \"1px solid #EAEAEA\",\n padding: 2,\n },\n ...formFieldStyles,\n ...modalBasic,\n ...wizardCommon,\n });\n\ninterface INameTenantMainScreen {\n classes: any;\n storageClasses: Opts[];\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n setStorageClassesList: typeof setStorageClassesList;\n setLimitSize: typeof setLimitSize;\n tenantName: string;\n namespace: string;\n selectedStorageClass: string;\n selectedStorageType: string;\n formToRender?: IMkEnvs;\n}\n\nconst NameTenantMain = ({\n classes,\n storageClasses,\n tenantName,\n namespace,\n selectedStorageClass,\n selectedStorageType,\n formToRender = IMkEnvs.default,\n updateAddField,\n setStorageClassesList,\n setLimitSize,\n isPageValid,\n setModalErrorSnackMessage,\n}: INameTenantMainScreen) => {\n const [validationErrors, setValidationErrors] = useState({});\n const [emptyNamespace, setEmptyNamespace] = useState(true);\n const [loadingNamespaceInfo, setLoadingNamespaceInfo] =\n useState(false);\n const [showCreateButton, setShowCreateButton] = useState(false);\n const [openAddNSConfirm, setOpenAddNSConfirm] = useState(false);\n\n // Common\n const updateField = useCallback(\n (field: string, value: string) => {\n updateAddField(\"nameTenant\", field, value);\n },\n [updateAddField]\n );\n\n // Storage classes retrieval\n const getNamespaceInformation = useCallback(() => {\n setShowCreateButton(false);\n // Empty tenantValidation\n api\n .invoke(\"GET\", `/api/v1/namespaces/${namespace}/tenants`)\n .then((res: any[]) => {\n const tenantsList = get(res, \"tenants\", []);\n\n if (tenantsList && tenantsList.length > 0) {\n setEmptyNamespace(false);\n setLoadingNamespaceInfo(false);\n return;\n }\n setEmptyNamespace(true);\n\n // Storagequotas retrieval\n api\n .invoke(\n \"GET\",\n `/api/v1/namespaces/${namespace}/resourcequotas/${namespace}-storagequota`\n )\n .then((res: IQuotas) => {\n const elements: IQuotaElement[] = get(res, \"elements\", []);\n setLimitSize(getLimitSizes(res));\n\n const newStorage = elements.map((storageClass: any) => {\n const name = get(storageClass, \"name\", \"\").split(\n \".storageclass.storage.k8s.io/requests.storage\"\n )[0];\n\n return { label: name, value: name };\n });\n\n setStorageClassesList(newStorage);\n\n const stExists = newStorage.findIndex(\n (storageClass) => storageClass.value === selectedStorageClass\n );\n\n if (newStorage.length > 0 && stExists === -1) {\n updateField(\"selectedStorageClass\", newStorage[0].value);\n } else if (newStorage.length === 0) {\n updateField(\"selectedStorageClass\", \"\");\n setStorageClassesList([]);\n }\n setLoadingNamespaceInfo(false);\n })\n .catch((err: ErrorResponseHandler) => {\n setLoadingNamespaceInfo(false);\n setShowCreateButton(true);\n updateField(\"selectedStorageClass\", \"\");\n setStorageClassesList([]);\n console.error(\"Namespace error: \", err);\n });\n })\n .catch((err: ErrorResponseHandler) => {\n setModalErrorSnackMessage({\n errorMessage: \"Error validating if namespace already has tenants\",\n detailedError: err.detailedError,\n });\n });\n }, [\n namespace,\n setLimitSize,\n setModalErrorSnackMessage,\n setStorageClassesList,\n updateField,\n selectedStorageClass,\n ]);\n\n const debounceNamespace = useMemo(\n () => debounce(getNamespaceInformation, 500),\n [getNamespaceInformation]\n );\n\n useEffect(() => {\n if (namespace !== \"\") {\n debounceNamespace();\n setLoadingNamespaceInfo(true);\n\n // Cancel previous debounce calls during useEffect cleanup.\n return debounceNamespace.cancel;\n }\n }, [debounceNamespace, namespace]);\n\n // Validation\n useEffect(() => {\n let customNamespaceError = false;\n let errorMessage = \"\";\n\n if (!emptyNamespace && !loadingNamespaceInfo) {\n customNamespaceError = true;\n errorMessage = \"You can only create one tenant per namespace\";\n } else if (\n storageClasses.length < 1 &&\n emptyNamespace &&\n !loadingNamespaceInfo\n ) {\n customNamespaceError = true;\n errorMessage = \"Please enter a valid namespace\";\n }\n\n const commonValidation = commonFormValidation([\n {\n fieldKey: \"tenant-name\",\n required: true,\n pattern: /^[a-z0-9-]{3,63}$/,\n customPatternMessage:\n \"Name only can contain lowercase letters, numbers and '-'. Min. Length: 3\",\n value: tenantName,\n },\n {\n fieldKey: \"namespace\",\n required: true,\n value: namespace,\n customValidation: customNamespaceError,\n customValidationMessage: errorMessage,\n },\n ]);\n\n const isValid =\n !(\"tenant-name\" in commonValidation) &&\n !(\"namespace\" in commonValidation) &&\n ((formToRender === IMkEnvs.default && storageClasses.length > 0) ||\n (formToRender !== IMkEnvs.default && selectedStorageType !== \"\"));\n\n isPageValid(\"nameTenant\", isValid);\n\n setValidationErrors(commonValidation);\n }, [\n storageClasses,\n namespace,\n tenantName,\n isPageValid,\n emptyNamespace,\n loadingNamespaceInfo,\n selectedStorageType,\n formToRender,\n ]);\n\n const frmValidationCleanup = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n const addNamespace = () => {\n setOpenAddNSConfirm(true);\n };\n\n const closeAddNamespace = (refresh: boolean) => {\n setOpenAddNSConfirm(false);\n\n if (refresh) {\n debounceNamespace();\n }\n };\n\n return (\n \n {openAddNSConfirm && (\n \n )}\n \n \n \n \n \n
\n

Name

\n \n How would you like to name this new tenant?\n \n
\n
\n ) => {\n updateField(\"tenantName\", e.target.value);\n frmValidationCleanup(\"tenant-name\");\n }}\n label=\"Name\"\n value={tenantName}\n required\n error={validationErrors[\"tenant-name\"] || \"\"}\n />\n
\n
\n \n ) => {\n updateField(\"namespace\", e.target.value);\n frmValidationCleanup(\"namespace\");\n }}\n label=\"Namespace\"\n value={namespace}\n error={validationErrors[\"namespace\"] || \"\"}\n overlayIcon={showCreateButton ? : null}\n overlayAction={addNamespace}\n required\n />\n \n {formToRender === IMkEnvs.default ? (\n \n ) => {\n updateField(\n \"selectedStorageClass\",\n e.target.value as string\n );\n }}\n label=\"Storage Class\"\n value={selectedStorageClass}\n options={storageClasses}\n disabled={storageClasses.length < 1}\n />\n \n ) : (\n \n ) => {\n updateField(\n \"selectedStorageType\",\n e.target.value as string\n );\n }}\n label={get(\n mkPanelConfigurations,\n `${formToRender}.variantSelectorLabel`,\n \"Storage Type\"\n )}\n value={selectedStorageType}\n options={get(\n mkPanelConfigurations,\n `${formToRender}.variantSelectorValues`,\n []\n )}\n />\n \n )}\n {formToRender === IMkEnvs.default ? (\n \n ) : (\n get(\n mkPanelConfigurations,\n `${formToRender}.sizingComponent`,\n null\n )\n )}\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n tenantName: state.tenants.createTenant.fields.nameTenant.tenantName,\n namespace: state.tenants.createTenant.fields.nameTenant.namespace,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n selectedStorageType:\n state.tenants.createTenant.fields.nameTenant.selectedStorageType,\n storageClasses: state.tenants.createTenant.storageClasses,\n});\n\nconst connector = connect(mapState, {\n setModalErrorSnackMessage,\n updateAddField,\n setStorageClassesList,\n setLimitSize,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(NameTenantMain));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport NameTenantMain from \"./NameTenantMain\";\nimport { IMkEnvs, resourcesConfigurations } from \"./utils\";\nimport { AppState } from \"../../../../../../store\";\n\ninterface ITenantResources {\n features?: string[];\n}\n\nconst TenantResources = ({ features }: ITenantResources) => {\n const [formRender, setFormRender] = useState(null);\n\n useEffect(() => {\n let setConfiguration = IMkEnvs.default;\n\n if (features && features.length !== 0) {\n const possibleVariables = Object.keys(resourcesConfigurations);\n\n possibleVariables.forEach((element) => {\n if (features.includes(element)) {\n setConfiguration = get(\n resourcesConfigurations,\n element,\n IMkEnvs.default\n );\n }\n });\n }\n\n setFormRender(setConfiguration);\n }, [features]);\n\n if (formRender === null) {\n return null;\n }\n\n return ;\n};\n\nconst mapState = (state: AppState) => ({\n features: state.console.session.features,\n});\n\nconst connector = connect(mapState, null);\n\nexport default connector(TenantResources);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport get from \"lodash/get\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@mui/material/Grid\";\nimport { LinearProgress } from \"@mui/material\";\n\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n modalBasic,\n settingsCommon,\n wizardCommon,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport api from \"../../../../common/api\";\nimport { generatePoolName } from \"../../../../common/utils\";\nimport GenericWizard from \"../../Common/GenericWizard/GenericWizard\";\nimport { IWizardElement } from \"../../Common/GenericWizard/types\";\nimport { NewServiceAccount } from \"../../Common/CredentialsPrompt/types\";\nimport { ErrorResponseHandler, ITenantCreator } from \"../../../../common/types\";\nimport { KeyPair } from \"../ListTenants/utils\";\n\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport { getDefaultAffinity, getNodeSelector } from \"../TenantDetails/utils\";\nimport CredentialsPrompt from \"../../Common/CredentialsPrompt/CredentialsPrompt\";\nimport { AppState } from \"../../../../store\";\nimport { ICertificatesItems, IFieldStore } from \"../types\";\nimport { resetAddTenantForm, updateAddField } from \"../actions\";\nimport Configure from \"./Steps/Configure\";\nimport IdentityProvider from \"./Steps/IdentityProvider\";\nimport Security from \"./Steps/Security\";\nimport Encryption from \"./Steps/Encryption\";\nimport Affinity from \"./Steps/Affinity\";\nimport PageHeader from \"../../Common/PageHeader/PageHeader\";\nimport history from \"../../../../history\";\nimport Images from \"./Steps/Images\";\nimport PageLayout from \"../../Common/Layout/PageLayout\";\nimport BackLink from \"../../../../common/BackLink\";\nimport TenantResources from \"./Steps/TenantResources/TenantResources\";\n\ninterface IAddTenantProps {\n setErrorSnackMessage: typeof setErrorSnackMessage;\n resetAddTenantForm: typeof resetAddTenantForm;\n updateAddField: typeof updateAddField;\n fields: IFieldStore;\n certificates: ICertificatesItems;\n selectedStorageClass: string;\n namespace: string;\n validPages: string[];\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n pageBox: {\n border: \"1px solid #EAEAEA\",\n },\n ...modalBasic,\n ...wizardCommon,\n ...settingsCommon,\n });\n\nconst AddTenant = ({\n classes,\n fields,\n certificates,\n selectedStorageClass,\n namespace,\n validPages,\n setErrorSnackMessage,\n resetAddTenantForm,\n}: IAddTenantProps) => {\n // Modals\n const [showNewCredentials, setShowNewCredentials] = useState(false);\n const [createdAccount, setCreatedAccount] =\n useState(null);\n\n // Fields\n const [addSending, setAddSending] = useState(false);\n\n /* Send Information to backend */\n useEffect(() => {\n const tenantName = fields.nameTenant.tenantName;\n const selectedStorageClass = fields.nameTenant.selectedStorageClass;\n const imageName = fields.configure.imageName;\n const customDockerhub = fields.configure.customDockerhub;\n const imageRegistry = fields.configure.imageRegistry;\n const imageRegistryUsername = fields.configure.imageRegistryUsername;\n const imageRegistryPassword = fields.configure.imageRegistryPassword;\n const exposeMinIO = fields.configure.exposeMinIO;\n const exposeConsole = fields.configure.exposeConsole;\n const idpSelection = fields.identityProvider.idpSelection;\n const openIDConfigurationURL =\n fields.identityProvider.openIDConfigurationURL;\n const openIDClientID = fields.identityProvider.openIDClientID;\n const openIDClaimName = fields.identityProvider.openIDClaimName;\n const openIDCallbackURL = fields.identityProvider.openIDCallbackURL;\n const openIDScopes = fields.identityProvider.openIDScopes;\n const openIDSecretID = fields.identityProvider.openIDSecretID;\n const ADURL = fields.identityProvider.ADURL;\n const ADSkipTLS = fields.identityProvider.ADSkipTLS;\n const ADServerInsecure = fields.identityProvider.ADServerInsecure;\n const ADUserNameSearchFilter =\n fields.identityProvider.ADUserNameSearchFilter;\n const ADGroupSearchBaseDN = fields.identityProvider.ADGroupSearchBaseDN;\n const ADGroupSearchFilter = fields.identityProvider.ADGroupSearchFilter;\n const ADGroupNameAttribute = fields.identityProvider.ADGroupNameAttribute;\n const ADUserDNs = fields.identityProvider.ADUserDNs;\n const ADUserNameFormat = fields.identityProvider.ADUserNameFormat;\n const ADLookupBindDN = fields.identityProvider.ADLookupBindDN;\n const ADLookupBindPassword = fields.identityProvider.ADLookupBindPassword;\n const ADUserDNSearchBaseDN = fields.identityProvider.ADUserDNSearchBaseDN;\n const ADUserDNSearchFilter = fields.identityProvider.ADUserDNSearchFilter;\n const ADServerStartTLS = fields.identityProvider.ADServerStartTLS;\n const accessKeys = fields.identityProvider.accessKeys;\n const secretKeys = fields.identityProvider.secretKeys;\n const minioCertificates = certificates.minioCertificates;\n const caCertificates = certificates.caCertificates;\n const consoleCaCertificates = certificates.consoleCaCertificates;\n const consoleCertificate = certificates.consoleCertificate;\n const serverCertificate = certificates.serverCertificate;\n const clientCertificate = certificates.clientCertificate;\n const vaultCertificate = certificates.vaultCertificate;\n const vaultCA = certificates.vaultCA;\n const gemaltoCA = certificates.gemaltoCA;\n const enableEncryption = fields.encryption.enableEncryption;\n const encryptionType = fields.encryption.encryptionType;\n const gemaltoEndpoint = fields.encryption.gemaltoEndpoint;\n const gemaltoToken = fields.encryption.gemaltoToken;\n const gemaltoDomain = fields.encryption.gemaltoDomain;\n const gemaltoRetry = fields.encryption.gemaltoRetry;\n const awsEndpoint = fields.encryption.awsEndpoint;\n const awsRegion = fields.encryption.awsRegion;\n const awsKMSKey = fields.encryption.awsKMSKey;\n const awsAccessKey = fields.encryption.awsAccessKey;\n const awsSecretKey = fields.encryption.awsSecretKey;\n const awsToken = fields.encryption.awsToken;\n const vaultEndpoint = fields.encryption.vaultEndpoint;\n const vaultEngine = fields.encryption.vaultEngine;\n const vaultNamespace = fields.encryption.vaultNamespace;\n const vaultPrefix = fields.encryption.vaultPrefix;\n const vaultAppRoleEngine = fields.encryption.vaultAppRoleEngine;\n const vaultId = fields.encryption.vaultId;\n const vaultSecret = fields.encryption.vaultSecret;\n const vaultRetry = fields.encryption.vaultRetry;\n const vaultPing = fields.encryption.vaultPing;\n const azureEndpoint = fields.encryption.azureEndpoint;\n const azureTenantID = fields.encryption.azureTenantID;\n const azureClientID = fields.encryption.azureClientID;\n const azureClientSecret = fields.encryption.azureClientSecret;\n const gcpProjectID = fields.encryption.gcpProjectID;\n const gcpEndpoint = fields.encryption.gcpEndpoint;\n const gcpClientEmail = fields.encryption.gcpClientEmail;\n const gcpClientID = fields.encryption.gcpClientID;\n const gcpPrivateKeyID = fields.encryption.gcpPrivateKeyID;\n const gcpPrivateKey = fields.encryption.gcpPrivateKey;\n const enableAutoCert = fields.security.enableAutoCert;\n const enableTLS = fields.security.enableTLS;\n const ecParity = fields.tenantSize.ecParity;\n const distribution = fields.tenantSize.distribution;\n const tenantCustom = fields.configure.tenantCustom;\n const logSearchCustom = fields.configure.logSearchCustom;\n const prometheusCustom = fields.configure.prometheusCustom;\n const logSearchVolumeSize = fields.configure.logSearchVolumeSize;\n const logSearchSelectedStorageClass =\n fields.configure.logSearchSelectedStorageClass;\n const logSearchImage = fields.configure.logSearchImage;\n const kesImage = fields.configure.kesImage;\n const logSearchPostgresImage = fields.configure.logSearchPostgresImage;\n const logSearchPostgresInitImage =\n fields.configure.logSearchPostgresInitImage;\n const prometheusImage = fields.configure.prometheusImage;\n const prometheusSidecarImage = fields.configure.prometheusSidecarImage;\n const prometheusInitImage = fields.configure.prometheusInitImage;\n const prometheusSelectedStorageClass =\n fields.configure.prometheusSelectedStorageClass;\n const prometheusVolumeSize = fields.configure.prometheusVolumeSize;\n const affinityType = fields.affinity.podAffinity;\n const nodeSelectorLabels = fields.affinity.nodeSelectorLabels;\n const withPodAntiAffinity = fields.affinity.withPodAntiAffinity;\n\n const tenantSecurityContext = fields.configure.tenantSecurityContext;\n const logSearchSecurityContext = fields.configure.logSearchSecurityContext;\n const logSearchPostgresSecurityContext =\n fields.configure.logSearchPostgresSecurityContext;\n const prometheusSecurityContext =\n fields.configure.prometheusSecurityContext;\n const kesSecurityContext = fields.encryption.kesSecurityContext;\n const kesReplicas = fields.encryption.replicas;\n\n if (addSending) {\n const poolName = generatePoolName([]);\n\n let affinityObject = {};\n\n switch (affinityType) {\n case \"default\":\n affinityObject = {\n affinity: getDefaultAffinity(tenantName, poolName),\n };\n break;\n case \"nodeSelector\":\n affinityObject = {\n affinity: getNodeSelector(\n nodeSelectorLabels,\n withPodAntiAffinity,\n tenantName,\n poolName\n ),\n };\n break;\n }\n\n const erasureCode = ecParity.split(\":\")[1];\n\n let dataSend: ITenantCreator = {\n name: tenantName,\n namespace: namespace,\n access_key: \"\",\n secret_key: \"\",\n access_keys: [],\n secret_keys: [],\n enable_tls: enableTLS && enableAutoCert,\n enable_console: true,\n enable_prometheus: true,\n service_name: \"\",\n image: imageName,\n expose_minio: exposeMinIO,\n expose_console: exposeConsole,\n pools: [\n {\n name: poolName,\n servers: distribution.nodes,\n volumes_per_server: distribution.disks,\n volume_configuration: {\n size: distribution.pvSize,\n storage_class_name: selectedStorageClass,\n },\n securityContext: tenantCustom ? tenantSecurityContext : null,\n ...affinityObject,\n },\n ],\n erasureCodingParity: parseInt(erasureCode, 10),\n };\n\n // Set Resources\n if (\n fields.tenantSize.resourcesCPURequest !== \"\" ||\n fields.tenantSize.resourcesCPULimit !== \"\" ||\n fields.tenantSize.resourcesMemoryRequest !== \"\" ||\n fields.tenantSize.resourcesMemoryLimit !== \"\"\n ) {\n dataSend.pools[0].resources = {};\n // requests\n if (\n fields.tenantSize.resourcesCPURequest !== \"\" ||\n fields.tenantSize.resourcesMemoryRequest !== \"\"\n ) {\n dataSend.pools[0].resources.requests = {};\n if (fields.tenantSize.resourcesCPURequest !== \"\") {\n dataSend.pools[0].resources.requests.cpu = parseInt(\n fields.tenantSize.resourcesCPURequest\n );\n }\n if (fields.tenantSize.resourcesMemoryRequest !== \"\") {\n dataSend.pools[0].resources.requests.memory = parseInt(\n fields.tenantSize.resourcesMemoryRequest\n );\n }\n }\n // limits\n if (\n fields.tenantSize.resourcesCPULimit !== \"\" ||\n fields.tenantSize.resourcesMemoryLimit !== \"\"\n ) {\n dataSend.pools[0].resources.limits = {};\n if (fields.tenantSize.resourcesCPULimit !== \"\") {\n dataSend.pools[0].resources.limits.cpu = parseInt(\n fields.tenantSize.resourcesCPULimit\n );\n }\n if (fields.tenantSize.resourcesMemoryLimit !== \"\") {\n dataSend.pools[0].resources.limits.memory = parseInt(\n fields.tenantSize.resourcesMemoryLimit\n );\n }\n }\n }\n if (customDockerhub) {\n dataSend = {\n ...dataSend,\n image_registry: {\n registry: imageRegistry,\n username: imageRegistryUsername,\n password: imageRegistryPassword,\n },\n };\n }\n\n if (logSearchCustom) {\n dataSend = {\n ...dataSend,\n logSearchConfiguration: {\n storageClass:\n logSearchSelectedStorageClass === \"default\"\n ? \"\"\n : logSearchSelectedStorageClass,\n storageSize: parseInt(logSearchVolumeSize),\n image: logSearchImage,\n postgres_image: logSearchPostgresImage,\n postgres_init_image: logSearchPostgresInitImage,\n securityContext: logSearchSecurityContext,\n postgres_securityContext: logSearchPostgresSecurityContext,\n },\n };\n } else {\n dataSend = {\n ...dataSend,\n logSearchConfiguration: {\n image: logSearchImage,\n postgres_image: logSearchPostgresImage,\n postgres_init_image: logSearchPostgresInitImage,\n },\n };\n }\n\n if (prometheusCustom) {\n dataSend = {\n ...dataSend,\n prometheusConfiguration: {\n storageClass:\n prometheusSelectedStorageClass === \"default\"\n ? \"\"\n : prometheusSelectedStorageClass,\n storageSize: parseInt(prometheusVolumeSize),\n image: prometheusImage,\n sidecar_image: prometheusSidecarImage,\n init_image: prometheusInitImage,\n securityContext: prometheusSecurityContext,\n },\n };\n } else {\n dataSend = {\n ...dataSend,\n prometheusConfiguration: {\n image: prometheusImage,\n sidecar_image: prometheusSidecarImage,\n init_image: prometheusInitImage,\n },\n };\n }\n\n let tenantCerts: any = null;\n let consoleCerts: any = null;\n let caCerts: any = null;\n let consoleCaCerts: any = null;\n\n if (caCertificates.length > 0) {\n caCerts = {\n ca_certificates: caCertificates\n .map((keyPair: KeyPair) => keyPair.encoded_cert)\n .filter((keyPair) => keyPair),\n };\n }\n\n if (consoleCaCertificates.length > 0) {\n consoleCaCerts = {\n console_ca_certificates: consoleCaCertificates\n .map((keyPair: KeyPair) => keyPair.encoded_cert)\n .filter((keyPair) => keyPair),\n };\n }\n\n if (enableTLS && minioCertificates.length > 0) {\n tenantCerts = {\n minio: minioCertificates\n .map((keyPair: KeyPair) => ({\n crt: keyPair.encoded_cert,\n key: keyPair.encoded_key,\n }))\n .filter((keyPair) => keyPair.crt && keyPair.key),\n };\n }\n\n if (\n enableTLS &&\n consoleCertificate.encoded_cert !== \"\" &&\n consoleCertificate.encoded_key !== \"\"\n ) {\n consoleCerts = {\n console: {\n crt: consoleCertificate.encoded_cert,\n key: consoleCertificate.encoded_key,\n },\n };\n }\n\n if (tenantCerts || consoleCerts || caCerts || consoleCaCerts) {\n dataSend = {\n ...dataSend,\n tls: {\n ...tenantCerts,\n ...consoleCerts,\n ...caCerts,\n ...consoleCaCerts,\n },\n };\n }\n\n if (enableEncryption) {\n let insertEncrypt = {};\n\n switch (encryptionType) {\n case \"gemalto\":\n let gemaltoCAIntroduce = {};\n\n if (gemaltoCA.encoded_cert !== \"\") {\n gemaltoCAIntroduce = {\n ca: gemaltoCA.encoded_cert,\n };\n }\n insertEncrypt = {\n gemalto: {\n keysecure: {\n endpoint: gemaltoEndpoint,\n credentials: {\n token: gemaltoToken,\n domain: gemaltoDomain,\n retry: parseInt(gemaltoRetry),\n },\n tls: {\n ...gemaltoCAIntroduce,\n },\n },\n },\n };\n break;\n case \"aws\":\n insertEncrypt = {\n aws: {\n secretsmanager: {\n endpoint: awsEndpoint,\n region: awsRegion,\n kmskey: awsKMSKey,\n credentials: {\n accesskey: awsAccessKey,\n secretkey: awsSecretKey,\n token: awsToken,\n },\n },\n },\n };\n break;\n case \"azure\":\n insertEncrypt = {\n azure: {\n keyvault: {\n endpoint: azureEndpoint,\n credentials: {\n tenant_id: azureTenantID,\n client_id: azureClientID,\n client_secret: azureClientSecret,\n },\n },\n },\n };\n break;\n case \"gcp\":\n insertEncrypt = {\n gcp: {\n secretmanager: {\n project_id: gcpProjectID,\n endpoint: gcpEndpoint,\n credentials: {\n client_email: gcpClientEmail,\n client_id: gcpClientID,\n private_key_id: gcpPrivateKeyID,\n private_key: gcpPrivateKey,\n },\n },\n },\n };\n break;\n case \"vault\":\n let vaultKeyPair = null;\n let vaultCAInsert = null;\n if (\n vaultCertificate.encoded_key !== \"\" &&\n vaultCertificate.encoded_cert !== \"\"\n ) {\n vaultKeyPair = {\n key: vaultCertificate.encoded_key,\n crt: vaultCertificate.encoded_cert,\n };\n }\n if (vaultCA.encoded_cert !== \"\") {\n vaultCAInsert = {\n ca: vaultCA.encoded_cert,\n };\n }\n let vaultTLS = null;\n if (vaultKeyPair || vaultCA) {\n vaultTLS = {\n tls: {\n ...vaultKeyPair,\n ...vaultCAInsert,\n },\n };\n }\n insertEncrypt = {\n vault: {\n endpoint: vaultEndpoint,\n engine: vaultEngine,\n namespace: vaultNamespace,\n prefix: vaultPrefix,\n approle: {\n engine: vaultAppRoleEngine,\n id: vaultId,\n secret: vaultSecret,\n retry: parseInt(vaultRetry),\n },\n ...vaultTLS,\n status: {\n ping: parseInt(vaultPing),\n },\n },\n };\n break;\n }\n\n let encryptionServerKeyPair: any = {};\n let encryptionClientKeyPair: any = {};\n\n if (\n clientCertificate.encoded_key !== \"\" &&\n clientCertificate.encoded_cert !== \"\"\n ) {\n encryptionClientKeyPair = {\n client: {\n key: clientCertificate.encoded_key,\n crt: clientCertificate.encoded_cert,\n },\n };\n }\n\n if (\n serverCertificate.encoded_key !== \"\" &&\n serverCertificate.encoded_cert !== \"\"\n ) {\n encryptionServerKeyPair = {\n server: {\n key: serverCertificate.encoded_key,\n crt: serverCertificate.encoded_cert,\n },\n };\n }\n\n dataSend = {\n ...dataSend,\n encryption: {\n replicas: kesReplicas,\n securityContext: kesSecurityContext,\n image: kesImage,\n ...encryptionClientKeyPair,\n ...encryptionServerKeyPair,\n ...insertEncrypt,\n },\n };\n }\n\n let dataIDP: any = {};\n switch (idpSelection) {\n case \"Built-in\":\n let keyarray = [];\n for (let i = 0; i < accessKeys.length; i++) {\n keyarray.push({\n access_key: accessKeys[i],\n secret_key: secretKeys[i],\n });\n }\n dataIDP = {\n keys: keyarray,\n };\n break;\n case \"OpenID\":\n dataIDP = {\n oidc: {\n configuration_url: openIDConfigurationURL,\n client_id: openIDClientID,\n secret_id: openIDSecretID,\n claim_name: openIDClaimName,\n callback_url: openIDCallbackURL,\n scopes: openIDScopes,\n },\n };\n break;\n case \"AD\":\n dataIDP = {\n active_directory: {\n url: ADURL,\n skip_tls_verification: ADSkipTLS,\n server_insecure: ADServerInsecure,\n username_format: ADUserNameFormat,\n username_search_filter: ADUserNameSearchFilter,\n group_search_base_dn: ADGroupSearchBaseDN,\n group_search_filter: ADGroupSearchFilter,\n group_name_attribute: ADGroupNameAttribute,\n user_dns: ADUserDNs,\n lookup_bind_dn: ADLookupBindDN,\n lookup_bind_password: ADLookupBindPassword,\n user_dn_search_base_dn: ADUserDNSearchBaseDN,\n user_dn_search_filter: ADUserDNSearchFilter,\n server_start_tls: ADServerStartTLS,\n },\n };\n break;\n }\n\n dataSend = {\n ...dataSend,\n idp: { ...dataIDP },\n };\n api\n .invoke(\"POST\", `/api/v1/tenants`, dataSend)\n .then((res) => {\n const consoleSAList = get(res, \"console\", []);\n\n let newSrvAcc: NewServiceAccount = {\n idp: get(res, \"externalIDP\", false),\n console: [],\n };\n\n if (consoleSAList) {\n if (Array.isArray(consoleSAList)) {\n const consoleItem = consoleSAList.map((consoleKey) => {\n return {\n accessKey: consoleKey.access_key,\n secretKey: consoleKey.secret_key,\n };\n });\n\n newSrvAcc.console = consoleItem;\n } else {\n newSrvAcc = {\n console: {\n accessKey: res.console.access_key,\n secretKey: res.console.secret_key,\n },\n };\n }\n }\n setAddSending(false);\n setShowNewCredentials(true);\n setCreatedAccount(newSrvAcc);\n })\n .catch((err: ErrorResponseHandler) => {\n setAddSending(false);\n setErrorSnackMessage(err);\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [addSending]);\n\n const cancelButton = {\n label: \"Cancel\",\n type: \"other\",\n enabled: true,\n action: () => {\n history.push(\"/tenants\");\n },\n };\n const requiredPages = [\n \"nameTenant\",\n \"tenantSize\",\n \"configure\",\n \"affinity\",\n \"identityProvider\",\n \"security\",\n \"encryption\",\n ];\n const createButton = {\n label: \"Create\",\n type: \"submit\",\n enabled:\n !addSending &&\n selectedStorageClass !== \"\" &&\n requiredPages.every((v) => validPages.includes(v)),\n action: () => {\n setAddSending(true);\n },\n };\n\n const wizardSteps: IWizardElement[] = [\n {\n label: \"Setup\",\n componentRender: ,\n buttons: [cancelButton, createButton],\n },\n {\n label: \"Configure\",\n advancedOnly: true,\n componentRender: ,\n buttons: [cancelButton, createButton],\n },\n {\n label: \"Images\",\n advancedOnly: true,\n componentRender: ,\n buttons: [cancelButton, createButton],\n },\n {\n label: \"Pod Placement\",\n advancedOnly: true,\n componentRender: ,\n buttons: [cancelButton, createButton],\n },\n {\n label: \"Identity Provider\",\n advancedOnly: true,\n componentRender: ,\n buttons: [cancelButton, createButton],\n },\n {\n label: \"Security\",\n advancedOnly: true,\n componentRender: ,\n buttons: [cancelButton, createButton],\n },\n {\n label: \"Encryption\",\n advancedOnly: true,\n componentRender: ,\n buttons: [cancelButton, createButton],\n },\n ];\n\n let filteredWizardSteps = wizardSteps;\n\n const closeCredentialsModal = () => {\n resetAddTenantForm();\n history.push(\"/tenants\");\n };\n\n return (\n \n {showNewCredentials && (\n {\n closeCredentialsModal();\n }}\n entity=\"Tenant\"\n />\n )}\n \n \n \n {addSending && (\n \n \n \n )}\n \n \n \n \n \n );\n};\n\nconst mapState = (state: AppState) => ({\n namespace: state.tenants.createTenant.fields.nameTenant.namespace,\n validPages: state.tenants.createTenant.validPages,\n fields: state.tenants.createTenant.fields,\n certificates: state.tenants.createTenant.certificates,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n});\n\nconst connector = connect(mapState, {\n setErrorSnackMessage,\n updateAddField,\n resetAddTenantForm,\n});\n\nexport default withStyles(styles)(connector(AddTenant));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport get from \"lodash/get\";\nimport { ITenant } from \"./types\";\n\nexport interface Opts {\n label: string;\n value: string;\n}\n\nexport interface IQuotaElement {\n hard: number;\n name: string;\n}\n\nexport interface IQuotas {\n elements?: IQuotaElement[];\n name: string;\n}\n\nexport const minMemReq = 2147483648;\n\nexport interface KeyPair {\n id: string;\n encoded_cert: string;\n encoded_key: string;\n cert: string;\n key: string;\n}\n\nexport const ecListTransform = (ecList: string[]): Opts[] => {\n return ecList.map((value) => {\n return { label: value, value };\n });\n};\n\nexport const getLimitSizes = (resourceQuotas: IQuotas) => {\n const quotas: IQuotaElement[] = get(resourceQuotas, \"elements\", []);\n\n const returnQuotas: any = {};\n\n quotas.forEach((rsQuota) => {\n const stCName = rsQuota.name.split(\n \".storageclass.storage.k8s.io/requests.storage\"\n )[0];\n const hard = get(rsQuota, \"hard\", 0);\n const used = get(rsQuota, \"used\", 0);\n\n returnQuotas[stCName] = hard - used;\n });\n\n return returnQuotas;\n};\n\nexport const tenantIsOnline = (tenant: ITenant): boolean => {\n if (tenant.currentState === \"\") {\n return false;\n }\n if (\n !tenant.status &&\n tenant.health_status !== \"green\" &&\n tenant.health_status !== \"yellow\"\n ) {\n return false;\n }\n if (\n tenant.status &&\n tenant.status.health_status !== \"green\" &&\n tenant.status.health_status !== \"yellow\"\n ) {\n return false;\n }\n return true;\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport { IAffinityModel } from \"../../../../common/types\";\n\nexport const getDefaultAffinity = (tenantName: string, poolName: string) => {\n const defaultAffinity: IAffinityModel = {\n podAntiAffinity: {\n requiredDuringSchedulingIgnoredDuringExecution: [\n {\n labelSelector: {\n matchExpressions: [\n {\n key: \"v1.min.io/tenant\",\n operator: \"In\",\n values: [tenantName],\n },\n {\n key: \"v1.min.io/pool\",\n operator: \"In\",\n values: [poolName],\n },\n ],\n },\n topologyKey: \"kubernetes.io/hostname\",\n },\n ],\n },\n };\n return defaultAffinity;\n};\n\nexport const getNodeSelector = (\n labels: string,\n withPodAntiAffinity: boolean,\n tenantName: string,\n poolName: string\n) => {\n // Labels in the form of key1=value1&key2=value2&key3=value3...\n const splittedLabels = labels.split(\"&\");\n let matchExpressions: any = [];\n\n splittedLabels.forEach((label: string) => {\n const splitKeyValue = label.split(\"=\");\n if (splitKeyValue.length === 2) {\n matchExpressions.push({\n key: splitKeyValue[0],\n operator: \"In\",\n values: [splitKeyValue[1]],\n });\n }\n });\n\n const nodeSelector: IAffinityModel = {\n nodeAffinity: {\n requiredDuringSchedulingIgnoredDuringExecution: {\n nodeSelectorTerms: [\n {\n matchExpressions: matchExpressions,\n },\n ],\n },\n },\n };\n if (withPodAntiAffinity) {\n const def = getDefaultAffinity(tenantName, poolName);\n nodeSelector.podAntiAffinity = def.podAntiAffinity;\n }\n console.log(nodeSelector);\n return nodeSelector;\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport { ITenant } from \"./ListTenants/types\";\nimport { Opts } from \"./ListTenants/utils\";\nimport {\n ADD_TENANT_ADD_CA_KEYPAIR,\n ADD_TENANT_ADD_CONSOLE_CA_KEYPAIR,\n ADD_TENANT_ADD_CONSOLE_CERT,\n ADD_TENANT_ADD_FILE_TO_CA_KEYPAIR,\n ADD_TENANT_ADD_FILE_TO_CONSOLE_CA_KEYPAIR,\n ADD_TENANT_ADD_FILE_TO_MINIO_KEYPAIR,\n ADD_TENANT_ADD_MINIO_KEYPAIR,\n ADD_TENANT_DELETE_CA_KEYPAIR,\n ADD_TENANT_DELETE_CONSOLE_CA_KEYPAIR,\n ADD_TENANT_DELETE_MINIO_KEYPAIR,\n ADD_TENANT_ENCRYPTION_CLIENT_CERT,\n ADD_TENANT_ENCRYPTION_GEMALTO_CA,\n ADD_TENANT_ENCRYPTION_SERVER_CERT,\n ADD_TENANT_ENCRYPTION_VAULT_CA,\n ADD_TENANT_ENCRYPTION_VAULT_CERT,\n ADD_TENANT_RESET_FORM,\n ADD_TENANT_SET_CURRENT_PAGE,\n ADD_TENANT_SET_LIMIT_SIZE,\n ADD_TENANT_SET_PAGE_VALID,\n ADD_TENANT_SET_STORAGE_CLASSES_LIST,\n ADD_TENANT_UPDATE_FIELD,\n TENANT_DETAILS_SET_CURRENT_TENANT,\n TENANT_DETAILS_SET_LOADING,\n TENANT_DETAILS_SET_TAB,\n TENANT_DETAILS_SET_TENANT,\n} from \"./types\";\n\n// Basic actions\nexport const setWizardPage = (page: number) => {\n return {\n type: ADD_TENANT_SET_CURRENT_PAGE,\n page,\n };\n};\n\nexport const updateAddField = (\n pageName: string,\n fieldName: string,\n value: any\n) => {\n return {\n type: ADD_TENANT_UPDATE_FIELD,\n pageName,\n field: fieldName,\n value,\n };\n};\n\nexport const isPageValid = (pageName: string, valid: boolean) => {\n return {\n type: ADD_TENANT_SET_PAGE_VALID,\n pageName,\n valid,\n };\n};\n\n// Name Tenant actions\n\nexport const setStorageClassesList = (storageClasses: Opts[]) => {\n return {\n type: ADD_TENANT_SET_STORAGE_CLASSES_LIST,\n storageClasses,\n };\n};\n\nexport const setLimitSize = (limitSize: any) => {\n return {\n type: ADD_TENANT_SET_LIMIT_SIZE,\n limitSize,\n };\n};\n\n// Security actions\n\nexport const addCaCertificate = () => {\n return {\n type: ADD_TENANT_ADD_CA_KEYPAIR,\n };\n};\n\nexport const deleteCaCertificate = (id: string) => {\n return {\n type: ADD_TENANT_DELETE_CA_KEYPAIR,\n id,\n };\n};\n\nexport const addFileToCaCertificates = (\n id: string,\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ADD_FILE_TO_CA_KEYPAIR,\n id,\n key,\n fileName,\n value,\n };\n};\n\nexport const addConsoleCaCertificate = () => {\n return {\n type: ADD_TENANT_ADD_CONSOLE_CA_KEYPAIR,\n };\n};\n\nexport const deleteConsoleCaCertificate = (id: string) => {\n return {\n type: ADD_TENANT_DELETE_CONSOLE_CA_KEYPAIR,\n id,\n };\n};\n\nexport const addFileToConsoleCaCertificates = (\n id: string,\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ADD_FILE_TO_CONSOLE_CA_KEYPAIR,\n id,\n key,\n fileName,\n value,\n };\n};\n\nexport const addKeyPair = () => {\n return {\n type: ADD_TENANT_ADD_MINIO_KEYPAIR,\n };\n};\n\nexport const deleteKeyPair = (id: string) => {\n return {\n type: ADD_TENANT_DELETE_MINIO_KEYPAIR,\n id,\n };\n};\n\nexport const addFileToKeyPair = (\n id: string,\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ADD_FILE_TO_MINIO_KEYPAIR,\n id,\n key,\n fileName,\n value,\n };\n};\n\nexport const addConsoleCertificate = (\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ADD_CONSOLE_CERT,\n key,\n fileName,\n value,\n };\n};\n\nexport const addFileServerCert = (\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ENCRYPTION_SERVER_CERT,\n key,\n fileName,\n value,\n };\n};\n\nexport const addFileClientCert = (\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ENCRYPTION_CLIENT_CERT,\n key,\n fileName,\n value,\n };\n};\n\nexport const addFileVaultCert = (\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ENCRYPTION_VAULT_CERT,\n key,\n fileName,\n value,\n };\n};\n\nexport const addFileVaultCa = (fileName: string, value: string) => {\n return {\n type: ADD_TENANT_ENCRYPTION_VAULT_CA,\n fileName,\n value,\n };\n};\n\nexport const addFileGemaltoCa = (fileName: string, value: string) => {\n return {\n type: ADD_TENANT_ENCRYPTION_GEMALTO_CA,\n fileName,\n value,\n };\n};\n\nexport const resetAddTenantForm = () => {\n return {\n type: ADD_TENANT_RESET_FORM,\n };\n};\n\nexport const setTenantDetailsLoad = (loading: boolean) => {\n return {\n type: TENANT_DETAILS_SET_LOADING,\n state: loading,\n };\n};\n\nexport const setTenantName = (tenantName: string, tenantNamespace: string) => {\n return {\n type: TENANT_DETAILS_SET_CURRENT_TENANT,\n name: tenantName,\n namespace: tenantNamespace,\n };\n};\n\nexport const setTenantInfo = (tenant: ITenant | null) => {\n return {\n type: TENANT_DETAILS_SET_TENANT,\n tenant,\n };\n};\n\nexport const setTenantTab = (tab: string) => {\n return {\n type: TENANT_DETAILS_SET_TAB,\n tab,\n };\n};\n","import React from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport { Theme } from \"@mui/material/styles\";\n\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n errorBlock: {\n color: theme.palette?.error.main || \"#C83B51\",\n },\n });\n\ninterface IErrorBlockProps {\n classes: any;\n errorMessage: string;\n withBreak?: boolean;\n}\n\nconst ErrorBlock = ({\n classes,\n errorMessage,\n withBreak = true,\n}: IErrorBlockProps) => {\n return (\n \n {withBreak &&
}\n \n {errorMessage}\n \n
\n );\n};\n\nexport default withStyles(styles)(ErrorBlock);\n"],"names":["withStyles","theme","createStyles","link","display","alignItems","textDecoration","maxWidth","padding","color","palette","primary","light","fontSize","icon","marginRight","justifyContent","width","to","label","classes","className","root","marginLeft","borderWidth","borderColor","borderStyle","borderRadius","backgroundColor","main","opacity","contained","background","dark","children","variant","tooltip","rest","button","clsx","title","container","flexFlow","inputWithCopy","height","inputLabel","fieldBasic","value","OutlinedInput","readOnly","endAdornment","InputAdornment","position","text","BoxIconButton","onClick","onMouseDown","edge","warningBlock","margin","credentialTitle","fontWeight","buttonContainer","textAlign","marginTop","credentialsPanel","overflowY","maxHeight","promptTitle","buttonSpacer","promptIcon","newServiceAccount","open","closeModal","entity","consoleCreds","get","idp","ModalWrapper","modalOpen","onClose","titleIcon","Grid","item","xs","formScrollable","Array","isArray","map","credentialsPair","index","accessKey","secretKey","WarnIcon","Button","consoleExtras","cCreds","itemMap","access_key","secret_key","console","filename","element","document","createElement","setAttribute","encodeURIComponent","style","body","appendChild","click","removeChild","download","JSON","stringify","endIcon","tooltipHelper","valueString","whiteSpace","overflow","textOverflow","fileInputField","fileInputStyles","textBoxContainer","border","paddingLeft","onChange","id","name","disabled","required","error","accept","useState","showFileSelector","setShowSelector","fieldBottom","fieldContainer","errorInField","InputLabel","htmlFor","fieldLabelError","tooltipContainer","Tooltip","placement","HelpIcon","type","e","fileName","evt","callback","file","target","files","reader","FileReader","readAsDataURL","onload","fileBase64","result","fileArray","toString","split","length","fileProcess","data","IconButton","component","disableRipple","disableFocusRipple","size","Cancel","ErrorBlock","errorMessage","fileReselect","AttachFile","radioStyles","makeStyles","radioIcons","RadioButton","props","checkedIcon","radioSelectedIcon","radioUnselectedIcon","optionLabel","checkedOption","selectorOptions","currentSelection","disableOptions","displayInColumn","radioOptionsLayout","row","selectorOption","control","SelectStyled","lineHeight","spacing","input","InputBase","options","fullWidth","option","wizardStepContainer","flexDirection","flex","wizardComponent","marginBottom","minHeight","wizardModal","buttonsContainer","borderTop","paddingBottom","buttonInnerContainer","page","pageChange","loadingStep","forModal","componentRender","LinearProgress","buttons","btn","toPage","action","buttonAction","enabled","wizFromContainer","wizFromModal","modalWizardSteps","borderBottom","listStyle","buttonList","cursor","outline","boxShadow","paddedContentGrid","stepsLabel","stepsMasterContainer","top","verticalSteps","borderRight","stepsContainer","paddingTop","stepItem","wizardSteps","currentStep","setCurrentStep","toElement","lastPage","nextPage","prevPage","pg","Fragment","step","sm","md","lg","xl","List","dense","ListItem","selected","ListItemText","pageContentStyles","contentSpacer","mapDispatchToProps","toggleList","connector","connect","state","sidebarOpen","system","operatorMode","managerObjects","objectBrowser","objectManager","objectsToManage","headerContainer","left","labelStyle","rightMenu","logo","fill","middleComponent","actions","direction","sx","IMkEnvs","storageClasses","tenants","createTenant","customImage","fields","configure","imageName","customDockerhub","imageRegistry","imageRegistryUsername","imageRegistryPassword","exposeMinIO","exposeConsole","prometheusCustom","tenantCustom","logSearchCustom","logSearchVolumeSize","logSearchSizeFactor","prometheusVolumeSize","prometheusSizeFactor","logSearchSelectedStorageClass","logSearchImage","kesImage","logSearchPostgresImage","logSearchPostgresInitImage","prometheusSelectedStorageClass","prometheusImage","prometheusSidecarImage","prometheusInitImage","selectedStorageClass","nameTenant","tenantSecurityContext","logSearchSecurityContext","logSearchPostgresSecurityContext","prometheusSecurityContext","updateAddField","isPageValid","configSectionItem","tenantCustomizationFields","containerItem","fieldGroup","createTenantCommon","responsiveSectionItem","logSearchCustomFields","fieldSpaceTop","prometheusCustomFields","modalBasic","wizardCommon","validationErrors","setValidationErrors","configureSTClasses","updateField","useCallback","field","useEffect","customAccountValidation","fieldKey","runAsUser","customValidation","parseInt","customValidationMessage","runAsGroup","fsGroup","pattern","customPatternMessage","commonVal","commonFormValidation","Object","keys","filter","cleanValidation","fieldName","clearValidationError","Paper","paperWrapper","headerElement","h3Section","descriptionText","FormSwitchWrapper","checked","multiContainer","InputBoxWrapper","min","runAsNonRoot","SelectWrapper","idpSelection","identityProvider","accessKeys","secretKeys","openIDConfigurationURL","openIDClientID","openIDSecretID","openIDCallbackURL","openIDClaimName","openIDScopes","ADURL","ADSkipTLS","ADServerInsecure","ADUserNameSearchFilter","ADGroupSearchBaseDN","ADGroupSearchFilter","ADGroupNameAttribute","ADUserDNs","ADUserNameFormat","ADLookupBindDN","ADLookupBindPassword","ADUserDNSearchBaseDN","ADUserDNSearchFilter","ADServerStartTLS","shortened","gridTemplateColumns","gridGap","buttonTray","overlayAction","protocolRadioOptions","adUserDnRows","formFieldStyles","updateUserField","newUserField","updatePwordField","updateADUserField","newADUserDNsField","customIDPValidation","i","push","inputs","_","placeholder","Add","splice","RemoveIcon","getRandomString","Casino","Delete","RadioGroupSelector","formFieldRow","Typography","gutterBottom","enableTLS","security","enableAutoCert","enableCustomCerts","minioCertificates","certificates","caCertificates","addFileToCaCertificates","deleteCaCertificate","addCaCertificate","addKeyPair","addFileToKeyPair","deleteKeyPair","minioCertificateRows","fileItem","minWidth","minioCertsContainer","minioCACertsRow","rowActions","keyPair","FileSelector","encodedValue","cert","key","AddIcon","replicas","encryption","enableEncryption","encryptionType","gemaltoEndpoint","gemaltoToken","gemaltoDomain","gemaltoRetry","awsEndpoint","awsRegion","awsKMSKey","awsAccessKey","awsSecretKey","awsToken","vaultEndpoint","vaultEngine","vaultNamespace","vaultPrefix","vaultAppRoleEngine","vaultId","vaultSecret","vaultRetry","vaultPing","azureEndpoint","azureTenantID","azureClientID","azureClientSecret","gcpProjectID","gcpEndpoint","gcpClientEmail","gcpClientID","gcpPrivateKeyID","gcpPrivateKey","enableCustomCertsForKES","serverCertificate","clientCertificate","vaultCertificate","vaultCA","gemaltoCA","kesSecurityContext","addFileServerCert","addFileClientCert","addFileVaultCert","addFileVaultCa","addFileGemaltoCa","encryptionTypeOptions","mutualTlsConfig","rightSpacer","responsiveContainer","encryptionAvailable","encoded_key","encoded_cert","encryptionValidation","podAffinity","affinity","nodeSelectorLabels","withPodAntiAffinity","setModalErrorSnackMessage","affinityConfigField","affinityFieldLabel","radioField","affinityLabelKey","affinityLabelValue","affinityRow","loading","setLoading","keyValueMap","setKeyValueMap","keyValuePairs","setKeyValuePairs","keyOptions","setKeyOptions","api","then","res","k","catch","err","vl","kvp","kvs","a","indexOf","join","valid","splittedLabels","forEach","splitItem","affinityHelpText","newKey","arrCp","assign","v","setErrorSnackMessage","wrapText","wordWrap","deleteDialogStyles","namespace","addNamespaceOpen","closeAddNamespaceModalAndRefresh","addNamespaceLoading","setAddNamespaceLoading","ConfirmDialog","confirmText","confirmButtonProps","isOpen","isLoading","onConfirm","confirmationContent","DialogContentText","volumeSize","tenantSize","sizeFactor","drivesPerServer","nodes","memoryNode","ecParity","ecParityChoices","cleanECChoices","resourcesSize","distribution","ecParityCalc","limitSize","cpuToUse","integrationSelection","table","usableInformation","storageFactors","find","erasureCode","Divider","Table","TableBody","TableRow","TableCell","scope","align","typeSelection","storageClass","disks","niceBytes","pvSize","persistentVolumes","rawCapacity","maxCapacity","Math","floor","maxFailureTolerations","CPU","memory","driveSize","sizeUnit","maxAllocatableResources","maxCPUsUse","maxMemorySize","resourcesSpecifyLimit","resourcesCPURequestError","resourcesCPURequest","resourcesCPULimitError","resourcesCPULimit","resourcesMemoryRequestError","resourcesMemoryRequest","resourcesMemoryLimitError","resourcesMemoryLimit","compositeFieldContainer","compositeAddOn","memoryExists","cpuExists","maxMemory","mem_priority","max_allocatable_mem","cpu_priority","max_allocatable_cpu","maxAllocatableCPU","baseCpuUse","max","baseMemoryUse","isNaN","validity","log","errorFlag","setErrorFlag","nodeError","setNodeError","ecCodeValidated","erasureCodeCalc","includes","defaultEC","factor","getBytes","clusterCapacity","unit","distrCalculate","calculateDistribution","parsedSize","commonValidation","trim","ecList","ecListTransform","k8sfactorForDropdown","selectedStorageType","formToRender","updateMainField","undefined","setConfigs","mkPanelConfigurations","mainSelection","resourcesConfigurations","aws","azure","gcp","variantSelectorLabel","variantSelectorValues","configurations","sizingComponent","default","tenantName","setStorageClassesList","setLimitSize","sizePreview","emptyNamespace","setEmptyNamespace","loadingNamespaceInfo","setLoadingNamespaceInfo","showCreateButton","setShowCreateButton","openAddNSConfirm","setOpenAddNSConfirm","getNamespaceInformation","tenantsList","elements","getLimitSizes","newStorage","stExists","findIndex","detailedError","debounceNamespace","useMemo","debounce","cancel","customNamespaceError","isValid","frmValidationCleanup","refresh","overlayIcon","features","session","formRender","setFormRender","setConfiguration","validPages","resetAddTenantForm","pageBox","settingsCommon","showNewCredentials","setShowNewCredentials","createdAccount","setCreatedAccount","addSending","setAddSending","consoleCaCertificates","consoleCertificate","affinityType","kesReplicas","poolName","generatePoolName","affinityObject","getDefaultAffinity","getNodeSelector","dataSend","access_keys","secret_keys","enable_tls","enable_console","enable_prometheus","service_name","image","expose_minio","expose_console","pools","servers","volumes_per_server","volume_configuration","storage_class_name","securityContext","erasureCodingParity","resources","requests","cpu","limits","image_registry","registry","username","password","logSearchConfiguration","storageSize","postgres_image","postgres_init_image","postgres_securityContext","prometheusConfiguration","sidecar_image","init_image","tenantCerts","consoleCerts","caCerts","consoleCaCerts","ca_certificates","console_ca_certificates","minio","crt","tls","insertEncrypt","gemaltoCAIntroduce","ca","gemalto","keysecure","endpoint","credentials","token","domain","retry","secretsmanager","region","kmskey","accesskey","secretkey","keyvault","tenant_id","client_id","client_secret","secretmanager","project_id","client_email","private_key_id","private_key","vaultKeyPair","vaultCAInsert","vaultTLS","vault","engine","prefix","approle","secret","status","ping","encryptionServerKeyPair","encryptionClientKeyPair","client","server","dataIDP","keyarray","oidc","configuration_url","secret_id","claim_name","callback_url","scopes","active_directory","url","skip_tls_verification","server_insecure","username_format","username_search_filter","group_search_base_dn","group_search_filter","group_name_attribute","user_dns","lookup_bind_dn","lookup_bind_password","user_dn_search_base_dn","user_dn_search_filter","server_start_tls","consoleSAList","newSrvAcc","consoleItem","consoleKey","cancelButton","history","createButton","every","filteredWizardSteps","advancedOnly","CredentialsPrompt","PageHeader","BackLink","PageLayout","GenericWizard","resourceQuotas","quotas","returnQuotas","rsQuota","stCName","hard","used","tenantIsOnline","tenant","currentState","health_status","podAntiAffinity","requiredDuringSchedulingIgnoredDuringExecution","labelSelector","matchExpressions","operator","values","topologyKey","labels","splitKeyValue","nodeSelector","nodeAffinity","nodeSelectorTerms","def","pageName","ADD_TENANT_UPDATE_FIELD","ADD_TENANT_SET_PAGE_VALID","ADD_TENANT_SET_STORAGE_CLASSES_LIST","ADD_TENANT_SET_LIMIT_SIZE","ADD_TENANT_ADD_CA_KEYPAIR","ADD_TENANT_DELETE_CA_KEYPAIR","ADD_TENANT_ADD_FILE_TO_CA_KEYPAIR","ADD_TENANT_ADD_MINIO_KEYPAIR","ADD_TENANT_DELETE_MINIO_KEYPAIR","ADD_TENANT_ADD_FILE_TO_MINIO_KEYPAIR","ADD_TENANT_ENCRYPTION_SERVER_CERT","ADD_TENANT_ENCRYPTION_CLIENT_CERT","ADD_TENANT_ENCRYPTION_VAULT_CERT","ADD_TENANT_ENCRYPTION_VAULT_CA","ADD_TENANT_ENCRYPTION_GEMALTO_CA","ADD_TENANT_RESET_FORM","setTenantDetailsLoad","TENANT_DETAILS_SET_LOADING","setTenantName","tenantNamespace","TENANT_DETAILS_SET_CURRENT_TENANT","setTenantInfo","TENANT_DETAILS_SET_TENANT","setTenantTab","tab","TENANT_DETAILS_SET_TAB","errorBlock","withBreak"],"sourceRoot":""} \ No newline at end of file diff --git a/portal-ui/build/static/js/1069.b301b69c.chunk.js b/portal-ui/build/static/js/1069.6dfe4ad0.chunk.js similarity index 99% rename from portal-ui/build/static/js/1069.b301b69c.chunk.js rename to portal-ui/build/static/js/1069.6dfe4ad0.chunk.js index 90c6363ef..d35f0f278 100644 --- a/portal-ui/build/static/js/1069.b301b69c.chunk.js +++ b/portal-ui/build/static/js/1069.6dfe4ad0.chunk.js @@ -1,2 +1,2 @@ -"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1069],{82461:function(e,a,n){n.d(a,{Z:function(){return j}});var t=n(23430),r=n(18489),o=n(50390),i=n(38342),s=n.n(i),l=n(25594),c=n(14602),d=n(94187),u=n(95467),m=n(46529),p=n(94258),x=n(86509),f=n(4285),h=n(72462),v=n(97538),g=n(82981),Z=n(62559),j=(0,f.Z)((function(e){return(0,x.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},h.YI),h.Hr),{},{valueString:{maxWidth:350,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginTop:2},fileInputField:{margin:"13px 0","@media (max-width: 900px)":{flexFlow:"column"}}},h.bV),{},{inputLabel:(0,r.Z)((0,r.Z)({},h.YI.inputLabel),{},{fontWeight:"normal"}),textBoxContainer:(0,r.Z)((0,r.Z)({},h.YI.textBoxContainer),{},{maxWidth:"100%",border:"1px solid #eaeaea",paddingLeft:"15px"})}))}))((function(e){var a=e.label,n=e.classes,r=e.onChange,i=e.id,x=e.name,f=e.disabled,h=void 0!==f&&f,j=e.tooltip,b=void 0===j?"":j,C=e.required,y=e.error,N=void 0===y?"":y,S=e.accept,k=void 0===S?"":S,M=e.value,w=void 0===M?"":M,F=(0,o.useState)(!1),E=(0,t.Z)(F,2),L=E[0],B=E[1];return(0,Z.jsx)(o.Fragment,{children:(0,Z.jsxs)(l.ZP,{item:!0,xs:12,className:"".concat(n.fileInputField," ").concat(n.fieldBottom," ").concat(n.fieldContainer," ").concat(""!==N?n.errorInField:""),children:[""!==a&&(0,Z.jsxs)(c.Z,{htmlFor:i,className:"".concat(""!==N?n.fieldLabelError:""," ").concat(n.inputLabel),children:[(0,Z.jsxs)("span",{children:[a,C?"*":""]}),""!==b&&(0,Z.jsx)("div",{className:n.tooltipContainer,children:(0,Z.jsx)(d.Z,{title:b,placement:"top-start",children:(0,Z.jsx)("div",{className:n.tooltip,children:(0,Z.jsx)(v.Z,{})})})})]}),L||""===w?(0,Z.jsxs)("div",{className:n.textBoxContainer,children:[(0,Z.jsx)("input",{type:"file",name:x,onChange:function(e){var a=s()(e,"target.files[0].name","");!function(e,a){var n=e.target.files[0],t=new FileReader;t.readAsDataURL(n),t.onload=function(){var e=t.result;if(e){var n=e.toString().split("base64,");2===n.length&&a(n[1])}}}(e,(function(e){r(e,a)}))},accept:k,required:C,disabled:h,className:n.fileInputField}),""!==w&&(0,Z.jsx)(u.Z,{color:"primary","aria-label":"upload picture",component:"span",onClick:function(){B(!1)},disableRipple:!1,disableFocusRipple:!1,size:"small",children:(0,Z.jsx)(p.Z,{})}),""!==N&&(0,Z.jsx)(g.Z,{errorMessage:N})]}):(0,Z.jsxs)("div",{className:n.fileReselect,children:[(0,Z.jsx)("div",{className:n.valueString,children:w}),(0,Z.jsx)(u.Z,{color:"primary","aria-label":"upload picture",component:"span",onClick:function(){B(!0)},disableRipple:!1,disableFocusRipple:!1,size:"small",children:(0,Z.jsx)(m.Z,{})})]})]})})}))},66964:function(e,a,n){var t=n(18489),r=n(50390),o=n(12066),i=n(25594),s=n(14602),l=n(94187),c=n(95467),d=n(86509),u=n(62449),m=n(4285),p=n(72462),x=n(97538),f=n(44977),h=n(62559),v=(0,u.Z)((function(e){return(0,d.Z)((0,t.Z)({},p.gM))}));function g(e){var a=v();return(0,h.jsx)(o.Z,(0,t.Z)({InputProps:{classes:a}},e))}a.Z=(0,m.Z)((function(e){return(0,d.Z)((0,t.Z)((0,t.Z)((0,t.Z)({},p.YI),p.Hr),{},{textBoxContainer:{flexGrow:1,position:"relative"},overlayAction:{position:"absolute",right:5,top:6,"& svg":{maxWidth:15,maxHeight:15},"&.withLabel":{top:5}},inputLabel:(0,t.Z)((0,t.Z)({},p.YI.inputLabel),{},{fontWeight:"normal"})}))}))((function(e){var a=e.label,n=e.onChange,o=e.value,d=e.id,u=e.name,m=e.type,p=void 0===m?"text":m,v=e.autoComplete,Z=void 0===v?"off":v,j=e.disabled,b=void 0!==j&&j,C=e.multiline,y=void 0!==C&&C,N=e.tooltip,S=void 0===N?"":N,k=e.index,M=void 0===k?0:k,w=e.error,F=void 0===w?"":w,E=e.required,L=void 0!==E&&E,B=e.placeholder,I=void 0===B?"":B,R=e.min,z=e.max,D=e.overlayIcon,A=void 0===D?null:D,K=e.overlayObject,P=void 0===K?null:K,W=e.extraInputProps,O=void 0===W?{}:W,T=e.overlayAction,H=e.noLabelMinWidth,V=void 0!==H&&H,Y=e.pattern,_=void 0===Y?"":Y,q=e.autoFocus,U=void 0!==q&&q,$=e.classes,G=e.className,Q=void 0===G?"":G,X=(0,t.Z)({"data-index":M},O);return"number"===p&&R&&(X.min=R),"number"===p&&z&&(X.max=z),""!==_&&(X.pattern=_),(0,h.jsx)(r.Fragment,{children:(0,h.jsxs)(i.ZP,{container:!0,className:(0,f.Z)(""!==Q?Q:"",""!==F?$.errorInField:$.inputBoxContainer),children:[""!==a&&(0,h.jsxs)(s.Z,{htmlFor:d,className:V?$.noMinWidthLabel:$.inputLabel,children:[(0,h.jsxs)("span",{children:[a,L?"*":""]}),""!==S&&(0,h.jsx)("div",{className:$.tooltipContainer,children:(0,h.jsx)(l.Z,{title:S,placement:"top-start",children:(0,h.jsx)("div",{className:$.tooltip,children:(0,h.jsx)(x.Z,{})})})})]}),(0,h.jsxs)("div",{className:$.textBoxContainer,children:[(0,h.jsx)(g,{id:d,name:u,fullWidth:!0,value:o,autoFocus:U,disabled:b,onChange:n,type:p,multiline:y,autoComplete:Z,inputProps:X,error:""!==F,helperText:F,placeholder:I,className:$.inputRebase}),A&&(0,h.jsx)("div",{className:"".concat($.overlayAction," ").concat(""!==a?"withLabel":""),children:(0,h.jsx)(c.Z,{onClick:T?function(){T()}:function(){return null},size:"small",disableFocusRipple:!1,disableRipple:!1,disableTouchRipple:!1,children:A})}),P&&(0,h.jsx)("div",{className:"".concat($.overlayAction," ").concat(""!==a?"withLabel":""),children:P})]})]})})}))},76352:function(e,a,n){n.d(a,{Z:function(){return M}});var t,r=n(23430),o=n(18489),i=n(50390),s=n(34424),l=n(95467),c=n(97771),d=n(84402),u=n(78426),m=n(93085),p=n(86509),x=n(4285),f=n(72462),h=n(44149),v=n(38342),g=n.n(v),Z=n(92125),j=n(19538),b=n(21278),C=n(62559),y=function(){clearInterval(t)},N={displayErrorMessage:h.zb},S=(0,s.$j)((function(e){return{modalSnackMessage:e.system.modalSnackBar}}),N)((0,x.Z)((function(e){return(0,p.Z)({modalErrorContainer:{position:"absolute",marginTop:10,width:"80%",backgroundColor:"#fff",border:"#C72C48 1px solid",borderLeftWidth:12,borderRadius:3,zIndex:1e3,padding:"10px 15px",left:"50%",transform:"translateX(-50%)",opacity:0,transitionDuration:"0.2s"},modalErrorShow:{opacity:1},closeButton:{position:"absolute",right:5,fontSize:"small",border:0,backgroundColor:"#fff",cursor:"pointer"},errorTitle:{display:"flex",alignItems:"center"},errorLabel:{color:"#000",fontSize:18,fontWeight:500,marginLeft:5,marginRight:25},messageIcon:{color:"#C72C48",display:"flex","& svg":{width:32,height:32}},detailsButton:{color:"#9C9C9C",display:"flex",alignItems:"center",border:0,backgroundColor:"transparent",paddingLeft:5,fontSize:14,transformDuration:"0.3s",cursor:"pointer"},extraDetailsContainer:{fontStyle:"italic",color:"#9C9C9C",lineHeight:0,padding:"0 10px",transition:"all .2s ease-in-out",overflow:"hidden"},extraDetailsOpen:{lineHeight:1,padding:"3px 10px"},arrowElement:{marginLeft:-5},arrowOpen:{transform:"rotateZ(90deg)",transformDuration:"0.3s"}})}))((function(e){var a=e.classes,n=e.modalSnackMessage,o=e.displayErrorMessage,s=e.customStyle,l=(0,i.useState)(!1),c=(0,r.Z)(l,2),d=c[0],u=c[1],m=(0,i.useState)(!1),p=(0,r.Z)(m,2),x=p[0],f=p[1],h=(0,i.useCallback)((function(){f(!1)}),[]);(0,i.useEffect)((function(){x||(o({detailedError:"",errorMessage:""}),u(!1))}),[o,x]),(0,i.useEffect)((function(){""!==n.message&&"error"===n.type&&f(!0)}),[h,n.message,n.type]);var v=g()(n,"message",""),N=g()(n,"detailedErrorMsg","");return"error"!==n.type||""===v?null:(0,C.jsx)(i.Fragment,{children:(0,C.jsxs)("div",{className:"".concat(a.modalErrorContainer," ").concat(x?a.modalErrorShow:""),style:s,onMouseOver:y,onMouseLeave:function(){t=setInterval(h,1e4)},children:[(0,C.jsx)("button",{className:a.closeButton,onClick:h,children:(0,C.jsx)(b.Z,{})}),(0,C.jsxs)("div",{className:a.errorTitle,children:[(0,C.jsx)("span",{className:a.messageIcon,children:(0,C.jsx)(j.Z,{})}),(0,C.jsx)("span",{className:a.errorLabel,children:v})]}),""!==N&&(0,C.jsxs)(i.Fragment,{children:[(0,C.jsx)("div",{className:a.detailsContainerLink,children:(0,C.jsxs)("button",{className:a.detailsButton,onClick:function(){u(!d)},children:["Details",(0,C.jsx)(Z.Z,{className:"".concat(a.arrowElement," ").concat(d?a.arrowOpen:"")})]})}),(0,C.jsx)("div",{className:"".concat(a.extraDetailsContainer," ").concat(d?a.extraDetailsOpen:""),children:N})]})]})})}))),k=(0,s.$j)((function(e){return{modalSnackMessage:e.system.modalSnackBar}}),{setModalSnackMessage:h.MK}),M=(0,x.Z)((function(e){return(0,p.Z)((0,o.Z)((0,o.Z)({},f.Qw),{},{root:{"& .MuiPaper-root":{padding:"1rem 2rem 2rem 1rem"}},content:{padding:25,paddingBottom:0},customDialogSize:{width:"100%",maxWidth:765}},f.sN))}))(k((function(e){var a=e.onClose,n=e.modalOpen,t=e.title,s=e.children,p=e.classes,x=e.wideLimit,f=void 0===x||x,h=e.modalSnackMessage,v=e.noContentPadding,g=e.setModalSnackMessage,Z=e.titleIcon,j=void 0===Z?null:Z,y=(0,i.useState)(!1),N=(0,r.Z)(y,2),k=N[0],M=N[1];(0,i.useEffect)((function(){g("")}),[g]),(0,i.useEffect)((function(){if(h){if(""===h.message)return void M(!1);"error"!==h.type&&M(!0)}}),[h]);var w=f?{classes:{paper:p.customDialogSize}}:{maxWidth:"lg",fullWidth:!0},F="";return h&&(F=h.detailedErrorMsg,(""===h.detailedErrorMsg||h.detailedErrorMsg.length<5)&&(F=h.message)),(0,C.jsxs)(d.Z,(0,o.Z)((0,o.Z)({open:n,classes:p},w),{},{scroll:"paper",onClose:function(e,n){"backdropClick"!==n&&a()},className:p.root,children:[(0,C.jsxs)(u.Z,{className:p.title,children:[(0,C.jsxs)("div",{className:p.titleText,children:[j," ",t]}),(0,C.jsx)("div",{className:p.closeContainer,children:(0,C.jsx)(l.Z,{"aria-label":"close",className:p.closeButton,onClick:a,disableRipple:!0,size:"small",children:(0,C.jsx)(b.Z,{})})})]}),(0,C.jsx)(S,{}),(0,C.jsx)(c.Z,{open:k,className:p.snackBarModal,onClose:function(){M(!1),g("")},message:F,ContentProps:{className:"".concat(p.snackBar," ").concat(h&&"error"===h.type?p.errorSnackBar:"")},autoHideDuration:h&&"error"===h.type?1e4:5e3}),(0,C.jsx)(m.Z,{className:v?"":p.content,children:s})]}))})))},81069:function(e,a,n){n.r(a);var t=n(23430),r=n(18489),o=n(50390),i=n(38342),s=n.n(i),l=n(34424),c=n(86509),d=n(4285),u=n(66946),m=n(81378),p=n(25594),x=n(72462),f=n(44149),h=n(66964),v=n(82461),g=n(30324),Z=n(76352),j=n(77138),b=n(62559),C=(0,l.$j)(null,{setModalErrorSnackMessage:f.zb});a.default=(0,d.Z)((function(e){return(0,c.Z)((0,r.Z)((0,r.Z)({buttonContainer:{textAlign:"right"}},x.oO),x.DF))}))(C((function(e){var a=e.open,n=e.closeModalAndRefresh,r=e.classes,i=e.tierData,l=e.setModalErrorSnackMessage,c=(0,o.useState)(!1),d=(0,t.Z)(c,2),x=d[0],f=d[1],C=(0,o.useState)(""),y=(0,t.Z)(C,2),N=y[0],S=y[1],k=(0,o.useState)(""),M=(0,t.Z)(k,2),w=M[0],F=M[1],E=(0,o.useState)(""),L=(0,t.Z)(E,2),B=L[0],I=L[1],R=(0,o.useState)(""),z=(0,t.Z)(R,2),D=z[0],A=z[1],K=(0,o.useState)(""),P=(0,t.Z)(K,2),W=P[0],O=P[1],T=(0,o.useState)(""),H=(0,t.Z)(T,2),V=H[0],Y=H[1],_=(0,o.useState)(!0),q=(0,t.Z)(_,2),U=q[0],$=q[1],G=s()(i,"type",""),Q=s()(i,"".concat(G,".name"),"");(0,o.useEffect)((function(){var e=!0;"s3"===G||"azure"===G?""!==W&&""!==V||(e=!1):"gcs"===G&&""===D&&(e=!1),$(e)}),[V,W,D,G]);return(0,b.jsx)(Z.Z,{modalOpen:a,titleIcon:(0,b.jsx)(j.mB,{}),onClose:function(){n(!1)},title:"Update Credentials - ".concat(G," / ").concat(Q),children:(0,b.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),f(!0),function(){var e={};"s3"===G||"azure"===G?e={access_key:W,secret_key:V}:"gcs"===G&&(e={creds:D}),""!==Q?g.Z.invoke("PUT","/api/v1/admin/tiers/".concat(G,"/").concat(Q,"/credentials"),e).then((function(){f(!1),n(!0)})).catch((function(e){f(!1),l(e)})):l({errorMessage:"There was an error retrieving tier information",detailedError:""})}()},children:(0,b.jsxs)(p.ZP,{container:!0,children:[(0,b.jsxs)(p.ZP,{item:!0,xs:12,children:["s3"===G&&(0,b.jsxs)(o.Fragment,{children:[(0,b.jsx)("div",{className:r.formFieldRow,children:(0,b.jsx)(h.Z,{id:"accessKey",name:"accessKey",label:"Access Key",placeholder:"Enter Access Key",value:N,onChange:function(e){S(e.target.value)}})}),(0,b.jsx)("div",{className:r.formFieldRow,children:(0,b.jsx)(h.Z,{id:"secretKey",name:"secretKey",label:"Secret Key",placeholder:"Enter Secret Key",value:w,onChange:function(e){F(e.target.value)}})})]}),"gcs"===G&&(0,b.jsx)(o.Fragment,{children:(0,b.jsx)(v.Z,{accept:".json",id:"creds",label:"Credentials",name:"creds",onChange:function(e,a){A(e),I(a)},value:B})}),"azure"===G&&(0,b.jsxs)(o.Fragment,{children:[(0,b.jsx)("div",{className:r.formFieldRow,children:(0,b.jsx)(h.Z,{id:"accountName",name:"accountName",label:"Account Name",placeholder:"Enter Account Name",value:W,onChange:function(e){O(e.target.value)}})}),(0,b.jsx)("div",{className:r.formFieldRow,children:(0,b.jsx)(h.Z,{id:"accountKey",name:"accountKey",label:"Account Key",placeholder:"Enter Account Key",value:V,onChange:function(e){Y(e.target.value)}})})]})]}),(0,b.jsx)(p.ZP,{item:!0,xs:12,className:r.buttonContainer,children:(0,b.jsx)(u.Z,{type:"submit",variant:"contained",color:"primary",disabled:x||!U,children:"Save"})}),x&&(0,b.jsx)(p.ZP,{item:!0,xs:12,children:(0,b.jsx)(m.Z,{})})]})})})})))},82981:function(e,a,n){var t=n(50390),r=n(35477),o=n(86509),i=n(4285),s=n(62559);a.Z=(0,i.Z)((function(e){var a;return(0,o.Z)({errorBlock:{color:(null===(a=e.palette)||void 0===a?void 0:a.error.main)||"#C83B51"}})}))((function(e){var a=e.classes,n=e.errorMessage,o=e.withBreak,i=void 0===o||o;return(0,s.jsxs)(t.Fragment,{children:[i&&(0,s.jsx)("br",{}),(0,s.jsx)(r.Z,{component:"p",variant:"body1",className:a.errorBlock,children:n})]})}))},46529:function(e,a,n){var t=n(64119);a.Z=void 0;var r=t(n(66830)),o=n(62559),i=(0,r.default)((0,o.jsx)("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"}),"AttachFile");a.Z=i},94258:function(e,a,n){var t=n(64119);a.Z=void 0;var r=t(n(66830)),o=n(62559),i=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");a.Z=i}}]); -//# sourceMappingURL=1069.b301b69c.chunk.js.map \ No newline at end of file +"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1069],{82461:function(e,a,n){n.d(a,{Z:function(){return j}});var t=n(23430),r=n(18489),o=n(50390),i=n(38342),s=n.n(i),l=n(25594),c=n(14602),d=n(94187),u=n(95467),m=n(46529),p=n(94258),x=n(86509),f=n(4285),h=n(72462),v=n(97538),g=n(82981),Z=n(62559),j=(0,f.Z)((function(e){return(0,x.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},h.YI),h.Hr),{},{valueString:{maxWidth:350,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginTop:2},fileInputField:{margin:"13px 0","@media (max-width: 900px)":{flexFlow:"column"}}},h.bV),{},{inputLabel:(0,r.Z)((0,r.Z)({},h.YI.inputLabel),{},{fontWeight:"normal"}),textBoxContainer:(0,r.Z)((0,r.Z)({},h.YI.textBoxContainer),{},{maxWidth:"100%",border:"1px solid #eaeaea",paddingLeft:"15px"})}))}))((function(e){var a=e.label,n=e.classes,r=e.onChange,i=e.id,x=e.name,f=e.disabled,h=void 0!==f&&f,j=e.tooltip,b=void 0===j?"":j,C=e.required,y=e.error,N=void 0===y?"":y,S=e.accept,k=void 0===S?"":S,M=e.value,w=void 0===M?"":M,F=(0,o.useState)(!1),E=(0,t.Z)(F,2),L=E[0],B=E[1];return(0,Z.jsx)(o.Fragment,{children:(0,Z.jsxs)(l.ZP,{item:!0,xs:12,className:"".concat(n.fileInputField," ").concat(n.fieldBottom," ").concat(n.fieldContainer," ").concat(""!==N?n.errorInField:""),children:[""!==a&&(0,Z.jsxs)(c.Z,{htmlFor:i,className:"".concat(""!==N?n.fieldLabelError:""," ").concat(n.inputLabel),children:[(0,Z.jsxs)("span",{children:[a,C?"*":""]}),""!==b&&(0,Z.jsx)("div",{className:n.tooltipContainer,children:(0,Z.jsx)(d.Z,{title:b,placement:"top-start",children:(0,Z.jsx)("div",{className:n.tooltip,children:(0,Z.jsx)(v.Z,{})})})})]}),L||""===w?(0,Z.jsxs)("div",{className:n.textBoxContainer,children:[(0,Z.jsx)("input",{type:"file",name:x,onChange:function(e){var a=s()(e,"target.files[0].name","");!function(e,a){var n=e.target.files[0],t=new FileReader;t.readAsDataURL(n),t.onload=function(){var e=t.result;if(e){var n=e.toString().split("base64,");2===n.length&&a(n[1])}}}(e,(function(e){r(e,a)}))},accept:k,required:C,disabled:h,className:n.fileInputField}),""!==w&&(0,Z.jsx)(u.Z,{color:"primary","aria-label":"upload picture",component:"span",onClick:function(){B(!1)},disableRipple:!1,disableFocusRipple:!1,size:"small",children:(0,Z.jsx)(p.Z,{})}),""!==N&&(0,Z.jsx)(g.Z,{errorMessage:N})]}):(0,Z.jsxs)("div",{className:n.fileReselect,children:[(0,Z.jsx)("div",{className:n.valueString,children:w}),(0,Z.jsx)(u.Z,{color:"primary","aria-label":"upload picture",component:"span",onClick:function(){B(!0)},disableRipple:!1,disableFocusRipple:!1,size:"small",children:(0,Z.jsx)(m.Z,{})})]})]})})}))},66964:function(e,a,n){var t=n(18489),r=n(50390),o=n(12066),i=n(25594),s=n(14602),l=n(94187),c=n(95467),d=n(86509),u=n(62449),m=n(4285),p=n(72462),x=n(97538),f=n(44977),h=n(62559),v=(0,u.Z)((function(e){return(0,d.Z)((0,t.Z)({},p.gM))}));function g(e){var a=v();return(0,h.jsx)(o.Z,(0,t.Z)({InputProps:{classes:a}},e))}a.Z=(0,m.Z)((function(e){return(0,d.Z)((0,t.Z)((0,t.Z)((0,t.Z)({},p.YI),p.Hr),{},{textBoxContainer:{flexGrow:1,position:"relative"},overlayAction:{position:"absolute",right:5,top:6,"& svg":{maxWidth:15,maxHeight:15},"&.withLabel":{top:5}},inputLabel:(0,t.Z)((0,t.Z)({},p.YI.inputLabel),{},{fontWeight:"normal"})}))}))((function(e){var a=e.label,n=e.onChange,o=e.value,d=e.id,u=e.name,m=e.type,p=void 0===m?"text":m,v=e.autoComplete,Z=void 0===v?"off":v,j=e.disabled,b=void 0!==j&&j,C=e.multiline,y=void 0!==C&&C,N=e.tooltip,S=void 0===N?"":N,k=e.index,M=void 0===k?0:k,w=e.error,F=void 0===w?"":w,E=e.required,L=void 0!==E&&E,B=e.placeholder,I=void 0===B?"":B,R=e.min,z=e.max,D=e.overlayIcon,A=void 0===D?null:D,K=e.overlayObject,P=void 0===K?null:K,W=e.extraInputProps,O=void 0===W?{}:W,T=e.overlayAction,H=e.noLabelMinWidth,V=void 0!==H&&H,Y=e.pattern,_=void 0===Y?"":Y,q=e.autoFocus,U=void 0!==q&&q,$=e.classes,G=e.className,Q=void 0===G?"":G,X=(0,t.Z)({"data-index":M},O);return"number"===p&&R&&(X.min=R),"number"===p&&z&&(X.max=z),""!==_&&(X.pattern=_),(0,h.jsx)(r.Fragment,{children:(0,h.jsxs)(i.ZP,{container:!0,className:(0,f.Z)(""!==Q?Q:"",""!==F?$.errorInField:$.inputBoxContainer),children:[""!==a&&(0,h.jsxs)(s.Z,{htmlFor:d,className:V?$.noMinWidthLabel:$.inputLabel,children:[(0,h.jsxs)("span",{children:[a,L?"*":""]}),""!==S&&(0,h.jsx)("div",{className:$.tooltipContainer,children:(0,h.jsx)(l.Z,{title:S,placement:"top-start",children:(0,h.jsx)("div",{className:$.tooltip,children:(0,h.jsx)(x.Z,{})})})})]}),(0,h.jsxs)("div",{className:$.textBoxContainer,children:[(0,h.jsx)(g,{id:d,name:u,fullWidth:!0,value:o,autoFocus:U,disabled:b,onChange:n,type:p,multiline:y,autoComplete:Z,inputProps:X,error:""!==F,helperText:F,placeholder:I,className:$.inputRebase}),A&&(0,h.jsx)("div",{className:"".concat($.overlayAction," ").concat(""!==a?"withLabel":""),children:(0,h.jsx)(c.Z,{onClick:T?function(){T()}:function(){return null},size:"small",disableFocusRipple:!1,disableRipple:!1,disableTouchRipple:!1,children:A})}),P&&(0,h.jsx)("div",{className:"".concat($.overlayAction," ").concat(""!==a?"withLabel":""),children:P})]})]})})}))},76352:function(e,a,n){n.d(a,{Z:function(){return M}});var t,r=n(23430),o=n(18489),i=n(50390),s=n(34424),l=n(95467),c=n(97771),d=n(84402),u=n(78426),m=n(93085),p=n(86509),x=n(4285),f=n(72462),h=n(44149),v=n(38342),g=n.n(v),Z=n(92125),j=n(19538),b=n(21278),C=n(62559),y=function(){clearInterval(t)},N={displayErrorMessage:h.zb},S=(0,s.$j)((function(e){return{modalSnackMessage:e.system.modalSnackBar}}),N)((0,x.Z)((function(e){return(0,p.Z)({modalErrorContainer:{position:"absolute",marginTop:10,width:"80%",backgroundColor:"#fff",border:"#C72C48 1px solid",borderLeftWidth:12,borderRadius:3,zIndex:1e3,padding:"10px 15px",left:"50%",transform:"translateX(-50%)",opacity:0,transitionDuration:"0.2s"},modalErrorShow:{opacity:1},closeButton:{position:"absolute",right:5,fontSize:"small",border:0,backgroundColor:"#fff",cursor:"pointer"},errorTitle:{display:"flex",alignItems:"center"},errorLabel:{color:"#000",fontSize:18,fontWeight:500,marginLeft:5,marginRight:25},messageIcon:{color:"#C72C48",display:"flex","& svg":{width:32,height:32}},detailsButton:{color:"#9C9C9C",display:"flex",alignItems:"center",border:0,backgroundColor:"transparent",paddingLeft:5,fontSize:14,transformDuration:"0.3s",cursor:"pointer"},extraDetailsContainer:{fontStyle:"italic",color:"#9C9C9C",lineHeight:0,padding:"0 10px",transition:"all .2s ease-in-out",overflow:"hidden"},extraDetailsOpen:{lineHeight:1,padding:"3px 10px"},arrowElement:{marginLeft:-5},arrowOpen:{transform:"rotateZ(90deg)",transformDuration:"0.3s"}})}))((function(e){var a=e.classes,n=e.modalSnackMessage,o=e.displayErrorMessage,s=e.customStyle,l=(0,i.useState)(!1),c=(0,r.Z)(l,2),d=c[0],u=c[1],m=(0,i.useState)(!1),p=(0,r.Z)(m,2),x=p[0],f=p[1],h=(0,i.useCallback)((function(){f(!1)}),[]);(0,i.useEffect)((function(){x||(o({detailedError:"",errorMessage:""}),u(!1))}),[o,x]),(0,i.useEffect)((function(){""!==n.message&&"error"===n.type&&f(!0)}),[h,n.message,n.type]);var v=g()(n,"message",""),N=g()(n,"detailedErrorMsg","");return"error"!==n.type||""===v?null:(0,C.jsx)(i.Fragment,{children:(0,C.jsxs)("div",{className:"".concat(a.modalErrorContainer," ").concat(x?a.modalErrorShow:""),style:s,onMouseOver:y,onMouseLeave:function(){t=setInterval(h,1e4)},children:[(0,C.jsx)("button",{className:a.closeButton,onClick:h,children:(0,C.jsx)(b.Z,{})}),(0,C.jsxs)("div",{className:a.errorTitle,children:[(0,C.jsx)("span",{className:a.messageIcon,children:(0,C.jsx)(j.Z,{})}),(0,C.jsx)("span",{className:a.errorLabel,children:v})]}),""!==N&&(0,C.jsxs)(i.Fragment,{children:[(0,C.jsx)("div",{className:a.detailsContainerLink,children:(0,C.jsxs)("button",{className:a.detailsButton,onClick:function(){u(!d)},children:["Details",(0,C.jsx)(Z.Z,{className:"".concat(a.arrowElement," ").concat(d?a.arrowOpen:"")})]})}),(0,C.jsx)("div",{className:"".concat(a.extraDetailsContainer," ").concat(d?a.extraDetailsOpen:""),children:N})]})]})})}))),k=(0,s.$j)((function(e){return{modalSnackMessage:e.system.modalSnackBar}}),{setModalSnackMessage:h.MK}),M=(0,x.Z)((function(e){return(0,p.Z)((0,o.Z)((0,o.Z)({},f.Qw),{},{root:{"& .MuiPaper-root":{padding:"1rem 2rem 2rem 1rem"}},content:{padding:25,paddingBottom:0},customDialogSize:{width:"100%",maxWidth:765}},f.sN))}))(k((function(e){var a=e.onClose,n=e.modalOpen,t=e.title,s=e.children,p=e.classes,x=e.wideLimit,f=void 0===x||x,h=e.modalSnackMessage,v=e.noContentPadding,g=e.setModalSnackMessage,Z=e.titleIcon,j=void 0===Z?null:Z,y=(0,i.useState)(!1),N=(0,r.Z)(y,2),k=N[0],M=N[1];(0,i.useEffect)((function(){g("")}),[g]),(0,i.useEffect)((function(){if(h){if(""===h.message)return void M(!1);"error"!==h.type&&M(!0)}}),[h]);var w=f?{classes:{paper:p.customDialogSize}}:{maxWidth:"lg",fullWidth:!0},F="";return h&&(F=h.detailedErrorMsg,(""===h.detailedErrorMsg||h.detailedErrorMsg.length<5)&&(F=h.message)),(0,C.jsxs)(d.Z,(0,o.Z)((0,o.Z)({open:n,classes:p},w),{},{scroll:"paper",onClose:function(e,n){"backdropClick"!==n&&a()},className:p.root,children:[(0,C.jsxs)(u.Z,{className:p.title,children:[(0,C.jsxs)("div",{className:p.titleText,children:[j," ",t]}),(0,C.jsx)("div",{className:p.closeContainer,children:(0,C.jsx)(l.Z,{"aria-label":"close",className:p.closeButton,onClick:a,disableRipple:!0,size:"small",children:(0,C.jsx)(b.Z,{})})})]}),(0,C.jsx)(S,{}),(0,C.jsx)(c.Z,{open:k,className:p.snackBarModal,onClose:function(){M(!1),g("")},message:F,ContentProps:{className:"".concat(p.snackBar," ").concat(h&&"error"===h.type?p.errorSnackBar:"")},autoHideDuration:h&&"error"===h.type?1e4:5e3}),(0,C.jsx)(m.Z,{className:v?"":p.content,children:s})]}))})))},81069:function(e,a,n){n.r(a);var t=n(23430),r=n(18489),o=n(50390),i=n(38342),s=n.n(i),l=n(34424),c=n(86509),d=n(4285),u=n(66946),m=n(81378),p=n(25594),x=n(72462),f=n(44149),h=n(66964),v=n(82461),g=n(30324),Z=n(76352),j=n(11387),b=n(62559),C=(0,l.$j)(null,{setModalErrorSnackMessage:f.zb});a.default=(0,d.Z)((function(e){return(0,c.Z)((0,r.Z)((0,r.Z)({buttonContainer:{textAlign:"right"}},x.oO),x.DF))}))(C((function(e){var a=e.open,n=e.closeModalAndRefresh,r=e.classes,i=e.tierData,l=e.setModalErrorSnackMessage,c=(0,o.useState)(!1),d=(0,t.Z)(c,2),x=d[0],f=d[1],C=(0,o.useState)(""),y=(0,t.Z)(C,2),N=y[0],S=y[1],k=(0,o.useState)(""),M=(0,t.Z)(k,2),w=M[0],F=M[1],E=(0,o.useState)(""),L=(0,t.Z)(E,2),B=L[0],I=L[1],R=(0,o.useState)(""),z=(0,t.Z)(R,2),D=z[0],A=z[1],K=(0,o.useState)(""),P=(0,t.Z)(K,2),W=P[0],O=P[1],T=(0,o.useState)(""),H=(0,t.Z)(T,2),V=H[0],Y=H[1],_=(0,o.useState)(!0),q=(0,t.Z)(_,2),U=q[0],$=q[1],G=s()(i,"type",""),Q=s()(i,"".concat(G,".name"),"");(0,o.useEffect)((function(){var e=!0;"s3"===G||"azure"===G?""!==W&&""!==V||(e=!1):"gcs"===G&&""===D&&(e=!1),$(e)}),[V,W,D,G]);return(0,b.jsx)(Z.Z,{modalOpen:a,titleIcon:(0,b.jsx)(j.mB,{}),onClose:function(){n(!1)},title:"Update Credentials - ".concat(G," / ").concat(Q),children:(0,b.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),f(!0),function(){var e={};"s3"===G||"azure"===G?e={access_key:W,secret_key:V}:"gcs"===G&&(e={creds:D}),""!==Q?g.Z.invoke("PUT","/api/v1/admin/tiers/".concat(G,"/").concat(Q,"/credentials"),e).then((function(){f(!1),n(!0)})).catch((function(e){f(!1),l(e)})):l({errorMessage:"There was an error retrieving tier information",detailedError:""})}()},children:(0,b.jsxs)(p.ZP,{container:!0,children:[(0,b.jsxs)(p.ZP,{item:!0,xs:12,children:["s3"===G&&(0,b.jsxs)(o.Fragment,{children:[(0,b.jsx)("div",{className:r.formFieldRow,children:(0,b.jsx)(h.Z,{id:"accessKey",name:"accessKey",label:"Access Key",placeholder:"Enter Access Key",value:N,onChange:function(e){S(e.target.value)}})}),(0,b.jsx)("div",{className:r.formFieldRow,children:(0,b.jsx)(h.Z,{id:"secretKey",name:"secretKey",label:"Secret Key",placeholder:"Enter Secret Key",value:w,onChange:function(e){F(e.target.value)}})})]}),"gcs"===G&&(0,b.jsx)(o.Fragment,{children:(0,b.jsx)(v.Z,{accept:".json",id:"creds",label:"Credentials",name:"creds",onChange:function(e,a){A(e),I(a)},value:B})}),"azure"===G&&(0,b.jsxs)(o.Fragment,{children:[(0,b.jsx)("div",{className:r.formFieldRow,children:(0,b.jsx)(h.Z,{id:"accountName",name:"accountName",label:"Account Name",placeholder:"Enter Account Name",value:W,onChange:function(e){O(e.target.value)}})}),(0,b.jsx)("div",{className:r.formFieldRow,children:(0,b.jsx)(h.Z,{id:"accountKey",name:"accountKey",label:"Account Key",placeholder:"Enter Account Key",value:V,onChange:function(e){Y(e.target.value)}})})]})]}),(0,b.jsx)(p.ZP,{item:!0,xs:12,className:r.buttonContainer,children:(0,b.jsx)(u.Z,{type:"submit",variant:"contained",color:"primary",disabled:x||!U,children:"Save"})}),x&&(0,b.jsx)(p.ZP,{item:!0,xs:12,children:(0,b.jsx)(m.Z,{})})]})})})})))},82981:function(e,a,n){var t=n(50390),r=n(35477),o=n(86509),i=n(4285),s=n(62559);a.Z=(0,i.Z)((function(e){var a;return(0,o.Z)({errorBlock:{color:(null===(a=e.palette)||void 0===a?void 0:a.error.main)||"#C83B51"}})}))((function(e){var a=e.classes,n=e.errorMessage,o=e.withBreak,i=void 0===o||o;return(0,s.jsxs)(t.Fragment,{children:[i&&(0,s.jsx)("br",{}),(0,s.jsx)(r.Z,{component:"p",variant:"body1",className:a.errorBlock,children:n})]})}))},46529:function(e,a,n){var t=n(64119);a.Z=void 0;var r=t(n(66830)),o=n(62559),i=(0,r.default)((0,o.jsx)("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"}),"AttachFile");a.Z=i},94258:function(e,a,n){var t=n(64119);a.Z=void 0;var r=t(n(66830)),o=n(62559),i=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");a.Z=i}}]); +//# sourceMappingURL=1069.6dfe4ad0.chunk.js.map \ No newline at end of file diff --git a/portal-ui/build/static/js/1069.b301b69c.chunk.js.map b/portal-ui/build/static/js/1069.6dfe4ad0.chunk.js.map similarity index 99% rename from portal-ui/build/static/js/1069.b301b69c.chunk.js.map rename to portal-ui/build/static/js/1069.6dfe4ad0.chunk.js.map index 90189d804..d8b950bbe 100644 --- a/portal-ui/build/static/js/1069.b301b69c.chunk.js.map +++ b/portal-ui/build/static/js/1069.6dfe4ad0.chunk.js.map @@ -1 +1 @@ -{"version":3,"file":"static/js/1069.b301b69c.chunk.js","mappings":"yUAuLA,GAAeA,EAAAA,EAAAA,IAvIA,SAACC,GAAD,OACbC,EAAAA,EAAAA,IAAa,kCACRC,EAAAA,IACAC,EAAAA,IAFO,IAGVC,YAAa,CACXC,SAAU,IACVC,WAAY,SACZC,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M,QAAQ,YACRjL,MAAM,UACN9C,SAAUiM,IAAgBc,EAJ5B,oBASDd,IACC,SAAC,KAAD,CAAMvL,MAAI,EAACC,GAAI,GAAf,UACE,SAAC,IAAD,kB,gFCjMd,KAAepC,EAAAA,EAAAA,IA5BA,SAACC,GAAD,aACbC,EAAAA,EAAAA,GAAa,CACXuP,WAAY,CACVlL,OAAO,UAAAtE,EAAMyP,eAAN,eAAe9N,MAAM+N,OAAQ,eAyB1C,EAfmB,SAAC,GAIK,IAHvBtO,EAGsB,EAHtBA,QACA0D,EAEsB,EAFtBA,aAEsB,IADtB6K,UAAAA,OACsB,SACtB,OACE,UAAC,WAAD,WACGA,IAAa,mBACd,SAAC,IAAD,CAAYpL,UAAU,IAAIgL,QAAQ,QAAQnN,UAAWhB,EAAQoO,WAA7D,SACG1K,W,0BC3BL8K,EAAyBC,EAAQ,OAKrCC,EAAQ,OAAU,EAElB,IAAIC,EAAiBH,EAAuBC,EAAQ,QAEhDG,EAAcH,EAAQ,OAEtBI,GAAW,EAAIF,EAAeG,UAAuB,EAAIF,EAAYG,KAAK,OAAQ,CACpFC,EAAG,iQACD,cAEJN,EAAQ,EAAUG,G,0BCfdL,EAAyBC,EAAQ,OAKrCC,EAAQ,OAAU,EAElB,IAAIC,EAAiBH,EAAuBC,EAAQ,QAEhDG,EAAcH,EAAQ,OAEtBI,GAAW,EAAIF,EAAeG,UAAuB,EAAIF,EAAYG,KAAK,OAAQ,CACpFC,EAAG,oLACD,UAEJN,EAAQ,EAAUG","sources":["screens/Console/Common/FormComponents/FileSelector/FileSelector.tsx","screens/Console/Common/FormComponents/FileSelector/utils.ts","screens/Console/Common/FormComponents/InputBoxWrapper/InputBoxWrapper.tsx","screens/Console/Common/FormComponents/ModalError/ModalError.tsx","screens/Console/Common/ModalWrapper/ModalWrapper.tsx","screens/Console/Configurations/TiersConfiguration/UpdateTierCredentialsModal.tsx","screens/shared/ErrorBlock.tsx","../node_modules/@mui/icons-material/AttachFile.js","../node_modules/@mui/icons-material/Cancel.js"],"sourcesContent":["// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useState } from \"react\";\nimport get from \"lodash/get\";\nimport { Grid, InputLabel, Tooltip } from \"@mui/material\";\nimport IconButton from \"@mui/material/IconButton\";\nimport AttachFileIcon from \"@mui/icons-material/AttachFile\";\nimport CancelIcon from \"@mui/icons-material/Cancel\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n fieldBasic,\n fileInputStyles,\n tooltipHelper,\n} from \"../common/styleLibrary\";\nimport { fileProcess } from \"./utils\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport ErrorBlock from \"../../../../shared/ErrorBlock\";\n\ninterface InputBoxProps {\n label: string;\n classes: any;\n onChange: (e: string, i: string) => void;\n id: string;\n name: string;\n disabled?: boolean;\n tooltip?: string;\n required?: boolean;\n error?: string;\n accept?: string;\n value?: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n valueString: {\n maxWidth: 350,\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n marginTop: 2,\n },\n fileInputField: {\n margin: \"13px 0\",\n \"@media (max-width: 900px)\": {\n flexFlow: \"column\",\n },\n },\n ...fileInputStyles,\n inputLabel: {\n ...fieldBasic.inputLabel,\n fontWeight: \"normal\",\n },\n textBoxContainer: {\n ...fieldBasic.textBoxContainer,\n maxWidth: \"100%\",\n border: \"1px solid #eaeaea\",\n paddingLeft: \"15px\",\n },\n });\n\nconst FileSelector = ({\n label,\n classes,\n onChange,\n id,\n name,\n disabled = false,\n tooltip = \"\",\n required,\n error = \"\",\n accept = \"\",\n value = \"\",\n}: InputBoxProps) => {\n const [showFileSelector, setShowSelector] = useState(false);\n\n return (\n \n \n {label !== \"\" && (\n \n \n {label}\n {required ? \"*\" : \"\"}\n \n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n \n )}\n\n {showFileSelector || value === \"\" ? (\n
\n {\n const fileName = get(e, \"target.files[0].name\", \"\");\n fileProcess(e, (data: any) => {\n onChange(data, fileName);\n });\n }}\n accept={accept}\n required={required}\n disabled={disabled}\n className={classes.fileInputField}\n />\n\n {value !== \"\" && (\n {\n setShowSelector(false);\n }}\n disableRipple={false}\n disableFocusRipple={false}\n size=\"small\"\n >\n \n \n )}\n\n {error !== \"\" && }\n
\n ) : (\n
\n
{value}
\n {\n setShowSelector(true);\n }}\n disableRipple={false}\n disableFocusRipple={false}\n size=\"small\"\n >\n \n \n
\n )}\n \n
\n );\n};\n\nexport default withStyles(styles)(FileSelector);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nexport const fileProcess = (evt: any, callback: any) => {\n const file = evt.target.files[0];\n const reader = new FileReader();\n reader.readAsDataURL(file);\n\n reader.onload = () => {\n // reader.readAsDataURL(file) output will be something like: data:application/x-x509-ca-cert;base64,LS0tLS1CRUdJTiBDRVJUSU\n // we care only about the actual base64 part (everything after \"data:application/x-x509-ca-cert;base64,\")\n const fileBase64 = reader.result;\n if (fileBase64) {\n const fileArray = fileBase64.toString().split(\"base64,\");\n\n if (fileArray.length === 2) {\n callback(fileArray[1]);\n }\n }\n };\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React from \"react\";\nimport {\n Grid,\n IconButton,\n InputLabel,\n TextField,\n TextFieldProps,\n Tooltip,\n} from \"@mui/material\";\nimport { OutlinedInputProps } from \"@mui/material/OutlinedInput\";\nimport { InputProps as StandardInputProps } from \"@mui/material/Input\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n fieldBasic,\n inputFieldStyles,\n tooltipHelper,\n} from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport clsx from \"clsx\";\n\ninterface InputBoxProps {\n label: string;\n classes: any;\n onChange: (e: React.ChangeEvent) => void;\n value: string | boolean;\n id: string;\n name: string;\n disabled?: boolean;\n multiline?: boolean;\n type?: string;\n tooltip?: string;\n autoComplete?: string;\n index?: number;\n error?: string;\n required?: boolean;\n placeholder?: string;\n min?: string;\n max?: string;\n overlayIcon?: any;\n overlayAction?: () => void;\n overlayObject?: any;\n extraInputProps?: StandardInputProps[\"inputProps\"];\n noLabelMinWidth?: boolean;\n pattern?: string;\n autoFocus?: boolean;\n className?: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n textBoxContainer: {\n flexGrow: 1,\n position: \"relative\",\n },\n overlayAction: {\n position: \"absolute\",\n right: 5,\n top: 6,\n \"& svg\": {\n maxWidth: 15,\n maxHeight: 15,\n },\n \"&.withLabel\": {\n top: 5,\n },\n },\n inputLabel: {\n ...fieldBasic.inputLabel,\n fontWeight: \"normal\",\n },\n });\n\nconst inputStyles = makeStyles((theme: Theme) =>\n createStyles({\n ...inputFieldStyles,\n })\n);\n\nfunction InputField(props: TextFieldProps) {\n const classes = inputStyles();\n\n return (\n }\n {...props}\n />\n );\n}\n\nconst InputBoxWrapper = ({\n label,\n onChange,\n value,\n id,\n name,\n type = \"text\",\n autoComplete = \"off\",\n disabled = false,\n multiline = false,\n tooltip = \"\",\n index = 0,\n error = \"\",\n required = false,\n placeholder = \"\",\n min,\n max,\n overlayIcon = null,\n overlayObject = null,\n extraInputProps = {},\n overlayAction,\n noLabelMinWidth = false,\n pattern = \"\",\n autoFocus = false,\n classes,\n className = \"\",\n}: InputBoxProps) => {\n let inputProps: any = { \"data-index\": index, ...extraInputProps };\n\n if (type === \"number\" && min) {\n inputProps[\"min\"] = min;\n }\n\n if (type === \"number\" && max) {\n inputProps[\"max\"] = max;\n }\n\n if (pattern !== \"\") {\n inputProps[\"pattern\"] = pattern;\n }\n\n return (\n \n \n {label !== \"\" && (\n \n \n {label}\n {required ? \"*\" : \"\"}\n \n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n \n )}\n\n
\n \n {overlayIcon && (\n \n {\n overlayAction();\n }\n : () => null\n }\n size={\"small\"}\n disableFocusRipple={false}\n disableRipple={false}\n disableTouchRipple={false}\n >\n {overlayIcon}\n \n
\n )}\n {overlayObject && (\n \n {overlayObject}\n \n )}\n \n \n
\n );\n};\n\nexport default withStyles(styles)(InputBoxWrapper);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\n// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport ArrowRightIcon from \"@mui/icons-material/ArrowRight\";\nimport ErrorOutlineIcon from \"@mui/icons-material/ErrorOutline\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"../../../../../store\";\nimport {\n setErrorSnackMessage,\n setModalErrorSnackMessage,\n} from \"../../../../../actions\";\nimport { snackBarMessage } from \"../../../../../types\";\n\ninterface ImodalErrorProps {\n customStyle?: any;\n classes: any;\n modalSnackMessage: snackBarMessage;\n displayErrorMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n modalErrorContainer: {\n position: \"absolute\",\n marginTop: 10,\n width: \"80%\",\n backgroundColor: \"#fff\",\n border: \"#C72C48 1px solid\",\n borderLeftWidth: 12,\n borderRadius: 3,\n zIndex: 1000,\n padding: \"10px 15px\",\n left: \"50%\",\n transform: \"translateX(-50%)\",\n opacity: 0,\n transitionDuration: \"0.2s\",\n },\n modalErrorShow: {\n opacity: 1,\n },\n closeButton: {\n position: \"absolute\",\n right: 5,\n fontSize: \"small\",\n border: 0,\n backgroundColor: \"#fff\",\n cursor: \"pointer\",\n },\n errorTitle: {\n display: \"flex\",\n alignItems: \"center\",\n },\n errorLabel: {\n color: \"#000\",\n fontSize: 18,\n fontWeight: 500,\n marginLeft: 5,\n marginRight: 25,\n },\n messageIcon: {\n color: \"#C72C48\",\n display: \"flex\",\n \"& svg\": {\n width: 32,\n height: 32,\n },\n },\n detailsButton: {\n color: \"#9C9C9C\",\n display: \"flex\",\n alignItems: \"center\",\n border: 0,\n backgroundColor: \"transparent\",\n paddingLeft: 5,\n fontSize: 14,\n transformDuration: \"0.3s\",\n cursor: \"pointer\",\n },\n extraDetailsContainer: {\n fontStyle: \"italic\",\n color: \"#9C9C9C\",\n lineHeight: 0,\n padding: \"0 10px\",\n transition: \"all .2s ease-in-out\",\n overflow: \"hidden\",\n },\n extraDetailsOpen: {\n lineHeight: 1,\n padding: \"3px 10px\",\n },\n arrowElement: {\n marginLeft: -5,\n },\n arrowOpen: {\n transform: \"rotateZ(90deg)\",\n transformDuration: \"0.3s\",\n },\n });\n\nvar timerI: any;\n\nconst startHideTimer = (callbackFunction: () => void) => {\n timerI = setInterval(callbackFunction, 10000);\n};\n\nconst stopHideTimer = () => {\n clearInterval(timerI);\n};\n\nconst ModalError = ({\n classes,\n modalSnackMessage,\n displayErrorMessage,\n customStyle,\n}: ImodalErrorProps) => {\n const [detailsOpen, setDetailsOpen] = useState(false);\n const [displayErrorMsg, setDisplayErrorMsg] = useState(false);\n\n const closeErrorMessage = useCallback(() => {\n setDisplayErrorMsg(false);\n }, []);\n\n useEffect(() => {\n if (!displayErrorMsg) {\n displayErrorMessage({ detailedError: \"\", errorMessage: \"\" });\n setDetailsOpen(false);\n //clearInterval(timerI);\n }\n }, [displayErrorMessage, displayErrorMsg]);\n\n useEffect(() => {\n if (\n modalSnackMessage.message !== \"\" &&\n modalSnackMessage.type === \"error\"\n ) {\n //Error message received, we trigger the animation\n setDisplayErrorMsg(true);\n //startHideTimer(closeErrorMessage);\n }\n }, [closeErrorMessage, modalSnackMessage.message, modalSnackMessage.type]);\n\n const detailsToggle = () => {\n setDetailsOpen(!detailsOpen);\n };\n\n const message = get(modalSnackMessage, \"message\", \"\");\n const messageDetails = get(modalSnackMessage, \"detailedErrorMsg\", \"\");\n\n if (modalSnackMessage.type !== \"error\" || message === \"\") {\n return null;\n }\n\n return (\n \n startHideTimer(closeErrorMessage)}\n >\n \n
\n \n \n \n {message}\n
\n {messageDetails !== \"\" && (\n \n
\n \n
\n \n {messageDetails}\n \n
\n )}\n \n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n modalSnackMessage: state.system.modalSnackBar,\n});\n\nconst mapDispatchToProps = {\n displayErrorMessage: setModalErrorSnackMessage,\n};\n\nconst connector = connect(mapState, mapDispatchToProps);\n\nexport default connector(withStyles(styles)(ModalError));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Snackbar from \"@mui/material/Snackbar\";\nimport { Dialog, DialogContent, DialogTitle } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n deleteDialogStyles,\n snackBarCommon,\n} from \"../FormComponents/common/styleLibrary\";\nimport { AppState } from \"../../../../store\";\nimport { snackBarMessage } from \"../../../../types\";\nimport { setModalSnackMessage } from \"../../../../actions\";\nimport ModalError from \"../FormComponents/ModalError/ModalError\";\nimport CloseIcon from \"@mui/icons-material/Close\";\n\ninterface IModalProps {\n classes: any;\n onClose: () => void;\n modalOpen: boolean;\n title: string | React.ReactNode;\n children: any;\n wideLimit?: boolean;\n modalSnackMessage?: snackBarMessage;\n noContentPadding?: boolean;\n setModalSnackMessage: typeof setModalSnackMessage;\n titleIcon?: React.ReactNode;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...deleteDialogStyles,\n root: {\n \"& .MuiPaper-root\": {\n padding: \"1rem 2rem 2rem 1rem\",\n },\n },\n content: {\n padding: 25,\n paddingBottom: 0,\n },\n customDialogSize: {\n width: \"100%\",\n maxWidth: 765,\n },\n ...snackBarCommon,\n });\n\nconst ModalWrapper = ({\n onClose,\n modalOpen,\n title,\n children,\n classes,\n wideLimit = true,\n modalSnackMessage,\n noContentPadding,\n setModalSnackMessage,\n titleIcon = null,\n}: IModalProps) => {\n const [openSnackbar, setOpenSnackbar] = useState(false);\n\n useEffect(() => {\n setModalSnackMessage(\"\");\n }, [setModalSnackMessage]);\n\n useEffect(() => {\n if (modalSnackMessage) {\n if (modalSnackMessage.message === \"\") {\n setOpenSnackbar(false);\n return;\n }\n // Open SnackBar\n if (modalSnackMessage.type !== \"error\") {\n setOpenSnackbar(true);\n }\n }\n }, [modalSnackMessage]);\n\n const closeSnackBar = () => {\n setOpenSnackbar(false);\n setModalSnackMessage(\"\");\n };\n\n const customSize = wideLimit\n ? {\n classes: {\n paper: classes.customDialogSize,\n },\n }\n : { maxWidth: \"lg\" as const, fullWidth: true };\n\n let message = \"\";\n\n if (modalSnackMessage) {\n message = modalSnackMessage.detailedErrorMsg;\n if (\n modalSnackMessage.detailedErrorMsg === \"\" ||\n modalSnackMessage.detailedErrorMsg.length < 5\n ) {\n message = modalSnackMessage.message;\n }\n }\n\n return (\n {\n if (reason !== \"backdropClick\") {\n onClose(); // close on Esc but not on click outside\n }\n }}\n className={classes.root}\n >\n \n
\n {titleIcon} {title}\n
\n
\n \n \n \n
\n
\n\n \n {\n closeSnackBar();\n }}\n message={message}\n ContentProps={{\n className: `${classes.snackBar} ${\n modalSnackMessage && modalSnackMessage.type === \"error\"\n ? classes.errorSnackBar\n : \"\"\n }`,\n }}\n autoHideDuration={\n modalSnackMessage && modalSnackMessage.type === \"error\" ? 10000 : 5000\n }\n />\n \n {children}\n \n \n );\n};\n\nconst mapState = (state: AppState) => ({\n modalSnackMessage: state.system.modalSnackBar,\n});\n\nconst connector = connect(mapState, {\n setModalSnackMessage,\n});\n\nexport default withStyles(styles)(connector(ModalWrapper));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport get from \"lodash/get\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Button, LinearProgress } from \"@mui/material\";\nimport Grid from \"@mui/material/Grid\";\nimport {\n formFieldStyles,\n modalBasic,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FileSelector from \"../../Common/FormComponents/FileSelector/FileSelector\";\nimport api from \"../../../../common/api\";\nimport { ITierElement } from \"./types\";\nimport { ErrorResponseHandler } from \"../../../../common/types\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport { LockIcon } from \"../../../../icons\";\n\ninterface ITierCredentialsModal {\n open: boolean;\n closeModalAndRefresh: (refresh: boolean) => any;\n classes: any;\n tierData: ITierElement;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n ...formFieldStyles,\n });\n\nconst UpdateTierCredentialsModal = ({\n open,\n closeModalAndRefresh,\n classes,\n tierData,\n setModalErrorSnackMessage,\n}: ITierCredentialsModal) => {\n const [savingTiers, setSavingTiers] = useState(false);\n const [accessKey, setAccessKey] = useState(\"\");\n const [secretKey, setSecretKey] = useState(\"\");\n\n const [creds, setCreds] = useState(\"\");\n const [encodedCreds, setEncodedCreds] = useState(\"\");\n\n const [accountName, setAccountName] = useState(\"\");\n const [accountKey, setAccountKey] = useState(\"\");\n\n // Validations\n const [isFormValid, setIsFormValid] = useState(true);\n\n const type = get(tierData, \"type\", \"\");\n const name = get(tierData, `${type}.name`, \"\");\n\n useEffect(() => {\n let valid = true;\n\n if (type === \"s3\" || type === \"azure\") {\n if (accountName === \"\" || accountKey === \"\") {\n valid = false;\n }\n } else if (type === \"gcs\") {\n if (encodedCreds === \"\") {\n valid = false;\n }\n }\n setIsFormValid(valid);\n }, [accountKey, accountName, encodedCreds, type]);\n\n const addRecord = () => {\n let rules = {};\n\n if (type === \"s3\" || type === \"azure\") {\n rules = {\n access_key: accountName,\n secret_key: accountKey,\n };\n } else if (type === \"gcs\") {\n rules = {\n creds: encodedCreds,\n };\n }\n if (name !== \"\") {\n api\n .invoke(\"PUT\", `/api/v1/admin/tiers/${type}/${name}/credentials`, rules)\n .then(() => {\n setSavingTiers(false);\n closeModalAndRefresh(true);\n })\n .catch((err: ErrorResponseHandler) => {\n setSavingTiers(false);\n setModalErrorSnackMessage(err);\n });\n } else {\n setModalErrorSnackMessage({\n errorMessage: \"There was an error retrieving tier information\",\n detailedError: \"\",\n });\n }\n };\n\n return (\n }\n onClose={() => {\n closeModalAndRefresh(false);\n }}\n title={`Update Credentials - ${type} / ${name}`}\n >\n ) => {\n e.preventDefault();\n setSavingTiers(true);\n addRecord();\n }}\n >\n \n \n {type === \"s3\" && (\n \n
\n ) => {\n setAccessKey(e.target.value);\n }}\n />\n
\n
\n ) => {\n setSecretKey(e.target.value);\n }}\n />\n
\n
\n )}\n {type === \"gcs\" && (\n \n {\n setEncodedCreds(encodedValue);\n setCreds(fileName);\n }}\n value={creds}\n />\n \n )}\n {type === \"azure\" && (\n \n
\n ) => {\n setAccountName(e.target.value);\n }}\n />\n
\n
\n ) => {\n setAccountKey(e.target.value);\n }}\n />\n
\n
\n )}\n
\n \n \n Save\n \n \n {savingTiers && (\n \n \n \n )}\n
\n \n \n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(UpdateTierCredentialsModal));\n","import React from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport { Theme } from \"@mui/material/styles\";\n\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n errorBlock: {\n color: theme.palette?.error.main || \"#C83B51\",\n },\n });\n\ninterface IErrorBlockProps {\n classes: any;\n errorMessage: string;\n withBreak?: boolean;\n}\n\nconst ErrorBlock = ({\n classes,\n errorMessage,\n withBreak = true,\n}: IErrorBlockProps) => {\n return (\n \n {withBreak &&
}\n \n {errorMessage}\n \n
\n );\n};\n\nexport default withStyles(styles)(ErrorBlock);\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _jsxRuntime = require(\"react/jsx-runtime\");\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z\"\n}), 'AttachFile');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _jsxRuntime = require(\"react/jsx-runtime\");\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z\"\n}), 'Cancel');\n\nexports.default = _default;"],"names":["withStyles","theme","createStyles","fieldBasic","tooltipHelper","valueString","maxWidth","whiteSpace","overflow","textOverflow","marginTop","fileInputField","margin","flexFlow","fileInputStyles","inputLabel","fontWeight","textBoxContainer","border","paddingLeft","label","classes","onChange","id","name","disabled","tooltip","required","error","accept","value","useState","showFileSelector","setShowSelector","Grid","item","xs","className","fieldBottom","fieldContainer","errorInField","InputLabel","htmlFor","fieldLabelError","tooltipContainer","Tooltip","title","placement","HelpIcon","type","e","fileName","get","evt","callback","file","target","files","reader","FileReader","readAsDataURL","onload","fileBase64","result","fileArray","toString","split","length","fileProcess","data","IconButton","color","component","onClick","disableRipple","disableFocusRipple","size","Cancel","ErrorBlock","errorMessage","fileReselect","AttachFile","inputStyles","makeStyles","inputFieldStyles","InputField","props","InputProps","flexGrow","position","overlayAction","right","top","maxHeight","autoComplete","multiline","index","placeholder","min","max","overlayIcon","overlayObject","extraInputProps","noLabelMinWidth","pattern","autoFocus","inputProps","container","clsx","inputBoxContainer","noMinWidthLabel","fullWidth","helperText","inputRebase","disableTouchRipple","timerI","stopHideTimer","clearInterval","mapDispatchToProps","displayErrorMessage","setModalErrorSnackMessage","connect","state","modalSnackMessage","system","modalSnackBar","modalErrorContainer","width","backgroundColor","borderLeftWidth","borderRadius","zIndex","padding","left","transform","opacity","transitionDuration","modalErrorShow","closeButton","fontSize","cursor","errorTitle","display","alignItems","errorLabel","marginLeft","marginRight","messageIcon","height","detailsButton","transformDuration","extraDetailsContainer","fontStyle","lineHeight","transition","extraDetailsOpen","arrowElement","arrowOpen","customStyle","detailsOpen","setDetailsOpen","displayErrorMsg","setDisplayErrorMsg","closeErrorMessage","useCallback","useEffect","detailedError","message","messageDetails","Fragment","style","onMouseOver","onMouseLeave","setInterval","Close","ErrorOutline","detailsContainerLink","ArrowRight","connector","setModalSnackMessage","deleteDialogStyles","root","content","paddingBottom","customDialogSize","snackBarCommon","onClose","modalOpen","children","wideLimit","noContentPadding","titleIcon","openSnackbar","setOpenSnackbar","customSize","paper","detailedErrorMsg","Dialog","open","scroll","event","reason","DialogTitle","titleText","closeContainer","Snackbar","snackBarModal","ContentProps","snackBar","errorSnackBar","autoHideDuration","DialogContent","buttonContainer","textAlign","modalBasic","formFieldStyles","closeModalAndRefresh","tierData","savingTiers","setSavingTiers","accessKey","setAccessKey","secretKey","setSecretKey","creds","setCreds","encodedCreds","setEncodedCreds","accountName","setAccountName","accountKey","setAccountKey","isFormValid","setIsFormValid","valid","noValidate","onSubmit","preventDefault","rules","access_key","secret_key","api","then","catch","err","addRecord","formFieldRow","encodedValue","variant","errorBlock","palette","main","withBreak","_interopRequireDefault","require","exports","_createSvgIcon","_jsxRuntime","_default","default","jsx","d"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"static/js/1069.6dfe4ad0.chunk.js","mappings":"yUAuLA,GAAeA,EAAAA,EAAAA,IAvIA,SAACC,GAAD,OACbC,EAAAA,EAAAA,IAAa,kCACRC,EAAAA,IACAC,EAAAA,IAFO,IAGVC,YAAa,CACXC,SAAU,IACVC,WAAY,SACZC,SAAU,SACVC,aAAc,WACdC,UAAW,GAEbC,eAAgB,CACdC,OAAQ,SACR,4BAA6B,CAC3BC,SAAU,YAGXC,EAAAA,IAhBO,IAiBVC,YAAW,kBACNZ,EAAAA,GAAAA,YADK,IAERa,WAAY,WAEdC,kBAAiB,kBACZd,EAAAA,GAAAA,kBADW,IAEdG,SAAU,OACVY,OAAQ,oBACRC,YAAa,cA6GnB,EAzGqB,SAAC,GAYA,IAXpBC,EAWmB,EAXnBA,MACAC,EAUmB,EAVnBA,QACAC,EASmB,EATnBA,SACAC,EAQmB,EARnBA,GACAC,EAOmB,EAPnBA,KAOmB,IANnBC,SAAAA,OAMmB,aALnBC,QAAAA,OAKmB,MALT,GAKS,EAJnBC,EAImB,EAJnBA,SAImB,IAHnBC,MAAAA,OAGmB,MAHX,GAGW,MAFnBC,OAAAA,OAEmB,MAFV,GAEU,MADnBC,MAAAA,OACmB,MADX,GACW,EACnB,GAA4CC,EAAAA,EAAAA,WAAS,GAArD,eAAOC,EAAP,KAAyBC,EAAzB,KAEA,OACE,SAAC,WAAD,WACE,UAACC,EAAA,GAAD,CACEC,MAAI,EACJC,GAAI,GACJC,UAAS,UAAKhB,EAAQV,eAAb,YAA+BU,EAAQiB,YAAvC,YACPjB,EAAQkB,eADD,YAEK,KAAVX,EAAeP,EAAQmB,aAAe,IAL5C,UAOa,KAAVpB,IACC,UAACqB,EAAA,EAAD,CACEC,QAASnB,EACTc,UAAS,UAAe,KAAVT,EAAeP,EAAQsB,gBAAkB,GAA9C,YACPtB,EAAQN,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FormComponents/FileSelector/FileSelector.tsx","screens/Console/Common/FormComponents/FileSelector/utils.ts","screens/Console/Common/FormComponents/InputBoxWrapper/InputBoxWrapper.tsx","screens/Console/Common/FormComponents/ModalError/ModalError.tsx","screens/Console/Common/ModalWrapper/ModalWrapper.tsx","screens/Console/Configurations/TiersConfiguration/UpdateTierCredentialsModal.tsx","screens/shared/ErrorBlock.tsx","../node_modules/@mui/icons-material/AttachFile.js","../node_modules/@mui/icons-material/Cancel.js"],"sourcesContent":["// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useState } from \"react\";\nimport get from \"lodash/get\";\nimport { Grid, InputLabel, Tooltip } from \"@mui/material\";\nimport IconButton from \"@mui/material/IconButton\";\nimport AttachFileIcon from \"@mui/icons-material/AttachFile\";\nimport CancelIcon from \"@mui/icons-material/Cancel\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n fieldBasic,\n fileInputStyles,\n tooltipHelper,\n} from \"../common/styleLibrary\";\nimport { fileProcess } from \"./utils\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport ErrorBlock from \"../../../../shared/ErrorBlock\";\n\ninterface InputBoxProps {\n label: string;\n classes: any;\n onChange: (e: string, i: string) => void;\n id: string;\n name: string;\n disabled?: boolean;\n tooltip?: string;\n required?: boolean;\n error?: string;\n accept?: string;\n value?: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n valueString: {\n maxWidth: 350,\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n marginTop: 2,\n },\n fileInputField: {\n margin: \"13px 0\",\n \"@media (max-width: 900px)\": {\n flexFlow: \"column\",\n },\n },\n ...fileInputStyles,\n inputLabel: {\n ...fieldBasic.inputLabel,\n fontWeight: \"normal\",\n },\n textBoxContainer: {\n ...fieldBasic.textBoxContainer,\n maxWidth: \"100%\",\n border: \"1px solid #eaeaea\",\n paddingLeft: \"15px\",\n },\n });\n\nconst FileSelector = ({\n label,\n classes,\n onChange,\n id,\n name,\n disabled = false,\n tooltip = \"\",\n required,\n error = \"\",\n accept = \"\",\n value = \"\",\n}: InputBoxProps) => {\n const [showFileSelector, setShowSelector] = useState(false);\n\n return (\n \n \n {label !== \"\" && (\n \n \n {label}\n {required ? \"*\" : \"\"}\n \n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n \n )}\n\n {showFileSelector || value === \"\" ? (\n
\n {\n const fileName = get(e, \"target.files[0].name\", \"\");\n fileProcess(e, (data: any) => {\n onChange(data, fileName);\n });\n }}\n accept={accept}\n required={required}\n disabled={disabled}\n className={classes.fileInputField}\n />\n\n {value !== \"\" && (\n {\n setShowSelector(false);\n }}\n disableRipple={false}\n disableFocusRipple={false}\n size=\"small\"\n >\n \n \n )}\n\n {error !== \"\" && }\n
\n ) : (\n
\n
{value}
\n {\n setShowSelector(true);\n }}\n disableRipple={false}\n disableFocusRipple={false}\n size=\"small\"\n >\n \n \n
\n )}\n \n
\n );\n};\n\nexport default withStyles(styles)(FileSelector);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nexport const fileProcess = (evt: any, callback: any) => {\n const file = evt.target.files[0];\n const reader = new FileReader();\n reader.readAsDataURL(file);\n\n reader.onload = () => {\n // reader.readAsDataURL(file) output will be something like: data:application/x-x509-ca-cert;base64,LS0tLS1CRUdJTiBDRVJUSU\n // we care only about the actual base64 part (everything after \"data:application/x-x509-ca-cert;base64,\")\n const fileBase64 = reader.result;\n if (fileBase64) {\n const fileArray = fileBase64.toString().split(\"base64,\");\n\n if (fileArray.length === 2) {\n callback(fileArray[1]);\n }\n }\n };\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React from \"react\";\nimport {\n Grid,\n IconButton,\n InputLabel,\n TextField,\n TextFieldProps,\n Tooltip,\n} from \"@mui/material\";\nimport { OutlinedInputProps } from \"@mui/material/OutlinedInput\";\nimport { InputProps as StandardInputProps } from \"@mui/material/Input\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n fieldBasic,\n inputFieldStyles,\n tooltipHelper,\n} from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport clsx from \"clsx\";\n\ninterface InputBoxProps {\n label: string;\n classes: any;\n onChange: (e: React.ChangeEvent) => void;\n value: string | boolean;\n id: string;\n name: string;\n disabled?: boolean;\n multiline?: boolean;\n type?: string;\n tooltip?: string;\n autoComplete?: string;\n index?: number;\n error?: string;\n required?: boolean;\n placeholder?: string;\n min?: string;\n max?: string;\n overlayIcon?: any;\n overlayAction?: () => void;\n overlayObject?: any;\n extraInputProps?: StandardInputProps[\"inputProps\"];\n noLabelMinWidth?: boolean;\n pattern?: string;\n autoFocus?: boolean;\n className?: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n textBoxContainer: {\n flexGrow: 1,\n position: \"relative\",\n },\n overlayAction: {\n position: \"absolute\",\n right: 5,\n top: 6,\n \"& svg\": {\n maxWidth: 15,\n maxHeight: 15,\n },\n \"&.withLabel\": {\n top: 5,\n },\n },\n inputLabel: {\n ...fieldBasic.inputLabel,\n fontWeight: \"normal\",\n },\n });\n\nconst inputStyles = makeStyles((theme: Theme) =>\n createStyles({\n ...inputFieldStyles,\n })\n);\n\nfunction InputField(props: TextFieldProps) {\n const classes = inputStyles();\n\n return (\n }\n {...props}\n />\n );\n}\n\nconst InputBoxWrapper = ({\n label,\n onChange,\n value,\n id,\n name,\n type = \"text\",\n autoComplete = \"off\",\n disabled = false,\n multiline = false,\n tooltip = \"\",\n index = 0,\n error = \"\",\n required = false,\n placeholder = \"\",\n min,\n max,\n overlayIcon = null,\n overlayObject = null,\n extraInputProps = {},\n overlayAction,\n noLabelMinWidth = false,\n pattern = \"\",\n autoFocus = false,\n classes,\n className = \"\",\n}: InputBoxProps) => {\n let inputProps: any = { \"data-index\": index, ...extraInputProps };\n\n if (type === \"number\" && min) {\n inputProps[\"min\"] = min;\n }\n\n if (type === \"number\" && max) {\n inputProps[\"max\"] = max;\n }\n\n if (pattern !== \"\") {\n inputProps[\"pattern\"] = pattern;\n }\n\n return (\n \n \n {label !== \"\" && (\n \n \n {label}\n {required ? \"*\" : \"\"}\n \n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n \n )}\n\n
\n \n {overlayIcon && (\n \n {\n overlayAction();\n }\n : () => null\n }\n size={\"small\"}\n disableFocusRipple={false}\n disableRipple={false}\n disableTouchRipple={false}\n >\n {overlayIcon}\n \n
\n )}\n {overlayObject && (\n \n {overlayObject}\n \n )}\n \n \n
\n );\n};\n\nexport default withStyles(styles)(InputBoxWrapper);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\n// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport ArrowRightIcon from \"@mui/icons-material/ArrowRight\";\nimport ErrorOutlineIcon from \"@mui/icons-material/ErrorOutline\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"../../../../../store\";\nimport {\n setErrorSnackMessage,\n setModalErrorSnackMessage,\n} from \"../../../../../actions\";\nimport { snackBarMessage } from \"../../../../../types\";\n\ninterface ImodalErrorProps {\n customStyle?: any;\n classes: any;\n modalSnackMessage: snackBarMessage;\n displayErrorMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n modalErrorContainer: {\n position: \"absolute\",\n marginTop: 10,\n width: \"80%\",\n backgroundColor: \"#fff\",\n border: \"#C72C48 1px solid\",\n borderLeftWidth: 12,\n borderRadius: 3,\n zIndex: 1000,\n padding: \"10px 15px\",\n left: \"50%\",\n transform: \"translateX(-50%)\",\n opacity: 0,\n transitionDuration: \"0.2s\",\n },\n modalErrorShow: {\n opacity: 1,\n },\n closeButton: {\n position: \"absolute\",\n right: 5,\n fontSize: \"small\",\n border: 0,\n backgroundColor: \"#fff\",\n cursor: \"pointer\",\n },\n errorTitle: {\n display: \"flex\",\n alignItems: \"center\",\n },\n errorLabel: {\n color: \"#000\",\n fontSize: 18,\n fontWeight: 500,\n marginLeft: 5,\n marginRight: 25,\n },\n messageIcon: {\n color: \"#C72C48\",\n display: \"flex\",\n \"& svg\": {\n width: 32,\n height: 32,\n },\n },\n detailsButton: {\n color: \"#9C9C9C\",\n display: \"flex\",\n alignItems: \"center\",\n border: 0,\n backgroundColor: \"transparent\",\n paddingLeft: 5,\n fontSize: 14,\n transformDuration: \"0.3s\",\n cursor: \"pointer\",\n },\n extraDetailsContainer: {\n fontStyle: \"italic\",\n color: \"#9C9C9C\",\n lineHeight: 0,\n padding: \"0 10px\",\n transition: \"all .2s ease-in-out\",\n overflow: \"hidden\",\n },\n extraDetailsOpen: {\n lineHeight: 1,\n padding: \"3px 10px\",\n },\n arrowElement: {\n marginLeft: -5,\n },\n arrowOpen: {\n transform: \"rotateZ(90deg)\",\n transformDuration: \"0.3s\",\n },\n });\n\nvar timerI: any;\n\nconst startHideTimer = (callbackFunction: () => void) => {\n timerI = setInterval(callbackFunction, 10000);\n};\n\nconst stopHideTimer = () => {\n clearInterval(timerI);\n};\n\nconst ModalError = ({\n classes,\n modalSnackMessage,\n displayErrorMessage,\n customStyle,\n}: ImodalErrorProps) => {\n const [detailsOpen, setDetailsOpen] = useState(false);\n const [displayErrorMsg, setDisplayErrorMsg] = useState(false);\n\n const closeErrorMessage = useCallback(() => {\n setDisplayErrorMsg(false);\n }, []);\n\n useEffect(() => {\n if (!displayErrorMsg) {\n displayErrorMessage({ detailedError: \"\", errorMessage: \"\" });\n setDetailsOpen(false);\n //clearInterval(timerI);\n }\n }, [displayErrorMessage, displayErrorMsg]);\n\n useEffect(() => {\n if (\n modalSnackMessage.message !== \"\" &&\n modalSnackMessage.type === \"error\"\n ) {\n //Error message received, we trigger the animation\n setDisplayErrorMsg(true);\n //startHideTimer(closeErrorMessage);\n }\n }, [closeErrorMessage, modalSnackMessage.message, modalSnackMessage.type]);\n\n const detailsToggle = () => {\n setDetailsOpen(!detailsOpen);\n };\n\n const message = get(modalSnackMessage, \"message\", \"\");\n const messageDetails = get(modalSnackMessage, \"detailedErrorMsg\", \"\");\n\n if (modalSnackMessage.type !== \"error\" || message === \"\") {\n return null;\n }\n\n return (\n \n startHideTimer(closeErrorMessage)}\n >\n \n
\n \n \n \n {message}\n
\n {messageDetails !== \"\" && (\n \n
\n \n
\n \n {messageDetails}\n \n
\n )}\n \n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n modalSnackMessage: state.system.modalSnackBar,\n});\n\nconst mapDispatchToProps = {\n displayErrorMessage: setModalErrorSnackMessage,\n};\n\nconst connector = connect(mapState, mapDispatchToProps);\n\nexport default connector(withStyles(styles)(ModalError));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Snackbar from \"@mui/material/Snackbar\";\nimport { Dialog, DialogContent, DialogTitle } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n deleteDialogStyles,\n snackBarCommon,\n} from \"../FormComponents/common/styleLibrary\";\nimport { AppState } from \"../../../../store\";\nimport { snackBarMessage } from \"../../../../types\";\nimport { setModalSnackMessage } from \"../../../../actions\";\nimport ModalError from \"../FormComponents/ModalError/ModalError\";\nimport CloseIcon from \"@mui/icons-material/Close\";\n\ninterface IModalProps {\n classes: any;\n onClose: () => void;\n modalOpen: boolean;\n title: string | React.ReactNode;\n children: any;\n wideLimit?: boolean;\n modalSnackMessage?: snackBarMessage;\n noContentPadding?: boolean;\n setModalSnackMessage: typeof setModalSnackMessage;\n titleIcon?: React.ReactNode;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...deleteDialogStyles,\n root: {\n \"& .MuiPaper-root\": {\n padding: \"1rem 2rem 2rem 1rem\",\n },\n },\n content: {\n padding: 25,\n paddingBottom: 0,\n },\n customDialogSize: {\n width: \"100%\",\n maxWidth: 765,\n },\n ...snackBarCommon,\n });\n\nconst ModalWrapper = ({\n onClose,\n modalOpen,\n title,\n children,\n classes,\n wideLimit = true,\n modalSnackMessage,\n noContentPadding,\n setModalSnackMessage,\n titleIcon = null,\n}: IModalProps) => {\n const [openSnackbar, setOpenSnackbar] = useState(false);\n\n useEffect(() => {\n setModalSnackMessage(\"\");\n }, [setModalSnackMessage]);\n\n useEffect(() => {\n if (modalSnackMessage) {\n if (modalSnackMessage.message === \"\") {\n setOpenSnackbar(false);\n return;\n }\n // Open SnackBar\n if (modalSnackMessage.type !== \"error\") {\n setOpenSnackbar(true);\n }\n }\n }, [modalSnackMessage]);\n\n const closeSnackBar = () => {\n setOpenSnackbar(false);\n setModalSnackMessage(\"\");\n };\n\n const customSize = wideLimit\n ? {\n classes: {\n paper: classes.customDialogSize,\n },\n }\n : { maxWidth: \"lg\" as const, fullWidth: true };\n\n let message = \"\";\n\n if (modalSnackMessage) {\n message = modalSnackMessage.detailedErrorMsg;\n if (\n modalSnackMessage.detailedErrorMsg === \"\" ||\n modalSnackMessage.detailedErrorMsg.length < 5\n ) {\n message = modalSnackMessage.message;\n }\n }\n\n return (\n {\n if (reason !== \"backdropClick\") {\n onClose(); // close on Esc but not on click outside\n }\n }}\n className={classes.root}\n >\n \n
\n {titleIcon} {title}\n
\n
\n \n \n \n
\n
\n\n \n {\n closeSnackBar();\n }}\n message={message}\n ContentProps={{\n className: `${classes.snackBar} ${\n modalSnackMessage && modalSnackMessage.type === \"error\"\n ? classes.errorSnackBar\n : \"\"\n }`,\n }}\n autoHideDuration={\n modalSnackMessage && modalSnackMessage.type === \"error\" ? 10000 : 5000\n }\n />\n \n {children}\n \n \n );\n};\n\nconst mapState = (state: AppState) => ({\n modalSnackMessage: state.system.modalSnackBar,\n});\n\nconst connector = connect(mapState, {\n setModalSnackMessage,\n});\n\nexport default withStyles(styles)(connector(ModalWrapper));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport get from \"lodash/get\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Button, LinearProgress } from \"@mui/material\";\nimport Grid from \"@mui/material/Grid\";\nimport {\n formFieldStyles,\n modalBasic,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FileSelector from \"../../Common/FormComponents/FileSelector/FileSelector\";\nimport api from \"../../../../common/api\";\nimport { ITierElement } from \"./types\";\nimport { ErrorResponseHandler } from \"../../../../common/types\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport { LockIcon } from \"../../../../icons\";\n\ninterface ITierCredentialsModal {\n open: boolean;\n closeModalAndRefresh: (refresh: boolean) => any;\n classes: any;\n tierData: ITierElement;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n ...formFieldStyles,\n });\n\nconst UpdateTierCredentialsModal = ({\n open,\n closeModalAndRefresh,\n classes,\n tierData,\n setModalErrorSnackMessage,\n}: ITierCredentialsModal) => {\n const [savingTiers, setSavingTiers] = useState(false);\n const [accessKey, setAccessKey] = useState(\"\");\n const [secretKey, setSecretKey] = useState(\"\");\n\n const [creds, setCreds] = useState(\"\");\n const [encodedCreds, setEncodedCreds] = useState(\"\");\n\n const [accountName, setAccountName] = useState(\"\");\n const [accountKey, setAccountKey] = useState(\"\");\n\n // Validations\n const [isFormValid, setIsFormValid] = useState(true);\n\n const type = get(tierData, \"type\", \"\");\n const name = get(tierData, `${type}.name`, \"\");\n\n useEffect(() => {\n let valid = true;\n\n if (type === \"s3\" || type === \"azure\") {\n if (accountName === \"\" || accountKey === \"\") {\n valid = false;\n }\n } else if (type === \"gcs\") {\n if (encodedCreds === \"\") {\n valid = false;\n }\n }\n setIsFormValid(valid);\n }, [accountKey, accountName, encodedCreds, type]);\n\n const addRecord = () => {\n let rules = {};\n\n if (type === \"s3\" || type === \"azure\") {\n rules = {\n access_key: accountName,\n secret_key: accountKey,\n };\n } else if (type === \"gcs\") {\n rules = {\n creds: encodedCreds,\n };\n }\n if (name !== \"\") {\n api\n .invoke(\"PUT\", `/api/v1/admin/tiers/${type}/${name}/credentials`, rules)\n .then(() => {\n setSavingTiers(false);\n closeModalAndRefresh(true);\n })\n .catch((err: ErrorResponseHandler) => {\n setSavingTiers(false);\n setModalErrorSnackMessage(err);\n });\n } else {\n setModalErrorSnackMessage({\n errorMessage: \"There was an error retrieving tier information\",\n detailedError: \"\",\n });\n }\n };\n\n return (\n }\n onClose={() => {\n closeModalAndRefresh(false);\n }}\n title={`Update Credentials - ${type} / ${name}`}\n >\n ) => {\n e.preventDefault();\n setSavingTiers(true);\n addRecord();\n }}\n >\n \n \n {type === \"s3\" && (\n \n
\n ) => {\n setAccessKey(e.target.value);\n }}\n />\n
\n
\n ) => {\n setSecretKey(e.target.value);\n }}\n />\n
\n
\n )}\n {type === \"gcs\" && (\n \n {\n setEncodedCreds(encodedValue);\n setCreds(fileName);\n }}\n value={creds}\n />\n \n )}\n {type === \"azure\" && (\n \n
\n ) => {\n setAccountName(e.target.value);\n }}\n />\n
\n
\n ) => {\n setAccountKey(e.target.value);\n }}\n />\n
\n
\n )}\n
\n \n \n Save\n \n \n {savingTiers && (\n \n \n \n )}\n
\n \n \n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(UpdateTierCredentialsModal));\n","import React from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport { Theme } from \"@mui/material/styles\";\n\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n errorBlock: {\n color: theme.palette?.error.main || \"#C83B51\",\n },\n });\n\ninterface IErrorBlockProps {\n classes: any;\n errorMessage: string;\n withBreak?: boolean;\n}\n\nconst ErrorBlock = ({\n classes,\n errorMessage,\n withBreak = true,\n}: IErrorBlockProps) => {\n return (\n \n {withBreak &&
}\n \n {errorMessage}\n \n
\n );\n};\n\nexport default withStyles(styles)(ErrorBlock);\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _jsxRuntime = require(\"react/jsx-runtime\");\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z\"\n}), 'AttachFile');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _jsxRuntime = require(\"react/jsx-runtime\");\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z\"\n}), 'Cancel');\n\nexports.default = _default;"],"names":["withStyles","theme","createStyles","fieldBasic","tooltipHelper","valueString","maxWidth","whiteSpace","overflow","textOverflow","marginTop","fileInputField","margin","flexFlow","fileInputStyles","inputLabel","fontWeight","textBoxContainer","border","paddingLeft","label","classes","onChange","id","name","disabled","tooltip","required","error","accept","value","useState","showFileSelector","setShowSelector","Grid","item","xs","className","fieldBottom","fieldContainer","errorInField","InputLabel","htmlFor","fieldLabelError","tooltipContainer","Tooltip","title","placement","HelpIcon","type","e","fileName","get","evt","callback","file","target","files","reader","FileReader","readAsDataURL","onload","fileBase64","result","fileArray","toString","split","length","fileProcess","data","IconButton","color","component","onClick","disableRipple","disableFocusRipple","size","Cancel","ErrorBlock","errorMessage","fileReselect","AttachFile","inputStyles","makeStyles","inputFieldStyles","InputField","props","InputProps","flexGrow","position","overlayAction","right","top","maxHeight","autoComplete","multiline","index","placeholder","min","max","overlayIcon","overlayObject","extraInputProps","noLabelMinWidth","pattern","autoFocus","inputProps","container","clsx","inputBoxContainer","noMinWidthLabel","fullWidth","helperText","inputRebase","disableTouchRipple","timerI","stopHideTimer","clearInterval","mapDispatchToProps","displayErrorMessage","setModalErrorSnackMessage","connect","state","modalSnackMessage","system","modalSnackBar","modalErrorContainer","width","backgroundColor","borderLeftWidth","borderRadius","zIndex","padding","left","transform","opacity","transitionDuration","modalErrorShow","closeButton","fontSize","cursor","errorTitle","display","alignItems","errorLabel","marginLeft","marginRight","messageIcon","height","detailsButton","transformDuration","extraDetailsContainer","fontStyle","lineHeight","transition","extraDetailsOpen","arrowElement","arrowOpen","customStyle","detailsOpen","setDetailsOpen","displayErrorMsg","setDisplayErrorMsg","closeErrorMessage","useCallback","useEffect","detailedError","message","messageDetails","Fragment","style","onMouseOver","onMouseLeave","setInterval","Close","ErrorOutline","detailsContainerLink","ArrowRight","connector","setModalSnackMessage","deleteDialogStyles","root","content","paddingBottom","customDialogSize","snackBarCommon","onClose","modalOpen","children","wideLimit","noContentPadding","titleIcon","openSnackbar","setOpenSnackbar","customSize","paper","detailedErrorMsg","Dialog","open","scroll","event","reason","DialogTitle","titleText","closeContainer","Snackbar","snackBarModal","ContentProps","snackBar","errorSnackBar","autoHideDuration","DialogContent","buttonContainer","textAlign","modalBasic","formFieldStyles","closeModalAndRefresh","tierData","savingTiers","setSavingTiers","accessKey","setAccessKey","secretKey","setSecretKey","creds","setCreds","encodedCreds","setEncodedCreds","accountName","setAccountName","accountKey","setAccountKey","isFormValid","setIsFormValid","valid","noValidate","onSubmit","preventDefault","rules","access_key","secret_key","api","then","catch","err","addRecord","formFieldRow","encodedValue","variant","errorBlock","palette","main","withBreak","_interopRequireDefault","require","exports","_createSvgIcon","_jsxRuntime","_default","default","jsx","d"],"sourceRoot":""} \ No newline at end of file diff --git a/portal-ui/build/static/js/1140.c920261b.chunk.js b/portal-ui/build/static/js/1140.0208375a.chunk.js similarity index 99% rename from portal-ui/build/static/js/1140.c920261b.chunk.js rename to portal-ui/build/static/js/1140.0208375a.chunk.js index dd608a2c1..e3b522994 100644 --- a/portal-ui/build/static/js/1140.c920261b.chunk.js +++ b/portal-ui/build/static/js/1140.0208375a.chunk.js @@ -1,2 +1,2 @@ -(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1140,9080],{39080:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return w}});var r=n(18489),o=n(35531),a=n(50390),i=n(38342),s=n.n(i),l=n(86509),c=n(4285),u=n(66946),d=n(76352),p=n(25594),f=n(58217),m=n(65771),y=n(70758),g=n(33034),h=n.n(g),b=n(77138),x=n(72462),v=n(62559),C=(0,c.Z)((function(e){return(0,l.Z)({container:{display:"flex",flexFlow:"column",padding:"20px 0 8px 0"},inputWithCopy:{"& .MuiInputBase-root ":{width:"100%",background:"#FBFAFA","& .MuiInputBase-input":{height:".8rem"},"& .MuiInputAdornment-positionEnd":{marginRight:".5rem","& .MuiButtonBase-root":{height:"2rem"}}},"& .MuiButtonBase-root .min-icon":{width:".8rem",height:".8rem"}},inputLabel:(0,r.Z)((0,r.Z)({},x.YI.inputLabel),{},{fontSize:".8rem"})})}))((function(e){var t=e.label,n=void 0===t?"":t,r=e.value,o=void 0===r?"":r,a=e.classes,i=void 0===a?{}:a;return(0,v.jsxs)("div",{className:i.container,children:[(0,v.jsxs)("div",{className:i.inputLabel,children:[n,":"]}),(0,v.jsx)("div",{className:i.inputWithCopy,children:(0,v.jsx)(f.Z,{value:o,readOnly:!0,endAdornment:(0,v.jsx)(m.Z,{position:"end",children:(0,v.jsx)(h(),{text:o,children:(0,v.jsx)(y.Z,{"aria-label":"copy",tooltip:"Copy",onClick:function(){},onMouseDown:function(){},edge:"end",children:(0,v.jsx)(b.TI,{})})})})})})]})})),j=n(47424),w=(0,c.Z)((function(e){return(0,l.Z)({warningBlock:{color:"red",fontSize:".85rem",margin:".5rem 0 .5rem 0",display:"flex",alignItems:"center","& svg ":{marginRight:".3rem",height:16,width:16}},credentialTitle:{padding:".8rem 0 0 0",fontWeight:600,fontSize:".9rem"},buttonContainer:{textAlign:"right",marginTop:"1rem"},credentialsPanel:{overflowY:"auto",maxHeight:350},promptTitle:{display:"flex",alignItems:"center"},buttonSpacer:{marginRight:".9rem"},promptIcon:{marginRight:".1rem",display:"flex",alignItems:"center",height:"2rem",width:"2rem"}})}))((function(e){var t=e.classes,n=e.newServiceAccount,i=e.open,l=e.closeModal,c=e.entity;if(!n)return null;var f=s()(n,"console",null),m=s()(n,"idp",!1);return(0,v.jsx)(d.Z,{modalOpen:i,onClose:function(){l()},title:(0,v.jsx)("div",{className:t.promptTitle,children:(0,v.jsxs)("div",{children:["New ",c," Created"]})}),titleIcon:(0,v.jsx)(b.tV,{}),children:(0,v.jsxs)(p.ZP,{container:!0,children:[(0,v.jsxs)(p.ZP,{item:!0,xs:12,className:t.formScrollable,children:["A new ",c," has been created with the following details:",!m&&f&&(0,v.jsx)(a.Fragment,{children:(0,v.jsxs)(p.ZP,{item:!0,xs:12,className:t.credentialsPanel,children:[(0,v.jsx)("div",{className:t.credentialTitle,children:"Console Credentials"}),Array.isArray(f)&&f.map((function(e,t){return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(C,{label:"Access Key",value:e.accessKey}),(0,v.jsx)(C,{label:"Secret Key",value:e.secretKey})]})})),!Array.isArray(f)&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(C,{label:"Access Key",value:f.accessKey}),(0,v.jsx)(C,{label:"Secret Key",value:f.secretKey})]})]})}),m?(0,v.jsx)("div",{className:t.warningBlock,children:"Please Login via the configured external identity provider."}):(0,v.jsxs)("div",{className:t.warningBlock,children:[(0,v.jsx)(j.Z,{}),(0,v.jsx)("span",{children:"Write these down, as this is the only time the secret will be displayed."})]})]}),(0,v.jsxs)(p.ZP,{item:!0,xs:12,className:t.buttonContainer,children:[(0,v.jsx)(u.Z,{variant:"outlined",className:t.buttonSpacer,onClick:function(){l()},color:"primary",children:"Done"}),!m&&(0,v.jsx)(u.Z,{onClick:function(){var e={};if(f)if(Array.isArray(f)){var t=f.map((function(e){return{access_key:e.accessKey,secret_key:e.secretKey}}));e={console:(0,o.Z)(t)}}else e={console:[{access_key:f.accessKey,secret_key:f.secretKey}]};!function(e,t){var n=document.createElement("a");n.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}("credentials.json",JSON.stringify((0,r.Z)({},e)))},endIcon:(0,v.jsx)(b._8,{}),variant:"contained",color:"primary",children:"Download"})]})]})})}))},76352:function(e,t,n){"use strict";n.d(t,{Z:function(){return Z}});var r,o=n(23430),a=n(18489),i=n(50390),s=n(34424),l=n(95467),c=n(97771),u=n(84402),d=n(78426),p=n(93085),f=n(86509),m=n(4285),y=n(72462),g=n(44149),h=n(38342),b=n.n(h),x=n(92125),v=n(19538),C=n(21278),j=n(62559),w=function(){clearInterval(r)},k={displayErrorMessage:g.zb},S=(0,s.$j)((function(e){return{modalSnackMessage:e.system.modalSnackBar}}),k)((0,m.Z)((function(e){return(0,f.Z)({modalErrorContainer:{position:"absolute",marginTop:10,width:"80%",backgroundColor:"#fff",border:"#C72C48 1px solid",borderLeftWidth:12,borderRadius:3,zIndex:1e3,padding:"10px 15px",left:"50%",transform:"translateX(-50%)",opacity:0,transitionDuration:"0.2s"},modalErrorShow:{opacity:1},closeButton:{position:"absolute",right:5,fontSize:"small",border:0,backgroundColor:"#fff",cursor:"pointer"},errorTitle:{display:"flex",alignItems:"center"},errorLabel:{color:"#000",fontSize:18,fontWeight:500,marginLeft:5,marginRight:25},messageIcon:{color:"#C72C48",display:"flex","& svg":{width:32,height:32}},detailsButton:{color:"#9C9C9C",display:"flex",alignItems:"center",border:0,backgroundColor:"transparent",paddingLeft:5,fontSize:14,transformDuration:"0.3s",cursor:"pointer"},extraDetailsContainer:{fontStyle:"italic",color:"#9C9C9C",lineHeight:0,padding:"0 10px",transition:"all .2s ease-in-out",overflow:"hidden"},extraDetailsOpen:{lineHeight:1,padding:"3px 10px"},arrowElement:{marginLeft:-5},arrowOpen:{transform:"rotateZ(90deg)",transformDuration:"0.3s"}})}))((function(e){var t=e.classes,n=e.modalSnackMessage,a=e.displayErrorMessage,s=e.customStyle,l=(0,i.useState)(!1),c=(0,o.Z)(l,2),u=c[0],d=c[1],p=(0,i.useState)(!1),f=(0,o.Z)(p,2),m=f[0],y=f[1],g=(0,i.useCallback)((function(){y(!1)}),[]);(0,i.useEffect)((function(){m||(a({detailedError:"",errorMessage:""}),d(!1))}),[a,m]),(0,i.useEffect)((function(){""!==n.message&&"error"===n.type&&y(!0)}),[g,n.message,n.type]);var h=b()(n,"message",""),k=b()(n,"detailedErrorMsg","");return"error"!==n.type||""===h?null:(0,j.jsx)(i.Fragment,{children:(0,j.jsxs)("div",{className:"".concat(t.modalErrorContainer," ").concat(m?t.modalErrorShow:""),style:s,onMouseOver:w,onMouseLeave:function(){r=setInterval(g,1e4)},children:[(0,j.jsx)("button",{className:t.closeButton,onClick:g,children:(0,j.jsx)(C.Z,{})}),(0,j.jsxs)("div",{className:t.errorTitle,children:[(0,j.jsx)("span",{className:t.messageIcon,children:(0,j.jsx)(v.Z,{})}),(0,j.jsx)("span",{className:t.errorLabel,children:h})]}),""!==k&&(0,j.jsxs)(i.Fragment,{children:[(0,j.jsx)("div",{className:t.detailsContainerLink,children:(0,j.jsxs)("button",{className:t.detailsButton,onClick:function(){d(!u)},children:["Details",(0,j.jsx)(x.Z,{className:"".concat(t.arrowElement," ").concat(u?t.arrowOpen:"")})]})}),(0,j.jsx)("div",{className:"".concat(t.extraDetailsContainer," ").concat(u?t.extraDetailsOpen:""),children:k})]})]})})}))),O=(0,s.$j)((function(e){return{modalSnackMessage:e.system.modalSnackBar}}),{setModalSnackMessage:g.MK}),Z=(0,m.Z)((function(e){return(0,f.Z)((0,a.Z)((0,a.Z)({},y.Qw),{},{root:{"& .MuiPaper-root":{padding:"1rem 2rem 2rem 1rem"}},content:{padding:25,paddingBottom:0},customDialogSize:{width:"100%",maxWidth:765}},y.sN))}))(O((function(e){var t=e.onClose,n=e.modalOpen,r=e.title,s=e.children,f=e.classes,m=e.wideLimit,y=void 0===m||m,g=e.modalSnackMessage,h=e.noContentPadding,b=e.setModalSnackMessage,x=e.titleIcon,v=void 0===x?null:x,w=(0,i.useState)(!1),k=(0,o.Z)(w,2),O=k[0],Z=k[1];(0,i.useEffect)((function(){b("")}),[b]),(0,i.useEffect)((function(){if(g){if(""===g.message)return void Z(!1);"error"!==g.type&&Z(!0)}}),[g]);var E=y?{classes:{paper:f.customDialogSize}}:{maxWidth:"lg",fullWidth:!0},D="";return g&&(D=g.detailedErrorMsg,(""===g.detailedErrorMsg||g.detailedErrorMsg.length<5)&&(D=g.message)),(0,j.jsxs)(u.Z,(0,a.Z)((0,a.Z)({open:n,classes:f},E),{},{scroll:"paper",onClose:function(e,n){"backdropClick"!==n&&t()},className:f.root,children:[(0,j.jsxs)(d.Z,{className:f.title,children:[(0,j.jsxs)("div",{className:f.titleText,children:[v," ",r]}),(0,j.jsx)("div",{className:f.closeContainer,children:(0,j.jsx)(l.Z,{"aria-label":"close",className:f.closeButton,onClick:t,disableRipple:!0,size:"small",children:(0,j.jsx)(C.Z,{})})})]}),(0,j.jsx)(S,{}),(0,j.jsx)(c.Z,{open:O,className:f.snackBarModal,onClose:function(){Z(!1),b("")},message:D,ContentProps:{className:"".concat(f.snackBar," ").concat(g&&"error"===g.type?f.errorSnackBar:"")},autoHideDuration:g&&"error"===g.type?1e4:5e3}),(0,j.jsx)(p.Z,{className:h?"":f.content,children:s})]}))})))},20409:function(e,t,n){"use strict";var r=n(61498),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,a,i,s,l,c,u=!1;t||(t={}),n=t.debug||!1;try{if(i=r(),s=document.createRange(),l=document.getSelection(),(c=document.createElement("span")).textContent=e,c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var a=o[t.format]||o.default;window.clipboardData.setData(a,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(c),s.selectNodeContents(c),l.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(d){n&&console.error("unable to copy using execCommand: ",d),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),a=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(a,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(s):l.removeAllRanges()),c&&document.body.removeChild(c),i()}return u}},12900:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var r=a(n(50390)),o=a(n(20409));function a(e){return e&&e.__esModule?e:{default:e}}function i(e){return i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n.\n\nimport React from \"react\";\nimport { InputAdornment, OutlinedInput } from \"@mui/material\";\nimport BoxIconButton from \"../BoxIconButton/BoxIconButton\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport CopyToClipboard from \"react-copy-to-clipboard\";\nimport { CopyIcon } from \"../../../../icons\";\nimport { fieldBasic } from \"../FormComponents/common/styleLibrary\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n container: {\n display: \"flex\",\n flexFlow: \"column\",\n padding: \"20px 0 8px 0\",\n },\n inputWithCopy: {\n \"& .MuiInputBase-root \": {\n width: \"100%\",\n background: \"#FBFAFA\",\n \"& .MuiInputBase-input\": {\n height: \".8rem\",\n },\n \"& .MuiInputAdornment-positionEnd\": {\n marginRight: \".5rem\",\n \"& .MuiButtonBase-root\": {\n height: \"2rem\",\n },\n },\n },\n \"& .MuiButtonBase-root .min-icon\": {\n width: \".8rem\",\n height: \".8rem\",\n },\n },\n inputLabel: {\n ...fieldBasic.inputLabel,\n fontSize: \".8rem\",\n },\n });\n\nconst CredentialItem = ({\n label = \"\",\n value = \"\",\n classes = {},\n}: {\n label: string;\n value: string;\n classes: any;\n}) => {\n return (\n
\n
{label}:
\n
\n \n \n {}}\n onMouseDown={() => {}}\n edge=\"end\"\n >\n \n \n \n \n }\n />\n
\n
\n );\n};\n\nexport default withStyles(styles)(CredentialItem);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport get from \"lodash/get\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { NewServiceAccount } from \"./types\";\nimport { Button } from \"@mui/material\";\nimport ModalWrapper from \"../ModalWrapper/ModalWrapper\";\nimport Grid from \"@mui/material/Grid\";\nimport CredentialItem from \"./CredentialItem\";\nimport WarnIcon from \"../../../../icons/WarnIcon\";\nimport { DownloadIcon, ServiceAccountCredentialsIcon } from \"../../../../icons\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n warningBlock: {\n color: \"red\",\n fontSize: \".85rem\",\n margin: \".5rem 0 .5rem 0\",\n display: \"flex\",\n alignItems: \"center\",\n \"& svg \": {\n marginRight: \".3rem\",\n height: 16,\n width: 16,\n },\n },\n credentialTitle: {\n padding: \".8rem 0 0 0\",\n fontWeight: 600,\n fontSize: \".9rem\",\n },\n buttonContainer: {\n textAlign: \"right\",\n marginTop: \"1rem\",\n },\n credentialsPanel: {\n overflowY: \"auto\",\n maxHeight: 350,\n },\n promptTitle: {\n display: \"flex\",\n alignItems: \"center\",\n },\n buttonSpacer: {\n marginRight: \".9rem\",\n },\n promptIcon: {\n marginRight: \".1rem\",\n display: \"flex\",\n alignItems: \"center\",\n height: \"2rem\",\n width: \"2rem\",\n },\n });\n\ninterface ICredentialsPromptProps {\n classes: any;\n newServiceAccount: NewServiceAccount | null;\n open: boolean;\n entity: string;\n closeModal: () => void;\n}\n\nconst download = (filename: string, text: string) => {\n let element = document.createElement(\"a\");\n element.setAttribute(\n \"href\",\n \"data:text/plain;charset=utf-8,\" + encodeURIComponent(text)\n );\n element.setAttribute(\"download\", filename);\n\n element.style.display = \"none\";\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n};\n\nconst CredentialsPrompt = ({\n classes,\n newServiceAccount,\n open,\n closeModal,\n entity,\n}: ICredentialsPromptProps) => {\n if (!newServiceAccount) {\n return null;\n }\n\n const consoleCreds = get(newServiceAccount, \"console\", null);\n const idp = get(newServiceAccount, \"idp\", false);\n\n return (\n {\n closeModal();\n }}\n title={\n
\n
New {entity} Created
\n
\n }\n titleIcon={}\n >\n \n \n A new {entity} has been created with the following details:\n {!idp && consoleCreds && (\n \n \n
\n Console Credentials\n
\n {Array.isArray(consoleCreds) &&\n consoleCreds.map((credentialsPair, index) => {\n return (\n <>\n \n \n \n );\n })}\n {!Array.isArray(consoleCreds) && (\n <>\n \n \n \n )}\n
\n
\n )}\n {idp ? (\n
\n Please Login via the configured external identity provider.\n
\n ) : (\n
\n \n \n Write these down, as this is the only time the secret will be\n displayed.\n \n
\n )}\n
\n \n {\n closeModal();\n }}\n color=\"primary\"\n >\n Done\n \n\n {!idp && (\n {\n let consoleExtras = {};\n\n if (consoleCreds) {\n if (!Array.isArray(consoleCreds)) {\n consoleExtras = {\n console: [\n {\n access_key: consoleCreds.accessKey,\n secret_key: consoleCreds.secretKey,\n },\n ],\n };\n } else {\n const cCreds = consoleCreds.map((itemMap) => {\n return {\n access_key: itemMap.accessKey,\n secret_key: itemMap.secretKey,\n };\n });\n\n consoleExtras = {\n console: [...cCreds],\n };\n }\n }\n\n download(\n \"credentials.json\",\n JSON.stringify({\n ...consoleExtras,\n })\n );\n }}\n endIcon={}\n variant=\"contained\"\n color=\"primary\"\n >\n Download\n \n )}\n \n
\n \n );\n};\n\nexport default withStyles(styles)(CredentialsPrompt);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\n// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport ArrowRightIcon from \"@mui/icons-material/ArrowRight\";\nimport ErrorOutlineIcon from \"@mui/icons-material/ErrorOutline\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"../../../../../store\";\nimport {\n setErrorSnackMessage,\n setModalErrorSnackMessage,\n} from \"../../../../../actions\";\nimport { snackBarMessage } from \"../../../../../types\";\n\ninterface ImodalErrorProps {\n customStyle?: any;\n classes: any;\n modalSnackMessage: snackBarMessage;\n displayErrorMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n modalErrorContainer: {\n position: \"absolute\",\n marginTop: 10,\n width: \"80%\",\n backgroundColor: \"#fff\",\n border: \"#C72C48 1px solid\",\n borderLeftWidth: 12,\n borderRadius: 3,\n zIndex: 1000,\n padding: \"10px 15px\",\n left: \"50%\",\n transform: \"translateX(-50%)\",\n opacity: 0,\n transitionDuration: \"0.2s\",\n },\n modalErrorShow: {\n opacity: 1,\n },\n closeButton: {\n position: \"absolute\",\n right: 5,\n fontSize: \"small\",\n border: 0,\n backgroundColor: \"#fff\",\n cursor: \"pointer\",\n },\n errorTitle: {\n display: \"flex\",\n alignItems: \"center\",\n },\n errorLabel: {\n color: \"#000\",\n fontSize: 18,\n fontWeight: 500,\n marginLeft: 5,\n marginRight: 25,\n },\n messageIcon: {\n color: \"#C72C48\",\n display: \"flex\",\n \"& svg\": {\n width: 32,\n height: 32,\n },\n },\n detailsButton: {\n color: \"#9C9C9C\",\n display: \"flex\",\n alignItems: \"center\",\n border: 0,\n backgroundColor: \"transparent\",\n paddingLeft: 5,\n fontSize: 14,\n transformDuration: \"0.3s\",\n cursor: \"pointer\",\n },\n extraDetailsContainer: {\n fontStyle: \"italic\",\n color: \"#9C9C9C\",\n lineHeight: 0,\n padding: \"0 10px\",\n transition: \"all .2s ease-in-out\",\n overflow: \"hidden\",\n },\n extraDetailsOpen: {\n lineHeight: 1,\n padding: \"3px 10px\",\n },\n arrowElement: {\n marginLeft: -5,\n },\n arrowOpen: {\n transform: \"rotateZ(90deg)\",\n transformDuration: \"0.3s\",\n },\n });\n\nvar timerI: any;\n\nconst startHideTimer = (callbackFunction: () => void) => {\n timerI = setInterval(callbackFunction, 10000);\n};\n\nconst stopHideTimer = () => {\n clearInterval(timerI);\n};\n\nconst ModalError = ({\n classes,\n modalSnackMessage,\n displayErrorMessage,\n customStyle,\n}: ImodalErrorProps) => {\n const [detailsOpen, setDetailsOpen] = useState(false);\n const [displayErrorMsg, setDisplayErrorMsg] = useState(false);\n\n const closeErrorMessage = useCallback(() => {\n setDisplayErrorMsg(false);\n }, []);\n\n useEffect(() => {\n if (!displayErrorMsg) {\n displayErrorMessage({ detailedError: \"\", errorMessage: \"\" });\n setDetailsOpen(false);\n //clearInterval(timerI);\n }\n }, [displayErrorMessage, displayErrorMsg]);\n\n useEffect(() => {\n if (\n modalSnackMessage.message !== \"\" &&\n modalSnackMessage.type === \"error\"\n ) {\n //Error message received, we trigger the animation\n setDisplayErrorMsg(true);\n //startHideTimer(closeErrorMessage);\n }\n }, [closeErrorMessage, modalSnackMessage.message, modalSnackMessage.type]);\n\n const detailsToggle = () => {\n setDetailsOpen(!detailsOpen);\n };\n\n const message = get(modalSnackMessage, \"message\", \"\");\n const messageDetails = get(modalSnackMessage, \"detailedErrorMsg\", \"\");\n\n if (modalSnackMessage.type !== \"error\" || message === \"\") {\n return null;\n }\n\n return (\n \n startHideTimer(closeErrorMessage)}\n >\n \n
\n \n \n \n {message}\n
\n {messageDetails !== \"\" && (\n \n
\n \n
\n \n {messageDetails}\n \n
\n )}\n \n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n modalSnackMessage: state.system.modalSnackBar,\n});\n\nconst mapDispatchToProps = {\n displayErrorMessage: setModalErrorSnackMessage,\n};\n\nconst connector = connect(mapState, mapDispatchToProps);\n\nexport default connector(withStyles(styles)(ModalError));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Snackbar from \"@mui/material/Snackbar\";\nimport { Dialog, DialogContent, DialogTitle } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n deleteDialogStyles,\n snackBarCommon,\n} from \"../FormComponents/common/styleLibrary\";\nimport { AppState } from \"../../../../store\";\nimport { snackBarMessage } from \"../../../../types\";\nimport { setModalSnackMessage } from \"../../../../actions\";\nimport ModalError from \"../FormComponents/ModalError/ModalError\";\nimport CloseIcon from \"@mui/icons-material/Close\";\n\ninterface IModalProps {\n classes: any;\n onClose: () => void;\n modalOpen: boolean;\n title: string | React.ReactNode;\n children: any;\n wideLimit?: boolean;\n modalSnackMessage?: snackBarMessage;\n noContentPadding?: boolean;\n setModalSnackMessage: typeof setModalSnackMessage;\n titleIcon?: React.ReactNode;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...deleteDialogStyles,\n root: {\n \"& .MuiPaper-root\": {\n padding: \"1rem 2rem 2rem 1rem\",\n },\n },\n content: {\n padding: 25,\n paddingBottom: 0,\n },\n customDialogSize: {\n width: \"100%\",\n maxWidth: 765,\n },\n ...snackBarCommon,\n });\n\nconst ModalWrapper = ({\n onClose,\n modalOpen,\n title,\n children,\n classes,\n wideLimit = true,\n modalSnackMessage,\n noContentPadding,\n setModalSnackMessage,\n titleIcon = null,\n}: IModalProps) => {\n const [openSnackbar, setOpenSnackbar] = useState(false);\n\n useEffect(() => {\n setModalSnackMessage(\"\");\n }, [setModalSnackMessage]);\n\n useEffect(() => {\n if (modalSnackMessage) {\n if (modalSnackMessage.message === \"\") {\n setOpenSnackbar(false);\n return;\n }\n // Open SnackBar\n if (modalSnackMessage.type !== \"error\") {\n setOpenSnackbar(true);\n }\n }\n }, [modalSnackMessage]);\n\n const closeSnackBar = () => {\n setOpenSnackbar(false);\n setModalSnackMessage(\"\");\n };\n\n const customSize = wideLimit\n ? {\n classes: {\n paper: classes.customDialogSize,\n },\n }\n : { maxWidth: \"lg\" as const, fullWidth: true };\n\n let message = \"\";\n\n if (modalSnackMessage) {\n message = modalSnackMessage.detailedErrorMsg;\n if (\n modalSnackMessage.detailedErrorMsg === \"\" ||\n modalSnackMessage.detailedErrorMsg.length < 5\n ) {\n message = modalSnackMessage.message;\n }\n }\n\n return (\n {\n if (reason !== \"backdropClick\") {\n onClose(); // close on Esc but not on click outside\n }\n }}\n className={classes.root}\n >\n \n
\n {titleIcon} {title}\n
\n
\n \n \n \n
\n
\n\n \n {\n closeSnackBar();\n }}\n message={message}\n ContentProps={{\n className: `${classes.snackBar} ${\n modalSnackMessage && modalSnackMessage.type === \"error\"\n ? classes.errorSnackBar\n : \"\"\n }`,\n }}\n autoHideDuration={\n modalSnackMessage && modalSnackMessage.type === \"error\" ? 10000 : 5000\n }\n />\n \n {children}\n \n \n );\n};\n\nconst mapState = (state: AppState) => ({\n modalSnackMessage: state.system.modalSnackBar,\n});\n\nconst connector = connect(mapState, {\n setModalSnackMessage,\n});\n\nexport default withStyles(styles)(connector(ModalWrapper));\n","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function(e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") { // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n window.clipboardData.setData(format, text);\n } else { // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n\n document.body.appendChild(mark);\n\n range.selectNodeContents(mark);\n selection.addRange(range);\n\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CopyToClipboard = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _copyToClipboard = _interopRequireDefault(require(\"copy-to-clipboard\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar CopyToClipboard =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(CopyToClipboard, _React$PureComponent);\n\n function CopyToClipboard() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, CopyToClipboard);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(CopyToClipboard)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty(_assertThisInitialized(_this), \"onClick\", function (event) {\n var _this$props = _this.props,\n text = _this$props.text,\n onCopy = _this$props.onCopy,\n children = _this$props.children,\n options = _this$props.options;\n\n var elem = _react[\"default\"].Children.only(children);\n\n var result = (0, _copyToClipboard[\"default\"])(text, options);\n\n if (onCopy) {\n onCopy(text, result);\n } // Bypass onClick if it was present\n\n\n if (elem && elem.props && typeof elem.props.onClick === 'function') {\n elem.props.onClick(event);\n }\n });\n\n return _this;\n }\n\n _createClass(CopyToClipboard, [{\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n _text = _this$props2.text,\n _onCopy = _this$props2.onCopy,\n _options = _this$props2.options,\n children = _this$props2.children,\n props = _objectWithoutProperties(_this$props2, [\"text\", \"onCopy\", \"options\", \"children\"]);\n\n var elem = _react[\"default\"].Children.only(children);\n\n return _react[\"default\"].cloneElement(elem, _objectSpread({}, props, {\n onClick: this.onClick\n }));\n }\n }]);\n\n return CopyToClipboard;\n}(_react[\"default\"].PureComponent);\n\nexports.CopyToClipboard = CopyToClipboard;\n\n_defineProperty(CopyToClipboard, \"defaultProps\", {\n onCopy: undefined,\n options: undefined\n});","\"use strict\";\n\nvar _require = require('./Component'),\n CopyToClipboard = _require.CopyToClipboard;\n\nCopyToClipboard.CopyToClipboard = CopyToClipboard;\nmodule.exports = CopyToClipboard;","\nmodule.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' &&\n selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function(range) {\n selection.addRange(range);\n });\n }\n\n active &&\n active.focus();\n };\n};\n"],"names":["withStyles","theme","createStyles","container","display","flexFlow","padding","inputWithCopy","width","background","height","marginRight","inputLabel","fieldBasic","fontSize","label","value","classes","className","OutlinedInput","readOnly","endAdornment","InputAdornment","position","text","BoxIconButton","tooltip","onClick","onMouseDown","edge","warningBlock","color","margin","alignItems","credentialTitle","fontWeight","buttonContainer","textAlign","marginTop","credentialsPanel","overflowY","maxHeight","promptTitle","buttonSpacer","promptIcon","newServiceAccount","open","closeModal","entity","consoleCreds","get","idp","ModalWrapper","modalOpen","onClose","title","titleIcon","Grid","item","xs","formScrollable","Array","isArray","map","credentialsPair","index","accessKey","secretKey","WarnIcon","Button","variant","consoleExtras","cCreds","itemMap","access_key","secret_key","console","filename","element","document","createElement","setAttribute","encodeURIComponent","style","body","appendChild","click","removeChild","download","JSON","stringify","endIcon","timerI","stopHideTimer","clearInterval","mapDispatchToProps","displayErrorMessage","setModalErrorSnackMessage","connect","state","modalSnackMessage","system","modalSnackBar","modalErrorContainer","backgroundColor","border","borderLeftWidth","borderRadius","zIndex","left","transform","opacity","transitionDuration","modalErrorShow","closeButton","right","cursor","errorTitle","errorLabel","marginLeft","messageIcon","detailsButton","paddingLeft","transformDuration","extraDetailsContainer","fontStyle","lineHeight","transition","overflow","extraDetailsOpen","arrowElement","arrowOpen","customStyle","useState","detailsOpen","setDetailsOpen","displayErrorMsg","setDisplayErrorMsg","closeErrorMessage","useCallback","useEffect","detailedError","errorMessage","message","type","messageDetails","Fragment","onMouseOver","onMouseLeave","setInterval","Close","ErrorOutline","detailsContainerLink","ArrowRight","connector","setModalSnackMessage","deleteDialogStyles","root","content","paddingBottom","customDialogSize","maxWidth","snackBarCommon","children","wideLimit","noContentPadding","openSnackbar","setOpenSnackbar","customSize","paper","fullWidth","detailedErrorMsg","length","Dialog","scroll","event","reason","DialogTitle","titleText","closeContainer","IconButton","disableRipple","size","Snackbar","snackBarModal","ContentProps","snackBar","errorSnackBar","autoHideDuration","DialogContent","deselectCurrent","require","clipboardToIE11Formatting","module","exports","options","debug","reselectPrevious","range","selection","mark","success","createRange","getSelection","textContent","all","top","clip","whiteSpace","webkitUserSelect","MozUserSelect","msUserSelect","userSelect","addEventListener","e","stopPropagation","format","preventDefault","clipboardData","warn","window","clearData","setData","onCopy","selectNodeContents","addRange","execCommand","Error","err","error","copyKey","test","navigator","userAgent","replace","prompt","removeRange","removeAllRanges","Object","defineProperty","CopyToClipboard","_react","_interopRequireDefault","_copyToClipboard","obj","__esModule","_typeof","Symbol","iterator","constructor","prototype","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectWithoutProperties","source","excluded","key","i","target","sourceKeys","indexOf","_objectWithoutPropertiesLoose","sourceSymbolKeys","propertyIsEnumerable","call","_classCallCheck","instance","Constructor","TypeError","_defineProperties","props","descriptor","configurable","writable","_possibleConstructorReturn","self","_assertThisInitialized","_getPrototypeOf","o","setPrototypeOf","getPrototypeOf","__proto__","ReferenceError","_setPrototypeOf","p","_defineProperty","_React$PureComponent","_getPrototypeOf2","_this","this","_len","arguments","args","_key","concat","_this$props","elem","Children","only","result","protoProps","staticProps","subClass","superClass","create","_inherits","_this$props2","cloneElement","forEach","getOwnPropertyDescriptors","defineProperties","_objectSpread","PureComponent","undefined","rangeCount","active","activeElement","ranges","getRangeAt","tagName","toUpperCase","blur","focus"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"static/js/1140.0208375a.chunk.js","mappings":"oWA+FA,GAAeA,EAAAA,EAAAA,IArEA,SAACC,GAAD,OACbC,EAAAA,EAAAA,GAAa,CACXC,UAAW,CACTC,QAAS,OACTC,SAAU,SACVC,QAAS,gBAEXC,cAAe,CACb,wBAAyB,CACvBC,MAAO,OACPC,WAAY,UACZ,wBAAyB,CACvBC,OAAQ,SAEV,mCAAoC,CAClCC,YAAa,QACb,wBAAyB,CACvBD,OAAQ,UAId,kCAAmC,CACjCF,MAAO,QACPE,OAAQ,UAGZE,YAAW,kBACNC,EAAAA,GAAAA,YADK,IAERC,SAAU,cAyChB,EArCuB,SAAC,GAQjB,IAAD,IAPJC,MAAAA,OAOI,MAPI,GAOJ,MANJC,MAAAA,OAMI,MANI,GAMJ,MALJC,QAAAA,OAKI,MALM,GAKN,EACJ,OACE,iBAAKC,UAAWD,EAAQd,UAAxB,WACE,iBAAKe,UAAWD,EAAQL,WAAxB,UAAqCG,EAArC,QACA,gBAAKG,UAAWD,EAAQV,cAAxB,UACE,SAACY,EAAA,EAAD,CACEH,MAAOA,EACPI,UAAQ,EACRC,cACE,SAACC,EAAA,EAAD,CAAgBC,SAAS,MAAzB,UACE,SAAC,IAAD,CAAiBC,KAAMR,EAAvB,UACE,SAACS,EAAA,EAAD,CACE,aAAW,OACXC,QAAS,OACTC,QAAS,aACTC,YAAa,aACbC,KAAK,MALP,UAOE,SAAC,KAAD,oB,WCyJlB,GAAe7B,EAAAA,EAAAA,IAhNA,SAACC,GAAD,OACbC,EAAAA,EAAAA,GAAa,CACX4B,aAAc,CACZC,MAAO,MACPjB,SAAU,SACVkB,OAAQ,kBACR5B,QAAS,OACT6B,WAAY,SACZ,SAAU,CACRtB,YAAa,QACbD,OAAQ,GACRF,MAAO,KAGX0B,gBAAiB,CACf5B,QAAS,cACT6B,WAAY,IACZrB,SAAU,SAEZsB,gBAAiB,C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EN,EAAS,KAKb,OADA9H,EAAUsC,kBACH,WACc,UAAnBtC,EAAUvD,MACVuD,EAAUsC,kBAELtC,EAAU6H,YACbG,EAAOT,SAAQ,SAASxH,GACtBC,EAAU0B,SAAS3B,MAIvB+H,GACAA,EAAOO","sources":["screens/Console/Common/CredentialsPrompt/CredentialItem.tsx","screens/Console/Common/CredentialsPrompt/CredentialsPrompt.tsx","screens/Console/Common/FormComponents/ModalError/ModalError.tsx","screens/Console/Common/ModalWrapper/ModalWrapper.tsx","../node_modules/copy-to-clipboard/index.js","../node_modules/react-copy-to-clipboard/lib/Component.js","../node_modules/react-copy-to-clipboard/lib/index.js","../node_modules/toggle-selection/index.js"],"sourcesContent":["// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { InputAdornment, OutlinedInput } from \"@mui/material\";\nimport BoxIconButton from \"../BoxIconButton/BoxIconButton\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport CopyToClipboard from \"react-copy-to-clipboard\";\nimport { CopyIcon } from \"../../../../icons\";\nimport { fieldBasic } from \"../FormComponents/common/styleLibrary\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n container: {\n display: \"flex\",\n flexFlow: \"column\",\n padding: \"20px 0 8px 0\",\n },\n inputWithCopy: {\n \"& .MuiInputBase-root \": {\n width: \"100%\",\n background: \"#FBFAFA\",\n \"& .MuiInputBase-input\": {\n height: \".8rem\",\n },\n \"& .MuiInputAdornment-positionEnd\": {\n marginRight: \".5rem\",\n \"& .MuiButtonBase-root\": {\n height: \"2rem\",\n },\n },\n },\n \"& .MuiButtonBase-root .min-icon\": {\n width: \".8rem\",\n height: \".8rem\",\n },\n },\n inputLabel: {\n ...fieldBasic.inputLabel,\n fontSize: \".8rem\",\n },\n });\n\nconst CredentialItem = ({\n label = \"\",\n value = \"\",\n classes = {},\n}: {\n label: string;\n value: string;\n classes: any;\n}) => {\n return (\n
\n
{label}:
\n
\n \n \n {}}\n onMouseDown={() => {}}\n edge=\"end\"\n >\n \n \n \n \n }\n />\n
\n
\n );\n};\n\nexport default withStyles(styles)(CredentialItem);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport get from \"lodash/get\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { NewServiceAccount } from \"./types\";\nimport { Button } from \"@mui/material\";\nimport ModalWrapper from \"../ModalWrapper/ModalWrapper\";\nimport Grid from \"@mui/material/Grid\";\nimport CredentialItem from \"./CredentialItem\";\nimport WarnIcon from \"../../../../icons/WarnIcon\";\nimport { DownloadIcon, ServiceAccountCredentialsIcon } from \"../../../../icons\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n warningBlock: {\n color: \"red\",\n fontSize: \".85rem\",\n margin: \".5rem 0 .5rem 0\",\n display: \"flex\",\n alignItems: \"center\",\n \"& svg \": {\n marginRight: \".3rem\",\n height: 16,\n width: 16,\n },\n },\n credentialTitle: {\n padding: \".8rem 0 0 0\",\n fontWeight: 600,\n fontSize: \".9rem\",\n },\n buttonContainer: {\n textAlign: \"right\",\n marginTop: \"1rem\",\n },\n credentialsPanel: {\n overflowY: \"auto\",\n maxHeight: 350,\n },\n promptTitle: {\n display: \"flex\",\n alignItems: \"center\",\n },\n buttonSpacer: {\n marginRight: \".9rem\",\n },\n promptIcon: {\n marginRight: \".1rem\",\n display: \"flex\",\n alignItems: \"center\",\n height: \"2rem\",\n width: \"2rem\",\n },\n });\n\ninterface ICredentialsPromptProps {\n classes: any;\n newServiceAccount: NewServiceAccount | null;\n open: boolean;\n entity: string;\n closeModal: () => void;\n}\n\nconst download = (filename: string, text: string) => {\n let element = document.createElement(\"a\");\n element.setAttribute(\n \"href\",\n \"data:text/plain;charset=utf-8,\" + encodeURIComponent(text)\n );\n element.setAttribute(\"download\", filename);\n\n element.style.display = \"none\";\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n};\n\nconst CredentialsPrompt = ({\n classes,\n newServiceAccount,\n open,\n closeModal,\n entity,\n}: ICredentialsPromptProps) => {\n if (!newServiceAccount) {\n return null;\n }\n\n const consoleCreds = get(newServiceAccount, \"console\", null);\n const idp = get(newServiceAccount, \"idp\", false);\n\n return (\n {\n closeModal();\n }}\n title={\n
\n
New {entity} Created
\n
\n }\n titleIcon={}\n >\n \n \n A new {entity} has been created with the following details:\n {!idp && consoleCreds && (\n \n \n
\n Console Credentials\n
\n {Array.isArray(consoleCreds) &&\n consoleCreds.map((credentialsPair, index) => {\n return (\n <>\n \n \n \n );\n })}\n {!Array.isArray(consoleCreds) && (\n <>\n \n \n \n )}\n
\n
\n )}\n {idp ? (\n
\n Please Login via the configured external identity provider.\n
\n ) : (\n
\n \n \n Write these down, as this is the only time the secret will be\n displayed.\n \n
\n )}\n
\n \n {\n closeModal();\n }}\n color=\"primary\"\n >\n Done\n \n\n {!idp && (\n {\n let consoleExtras = {};\n\n if (consoleCreds) {\n if (!Array.isArray(consoleCreds)) {\n consoleExtras = {\n console: [\n {\n access_key: consoleCreds.accessKey,\n secret_key: consoleCreds.secretKey,\n },\n ],\n };\n } else {\n const cCreds = consoleCreds.map((itemMap) => {\n return {\n access_key: itemMap.accessKey,\n secret_key: itemMap.secretKey,\n };\n });\n\n consoleExtras = {\n console: [...cCreds],\n };\n }\n }\n\n download(\n \"credentials.json\",\n JSON.stringify({\n ...consoleExtras,\n })\n );\n }}\n endIcon={}\n variant=\"contained\"\n color=\"primary\"\n >\n Download\n \n )}\n \n
\n \n );\n};\n\nexport default withStyles(styles)(CredentialsPrompt);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\n// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport ArrowRightIcon from \"@mui/icons-material/ArrowRight\";\nimport ErrorOutlineIcon from \"@mui/icons-material/ErrorOutline\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"../../../../../store\";\nimport {\n setErrorSnackMessage,\n setModalErrorSnackMessage,\n} from \"../../../../../actions\";\nimport { snackBarMessage } from \"../../../../../types\";\n\ninterface ImodalErrorProps {\n customStyle?: any;\n classes: any;\n modalSnackMessage: snackBarMessage;\n displayErrorMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n modalErrorContainer: {\n position: \"absolute\",\n marginTop: 10,\n width: \"80%\",\n backgroundColor: \"#fff\",\n border: \"#C72C48 1px solid\",\n borderLeftWidth: 12,\n borderRadius: 3,\n zIndex: 1000,\n padding: \"10px 15px\",\n left: \"50%\",\n transform: \"translateX(-50%)\",\n opacity: 0,\n transitionDuration: \"0.2s\",\n },\n modalErrorShow: {\n opacity: 1,\n },\n closeButton: {\n position: \"absolute\",\n right: 5,\n fontSize: \"small\",\n border: 0,\n backgroundColor: \"#fff\",\n cursor: \"pointer\",\n },\n errorTitle: {\n display: \"flex\",\n alignItems: \"center\",\n },\n errorLabel: {\n color: \"#000\",\n fontSize: 18,\n fontWeight: 500,\n marginLeft: 5,\n marginRight: 25,\n },\n messageIcon: {\n color: \"#C72C48\",\n display: \"flex\",\n \"& svg\": {\n width: 32,\n height: 32,\n },\n },\n detailsButton: {\n color: \"#9C9C9C\",\n display: \"flex\",\n alignItems: \"center\",\n border: 0,\n backgroundColor: \"transparent\",\n paddingLeft: 5,\n fontSize: 14,\n transformDuration: \"0.3s\",\n cursor: \"pointer\",\n },\n extraDetailsContainer: {\n fontStyle: \"italic\",\n color: \"#9C9C9C\",\n lineHeight: 0,\n padding: \"0 10px\",\n transition: \"all .2s ease-in-out\",\n overflow: \"hidden\",\n },\n extraDetailsOpen: {\n lineHeight: 1,\n padding: \"3px 10px\",\n },\n arrowElement: {\n marginLeft: -5,\n },\n arrowOpen: {\n transform: \"rotateZ(90deg)\",\n transformDuration: \"0.3s\",\n },\n });\n\nvar timerI: any;\n\nconst startHideTimer = (callbackFunction: () => void) => {\n timerI = setInterval(callbackFunction, 10000);\n};\n\nconst stopHideTimer = () => {\n clearInterval(timerI);\n};\n\nconst ModalError = ({\n classes,\n modalSnackMessage,\n displayErrorMessage,\n customStyle,\n}: ImodalErrorProps) => {\n const [detailsOpen, setDetailsOpen] = useState(false);\n const [displayErrorMsg, setDisplayErrorMsg] = useState(false);\n\n const closeErrorMessage = useCallback(() => {\n setDisplayErrorMsg(false);\n }, []);\n\n useEffect(() => {\n if (!displayErrorMsg) {\n displayErrorMessage({ detailedError: \"\", errorMessage: \"\" });\n setDetailsOpen(false);\n //clearInterval(timerI);\n }\n }, [displayErrorMessage, displayErrorMsg]);\n\n useEffect(() => {\n if (\n modalSnackMessage.message !== \"\" &&\n modalSnackMessage.type === \"error\"\n ) {\n //Error message received, we trigger the animation\n setDisplayErrorMsg(true);\n //startHideTimer(closeErrorMessage);\n }\n }, [closeErrorMessage, modalSnackMessage.message, modalSnackMessage.type]);\n\n const detailsToggle = () => {\n setDetailsOpen(!detailsOpen);\n };\n\n const message = get(modalSnackMessage, \"message\", \"\");\n const messageDetails = get(modalSnackMessage, \"detailedErrorMsg\", \"\");\n\n if (modalSnackMessage.type !== \"error\" || message === \"\") {\n return null;\n }\n\n return (\n \n startHideTimer(closeErrorMessage)}\n >\n \n
\n \n \n \n {message}\n
\n {messageDetails !== \"\" && (\n \n
\n \n
\n \n {messageDetails}\n \n
\n )}\n \n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n modalSnackMessage: state.system.modalSnackBar,\n});\n\nconst mapDispatchToProps = {\n displayErrorMessage: setModalErrorSnackMessage,\n};\n\nconst connector = connect(mapState, mapDispatchToProps);\n\nexport default connector(withStyles(styles)(ModalError));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Snackbar from \"@mui/material/Snackbar\";\nimport { Dialog, DialogContent, DialogTitle } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n deleteDialogStyles,\n snackBarCommon,\n} from \"../FormComponents/common/styleLibrary\";\nimport { AppState } from \"../../../../store\";\nimport { snackBarMessage } from \"../../../../types\";\nimport { setModalSnackMessage } from \"../../../../actions\";\nimport ModalError from \"../FormComponents/ModalError/ModalError\";\nimport CloseIcon from \"@mui/icons-material/Close\";\n\ninterface IModalProps {\n classes: any;\n onClose: () => void;\n modalOpen: boolean;\n title: string | React.ReactNode;\n children: any;\n wideLimit?: boolean;\n modalSnackMessage?: snackBarMessage;\n noContentPadding?: boolean;\n setModalSnackMessage: typeof setModalSnackMessage;\n titleIcon?: React.ReactNode;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...deleteDialogStyles,\n root: {\n \"& .MuiPaper-root\": {\n padding: \"1rem 2rem 2rem 1rem\",\n },\n },\n content: {\n padding: 25,\n paddingBottom: 0,\n },\n customDialogSize: {\n width: \"100%\",\n maxWidth: 765,\n },\n ...snackBarCommon,\n });\n\nconst ModalWrapper = ({\n onClose,\n modalOpen,\n title,\n children,\n classes,\n wideLimit = true,\n modalSnackMessage,\n noContentPadding,\n setModalSnackMessage,\n titleIcon = null,\n}: IModalProps) => {\n const [openSnackbar, setOpenSnackbar] = useState(false);\n\n useEffect(() => {\n setModalSnackMessage(\"\");\n }, [setModalSnackMessage]);\n\n useEffect(() => {\n if (modalSnackMessage) {\n if (modalSnackMessage.message === \"\") {\n setOpenSnackbar(false);\n return;\n }\n // Open SnackBar\n if (modalSnackMessage.type !== \"error\") {\n setOpenSnackbar(true);\n }\n }\n }, [modalSnackMessage]);\n\n const closeSnackBar = () => {\n setOpenSnackbar(false);\n setModalSnackMessage(\"\");\n };\n\n const customSize = wideLimit\n ? {\n classes: {\n paper: classes.customDialogSize,\n },\n }\n : { maxWidth: \"lg\" as const, fullWidth: true };\n\n let message = \"\";\n\n if (modalSnackMessage) {\n message = modalSnackMessage.detailedErrorMsg;\n if (\n modalSnackMessage.detailedErrorMsg === \"\" ||\n modalSnackMessage.detailedErrorMsg.length < 5\n ) {\n message = modalSnackMessage.message;\n }\n }\n\n return (\n {\n if (reason !== \"backdropClick\") {\n onClose(); // close on Esc but not on click outside\n }\n }}\n className={classes.root}\n >\n \n
\n {titleIcon} {title}\n
\n
\n \n \n \n
\n
\n\n \n {\n closeSnackBar();\n }}\n message={message}\n ContentProps={{\n className: `${classes.snackBar} ${\n modalSnackMessage && modalSnackMessage.type === \"error\"\n ? classes.errorSnackBar\n : \"\"\n }`,\n }}\n autoHideDuration={\n modalSnackMessage && modalSnackMessage.type === \"error\" ? 10000 : 5000\n }\n />\n \n {children}\n \n \n );\n};\n\nconst mapState = (state: AppState) => ({\n modalSnackMessage: state.system.modalSnackBar,\n});\n\nconst connector = connect(mapState, {\n setModalSnackMessage,\n});\n\nexport default withStyles(styles)(connector(ModalWrapper));\n","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function(e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") { // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n window.clipboardData.setData(format, text);\n } else { // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n\n document.body.appendChild(mark);\n\n range.selectNodeContents(mark);\n selection.addRange(range);\n\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CopyToClipboard = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _copyToClipboard = _interopRequireDefault(require(\"copy-to-clipboard\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar CopyToClipboard =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(CopyToClipboard, _React$PureComponent);\n\n function CopyToClipboard() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, CopyToClipboard);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(CopyToClipboard)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty(_assertThisInitialized(_this), \"onClick\", function (event) {\n var _this$props = _this.props,\n text = _this$props.text,\n onCopy = _this$props.onCopy,\n children = _this$props.children,\n options = _this$props.options;\n\n var elem = _react[\"default\"].Children.only(children);\n\n var result = (0, _copyToClipboard[\"default\"])(text, options);\n\n if (onCopy) {\n onCopy(text, result);\n } // Bypass onClick if it was present\n\n\n if (elem && elem.props && typeof elem.props.onClick === 'function') {\n elem.props.onClick(event);\n }\n });\n\n return _this;\n }\n\n _createClass(CopyToClipboard, [{\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n _text = _this$props2.text,\n _onCopy = _this$props2.onCopy,\n _options = _this$props2.options,\n children = _this$props2.children,\n props = _objectWithoutProperties(_this$props2, [\"text\", \"onCopy\", \"options\", \"children\"]);\n\n var elem = _react[\"default\"].Children.only(children);\n\n return _react[\"default\"].cloneElement(elem, _objectSpread({}, props, {\n onClick: this.onClick\n }));\n }\n }]);\n\n return CopyToClipboard;\n}(_react[\"default\"].PureComponent);\n\nexports.CopyToClipboard = CopyToClipboard;\n\n_defineProperty(CopyToClipboard, \"defaultProps\", {\n onCopy: undefined,\n options: undefined\n});","\"use strict\";\n\nvar _require = require('./Component'),\n CopyToClipboard = _require.CopyToClipboard;\n\nCopyToClipboard.CopyToClipboard = CopyToClipboard;\nmodule.exports = CopyToClipboard;","\nmodule.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' &&\n selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function(range) {\n selection.addRange(range);\n });\n }\n\n active &&\n active.focus();\n };\n};\n"],"names":["withStyles","theme","createStyles","container","display","flexFlow","padding","inputWithCopy","width","background","height","marginRight","inputLabel","fieldBasic","fontSize","label","value","classes","className","OutlinedInput","readOnly","endAdornment","InputAdornment","position","text","BoxIconButton","tooltip","onClick","onMouseDown","edge","warningBlock","color","margin","alignItems","credentialTitle","fontWeight","buttonContainer","textAlign","marginTop","credentialsPanel","overflowY","maxHeight","promptTitle","buttonSpacer","promptIcon","newServiceAccount","open","closeModal","entity","consoleCreds","get","idp","ModalWrapper","modalOpen","onClose","title","titleIcon","Grid","item","xs","formScrollable","Array","isArray","map","credentialsPair","index","accessKey","secretKey","WarnIcon","Button","variant","consoleExtras","cCreds","itemMap","access_key","secret_key","console","filename","element","document","createElement","setAttribute","encodeURIComponent","style","body","appendChild","click","removeChild","download","JSON","stringify","endIcon","timerI","stopHideTimer","clearInterval","mapDispatchToProps","displayErrorMessage","setModalErrorSnackMessage","connect","state","modalSnackMessage","system","modalSnackBar","modalErrorContainer","backgroundColor","border","borderLeftWidth","borderRadius","zIndex","left","transform","opacity","transitionDuration","modalErrorShow","closeButton","right","cursor","errorTitle","errorLabel","marginLeft","messageIcon","detailsButton","paddingLeft","transformDuration","extraDetailsContainer","fontStyle","lineHeight","transition","overflow","extraDetailsOpen","arrowElement","arrowOpen","customStyle","useState","detailsOpen","setDetailsOpen","displayErrorMsg","setDisplayErrorMsg","closeErrorMessage","useCallback","useEffect","detailedError","errorMessage","message","type","messageDetails","Fragment","onMouseOver","onMouseLeave","setInterval","Close","ErrorOutline","detailsContainerLink","ArrowRight","connector","setModalSnackMessage","deleteDialogStyles","root","content","paddingBottom","customDialogSize","maxWidth","snackBarCommon","children","wideLimit","noContentPadding","openSnackbar","setOpenSnackbar","customSize","paper","fullWidth","detailedErrorMsg","length","Dialog","scroll","event","reason","DialogTitle","titleText","closeContainer","IconButton","disableRipple","size","Snackbar","snackBarModal","ContentProps","snackBar","errorSnackBar","autoHideDuration","DialogContent","deselectCurrent","require","clipboardToIE11Formatting","module","exports","options","debug","reselectPrevious","range","selection","mark","success","createRange","getSelection","textContent","all","top","clip","whiteSpace","webkitUserSelect","MozUserSelect","msUserSelect","userSelect","addEventListener","e","stopPropagation","format","preventDefault","clipboardData","warn","window","clearData","setData","onCopy","selectNodeContents","addRange","execCommand","Error","err","error","copyKey","test","navigator","userAgent","replace","prompt","removeRange","removeAllRanges","Object","defineProperty","CopyToClipboard","_react","_interopRequireDefault","_copyToClipboard","obj","__esModule","_typeof","Symbol","iterator","constructor","prototype","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectWithoutProperties","source","excluded","key","i","target","sourceKeys","indexOf","_objectWithoutPropertiesLoose","sourceSymbolKeys","propertyIsEnumerable","call","_classCallCheck","instance","Constructor","TypeError","_defineProperties","props","descriptor","configurable","writable","_possibleConstructorReturn","self","_assertThisInitialized","_getPrototypeOf","o","setPrototypeOf","getPrototypeOf","__proto__","ReferenceError","_setPrototypeOf","p","_defineProperty","_React$PureComponent","_getPrototypeOf2","_this","this","_len","arguments","args","_key","concat","_this$props","elem","Children","only","result","protoProps","staticProps","subClass","superClass","create","_inherits","_this$props2","cloneElement","forEach","getOwnPropertyDescriptors","defineProperties","_objectSpread","PureComponent","undefined","rangeCount","active","activeElement","ranges","getRangeAt","tagName","toUpperCase","blur","focus"],"sourceRoot":""} \ No newline at end of file diff --git a/portal-ui/build/static/js/1233.9903fc82.chunk.js b/portal-ui/build/static/js/1233.9903fc82.chunk.js new file mode 100644 index 000000000..786c6a084 --- /dev/null +++ b/portal-ui/build/static/js/1233.9903fc82.chunk.js @@ -0,0 +1,2 @@ +(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1233],{3602:function(e,t,n){"use strict";var r=n(64119);t.Z=void 0;var o=r(n(66830)),i=n(62559),a=(0,o.default)((0,i.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess");t.Z=a},56943:function(e,t,n){"use strict";var r=n(64119);t.Z=void 0;var o=r(n(66830)),i=n(62559),a=(0,o.default)((0,i.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=a},59443:function(e,t,n){"use strict";var r=n(64119);t.Z=void 0;var o=r(n(66830)),i=n(62559),a=(0,o.default)((0,i.jsx)("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm4.2 14.2L11 13V7h1.5v5.2l4.5 2.7-.8 1.3z"}),"WatchLater");t.Z=a},58089:function(e,t,n){"use strict";var r=n(64119);t.Z=void 0;var o=r(n(66830)),i=n(62559),a=(0,o.default)((0,i.jsx)("path",{d:"m15 3 2.3 2.3-2.89 2.87 1.42 1.42L18.7 6.7 21 9V3h-6zM3 9l2.3-2.3 2.87 2.89 1.42-1.42L6.7 5.3 9 3H3v6zm6 12-2.3-2.3 2.89-2.87-1.42-1.42L5.3 17.3 3 15v6h6zm12-6-2.3 2.3-2.87-2.89-1.42 1.42 2.89 2.87L15 21h6v-6z"}),"ZoomOutMap");t.Z=a},16356:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(32793),o=n(1048),i=n(50390),a=n(44977),c=n(50076),s=n(8208),l=n(15573),u=n(46981),p=n(10594);function f(e){return(0,p.Z)("MuiCard",e)}(0,n(43349).Z)("MuiCard",["root"]);var d=n(62559),y=["className","raised"],h=(0,s.ZP)(u.Z,{name:"MuiCard",slot:"Root",overridesResolver:function(e,t){return t.root}})((function(){return{overflow:"hidden"}})),m=i.forwardRef((function(e,t){var n=(0,l.Z)({props:e,name:"MuiCard"}),i=n.className,s=n.raised,u=void 0!==s&&s,p=(0,o.Z)(n,y),m=(0,r.Z)({},n,{raised:u}),v=function(e){var t=e.classes;return(0,c.Z)({root:["root"]},f,t)}(m);return(0,d.jsx)(h,(0,r.Z)({className:(0,a.Z)(v.root,i),elevation:u?8:void 0,ref:t,ownerState:m},p))}))},86192:function(e,t,n){"use strict";n.d(t,{Z:function(){return O}});var r=n(36222),o=n(1048),i=n(32793),a=n(50390),c=n(44977),s=n(50076),l=n(35477),u=n(15573),p=n(8208),f=n(10594);function d(e){return(0,f.Z)("MuiCardHeader",e)}var y=(0,n(43349).Z)("MuiCardHeader",["root","avatar","action","content","title","subheader"]),h=n(62559),m=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],v=(0,p.ZP)("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:function(e,t){var n;return(0,i.Z)((n={},(0,r.Z)(n,"& .".concat(y.title),t.title),(0,r.Z)(n,"& .".concat(y.subheader),t.subheader),n),t.root)}})({display:"flex",alignItems:"center",padding:16}),b=(0,p.ZP)("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:function(e,t){return t.avatar}})({display:"flex",flex:"0 0 auto",marginRight:16}),g=(0,p.ZP)("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:function(e,t){return t.action}})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),x=(0,p.ZP)("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:function(e,t){return t.content}})({flex:"1 1 auto"}),O=a.forwardRef((function(e,t){var n=(0,u.Z)({props:e,name:"MuiCardHeader"}),r=n.action,a=n.avatar,p=n.className,f=n.component,y=void 0===f?"div":f,O=n.disableTypography,A=void 0!==O&&O,k=n.subheader,j=n.subheaderTypographyProps,w=n.title,S=n.titleTypographyProps,P=(0,o.Z)(n,m),E=(0,i.Z)({},n,{component:y,disableTypography:A}),Z=function(e){var t=e.classes;return(0,s.Z)({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},d,t)}(E),R=w;null==R||R.type===l.Z||A||(R=(0,h.jsx)(l.Z,(0,i.Z)({variant:a?"body2":"h5",className:Z.title,component:"span",display:"block"},S,{children:R})));var L=k;return null==L||L.type===l.Z||A||(L=(0,h.jsx)(l.Z,(0,i.Z)({variant:a?"body2":"body1",className:Z.subheader,color:"text.secondary",component:"span",display:"block"},j,{children:L}))),(0,h.jsxs)(v,(0,i.Z)({className:(0,c.Z)(Z.root,p),as:y,ref:t,ownerState:E},P,{children:[a&&(0,h.jsx)(b,{className:Z.avatar,ownerState:E,children:a}),(0,h.jsxs)(x,{className:Z.content,ownerState:E,children:[R,L]}),r&&(0,h.jsx)(g,{className:Z.action,ownerState:E,children:r})]}))}))},7887:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(1048),o=n(32793),i=n(50390),a=n(44977),c=n(50076),s=n(8208),l=n(15573),u=n(10594);function p(e){return(0,u.Z)("MuiDialogActions",e)}(0,n(43349).Z)("MuiDialogActions",["root","spacing"]);var f=n(62559),d=["className","disableSpacing"],y=(0,s.ZP)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,!n.disableSpacing&&t.spacing]}})((function(e){var t=e.ownerState;return(0,o.Z)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(:first-of-type)":{marginLeft:8}})})),h=i.forwardRef((function(e,t){var n=(0,l.Z)({props:e,name:"MuiDialogActions"}),i=n.className,s=n.disableSpacing,u=void 0!==s&&s,h=(0,r.Z)(n,d),m=(0,o.Z)({},n,{disableSpacing:u}),v=function(e){var t=e.classes,n={root:["root",!e.disableSpacing&&"spacing"]};return(0,c.Z)(n,p,t)}(m);return(0,f.jsx)(y,(0,o.Z)({className:(0,a.Z)(v.root,i),ownerState:m,ref:t},h))}))},65771:function(e,t,n){"use strict";n.d(t,{Z:function(){return A}});var r=n(36222),o=n(1048),i=n(32793),a=n(50390),c=n(44977),s=n(50076),l=n(91442),u=n(35477),p=n(14478),f=n(23060),d=n(8208),y=n(10594);function h(e){return(0,y.Z)("MuiInputAdornment",e)}var m,v=(0,n(43349).Z)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]),b=n(15573),g=n(62559),x=["children","className","component","disablePointerEvents","disableTypography","position","variant"],O=(0,d.ZP)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t["position".concat((0,l.Z)(n.position))],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((function(e){var t=e.theme,n=e.ownerState;return(0,i.Z)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:t.palette.action.active},"filled"===n.variant&&(0,r.Z)({},"&.".concat(v.positionStart,"&:not(.").concat(v.hiddenLabel,")"),{marginTop:16}),"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})})),A=a.forwardRef((function(e,t){var n=(0,b.Z)({props:e,name:"MuiInputAdornment"}),r=n.children,d=n.className,y=n.component,v=void 0===y?"div":y,A=n.disablePointerEvents,k=void 0!==A&&A,j=n.disableTypography,w=void 0!==j&&j,S=n.position,P=n.variant,E=(0,o.Z)(n,x),Z=(0,f.Z)()||{},R=P;P&&Z.variant,Z&&!R&&(R=Z.variant);var L=(0,i.Z)({},n,{hiddenLabel:Z.hiddenLabel,size:Z.size,disablePointerEvents:k,position:S,variant:R}),N=function(e){var t=e.classes,n=e.disablePointerEvents,r=e.hiddenLabel,o=e.position,i=e.size,a=e.variant,c={root:["root",n&&"disablePointerEvents",o&&"position".concat((0,l.Z)(o)),a,r&&"hiddenLabel",i&&"size".concat((0,l.Z)(i))]};return(0,s.Z)(c,h,t)}(L);return(0,g.jsx)(p.Z.Provider,{value:null,children:(0,g.jsx)(O,(0,i.Z)({as:v,ownerState:L,className:(0,c.Z)(N.root,d),ref:t},E,{children:"string"!==typeof r||w?(0,g.jsxs)(a.Fragment,{children:["start"===S?m||(m=(0,g.jsx)("span",{className:"notranslate",children:"\u200b"})):null,r]}):(0,g.jsx)(u.Z,{color:"text.secondary",children:r})}))})}))},82618:function(e,t,n){"use strict";var r=n(36222),o=n(1048),i=n(32793),a=n(50390),c=n(44977),s=n(50076),l=n(36128),u=n(8208),p=n(15573),f=n(86875),d=n(40839),y=n(3299),h=n(57308),m=n(43432),v=n(62559),b=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected"],g=(0,u.ZP)(f.Z,{shouldForwardProp:function(e){return(0,u.FO)(e)||"classes"===e},name:"MuiListItemButton",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((function(e){var t,n=e.theme,o=e.ownerState;return(0,i.Z)((t={display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:n.transitions.create("background-color",{duration:n.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:n.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},(0,r.Z)(t,"&.".concat(m.Z.selected),(0,r.Z)({backgroundColor:(0,l.Fq)(n.palette.primary.main,n.palette.action.selectedOpacity)},"&.".concat(m.Z.focusVisible),{backgroundColor:(0,l.Fq)(n.palette.primary.main,n.palette.action.selectedOpacity+n.palette.action.focusOpacity)})),(0,r.Z)(t,"&.".concat(m.Z.selected,":hover"),{backgroundColor:(0,l.Fq)(n.palette.primary.main,n.palette.action.selectedOpacity+n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(0,l.Fq)(n.palette.primary.main,n.palette.action.selectedOpacity)}}),(0,r.Z)(t,"&.".concat(m.Z.focusVisible),{backgroundColor:n.palette.action.focus}),(0,r.Z)(t,"&.".concat(m.Z.disabled),{opacity:n.palette.action.disabledOpacity}),t),o.divider&&{borderBottom:"1px solid ".concat(n.palette.divider),backgroundClip:"padding-box"},"flex-start"===o.alignItems&&{alignItems:"flex-start"},!o.disableGutters&&{paddingLeft:16,paddingRight:16},o.dense&&{paddingTop:4,paddingBottom:4})})),x=a.forwardRef((function(e,t){var n=(0,p.Z)({props:e,name:"MuiListItemButton"}),r=n.alignItems,l=void 0===r?"center":r,u=n.autoFocus,f=void 0!==u&&u,x=n.component,O=void 0===x?"div":x,A=n.children,k=n.dense,j=void 0!==k&&k,w=n.disableGutters,S=void 0!==w&&w,P=n.divider,E=void 0!==P&&P,Z=n.focusVisibleClassName,R=n.selected,L=void 0!==R&&R,N=(0,o.Z)(n,b),C=a.useContext(h.Z),I={dense:j||C.dense||!1,alignItems:l,disableGutters:S},T=a.useRef(null);(0,d.Z)((function(){f&&T.current&&T.current.focus()}),[f]);var M=(0,i.Z)({},n,{alignItems:l,dense:I.dense,disableGutters:S,divider:E,selected:L}),D=function(e){var t=e.alignItems,n=e.classes,r=e.dense,o=e.disabled,a={root:["root",r&&"dense",!e.disableGutters&&"gutters",e.divider&&"divider",o&&"disabled","flex-start"===t&&"alignItemsFlexStart",e.selected&&"selected"]},c=(0,s.Z)(a,m.t,n);return(0,i.Z)({},n,c)}(M),_=(0,y.Z)(T,t);return(0,v.jsx)(h.Z.Provider,{value:I,children:(0,v.jsx)(g,(0,i.Z)({ref:_,component:O,focusVisibleClassName:(0,c.Z)(D.focusVisible,Z),ownerState:M},N,{classes:D,children:A}))})}));t.Z=x},48873:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(1048),o=n(32793),i=n(50390),a=n(44977),c=n(50076),s=n(8208),l=n(15573),u=n(91442),p=n(10594);function f(e){return(0,p.Z)("MuiListSubheader",e)}(0,n(43349).Z)("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);var d=n(62559),y=["className","color","component","disableGutters","disableSticky","inset"],h=(0,s.ZP)("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,"default"!==n.color&&t["color".concat((0,u.Z)(n.color))],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})((function(e){var t=e.theme,n=e.ownerState;return(0,o.Z)({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:t.palette.text.secondary,fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(14)},"primary"===n.color&&{color:t.palette.primary.main},"inherit"===n.color&&{color:"inherit"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.inset&&{paddingLeft:72},!n.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:t.palette.background.paper})})),m=i.forwardRef((function(e,t){var n=(0,l.Z)({props:e,name:"MuiListSubheader"}),i=n.className,s=n.color,p=void 0===s?"default":s,m=n.component,v=void 0===m?"li":m,b=n.disableGutters,g=void 0!==b&&b,x=n.disableSticky,O=void 0!==x&&x,A=n.inset,k=void 0!==A&&A,j=(0,r.Z)(n,y),w=(0,o.Z)({},n,{color:p,component:v,disableGutters:g,disableSticky:O,inset:k}),S=function(e){var t=e.classes,n=e.color,r=e.disableGutters,o=e.inset,i=e.disableSticky,a={root:["root","default"!==n&&"color".concat((0,u.Z)(n)),!r&&"gutters",o&&"inset",!i&&"sticky"]};return(0,c.Z)(a,f,t)}(w);return(0,d.jsx)(h,(0,o.Z)({as:v,className:(0,a.Z)(S.root,i),ref:t,ownerState:w},j))}))},81387:function(e){e.exports=function(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function A(e){var t=e.offset,n=e.layout,r=e.width,o=e.dataKey,i=e.data,a=e.dataPointFormatter,c=e.xAxis,s=e.yAxis,l=O(e,["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"]),u=(0,v.L6)(l),f=i.map((function(e,i){var l=a(e,o),f=l.x,d=l.y,y=l.value,h=l.errorVal;if(!h)return null;var v,x,O=[];if(Array.isArray(h)){var A=g(h,2);v=A[0],x=A[1]}else v=x=h;if("vertical"===n){var k=c.scale,j=d+t,w=j+r,S=j-r,P=k(y-v),E=k(y+x);O.push({x1:E,y1:w,x2:E,y2:S}),O.push({x1:P,y1:j,x2:E,y2:j}),O.push({x1:P,y1:w,x2:P,y2:S})}else if("horizontal"===n){var Z=s.scale,R=f+t,L=R-r,N=R+r,C=Z(y-v),I=Z(y+x);O.push({x1:L,y1:I,x2:N,y2:I}),O.push({x1:R,y1:C,x2:R,y2:I}),O.push({x1:L,y1:C,x2:N,y2:C})}return p.createElement(m.m,b({className:"recharts-errorBar",key:"bar-".concat(i)},u),O.map((function(e,t){return p.createElement("line",b({},e,{key:"line-".concat(t)}))})))}));return p.createElement(m.m,{className:"recharts-errorBars"},f)}A.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"},A.displayName="ErrorBar";var k=n(65607),j=n(87741),w=n(30631),S=n(79853),P=n(29728),E=n(46154);function Z(e){return Z="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z(e)}function R(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function L(){return L=Object.assign||function(e){for(var t=1;t0&&Math.abs(b)0&&Math.abs(m)=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:[],t=[[]];return e.forEach((function(e){k(e)?t[t.length-1].push(e):t[t.length-1].length>0&&t.push([])})),k(e[0])&&t[t.length-1].push(e[0]),t[t.length-1].length<=0&&(t=t.slice(0,-1)),t}(e);t&&(n=[n.reduce((function(e,t){return[].concat(O(e),O(t))}),[])]);var r=n.map((function(e){return e.reduce((function(e,t,n){return"".concat(e).concat(0===n?"M":"L").concat(t.x,",").concat(t.y)}),"")})).join("");return 1===n.length?"".concat(r,"Z"):r},w=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(i,e);var t,n,r,o=b(i);function i(){return h(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"render",value:function(){var e=this.props,t=e.points,n=e.className,r=e.baseLinePoints,o=e.connectNulls,i=y(e,["points","className","baseLinePoints","connectNulls"]);if(!t||!t.length)return null;var c=u()("recharts-polygon",n);if(r&&r.length){var s=i.stroke&&"none"!==i.stroke,l=function(e,t,n){var r=j(e,n);return"".concat("Z"===r.slice(-1)?r.slice(0,-1):r,"L").concat(j(t.reverse(),n).slice(1))}(t,r,o);return a.createElement("g",{className:c},a.createElement("path",d({},(0,p.L6)(i,!0),{fill:"Z"===l.slice(-1)?i.fill:"none",stroke:"none",d:l})),s?a.createElement("path",d({},(0,p.L6)(i,!0),{fill:"none",d:j(t,o)})):null,s?a.createElement("path",d({},(0,p.L6)(i,!0),{fill:"none",d:j(r,o)})):null)}var f=j(t,o);return a.createElement("path",d({},(0,p.L6)(i,!0),{fill:"Z"===f.slice(-1)?i.fill:"none",className:c,d:f}))}}])&&m(t.prototype,n),r&&m(t,r),i}(a.PureComponent),S=n(67855),P=n(6182);function E(e){return E="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function Z(){return Z=Object.assign||function(e){for(var t=1;tB?"outer"===t?"start":"end":n<-B?"outer"===t?"end":"start":"middle"}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.radius,o=e.axisLine,i=e.axisLineType,c=L(L({},(0,p.L6)(this.props)),{},{fill:"none"},(0,p.L6)(o));if("circle"===i)return a.createElement(s.o,Z({className:"recharts-polar-angle-axis-line"},c,{cx:t,cy:n,r:r}));var l=this.props.ticks.map((function(e){return(0,P.op)(t,n,r,e.coordinate)}));return a.createElement(w,Z({className:"recharts-polar-angle-axis-line"},c,{points:l}))}},{key:"renderTicks",value:function(){var e=this,t=this.props,n=t.ticks,r=t.tick,o=t.tickLine,i=t.tickFormatter,s=t.stroke,u=(0,p.L6)(this.props),f=(0,p.L6)(r),d=L(L({},u),{},{fill:"none"},(0,p.L6)(o)),y=n.map((function(t,n){var y=e.getTickLineCoord(t),h=L(L(L({textAnchor:e.getTickTextAnchor(t)},u),{},{stroke:"none",fill:s},f),{},{index:n,payload:t,x:y.x2,y:y.y2});return a.createElement(c.m,Z({className:"recharts-polar-angle-axis-tick",key:"tick-".concat(n)},(0,p.bw)(e.props,t,n)),o&&a.createElement("line",Z({className:"recharts-polar-angle-axis-tick-line"},d,y)),r&&l.renderTickItem(r,h,i?i(t.value,n):t.value))}));return a.createElement(c.m,{className:"recharts-polar-angle-axis-ticks"},y)}},{key:"render",value:function(){var e=this.props,t=e.ticks,n=e.radius,r=e.axisLine;return n<=0||!t||!t.length?null:a.createElement(c.m,{className:"recharts-polar-angle-axis"},r&&this.renderAxisLine(),this.renderTicks())}}])&&I(t.prototype,n),r&&I(t,r),l}(a.PureComponent);z.displayName="PolarAngleAxis",z.axisType="angleAxis",z.defaultProps={type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,domain:[0,"auto"],orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0};var V=n(34287),G=n.n(V),K=n(50338),$=n.n(K),H=n(71572);function W(e){return W="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(e)}function Y(){return Y=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function X(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ee(e,t){for(var n=0;nt?"start":e0?a()(e,"paddingAngle",0):0;if(n){var s=(0,P.k4)(n.endAngle-n.startAngle,e.endAngle-e.startAngle),l=I(I({},e),{},{startAngle:i+c,endAngle:i+s(r)+c});o.push(l),i=l.endAngle}else{var p=e.endAngle,f=e.startAngle,d=(0,P.k4)(0,p-f)(r),y=I(I({},e),{},{startAngle:i+c,endAngle:i+d+c});o.push(y),i=y.endAngle}})),d.createElement(v.m,null,e.renderSectorsStatically(o))}))}},{key:"renderSectors",value:function(){var e=this.props,t=e.sectors,n=e.isAnimationActive,r=this.state.prevSectors;return!(n&&t&&t.length)||r&&o()(r,t)?this.renderSectorsStatically(t):this.renderSectorsWithAnimation()}},{key:"render",value:function(){var e=this.props,t=e.hide,n=e.sectors,r=e.className,o=e.label,i=e.cx,a=e.cy,c=e.innerRadius,s=e.outerRadius,l=e.isAnimationActive,u=this.state.isAnimationFinished;if(t||!n||!n.length||!(0,P.hj)(i)||!(0,P.hj)(a)||!(0,P.hj)(c)||!(0,P.hj)(s))return null;var p=m()("recharts-pie",r);return d.createElement(v.m,{className:p},this.renderSectors(),o&&this.renderLabels(n),O._.renderCallByParent(this.props,null,!1),(!l||u)&&A.e.renderCallByParent(this.props,n,!1))}}])&&M(t.prototype,n),r&&M(t,r),c}(d.PureComponent);z.displayName="Pie",z.defaultProps={stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!w.x.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1},z.parseDeltaAngle=function(e,t){return(0,P.uY)(t-e)*Math.min(Math.abs(t-e),360)},z.getRealPieData=function(e){var t=e.props,n=t.data,r=t.children,o=(0,R.L6)(e.props),i=(0,j.NN)(r,k.b.displayName);return n&&n.length?n.map((function(e,t){return I(I(I({payload:e},o),e),i&&i[t]&&i[t].props)})):i&&i.length?i.map((function(e){return I(I({},o),e.props)})):[]},z.parseCoordinateOfPie=function(e,t){var n=t.top,r=t.left,o=t.width,i=t.height,a=(0,S.$4)(o,i);return{cx:r+(0,P.h1)(e.props.cx,o,o/2),cy:n+(0,P.h1)(e.props.cy,i,i/2),innerRadius:(0,P.h1)(e.props.innerRadius,a,0),outerRadius:(0,P.h1)(e.props.outerRadius,a,.8*a),maxRadius:e.props.maxRadius||Math.sqrt(o*o+i*i)/2}},z.getComposedData=function(e){var t=e.item,n=e.offset,r=z.getRealPieData(t);if(!r||!r.length)return null;var o=t.props,i=o.cornerRadius,a=o.startAngle,c=o.endAngle,s=o.paddingAngle,l=o.dataKey,u=o.nameKey,p=o.valueKey,d=o.tooltipType,y=Math.abs(t.props.minAngle),h=z.parseCoordinateOfPie(t,n),m=z.parseDeltaAngle(a,c),v=Math.abs(m),b=l;f()(l)&&f()(p)?((0,Z.Z)(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),b="value"):f()(l)&&((0,Z.Z)(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),b=p);var g,x,O=r.filter((function(e){return 0!==(0,E.F$)(e,b,0)})).length,A=v-O*y-(v>=360?O:O-1)*s,k=r.reduce((function(e,t){var n=(0,E.F$)(t,b,0);return e+((0,P.hj)(n)?n:0)}),0);k>0&&(g=r.map((function(e,t){var n,r=(0,E.F$)(e,b,0),o=(0,E.F$)(e,u,t),c=((0,P.hj)(r)?r:0)/k,l=(n=t?x.endAngle+(0,P.uY)(m)*s*(0!==r?1:0):a)+(0,P.uY)(m)*((0!==r?y:0)+c*A),p=(n+l)/2,f=(h.innerRadius+h.outerRadius)/2,v=[{name:o,value:r,payload:e,dataKey:b,type:d}],g=(0,S.op)(h.cx,h.cy,f,p);return x=I(I(I({percent:c,cornerRadius:i,name:o,tooltipPayload:v,midAngle:p,middleRadius:f,tooltipPosition:g},e),h),{},{value:(0,E.F$)(e,b),startAngle:n,endAngle:l,payload:e,paddingAngle:(0,P.uY)(m)*s})})));return I(I({},h),{},{sectors:g,data:r})}}}]); +//# sourceMappingURL=1233.9903fc82.chunk.js.map \ No newline at end of file diff --git a/portal-ui/build/static/js/1233.9903fc82.chunk.js.map b/portal-ui/build/static/js/1233.9903fc82.chunk.js.map new file mode 100644 index 000000000..7555c9d74 --- /dev/null +++ b/portal-ui/build/static/js/1233.9903fc82.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"static/js/1233.9903fc82.chunk.js","mappings":"gHAEIA,EAAyBC,EAAQ,OAKrCC,EAAQ,OAAU,EAElB,IAAIC,EAAiBH,EAAuBC,EAAQ,QAEhDG,EAAcH,EAAQ,OAEtBI,GAAW,EAAIF,EAAeG,UAAuB,EAAIF,EAAYG,KAAK,OAAQ,CACpFC,EAA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KAAMA,EACNkF,MAAO+hB,EACP5K,QAASvM,EACTV,QAASiV,EACTrhB,KAAM2jB,IAEJnK,GAAkBmD,EAAAA,EAAAA,IAAiBC,EAAWR,GAAIQ,EAAWP,GAAIgI,EAAcrD,GAgBnF,OAfApM,EAAOpF,EAAcA,EAAcA,EAAc,CAC/C2U,QAASA,EACTT,aAAcA,EACd1mB,KAAMA,EACNsc,eAAgBA,EAChB0H,SAAUA,EACVqD,aAAcA,EACd7K,gBAAiBA,GAChB1M,GAAQ8P,GAAa,GAAI,CAC1B1a,OAAOgU,EAAAA,EAAAA,IAAkBpJ,EAAOuU,GAChC7C,WAAY0F,EACZzF,SAAU2F,EACV/K,QAASvM,EACTkV,cAAc5I,EAAAA,EAAAA,IAASgJ,GAAcJ,QAM3C,OAAOxS,EAAcA,EAAc,GAAIoN,GAAa,GAAI,CACtDqD,QAASA,EACT5T,KAAMmX","sources":["../node_modules/@mui/icons-material/ExpandLess.js","../node_modules/@mui/icons-material/ExpandMore.js","../node_modules/@mui/icons-material/WatchLater.js","../node_modules/@mui/icons-material/ZoomOutMap.js","../node_modules/@mui/material/Card/cardClasses.js","../node_modules/@mui/material/Card/Card.js","../node_modules/@mui/material/CardHeader/cardHeaderClasses.js","../node_modules/@mui/material/CardHeader/CardHeader.js","../node_modules/@mui/material/DialogActions/dialogActionsClasses.js","../node_modules/@mui/material/DialogActions/DialogActions.js","../node_modules/@mui/material/InputAdornment/inputAdornmentClasses.js","../node_modules/@mui/material/InputAdornment/InputAdornment.js","../node_modules/@mui/material/ListItemButton/ListItemButton.js","../node_modules/@mui/material/ListSubheader/listSubheaderClasses.js","../node_modules/@mui/material/ListSubheader/ListSubheader.js","../node_modules/lodash/_arrayAggregator.js","../node_modules/lodash/_baseAggregator.js","../node_modules/lodash/_createAggregator.js","../node_modules/lodash/_getPrototype.js","../node_modules/lodash/groupBy.js","../node_modules/lodash/isPlainObject.js","../node_modules/lodash/maxBy.js","../node_modules/lodash/minBy.js","../node_modules/recharts/es6/cartesian/ErrorBar.js","../node_modules/recharts/es6/cartesian/Bar.js","../node_modules/recharts/es6/chart/BarChart.js","../node_modules/recharts/es6/shape/Polygon.js","../node_modules/recharts/es6/polar/PolarAngleAxis.js","../node_modules/recharts/es6/polar/PolarRadiusAxis.js","../node_modules/recharts/es6/chart/PieChart.js","../node_modules/recharts/es6/component/Cell.js","../node_modules/recharts/es6/polar/Pie.js"],"sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _jsxRuntime = require(\"react/jsx-runtime\");\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z\"\n}), 'ExpandLess');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _jsxRuntime = require(\"react/jsx-runtime\");\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z\"\n}), 'ExpandMore');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _jsxRuntime = require(\"react/jsx-runtime\");\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm4.2 14.2L11 13V7h1.5v5.2l4.5 2.7-.8 1.3z\"\n}), 'WatchLater');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _jsxRuntime = require(\"react/jsx-runtime\");\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"m15 3 2.3 2.3-2.89 2.87 1.42 1.42L18.7 6.7 21 9V3h-6zM3 9l2.3-2.3 2.87 2.89 1.42-1.42L6.7 5.3 9 3H3v6zm6 12-2.3-2.3 2.89-2.87-1.42-1.42L5.3 17.3 3 15v6h6zm12-6-2.3 2.3-2.87-2.89-1.42 1.42 2.89 2.87L15 21h6v-6z\"\n}), 'ZoomOutMap');\n\nexports.default = _default;","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getCardUtilityClass(slot) {\n return generateUtilityClass('MuiCard', slot);\n}\nconst cardClasses = generateUtilityClasses('MuiCard', ['root']);\nexport default cardClasses;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\", \"raised\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport Paper from '../Paper';\nimport { getCardUtilityClass } from './cardClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getCardUtilityClass, classes);\n};\n\nconst CardRoot = styled(Paper, {\n name: 'MuiCard',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(() => {\n return {\n overflow: 'hidden'\n };\n});\nconst Card = /*#__PURE__*/React.forwardRef(function Card(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiCard'\n });\n\n const {\n className,\n raised = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n raised\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(CardRoot, _extends({\n className: clsx(classes.root, className),\n elevation: raised ? 8 : undefined,\n ref: ref,\n ownerState: ownerState\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Card.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the card will use raised styling.\n * @default false\n */\n raised: chainPropTypes(PropTypes.bool, props => {\n if (props.raised && props.variant === 'outlined') {\n return new Error('MUI: Combining `raised={true}` with `variant=\"outlined\"` has no effect.');\n }\n\n return null;\n }),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default Card;","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getCardHeaderUtilityClass(slot) {\n return generateUtilityClass('MuiCardHeader', slot);\n}\nconst cardHeaderClasses = generateUtilityClasses('MuiCardHeader', ['root', 'avatar', 'action', 'content', 'title', 'subheader']);\nexport default cardHeaderClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"action\", \"avatar\", \"className\", \"component\", \"disableTypography\", \"subheader\", \"subheaderTypographyProps\", \"title\", \"titleTypographyProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport Typography from '../Typography';\nimport useThemeProps from '../styles/useThemeProps';\nimport styled from '../styles/styled';\nimport cardHeaderClasses, { getCardHeaderUtilityClass } from './cardHeaderClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n avatar: ['avatar'],\n action: ['action'],\n content: ['content'],\n title: ['title'],\n subheader: ['subheader']\n };\n return composeClasses(slots, getCardHeaderUtilityClass, classes);\n};\n\nconst CardHeaderRoot = styled('div', {\n name: 'MuiCardHeader',\n slot: 'Root',\n overridesResolver: (props, styles) => _extends({\n [`& .${cardHeaderClasses.title}`]: styles.title,\n [`& .${cardHeaderClasses.subheader}`]: styles.subheader\n }, styles.root)\n})({\n display: 'flex',\n alignItems: 'center',\n padding: 16\n});\nconst CardHeaderAvatar = styled('div', {\n name: 'MuiCardHeader',\n slot: 'Avatar',\n overridesResolver: (props, styles) => styles.avatar\n})({\n display: 'flex',\n flex: '0 0 auto',\n marginRight: 16\n});\nconst CardHeaderAction = styled('div', {\n name: 'MuiCardHeader',\n slot: 'Action',\n overridesResolver: (props, styles) => styles.action\n})({\n flex: '0 0 auto',\n alignSelf: 'flex-start',\n marginTop: -4,\n marginRight: -8,\n marginBottom: -4\n});\nconst CardHeaderContent = styled('div', {\n name: 'MuiCardHeader',\n slot: 'Content',\n overridesResolver: (props, styles) => styles.content\n})({\n flex: '1 1 auto'\n});\nconst CardHeader = /*#__PURE__*/React.forwardRef(function CardHeader(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiCardHeader'\n });\n\n const {\n action,\n avatar,\n className,\n component = 'div',\n disableTypography = false,\n subheader: subheaderProp,\n subheaderTypographyProps,\n title: titleProp,\n titleTypographyProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n component,\n disableTypography\n });\n\n const classes = useUtilityClasses(ownerState);\n let title = titleProp;\n\n if (title != null && title.type !== Typography && !disableTypography) {\n title = /*#__PURE__*/_jsx(Typography, _extends({\n variant: avatar ? 'body2' : 'h5',\n className: classes.title,\n component: \"span\",\n display: \"block\"\n }, titleTypographyProps, {\n children: title\n }));\n }\n\n let subheader = subheaderProp;\n\n if (subheader != null && subheader.type !== Typography && !disableTypography) {\n subheader = /*#__PURE__*/_jsx(Typography, _extends({\n variant: avatar ? 'body2' : 'body1',\n className: classes.subheader,\n color: \"text.secondary\",\n component: \"span\",\n display: \"block\"\n }, subheaderTypographyProps, {\n children: subheader\n }));\n }\n\n return /*#__PURE__*/_jsxs(CardHeaderRoot, _extends({\n className: clsx(classes.root, className),\n as: component,\n ref: ref,\n ownerState: ownerState\n }, other, {\n children: [avatar && /*#__PURE__*/_jsx(CardHeaderAvatar, {\n className: classes.avatar,\n ownerState: ownerState,\n children: avatar\n }), /*#__PURE__*/_jsxs(CardHeaderContent, {\n className: classes.content,\n ownerState: ownerState,\n children: [title, subheader]\n }), action && /*#__PURE__*/_jsx(CardHeaderAction, {\n className: classes.action,\n ownerState: ownerState,\n children: action\n })]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? CardHeader.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The action to display in the card header.\n */\n action: PropTypes.node,\n\n /**\n * The Avatar element to display.\n */\n avatar: PropTypes.node,\n\n /**\n * @ignore\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, `subheader` and `title` won't be wrapped by a Typography component.\n * This can be useful to render an alternative Typography variant by wrapping\n * the `title` text, and optional `subheader` text\n * with the Typography component.\n * @default false\n */\n disableTypography: PropTypes.bool,\n\n /**\n * The content of the component.\n */\n subheader: PropTypes.node,\n\n /**\n * These props will be forwarded to the subheader\n * (as long as disableTypography is not `true`).\n */\n subheaderTypographyProps: PropTypes.object,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n\n /**\n * The content of the component.\n */\n title: PropTypes.node,\n\n /**\n * These props will be forwarded to the title\n * (as long as disableTypography is not `true`).\n */\n titleTypographyProps: PropTypes.object\n} : void 0;\nexport default CardHeader;","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getDialogActionsUtilityClass(slot) {\n return generateUtilityClass('MuiDialogActions', slot);\n}\nconst dialogActionsClasses = generateUtilityClasses('MuiDialogActions', ['root', 'spacing']);\nexport default dialogActionsClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"disableSpacing\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport { getDialogActionsUtilityClass } from './dialogActionsClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableSpacing\n } = ownerState;\n const slots = {\n root: ['root', !disableSpacing && 'spacing']\n };\n return composeClasses(slots, getDialogActionsUtilityClass, classes);\n};\n\nconst DialogActionsRoot = styled('div', {\n name: 'MuiDialogActions',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.disableSpacing && styles.spacing];\n }\n})(({\n ownerState\n}) => _extends({\n display: 'flex',\n alignItems: 'center',\n padding: 8,\n justifyContent: 'flex-end',\n flex: '0 0 auto'\n}, !ownerState.disableSpacing && {\n '& > :not(:first-of-type)': {\n marginLeft: 8\n }\n}));\nconst DialogActions = /*#__PURE__*/React.forwardRef(function DialogActions(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiDialogActions'\n });\n\n const {\n className,\n disableSpacing = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n disableSpacing\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(DialogActionsRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogActions.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n * @default false\n */\n disableSpacing: PropTypes.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default DialogActions;","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getInputAdornmentUtilityClass(slot) {\n return generateUtilityClass('MuiInputAdornment', slot);\n}\nconst inputAdornmentClasses = generateUtilityClasses('MuiInputAdornment', ['root', 'filled', 'standard', 'outlined', 'positionStart', 'positionEnd', 'disablePointerEvents', 'hiddenLabel', 'sizeSmall']);\nexport default inputAdornmentClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\n\nvar _span;\n\nconst _excluded = [\"children\", \"className\", \"component\", \"disablePointerEvents\", \"disableTypography\", \"position\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport capitalize from '../utils/capitalize';\nimport Typography from '../Typography';\nimport FormControlContext from '../FormControl/FormControlContext';\nimport useFormControl from '../FormControl/useFormControl';\nimport styled from '../styles/styled';\nimport inputAdornmentClasses, { getInputAdornmentUtilityClass } from './inputAdornmentClasses';\nimport useThemeProps from '../styles/useThemeProps';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst overridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[`position${capitalize(ownerState.position)}`], ownerState.disablePointerEvents === true && styles.disablePointerEvents, styles[ownerState.variant]];\n};\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disablePointerEvents,\n hiddenLabel,\n position,\n size,\n variant\n } = ownerState;\n const slots = {\n root: ['root', disablePointerEvents && 'disablePointerEvents', position && `position${capitalize(position)}`, variant, hiddenLabel && 'hiddenLabel', size && `size${capitalize(size)}`]\n };\n return composeClasses(slots, getInputAdornmentUtilityClass, classes);\n};\n\nconst InputAdornmentRoot = styled('div', {\n name: 'MuiInputAdornment',\n slot: 'Root',\n overridesResolver\n})(({\n theme,\n ownerState\n}) => _extends({\n display: 'flex',\n height: '0.01em',\n // Fix IE11 flexbox alignment. To remove at some point.\n maxHeight: '2em',\n alignItems: 'center',\n whiteSpace: 'nowrap',\n color: theme.palette.action.active\n}, ownerState.variant === 'filled' && {\n // Styles applied to the root element if `variant=\"filled\"`.\n [`&.${inputAdornmentClasses.positionStart}&:not(.${inputAdornmentClasses.hiddenLabel})`]: {\n marginTop: 16\n }\n}, ownerState.position === 'start' && {\n // Styles applied to the root element if `position=\"start\"`.\n marginRight: 8\n}, ownerState.position === 'end' && {\n // Styles applied to the root element if `position=\"end\"`.\n marginLeft: 8\n}, ownerState.disablePointerEvents === true && {\n // Styles applied to the root element if `disablePointerEvents={true}`.\n pointerEvents: 'none'\n}));\nconst InputAdornment = /*#__PURE__*/React.forwardRef(function InputAdornment(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiInputAdornment'\n });\n\n const {\n children,\n className,\n component = 'div',\n disablePointerEvents = false,\n disableTypography = false,\n position,\n variant: variantProp\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const muiFormControl = useFormControl() || {};\n let variant = variantProp;\n\n if (variantProp && muiFormControl.variant) {\n if (process.env.NODE_ENV !== 'production') {\n if (variantProp === muiFormControl.variant) {\n console.error('MUI: The `InputAdornment` variant infers the variant prop ' + 'you do not have to provide one.');\n }\n }\n }\n\n if (muiFormControl && !variant) {\n variant = muiFormControl.variant;\n }\n\n const ownerState = _extends({}, props, {\n hiddenLabel: muiFormControl.hiddenLabel,\n size: muiFormControl.size,\n disablePointerEvents,\n position,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(FormControlContext.Provider, {\n value: null,\n children: /*#__PURE__*/_jsx(InputAdornmentRoot, _extends({\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref\n }, other, {\n children: typeof children === 'string' && !disableTypography ? /*#__PURE__*/_jsx(Typography, {\n color: \"text.secondary\",\n children: children\n }) : /*#__PURE__*/_jsxs(React.Fragment, {\n children: [position === 'start' ?\n /* notranslate needed while Google Translate will not fix zero-width space issue */\n _span || (_span = /*#__PURE__*/_jsx(\"span\", {\n className: \"notranslate\",\n children: \"\\u200B\"\n })) : null, children]\n })\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? InputAdornment.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component, normally an `IconButton` or string.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * Disable pointer events on the root.\n * This allows for the content of the adornment to focus the `input` on click.\n * @default false\n */\n disablePointerEvents: PropTypes.bool,\n\n /**\n * If children is a string then disable wrapping in a Typography component.\n * @default false\n */\n disableTypography: PropTypes.bool,\n\n /**\n * The position this adornment should appear relative to the `Input`.\n */\n position: PropTypes.oneOf(['end', 'start']).isRequired,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n\n /**\n * The variant to use.\n * Note: If you are using the `TextField` component or the `FormControl` component\n * you do not have to set this manually.\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default InputAdornment;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"alignItems\", \"autoFocus\", \"component\", \"children\", \"dense\", \"disableGutters\", \"divider\", \"focusVisibleClassName\", \"selected\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport { alpha } from '@mui/system';\nimport styled, { rootShouldForwardProp } from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport ButtonBase from '../ButtonBase';\nimport useEnhancedEffect from '../utils/useEnhancedEffect';\nimport useForkRef from '../utils/useForkRef';\nimport ListContext from '../List/ListContext';\nimport listItemButtonClasses, { getListItemButtonUtilityClass } from './listItemButtonClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const overridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.dense && styles.dense, ownerState.alignItems === 'flex-start' && styles.alignItemsFlexStart, ownerState.divider && styles.divider, !ownerState.disableGutters && styles.gutters];\n};\n\nconst useUtilityClasses = ownerState => {\n const {\n alignItems,\n classes,\n dense,\n disabled,\n disableGutters,\n divider,\n selected\n } = ownerState;\n const slots = {\n root: ['root', dense && 'dense', !disableGutters && 'gutters', divider && 'divider', disabled && 'disabled', alignItems === 'flex-start' && 'alignItemsFlexStart', selected && 'selected']\n };\n const composedClasses = composeClasses(slots, getListItemButtonUtilityClass, classes);\n return _extends({}, classes, composedClasses);\n};\n\nconst ListItemButtonRoot = styled(ButtonBase, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiListItemButton',\n slot: 'Root',\n overridesResolver\n})(({\n theme,\n ownerState\n}) => _extends({\n display: 'flex',\n flexGrow: 1,\n justifyContent: 'flex-start',\n alignItems: 'center',\n position: 'relative',\n textDecoration: 'none',\n boxSizing: 'border-box',\n textAlign: 'left',\n paddingTop: 8,\n paddingBottom: 8,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shortest\n }),\n '&:hover': {\n textDecoration: 'none',\n backgroundColor: theme.palette.action.hover,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n [`&.${listItemButtonClasses.selected}`]: {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),\n [`&.${listItemButtonClasses.focusVisible}`]: {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)\n }\n },\n [`&.${listItemButtonClasses.selected}:hover`]: {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity)\n }\n },\n [`&.${listItemButtonClasses.focusVisible}`]: {\n backgroundColor: theme.palette.action.focus\n },\n [`&.${listItemButtonClasses.disabled}`]: {\n opacity: theme.palette.action.disabledOpacity\n }\n}, ownerState.divider && {\n borderBottom: `1px solid ${theme.palette.divider}`,\n backgroundClip: 'padding-box'\n}, ownerState.alignItems === 'flex-start' && {\n alignItems: 'flex-start'\n}, !ownerState.disableGutters && {\n paddingLeft: 16,\n paddingRight: 16\n}, ownerState.dense && {\n paddingTop: 4,\n paddingBottom: 4\n}));\nconst ListItemButton = /*#__PURE__*/React.forwardRef(function ListItemButton(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiListItemButton'\n });\n\n const {\n alignItems = 'center',\n autoFocus = false,\n component = 'div',\n children,\n dense = false,\n disableGutters = false,\n divider = false,\n focusVisibleClassName,\n selected = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const context = React.useContext(ListContext);\n const childContext = {\n dense: dense || context.dense || false,\n alignItems,\n disableGutters\n };\n const listItemRef = React.useRef(null);\n useEnhancedEffect(() => {\n if (autoFocus) {\n if (listItemRef.current) {\n listItemRef.current.focus();\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('MUI: Unable to set focus to a ListItemButton whose component has not been rendered.');\n }\n }\n }, [autoFocus]);\n\n const ownerState = _extends({}, props, {\n alignItems,\n dense: childContext.dense,\n disableGutters,\n divider,\n selected\n });\n\n const classes = useUtilityClasses(ownerState);\n const handleRef = useForkRef(listItemRef, ref);\n return /*#__PURE__*/_jsx(ListContext.Provider, {\n value: childContext,\n children: /*#__PURE__*/_jsx(ListItemButtonRoot, _extends({\n ref: handleRef,\n component: component,\n focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),\n ownerState: ownerState\n }, other, {\n classes: classes,\n children: children\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemButton.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Defines the `align-items` style property.\n * @default 'center'\n */\n alignItems: PropTypes.oneOf(['center', 'flex-start']),\n\n /**\n * If `true`, the list item is focused during the first mount.\n * Focus will also be triggered if the value changes from false to true.\n * @default false\n */\n autoFocus: PropTypes.bool,\n\n /**\n * The content of the component if a `ListItemSecondaryAction` is used it must\n * be the last child.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used.\n * The prop defaults to the value inherited from the parent List component.\n * @default false\n */\n dense: PropTypes.bool,\n\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the left and right padding is removed.\n * @default false\n */\n disableGutters: PropTypes.bool,\n\n /**\n * If `true`, a 1px light border is added to the bottom of the list item.\n * @default false\n */\n divider: PropTypes.bool,\n\n /**\n * This prop can help identify which element has keyboard focus.\n * The class name will be applied when the element gains the focus through keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: PropTypes.string,\n\n /**\n * Use to apply selected styling.\n * @default false\n */\n selected: PropTypes.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default ListItemButton;","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getListSubheaderUtilityClass(slot) {\n return generateUtilityClass('MuiListSubheader', slot);\n}\nconst listSubheaderClasses = generateUtilityClasses('MuiListSubheader', ['root', 'colorPrimary', 'colorInherit', 'gutters', 'inset', 'sticky']);\nexport default listSubheaderClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"color\", \"component\", \"disableGutters\", \"disableSticky\", \"inset\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport capitalize from '../utils/capitalize';\nimport { getListSubheaderUtilityClass } from './listSubheaderClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n color,\n disableGutters,\n inset,\n disableSticky\n } = ownerState;\n const slots = {\n root: ['root', color !== 'default' && `color${capitalize(color)}`, !disableGutters && 'gutters', inset && 'inset', !disableSticky && 'sticky']\n };\n return composeClasses(slots, getListSubheaderUtilityClass, classes);\n};\n\nconst ListSubheaderRoot = styled('li', {\n name: 'MuiListSubheader',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.color !== 'default' && styles[`color${capitalize(ownerState.color)}`], !ownerState.disableGutters && styles.gutters, ownerState.inset && styles.inset, !ownerState.disableSticky && styles.sticky];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n boxSizing: 'border-box',\n lineHeight: '48px',\n listStyle: 'none',\n color: theme.palette.text.secondary,\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightMedium,\n fontSize: theme.typography.pxToRem(14)\n}, ownerState.color === 'primary' && {\n color: theme.palette.primary.main\n}, ownerState.color === 'inherit' && {\n color: 'inherit'\n}, !ownerState.disableGutters && {\n paddingLeft: 16,\n paddingRight: 16\n}, ownerState.inset && {\n paddingLeft: 72\n}, !ownerState.disableSticky && {\n position: 'sticky',\n top: 0,\n zIndex: 1,\n backgroundColor: theme.palette.background.paper\n}));\nconst ListSubheader = /*#__PURE__*/React.forwardRef(function ListSubheader(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiListSubheader'\n });\n\n const {\n className,\n color = 'default',\n component = 'li',\n disableGutters = false,\n disableSticky = false,\n inset = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n color,\n component,\n disableGutters,\n disableSticky,\n inset\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(ListSubheaderRoot, _extends({\n as: component,\n className: clsx(classes.root, className),\n ref: ref,\n ownerState: ownerState\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ListSubheader.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'default'\n */\n color: PropTypes.oneOf(['default', 'inherit', 'primary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * If `true`, the List Subheader will not have gutters.\n * @default false\n */\n disableGutters: PropTypes.bool,\n\n /**\n * If `true`, the List Subheader will not stick to the top during scroll.\n * @default false\n */\n disableSticky: PropTypes.bool,\n\n /**\n * If `true`, the List Subheader is indented.\n * @default false\n */\n inset: PropTypes.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default ListSubheader;","/**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n}\n\nmodule.exports = arrayAggregator;\n","var baseEach = require('./_baseEach');\n\n/**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n}\n\nmodule.exports = baseAggregator;\n","var arrayAggregator = require('./_arrayAggregator'),\n baseAggregator = require('./_baseAggregator'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray');\n\n/**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\nfunction createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\n };\n}\n\nmodule.exports = createAggregator;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var baseAssignValue = require('./_baseAssignValue'),\n createAggregator = require('./_createAggregator');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\nvar groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n});\n\nmodule.exports = groupBy;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","var baseExtremum = require('./_baseExtremum'),\n baseGt = require('./_baseGt'),\n baseIteratee = require('./_baseIteratee');\n\n/**\n * This method is like `_.max` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.maxBy(objects, function(o) { return o.n; });\n * // => { 'n': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.maxBy(objects, 'n');\n * // => { 'n': 2 }\n */\nfunction maxBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, baseIteratee(iteratee, 2), baseGt)\n : undefined;\n}\n\nmodule.exports = maxBy;\n","var baseExtremum = require('./_baseExtremum'),\n baseIteratee = require('./_baseIteratee'),\n baseLt = require('./_baseLt');\n\n/**\n * This method is like `_.min` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * // The `_.property` iteratee shorthand.\n * _.minBy(objects, 'n');\n * // => { 'n': 1 }\n */\nfunction minBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt)\n : undefined;\n}\n\nmodule.exports = minBy;\n","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * @fileOverview Render a group of error bar\n */\nimport React from 'react';\nimport { Layer } from '../container/Layer';\nimport { filterProps } from '../util/types';\nexport function ErrorBar(props) {\n var offset = props.offset,\n layout = props.layout,\n width = props.width,\n dataKey = props.dataKey,\n data = props.data,\n dataPointFormatter = props.dataPointFormatter,\n xAxis = props.xAxis,\n yAxis = props.yAxis,\n others = _objectWithoutProperties(props, [\"offset\", \"layout\", \"width\", \"dataKey\", \"data\", \"dataPointFormatter\", \"xAxis\", \"yAxis\"]);\n\n var svgProps = filterProps(others);\n var errorBars = data.map(function (entry, i) {\n var _dataPointFormatter = dataPointFormatter(entry, dataKey),\n x = _dataPointFormatter.x,\n y = _dataPointFormatter.y,\n value = _dataPointFormatter.value,\n errorVal = _dataPointFormatter.errorVal;\n\n if (!errorVal) {\n return null;\n }\n\n var lineCoordinates = [];\n var lowBound, highBound;\n\n if (Array.isArray(errorVal)) {\n var _errorVal = _slicedToArray(errorVal, 2);\n\n lowBound = _errorVal[0];\n highBound = _errorVal[1];\n } else {\n lowBound = highBound = errorVal;\n }\n\n if (layout === 'vertical') {\n // error bar for horizontal charts, the y is fixed, x is a range value\n var scale = xAxis.scale;\n var yMid = y + offset;\n var yMin = yMid + width;\n var yMax = yMid - width;\n var xMin = scale(value - lowBound);\n var xMax = scale(value + highBound); // the right line of |--|\n\n lineCoordinates.push({\n x1: xMax,\n y1: yMin,\n x2: xMax,\n y2: yMax\n }); // the middle line of |--|\n\n lineCoordinates.push({\n x1: xMin,\n y1: yMid,\n x2: xMax,\n y2: yMid\n }); // the left line of |--|\n\n lineCoordinates.push({\n x1: xMin,\n y1: yMin,\n x2: xMin,\n y2: yMax\n });\n } else if (layout === 'horizontal') {\n // error bar for horizontal charts, the x is fixed, y is a range value\n var _scale = yAxis.scale;\n var xMid = x + offset;\n\n var _xMin = xMid - width;\n\n var _xMax = xMid + width;\n\n var _yMin = _scale(value - lowBound);\n\n var _yMax = _scale(value + highBound); // the top line\n\n\n lineCoordinates.push({\n x1: _xMin,\n y1: _yMax,\n x2: _xMax,\n y2: _yMax\n }); // the middle line\n\n lineCoordinates.push({\n x1: xMid,\n y1: _yMin,\n x2: xMid,\n y2: _yMax\n }); // the bottom line\n\n lineCoordinates.push({\n x1: _xMin,\n y1: _yMin,\n x2: _xMax,\n y2: _yMin\n });\n }\n\n return (\n /*#__PURE__*/\n // eslint-disable-next-line react/no-array-index-key\n React.createElement(Layer, _extends({\n className: \"recharts-errorBar\",\n key: \"bar-\".concat(i)\n }, svgProps), lineCoordinates.map(function (coordinates, index) {\n return (\n /*#__PURE__*/\n // eslint-disable-next-line react/no-array-index-key\n React.createElement(\"line\", _extends({}, coordinates, {\n key: \"line-\".concat(index)\n }))\n );\n }))\n );\n });\n return /*#__PURE__*/React.createElement(Layer, {\n className: \"recharts-errorBars\"\n }, errorBars);\n}\nErrorBar.defaultProps = {\n stroke: 'black',\n strokeWidth: 1.5,\n width: 5,\n offset: 0,\n layout: 'horizontal'\n};\nErrorBar.displayName = 'ErrorBar';","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport _isNil from \"lodash/isNil\";\nimport _isEqual from \"lodash/isEqual\";\nimport _isFunction from \"lodash/isFunction\";\nimport _isArray from \"lodash/isArray\";\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/**\n * @fileOverview Render a group of bar\n */\nimport React, { PureComponent } from 'react';\nimport classNames from 'classnames';\nimport Animate from 'react-smooth';\nimport { Rectangle } from '../shape/Rectangle';\nimport { Layer } from '../container/Layer';\nimport { ErrorBar } from './ErrorBar';\nimport { Cell } from '../component/Cell';\nimport { LabelList } from '../component/LabelList';\nimport { uniqueId, mathSign, interpolateNumber } from '../util/DataUtils';\nimport { findAllByType } from '../util/ReactUtils';\nimport { Global } from '../util/Global';\nimport { getCateCoordinateOfBar, getValueByDataKey, truncateByDomain, getBaseValueOfBar, findPositionOfBar, getTooltipItem } from '../util/ChartUtils';\nimport { filterProps, adaptEventsOfChild } from '../util/types';\nexport var Bar = /*#__PURE__*/function (_PureComponent) {\n _inherits(Bar, _PureComponent);\n\n var _super = _createSuper(Bar);\n\n function Bar() {\n var _this;\n\n _classCallCheck(this, Bar);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.state = {\n isAnimationFinished: false\n };\n _this.id = uniqueId('recharts-bar-');\n\n _this.handleAnimationEnd = function () {\n var onAnimationEnd = _this.props.onAnimationEnd;\n\n _this.setState({\n isAnimationFinished: true\n });\n\n if (onAnimationEnd) {\n onAnimationEnd();\n }\n };\n\n _this.handleAnimationStart = function () {\n var onAnimationStart = _this.props.onAnimationStart;\n\n _this.setState({\n isAnimationFinished: false\n });\n\n if (onAnimationStart) {\n onAnimationStart();\n }\n };\n\n return _this;\n }\n\n _createClass(Bar, [{\n key: \"renderRectanglesStatically\",\n value: function renderRectanglesStatically(data) {\n var _this2 = this;\n\n var shape = this.props.shape;\n var baseProps = filterProps(this.props);\n return data && data.map(function (entry, i) {\n var props = _objectSpread(_objectSpread(_objectSpread({}, baseProps), entry), {}, {\n index: i\n });\n\n return /*#__PURE__*/React.createElement(Layer, _extends({\n className: \"recharts-bar-rectangle\"\n }, adaptEventsOfChild(_this2.props, entry, i), {\n key: \"rectangle-\".concat(i) // eslint-disable-line react/no-array-index-key\n\n }), Bar.renderRectangle(shape, props));\n });\n }\n }, {\n key: \"renderRectanglesWithAnimation\",\n value: function renderRectanglesWithAnimation() {\n var _this3 = this;\n\n var _this$props = this.props,\n data = _this$props.data,\n layout = _this$props.layout,\n isAnimationActive = _this$props.isAnimationActive,\n animationBegin = _this$props.animationBegin,\n animationDuration = _this$props.animationDuration,\n animationEasing = _this$props.animationEasing,\n animationId = _this$props.animationId;\n var prevData = this.state.prevData;\n return /*#__PURE__*/React.createElement(Animate, {\n begin: animationBegin,\n duration: animationDuration,\n isActive: isAnimationActive,\n easing: animationEasing,\n from: {\n t: 0\n },\n to: {\n t: 1\n },\n key: \"bar-\".concat(animationId),\n onAnimationEnd: this.handleAnimationEnd,\n onAnimationStart: this.handleAnimationStart\n }, function (_ref) {\n var t = _ref.t;\n var stepData = data.map(function (entry, index) {\n var prev = prevData && prevData[index];\n\n if (prev) {\n var interpolatorX = interpolateNumber(prev.x, entry.x);\n var interpolatorY = interpolateNumber(prev.y, entry.y);\n var interpolatorWidth = interpolateNumber(prev.width, entry.width);\n var interpolatorHeight = interpolateNumber(prev.height, entry.height);\n return _objectSpread(_objectSpread({}, entry), {}, {\n x: interpolatorX(t),\n y: interpolatorY(t),\n width: interpolatorWidth(t),\n height: interpolatorHeight(t)\n });\n }\n\n if (layout === 'horizontal') {\n var _interpolatorHeight = interpolateNumber(0, entry.height);\n\n var h = _interpolatorHeight(t);\n\n return _objectSpread(_objectSpread({}, entry), {}, {\n y: entry.y + entry.height - h,\n height: h\n });\n }\n\n var interpolator = interpolateNumber(0, entry.width);\n var w = interpolator(t);\n return _objectSpread(_objectSpread({}, entry), {}, {\n width: w\n });\n });\n return /*#__PURE__*/React.createElement(Layer, null, _this3.renderRectanglesStatically(stepData));\n });\n }\n }, {\n key: \"renderRectangles\",\n value: function renderRectangles() {\n var _this$props2 = this.props,\n data = _this$props2.data,\n isAnimationActive = _this$props2.isAnimationActive;\n var prevData = this.state.prevData;\n\n if (isAnimationActive && data && data.length && (!prevData || !_isEqual(prevData, data))) {\n return this.renderRectanglesWithAnimation();\n }\n\n return this.renderRectanglesStatically(data);\n }\n }, {\n key: \"renderBackground\",\n value: function renderBackground() {\n var _this4 = this;\n\n var data = this.props.data;\n var backgroundProps = filterProps(this.props.background);\n return data.map(function (entry, i) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var value = entry.value,\n background = entry.background,\n rest = _objectWithoutProperties(entry, [\"value\", \"background\"]);\n\n if (!background) {\n return null;\n }\n\n var props = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, rest), {}, {\n fill: '#eee'\n }, background), backgroundProps), adaptEventsOfChild(_this4.props, entry, i)), {}, {\n index: i,\n key: \"background-bar-\".concat(i),\n className: 'recharts-bar-background-rectangle'\n });\n\n return Bar.renderRectangle(_this4.props.background, props);\n });\n }\n }, {\n key: \"renderErrorBar\",\n value: function renderErrorBar() {\n if (this.props.isAnimationActive && !this.state.isAnimationFinished) {\n return null;\n }\n\n var _this$props3 = this.props,\n data = _this$props3.data,\n xAxis = _this$props3.xAxis,\n yAxis = _this$props3.yAxis,\n layout = _this$props3.layout,\n children = _this$props3.children;\n var errorBarItems = findAllByType(children, ErrorBar.displayName);\n\n if (!errorBarItems) {\n return null;\n }\n\n var offset = layout === 'vertical' ? data[0].height / 2 : data[0].width / 2;\n\n function dataPointFormatter(dataPoint, dataKey) {\n return {\n x: dataPoint.x,\n y: dataPoint.y,\n value: dataPoint.value,\n errorVal: getValueByDataKey(dataPoint, dataKey)\n };\n }\n\n return errorBarItems.map(function (item, i) {\n return /*#__PURE__*/React.cloneElement(item, {\n key: \"error-bar-\".concat(i),\n // eslint-disable-line react/no-array-index-key\n data: data,\n xAxis: xAxis,\n yAxis: yAxis,\n layout: layout,\n offset: offset,\n dataPointFormatter: dataPointFormatter\n });\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props4 = this.props,\n hide = _this$props4.hide,\n data = _this$props4.data,\n className = _this$props4.className,\n xAxis = _this$props4.xAxis,\n yAxis = _this$props4.yAxis,\n left = _this$props4.left,\n top = _this$props4.top,\n width = _this$props4.width,\n height = _this$props4.height,\n isAnimationActive = _this$props4.isAnimationActive,\n background = _this$props4.background,\n id = _this$props4.id;\n\n if (hide || !data || !data.length) {\n return null;\n }\n\n var isAnimationFinished = this.state.isAnimationFinished;\n var layerClass = classNames('recharts-bar', className);\n var needClip = xAxis && xAxis.allowDataOverflow || yAxis && yAxis.allowDataOverflow;\n var clipPathId = _isNil(id) ? this.id : id;\n return /*#__PURE__*/React.createElement(Layer, {\n className: layerClass\n }, needClip ? /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"clipPath\", {\n id: \"clipPath-\".concat(clipPathId)\n }, /*#__PURE__*/React.createElement(\"rect\", {\n x: left,\n y: top,\n width: width,\n height: height\n }))) : null, /*#__PURE__*/React.createElement(Layer, {\n className: \"recharts-bar-rectangles\",\n clipPath: needClip ? \"url(#clipPath-\".concat(clipPathId, \")\") : null\n }, background ? this.renderBackground() : null, this.renderRectangles()), this.renderErrorBar(), (!isAnimationActive || isAnimationFinished) && LabelList.renderCallByParent(this.props, data));\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps, prevState) {\n if (nextProps.animationId !== prevState.prevAnimationId) {\n return {\n prevAnimationId: nextProps.animationId,\n curData: nextProps.data,\n prevData: prevState.curData\n };\n }\n\n if (nextProps.data !== prevState.curData) {\n return {\n curData: nextProps.data\n };\n }\n\n return null;\n }\n }, {\n key: \"renderRectangle\",\n value: function renderRectangle(option, props) {\n var rectangle;\n\n if ( /*#__PURE__*/React.isValidElement(option)) {\n rectangle = /*#__PURE__*/React.cloneElement(option, props);\n } else if (_isFunction(option)) {\n rectangle = option(props);\n } else {\n rectangle = /*#__PURE__*/React.createElement(Rectangle, props);\n }\n\n return rectangle;\n }\n }]);\n\n return Bar;\n}(PureComponent);\nBar.displayName = 'Bar';\nBar.defaultProps = {\n xAxisId: 0,\n yAxisId: 0,\n legendType: 'rect',\n minPointSize: 0,\n hide: false,\n // data of bar\n data: [],\n layout: 'vertical',\n isAnimationActive: !Global.isSsr,\n animationBegin: 0,\n animationDuration: 400,\n animationEasing: 'ease'\n};\n\nBar.getComposedData = function (_ref2) {\n var props = _ref2.props,\n item = _ref2.item,\n barPosition = _ref2.barPosition,\n bandSize = _ref2.bandSize,\n xAxis = _ref2.xAxis,\n yAxis = _ref2.yAxis,\n xAxisTicks = _ref2.xAxisTicks,\n yAxisTicks = _ref2.yAxisTicks,\n stackedData = _ref2.stackedData,\n dataStartIndex = _ref2.dataStartIndex,\n displayedData = _ref2.displayedData,\n offset = _ref2.offset;\n var pos = findPositionOfBar(barPosition, item);\n\n if (!pos) {\n return null;\n }\n\n var layout = props.layout;\n var _item$props = item.props,\n dataKey = _item$props.dataKey,\n children = _item$props.children,\n minPointSize = _item$props.minPointSize;\n var numericAxis = layout === 'horizontal' ? yAxis : xAxis;\n var stackedDomain = stackedData ? numericAxis.scale.domain() : null;\n var baseValue = getBaseValueOfBar({\n numericAxis: numericAxis\n });\n var cells = findAllByType(children, Cell.displayName);\n var rects = displayedData.map(function (entry, index) {\n var value, x, y, width, height, background;\n\n if (stackedData) {\n value = truncateByDomain(stackedData[dataStartIndex + index], stackedDomain);\n } else {\n value = getValueByDataKey(entry, dataKey);\n\n if (!_isArray(value)) {\n value = [baseValue, value];\n }\n }\n\n if (layout === 'horizontal') {\n x = getCateCoordinateOfBar({\n axis: xAxis,\n ticks: xAxisTicks,\n bandSize: bandSize,\n offset: pos.offset,\n entry: entry,\n index: index\n });\n y = yAxis.scale(value[1]);\n width = pos.size;\n height = yAxis.scale(value[0]) - yAxis.scale(value[1]);\n background = {\n x: x,\n y: yAxis.y,\n width: width,\n height: yAxis.height\n };\n\n if (Math.abs(minPointSize) > 0 && Math.abs(height) < Math.abs(minPointSize)) {\n var delta = mathSign(height || minPointSize) * (Math.abs(minPointSize) - Math.abs(height));\n y -= delta;\n height += delta;\n }\n } else {\n x = xAxis.scale(value[0]);\n y = getCateCoordinateOfBar({\n axis: yAxis,\n ticks: yAxisTicks,\n bandSize: bandSize,\n offset: pos.offset,\n entry: entry,\n index: index\n });\n width = xAxis.scale(value[1]) - xAxis.scale(value[0]);\n height = pos.size;\n background = {\n x: xAxis.x,\n y: y,\n width: xAxis.width,\n height: height\n };\n\n if (Math.abs(minPointSize) > 0 && Math.abs(width) < Math.abs(minPointSize)) {\n var _delta = mathSign(width || minPointSize) * (Math.abs(minPointSize) - Math.abs(width));\n\n width += _delta;\n }\n }\n\n return _objectSpread(_objectSpread(_objectSpread({}, entry), {}, {\n x: x,\n y: y,\n width: width,\n height: height,\n value: stackedData ? value : value[1],\n payload: entry,\n background: background\n }, cells && cells[index] && cells[index].props), {}, {\n tooltipPayload: [getTooltipItem(item, entry)],\n tooltipPosition: {\n x: x + width / 2,\n y: y + height / 2\n }\n });\n });\n return _objectSpread({\n data: rects,\n layout: layout\n }, offset);\n};","/**\n * @fileOverview Bar Chart\n */\nimport { generateCategoricalChart } from './generateCategoricalChart';\nimport { Bar } from '../cartesian/Bar';\nimport { XAxis } from '../cartesian/XAxis';\nimport { YAxis } from '../cartesian/YAxis';\nimport { formatAxisMap } from '../util/CartesianUtils';\nexport var BarChart = generateCategoricalChart({\n chartName: 'BarChart',\n GraphicalChild: Bar,\n defaultTooltipEventType: 'axis',\n validateTooltipEventTypes: ['axis', 'item'],\n axisComponents: [{\n axisType: 'xAxis',\n AxisComp: XAxis\n }, {\n axisType: 'yAxis',\n AxisComp: YAxis\n }],\n formatAxisMap: formatAxisMap\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n/**\n * @fileOverview Polygon\n */\nimport React, { PureComponent } from 'react';\nimport classNames from 'classnames';\nimport { filterProps } from '../util/types';\n\nvar isValidatePoint = function isValidatePoint(point) {\n return point && point.x === +point.x && point.y === +point.y;\n};\n\nvar getParsedPoints = function getParsedPoints() {\n var points = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var segmentPoints = [[]];\n points.forEach(function (entry) {\n if (isValidatePoint(entry)) {\n segmentPoints[segmentPoints.length - 1].push(entry);\n } else if (segmentPoints[segmentPoints.length - 1].length > 0) {\n // add another path\n segmentPoints.push([]);\n }\n });\n\n if (isValidatePoint(points[0])) {\n segmentPoints[segmentPoints.length - 1].push(points[0]);\n }\n\n if (segmentPoints[segmentPoints.length - 1].length <= 0) {\n segmentPoints = segmentPoints.slice(0, -1);\n }\n\n return segmentPoints;\n};\n\nvar getSinglePolygonPath = function getSinglePolygonPath(points, connectNulls) {\n var segmentPoints = getParsedPoints(points);\n\n if (connectNulls) {\n segmentPoints = [segmentPoints.reduce(function (res, segPoints) {\n return [].concat(_toConsumableArray(res), _toConsumableArray(segPoints));\n }, [])];\n }\n\n var polygonPath = segmentPoints.map(function (segPoints) {\n return segPoints.reduce(function (path, point, index) {\n return \"\".concat(path).concat(index === 0 ? 'M' : 'L').concat(point.x, \",\").concat(point.y);\n }, '');\n }).join('');\n return segmentPoints.length === 1 ? \"\".concat(polygonPath, \"Z\") : polygonPath;\n};\n\nvar getRanglePath = function getRanglePath(points, baseLinePoints, connectNulls) {\n var outerPath = getSinglePolygonPath(points, connectNulls);\n return \"\".concat(outerPath.slice(-1) === 'Z' ? outerPath.slice(0, -1) : outerPath, \"L\").concat(getSinglePolygonPath(baseLinePoints.reverse(), connectNulls).slice(1));\n};\n\nexport var Polygon = /*#__PURE__*/function (_PureComponent) {\n _inherits(Polygon, _PureComponent);\n\n var _super = _createSuper(Polygon);\n\n function Polygon() {\n _classCallCheck(this, Polygon);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(Polygon, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n points = _this$props.points,\n className = _this$props.className,\n baseLinePoints = _this$props.baseLinePoints,\n connectNulls = _this$props.connectNulls,\n others = _objectWithoutProperties(_this$props, [\"points\", \"className\", \"baseLinePoints\", \"connectNulls\"]);\n\n if (!points || !points.length) {\n return null;\n }\n\n var layerClass = classNames('recharts-polygon', className);\n\n if (baseLinePoints && baseLinePoints.length) {\n var hasStroke = others.stroke && others.stroke !== 'none';\n var rangePath = getRanglePath(points, baseLinePoints, connectNulls);\n return /*#__PURE__*/React.createElement(\"g\", {\n className: layerClass\n }, /*#__PURE__*/React.createElement(\"path\", _extends({}, filterProps(others, true), {\n fill: rangePath.slice(-1) === 'Z' ? others.fill : 'none',\n stroke: \"none\",\n d: rangePath\n })), hasStroke ? /*#__PURE__*/React.createElement(\"path\", _extends({}, filterProps(others, true), {\n fill: \"none\",\n d: getSinglePolygonPath(points, connectNulls)\n })) : null, hasStroke ? /*#__PURE__*/React.createElement(\"path\", _extends({}, filterProps(others, true), {\n fill: \"none\",\n d: getSinglePolygonPath(baseLinePoints, connectNulls)\n })) : null);\n }\n\n var singlePath = getSinglePolygonPath(points, connectNulls);\n return /*#__PURE__*/React.createElement(\"path\", _extends({}, filterProps(others, true), {\n fill: singlePath.slice(-1) === 'Z' ? others.fill : 'none',\n className: layerClass,\n d: singlePath\n }));\n }\n }]);\n\n return Polygon;\n}(PureComponent);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport _isFunction from \"lodash/isFunction\";\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/**\n * @fileOverview Axis of radial direction\n */\nimport React, { PureComponent } from 'react';\nimport { Layer } from '../container/Layer';\nimport { Dot } from '../shape/Dot';\nimport { Polygon } from '../shape/Polygon';\nimport { Text } from '../component/Text';\nimport { filterProps, adaptEventsOfChild } from '../util/types';\nimport { polarToCartesian } from '../util/PolarUtils';\nvar RADIAN = Math.PI / 180;\nvar eps = 1e-5;\nexport var PolarAngleAxis = /*#__PURE__*/function (_PureComponent) {\n _inherits(PolarAngleAxis, _PureComponent);\n\n var _super = _createSuper(PolarAngleAxis);\n\n function PolarAngleAxis() {\n _classCallCheck(this, PolarAngleAxis);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(PolarAngleAxis, [{\n key: \"getTickLineCoord\",\n value:\n /**\n * Calculate the coordinate of line endpoint\n * @param {Object} data The Data if ticks\n * @return {Object} (x0, y0): The start point of text,\n * (x1, y1): The end point close to text,\n * (x2, y2): The end point close to axis\n */\n function getTickLineCoord(data) {\n var _this$props = this.props,\n cx = _this$props.cx,\n cy = _this$props.cy,\n radius = _this$props.radius,\n orientation = _this$props.orientation,\n tickSize = _this$props.tickSize;\n var tickLineSize = tickSize || 8;\n var p1 = polarToCartesian(cx, cy, radius, data.coordinate);\n var p2 = polarToCartesian(cx, cy, radius + (orientation === 'inner' ? -1 : 1) * tickLineSize, data.coordinate);\n return {\n x1: p1.x,\n y1: p1.y,\n x2: p2.x,\n y2: p2.y\n };\n }\n /**\n * Get the text-anchor of each tick\n * @param {Object} data Data of ticks\n * @return {String} text-anchor\n */\n\n }, {\n key: \"getTickTextAnchor\",\n value: function getTickTextAnchor(data) {\n var orientation = this.props.orientation;\n var cos = Math.cos(-data.coordinate * RADIAN);\n var textAnchor;\n\n if (cos > eps) {\n textAnchor = orientation === 'outer' ? 'start' : 'end';\n } else if (cos < -eps) {\n textAnchor = orientation === 'outer' ? 'end' : 'start';\n } else {\n textAnchor = 'middle';\n }\n\n return textAnchor;\n }\n }, {\n key: \"renderAxisLine\",\n value: function renderAxisLine() {\n var _this$props2 = this.props,\n cx = _this$props2.cx,\n cy = _this$props2.cy,\n radius = _this$props2.radius,\n axisLine = _this$props2.axisLine,\n axisLineType = _this$props2.axisLineType;\n\n var props = _objectSpread(_objectSpread({}, filterProps(this.props)), {}, {\n fill: 'none'\n }, filterProps(axisLine));\n\n if (axisLineType === 'circle') {\n return /*#__PURE__*/React.createElement(Dot, _extends({\n className: \"recharts-polar-angle-axis-line\"\n }, props, {\n cx: cx,\n cy: cy,\n r: radius\n }));\n }\n\n var ticks = this.props.ticks;\n var points = ticks.map(function (entry) {\n return polarToCartesian(cx, cy, radius, entry.coordinate);\n });\n return /*#__PURE__*/React.createElement(Polygon, _extends({\n className: \"recharts-polar-angle-axis-line\"\n }, props, {\n points: points\n }));\n }\n }, {\n key: \"renderTicks\",\n value: function renderTicks() {\n var _this = this;\n\n var _this$props3 = this.props,\n ticks = _this$props3.ticks,\n tick = _this$props3.tick,\n tickLine = _this$props3.tickLine,\n tickFormatter = _this$props3.tickFormatter,\n stroke = _this$props3.stroke;\n var axisProps = filterProps(this.props);\n var customTickProps = filterProps(tick);\n\n var tickLineProps = _objectSpread(_objectSpread({}, axisProps), {}, {\n fill: 'none'\n }, filterProps(tickLine));\n\n var items = ticks.map(function (entry, i) {\n var lineCoord = _this.getTickLineCoord(entry);\n\n var textAnchor = _this.getTickTextAnchor(entry);\n\n var tickProps = _objectSpread(_objectSpread(_objectSpread({\n textAnchor: textAnchor\n }, axisProps), {}, {\n stroke: 'none',\n fill: stroke\n }, customTickProps), {}, {\n index: i,\n payload: entry,\n x: lineCoord.x2,\n y: lineCoord.y2\n });\n\n return /*#__PURE__*/React.createElement(Layer, _extends({\n className: \"recharts-polar-angle-axis-tick\",\n key: \"tick-\".concat(i) // eslint-disable-line react/no-array-index-key\n\n }, adaptEventsOfChild(_this.props, entry, i)), tickLine && /*#__PURE__*/React.createElement(\"line\", _extends({\n className: \"recharts-polar-angle-axis-tick-line\"\n }, tickLineProps, lineCoord)), tick && PolarAngleAxis.renderTickItem(tick, tickProps, tickFormatter ? tickFormatter(entry.value, i) : entry.value));\n });\n return /*#__PURE__*/React.createElement(Layer, {\n className: \"recharts-polar-angle-axis-ticks\"\n }, items);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props4 = this.props,\n ticks = _this$props4.ticks,\n radius = _this$props4.radius,\n axisLine = _this$props4.axisLine;\n\n if (radius <= 0 || !ticks || !ticks.length) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(Layer, {\n className: \"recharts-polar-angle-axis\"\n }, axisLine && this.renderAxisLine(), this.renderTicks());\n }\n }], [{\n key: \"renderTickItem\",\n value: function renderTickItem(option, props, value) {\n var tickItem;\n\n if ( /*#__PURE__*/React.isValidElement(option)) {\n tickItem = /*#__PURE__*/React.cloneElement(option, props);\n } else if (_isFunction(option)) {\n tickItem = option(props);\n } else {\n tickItem = /*#__PURE__*/React.createElement(Text, _extends({}, props, {\n className: \"recharts-polar-angle-axis-tick-value\"\n }), value);\n }\n\n return tickItem;\n }\n }]);\n\n return PolarAngleAxis;\n}(PureComponent);\nPolarAngleAxis.displayName = 'PolarAngleAxis';\nPolarAngleAxis.axisType = 'angleAxis';\nPolarAngleAxis.defaultProps = {\n type: 'category',\n angleAxisId: 0,\n scale: 'auto',\n cx: 0,\n cy: 0,\n domain: [0, 'auto'],\n orientation: 'outer',\n axisLine: true,\n tickLine: true,\n tickSize: 8,\n tick: true,\n hide: false,\n allowDuplicatedCategory: true\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport _isFunction from \"lodash/isFunction\";\nimport _minBy from \"lodash/minBy\";\nimport _maxBy from \"lodash/maxBy\";\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/**\n * @fileOverview The axis of polar coordinate system\n */\nimport React, { PureComponent } from 'react';\nimport { Text } from '../component/Text';\nimport { Label } from '../component/Label';\nimport { Layer } from '../container/Layer';\nimport { polarToCartesian } from '../util/PolarUtils';\nimport { filterProps, adaptEventsOfChild } from '../util/types';\nexport var PolarRadiusAxis = /*#__PURE__*/function (_PureComponent) {\n _inherits(PolarRadiusAxis, _PureComponent);\n\n var _super = _createSuper(PolarRadiusAxis);\n\n function PolarRadiusAxis() {\n _classCallCheck(this, PolarRadiusAxis);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(PolarRadiusAxis, [{\n key: \"getTickValueCoord\",\n value:\n /**\n * Calculate the coordinate of tick\n * @param {Number} coordinate The radius of tick\n * @return {Object} (x, y)\n */\n function getTickValueCoord(_ref) {\n var coordinate = _ref.coordinate;\n var _this$props = this.props,\n angle = _this$props.angle,\n cx = _this$props.cx,\n cy = _this$props.cy;\n return polarToCartesian(cx, cy, coordinate, angle);\n }\n }, {\n key: \"getTickTextAnchor\",\n value: function getTickTextAnchor() {\n var orientation = this.props.orientation;\n var textAnchor;\n\n switch (orientation) {\n case 'left':\n textAnchor = 'end';\n break;\n\n case 'right':\n textAnchor = 'start';\n break;\n\n default:\n textAnchor = 'middle';\n break;\n }\n\n return textAnchor;\n }\n }, {\n key: \"getViewBox\",\n value: function getViewBox() {\n var _this$props2 = this.props,\n cx = _this$props2.cx,\n cy = _this$props2.cy,\n angle = _this$props2.angle,\n ticks = _this$props2.ticks;\n\n var maxRadiusTick = _maxBy(ticks, function (entry) {\n return entry.coordinate || 0;\n });\n\n var minRadiusTick = _minBy(ticks, function (entry) {\n return entry.coordinate || 0;\n });\n\n return {\n cx: cx,\n cy: cy,\n startAngle: angle,\n endAngle: angle,\n innerRadius: minRadiusTick.coordinate || 0,\n outerRadius: maxRadiusTick.coordinate || 0\n };\n }\n }, {\n key: \"renderAxisLine\",\n value: function renderAxisLine() {\n var _this$props3 = this.props,\n cx = _this$props3.cx,\n cy = _this$props3.cy,\n angle = _this$props3.angle,\n ticks = _this$props3.ticks,\n axisLine = _this$props3.axisLine,\n others = _objectWithoutProperties(_this$props3, [\"cx\", \"cy\", \"angle\", \"ticks\", \"axisLine\"]);\n\n var extent = ticks.reduce(function (result, entry) {\n return [Math.min(result[0], entry.coordinate), Math.max(result[1], entry.coordinate)];\n }, [Infinity, -Infinity]);\n var point0 = polarToCartesian(cx, cy, extent[0], angle);\n var point1 = polarToCartesian(cx, cy, extent[1], angle);\n\n var props = _objectSpread(_objectSpread(_objectSpread({}, filterProps(others)), {}, {\n fill: 'none'\n }, filterProps(axisLine)), {}, {\n x1: point0.x,\n y1: point0.y,\n x2: point1.x,\n y2: point1.y\n });\n\n return /*#__PURE__*/React.createElement(\"line\", _extends({\n className: \"recharts-polar-radius-axis-line\"\n }, props));\n }\n }, {\n key: \"renderTicks\",\n value: function renderTicks() {\n var _this = this;\n\n var _this$props4 = this.props,\n ticks = _this$props4.ticks,\n tick = _this$props4.tick,\n angle = _this$props4.angle,\n tickFormatter = _this$props4.tickFormatter,\n stroke = _this$props4.stroke,\n others = _objectWithoutProperties(_this$props4, [\"ticks\", \"tick\", \"angle\", \"tickFormatter\", \"stroke\"]);\n\n var textAnchor = this.getTickTextAnchor();\n var axisProps = filterProps(others);\n var customTickProps = filterProps(tick);\n var items = ticks.map(function (entry, i) {\n var coord = _this.getTickValueCoord(entry);\n\n var tickProps = _objectSpread(_objectSpread(_objectSpread(_objectSpread({\n textAnchor: textAnchor,\n transform: \"rotate(\".concat(90 - angle, \", \").concat(coord.x, \", \").concat(coord.y, \")\")\n }, axisProps), {}, {\n stroke: 'none',\n fill: stroke\n }, customTickProps), {}, {\n index: i\n }, coord), {}, {\n payload: entry\n });\n\n return /*#__PURE__*/React.createElement(Layer, _extends({\n className: \"recharts-polar-radius-axis-tick\",\n key: \"tick-\".concat(i) // eslint-disable-line react/no-array-index-key\n\n }, adaptEventsOfChild(_this.props, entry, i)), PolarRadiusAxis.renderTickItem(tick, tickProps, tickFormatter ? tickFormatter(entry.value, i) : entry.value));\n });\n return /*#__PURE__*/React.createElement(Layer, {\n className: \"recharts-polar-radius-axis-ticks\"\n }, items);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props5 = this.props,\n ticks = _this$props5.ticks,\n axisLine = _this$props5.axisLine,\n tick = _this$props5.tick;\n\n if (!ticks || !ticks.length) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(Layer, {\n className: \"recharts-polar-radius-axis\"\n }, axisLine && this.renderAxisLine(), tick && this.renderTicks(), Label.renderCallByParent(this.props, this.getViewBox()));\n }\n }], [{\n key: \"renderTickItem\",\n value: function renderTickItem(option, props, value) {\n var tickItem;\n\n if ( /*#__PURE__*/React.isValidElement(option)) {\n tickItem = /*#__PURE__*/React.cloneElement(option, props);\n } else if (_isFunction(option)) {\n tickItem = option(props);\n } else {\n tickItem = /*#__PURE__*/React.createElement(Text, _extends({}, props, {\n className: \"recharts-polar-radius-axis-tick-value\"\n }), value);\n }\n\n return tickItem;\n }\n }]);\n\n return PolarRadiusAxis;\n}(PureComponent);\nPolarRadiusAxis.displayName = 'PolarRadiusAxis';\nPolarRadiusAxis.axisType = 'radiusAxis';\nPolarRadiusAxis.defaultProps = {\n type: 'number',\n radiusAxisId: 0,\n cx: 0,\n cy: 0,\n angle: 0,\n orientation: 'right',\n stroke: '#ccc',\n axisLine: true,\n tick: true,\n tickCount: 5,\n domain: [0, 'auto'],\n allowDataOverflow: false,\n scale: 'auto',\n allowDuplicatedCategory: true\n};","/**\n * @fileOverview Pie Chart\n */\nimport { generateCategoricalChart } from './generateCategoricalChart';\nimport { PolarAngleAxis } from '../polar/PolarAngleAxis';\nimport { PolarRadiusAxis } from '../polar/PolarRadiusAxis';\nimport { formatAxisMap } from '../util/PolarUtils';\nimport { Pie } from '../polar/Pie';\nexport var PieChart = generateCategoricalChart({\n chartName: 'PieChart',\n GraphicalChild: Pie,\n validateTooltipEventTypes: ['item'],\n defaultTooltipEventType: 'item',\n legendContent: 'children',\n axisComponents: [{\n axisType: 'angleAxis',\n AxisComp: PolarAngleAxis\n }, {\n axisType: 'radiusAxis',\n AxisComp: PolarRadiusAxis\n }],\n formatAxisMap: formatAxisMap,\n defaultProps: {\n layout: 'centric',\n startAngle: 0,\n endAngle: 360,\n cx: '50%',\n cy: '50%',\n innerRadius: 0,\n outerRadius: '80%'\n }\n});","/**\n * @fileOverview Cross\n */\nexport var Cell = function Cell(_props) {\n return null;\n};\nCell.displayName = 'Cell';","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport _isEqual from \"lodash/isEqual\";\nimport _get from \"lodash/get\";\nimport _isPlainObject from \"lodash/isPlainObject\";\nimport _isFunction from \"lodash/isFunction\";\nimport _isNil from \"lodash/isNil\";\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/**\n * @fileOverview Render sectors of a pie\n */\nimport React, { PureComponent } from 'react';\nimport Animate from 'react-smooth';\nimport classNames from 'classnames';\nimport { Layer } from '../container/Layer';\nimport { Sector } from '../shape/Sector';\nimport { Curve } from '../shape/Curve';\nimport { Text } from '../component/Text';\nimport { Label } from '../component/Label';\nimport { LabelList } from '../component/LabelList';\nimport { Cell } from '../component/Cell';\nimport { findAllByType } from '../util/ReactUtils';\nimport { Global } from '../util/Global';\nimport { polarToCartesian, getMaxRadius } from '../util/PolarUtils';\nimport { isNumber, getPercentValue, mathSign, interpolateNumber, uniqueId } from '../util/DataUtils';\nimport { getValueByDataKey } from '../util/ChartUtils';\nimport { warn } from '../util/LogUtils';\nimport { filterProps, adaptEventsOfChild } from '../util/types';\nexport var Pie = /*#__PURE__*/function (_PureComponent) {\n _inherits(Pie, _PureComponent);\n\n var _super = _createSuper(Pie);\n\n function Pie(props) {\n var _this;\n\n _classCallCheck(this, Pie);\n\n _this = _super.call(this, props);\n _this.state = void 0;\n _this.id = uniqueId('recharts-pie-');\n\n _this.handleAnimationEnd = function () {\n var onAnimationEnd = _this.props.onAnimationEnd;\n\n _this.setState({\n isAnimationFinished: true\n });\n\n if (_isFunction(onAnimationEnd)) {\n onAnimationEnd();\n }\n };\n\n _this.handleAnimationStart = function () {\n var onAnimationStart = _this.props.onAnimationStart;\n\n _this.setState({\n isAnimationFinished: false\n });\n\n if (_isFunction(onAnimationStart)) {\n onAnimationStart();\n }\n };\n\n _this.state = {\n isAnimationFinished: !props.isAnimationActive,\n prevIsAnimationActive: props.isAnimationActive,\n prevAnimationId: props.animationId\n };\n return _this;\n }\n\n _createClass(Pie, [{\n key: \"isActiveIndex\",\n value: function isActiveIndex(i) {\n var activeIndex = this.props.activeIndex;\n\n if (Array.isArray(activeIndex)) {\n return activeIndex.indexOf(i) !== -1;\n }\n\n return i === activeIndex;\n }\n }, {\n key: \"renderLabels\",\n value: function renderLabels(sectors) {\n var isAnimationActive = this.props.isAnimationActive;\n\n if (isAnimationActive && !this.state.isAnimationFinished) {\n return null;\n }\n\n var _this$props = this.props,\n label = _this$props.label,\n labelLine = _this$props.labelLine,\n dataKey = _this$props.dataKey,\n valueKey = _this$props.valueKey;\n var pieProps = filterProps(this.props);\n var customLabelProps = filterProps(label);\n var customLabelLineProps = filterProps(labelLine);\n var offsetRadius = label && label.offsetRadius || 20;\n var labels = sectors.map(function (entry, i) {\n var midAngle = (entry.startAngle + entry.endAngle) / 2;\n var endPoint = polarToCartesian(entry.cx, entry.cy, entry.outerRadius + offsetRadius, midAngle);\n\n var labelProps = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, pieProps), entry), {}, {\n stroke: 'none'\n }, customLabelProps), {}, {\n index: i,\n textAnchor: Pie.getTextAnchor(endPoint.x, entry.cx)\n }, endPoint);\n\n var lineProps = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, pieProps), entry), {}, {\n fill: 'none',\n stroke: entry.fill\n }, customLabelLineProps), {}, {\n index: i,\n points: [polarToCartesian(entry.cx, entry.cy, entry.outerRadius, midAngle), endPoint],\n key: 'line'\n });\n\n var realDataKey = dataKey; // TODO: compatible to lower versions\n\n if (_isNil(dataKey) && _isNil(valueKey)) {\n realDataKey = 'value';\n } else if (_isNil(dataKey)) {\n realDataKey = valueKey;\n }\n\n return (\n /*#__PURE__*/\n // eslint-disable-next-line react/no-array-index-key\n React.createElement(Layer, {\n key: \"label-\".concat(i)\n }, labelLine && Pie.renderLabelLineItem(labelLine, lineProps), Pie.renderLabelItem(label, labelProps, getValueByDataKey(entry, realDataKey)))\n );\n });\n return /*#__PURE__*/React.createElement(Layer, {\n className: \"recharts-pie-labels\"\n }, labels);\n }\n }, {\n key: \"renderSectorsStatically\",\n value: function renderSectorsStatically(sectors) {\n var _this2 = this;\n\n var _this$props2 = this.props,\n activeShape = _this$props2.activeShape,\n blendStroke = _this$props2.blendStroke;\n return sectors.map(function (entry, i) {\n var sectorOptions = _this2.isActiveIndex(i) ? activeShape : null;\n\n var sectorProps = _objectSpread(_objectSpread({}, entry), {}, {\n stroke: blendStroke ? entry.fill : entry.stroke\n });\n\n return /*#__PURE__*/React.createElement(Layer, _extends({\n className: \"recharts-pie-sector\"\n }, adaptEventsOfChild(_this2.props, entry, i), {\n key: \"sector-\".concat(i) // eslint-disable-line react/no-array-index-key\n\n }), Pie.renderSectorItem(sectorOptions, sectorProps));\n });\n }\n }, {\n key: \"renderSectorsWithAnimation\",\n value: function renderSectorsWithAnimation() {\n var _this3 = this;\n\n var _this$props3 = this.props,\n sectors = _this$props3.sectors,\n isAnimationActive = _this$props3.isAnimationActive,\n animationBegin = _this$props3.animationBegin,\n animationDuration = _this$props3.animationDuration,\n animationEasing = _this$props3.animationEasing,\n animationId = _this$props3.animationId;\n var _this$state = this.state,\n prevSectors = _this$state.prevSectors,\n prevIsAnimationActive = _this$state.prevIsAnimationActive;\n return /*#__PURE__*/React.createElement(Animate, {\n begin: animationBegin,\n duration: animationDuration,\n isActive: isAnimationActive,\n easing: animationEasing,\n from: {\n t: 0\n },\n to: {\n t: 1\n },\n key: \"pie-\".concat(animationId, \"-\").concat(prevIsAnimationActive),\n onAnimationStart: this.handleAnimationStart,\n onAnimationEnd: this.handleAnimationEnd\n }, function (_ref) {\n var t = _ref.t;\n var stepData = [];\n var first = sectors && sectors[0];\n var curAngle = first.startAngle;\n sectors.forEach(function (entry, index) {\n var prev = prevSectors && prevSectors[index];\n var paddingAngle = index > 0 ? _get(entry, 'paddingAngle', 0) : 0;\n\n if (prev) {\n var angleIp = interpolateNumber(prev.endAngle - prev.startAngle, entry.endAngle - entry.startAngle);\n\n var latest = _objectSpread(_objectSpread({}, entry), {}, {\n startAngle: curAngle + paddingAngle,\n endAngle: curAngle + angleIp(t) + paddingAngle\n });\n\n stepData.push(latest);\n curAngle = latest.endAngle;\n } else {\n var endAngle = entry.endAngle,\n startAngle = entry.startAngle;\n var interpolatorAngle = interpolateNumber(0, endAngle - startAngle);\n var deltaAngle = interpolatorAngle(t);\n\n var _latest = _objectSpread(_objectSpread({}, entry), {}, {\n startAngle: curAngle + paddingAngle,\n endAngle: curAngle + deltaAngle + paddingAngle\n });\n\n stepData.push(_latest);\n curAngle = _latest.endAngle;\n }\n });\n return /*#__PURE__*/React.createElement(Layer, null, _this3.renderSectorsStatically(stepData));\n });\n }\n }, {\n key: \"renderSectors\",\n value: function renderSectors() {\n var _this$props4 = this.props,\n sectors = _this$props4.sectors,\n isAnimationActive = _this$props4.isAnimationActive;\n var prevSectors = this.state.prevSectors;\n\n if (isAnimationActive && sectors && sectors.length && (!prevSectors || !_isEqual(prevSectors, sectors))) {\n return this.renderSectorsWithAnimation();\n }\n\n return this.renderSectorsStatically(sectors);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props5 = this.props,\n hide = _this$props5.hide,\n sectors = _this$props5.sectors,\n className = _this$props5.className,\n label = _this$props5.label,\n cx = _this$props5.cx,\n cy = _this$props5.cy,\n innerRadius = _this$props5.innerRadius,\n outerRadius = _this$props5.outerRadius,\n isAnimationActive = _this$props5.isAnimationActive;\n var isAnimationFinished = this.state.isAnimationFinished;\n\n if (hide || !sectors || !sectors.length || !isNumber(cx) || !isNumber(cy) || !isNumber(innerRadius) || !isNumber(outerRadius)) {\n return null;\n }\n\n var layerClass = classNames('recharts-pie', className);\n return /*#__PURE__*/React.createElement(Layer, {\n className: layerClass\n }, this.renderSectors(), label && this.renderLabels(sectors), Label.renderCallByParent(this.props, null, false), (!isAnimationActive || isAnimationFinished) && LabelList.renderCallByParent(this.props, sectors, false));\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps, prevState) {\n if (prevState.prevIsAnimationActive !== nextProps.isAnimationActive) {\n return {\n prevIsAnimationActive: nextProps.isAnimationActive,\n prevAnimationId: nextProps.animationId,\n curSectors: nextProps.sectors,\n prevSectors: []\n };\n }\n\n if (nextProps.isAnimationActive && nextProps.animationId !== prevState.prevAnimationId) {\n return {\n prevAnimationId: nextProps.animationId,\n curSectors: nextProps.sectors,\n prevSectors: prevState.curSectors\n };\n }\n\n if (nextProps.sectors !== prevState.curSectors) {\n return {\n curSectors: nextProps.sectors\n };\n }\n\n return null;\n }\n }, {\n key: \"getTextAnchor\",\n value: function getTextAnchor(x, cx) {\n if (x > cx) {\n return 'start';\n }\n\n if (x < cx) {\n return 'end';\n }\n\n return 'middle';\n }\n }, {\n key: \"renderLabelLineItem\",\n value: function renderLabelLineItem(option, props) {\n if ( /*#__PURE__*/React.isValidElement(option)) {\n return /*#__PURE__*/React.cloneElement(option, props);\n }\n\n if (_isFunction(option)) {\n return option(props);\n }\n\n return /*#__PURE__*/React.createElement(Curve, _extends({}, props, {\n type: \"linear\",\n className: \"recharts-pie-label-line\"\n }));\n }\n }, {\n key: \"renderLabelItem\",\n value: function renderLabelItem(option, props, value) {\n if ( /*#__PURE__*/React.isValidElement(option)) {\n return /*#__PURE__*/React.cloneElement(option, props);\n }\n\n var label = value;\n\n if (_isFunction(option)) {\n label = option(props);\n\n if ( /*#__PURE__*/React.isValidElement(label)) {\n return label;\n }\n }\n\n return /*#__PURE__*/React.createElement(Text, _extends({}, props, {\n alignmentBaseline: \"middle\",\n className: \"recharts-pie-label-text\"\n }), label);\n }\n }, {\n key: \"renderSectorItem\",\n value: function renderSectorItem(option, props) {\n if ( /*#__PURE__*/React.isValidElement(option)) {\n return /*#__PURE__*/React.cloneElement(option, props);\n }\n\n if (_isFunction(option)) {\n return option(props);\n }\n\n if (_isPlainObject(option)) {\n return /*#__PURE__*/React.createElement(Sector, _extends({}, props, option));\n }\n\n return /*#__PURE__*/React.createElement(Sector, props);\n }\n }]);\n\n return Pie;\n}(PureComponent);\nPie.displayName = 'Pie';\nPie.defaultProps = {\n stroke: '#fff',\n fill: '#808080',\n legendType: 'rect',\n cx: '50%',\n cy: '50%',\n startAngle: 0,\n endAngle: 360,\n innerRadius: 0,\n outerRadius: '80%',\n paddingAngle: 0,\n labelLine: true,\n hide: false,\n minAngle: 0,\n isAnimationActive: !Global.isSsr,\n animationBegin: 400,\n animationDuration: 1500,\n animationEasing: 'ease',\n nameKey: 'name',\n blendStroke: false\n};\n\nPie.parseDeltaAngle = function (startAngle, endAngle) {\n var sign = mathSign(endAngle - startAngle);\n var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 360);\n return sign * deltaAngle;\n};\n\nPie.getRealPieData = function (item) {\n var _item$props = item.props,\n data = _item$props.data,\n children = _item$props.children;\n var presentationProps = filterProps(item.props);\n var cells = findAllByType(children, Cell.displayName);\n\n if (data && data.length) {\n return data.map(function (entry, index) {\n return _objectSpread(_objectSpread(_objectSpread({\n payload: entry\n }, presentationProps), entry), cells && cells[index] && cells[index].props);\n });\n }\n\n if (cells && cells.length) {\n return cells.map(function (cell) {\n return _objectSpread(_objectSpread({}, presentationProps), cell.props);\n });\n }\n\n return [];\n};\n\nPie.parseCoordinateOfPie = function (item, offset) {\n var top = offset.top,\n left = offset.left,\n width = offset.width,\n height = offset.height;\n var maxPieRadius = getMaxRadius(width, height);\n var cx = left + getPercentValue(item.props.cx, width, width / 2);\n var cy = top + getPercentValue(item.props.cy, height, height / 2);\n var innerRadius = getPercentValue(item.props.innerRadius, maxPieRadius, 0);\n var outerRadius = getPercentValue(item.props.outerRadius, maxPieRadius, maxPieRadius * 0.8);\n var maxRadius = item.props.maxRadius || Math.sqrt(width * width + height * height) / 2;\n return {\n cx: cx,\n cy: cy,\n innerRadius: innerRadius,\n outerRadius: outerRadius,\n maxRadius: maxRadius\n };\n};\n\nPie.getComposedData = function (_ref2) {\n var item = _ref2.item,\n offset = _ref2.offset;\n var pieData = Pie.getRealPieData(item);\n\n if (!pieData || !pieData.length) {\n return null;\n }\n\n var _item$props2 = item.props,\n cornerRadius = _item$props2.cornerRadius,\n startAngle = _item$props2.startAngle,\n endAngle = _item$props2.endAngle,\n paddingAngle = _item$props2.paddingAngle,\n dataKey = _item$props2.dataKey,\n nameKey = _item$props2.nameKey,\n valueKey = _item$props2.valueKey,\n tooltipType = _item$props2.tooltipType;\n var minAngle = Math.abs(item.props.minAngle);\n var coordinate = Pie.parseCoordinateOfPie(item, offset);\n var deltaAngle = Pie.parseDeltaAngle(startAngle, endAngle);\n var absDeltaAngle = Math.abs(deltaAngle);\n var realDataKey = dataKey;\n\n if (_isNil(dataKey) && _isNil(valueKey)) {\n warn(false, \"Use \\\"dataKey\\\" to specify the value of pie,\\n the props \\\"valueKey\\\" will be deprecated in 1.1.0\");\n realDataKey = 'value';\n } else if (_isNil(dataKey)) {\n warn(false, \"Use \\\"dataKey\\\" to specify the value of pie,\\n the props \\\"valueKey\\\" will be deprecated in 1.1.0\");\n realDataKey = valueKey;\n }\n\n var notZeroItemCount = pieData.filter(function (entry) {\n return getValueByDataKey(entry, realDataKey, 0) !== 0;\n }).length;\n var totalPadingAngle = (absDeltaAngle >= 360 ? notZeroItemCount : notZeroItemCount - 1) * paddingAngle;\n var realTotalAngle = absDeltaAngle - notZeroItemCount * minAngle - totalPadingAngle;\n var sum = pieData.reduce(function (result, entry) {\n var val = getValueByDataKey(entry, realDataKey, 0);\n return result + (isNumber(val) ? val : 0);\n }, 0);\n var sectors;\n\n if (sum > 0) {\n var prev;\n sectors = pieData.map(function (entry, i) {\n var val = getValueByDataKey(entry, realDataKey, 0);\n var name = getValueByDataKey(entry, nameKey, i);\n var percent = (isNumber(val) ? val : 0) / sum;\n var tempStartAngle;\n\n if (i) {\n tempStartAngle = prev.endAngle + mathSign(deltaAngle) * paddingAngle * (val !== 0 ? 1 : 0);\n } else {\n tempStartAngle = startAngle;\n }\n\n var tempEndAngle = tempStartAngle + mathSign(deltaAngle) * ((val !== 0 ? minAngle : 0) + percent * realTotalAngle);\n var midAngle = (tempStartAngle + tempEndAngle) / 2;\n var middleRadius = (coordinate.innerRadius + coordinate.outerRadius) / 2;\n var tooltipPayload = [{\n name: name,\n value: val,\n payload: entry,\n dataKey: realDataKey,\n type: tooltipType\n }];\n var tooltipPosition = polarToCartesian(coordinate.cx, coordinate.cy, middleRadius, midAngle);\n prev = _objectSpread(_objectSpread(_objectSpread({\n percent: percent,\n cornerRadius: cornerRadius,\n name: name,\n tooltipPayload: tooltipPayload,\n midAngle: midAngle,\n middleRadius: middleRadius,\n tooltipPosition: tooltipPosition\n }, entry), coordinate), {}, {\n value: getValueByDataKey(entry, realDataKey),\n startAngle: tempStartAngle,\n endAngle: tempEndAngle,\n payload: entry,\n paddingAngle: mathSign(deltaAngle) * paddingAngle\n });\n return prev;\n });\n }\n\n return _objectSpread(_objectSpread({}, coordinate), {}, {\n sectors: sectors,\n data: pieData\n });\n};"],"names":["_interopRequireDefault","require","exports","_createSvgIcon","_jsxRuntime","_default","default","jsx","d","getCardUtilityClass","slot","generateUtilityClass","generateUtilityClasses","_excluded","CardRoot","styled","Paper","name","overridesResolver","props","styles","root","overflow","React","inProps","ref","useThemeProps","className","raised","other","_objectWithoutPropertiesLoose","ownerState","_extends","classes","composeClasses","useUtilityClasses","_jsx","clsx","elevation","undefined","getCardHeaderUtilityClass","CardHeaderRoot","cardHeaderClasses","title","subheader","display","alignItems","padding","CardHeaderAvatar","avatar","flex","marginRight","CardHeaderAction","action","alignSelf","marginTop","marginBottom","CardHeaderContent","content","component","disableTypography","subheaderProp","subheaderTypographyProps","titleProp","titleTypographyProps","type","Typography","variant","children","color","_jsxs","as","getDialogActionsUtilityClass","DialogActionsRoot","disableSpacing","spacing","justifyContent","marginLeft","slots","getInputAdornmentUtilityClass","_span","InputAdornmentRoot","capitalize","position","disablePointerEvents","theme","height","maxHeight","whiteSpace","palette","active","inputAdornmentClasses","pointerEvents","variantProp","muiFormControl","useFormControl","hiddenLabel","size","FormControlContext","value","ListItemButtonRoot","ButtonBase","shouldForwardProp","prop","rootShouldForwardProp","dense","alignItemsFlexStart","divider","disableGutters","gutters","flexGrow","textDecoration","boxSizing","textAlign","paddingTop","paddingBottom","transition","transitions","create","duration","shortest","backgroundColor","hover","listItemButtonClasses","alpha","primary","main","selectedOpacity","focusOpacity","hoverOpacity","focus","opacity","disabledOpacity","borderBottom","backgroundClip","paddingLeft","paddingRight","ListItemButton","autoFocus","focusVisibleClassName","selected","context","ListContext","childContext","listItemRef","useEnhancedEffect","current","disabled","composedClasses","getListItemButtonUtilityClass","handleRef","useForkRef","focusVisible","getListSubheaderUtilityClass","ListSubheaderRoot","inset","disableSticky","sticky","lineHeight","listStyle","text","secondary","fontFamily","typography","fontWeight","fontWeightMedium","fontSize","pxToRem","top","zIndex","background","paper","module","array","setter","iteratee","accumulator","index","length","baseEach","collection","key","arrayAggregator","baseAggregator","baseIteratee","isArray","initializer","func","getPrototype","overArg","Object","getPrototypeOf","baseAssignValue","createAggregator","hasOwnProperty","prototype","groupBy","result","call","push","baseGetTag","isObjectLike","funcProto","Function","objectProto","funcToString","toString","objectCtorString","proto","Ctor","constructor","baseExtremum","baseGt","baseLt","assign","target","i","arguments","source","apply","this","_slicedToArray","arr","Array","_arrayWithHoles","Symbol","iterator","_arr","_n","_d","_e","_s","_i","next","done","err","_iterableToArrayLimit","o","minLen","_arrayLikeToArray","n","slice","from","test","_unsupportedIterableToArray","TypeError","_nonIterableRest","len","arr2","_objectWithoutProperties","excluded","sourceKeys","keys","indexOf","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","ErrorBar","offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis","others","svgProps","filterProps","errorBars","map","entry","_dataPointFormatter","x","y","errorVal","lowBound","highBound","lineCoordinates","_errorVal","scale","yMid","yMin","yMax","xMin","xMax","x1","y1","x2","y2","_scale","xMid","_xMin","_xMax","_yMin","_yMax","Layer","concat","coordinates","defaultProps","stroke","strokeWidth","displayName","_typeof","obj","ownKeys","object","enumerableOnly","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","configurable","writable","_classCallCheck","instance","Constructor","_defineProperties","descriptor","_setPrototypeOf","p","setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","Reflect","construct","sham","Proxy","Boolean","valueOf","e","_isNativeReflectConstruct","Super","_getPrototypeOf","NewTarget","_possibleConstructorReturn","self","ReferenceError","_assertThisInitialized","Bar","_PureComponent","subClass","superClass","_inherits","protoProps","staticProps","_super","_this","_len","args","_key","state","isAnimationFinished","id","uniqueId","handleAnimationEnd","onAnimationEnd","setState","handleAnimationStart","onAnimationStart","nextProps","prevState","animationId","prevAnimationId","curData","prevData","option","_isFunction","Rectangle","_this2","shape","baseProps","adaptEventsOfChild","renderRectangle","_this3","_this$props","isAnimationActive","animationBegin","animationDuration","animationEasing","Animate","begin","isActive","easing","t","to","_ref","stepData","prev","interpolatorX","interpolateNumber","interpolatorY","interpolatorWidth","interpolatorHeight","h","_interpolatorHeight","w","interpolator","renderRectanglesStatically","_this$props2","_isEqual","renderRectanglesWithAnimation","_this4","backgroundProps","rest","fill","_this$props3","errorBarItems","findAllByType","dataPoint","getValueByDataKey","item","_this$props4","hide","left","layerClass","classNames","needClip","allowDataOverflow","clipPathId","_isNil","clipPath","renderBackground","renderRectangles","renderErrorBar","LabelList","PureComponent","xAxisId","yAxisId","legendType","minPointSize","Global","getComposedData","_ref2","barPosition","bandSize","xAxisTicks","yAxisTicks","stackedData","dataStartIndex","displayedData","pos","findPositionOfBar","_item$props","numericAxis","stackedDomain","domain","baseValue","getBaseValueOfBar","cells","Cell","rects","truncateByDomain","_isArray","getCateCoordinateOfBar","axis","ticks","Math","abs","delta","mathSign","payload","tooltipPayload","getTooltipItem","tooltipPosition","BarChart","generateCategoricalChart","chartName","GraphicalChild","defaultTooltipEventType","validateTooltipEventTypes","axisComponents","axisType","AxisComp","XAxis","YAxis","formatAxisMap","_toConsumableArray","_arrayWithoutHoles","iter","_iterableToArray","_nonIterableSpread","isValidatePoint","point","getSinglePolygonPath","points","connectNulls","segmentPoints","getParsedPoints","reduce","res","segPoints","polygonPath","path","join","Polygon","baseLinePoints","hasStroke","rangePath","outerPath","reverse","getRanglePath","singlePath","RADIAN","PI","eps","PolarAngleAxis","Text","cx","cy","radius","orientation","tickLineSize","tickSize","p1","polarToCartesian","coordinate","p2","cos","axisLine","axisLineType","Dot","r","tick","tickLine","tickFormatter","axisProps","customTickProps","tickLineProps","items","lineCoord","getTickLineCoord","tickProps","textAnchor","getTickTextAnchor","renderTickItem","renderAxisLine","renderTicks","angleAxisId","allowDuplicatedCategory","PolarRadiusAxis","angle","maxRadiusTick","_maxBy","startAngle","endAngle","innerRadius","_minBy","outerRadius","extent","min","max","Infinity","point0","point1","coord","getTickValueCoord","transform","_this$props5","Label","getViewBox","radiusAxisId","tickCount","PieChart","Pie","legendContent","_props","prevIsAnimationActive","curSectors","sectors","prevSectors","Curve","label","alignmentBaseline","_isPlainObject","Sector","activeIndex","labelLine","valueKey","pieProps","customLabelProps","customLabelLineProps","offsetRadius","labels","midAngle","endPoint","labelProps","getTextAnchor","lineProps","realDataKey","renderLabelLineItem","renderLabelItem","activeShape","blendStroke","sectorOptions","isActiveIndex","sectorProps","renderSectorItem","_this$state","curAngle","paddingAngle","_get","angleIp","latest","deltaAngle","interpolatorAngle","_latest","renderSectorsStatically","renderSectorsWithAnimation","isNumber","renderSectors","renderLabels","minAngle","nameKey","parseDeltaAngle","getRealPieData","presentationProps","cell","parseCoordinateOfPie","maxPieRadius","getMaxRadius","getPercentValue","maxRadius","sqrt","pieData","_item$props2","cornerRadius","tooltipType","absDeltaAngle","warn","notZeroItemCount","realTotalAngle","sum","val","tempStartAngle","percent","tempEndAngle","middleRadius"],"sourceRoot":""} \ No newline at end of file diff --git a/portal-ui/build/static/js/14.98e91306.chunk.js b/portal-ui/build/static/js/14.25ecb28d.chunk.js similarity index 52% rename from portal-ui/build/static/js/14.98e91306.chunk.js rename to portal-ui/build/static/js/14.25ecb28d.chunk.js index 5ed8b0818..1a23b10ea 100644 --- a/portal-ui/build/static/js/14.98e91306.chunk.js +++ b/portal-ui/build/static/js/14.25ecb28d.chunk.js @@ -1,2 +1,2 @@ -"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[14],{38943:function(e,n,t){var o=t(36222),r=t(35531),i=t(1048),a=t(32793),l=t(50390),u=t(64487),d=t(50076),s=t(46413),c=t(8208),p=t(15573),f=t(72371),m=t(62559),v=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","type"],h=(0,c.ZP)(s.Ej,{shouldForwardProp:function(e){return(0,c.FO)(e)||"classes"===e},name:"MuiFilledInput",slot:"Root",overridesResolver:function(e,n){var t=e.ownerState;return[].concat((0,r.Z)((0,s.Gx)(e,n)),[!t.disableUnderline&&n.underline])}})((function(e){var n,t,r=e.theme,i=e.ownerState,l="light"===r.palette.mode,u=l?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",d=l?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)";return(0,a.Z)((n={position:"relative",backgroundColor:d,borderTopLeftRadius:r.shape.borderRadius,borderTopRightRadius:r.shape.borderRadius,transition:r.transitions.create("background-color",{duration:r.transitions.duration.shorter,easing:r.transitions.easing.easeOut}),"&:hover":{backgroundColor:l?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:d}}},(0,o.Z)(n,"&.".concat(f.Z.focused),{backgroundColor:d}),(0,o.Z)(n,"&.".concat(f.Z.disabled),{backgroundColor:l?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}),n),!i.disableUnderline&&(t={"&:after":{borderBottom:"2px solid ".concat(r.palette[i.color].main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:r.transitions.create("transform",{duration:r.transitions.duration.shorter,easing:r.transitions.easing.easeOut}),pointerEvents:"none"}},(0,o.Z)(t,"&.".concat(f.Z.focused,":after"),{transform:"scaleX(1)"}),(0,o.Z)(t,"&.".concat(f.Z.error,":after"),{borderBottomColor:r.palette.error.main,transform:"scaleX(1)"}),(0,o.Z)(t,"&:before",{borderBottom:"1px solid ".concat(u),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:r.transitions.create("border-bottom-color",{duration:r.transitions.duration.shorter}),pointerEvents:"none"}),(0,o.Z)(t,"&:hover:not(.".concat(f.Z.disabled,"):before"),{borderBottom:"1px solid ".concat(r.palette.text.primary)}),(0,o.Z)(t,"&.".concat(f.Z.disabled,":before"),{borderBottomStyle:"dotted"}),t),i.startAdornment&&{paddingLeft:12},i.endAdornment&&{paddingRight:12},i.multiline&&(0,a.Z)({padding:"25px 12px 8px"},"small"===i.size&&{paddingTop:21,paddingBottom:4},i.hiddenLabel&&{paddingTop:16,paddingBottom:17}))})),b=(0,c.ZP)(s.rA,{name:"MuiFilledInput",slot:"Input",overridesResolver:s._o})((function(e){var n=e.theme,t=e.ownerState;return(0,a.Z)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,"&:-webkit-autofill":{WebkitBoxShadow:"light"===n.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===n.palette.mode?null:"#fff",caretColor:"light"===n.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9})})),Z=l.forwardRef((function(e,n){var t=(0,p.Z)({props:e,name:"MuiFilledInput"}),o=t.components,r=void 0===o?{}:o,l=t.componentsProps,c=t.fullWidth,Z=void 0!==c&&c,g=t.inputComponent,y=void 0===g?"input":g,S=t.multiline,x=void 0!==S&&S,w=t.type,C=void 0===w?"text":w,R=(0,i.Z)(t,v),P=(0,a.Z)({},t,{fullWidth:Z,inputComponent:y,multiline:x,type:C}),M=function(e){var n=e.classes,t={root:["root",!e.disableUnderline&&"underline"],input:["input"]},o=(0,d.Z)(t,f._,n);return(0,a.Z)({},n,o)}(t),I={root:{ownerState:P},input:{ownerState:P}},F=l?(0,u.Z)(l,I):I;return(0,m.jsx)(s.ZP,(0,a.Z)({components:(0,a.Z)({Root:h,Input:b},r),componentsProps:F,fullWidth:Z,inputComponent:y,multiline:x,ref:n,type:C},R,{classes:M}))}));Z.muiName="Input",n.Z=Z},72371:function(e,n,t){t.d(n,{_:function(){return r}});var o=t(10594);function r(e){return(0,o.Z)("MuiFilledInput",e)}var i=(0,t(43349).Z)("MuiFilledInput",["root","colorSecondary","underline","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","hiddenLabel","input","inputSizeSmall","inputHiddenLabel","inputMultiline","inputAdornedStart","inputAdornedEnd"]);n.Z=i},47554:function(e,n,t){t.d(n,{Z:function(){return y}});var o=t(23430),r=t(1048),i=t(32793),a=t(50390),l=t(44977),u=t(50076),d=t(15573),s=t(8208),c=t(36474),p=t(91442),f=t(43201),m=t(14478),v=t(10594);function h(e){return(0,v.Z)("MuiFormControl",e)}(0,t(43349).Z)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);var b=t(62559),Z=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],g=(0,s.ZP)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:function(e,n){var t=e.ownerState;return(0,i.Z)({},n.root,n["margin".concat((0,p.Z)(t.margin))],t.fullWidth&&n.fullWidth)}})((function(e){var n=e.ownerState;return(0,i.Z)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===n.margin&&{marginTop:16,marginBottom:8},"dense"===n.margin&&{marginTop:8,marginBottom:4},n.fullWidth&&{width:"100%"})})),y=a.forwardRef((function(e,n){var t=(0,d.Z)({props:e,name:"MuiFormControl"}),s=t.children,v=t.className,y=t.color,S=void 0===y?"primary":y,x=t.component,w=void 0===x?"div":x,C=t.disabled,R=void 0!==C&&C,P=t.error,M=void 0!==P&&P,I=t.focused,F=t.fullWidth,A=void 0!==F&&F,O=t.hiddenLabel,E=void 0!==O&&O,k=t.margin,W=void 0===k?"none":k,N=t.required,z=void 0!==N&&N,j=t.size,L=void 0===j?"medium":j,B=t.variant,T=void 0===B?"outlined":B,D=(0,r.Z)(t,Z),H=(0,i.Z)({},t,{color:S,component:w,disabled:R,error:M,fullWidth:A,hiddenLabel:E,margin:W,required:z,size:L,variant:T}),K=function(e){var n=e.classes,t=e.margin,o=e.fullWidth,r={root:["root","none"!==t&&"margin".concat((0,p.Z)(t)),o&&"fullWidth"]};return(0,u.Z)(r,h,n)}(H),U=a.useState((function(){var e=!1;return s&&a.Children.forEach(s,(function(n){if((0,f.Z)(n,["Input","Select"])){var t=(0,f.Z)(n,["Select"])?n.props.input:n;t&&(0,c.B7)(t.props)&&(e=!0)}})),e})),V=(0,o.Z)(U,2),_=V[0],q=V[1],G=a.useState((function(){var e=!1;return s&&a.Children.forEach(s,(function(n){(0,f.Z)(n,["Input","Select"])&&(0,c.vd)(n.props,!0)&&(e=!0)})),e})),X=(0,o.Z)(G,2),J=X[0],Q=X[1],Y=a.useState(!1),$=(0,o.Z)(Y,2),ee=$[0],ne=$[1];R&&ee&&ne(!1);var te=void 0===I||R?ee:I,oe=a.useCallback((function(){Q(!0)}),[]),re={adornedStart:_,setAdornedStart:q,color:S,disabled:R,error:M,filled:J,focused:te,fullWidth:A,hiddenLabel:E,size:L,onBlur:function(){ne(!1)},onEmpty:a.useCallback((function(){Q(!1)}),[]),onFilled:oe,onFocus:function(){ne(!0)},registerEffect:undefined,required:z,variant:T};return(0,b.jsx)(m.Z.Provider,{value:re,children:(0,b.jsx)(g,(0,i.Z)({as:w,ownerState:H,className:(0,l.Z)(K.root,v),ref:n},D,{children:s}))})}))},4930:function(e,n,t){var o=t(36222),r=t(35531),i=t(1048),a=t(32793),l=t(50390),u=t(50076),d=t(64487),s=t(46413),c=t(8208),p=t(15573),f=t(37805),m=t(62559),v=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","type"],h=(0,c.ZP)(s.Ej,{shouldForwardProp:function(e){return(0,c.FO)(e)||"classes"===e},name:"MuiInput",slot:"Root",overridesResolver:function(e,n){var t=e.ownerState;return[].concat((0,r.Z)((0,s.Gx)(e,n)),[!t.disableUnderline&&n.underline])}})((function(e){var n,t=e.theme,r=e.ownerState,i="light"===t.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return(0,a.Z)({position:"relative"},r.formControl&&{"label + &":{marginTop:16}},!r.disableUnderline&&(n={"&:after":{borderBottom:"2px solid ".concat(t.palette[r.color].main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"}},(0,o.Z)(n,"&.".concat(f.Z.focused,":after"),{transform:"scaleX(1)"}),(0,o.Z)(n,"&.".concat(f.Z.error,":after"),{borderBottomColor:t.palette.error.main,transform:"scaleX(1)"}),(0,o.Z)(n,"&:before",{borderBottom:"1px solid ".concat(i),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"}),(0,o.Z)(n,"&:hover:not(.".concat(f.Z.disabled,"):before"),{borderBottom:"2px solid ".concat(t.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(i)}}),(0,o.Z)(n,"&.".concat(f.Z.disabled,":before"),{borderBottomStyle:"dotted"}),n))})),b=(0,c.ZP)(s.rA,{name:"MuiInput",slot:"Input",overridesResolver:s._o})({}),Z=l.forwardRef((function(e,n){var t=(0,p.Z)({props:e,name:"MuiInput"}),o=t.disableUnderline,r=t.components,l=void 0===r?{}:r,c=t.componentsProps,Z=t.fullWidth,g=void 0!==Z&&Z,y=t.inputComponent,S=void 0===y?"input":y,x=t.multiline,w=void 0!==x&&x,C=t.type,R=void 0===C?"text":C,P=(0,i.Z)(t,v),M=function(e){var n=e.classes,t={root:["root",!e.disableUnderline&&"underline"],input:["input"]},o=(0,u.Z)(t,f.l,n);return(0,a.Z)({},n,o)}(t),I={root:{ownerState:{disableUnderline:o}}},F=c?(0,d.Z)(c,I):I;return(0,m.jsx)(s.ZP,(0,a.Z)({components:(0,a.Z)({Root:h,Input:b},l),componentsProps:F,fullWidth:g,inputComponent:S,multiline:w,ref:n,type:R},P,{classes:M}))}));Z.muiName="Input",n.Z=Z},37805:function(e,n,t){t.d(n,{l:function(){return r}});var o=t(10594);function r(e){return(0,o.Z)("MuiInput",e)}var i=(0,t(43349).Z)("MuiInput",["root","formControl","focused","disabled","colorSecondary","underline","error","sizeSmall","multiline","fullWidth","input","inputSizeSmall","inputMultiline","inputTypeSearch"]);n.Z=i},46413:function(e,n,t){t.d(n,{rA:function(){return L},Ej:function(){return j},ZP:function(){return D},_o:function(){return z},Gx:function(){return N}});var o=t(23430),r=t(36222),i=t(1048),a=t(32793),l=t(87838),u=t(50390),d=t(44977),s=t(38331),c=t(23960),p=t(15851),f=t(52064),m=t(53693),v=t(62752),h=t(62559),b=["onChange","maxRows","minRows","style","value"];function Z(e,n){return parseInt(e[n],10)||0}var g={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"},y=u.forwardRef((function(e,n){var t=e.onChange,r=e.maxRows,i=e.minRows,a=void 0===i?1:i,l=e.style,d=e.value,y=(0,c.Z)(e,b),S=u.useRef(null!=d).current,x=u.useRef(null),w=(0,p.Z)(n,x),C=u.useRef(null),R=u.useRef(0),P=u.useState({}),M=(0,o.Z)(P,2),I=M[0],F=M[1],A=u.useCallback((function(){var n=x.current,t=(0,f.Z)(n).getComputedStyle(n);if("0px"!==t.width){var o=C.current;o.style.width=t.width,o.value=n.value||e.placeholder||"x","\n"===o.value.slice(-1)&&(o.value+=" ");var i=t["box-sizing"],l=Z(t,"padding-bottom")+Z(t,"padding-top"),u=Z(t,"border-bottom-width")+Z(t,"border-top-width"),d=o.scrollHeight;o.value="x";var s=o.scrollHeight,c=d;a&&(c=Math.max(Number(a)*s,c)),r&&(c=Math.min(Number(r)*s,c));var p=(c=Math.max(c,s))+("border-box"===i?l+u:0),m=Math.abs(c-d)<=1;F((function(e){return R.current<20&&(p>0&&Math.abs((e.outerHeightStyle||0)-p)>1||e.overflow!==m)?(R.current+=1,{overflow:m,outerHeightStyle:p}):e}))}}),[r,a,e.placeholder]);u.useEffect((function(){var e,n=(0,m.Z)((function(){R.current=0,A()})),t=(0,f.Z)(x.current);return t.addEventListener("resize",n),"undefined"!==typeof ResizeObserver&&(e=new ResizeObserver(n)).observe(x.current),function(){n.clear(),t.removeEventListener("resize",n),e&&e.disconnect()}}),[A]),(0,v.Z)((function(){A()})),u.useEffect((function(){R.current=0}),[d]);return(0,h.jsxs)(u.Fragment,{children:[(0,h.jsx)("textarea",(0,s.Z)({value:d,onChange:function(e){R.current=0,S||A(),t&&t(e)},ref:w,rows:a,style:(0,s.Z)({height:I.outerHeightStyle,overflow:I.overflow?"hidden":null},l)},y)),(0,h.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:C,tabIndex:-1,style:(0,s.Z)({},g,l,{padding:0})})]})})),S=t(50076),x=t(45193),w=t(25868),C=t(14478),R=t(23060),P=t(8208),M=t(15573),I=t(91442),F=t(3299),A=t(40839),O=t(90118),E=t(36474),k=t(7495),W=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","startAdornment","type","value"],N=function(e,n){var t=e.ownerState;return[n.root,t.formControl&&n.formControl,t.startAdornment&&n.adornedStart,t.endAdornment&&n.adornedEnd,t.error&&n.error,"small"===t.size&&n.sizeSmall,t.multiline&&n.multiline,t.color&&n["color".concat((0,I.Z)(t.color))],t.fullWidth&&n.fullWidth,t.hiddenLabel&&n.hiddenLabel]},z=function(e,n){var t=e.ownerState;return[n.input,"small"===t.size&&n.inputSizeSmall,t.multiline&&n.inputMultiline,"search"===t.type&&n.inputTypeSearch,t.startAdornment&&n.inputAdornedStart,t.endAdornment&&n.inputAdornedEnd,t.hiddenLabel&&n.inputHiddenLabel]},j=(0,P.ZP)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:N})((function(e){var n=e.theme,t=e.ownerState;return(0,a.Z)({},n.typography.body1,(0,r.Z)({color:n.palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center"},"&.".concat(k.Z.disabled),{color:n.palette.text.disabled,cursor:"default"}),t.multiline&&(0,a.Z)({padding:"4px 0 5px"},"small"===t.size&&{paddingTop:1}),t.fullWidth&&{width:"100%"})})),L=(0,P.ZP)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:z})((function(e){var n,t=e.theme,o=e.ownerState,i="light"===t.palette.mode,l={color:"currentColor",opacity:i?.42:.5,transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})},u={opacity:"0 !important"},d={opacity:i?.42:.5};return(0,a.Z)((n={font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":l,"&::-moz-placeholder":l,"&:-ms-input-placeholder":l,"&::-ms-input-placeholder":l,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"}},(0,r.Z)(n,"label[data-shrink=false] + .".concat(k.Z.formControl," &"),{"&::-webkit-input-placeholder":u,"&::-moz-placeholder":u,"&:-ms-input-placeholder":u,"&::-ms-input-placeholder":u,"&:focus::-webkit-input-placeholder":d,"&:focus::-moz-placeholder":d,"&:focus:-ms-input-placeholder":d,"&:focus::-ms-input-placeholder":d}),(0,r.Z)(n,"&.".concat(k.Z.disabled),{opacity:1,WebkitTextFillColor:t.palette.text.disabled}),(0,r.Z)(n,"&:-webkit-autofill",{animationDuration:"5000s",animationName:"mui-auto-fill"}),n),"small"===o.size&&{paddingTop:1},o.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===o.type&&{MozAppearance:"textfield"})})),B=(0,h.jsx)(O.Z,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),T=u.forwardRef((function(e,n){var t=(0,M.Z)({props:e,name:"MuiInputBase"}),r=t["aria-describedby"],s=t.autoComplete,c=t.autoFocus,p=t.className,f=t.components,m=void 0===f?{}:f,v=t.componentsProps,b=void 0===v?{}:v,Z=t.defaultValue,g=t.disabled,P=t.disableInjectingGlobalStyles,O=t.endAdornment,N=t.fullWidth,z=void 0!==N&&N,T=t.id,D=t.inputComponent,H=void 0===D?"input":D,K=t.inputProps,U=void 0===K?{}:K,V=t.inputRef,_=t.maxRows,q=t.minRows,G=t.multiline,X=void 0!==G&&G,J=t.name,Q=t.onBlur,Y=t.onChange,$=t.onClick,ee=t.onFocus,ne=t.onKeyDown,te=t.onKeyUp,oe=t.placeholder,re=t.readOnly,ie=t.renderSuffix,ae=t.rows,le=t.startAdornment,ue=t.type,de=void 0===ue?"text":ue,se=t.value,ce=(0,i.Z)(t,W),pe=null!=U.value?U.value:se,fe=u.useRef(null!=pe).current,me=u.useRef(),ve=u.useCallback((function(e){0}),[]),he=(0,F.Z)(U.ref,ve),be=(0,F.Z)(V,he),Ze=(0,F.Z)(me,be),ge=u.useState(!1),ye=(0,o.Z)(ge,2),Se=ye[0],xe=ye[1],we=(0,R.Z)();var Ce=(0,w.Z)({props:t,muiFormControl:we,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Ce.focused=we?we.focused:Se,u.useEffect((function(){!we&&g&&Se&&(xe(!1),Q&&Q())}),[we,g,Se,Q]);var Re=we&&we.onFilled,Pe=we&&we.onEmpty,Me=u.useCallback((function(e){(0,E.vd)(e)?Re&&Re():Pe&&Pe()}),[Re,Pe]);(0,A.Z)((function(){fe&&Me({value:pe})}),[pe,Me,fe]);u.useEffect((function(){Me(me.current)}),[]);var Ie=H,Fe=U;X&&"input"===Ie&&(Fe=ae?(0,a.Z)({type:void 0,minRows:ae,maxRows:ae},Fe):(0,a.Z)({type:void 0,maxRows:_,minRows:q},Fe),Ie=y);u.useEffect((function(){we&&we.setAdornedStart(Boolean(le))}),[we,le]);var Ae=(0,a.Z)({},t,{color:Ce.color||"primary",disabled:Ce.disabled,endAdornment:O,error:Ce.error,focused:Ce.focused,formControl:we,fullWidth:z,hiddenLabel:Ce.hiddenLabel,multiline:X,size:Ce.size,startAdornment:le,type:de}),Oe=function(e){var n=e.classes,t=e.color,o=e.disabled,r=e.error,i=e.endAdornment,a=e.focused,l=e.formControl,u=e.fullWidth,d=e.hiddenLabel,s=e.multiline,c=e.size,p=e.startAdornment,f=e.type,m={root:["root","color".concat((0,I.Z)(t)),o&&"disabled",r&&"error",u&&"fullWidth",a&&"focused",l&&"formControl","small"===c&&"sizeSmall",s&&"multiline",p&&"adornedStart",i&&"adornedEnd",d&&"hiddenLabel"],input:["input",o&&"disabled","search"===f&&"inputTypeSearch",s&&"inputMultiline","small"===c&&"inputSizeSmall",d&&"inputHiddenLabel",p&&"inputAdornedStart",i&&"inputAdornedEnd"]};return(0,S.Z)(m,k.u,n)}(Ae),Ee=m.Root||j,ke=b.root||{},We=m.Input||L;return Fe=(0,a.Z)({},Fe,b.input),(0,h.jsxs)(u.Fragment,{children:[!P&&B,(0,h.jsxs)(Ee,(0,a.Z)({},ke,!(0,x.Z)(Ee)&&{ownerState:(0,a.Z)({},Ae,ke.ownerState)},{ref:n,onClick:function(e){me.current&&e.currentTarget===e.target&&me.current.focus(),$&&$(e)}},ce,{className:(0,d.Z)(Oe.root,ke.className,p),children:[le,(0,h.jsx)(C.Z.Provider,{value:null,children:(0,h.jsx)(We,(0,a.Z)({ownerState:Ae,"aria-invalid":Ce.error,"aria-describedby":r,autoComplete:s,autoFocus:c,defaultValue:Z,disabled:Ce.disabled,id:T,onAnimationStart:function(e){Me("mui-auto-fill-cancel"===e.animationName?me.current:{value:"x"})},name:J,placeholder:oe,readOnly:re,required:Ce.required,rows:ae,value:pe,onKeyDown:ne,onKeyUp:te,type:de},Fe,!(0,x.Z)(We)&&{as:Ie,ownerState:(0,a.Z)({},Ae,Fe.ownerState)},{ref:Ze,className:(0,d.Z)(Oe.input,Fe.className),onBlur:function(e){Q&&Q(e),U.onBlur&&U.onBlur(e),we&&we.onBlur?we.onBlur(e):xe(!1)},onChange:function(e){if(!fe){var n=e.target||me.current;if(null==n)throw new Error((0,l.Z)(1));Me({value:n.value})}for(var t=arguments.length,o=new Array(t>1?t-1:0),r=1;r1&&void 0!==arguments[1]&&arguments[1];return e&&(o(e.value)&&""!==e.value||n&&o(e.defaultValue)&&""!==e.defaultValue)}function i(e){return e.startAdornment}t.d(n,{vd:function(){return r},B7:function(){return i}})},26936:function(e,n,t){t.d(n,{Z:function(){return W}});var o=t(32793),r=t(1048),i=t(50390),a=(t(50557),t(44977)),l=t(50076),u=t(64132),d=t(5211),s=t(20630).Z,c=t(3299),p=t(40839),f=t(62559),m=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function v(e,n,t){return e===n?e.firstChild:n&&n.nextElementSibling?n.nextElementSibling:t?null:e.firstChild}function h(e,n,t){return e===n?t?e.firstChild:e.lastChild:n&&n.previousElementSibling?n.previousElementSibling:t?null:e.lastChild}function b(e,n){if(void 0===n)return!0;var t=e.innerText;return void 0===t&&(t=e.textContent),0!==(t=t.trim().toLowerCase()).length&&(n.repeating?t[0]===n.keys[0]:0===t.indexOf(n.keys.join("")))}function Z(e,n,t,o,r,i){for(var a=!1,l=r(e,n,!!n&&t);l;){if(l===e.firstChild){if(a)return!1;a=!0}var u=!o&&(l.disabled||"true"===l.getAttribute("aria-disabled"));if(l.hasAttribute("tabindex")&&b(l,i)&&!u)return l.focus(),!0;l=r(e,l,t)}return!1}var g=i.forwardRef((function(e,n){var t=e.actions,a=e.autoFocus,l=void 0!==a&&a,g=e.autoFocusItem,y=void 0!==g&&g,S=e.children,x=e.className,w=e.disabledItemsFocusable,C=void 0!==w&&w,R=e.disableListWrap,P=void 0!==R&&R,M=e.onKeyDown,I=e.variant,F=void 0===I?"selectedMenu":I,A=(0,r.Z)(e,m),O=i.useRef(null),E=i.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,p.Z)((function(){l&&O.current.focus()}),[l]),i.useImperativeHandle(t,(function(){return{adjustStyleForScrollbar:function(e,n){var t=!O.current.style.width;if(e.clientHeight0&&(a-r.lastTime>500?(r.keys=[],r.repeating=!0,r.previousKeyMatched=!0):r.repeating&&i!==r.keys[0]&&(r.repeating=!1)),r.lastTime=a,r.keys.push(i);var l=o&&!r.repeating&&b(o,r);r.previousKeyMatched&&(l||Z(n,o,!1,C,v,r))?e.preventDefault():r.previousKeyMatched=!1}M&&M(e)},tabIndex:l?0:-1},A,{children:N}))})),y=t(46981),S=t(95892),x=t(8208),w=t(88669),C=t(15573),R=t(10594);function P(e){return(0,R.Z)("MuiMenu",e)}(0,t(43349).Z)("MuiMenu",["root","paper","list"]);var M=["onEntering"],I=["autoFocus","children","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"],F={vertical:"top",horizontal:"right"},A={vertical:"top",horizontal:"left"},O=(0,x.ZP)(S.ZP,{shouldForwardProp:function(e){return(0,x.FO)(e)||"classes"===e},name:"MuiMenu",slot:"Root",overridesResolver:function(e,n){return n.root}})({}),E=(0,x.ZP)(y.Z,{name:"MuiMenu",slot:"Paper",overridesResolver:function(e,n){return n.paper}})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),k=(0,x.ZP)(g,{name:"MuiMenu",slot:"List",overridesResolver:function(e,n){return n.list}})({outline:0}),W=i.forwardRef((function(e,n){var t=(0,C.Z)({props:e,name:"MuiMenu"}),u=t.autoFocus,d=void 0===u||u,s=t.children,c=t.disableAutoFocusItem,p=void 0!==c&&c,m=t.MenuListProps,v=void 0===m?{}:m,h=t.onClose,b=t.open,Z=t.PaperProps,g=void 0===Z?{}:Z,y=t.PopoverClasses,S=t.transitionDuration,x=void 0===S?"auto":S,R=t.TransitionProps,W=(R=void 0===R?{}:R).onEntering,N=t.variant,z=void 0===N?"selectedMenu":N,j=(0,r.Z)(t.TransitionProps,M),L=(0,r.Z)(t,I),B=(0,w.Z)(),T="rtl"===B.direction,D=(0,o.Z)({},t,{autoFocus:d,disableAutoFocusItem:p,MenuListProps:v,onEntering:W,PaperProps:g,transitionDuration:x,TransitionProps:j,variant:z}),H=function(e){var n=e.classes;return(0,l.Z)({root:["root"],paper:["paper"],list:["list"]},P,n)}(D),K=d&&!p&&b,U=i.useRef(null),V=-1;return i.Children.map(s,(function(e,n){i.isValidElement(e)&&(e.props.disabled||("selectedMenu"===z&&e.props.selected||-1===V)&&(V=n))})),(0,f.jsx)(O,(0,o.Z)({classes:y,onClose:h,anchorOrigin:{vertical:"bottom",horizontal:T?"right":"left"},transformOrigin:T?F:A,PaperProps:(0,o.Z)({component:E},g,{classes:(0,o.Z)({},g.classes,{root:H.paper})}),className:H.root,open:b,ref:n,transitionDuration:x,TransitionProps:(0,o.Z)({onEntering:function(e,n){U.current&&U.current.adjustStyleForScrollbar(e,B),W&&W(e,n)}},j),ownerState:D},L,{children:(0,f.jsx)(k,(0,o.Z)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),h&&h(e,"tabKeyDown"))},actions:U,autoFocus:d&&(-1===V||p),autoFocusItem:K,variant:z},v,{className:(0,a.Z)(H.list,v.className),children:s}))}))}))},58217:function(e,n,t){t.d(n,{Z:function(){return w}});var o=t(36222),r=t(1048),i=t(32793),a=t(50390),l=t(50076),u=t(8208),d=t(62559),s=["children","classes","className","label","notched"],c=(0,u.ZP)("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),p=(0,u.ZP)("legend",{skipSx:!0})((function(e){var n=e.ownerState,t=e.theme;return(0,i.Z)({float:"unset"},void 0===n.label&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},void 0!==n.label&&(0,i.Z)({display:"block",width:"auto",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block"}},n.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}))}));var f=t(23060),m=t(25868),v=t(39993),h=t(46413),b=t(15573),Z=["components","fullWidth","inputComponent","label","multiline","notched","type"],g=(0,u.ZP)(h.Ej,{shouldForwardProp:function(e){return(0,u.FO)(e)||"classes"===e},name:"MuiOutlinedInput",slot:"Root",overridesResolver:h.Gx})((function(e){var n,t=e.theme,r=e.ownerState,a="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,i.Z)((n={position:"relative",borderRadius:t.shape.borderRadius},(0,o.Z)(n,"&:hover .".concat(v.Z.notchedOutline),{borderColor:t.palette.text.primary}),(0,o.Z)(n,"@media (hover: none)",(0,o.Z)({},"&:hover .".concat(v.Z.notchedOutline),{borderColor:a})),(0,o.Z)(n,"&.".concat(v.Z.focused," .").concat(v.Z.notchedOutline),{borderColor:t.palette[r.color].main,borderWidth:2}),(0,o.Z)(n,"&.".concat(v.Z.error," .").concat(v.Z.notchedOutline),{borderColor:t.palette.error.main}),(0,o.Z)(n,"&.".concat(v.Z.disabled," .").concat(v.Z.notchedOutline),{borderColor:t.palette.action.disabled}),n),r.startAdornment&&{paddingLeft:14},r.endAdornment&&{paddingRight:14},r.multiline&&(0,i.Z)({padding:"16.5px 14px"},"small"===r.size&&{padding:"8.5px 14px"}))})),y=(0,u.ZP)((function(e){var n=e.className,t=e.label,o=e.notched,a=(0,r.Z)(e,s),l=(0,i.Z)({},e,{notched:o,label:t});return(0,d.jsx)(c,(0,i.Z)({"aria-hidden":!0,className:n,ownerState:l},a,{children:(0,d.jsx)(p,{ownerState:l,children:t?(0,d.jsx)("span",{children:t}):(0,d.jsx)("span",{className:"notranslate",dangerouslySetInnerHTML:{__html:"​"}})})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:function(e,n){return n.notchedOutline}})((function(e){return{borderColor:"light"===e.theme.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}})),S=(0,u.ZP)(h.rA,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:h._o})((function(e){var n=e.theme,t=e.ownerState;return(0,i.Z)({padding:"16.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:"light"===n.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===n.palette.mode?null:"#fff",caretColor:"light"===n.palette.mode?null:"#fff",borderRadius:"inherit"}},"small"===t.size&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})})),x=a.forwardRef((function(e,n){var t,o=(0,b.Z)({props:e,name:"MuiOutlinedInput"}),u=o.components,s=void 0===u?{}:u,c=o.fullWidth,p=void 0!==c&&c,x=o.inputComponent,w=void 0===x?"input":x,C=o.label,R=o.multiline,P=void 0!==R&&R,M=o.notched,I=o.type,F=void 0===I?"text":I,A=(0,r.Z)(o,Z),O=function(e){var n=e.classes,t=(0,l.Z)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},v.e,n);return(0,i.Z)({},n,t)}(o),E=(0,f.Z)(),k=(0,m.Z)({props:o,muiFormControl:E,states:["required"]});return(0,d.jsx)(h.ZP,(0,i.Z)({components:(0,i.Z)({Root:g,Input:S},s),renderSuffix:function(e){return(0,d.jsx)(y,{className:O.notchedOutline,label:C&&k.required?t||(t=(0,d.jsxs)(a.Fragment,{children:[C,"\xa0","*"]})):C,notched:"undefined"!==typeof M?M:Boolean(e.startAdornment||e.filled||e.focused)})},fullWidth:p,inputComponent:w,multiline:P,ref:n,type:F},A,{classes:(0,i.Z)({},O,{notchedOutline:null})}))}));x.muiName="Input";var w=x},39993:function(e,n,t){t.d(n,{e:function(){return r}});var o=t(10594);function r(e){return(0,o.Z)("MuiOutlinedInput",e)}var i=(0,t(43349).Z)("MuiOutlinedInput",["root","colorSecondary","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","notchedOutline","input","inputSizeSmall","inputMultiline","inputAdornedStart","inputAdornedEnd"]);n.Z=i},43965:function(e,n,t){t.d(n,{Z:function(){return J}});var o=t(32793),r=t(1048),i=t(50390),a=t(44977),l=t(64487),u=t(23430),d=t(36222),s=t(87838),c=(t(50557),t(50076)),p=t(64132),f=t(91442),m=t(26936),v=t(10594),h=t(43349);function b(e){return(0,v.Z)("MuiNativeSelect",e)}var Z=(0,h.Z)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]),g=t(8208),y=t(62559),S=["className","disabled","IconComponent","inputRef","variant"],x=function(e){var n,t=e.ownerState,r=e.theme;return(0,o.Z)((n={MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{backgroundColor:"light"===r.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"}},(0,d.Z)(n,"&.".concat(Z.disabled),{cursor:"default"}),(0,d.Z)(n,"&[multiple]",{height:"auto"}),(0,d.Z)(n,"&:not([multiple]) option, &:not([multiple]) optgroup",{backgroundColor:r.palette.background.paper}),(0,d.Z)(n,"&&&",{paddingRight:24,minWidth:16}),n),"filled"===t.variant&&{"&&&":{paddingRight:32}},"outlined"===t.variant&&{borderRadius:r.shape.borderRadius,"&:focus":{borderRadius:r.shape.borderRadius},"&&&":{paddingRight:32}})},w=(0,g.ZP)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:g.FO,overridesResolver:function(e,n){var t=e.ownerState;return[n.select,n[t.variant],(0,d.Z)({},"&.".concat(Z.multiple),n.multiple)]}})(x),C=function(e){var n=e.ownerState,t=e.theme;return(0,o.Z)((0,d.Z)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:t.palette.action.active},"&.".concat(Z.disabled),{color:t.palette.action.disabled}),n.open&&{transform:"rotate(180deg)"},"filled"===n.variant&&{right:7},"outlined"===n.variant&&{right:7})},R=(0,g.ZP)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:function(e,n){var t=e.ownerState;return[n.icon,t.variant&&n["icon".concat((0,f.Z)(t.variant))],t.open&&n.iconOpen]}})(C),P=i.forwardRef((function(e,n){var t=e.className,l=e.disabled,u=e.IconComponent,d=e.inputRef,s=e.variant,p=void 0===s?"standard":s,m=(0,r.Z)(e,S),v=(0,o.Z)({},e,{disabled:l,variant:p}),h=function(e){var n=e.classes,t=e.variant,o=e.disabled,r=e.multiple,i=e.open,a={select:["select",t,o&&"disabled",r&&"multiple"],icon:["icon","icon".concat((0,f.Z)(t)),i&&"iconOpen",o&&"disabled"]};return(0,c.Z)(a,b,n)}(v);return(0,y.jsxs)(i.Fragment,{children:[(0,y.jsx)(w,(0,o.Z)({ownerState:v,className:(0,a.Z)(h.select,t),disabled:l,ref:d||n},m)),e.multiple?null:(0,y.jsx)(R,{as:u,ownerState:v,className:h.icon})]})})),M=t(36474),I=t(3299),F=t(55386);function A(e){return(0,v.Z)("MuiSelect",e)}var O=(0,h.Z)("MuiSelect",["select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]),E=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],k=(0,g.ZP)("div",{name:"MuiSelect",slot:"Select",overridesResolver:function(e,n){var t=e.ownerState;return[(0,d.Z)({},"&.".concat(O.select),n.select),(0,d.Z)({},"&.".concat(O.select),n[t.variant]),(0,d.Z)({},"&.".concat(O.multiple),n.multiple)]}})(x,(0,d.Z)({},"&.".concat(O.select),{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"})),W=(0,g.ZP)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:function(e,n){var t=e.ownerState;return[n.icon,t.variant&&n["icon".concat((0,f.Z)(t.variant))],t.open&&n.iconOpen]}})(C),N=(0,g.ZP)("input",{shouldForwardProp:function(e){return(0,g.Dz)(e)&&"classes"!==e},name:"MuiSelect",slot:"NativeInput",overridesResolver:function(e,n){return n.nativeInput}})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function z(e,n){return"object"===typeof n&&null!==n?e===n:String(e)===String(n)}function j(e){return null==e||"string"===typeof e&&!e.trim()}var L,B,T=i.forwardRef((function(e,n){var t=e["aria-describedby"],l=e["aria-label"],d=e.autoFocus,v=e.autoWidth,h=e.children,b=e.className,Z=e.defaultOpen,g=e.defaultValue,S=e.disabled,x=e.displayEmpty,w=e.IconComponent,C=e.inputRef,R=e.labelId,P=e.MenuProps,O=void 0===P?{}:P,L=e.multiple,B=e.name,T=e.onBlur,D=e.onChange,H=e.onClose,K=e.onFocus,U=e.onOpen,V=e.open,_=e.readOnly,q=e.renderValue,G=e.SelectDisplayProps,X=void 0===G?{}:G,J=e.tabIndex,Q=e.value,Y=e.variant,$=void 0===Y?"standard":Y,ee=(0,r.Z)(e,E),ne=(0,F.Z)({controlled:Q,default:g,name:"Select"}),te=(0,u.Z)(ne,2),oe=te[0],re=te[1],ie=(0,F.Z)({controlled:V,default:Z,name:"Select"}),ae=(0,u.Z)(ie,2),le=ae[0],ue=ae[1],de=i.useRef(null),se=i.useRef(null),ce=i.useState(null),pe=(0,u.Z)(ce,2),fe=pe[0],me=pe[1],ve=i.useRef(null!=V).current,he=i.useState(),be=(0,u.Z)(he,2),Ze=be[0],ge=be[1],ye=(0,I.Z)(n,C),Se=i.useCallback((function(e){se.current=e,e&&me(e)}),[]);i.useImperativeHandle(ye,(function(){return{focus:function(){se.current.focus()},node:de.current,value:oe}}),[oe]),i.useEffect((function(){Z&&le&&fe&&!ve&&(ge(v?null:fe.clientWidth),se.current.focus())}),[fe,v]),i.useEffect((function(){d&&se.current.focus()}),[d]),i.useEffect((function(){var e=(0,p.Z)(se.current).getElementById(R);if(e){var n=function(){getSelection().isCollapsed&&se.current.focus()};return e.addEventListener("click",n),function(){e.removeEventListener("click",n)}}}),[R]);var xe,we,Ce=function(e,n){e?U&&U(n):H&&H(n),ve||(ge(v?null:fe.clientWidth),ue(e))},Re=i.Children.toArray(h),Pe=function(e){return function(n){var t;if(n.currentTarget.hasAttribute("tabindex")){if(L){t=Array.isArray(oe)?oe.slice():[];var o=oe.indexOf(e.props.value);-1===o?t.push(e.props.value):t.splice(o,1)}else t=e.props.value;if(e.props.onClick&&e.props.onClick(n),oe!==t&&(re(t),D)){var r=n.nativeEvent||n,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:t,name:B}}),D(i,e)}L||Ce(!1,n)}}},Me=null!==fe&≤delete ee["aria-invalid"];var Ie=[],Fe=!1;((0,M.vd)({value:oe})||x)&&(q?xe=q(oe):Fe=!0);var Ae=Re.map((function(e){if(!i.isValidElement(e))return null;var n;if(L){if(!Array.isArray(oe))throw new Error((0,s.Z)(2));(n=oe.some((function(n){return z(n,e.props.value)})))&&Fe&&Ie.push(e.props.children)}else(n=z(oe,e.props.value))&&Fe&&(we=e.props.children);return n&&!0,i.cloneElement(e,{"aria-selected":n?"true":"false",onClick:Pe(e),onKeyUp:function(n){" "===n.key&&n.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(n)},role:"option",selected:n,value:void 0,"data-value":e.props.value})}));Fe&&(xe=L?0===Ie.length?null:Ie.reduce((function(e,n,t){return e.push(n),t0&&Math.abs((e.outerHeightStyle||0)-p)>1||e.overflow!==m)?(R.current+=1,{overflow:m,outerHeightStyle:p}):e}))}}),[r,a,e.placeholder]);u.useEffect((function(){var e,n=(0,m.Z)((function(){R.current=0,A()})),t=(0,f.Z)(w.current);return t.addEventListener("resize",n),"undefined"!==typeof ResizeObserver&&(e=new ResizeObserver(n)).observe(w.current),function(){n.clear(),t.removeEventListener("resize",n),e&&e.disconnect()}}),[A]),(0,v.Z)((function(){A()})),u.useEffect((function(){R.current=0}),[d]);return(0,h.jsxs)(u.Fragment,{children:[(0,h.jsx)("textarea",(0,s.Z)({value:d,onChange:function(e){R.current=0,S||A(),t&&t(e)},ref:x,rows:a,style:(0,s.Z)({height:I.outerHeightStyle,overflow:I.overflow?"hidden":null},l)},y)),(0,h.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:C,tabIndex:-1,style:(0,s.Z)({},g,l,{padding:0})})]})})),S=t(50076),w=t(45193),x=t(25868),C=t(14478),R=t(23060),P=t(8208),M=t(15573),I=t(91442),F=t(3299),A=t(40839),O=t(90118),E=t(36474),k=t(7495),W=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","startAdornment","type","value"],N=function(e,n){var t=e.ownerState;return[n.root,t.formControl&&n.formControl,t.startAdornment&&n.adornedStart,t.endAdornment&&n.adornedEnd,t.error&&n.error,"small"===t.size&&n.sizeSmall,t.multiline&&n.multiline,t.color&&n["color".concat((0,I.Z)(t.color))],t.fullWidth&&n.fullWidth,t.hiddenLabel&&n.hiddenLabel]},z=function(e,n){var t=e.ownerState;return[n.input,"small"===t.size&&n.inputSizeSmall,t.multiline&&n.inputMultiline,"search"===t.type&&n.inputTypeSearch,t.startAdornment&&n.inputAdornedStart,t.endAdornment&&n.inputAdornedEnd,t.hiddenLabel&&n.inputHiddenLabel]},L=(0,P.ZP)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:N})((function(e){var n=e.theme,t=e.ownerState;return(0,a.Z)({},n.typography.body1,(0,r.Z)({color:n.palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center"},"&.".concat(k.Z.disabled),{color:n.palette.text.disabled,cursor:"default"}),t.multiline&&(0,a.Z)({padding:"4px 0 5px"},"small"===t.size&&{paddingTop:1}),t.fullWidth&&{width:"100%"})})),j=(0,P.ZP)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:z})((function(e){var n,t=e.theme,o=e.ownerState,i="light"===t.palette.mode,l={color:"currentColor",opacity:i?.42:.5,transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})},u={opacity:"0 !important"},d={opacity:i?.42:.5};return(0,a.Z)((n={font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":l,"&::-moz-placeholder":l,"&:-ms-input-placeholder":l,"&::-ms-input-placeholder":l,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"}},(0,r.Z)(n,"label[data-shrink=false] + .".concat(k.Z.formControl," &"),{"&::-webkit-input-placeholder":u,"&::-moz-placeholder":u,"&:-ms-input-placeholder":u,"&::-ms-input-placeholder":u,"&:focus::-webkit-input-placeholder":d,"&:focus::-moz-placeholder":d,"&:focus:-ms-input-placeholder":d,"&:focus::-ms-input-placeholder":d}),(0,r.Z)(n,"&.".concat(k.Z.disabled),{opacity:1,WebkitTextFillColor:t.palette.text.disabled}),(0,r.Z)(n,"&:-webkit-autofill",{animationDuration:"5000s",animationName:"mui-auto-fill"}),n),"small"===o.size&&{paddingTop:1},o.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===o.type&&{MozAppearance:"textfield"})})),B=(0,h.jsx)(O.Z,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),D=u.forwardRef((function(e,n){var t=(0,M.Z)({props:e,name:"MuiInputBase"}),r=t["aria-describedby"],s=t.autoComplete,c=t.autoFocus,p=t.className,f=t.components,m=void 0===f?{}:f,v=t.componentsProps,b=void 0===v?{}:v,Z=t.defaultValue,g=t.disabled,P=t.disableInjectingGlobalStyles,O=t.endAdornment,N=t.fullWidth,z=void 0!==N&&N,D=t.id,T=t.inputComponent,H=void 0===T?"input":T,K=t.inputProps,U=void 0===K?{}:K,V=t.inputRef,q=t.maxRows,_=t.minRows,G=t.multiline,X=void 0!==G&&G,J=t.name,Q=t.onBlur,Y=t.onChange,$=t.onClick,ee=t.onFocus,ne=t.onKeyDown,te=t.onKeyUp,oe=t.placeholder,re=t.readOnly,ie=t.renderSuffix,ae=t.rows,le=t.startAdornment,ue=t.type,de=void 0===ue?"text":ue,se=t.value,ce=(0,i.Z)(t,W),pe=null!=U.value?U.value:se,fe=u.useRef(null!=pe).current,me=u.useRef(),ve=u.useCallback((function(e){0}),[]),he=(0,F.Z)(U.ref,ve),be=(0,F.Z)(V,he),Ze=(0,F.Z)(me,be),ge=u.useState(!1),ye=(0,o.Z)(ge,2),Se=ye[0],we=ye[1],xe=(0,R.Z)();var Ce=(0,x.Z)({props:t,muiFormControl:xe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Ce.focused=xe?xe.focused:Se,u.useEffect((function(){!xe&&g&&Se&&(we(!1),Q&&Q())}),[xe,g,Se,Q]);var Re=xe&&xe.onFilled,Pe=xe&&xe.onEmpty,Me=u.useCallback((function(e){(0,E.vd)(e)?Re&&Re():Pe&&Pe()}),[Re,Pe]);(0,A.Z)((function(){fe&&Me({value:pe})}),[pe,Me,fe]);u.useEffect((function(){Me(me.current)}),[]);var Ie=H,Fe=U;X&&"input"===Ie&&(Fe=ae?(0,a.Z)({type:void 0,minRows:ae,maxRows:ae},Fe):(0,a.Z)({type:void 0,maxRows:q,minRows:_},Fe),Ie=y);u.useEffect((function(){xe&&xe.setAdornedStart(Boolean(le))}),[xe,le]);var Ae=(0,a.Z)({},t,{color:Ce.color||"primary",disabled:Ce.disabled,endAdornment:O,error:Ce.error,focused:Ce.focused,formControl:xe,fullWidth:z,hiddenLabel:Ce.hiddenLabel,multiline:X,size:Ce.size,startAdornment:le,type:de}),Oe=function(e){var n=e.classes,t=e.color,o=e.disabled,r=e.error,i=e.endAdornment,a=e.focused,l=e.formControl,u=e.fullWidth,d=e.hiddenLabel,s=e.multiline,c=e.size,p=e.startAdornment,f=e.type,m={root:["root","color".concat((0,I.Z)(t)),o&&"disabled",r&&"error",u&&"fullWidth",a&&"focused",l&&"formControl","small"===c&&"sizeSmall",s&&"multiline",p&&"adornedStart",i&&"adornedEnd",d&&"hiddenLabel"],input:["input",o&&"disabled","search"===f&&"inputTypeSearch",s&&"inputMultiline","small"===c&&"inputSizeSmall",d&&"inputHiddenLabel",p&&"inputAdornedStart",i&&"inputAdornedEnd"]};return(0,S.Z)(m,k.u,n)}(Ae),Ee=m.Root||L,ke=b.root||{},We=m.Input||j;return Fe=(0,a.Z)({},Fe,b.input),(0,h.jsxs)(u.Fragment,{children:[!P&&B,(0,h.jsxs)(Ee,(0,a.Z)({},ke,!(0,w.Z)(Ee)&&{ownerState:(0,a.Z)({},Ae,ke.ownerState)},{ref:n,onClick:function(e){me.current&&e.currentTarget===e.target&&me.current.focus(),$&&$(e)}},ce,{className:(0,d.Z)(Oe.root,ke.className,p),children:[le,(0,h.jsx)(C.Z.Provider,{value:null,children:(0,h.jsx)(We,(0,a.Z)({ownerState:Ae,"aria-invalid":Ce.error,"aria-describedby":r,autoComplete:s,autoFocus:c,defaultValue:Z,disabled:Ce.disabled,id:D,onAnimationStart:function(e){Me("mui-auto-fill-cancel"===e.animationName?me.current:{value:"x"})},name:J,placeholder:oe,readOnly:re,required:Ce.required,rows:ae,value:pe,onKeyDown:ne,onKeyUp:te,type:de},Fe,!(0,w.Z)(We)&&{as:Ie,ownerState:(0,a.Z)({},Ae,Fe.ownerState)},{ref:Ze,className:(0,d.Z)(Oe.input,Fe.className),onBlur:function(e){Q&&Q(e),U.onBlur&&U.onBlur(e),xe&&xe.onBlur?xe.onBlur(e):we(!1)},onChange:function(e){if(!fe){var n=e.target||me.current;if(null==n)throw new Error((0,l.Z)(1));Me({value:n.value})}for(var t=arguments.length,o=new Array(t>1?t-1:0),r=1;r1&&void 0!==arguments[1]&&arguments[1];return e&&(o(e.value)&&""!==e.value||n&&o(e.defaultValue)&&""!==e.defaultValue)}function i(e){return e.startAdornment}t.d(n,{vd:function(){return r},B7:function(){return i}})},26936:function(e,n,t){t.d(n,{Z:function(){return W}});var o=t(32793),r=t(1048),i=t(50390),a=(t(50557),t(44977)),l=t(50076),u=t(64132),d=t(5211),s=t(20630).Z,c=t(3299),p=t(40839),f=t(62559),m=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function v(e,n,t){return e===n?e.firstChild:n&&n.nextElementSibling?n.nextElementSibling:t?null:e.firstChild}function h(e,n,t){return e===n?t?e.firstChild:e.lastChild:n&&n.previousElementSibling?n.previousElementSibling:t?null:e.lastChild}function b(e,n){if(void 0===n)return!0;var t=e.innerText;return void 0===t&&(t=e.textContent),0!==(t=t.trim().toLowerCase()).length&&(n.repeating?t[0]===n.keys[0]:0===t.indexOf(n.keys.join("")))}function Z(e,n,t,o,r,i){for(var a=!1,l=r(e,n,!!n&&t);l;){if(l===e.firstChild){if(a)return!1;a=!0}var u=!o&&(l.disabled||"true"===l.getAttribute("aria-disabled"));if(l.hasAttribute("tabindex")&&b(l,i)&&!u)return l.focus(),!0;l=r(e,l,t)}return!1}var g=i.forwardRef((function(e,n){var t=e.actions,a=e.autoFocus,l=void 0!==a&&a,g=e.autoFocusItem,y=void 0!==g&&g,S=e.children,w=e.className,x=e.disabledItemsFocusable,C=void 0!==x&&x,R=e.disableListWrap,P=void 0!==R&&R,M=e.onKeyDown,I=e.variant,F=void 0===I?"selectedMenu":I,A=(0,r.Z)(e,m),O=i.useRef(null),E=i.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,p.Z)((function(){l&&O.current.focus()}),[l]),i.useImperativeHandle(t,(function(){return{adjustStyleForScrollbar:function(e,n){var t=!O.current.style.width;if(e.clientHeight0&&(a-r.lastTime>500?(r.keys=[],r.repeating=!0,r.previousKeyMatched=!0):r.repeating&&i!==r.keys[0]&&(r.repeating=!1)),r.lastTime=a,r.keys.push(i);var l=o&&!r.repeating&&b(o,r);r.previousKeyMatched&&(l||Z(n,o,!1,C,v,r))?e.preventDefault():r.previousKeyMatched=!1}M&&M(e)},tabIndex:l?0:-1},A,{children:N}))})),y=t(46981),S=t(95892),w=t(8208),x=t(88669),C=t(15573),R=t(10594);function P(e){return(0,R.Z)("MuiMenu",e)}(0,t(43349).Z)("MuiMenu",["root","paper","list"]);var M=["onEntering"],I=["autoFocus","children","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"],F={vertical:"top",horizontal:"right"},A={vertical:"top",horizontal:"left"},O=(0,w.ZP)(S.ZP,{shouldForwardProp:function(e){return(0,w.FO)(e)||"classes"===e},name:"MuiMenu",slot:"Root",overridesResolver:function(e,n){return n.root}})({}),E=(0,w.ZP)(y.Z,{name:"MuiMenu",slot:"Paper",overridesResolver:function(e,n){return n.paper}})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),k=(0,w.ZP)(g,{name:"MuiMenu",slot:"List",overridesResolver:function(e,n){return n.list}})({outline:0}),W=i.forwardRef((function(e,n){var t=(0,C.Z)({props:e,name:"MuiMenu"}),u=t.autoFocus,d=void 0===u||u,s=t.children,c=t.disableAutoFocusItem,p=void 0!==c&&c,m=t.MenuListProps,v=void 0===m?{}:m,h=t.onClose,b=t.open,Z=t.PaperProps,g=void 0===Z?{}:Z,y=t.PopoverClasses,S=t.transitionDuration,w=void 0===S?"auto":S,R=t.TransitionProps,W=(R=void 0===R?{}:R).onEntering,N=t.variant,z=void 0===N?"selectedMenu":N,L=(0,r.Z)(t.TransitionProps,M),j=(0,r.Z)(t,I),B=(0,x.Z)(),D="rtl"===B.direction,T=(0,o.Z)({},t,{autoFocus:d,disableAutoFocusItem:p,MenuListProps:v,onEntering:W,PaperProps:g,transitionDuration:w,TransitionProps:L,variant:z}),H=function(e){var n=e.classes;return(0,l.Z)({root:["root"],paper:["paper"],list:["list"]},P,n)}(T),K=d&&!p&&b,U=i.useRef(null),V=-1;return i.Children.map(s,(function(e,n){i.isValidElement(e)&&(e.props.disabled||("selectedMenu"===z&&e.props.selected||-1===V)&&(V=n))})),(0,f.jsx)(O,(0,o.Z)({classes:y,onClose:h,anchorOrigin:{vertical:"bottom",horizontal:D?"right":"left"},transformOrigin:D?F:A,PaperProps:(0,o.Z)({component:E},g,{classes:(0,o.Z)({},g.classes,{root:H.paper})}),className:H.root,open:b,ref:n,transitionDuration:w,TransitionProps:(0,o.Z)({onEntering:function(e,n){U.current&&U.current.adjustStyleForScrollbar(e,B),W&&W(e,n)}},L),ownerState:T},j,{children:(0,f.jsx)(k,(0,o.Z)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),h&&h(e,"tabKeyDown"))},actions:U,autoFocus:d&&(-1===V||p),autoFocusItem:K,variant:z},v,{className:(0,a.Z)(H.list,v.className),children:s}))}))}))},58217:function(e,n,t){t.d(n,{Z:function(){return C}});var o,r=t(36222),i=t(1048),a=t(32793),l=t(50390),u=t(50076),d=t(8208),s=t(62559),c=["children","classes","className","label","notched"],p=(0,d.ZP)("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),f=(0,d.ZP)("legend")((function(e){var n=e.ownerState,t=e.theme;return(0,a.Z)({float:"unset"},!n.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},n.withLabel&&(0,a.Z)({display:"block",width:"auto",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block"}},n.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}))}));var m=t(23060),v=t(25868),h=t(39993),b=t(46413),Z=t(15573),g=["components","fullWidth","inputComponent","label","multiline","notched","type"],y=(0,d.ZP)(b.Ej,{shouldForwardProp:function(e){return(0,d.FO)(e)||"classes"===e},name:"MuiOutlinedInput",slot:"Root",overridesResolver:b.Gx})((function(e){var n,t=e.theme,o=e.ownerState,i="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,a.Z)((n={position:"relative",borderRadius:t.shape.borderRadius},(0,r.Z)(n,"&:hover .".concat(h.Z.notchedOutline),{borderColor:t.palette.text.primary}),(0,r.Z)(n,"@media (hover: none)",(0,r.Z)({},"&:hover .".concat(h.Z.notchedOutline),{borderColor:i})),(0,r.Z)(n,"&.".concat(h.Z.focused," .").concat(h.Z.notchedOutline),{borderColor:t.palette[o.color].main,borderWidth:2}),(0,r.Z)(n,"&.".concat(h.Z.error," .").concat(h.Z.notchedOutline),{borderColor:t.palette.error.main}),(0,r.Z)(n,"&.".concat(h.Z.disabled," .").concat(h.Z.notchedOutline),{borderColor:t.palette.action.disabled}),n),o.startAdornment&&{paddingLeft:14},o.endAdornment&&{paddingRight:14},o.multiline&&(0,a.Z)({padding:"16.5px 14px"},"small"===o.size&&{padding:"8.5px 14px"}))})),S=(0,d.ZP)((function(e){var n=e.className,t=e.label,r=e.notched,l=(0,i.Z)(e,c),u=null!=t&&""!==t,d=(0,a.Z)({},e,{notched:r,withLabel:u});return(0,s.jsx)(p,(0,a.Z)({"aria-hidden":!0,className:n,ownerState:d},l,{children:(0,s.jsx)(f,{ownerState:d,children:u?(0,s.jsx)("span",{children:t}):o||(o=(0,s.jsx)("span",{className:"notranslate",children:"\u200b"}))})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:function(e,n){return n.notchedOutline}})((function(e){return{borderColor:"light"===e.theme.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}})),w=(0,d.ZP)(b.rA,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:b._o})((function(e){var n=e.theme,t=e.ownerState;return(0,a.Z)({padding:"16.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:"light"===n.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===n.palette.mode?null:"#fff",caretColor:"light"===n.palette.mode?null:"#fff",borderRadius:"inherit"}},"small"===t.size&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})})),x=l.forwardRef((function(e,n){var t,o=(0,Z.Z)({props:e,name:"MuiOutlinedInput"}),r=o.components,d=void 0===r?{}:r,c=o.fullWidth,p=void 0!==c&&c,f=o.inputComponent,x=void 0===f?"input":f,C=o.label,R=o.multiline,P=void 0!==R&&R,M=o.notched,I=o.type,F=void 0===I?"text":I,A=(0,i.Z)(o,g),O=function(e){var n=e.classes,t=(0,u.Z)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},h.e,n);return(0,a.Z)({},n,t)}(o),E=(0,m.Z)(),k=(0,v.Z)({props:o,muiFormControl:E,states:["required"]});return(0,s.jsx)(b.ZP,(0,a.Z)({components:(0,a.Z)({Root:y,Input:w},d),renderSuffix:function(e){return(0,s.jsx)(S,{className:O.notchedOutline,label:null!=C&&""!==C&&k.required?t||(t=(0,s.jsxs)(l.Fragment,{children:[C,"\xa0","*"]})):C,notched:"undefined"!==typeof M?M:Boolean(e.startAdornment||e.filled||e.focused)})},fullWidth:p,inputComponent:x,multiline:P,ref:n,type:F},A,{classes:(0,a.Z)({},O,{notchedOutline:null})}))}));x.muiName="Input";var C=x},39993:function(e,n,t){t.d(n,{e:function(){return r}});var o=t(10594);function r(e){return(0,o.Z)("MuiOutlinedInput",e)}var i=(0,t(43349).Z)("MuiOutlinedInput",["root","colorSecondary","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","notchedOutline","input","inputSizeSmall","inputMultiline","inputAdornedStart","inputAdornedEnd"]);n.Z=i},43965:function(e,n,t){t.d(n,{Z:function(){return Q}});var o=t(32793),r=t(1048),i=t(50390),a=t(44977),l=t(64487),u=t(23430),d=t(36222),s=t(87838),c=(t(50557),t(50076)),p=t(64132),f=t(91442),m=t(26936),v=t(10594),h=t(43349);function b(e){return(0,v.Z)("MuiNativeSelect",e)}var Z=(0,h.Z)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]),g=t(8208),y=t(62559),S=["className","disabled","IconComponent","inputRef","variant"],w=function(e){var n,t=e.ownerState,r=e.theme;return(0,o.Z)((n={MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{backgroundColor:"light"===r.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"}},(0,d.Z)(n,"&.".concat(Z.disabled),{cursor:"default"}),(0,d.Z)(n,"&[multiple]",{height:"auto"}),(0,d.Z)(n,"&:not([multiple]) option, &:not([multiple]) optgroup",{backgroundColor:r.palette.background.paper}),(0,d.Z)(n,"&&&",{paddingRight:24,minWidth:16}),n),"filled"===t.variant&&{"&&&":{paddingRight:32}},"outlined"===t.variant&&{borderRadius:r.shape.borderRadius,"&:focus":{borderRadius:r.shape.borderRadius},"&&&":{paddingRight:32}})},x=(0,g.ZP)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:g.FO,overridesResolver:function(e,n){var t=e.ownerState;return[n.select,n[t.variant],(0,d.Z)({},"&.".concat(Z.multiple),n.multiple)]}})(w),C=function(e){var n=e.ownerState,t=e.theme;return(0,o.Z)((0,d.Z)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:t.palette.action.active},"&.".concat(Z.disabled),{color:t.palette.action.disabled}),n.open&&{transform:"rotate(180deg)"},"filled"===n.variant&&{right:7},"outlined"===n.variant&&{right:7})},R=(0,g.ZP)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:function(e,n){var t=e.ownerState;return[n.icon,t.variant&&n["icon".concat((0,f.Z)(t.variant))],t.open&&n.iconOpen]}})(C),P=i.forwardRef((function(e,n){var t=e.className,l=e.disabled,u=e.IconComponent,d=e.inputRef,s=e.variant,p=void 0===s?"standard":s,m=(0,r.Z)(e,S),v=(0,o.Z)({},e,{disabled:l,variant:p}),h=function(e){var n=e.classes,t=e.variant,o=e.disabled,r=e.multiple,i=e.open,a={select:["select",t,o&&"disabled",r&&"multiple"],icon:["icon","icon".concat((0,f.Z)(t)),i&&"iconOpen",o&&"disabled"]};return(0,c.Z)(a,b,n)}(v);return(0,y.jsxs)(i.Fragment,{children:[(0,y.jsx)(x,(0,o.Z)({ownerState:v,className:(0,a.Z)(h.select,t),disabled:l,ref:d||n},m)),e.multiple?null:(0,y.jsx)(R,{as:u,ownerState:v,className:h.icon})]})})),M=t(36474),I=t(3299),F=t(55386);function A(e){return(0,v.Z)("MuiSelect",e)}var O,E=(0,h.Z)("MuiSelect",["select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]),k=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],W=(0,g.ZP)("div",{name:"MuiSelect",slot:"Select",overridesResolver:function(e,n){var t=e.ownerState;return[(0,d.Z)({},"&.".concat(E.select),n.select),(0,d.Z)({},"&.".concat(E.select),n[t.variant]),(0,d.Z)({},"&.".concat(E.multiple),n.multiple)]}})(w,(0,d.Z)({},"&.".concat(E.select),{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"})),N=(0,g.ZP)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:function(e,n){var t=e.ownerState;return[n.icon,t.variant&&n["icon".concat((0,f.Z)(t.variant))],t.open&&n.iconOpen]}})(C),z=(0,g.ZP)("input",{shouldForwardProp:function(e){return(0,g.Dz)(e)&&"classes"!==e},name:"MuiSelect",slot:"NativeInput",overridesResolver:function(e,n){return n.nativeInput}})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function L(e,n){return"object"===typeof n&&null!==n?e===n:String(e)===String(n)}function j(e){return null==e||"string"===typeof e&&!e.trim()}var B,D,T=i.forwardRef((function(e,n){var t=e["aria-describedby"],l=e["aria-label"],d=e.autoFocus,v=e.autoWidth,h=e.children,b=e.className,Z=e.defaultOpen,g=e.defaultValue,S=e.disabled,w=e.displayEmpty,x=e.IconComponent,C=e.inputRef,R=e.labelId,P=e.MenuProps,E=void 0===P?{}:P,B=e.multiple,D=e.name,T=e.onBlur,H=e.onChange,K=e.onClose,U=e.onFocus,V=e.onOpen,q=e.open,_=e.readOnly,G=e.renderValue,X=e.SelectDisplayProps,J=void 0===X?{}:X,Q=e.tabIndex,Y=e.value,$=e.variant,ee=void 0===$?"standard":$,ne=(0,r.Z)(e,k),te=(0,F.Z)({controlled:Y,default:g,name:"Select"}),oe=(0,u.Z)(te,2),re=oe[0],ie=oe[1],ae=(0,F.Z)({controlled:q,default:Z,name:"Select"}),le=(0,u.Z)(ae,2),ue=le[0],de=le[1],se=i.useRef(null),ce=i.useRef(null),pe=i.useState(null),fe=(0,u.Z)(pe,2),me=fe[0],ve=fe[1],he=i.useRef(null!=q).current,be=i.useState(),Ze=(0,u.Z)(be,2),ge=Ze[0],ye=Ze[1],Se=(0,I.Z)(n,C),we=i.useCallback((function(e){ce.current=e,e&&ve(e)}),[]);i.useImperativeHandle(Se,(function(){return{focus:function(){ce.current.focus()},node:se.current,value:re}}),[re]),i.useEffect((function(){Z&&ue&&me&&!he&&(ye(v?null:me.clientWidth),ce.current.focus())}),[me,v]),i.useEffect((function(){d&&ce.current.focus()}),[d]),i.useEffect((function(){var e=(0,p.Z)(ce.current).getElementById(R);if(e){var n=function(){getSelection().isCollapsed&&ce.current.focus()};return e.addEventListener("click",n),function(){e.removeEventListener("click",n)}}}),[R]);var xe,Ce,Re=function(e,n){e?V&&V(n):K&&K(n),he||(ye(v?null:me.clientWidth),de(e))},Pe=i.Children.toArray(h),Me=function(e){return function(n){var t;if(n.currentTarget.hasAttribute("tabindex")){if(B){t=Array.isArray(re)?re.slice():[];var o=re.indexOf(e.props.value);-1===o?t.push(e.props.value):t.splice(o,1)}else t=e.props.value;if(e.props.onClick&&e.props.onClick(n),re!==t&&(ie(t),H)){var r=n.nativeEvent||n,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:t,name:D}}),H(i,e)}B||Re(!1,n)}}},Ie=null!==me&&ue;delete ne["aria-invalid"];var Fe=[],Ae=!1;((0,M.vd)({value:re})||w)&&(G?xe=G(re):Ae=!0);var Oe=Pe.map((function(e){if(!i.isValidElement(e))return null;var n;if(B){if(!Array.isArray(re))throw new Error((0,s.Z)(2));(n=re.some((function(n){return L(n,e.props.value)})))&&Ae&&Fe.push(e.props.children)}else(n=L(re,e.props.value))&&Ae&&(Ce=e.props.children);return n&&!0,i.cloneElement(e,{"aria-selected":n?"true":"false",onClick:Me(e),onKeyUp:function(n){" "===n.key&&n.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(n)},role:"option",selected:n,value:void 0,"data-value":e.props.value})}));Ae&&(xe=B?0===Fe.length?null:Fe.reduce((function(e,n,t){return e.push(n),t {\n const {\n classes,\n disableUnderline\n } = ownerState;\n const slots = {\n root: ['root', !disableUnderline && 'underline'],\n input: ['input']\n };\n const composedClasses = composeClasses(slots, getFilledInputUtilityClass, classes);\n return _extends({}, classes, composedClasses);\n};\n\nconst FilledInputRoot = styled(InputBaseRoot, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiFilledInput',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [...inputBaseRootOverridesResolver(props, styles), !ownerState.disableUnderline && styles.underline];\n }\n})(({\n theme,\n ownerState\n}) => {\n const light = theme.palette.mode === 'light';\n const bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';\n const backgroundColor = light ? 'rgba(0, 0, 0, 0.06)' : 'rgba(255, 255, 255, 0.09)';\n return _extends({\n position: 'relative',\n backgroundColor,\n borderTopLeftRadius: theme.shape.borderRadius,\n borderTopRightRadius: theme.shape.borderRadius,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n '&:hover': {\n backgroundColor: light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.13)',\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor\n }\n },\n [`&.${filledInputClasses.focused}`]: {\n backgroundColor\n },\n [`&.${filledInputClasses.disabled}`]: {\n backgroundColor: light ? 'rgba(0, 0, 0, 0.12)' : 'rgba(255, 255, 255, 0.12)'\n }\n }, !ownerState.disableUnderline && {\n '&:after': {\n borderBottom: `2px solid ${theme.palette[ownerState.color].main}`,\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\"',\n position: 'absolute',\n right: 0,\n transform: 'scaleX(0)',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n [`&.${filledInputClasses.focused}:after`]: {\n transform: 'scaleX(1)'\n },\n [`&.${filledInputClasses.error}:after`]: {\n borderBottomColor: theme.palette.error.main,\n transform: 'scaleX(1)' // error is always underlined in red\n\n },\n '&:before': {\n borderBottom: `1px solid ${bottomLineColor}`,\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\\\\00a0\"',\n position: 'absolute',\n right: 0,\n transition: theme.transitions.create('border-bottom-color', {\n duration: theme.transitions.duration.shorter\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n [`&:hover:not(.${filledInputClasses.disabled}):before`]: {\n borderBottom: `1px solid ${theme.palette.text.primary}`\n },\n [`&.${filledInputClasses.disabled}:before`]: {\n borderBottomStyle: 'dotted'\n }\n }, ownerState.startAdornment && {\n paddingLeft: 12\n }, ownerState.endAdornment && {\n paddingRight: 12\n }, ownerState.multiline && _extends({\n padding: '25px 12px 8px'\n }, ownerState.size === 'small' && {\n paddingTop: 21,\n paddingBottom: 4\n }, ownerState.hiddenLabel && {\n paddingTop: 16,\n paddingBottom: 17\n }));\n});\nconst FilledInputInput = styled(InputBaseInput, {\n name: 'MuiFilledInput',\n slot: 'Input',\n overridesResolver: inputBaseInputOverridesResolver\n})(({\n theme,\n ownerState\n}) => _extends({\n paddingTop: 25,\n paddingRight: 12,\n paddingBottom: 8,\n paddingLeft: 12,\n '&:-webkit-autofill': {\n WebkitBoxShadow: theme.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset',\n WebkitTextFillColor: theme.palette.mode === 'light' ? null : '#fff',\n caretColor: theme.palette.mode === 'light' ? null : '#fff',\n borderTopLeftRadius: 'inherit',\n borderTopRightRadius: 'inherit'\n }\n}, ownerState.size === 'small' && {\n paddingTop: 21,\n paddingBottom: 4\n}, ownerState.hiddenLabel && {\n paddingTop: 16,\n paddingBottom: 17\n}, ownerState.multiline && {\n paddingTop: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n paddingRight: 0\n}, ownerState.startAdornment && {\n paddingLeft: 0\n}, ownerState.endAdornment && {\n paddingRight: 0\n}, ownerState.hiddenLabel && ownerState.size === 'small' && {\n paddingTop: 8,\n paddingBottom: 9\n}));\nconst FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiFilledInput'\n });\n\n const {\n components = {},\n componentsProps: componentsPropsProp,\n fullWidth = false,\n // declare here to prevent spreading to DOM\n inputComponent = 'input',\n multiline = false,\n type = 'text'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n fullWidth,\n inputComponent,\n multiline,\n type\n });\n\n const classes = useUtilityClasses(props);\n const filledInputComponentsProps = {\n root: {\n ownerState\n },\n input: {\n ownerState\n }\n };\n const componentsProps = componentsPropsProp ? deepmerge(componentsPropsProp, filledInputComponentsProps) : filledInputComponentsProps;\n return /*#__PURE__*/_jsx(InputBase, _extends({\n components: _extends({\n Root: FilledInputRoot,\n Input: FilledInputInput\n }, components),\n componentsProps: componentsProps,\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type\n }, other, {\n classes: classes\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? FilledInput.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),\n\n /**\n * The components used for each slot inside the InputBase.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: PropTypes.shape({\n Input: PropTypes.elementType,\n Root: PropTypes.elementType\n }),\n\n /**\n * The props used for each slot inside the Input.\n * @default {}\n */\n componentsProps: PropTypes.shape({\n input: PropTypes.object,\n root: PropTypes.object\n }),\n\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the component is disabled.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the input will not have an underline.\n */\n disableUnderline: PropTypes.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n\n /**\n * If `true`, the `input` will indicate an error.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the `input` will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n\n /**\n * If `true`, the label is hidden.\n * This is used to increase density for a `FilledInput`.\n * Be sure to add `aria-label` to the `input` element.\n * @default false\n */\n hiddenLabel: PropTypes.bool,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n * @default 'input'\n */\n inputComponent: PropTypes.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n * @default {}\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If `true`, a `textarea` element is rendered.\n * @default false\n */\n multiline: PropTypes.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {React.ChangeEvent} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder: PropTypes.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * If `true`, the `input` element is required.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n required: PropTypes.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n * @default 'text'\n */\n type: PropTypes.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nFilledInput.muiName = 'Input';\nexport default FilledInput;","import { generateUtilityClasses, generateUtilityClass } from '@mui/base';\nexport function getFilledInputUtilityClass(slot) {\n return generateUtilityClass('MuiFilledInput', slot);\n}\nconst filledInputClasses = generateUtilityClasses('MuiFilledInput', ['root', 'colorSecondary', 'underline', 'focused', 'disabled', 'adornedStart', 'adornedEnd', 'error', 'sizeSmall', 'multiline', 'hiddenLabel', 'input', 'inputSizeSmall', 'inputHiddenLabel', 'inputMultiline', 'inputAdornedStart', 'inputAdornedEnd']);\nexport default filledInputClasses;","import { generateUtilityClasses, generateUtilityClass } from '@mui/base';\nexport function getFormControlUtilityClasses(slot) {\n return generateUtilityClass('MuiFormControl', slot);\n}\nconst formControlClasses = generateUtilityClasses('MuiFormControl', ['root', 'marginNone', 'marginNormal', 'marginDense', 'fullWidth', 'disabled']);\nexport default formControlClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"color\", \"component\", \"disabled\", \"error\", \"focused\", \"fullWidth\", \"hiddenLabel\", \"margin\", \"required\", \"size\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport useThemeProps from '../styles/useThemeProps';\nimport styled from '../styles/styled';\nimport { isFilled, isAdornedStart } from '../InputBase/utils';\nimport capitalize from '../utils/capitalize';\nimport isMuiElement from '../utils/isMuiElement';\nimport FormControlContext from './FormControlContext';\nimport { getFormControlUtilityClasses } from './formControlClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n margin,\n fullWidth\n } = ownerState;\n const slots = {\n root: ['root', margin !== 'none' && `margin${capitalize(margin)}`, fullWidth && 'fullWidth']\n };\n return composeClasses(slots, getFormControlUtilityClasses, classes);\n};\n\nconst FormControlRoot = styled('div', {\n name: 'MuiFormControl',\n slot: 'Root',\n overridesResolver: ({\n ownerState\n }, styles) => {\n return _extends({}, styles.root, styles[`margin${capitalize(ownerState.margin)}`], ownerState.fullWidth && styles.fullWidth);\n }\n})(({\n ownerState\n}) => _extends({\n display: 'inline-flex',\n flexDirection: 'column',\n position: 'relative',\n // Reset fieldset default style.\n minWidth: 0,\n padding: 0,\n margin: 0,\n border: 0,\n verticalAlign: 'top'\n}, ownerState.margin === 'normal' && {\n marginTop: 16,\n marginBottom: 8\n}, ownerState.margin === 'dense' && {\n marginTop: 8,\n marginBottom: 4\n}, ownerState.fullWidth && {\n width: '100%'\n}));\n/**\n * Provides context such as filled/focused/error/required for form inputs.\n * Relying on the context provides high flexibility and ensures that the state always stays\n * consistent across the children of the `FormControl`.\n * This context is used by the following components:\n *\n * - FormLabel\n * - FormHelperText\n * - Input\n * - InputLabel\n *\n * You can find one composition example below and more going to [the demos](/components/text-fields/#components).\n *\n * ```jsx\n * \n * Email address\n * \n * We'll never share your email.\n * \n * ```\n *\n * ⚠️ Only one `InputBase` can be used within a FormControl because it create visual inconsistencies.\n * For instance, only one input can be focused at the same time, the state shouldn't be shared.\n */\n\nconst FormControl = /*#__PURE__*/React.forwardRef(function FormControl(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiFormControl'\n });\n\n const {\n children,\n className,\n color = 'primary',\n component = 'div',\n disabled = false,\n error = false,\n focused: visuallyFocused,\n fullWidth = false,\n hiddenLabel = false,\n margin = 'none',\n required = false,\n size = 'medium',\n variant = 'outlined'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n color,\n component,\n disabled,\n error,\n fullWidth,\n hiddenLabel,\n margin,\n required,\n size,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n const [adornedStart, setAdornedStart] = React.useState(() => {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n let initialAdornedStart = false;\n\n if (children) {\n React.Children.forEach(children, child => {\n if (!isMuiElement(child, ['Input', 'Select'])) {\n return;\n }\n\n const input = isMuiElement(child, ['Select']) ? child.props.input : child;\n\n if (input && isAdornedStart(input.props)) {\n initialAdornedStart = true;\n }\n });\n }\n\n return initialAdornedStart;\n });\n const [filled, setFilled] = React.useState(() => {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n let initialFilled = false;\n\n if (children) {\n React.Children.forEach(children, child => {\n if (!isMuiElement(child, ['Input', 'Select'])) {\n return;\n }\n\n if (isFilled(child.props, true)) {\n initialFilled = true;\n }\n });\n }\n\n return initialFilled;\n });\n const [focusedState, setFocused] = React.useState(false);\n\n if (disabled && focusedState) {\n setFocused(false);\n }\n\n const focused = visuallyFocused !== undefined && !disabled ? visuallyFocused : focusedState;\n let registerEffect;\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const registeredInput = React.useRef(false);\n\n registerEffect = () => {\n if (registeredInput.current) {\n console.error(['MUI: There are multiple `InputBase` components inside a FormControl.', 'This creates visual inconsistencies, only use one `InputBase`.'].join('\\n'));\n }\n\n registeredInput.current = true;\n return () => {\n registeredInput.current = false;\n };\n };\n }\n\n const onFilled = React.useCallback(() => {\n setFilled(true);\n }, []);\n const onEmpty = React.useCallback(() => {\n setFilled(false);\n }, []);\n const childContext = {\n adornedStart,\n setAdornedStart,\n color,\n disabled,\n error,\n filled,\n focused,\n fullWidth,\n hiddenLabel,\n size,\n onBlur: () => {\n setFocused(false);\n },\n onEmpty,\n onFilled,\n onFocus: () => {\n setFocused(true);\n },\n registerEffect,\n required,\n variant\n };\n return /*#__PURE__*/_jsx(FormControlContext.Provider, {\n value: childContext,\n children: /*#__PURE__*/_jsx(FormControlRoot, _extends({\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref\n }, other, {\n children: children\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? FormControl.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * If `true`, the label, input and helper text should be displayed in a disabled state.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the label is displayed in an error state.\n * @default false\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the component is displayed in focused state.\n */\n focused: PropTypes.bool,\n\n /**\n * If `true`, the component will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n\n /**\n * If `true`, the label is hidden.\n * This is used to increase density for a `FilledInput`.\n * Be sure to add `aria-label` to the `input` element.\n * @default false\n */\n hiddenLabel: PropTypes.bool,\n\n /**\n * If `dense` or `normal`, will adjust vertical spacing of this and contained components.\n * @default 'none'\n */\n margin: PropTypes.oneOf(['dense', 'none', 'normal']),\n\n /**\n * If `true`, the label will indicate that the `input` is required.\n * @default false\n */\n required: PropTypes.bool,\n\n /**\n * The size of the component.\n * @default 'medium'\n */\n size: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n\n /**\n * The variant to use.\n * @default 'outlined'\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default FormControl;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"disableUnderline\", \"components\", \"componentsProps\", \"fullWidth\", \"inputComponent\", \"multiline\", \"type\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport { refType, deepmerge } from '@mui/utils';\nimport InputBase from '../InputBase';\nimport styled, { rootShouldForwardProp } from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport inputClasses, { getInputUtilityClass } from './inputClasses';\nimport { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseComponent as InputBaseInput } from '../InputBase/InputBase';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableUnderline\n } = ownerState;\n const slots = {\n root: ['root', !disableUnderline && 'underline'],\n input: ['input']\n };\n const composedClasses = composeClasses(slots, getInputUtilityClass, classes);\n return _extends({}, classes, composedClasses);\n};\n\nconst InputRoot = styled(InputBaseRoot, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiInput',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [...inputBaseRootOverridesResolver(props, styles), !ownerState.disableUnderline && styles.underline];\n }\n})(({\n theme,\n ownerState\n}) => {\n const light = theme.palette.mode === 'light';\n const bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';\n return _extends({\n position: 'relative'\n }, ownerState.formControl && {\n 'label + &': {\n marginTop: 16\n }\n }, !ownerState.disableUnderline && {\n '&:after': {\n borderBottom: `2px solid ${theme.palette[ownerState.color].main}`,\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\"',\n position: 'absolute',\n right: 0,\n transform: 'scaleX(0)',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n [`&.${inputClasses.focused}:after`]: {\n transform: 'scaleX(1)'\n },\n [`&.${inputClasses.error}:after`]: {\n borderBottomColor: theme.palette.error.main,\n transform: 'scaleX(1)' // error is always underlined in red\n\n },\n '&:before': {\n borderBottom: `1px solid ${bottomLineColor}`,\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\\\\00a0\"',\n position: 'absolute',\n right: 0,\n transition: theme.transitions.create('border-bottom-color', {\n duration: theme.transitions.duration.shorter\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n [`&:hover:not(.${inputClasses.disabled}):before`]: {\n borderBottom: `2px solid ${theme.palette.text.primary}`,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n borderBottom: `1px solid ${bottomLineColor}`\n }\n },\n [`&.${inputClasses.disabled}:before`]: {\n borderBottomStyle: 'dotted'\n }\n });\n});\nconst InputInput = styled(InputBaseInput, {\n name: 'MuiInput',\n slot: 'Input',\n overridesResolver: inputBaseInputOverridesResolver\n})({});\nconst Input = /*#__PURE__*/React.forwardRef(function Input(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiInput'\n });\n\n const {\n disableUnderline,\n components = {},\n componentsProps: componentsPropsProp,\n fullWidth = false,\n inputComponent = 'input',\n multiline = false,\n type = 'text'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const classes = useUtilityClasses(props);\n const ownerState = {\n disableUnderline\n };\n const inputComponentsProps = {\n root: {\n ownerState\n }\n };\n const componentsProps = componentsPropsProp ? deepmerge(componentsPropsProp, inputComponentsProps) : inputComponentsProps;\n return /*#__PURE__*/_jsx(InputBase, _extends({\n components: _extends({\n Root: InputRoot,\n Input: InputInput\n }, components),\n componentsProps: componentsProps,\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type\n }, other, {\n classes: classes\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Input.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),\n\n /**\n * The components used for each slot inside the InputBase.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: PropTypes.shape({\n Input: PropTypes.elementType,\n Root: PropTypes.elementType\n }),\n\n /**\n * The props used for each slot inside the Input.\n * @default {}\n */\n componentsProps: PropTypes.shape({\n input: PropTypes.object,\n root: PropTypes.object\n }),\n\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the component is disabled.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the `input` will not have an underline.\n */\n disableUnderline: PropTypes.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n\n /**\n * If `true`, the `input` will indicate an error.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the `input` will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n * @default 'input'\n */\n inputComponent: PropTypes.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n * @default {}\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If `true`, a `textarea` element is rendered.\n * @default false\n */\n multiline: PropTypes.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {React.ChangeEvent} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder: PropTypes.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * If `true`, the `input` element is required.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n required: PropTypes.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n * @default 'text'\n */\n type: PropTypes.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nInput.muiName = 'Input';\nexport default Input;","import { generateUtilityClasses, generateUtilityClass } from '@mui/base';\nexport function getInputUtilityClass(slot) {\n return generateUtilityClass('MuiInput', slot);\n}\nconst inputClasses = generateUtilityClasses('MuiInput', ['root', 'formControl', 'focused', 'disabled', 'colorSecondary', 'underline', 'error', 'sizeSmall', 'multiline', 'fullWidth', 'input', 'inputSizeSmall', 'inputMultiline', 'inputTypeSearch']);\nexport default inputClasses;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onChange\", \"maxRows\", \"minRows\", \"style\", \"value\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_debounce as debounce, unstable_useForkRef as useForkRef, unstable_useEnhancedEffect as useEnhancedEffect, unstable_ownerWindow as ownerWindow } from '@mui/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nfunction getStyleValue(computedStyle, property) {\n return parseInt(computedStyle[property], 10) || 0;\n}\n\nconst styles = {\n shadow: {\n // Visibility needed to hide the extra text area on iPads\n visibility: 'hidden',\n // Remove from the content flow\n position: 'absolute',\n // Ignore the scrollbar width\n overflow: 'hidden',\n height: 0,\n top: 0,\n left: 0,\n // Create a new layer, increase the isolation of the computed values\n transform: 'translateZ(0)'\n }\n};\nconst TextareaAutosize = /*#__PURE__*/React.forwardRef(function TextareaAutosize(props, ref) {\n const {\n onChange,\n maxRows,\n minRows = 1,\n style,\n value\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const {\n current: isControlled\n } = React.useRef(value != null);\n const inputRef = React.useRef(null);\n const handleRef = useForkRef(ref, inputRef);\n const shadowRef = React.useRef(null);\n const renders = React.useRef(0);\n const [state, setState] = React.useState({});\n const syncHeight = React.useCallback(() => {\n const input = inputRef.current;\n const containerWindow = ownerWindow(input);\n const computedStyle = containerWindow.getComputedStyle(input); // If input's width is shrunk and it's not visible, don't sync height.\n\n if (computedStyle.width === '0px') {\n return;\n }\n\n const inputShallow = shadowRef.current;\n inputShallow.style.width = computedStyle.width;\n inputShallow.value = input.value || props.placeholder || 'x';\n\n if (inputShallow.value.slice(-1) === '\\n') {\n // Certain fonts which overflow the line height will cause the textarea\n // to report a different scrollHeight depending on whether the last line\n // is empty. Make it non-empty to avoid this issue.\n inputShallow.value += ' ';\n }\n\n const boxSizing = computedStyle['box-sizing'];\n const padding = getStyleValue(computedStyle, 'padding-bottom') + getStyleValue(computedStyle, 'padding-top');\n const border = getStyleValue(computedStyle, 'border-bottom-width') + getStyleValue(computedStyle, 'border-top-width'); // The height of the inner content\n\n const innerHeight = inputShallow.scrollHeight; // Measure height of a textarea with a single row\n\n inputShallow.value = 'x';\n const singleRowHeight = inputShallow.scrollHeight; // The height of the outer content\n\n let outerHeight = innerHeight;\n\n if (minRows) {\n outerHeight = Math.max(Number(minRows) * singleRowHeight, outerHeight);\n }\n\n if (maxRows) {\n outerHeight = Math.min(Number(maxRows) * singleRowHeight, outerHeight);\n }\n\n outerHeight = Math.max(outerHeight, singleRowHeight); // Take the box sizing into account for applying this value as a style.\n\n const outerHeightStyle = outerHeight + (boxSizing === 'border-box' ? padding + border : 0);\n const overflow = Math.abs(outerHeight - innerHeight) <= 1;\n setState(prevState => {\n // Need a large enough difference to update the height.\n // This prevents infinite rendering loop.\n if (renders.current < 20 && (outerHeightStyle > 0 && Math.abs((prevState.outerHeightStyle || 0) - outerHeightStyle) > 1 || prevState.overflow !== overflow)) {\n renders.current += 1;\n return {\n overflow,\n outerHeightStyle\n };\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (renders.current === 20) {\n console.error(['MUI: Too many re-renders. The layout is unstable.', 'TextareaAutosize limits the number of renders to prevent an infinite loop.'].join('\\n'));\n }\n }\n\n return prevState;\n });\n }, [maxRows, minRows, props.placeholder]);\n React.useEffect(() => {\n const handleResize = debounce(() => {\n renders.current = 0;\n syncHeight();\n });\n const containerWindow = ownerWindow(inputRef.current);\n containerWindow.addEventListener('resize', handleResize);\n let resizeObserver;\n\n if (typeof ResizeObserver !== 'undefined') {\n resizeObserver = new ResizeObserver(handleResize);\n resizeObserver.observe(inputRef.current);\n }\n\n return () => {\n handleResize.clear();\n containerWindow.removeEventListener('resize', handleResize);\n\n if (resizeObserver) {\n resizeObserver.disconnect();\n }\n };\n }, [syncHeight]);\n useEnhancedEffect(() => {\n syncHeight();\n });\n React.useEffect(() => {\n renders.current = 0;\n }, [value]);\n\n const handleChange = event => {\n renders.current = 0;\n\n if (!isControlled) {\n syncHeight();\n }\n\n if (onChange) {\n onChange(event);\n }\n };\n\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"textarea\", _extends({\n value: value,\n onChange: handleChange,\n ref: handleRef // Apply the rows prop to get a \"correct\" first SSR paint\n ,\n rows: minRows,\n style: _extends({\n height: state.outerHeightStyle,\n // Need a large enough difference to allow scrolling.\n // This prevents infinite rendering loop.\n overflow: state.overflow ? 'hidden' : null\n }, style)\n }, other)), /*#__PURE__*/_jsx(\"textarea\", {\n \"aria-hidden\": true,\n className: props.className,\n readOnly: true,\n ref: shadowRef,\n tabIndex: -1,\n style: _extends({}, styles.shadow, style, {\n padding: 0\n })\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? TextareaAutosize.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Maximum number of rows to display.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display.\n * @default 1\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * @ignore\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n placeholder: PropTypes.string,\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * @ignore\n */\n value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.number, PropTypes.string])\n} : void 0;\nexport default TextareaAutosize;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@mui/utils\";\nconst _excluded = [\"aria-describedby\", \"autoComplete\", \"autoFocus\", \"className\", \"color\", \"components\", \"componentsProps\", \"defaultValue\", \"disabled\", \"disableInjectingGlobalStyles\", \"endAdornment\", \"error\", \"fullWidth\", \"id\", \"inputComponent\", \"inputProps\", \"inputRef\", \"margin\", \"maxRows\", \"minRows\", \"multiline\", \"name\", \"onBlur\", \"onChange\", \"onClick\", \"onFocus\", \"onKeyDown\", \"onKeyUp\", \"placeholder\", \"readOnly\", \"renderSuffix\", \"rows\", \"size\", \"startAdornment\", \"type\", \"value\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType, elementTypeAcceptingRef } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses, isHostComponent, TextareaAutosize } from '@mui/base';\nimport formControlState from '../FormControl/formControlState';\nimport FormControlContext from '../FormControl/FormControlContext';\nimport useFormControl from '../FormControl/useFormControl';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport capitalize from '../utils/capitalize';\nimport useForkRef from '../utils/useForkRef';\nimport useEnhancedEffect from '../utils/useEnhancedEffect';\nimport GlobalStyles from '../GlobalStyles';\nimport { isFilled } from './utils';\nimport inputBaseClasses, { getInputBaseUtilityClass } from './inputBaseClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const rootOverridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.formControl && styles.formControl, ownerState.startAdornment && styles.adornedStart, ownerState.endAdornment && styles.adornedEnd, ownerState.error && styles.error, ownerState.size === 'small' && styles.sizeSmall, ownerState.multiline && styles.multiline, ownerState.color && styles[`color${capitalize(ownerState.color)}`], ownerState.fullWidth && styles.fullWidth, ownerState.hiddenLabel && styles.hiddenLabel];\n};\nexport const inputOverridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.input, ownerState.size === 'small' && styles.inputSizeSmall, ownerState.multiline && styles.inputMultiline, ownerState.type === 'search' && styles.inputTypeSearch, ownerState.startAdornment && styles.inputAdornedStart, ownerState.endAdornment && styles.inputAdornedEnd, ownerState.hiddenLabel && styles.inputHiddenLabel];\n};\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n color,\n disabled,\n error,\n endAdornment,\n focused,\n formControl,\n fullWidth,\n hiddenLabel,\n multiline,\n size,\n startAdornment,\n type\n } = ownerState;\n const slots = {\n root: ['root', `color${capitalize(color)}`, disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size === 'small' && 'sizeSmall', multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel'],\n input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd']\n };\n return composeClasses(slots, getInputBaseUtilityClass, classes);\n};\n\nexport const InputBaseRoot = styled('div', {\n name: 'MuiInputBase',\n slot: 'Root',\n overridesResolver: rootOverridesResolver\n})(({\n theme,\n ownerState\n}) => _extends({}, theme.typography.body1, {\n color: theme.palette.text.primary,\n lineHeight: '1.4375em',\n // 23px\n boxSizing: 'border-box',\n // Prevent padding issue with fullWidth.\n position: 'relative',\n cursor: 'text',\n display: 'inline-flex',\n alignItems: 'center',\n [`&.${inputBaseClasses.disabled}`]: {\n color: theme.palette.text.disabled,\n cursor: 'default'\n }\n}, ownerState.multiline && _extends({\n padding: '4px 0 5px'\n}, ownerState.size === 'small' && {\n paddingTop: 1\n}), ownerState.fullWidth && {\n width: '100%'\n}));\nexport const InputBaseComponent = styled('input', {\n name: 'MuiInputBase',\n slot: 'Input',\n overridesResolver: inputOverridesResolver\n})(({\n theme,\n ownerState\n}) => {\n const light = theme.palette.mode === 'light';\n const placeholder = {\n color: 'currentColor',\n opacity: light ? 0.42 : 0.5,\n transition: theme.transitions.create('opacity', {\n duration: theme.transitions.duration.shorter\n })\n };\n const placeholderHidden = {\n opacity: '0 !important'\n };\n const placeholderVisible = {\n opacity: light ? 0.42 : 0.5\n };\n return _extends({\n font: 'inherit',\n letterSpacing: 'inherit',\n color: 'currentColor',\n padding: '4px 0 5px',\n border: 0,\n boxSizing: 'content-box',\n background: 'none',\n height: '1.4375em',\n // Reset 23pxthe native input line-height\n margin: 0,\n // Reset for Safari\n WebkitTapHighlightColor: 'transparent',\n display: 'block',\n // Make the flex item shrink with Firefox\n minWidth: 0,\n width: '100%',\n // Fix IE11 width issue\n animationName: 'mui-auto-fill-cancel',\n animationDuration: '10ms',\n '&::-webkit-input-placeholder': placeholder,\n '&::-moz-placeholder': placeholder,\n // Firefox 19+\n '&:-ms-input-placeholder': placeholder,\n // IE11\n '&::-ms-input-placeholder': placeholder,\n // Edge\n '&:focus': {\n outline: 0\n },\n // Reset Firefox invalid required input style\n '&:invalid': {\n boxShadow: 'none'\n },\n '&::-webkit-search-decoration': {\n // Remove the padding when type=search.\n WebkitAppearance: 'none'\n },\n // Show and hide the placeholder logic\n [`label[data-shrink=false] + .${inputBaseClasses.formControl} &`]: {\n '&::-webkit-input-placeholder': placeholderHidden,\n '&::-moz-placeholder': placeholderHidden,\n // Firefox 19+\n '&:-ms-input-placeholder': placeholderHidden,\n // IE11\n '&::-ms-input-placeholder': placeholderHidden,\n // Edge\n '&:focus::-webkit-input-placeholder': placeholderVisible,\n '&:focus::-moz-placeholder': placeholderVisible,\n // Firefox 19+\n '&:focus:-ms-input-placeholder': placeholderVisible,\n // IE11\n '&:focus::-ms-input-placeholder': placeholderVisible // Edge\n\n },\n [`&.${inputBaseClasses.disabled}`]: {\n opacity: 1,\n // Reset iOS opacity\n WebkitTextFillColor: theme.palette.text.disabled // Fix opacity Safari bug\n\n },\n '&:-webkit-autofill': {\n animationDuration: '5000s',\n animationName: 'mui-auto-fill'\n }\n }, ownerState.size === 'small' && {\n paddingTop: 1\n }, ownerState.multiline && {\n height: 'auto',\n resize: 'none',\n padding: 0,\n paddingTop: 0\n }, ownerState.type === 'search' && {\n // Improve type search style.\n MozAppearance: 'textfield'\n });\n});\n\nconst inputGlobalStyles = /*#__PURE__*/_jsx(GlobalStyles, {\n styles: {\n '@keyframes mui-auto-fill': {\n from: {\n display: 'block'\n }\n },\n '@keyframes mui-auto-fill-cancel': {\n from: {\n display: 'block'\n }\n }\n }\n});\n/**\n * `InputBase` contains as few styles as possible.\n * It aims to be a simple building block for creating an input.\n * It contains a load of style reset and some state logic.\n */\n\n\nconst InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiInputBase'\n });\n\n const {\n 'aria-describedby': ariaDescribedby,\n autoComplete,\n autoFocus,\n className,\n components = {},\n componentsProps = {},\n defaultValue,\n disabled,\n disableInjectingGlobalStyles,\n endAdornment,\n fullWidth = false,\n id,\n inputComponent = 'input',\n inputProps: inputPropsProp = {},\n inputRef: inputRefProp,\n maxRows,\n minRows,\n multiline = false,\n name,\n onBlur,\n onChange,\n onClick,\n onFocus,\n onKeyDown,\n onKeyUp,\n placeholder,\n readOnly,\n renderSuffix,\n rows,\n startAdornment,\n type = 'text',\n value: valueProp\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const value = inputPropsProp.value != null ? inputPropsProp.value : valueProp;\n const {\n current: isControlled\n } = React.useRef(value != null);\n const inputRef = React.useRef();\n const handleInputRefWarning = React.useCallback(instance => {\n if (process.env.NODE_ENV !== 'production') {\n if (instance && instance.nodeName !== 'INPUT' && !instance.focus) {\n console.error(['MUI: You have provided a `inputComponent` to the input component', 'that does not correctly handle the `ref` prop.', 'Make sure the `ref` prop is called with a HTMLInputElement.'].join('\\n'));\n }\n }\n }, []);\n const handleInputPropsRefProp = useForkRef(inputPropsProp.ref, handleInputRefWarning);\n const handleInputRefProp = useForkRef(inputRefProp, handleInputPropsRefProp);\n const handleInputRef = useForkRef(inputRef, handleInputRefProp);\n const [focused, setFocused] = React.useState(false);\n const muiFormControl = useFormControl();\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (muiFormControl) {\n return muiFormControl.registerEffect();\n }\n\n return undefined;\n }, [muiFormControl]);\n }\n\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['color', 'disabled', 'error', 'hiddenLabel', 'size', 'required', 'filled']\n });\n fcs.focused = muiFormControl ? muiFormControl.focused : focused; // The blur won't fire when the disabled state is set on a focused input.\n // We need to book keep the focused state manually.\n\n React.useEffect(() => {\n if (!muiFormControl && disabled && focused) {\n setFocused(false);\n\n if (onBlur) {\n onBlur();\n }\n }\n }, [muiFormControl, disabled, focused, onBlur]);\n const onFilled = muiFormControl && muiFormControl.onFilled;\n const onEmpty = muiFormControl && muiFormControl.onEmpty;\n const checkDirty = React.useCallback(obj => {\n if (isFilled(obj)) {\n if (onFilled) {\n onFilled();\n }\n } else if (onEmpty) {\n onEmpty();\n }\n }, [onFilled, onEmpty]);\n useEnhancedEffect(() => {\n if (isControlled) {\n checkDirty({\n value\n });\n }\n }, [value, checkDirty, isControlled]);\n\n const handleFocus = event => {\n // Fix a bug with IE11 where the focus/blur events are triggered\n // while the component is disabled.\n if (fcs.disabled) {\n event.stopPropagation();\n return;\n }\n\n if (onFocus) {\n onFocus(event);\n }\n\n if (inputPropsProp.onFocus) {\n inputPropsProp.onFocus(event);\n }\n\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n } else {\n setFocused(true);\n }\n };\n\n const handleBlur = event => {\n if (onBlur) {\n onBlur(event);\n }\n\n if (inputPropsProp.onBlur) {\n inputPropsProp.onBlur(event);\n }\n\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n } else {\n setFocused(false);\n }\n };\n\n const handleChange = (event, ...args) => {\n if (!isControlled) {\n const element = event.target || inputRef.current;\n\n if (element == null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: Expected valid input target. Did you use a custom \\`inputComponent\\` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.` : _formatMuiErrorMessage(1));\n }\n\n checkDirty({\n value: element.value\n });\n }\n\n if (inputPropsProp.onChange) {\n inputPropsProp.onChange(event, ...args);\n } // Perform in the willUpdate\n\n\n if (onChange) {\n onChange(event, ...args);\n }\n }; // Check the input state on mount, in case it was filled by the user\n // or auto filled by the browser before the hydration (for SSR).\n\n\n React.useEffect(() => {\n checkDirty(inputRef.current); // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const handleClick = event => {\n if (inputRef.current && event.currentTarget === event.target) {\n inputRef.current.focus();\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n let InputComponent = inputComponent;\n let inputProps = inputPropsProp;\n\n if (multiline && InputComponent === 'input') {\n if (rows) {\n if (process.env.NODE_ENV !== 'production') {\n if (minRows || maxRows) {\n console.warn('MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set.');\n }\n }\n\n inputProps = _extends({\n type: undefined,\n minRows: rows,\n maxRows: rows\n }, inputProps);\n } else {\n inputProps = _extends({\n type: undefined,\n maxRows,\n minRows\n }, inputProps);\n }\n\n InputComponent = TextareaAutosize;\n }\n\n const handleAutoFill = event => {\n // Provide a fake value as Chrome might not let you access it for security reasons.\n checkDirty(event.animationName === 'mui-auto-fill-cancel' ? inputRef.current : {\n value: 'x'\n });\n };\n\n React.useEffect(() => {\n if (muiFormControl) {\n muiFormControl.setAdornedStart(Boolean(startAdornment));\n }\n }, [muiFormControl, startAdornment]);\n\n const ownerState = _extends({}, props, {\n color: fcs.color || 'primary',\n disabled: fcs.disabled,\n endAdornment,\n error: fcs.error,\n focused: fcs.focused,\n formControl: muiFormControl,\n fullWidth,\n hiddenLabel: fcs.hiddenLabel,\n multiline,\n size: fcs.size,\n startAdornment,\n type\n });\n\n const classes = useUtilityClasses(ownerState);\n const Root = components.Root || InputBaseRoot;\n const rootProps = componentsProps.root || {};\n const Input = components.Input || InputBaseComponent;\n inputProps = _extends({}, inputProps, componentsProps.input);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [!disableInjectingGlobalStyles && inputGlobalStyles, /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, !isHostComponent(Root) && {\n ownerState: _extends({}, ownerState, rootProps.ownerState)\n }, {\n ref: ref,\n onClick: handleClick\n }, other, {\n className: clsx(classes.root, rootProps.className, className),\n children: [startAdornment, /*#__PURE__*/_jsx(FormControlContext.Provider, {\n value: null,\n children: /*#__PURE__*/_jsx(Input, _extends({\n ownerState: ownerState,\n \"aria-invalid\": fcs.error,\n \"aria-describedby\": ariaDescribedby,\n autoComplete: autoComplete,\n autoFocus: autoFocus,\n defaultValue: defaultValue,\n disabled: fcs.disabled,\n id: id,\n onAnimationStart: handleAutoFill,\n name: name,\n placeholder: placeholder,\n readOnly: readOnly,\n required: fcs.required,\n rows: rows,\n value: value,\n onKeyDown: onKeyDown,\n onKeyUp: onKeyUp,\n type: type\n }, inputProps, !isHostComponent(Input) && {\n as: InputComponent,\n ownerState: _extends({}, ownerState, inputProps.ownerState)\n }, {\n ref: handleInputRef,\n className: clsx(classes.input, inputProps.className),\n onBlur: handleBlur,\n onChange: handleChange,\n onFocus: handleFocus\n }))\n }), endAdornment, renderSuffix ? renderSuffix(_extends({}, fcs, {\n startAdornment\n })) : null]\n }))]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? InputBase.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n 'aria-describedby': PropTypes.string,\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n\n /**\n * The components used for each slot inside the InputBase.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: PropTypes.shape({\n Input: PropTypes.elementType,\n Root: PropTypes.elementType\n }),\n\n /**\n * The props used for each slot inside the Input.\n * @default {}\n */\n componentsProps: PropTypes.shape({\n input: PropTypes.object,\n root: PropTypes.object\n }),\n\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the component is disabled.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, GlobalStyles for the auto-fill keyframes will not be injected/removed on mount/unmount. Make sure to inject them at the top of your application.\n * This option is intended to help with boosting the initial rendering performance if you are loading a big amount of Input components at once.\n * @default false\n */\n disableInjectingGlobalStyles: PropTypes.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n\n /**\n * If `true`, the `input` will indicate an error.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the `input` will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n * @default 'input'\n */\n inputComponent: elementTypeAcceptingRef,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n * @default {}\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If `true`, a `textarea` element is rendered.\n * @default false\n */\n multiline: PropTypes.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the `input` is blurred.\n *\n * Notice that the first argument (event) might be undefined.\n */\n onBlur: PropTypes.func,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {React.ChangeEvent} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyUp: PropTypes.func,\n\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder: PropTypes.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * @ignore\n */\n renderSuffix: PropTypes.func,\n\n /**\n * If `true`, the `input` element is required.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n required: PropTypes.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * The size of the component.\n */\n size: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n * @default 'text'\n */\n type: PropTypes.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nexport default InputBase;","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getInputBaseUtilityClass(slot) {\n return generateUtilityClass('MuiInputBase', slot);\n}\nconst inputBaseClasses = generateUtilityClasses('MuiInputBase', ['root', 'formControl', 'focused', 'disabled', 'adornedStart', 'adornedEnd', 'error', 'sizeSmall', 'multiline', 'colorSecondary', 'fullWidth', 'hiddenLabel', 'input', 'inputSizeSmall', 'inputMultiline', 'inputTypeSearch', 'inputAdornedStart', 'inputAdornedEnd', 'inputHiddenLabel']);\nexport default inputBaseClasses;","// Supports determination of isControlled().\n// Controlled input accepts its current value as a prop.\n//\n// @see https://facebook.github.io/react/docs/forms.html#controlled-components\n// @param value\n// @returns {boolean} true if string (including '') or number (including zero)\nexport function hasValue(value) {\n return value != null && !(Array.isArray(value) && value.length === 0);\n} // Determine if field is empty or filled.\n// Response determines if label is presented above field or as placeholder.\n//\n// @param obj\n// @param SSR\n// @returns {boolean} False when not present or empty string.\n// True when any number or string with length.\n\nexport function isFilled(obj, SSR = false) {\n return obj && (hasValue(obj.value) && obj.value !== '' || SSR && hasValue(obj.defaultValue) && obj.defaultValue !== '');\n} // Determine if an Input is adorned on start.\n// It's corresponding to the left with LTR.\n//\n// @param obj\n// @returns {boolean} False when no adornments.\n// True when adorned at the start.\n\nexport function isAdornedStart(obj) {\n return obj.startAdornment;\n}","import { unstable_getScrollbarSize as getScrollbarSize } from '@mui/utils';\nexport default getScrollbarSize;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"actions\", \"autoFocus\", \"autoFocusItem\", \"children\", \"className\", \"disabledItemsFocusable\", \"disableListWrap\", \"onKeyDown\", \"variant\"];\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport ownerDocument from '../utils/ownerDocument';\nimport List from '../List';\nimport getScrollbarSize from '../utils/getScrollbarSize';\nimport useForkRef from '../utils/useForkRef';\nimport useEnhancedEffect from '../utils/useEnhancedEffect';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nfunction nextItem(list, item, disableListWrap) {\n if (list === item) {\n return list.firstChild;\n }\n\n if (item && item.nextElementSibling) {\n return item.nextElementSibling;\n }\n\n return disableListWrap ? null : list.firstChild;\n}\n\nfunction previousItem(list, item, disableListWrap) {\n if (list === item) {\n return disableListWrap ? list.firstChild : list.lastChild;\n }\n\n if (item && item.previousElementSibling) {\n return item.previousElementSibling;\n }\n\n return disableListWrap ? null : list.lastChild;\n}\n\nfunction textCriteriaMatches(nextFocus, textCriteria) {\n if (textCriteria === undefined) {\n return true;\n }\n\n let text = nextFocus.innerText;\n\n if (text === undefined) {\n // jsdom doesn't support innerText\n text = nextFocus.textContent;\n }\n\n text = text.trim().toLowerCase();\n\n if (text.length === 0) {\n return false;\n }\n\n if (textCriteria.repeating) {\n return text[0] === textCriteria.keys[0];\n }\n\n return text.indexOf(textCriteria.keys.join('')) === 0;\n}\n\nfunction moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, traversalFunction, textCriteria) {\n let wrappedOnce = false;\n let nextFocus = traversalFunction(list, currentFocus, currentFocus ? disableListWrap : false);\n\n while (nextFocus) {\n // Prevent infinite loop.\n if (nextFocus === list.firstChild) {\n if (wrappedOnce) {\n return false;\n }\n\n wrappedOnce = true;\n } // Same logic as useAutocomplete.js\n\n\n const nextFocusDisabled = disabledItemsFocusable ? false : nextFocus.disabled || nextFocus.getAttribute('aria-disabled') === 'true';\n\n if (!nextFocus.hasAttribute('tabindex') || !textCriteriaMatches(nextFocus, textCriteria) || nextFocusDisabled) {\n // Move to the next element.\n nextFocus = traversalFunction(list, nextFocus, disableListWrap);\n } else {\n nextFocus.focus();\n return true;\n }\n }\n\n return false;\n}\n/**\n * A permanently displayed menu following https://www.w3.org/TR/wai-aria-practices/#menubutton.\n * It's exposed to help customization of the [`Menu`](/api/menu/) component if you\n * use it separately you need to move focus into the component manually. Once\n * the focus is placed inside the component it is fully keyboard accessible.\n */\n\n\nconst MenuList = /*#__PURE__*/React.forwardRef(function MenuList(props, ref) {\n const {\n // private\n // eslint-disable-next-line react/prop-types\n actions,\n autoFocus = false,\n autoFocusItem = false,\n children,\n className,\n disabledItemsFocusable = false,\n disableListWrap = false,\n onKeyDown,\n variant = 'selectedMenu'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const listRef = React.useRef(null);\n const textCriteriaRef = React.useRef({\n keys: [],\n repeating: true,\n previousKeyMatched: true,\n lastTime: null\n });\n useEnhancedEffect(() => {\n if (autoFocus) {\n listRef.current.focus();\n }\n }, [autoFocus]);\n React.useImperativeHandle(actions, () => ({\n adjustStyleForScrollbar: (containerElement, theme) => {\n // Let's ignore that piece of logic if users are already overriding the width\n // of the menu.\n const noExplicitWidth = !listRef.current.style.width;\n\n if (containerElement.clientHeight < listRef.current.clientHeight && noExplicitWidth) {\n const scrollbarSize = `${getScrollbarSize(ownerDocument(containerElement))}px`;\n listRef.current.style[theme.direction === 'rtl' ? 'paddingLeft' : 'paddingRight'] = scrollbarSize;\n listRef.current.style.width = `calc(100% + ${scrollbarSize})`;\n }\n\n return listRef.current;\n }\n }), []);\n\n const handleKeyDown = event => {\n const list = listRef.current;\n const key = event.key;\n /**\n * @type {Element} - will always be defined since we are in a keydown handler\n * attached to an element. A keydown event is either dispatched to the activeElement\n * or document.body or document.documentElement. Only the first case will\n * trigger this specific handler.\n */\n\n const currentFocus = ownerDocument(list).activeElement;\n\n if (key === 'ArrowDown') {\n // Prevent scroll of the page\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'ArrowUp') {\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key === 'Home') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'End') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key.length === 1) {\n const criteria = textCriteriaRef.current;\n const lowerKey = key.toLowerCase();\n const currTime = performance.now();\n\n if (criteria.keys.length > 0) {\n // Reset\n if (currTime - criteria.lastTime > 500) {\n criteria.keys = [];\n criteria.repeating = true;\n criteria.previousKeyMatched = true;\n } else if (criteria.repeating && lowerKey !== criteria.keys[0]) {\n criteria.repeating = false;\n }\n }\n\n criteria.lastTime = currTime;\n criteria.keys.push(lowerKey);\n const keepFocusOnCurrent = currentFocus && !criteria.repeating && textCriteriaMatches(currentFocus, criteria);\n\n if (criteria.previousKeyMatched && (keepFocusOnCurrent || moveFocus(list, currentFocus, false, disabledItemsFocusable, nextItem, criteria))) {\n event.preventDefault();\n } else {\n criteria.previousKeyMatched = false;\n }\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n\n const handleRef = useForkRef(listRef, ref);\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n\n let activeItemIndex = -1; // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n\n React.Children.forEach(children, (child, index) => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n });\n const items = React.Children.map(children, (child, index) => {\n if (index === activeItemIndex) {\n const newChildProps = {};\n\n if (autoFocusItem) {\n newChildProps.autoFocus = true;\n }\n\n if (child.props.tabIndex === undefined && variant === 'selectedMenu') {\n newChildProps.tabIndex = 0;\n }\n\n return /*#__PURE__*/React.cloneElement(child, newChildProps);\n }\n\n return child;\n });\n return /*#__PURE__*/_jsx(List, _extends({\n role: \"menu\",\n ref: handleRef,\n className: className,\n onKeyDown: handleKeyDown,\n tabIndex: autoFocus ? 0 : -1\n }, other, {\n children: items\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuList.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, will focus the `[role=\"menu\"]` container and move into tab order.\n * @default false\n */\n autoFocus: PropTypes.bool,\n\n /**\n * If `true`, will focus the first menuitem if `variant=\"menu\"` or selected item\n * if `variant=\"selectedMenu\"`.\n * @default false\n */\n autoFocusItem: PropTypes.bool,\n\n /**\n * MenuList contents, normally `MenuItem`s.\n */\n children: PropTypes.node,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, will allow focus on disabled items.\n * @default false\n */\n disabledItemsFocusable: PropTypes.bool,\n\n /**\n * If `true`, the menu items will not wrap focus.\n * @default false\n */\n disableListWrap: PropTypes.bool,\n\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus\n * and the vertical alignment relative to the anchor element.\n * @default 'selectedMenu'\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default MenuList;","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getMenuUtilityClass(slot) {\n return generateUtilityClass('MuiMenu', slot);\n}\nconst menuClasses = generateUtilityClasses('MuiMenu', ['root', 'paper', 'list']);\nexport default menuClasses;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onEntering\"],\n _excluded2 = [\"autoFocus\", \"children\", \"disableAutoFocusItem\", \"MenuListProps\", \"onClose\", \"open\", \"PaperProps\", \"PopoverClasses\", \"transitionDuration\", \"TransitionProps\", \"variant\"];\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport { HTMLElementType } from '@mui/utils';\nimport MenuList from '../MenuList';\nimport Paper from '../Paper';\nimport Popover from '../Popover';\nimport styled, { rootShouldForwardProp } from '../styles/styled';\nimport useTheme from '../styles/useTheme';\nimport useThemeProps from '../styles/useThemeProps';\nimport { getMenuUtilityClass } from './menuClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst RTL_ORIGIN = {\n vertical: 'top',\n horizontal: 'right'\n};\nconst LTR_ORIGIN = {\n vertical: 'top',\n horizontal: 'left'\n};\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n paper: ['paper'],\n list: ['list']\n };\n return composeClasses(slots, getMenuUtilityClass, classes);\n};\n\nconst MenuRoot = styled(Popover, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiMenu',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\nconst MenuPaper = styled(Paper, {\n name: 'MuiMenu',\n slot: 'Paper',\n overridesResolver: (props, styles) => styles.paper\n})({\n // specZ: The maximum height of a simple menu should be one or more rows less than the view\n // height. This ensures a tapable area outside of the simple menu with which to dismiss\n // the menu.\n maxHeight: 'calc(100% - 96px)',\n // Add iOS momentum scrolling for iOS < 13.0\n WebkitOverflowScrolling: 'touch'\n});\nconst MenuMenuList = styled(MenuList, {\n name: 'MuiMenu',\n slot: 'List',\n overridesResolver: (props, styles) => styles.list\n})({\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n});\nconst Menu = /*#__PURE__*/React.forwardRef(function Menu(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiMenu'\n });\n\n const {\n autoFocus = true,\n children,\n disableAutoFocusItem = false,\n MenuListProps = {},\n onClose,\n open,\n PaperProps = {},\n PopoverClasses,\n transitionDuration = 'auto',\n TransitionProps: {\n onEntering\n } = {},\n variant = 'selectedMenu'\n } = props,\n TransitionProps = _objectWithoutPropertiesLoose(props.TransitionProps, _excluded),\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n\n const theme = useTheme();\n const isRtl = theme.direction === 'rtl';\n\n const ownerState = _extends({}, props, {\n autoFocus,\n disableAutoFocusItem,\n MenuListProps,\n onEntering,\n PaperProps,\n transitionDuration,\n TransitionProps,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n const autoFocusItem = autoFocus && !disableAutoFocusItem && open;\n const menuListActionsRef = React.useRef(null);\n\n const handleEntering = (element, isAppearing) => {\n if (menuListActionsRef.current) {\n menuListActionsRef.current.adjustStyleForScrollbar(element, theme);\n }\n\n if (onEntering) {\n onEntering(element, isAppearing);\n }\n };\n\n const handleListKeyDown = event => {\n if (event.key === 'Tab') {\n event.preventDefault();\n\n if (onClose) {\n onClose(event, 'tabKeyDown');\n }\n }\n };\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n\n\n let activeItemIndex = -1; // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n\n React.Children.map(children, (child, index) => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n });\n return /*#__PURE__*/_jsx(MenuRoot, _extends({\n classes: PopoverClasses,\n onClose: onClose,\n anchorOrigin: {\n vertical: 'bottom',\n horizontal: isRtl ? 'right' : 'left'\n },\n transformOrigin: isRtl ? RTL_ORIGIN : LTR_ORIGIN,\n PaperProps: _extends({\n component: MenuPaper\n }, PaperProps, {\n classes: _extends({}, PaperProps.classes, {\n root: classes.paper\n })\n }),\n className: classes.root,\n open: open,\n ref: ref,\n transitionDuration: transitionDuration,\n TransitionProps: _extends({\n onEntering: handleEntering\n }, TransitionProps),\n ownerState: ownerState\n }, other, {\n children: /*#__PURE__*/_jsx(MenuMenuList, _extends({\n onKeyDown: handleListKeyDown,\n actions: menuListActionsRef,\n autoFocus: autoFocus && (activeItemIndex === -1 || disableAutoFocusItem),\n autoFocusItem: autoFocusItem,\n variant: variant\n }, MenuListProps, {\n className: clsx(classes.list, MenuListProps.className),\n children: children\n }))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Menu.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * An HTML element, or a function that returns one.\n * It's used to set the position of the menu.\n */\n anchorEl: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([HTMLElementType, PropTypes.func]),\n\n /**\n * If `true` (Default) will focus the `[role=\"menu\"]` if no focusable child is found. Disabled\n * children are not focusable. If you set this prop to `false` focus will be placed\n * on the parent modal container. This has severe accessibility implications\n * and should only be considered if you manage focus otherwise.\n * @default true\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Menu contents, normally `MenuItem`s.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * When opening the menu will not focus the active item but the `[role=\"menu\"]`\n * unless `autoFocus` is also set to `false`. Not using the default means not\n * following WAI-ARIA authoring practices. Please be considerate about possible\n * accessibility implications.\n * @default false\n */\n disableAutoFocusItem: PropTypes.bool,\n\n /**\n * Props applied to the [`MenuList`](/api/menu-list/) element.\n * @default {}\n */\n MenuListProps: PropTypes.object,\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`, `\"tabKeyDown\"`.\n */\n onClose: PropTypes.func,\n\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n\n /**\n * @ignore\n */\n PaperProps: PropTypes.object,\n\n /**\n * `classes` prop applied to the [`Popover`](/api/popover/) element.\n */\n PopoverClasses: PropTypes.object,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n\n /**\n * The length of the transition in `ms`, or 'auto'\n * @default 'auto'\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.\n * @default {}\n */\n TransitionProps: PropTypes.object,\n\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus.\n * @default 'selectedMenu'\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default Menu;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\n\nvar _span;\n\nconst _excluded = [\"children\", \"classes\", \"className\", \"label\", \"notched\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport styled from '../styles/styled';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst NotchedOutlineRoot = styled('fieldset')({\n textAlign: 'left',\n position: 'absolute',\n bottom: 0,\n right: 0,\n top: -5,\n left: 0,\n margin: 0,\n padding: '0 8px',\n pointerEvents: 'none',\n borderRadius: 'inherit',\n borderStyle: 'solid',\n borderWidth: 1,\n overflow: 'hidden',\n minWidth: '0%'\n});\nconst NotchedOutlineLegend = styled('legend')(({\n ownerState,\n theme\n}) => _extends({\n float: 'unset'\n}, !ownerState.withLabel && {\n padding: 0,\n lineHeight: '11px',\n // sync with `height` in `legend` styles\n transition: theme.transitions.create('width', {\n duration: 150,\n easing: theme.transitions.easing.easeOut\n })\n}, ownerState.withLabel && _extends({\n display: 'block',\n // Fix conflict with normalize.css and sanitize.css\n width: 'auto',\n // Fix conflict with bootstrap\n padding: 0,\n height: 11,\n // sync with `lineHeight` in `legend` styles\n fontSize: '0.75em',\n visibility: 'hidden',\n maxWidth: 0.01,\n transition: theme.transitions.create('max-width', {\n duration: 50,\n easing: theme.transitions.easing.easeOut\n }),\n whiteSpace: 'nowrap',\n '& > span': {\n paddingLeft: 5,\n paddingRight: 5,\n display: 'inline-block'\n }\n}, ownerState.notched && {\n maxWidth: '100%',\n transition: theme.transitions.create('max-width', {\n duration: 100,\n easing: theme.transitions.easing.easeOut,\n delay: 50\n })\n})));\n/**\n * @ignore - internal component.\n */\n\nexport default function NotchedOutline(props) {\n const {\n className,\n label,\n notched\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const withLabel = label != null && label !== '';\n\n const ownerState = _extends({}, props, {\n notched,\n withLabel\n });\n\n return /*#__PURE__*/_jsx(NotchedOutlineRoot, _extends({\n \"aria-hidden\": true,\n className: className,\n ownerState: ownerState\n }, other, {\n children: /*#__PURE__*/_jsx(NotchedOutlineLegend, {\n ownerState: ownerState,\n children: withLabel ? /*#__PURE__*/_jsx(\"span\", {\n children: label\n }) : // notranslate needed while Google Translate will not fix zero-width space issue\n _span || (_span = /*#__PURE__*/_jsx(\"span\", {\n className: \"notranslate\",\n children: \"\\u200B\"\n }))\n })\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? NotchedOutline.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The label.\n */\n label: PropTypes.node,\n\n /**\n * If `true`, the outline is notched to accommodate the label.\n */\n notched: PropTypes.bool.isRequired,\n\n /**\n * @ignore\n */\n style: PropTypes.object\n} : void 0;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"components\", \"fullWidth\", \"inputComponent\", \"label\", \"multiline\", \"notched\", \"type\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { refType } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport NotchedOutline from './NotchedOutline';\nimport useFormControl from '../FormControl/useFormControl';\nimport formControlState from '../FormControl/formControlState';\nimport styled, { rootShouldForwardProp } from '../styles/styled';\nimport outlinedInputClasses, { getOutlinedInputUtilityClass } from './outlinedInputClasses';\nimport InputBase, { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseComponent as InputBaseInput } from '../InputBase/InputBase';\nimport useThemeProps from '../styles/useThemeProps';\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n notchedOutline: ['notchedOutline'],\n input: ['input']\n };\n const composedClasses = composeClasses(slots, getOutlinedInputUtilityClass, classes);\n return _extends({}, classes, composedClasses);\n};\n\nconst OutlinedInputRoot = styled(InputBaseRoot, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiOutlinedInput',\n slot: 'Root',\n overridesResolver: inputBaseRootOverridesResolver\n})(({\n theme,\n ownerState\n}) => {\n const borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';\n return _extends({\n position: 'relative',\n borderRadius: theme.shape.borderRadius,\n [`&:hover .${outlinedInputClasses.notchedOutline}`]: {\n borderColor: theme.palette.text.primary\n },\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n [`&:hover .${outlinedInputClasses.notchedOutline}`]: {\n borderColor\n }\n },\n [`&.${outlinedInputClasses.focused} .${outlinedInputClasses.notchedOutline}`]: {\n borderColor: theme.palette[ownerState.color].main,\n borderWidth: 2\n },\n [`&.${outlinedInputClasses.error} .${outlinedInputClasses.notchedOutline}`]: {\n borderColor: theme.palette.error.main\n },\n [`&.${outlinedInputClasses.disabled} .${outlinedInputClasses.notchedOutline}`]: {\n borderColor: theme.palette.action.disabled\n }\n }, ownerState.startAdornment && {\n paddingLeft: 14\n }, ownerState.endAdornment && {\n paddingRight: 14\n }, ownerState.multiline && _extends({\n padding: '16.5px 14px'\n }, ownerState.size === 'small' && {\n padding: '8.5px 14px'\n }));\n});\nconst NotchedOutlineRoot = styled(NotchedOutline, {\n name: 'MuiOutlinedInput',\n slot: 'NotchedOutline',\n overridesResolver: (props, styles) => styles.notchedOutline\n})(({\n theme\n}) => ({\n borderColor: theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'\n}));\nconst OutlinedInputInput = styled(InputBaseInput, {\n name: 'MuiOutlinedInput',\n slot: 'Input',\n overridesResolver: inputBaseInputOverridesResolver\n})(({\n theme,\n ownerState\n}) => _extends({\n padding: '16.5px 14px',\n '&:-webkit-autofill': {\n WebkitBoxShadow: theme.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset',\n WebkitTextFillColor: theme.palette.mode === 'light' ? null : '#fff',\n caretColor: theme.palette.mode === 'light' ? null : '#fff',\n borderRadius: 'inherit'\n }\n}, ownerState.size === 'small' && {\n padding: '8.5px 14px'\n}, ownerState.multiline && {\n padding: 0\n}, ownerState.startAdornment && {\n paddingLeft: 0\n}, ownerState.endAdornment && {\n paddingRight: 0\n}));\nconst OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inProps, ref) {\n var _React$Fragment;\n\n const props = useThemeProps({\n props: inProps,\n name: 'MuiOutlinedInput'\n });\n\n const {\n components = {},\n fullWidth = false,\n inputComponent = 'input',\n label,\n multiline = false,\n notched,\n type = 'text'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const classes = useUtilityClasses(props);\n const muiFormControl = useFormControl();\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['required']\n });\n return /*#__PURE__*/_jsx(InputBase, _extends({\n components: _extends({\n Root: OutlinedInputRoot,\n Input: OutlinedInputInput\n }, components),\n renderSuffix: state => /*#__PURE__*/_jsx(NotchedOutlineRoot, {\n className: classes.notchedOutline,\n label: label != null && label !== '' && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/_jsxs(React.Fragment, {\n children: [label, \"\\xA0\", '*']\n })) : label,\n notched: typeof notched !== 'undefined' ? notched : Boolean(state.startAdornment || state.filled || state.focused)\n }),\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type\n }, other, {\n classes: _extends({}, classes, {\n notchedOutline: null\n })\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? OutlinedInput.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),\n\n /**\n * The components used for each slot inside the InputBase.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: PropTypes.shape({\n Input: PropTypes.elementType,\n Root: PropTypes.elementType\n }),\n\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the component is disabled.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n disabled: PropTypes.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n\n /**\n * If `true`, the `input` will indicate an error.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the `input` will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n * @default 'input'\n */\n inputComponent: PropTypes.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n * @default {}\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * The label of the `input`. It is only used for layout. The actual labelling\n * is handled by `InputLabel`.\n */\n label: PropTypes.node,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If `true`, a `textarea` element is rendered.\n * @default false\n */\n multiline: PropTypes.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * If `true`, the outline is notched to accommodate the label.\n */\n notched: PropTypes.bool,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {React.ChangeEvent} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder: PropTypes.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * If `true`, the `input` element is required.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n required: PropTypes.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n * @default 'text'\n */\n type: PropTypes.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nOutlinedInput.muiName = 'Input';\nexport default OutlinedInput;","import { generateUtilityClasses, generateUtilityClass } from '@mui/base';\nexport function getOutlinedInputUtilityClass(slot) {\n return generateUtilityClass('MuiOutlinedInput', slot);\n}\nconst outlinedInputClasses = generateUtilityClasses('MuiOutlinedInput', ['root', 'colorSecondary', 'focused', 'disabled', 'adornedStart', 'adornedEnd', 'error', 'sizeSmall', 'multiline', 'notchedOutline', 'input', 'inputSizeSmall', 'inputMultiline', 'inputAdornedStart', 'inputAdornedEnd']);\nexport default outlinedInputClasses;","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getNativeSelectUtilityClasses(slot) {\n return generateUtilityClass('MuiNativeSelect', slot);\n}\nconst nativeSelectClasses = generateUtilityClasses('MuiNativeSelect', ['root', 'select', 'multiple', 'filled', 'outlined', 'standard', 'disabled', 'icon', 'iconOpen', 'iconFilled', 'iconOutlined', 'iconStandard', 'nativeInput']);\nexport default nativeSelectClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"disabled\", \"IconComponent\", \"inputRef\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport capitalize from '../utils/capitalize';\nimport nativeSelectClasses, { getNativeSelectUtilityClasses } from './nativeSelectClasses';\nimport styled, { rootShouldForwardProp } from '../styles/styled';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n disabled,\n multiple,\n open\n } = ownerState;\n const slots = {\n select: ['select', variant, disabled && 'disabled', multiple && 'multiple'],\n icon: ['icon', `icon${capitalize(variant)}`, open && 'iconOpen', disabled && 'disabled']\n };\n return composeClasses(slots, getNativeSelectUtilityClasses, classes);\n};\n\nexport const nativeSelectSelectStyles = ({\n ownerState,\n theme\n}) => _extends({\n MozAppearance: 'none',\n // Reset\n WebkitAppearance: 'none',\n // Reset\n // When interacting quickly, the text can end up selected.\n // Native select can't be selected either.\n userSelect: 'none',\n borderRadius: 0,\n // Reset\n cursor: 'pointer',\n '&:focus': {\n // Show that it's not an text input\n backgroundColor: theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.05)' : 'rgba(255, 255, 255, 0.05)',\n borderRadius: 0 // Reset Chrome style\n\n },\n // Remove IE11 arrow\n '&::-ms-expand': {\n display: 'none'\n },\n [`&.${nativeSelectClasses.disabled}`]: {\n cursor: 'default'\n },\n '&[multiple]': {\n height: 'auto'\n },\n '&:not([multiple]) option, &:not([multiple]) optgroup': {\n backgroundColor: theme.palette.background.paper\n },\n // Bump specificity to allow extending custom inputs\n '&&&': {\n paddingRight: 24,\n minWidth: 16 // So it doesn't collapse.\n\n }\n}, ownerState.variant === 'filled' && {\n '&&&': {\n paddingRight: 32\n }\n}, ownerState.variant === 'outlined' && {\n borderRadius: theme.shape.borderRadius,\n '&:focus': {\n borderRadius: theme.shape.borderRadius // Reset the reset for Chrome style\n\n },\n '&&&': {\n paddingRight: 32\n }\n});\nconst NativeSelectSelect = styled('select', {\n name: 'MuiNativeSelect',\n slot: 'Select',\n shouldForwardProp: rootShouldForwardProp,\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.select, styles[ownerState.variant], {\n [`&.${nativeSelectClasses.multiple}`]: styles.multiple\n }];\n }\n})(nativeSelectSelectStyles);\nexport const nativeSelectIconStyles = ({\n ownerState,\n theme\n}) => _extends({\n // We use a position absolute over a flexbox in order to forward the pointer events\n // to the input and to support wrapping tags..\n position: 'absolute',\n right: 0,\n top: 'calc(50% - .5em)',\n // Center vertically, height is 1em\n pointerEvents: 'none',\n // Don't block pointer events on the select under the icon.\n color: theme.palette.action.active,\n [`&.${nativeSelectClasses.disabled}`]: {\n color: theme.palette.action.disabled\n }\n}, ownerState.open && {\n transform: 'rotate(180deg)'\n}, ownerState.variant === 'filled' && {\n right: 7\n}, ownerState.variant === 'outlined' && {\n right: 7\n});\nconst NativeSelectIcon = styled('svg', {\n name: 'MuiNativeSelect',\n slot: 'Icon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.icon, ownerState.variant && styles[`icon${capitalize(ownerState.variant)}`], ownerState.open && styles.iconOpen];\n }\n})(nativeSelectIconStyles);\n/**\n * @ignore - internal component.\n */\n\nconst NativeSelectInput = /*#__PURE__*/React.forwardRef(function NativeSelectInput(props, ref) {\n const {\n className,\n disabled,\n IconComponent,\n inputRef,\n variant = 'standard'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n disabled,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(NativeSelectSelect, _extends({\n ownerState: ownerState,\n className: clsx(classes.select, className),\n disabled: disabled,\n ref: inputRef || ref\n }, other)), props.multiple ? null : /*#__PURE__*/_jsx(NativeSelectIcon, {\n as: IconComponent,\n ownerState: ownerState,\n className: classes.icon\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? NativeSelectInput.propTypes = {\n /**\n * The option elements to populate the select with.\n * Can be some `
\n )}\n \n {!switchOnly && (\n \n {indicatorLabels ? indicatorLabels[0] : \"ON\"}\n
\n )}\n \n );\n\n if (switchOnly) {\n return switchComponent;\n }\n\n return (\n
\n \n \n \n \n {label !== \"\" && (\n \n {label}\n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n )}\n
\n \n {description !== \"\" && (\n \n {description}\n \n )}\n \n
\n
\n\n \n {switchComponent}\n
\n \n
\n );\n};\n\nexport default withStyles(styles)(FormSwitchWrapper);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React from \"react\";\nimport {\n Grid,\n IconButton,\n InputLabel,\n TextField,\n TextFieldProps,\n Tooltip,\n} from \"@mui/material\";\nimport { OutlinedInputProps } from \"@mui/material/OutlinedInput\";\nimport { InputProps as StandardInputProps } from \"@mui/material/Input\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n fieldBasic,\n inputFieldStyles,\n tooltipHelper,\n} from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport clsx from \"clsx\";\n\ninterface InputBoxProps {\n label: string;\n classes: any;\n onChange: (e: React.ChangeEvent) => void;\n value: string | boolean;\n id: string;\n name: string;\n disabled?: boolean;\n multiline?: boolean;\n type?: string;\n tooltip?: string;\n autoComplete?: string;\n index?: number;\n error?: string;\n required?: boolean;\n placeholder?: string;\n min?: string;\n max?: string;\n overlayIcon?: any;\n overlayAction?: () => void;\n overlayObject?: any;\n extraInputProps?: StandardInputProps[\"inputProps\"];\n noLabelMinWidth?: boolean;\n pattern?: string;\n autoFocus?: boolean;\n className?: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n textBoxContainer: {\n flexGrow: 1,\n position: \"relative\",\n },\n overlayAction: {\n position: \"absolute\",\n right: 5,\n top: 6,\n \"& svg\": {\n maxWidth: 15,\n maxHeight: 15,\n },\n \"&.withLabel\": {\n top: 5,\n },\n },\n inputLabel: {\n ...fieldBasic.inputLabel,\n fontWeight: \"normal\",\n },\n });\n\nconst inputStyles = makeStyles((theme: Theme) =>\n createStyles({\n ...inputFieldStyles,\n })\n);\n\nfunction InputField(props: TextFieldProps) {\n const classes = inputStyles();\n\n return (\n }\n {...props}\n />\n );\n}\n\nconst InputBoxWrapper = ({\n label,\n onChange,\n value,\n id,\n name,\n type = \"text\",\n autoComplete = \"off\",\n disabled = false,\n multiline = false,\n tooltip = \"\",\n index = 0,\n error = \"\",\n required = false,\n placeholder = \"\",\n min,\n max,\n overlayIcon = null,\n overlayObject = null,\n extraInputProps = {},\n overlayAction,\n noLabelMinWidth = false,\n pattern = \"\",\n autoFocus = false,\n classes,\n className = \"\",\n}: InputBoxProps) => {\n let inputProps: any = { \"data-index\": index, ...extraInputProps };\n\n if (type === \"number\" && min) {\n inputProps[\"min\"] = min;\n }\n\n if (type === \"number\" && max) {\n inputProps[\"max\"] = max;\n }\n\n if (pattern !== \"\") {\n inputProps[\"pattern\"] = pattern;\n }\n\n return (\n \n \n {label !== \"\" && (\n \n \n {label}\n {required ? \"*\" : \"\"}\n \n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n \n )}\n\n
\n \n {overlayIcon && (\n \n {\n overlayAction();\n }\n : () => null\n }\n size={\"small\"}\n disableFocusRipple={false}\n disableRipple={false}\n disableTouchRipple={false}\n >\n {overlayIcon}\n \n
\n )}\n {overlayObject && (\n \n {overlayObject}\n \n )}\n \n \n
\n );\n};\n\nexport default withStyles(styles)(InputBoxWrapper);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React from \"react\";\nimport clsx from \"clsx\";\nimport Grid from \"@mui/material/Grid\";\nimport RadioGroup from \"@mui/material/RadioGroup\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Radio, { RadioProps } from \"@mui/material/Radio\";\nimport { InputLabel, Tooltip } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport { fieldBasic, radioIcons, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\n\nexport interface SelectorTypes {\n label: string;\n value: string;\n}\n\ninterface RadioGroupProps {\n selectorOptions: SelectorTypes[];\n currentSelection: string;\n label: string;\n id: string;\n name: string;\n tooltip?: string;\n disableOptions?: boolean;\n onChange: (e: React.ChangeEvent) => void;\n classes: any;\n displayInColumn?: boolean;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n optionLabel: {\n \"&.Mui-disabled\": {\n \"& .MuiFormControlLabel-label\": {\n color: \"#9c9c9c\",\n },\n },\n \"&:last-child\": {\n marginRight: 0,\n },\n \"& .MuiFormControlLabel-label\": {\n fontSize: 12,\n color: \"#07193E\",\n },\n },\n checkedOption: {\n \"& .MuiFormControlLabel-label\": {\n fontSize: 12,\n color: \"#07193E\",\n fontWeight: 700,\n },\n },\n });\n\nconst radioStyles = makeStyles({\n root: {\n \"&:hover\": {\n backgroundColor: \"transparent\",\n },\n },\n ...radioIcons,\n});\n\nconst RadioButton = (props: RadioProps) => {\n const classes = radioStyles();\n\n return (\n }\n icon={}\n {...props}\n />\n );\n};\n\nexport const RadioGroupSelector = ({\n selectorOptions = [],\n currentSelection,\n label,\n id,\n name,\n onChange,\n tooltip = \"\",\n disableOptions = false,\n classes,\n displayInColumn = false,\n}: RadioGroupProps) => {\n return (\n \n \n \n {label}\n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n
\n \n \n {selectorOptions.map((selectorOption) => {\n return (\n }\n label={selectorOption.label}\n disabled={disableOptions}\n className={clsx(classes.optionLabel, {\n [classes.checkedOption]:\n selectorOption.value === currentSelection,\n })}\n />\n );\n })}\n \n \n
\n );\n};\n\nexport default withStyles(styles)(RadioGroupSelector);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport {\n FormControl,\n InputLabel,\n MenuItem,\n Select,\n InputBase,\n Tooltip,\n SelectChangeEvent,\n} from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\n\nexport interface selectorTypes {\n label: string;\n value: string;\n}\n\ninterface SelectProps {\n options: selectorTypes[];\n value: string;\n label: string;\n id: string;\n name: string;\n tooltip?: string;\n onChange: (e: SelectChangeEvent) => void;\n disabled?: boolean;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n inputLabel: {\n ...fieldBasic.inputLabel,\n \"& span\": {\n fontWeight: \"normal\",\n },\n },\n fieldContainer: {\n display: \"flex\",\n \"@media (max-width: 600px)\": {\n flexFlow: \"column\",\n },\n },\n });\n\nconst SelectStyled = withStyles((theme: Theme) =>\n createStyles({\n root: {\n height: 38,\n lineHeight: 1,\n \"label + &\": {\n marginTop: theme.spacing(3),\n },\n },\n input: {\n height: 38,\n position: \"relative\",\n color: \"#07193E\",\n fontSize: 13,\n fontWeight: 600,\n padding: \"8px 20px 10px 10px\",\n border: \"#e5e5e5 1px solid\",\n borderRadius: 4,\n display: \"flex\",\n alignItems: \"center\",\n \"&:hover\": {\n borderColor: \"#393939\",\n },\n \"&:focus\": {\n backgroundColor: \"#fff\",\n },\n },\n })\n)(InputBase);\n\nconst SelectWrapper = ({\n classes,\n id,\n name,\n onChange,\n options,\n label,\n tooltip = \"\",\n value,\n disabled = false,\n}: SelectProps) => {\n return (\n \n \n {label !== \"\" && (\n \n {label}\n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n )}\n \n }\n disabled={disabled}\n >\n {options.map((option) => (\n \n {option.label}\n \n ))}\n \n \n
\n
\n );\n};\n\nexport default withStyles(styles)(SelectWrapper);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\n// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport ArrowRightIcon from \"@mui/icons-material/ArrowRight\";\nimport ErrorOutlineIcon from \"@mui/icons-material/ErrorOutline\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"../../../../../store\";\nimport {\n setErrorSnackMessage,\n setModalErrorSnackMessage,\n} from \"../../../../../actions\";\nimport { snackBarMessage } from \"../../../../../types\";\n\ninterface ImodalErrorProps {\n customStyle?: any;\n classes: any;\n modalSnackMessage: snackBarMessage;\n displayErrorMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n modalErrorContainer: {\n position: \"absolute\",\n marginTop: 10,\n width: \"80%\",\n backgroundColor: \"#fff\",\n border: \"#C72C48 1px solid\",\n borderLeftWidth: 12,\n borderRadius: 3,\n zIndex: 1000,\n padding: \"10px 15px\",\n left: \"50%\",\n transform: \"translateX(-50%)\",\n opacity: 0,\n transitionDuration: \"0.2s\",\n },\n modalErrorShow: {\n opacity: 1,\n },\n closeButton: {\n position: \"absolute\",\n right: 5,\n fontSize: \"small\",\n border: 0,\n backgroundColor: \"#fff\",\n cursor: \"pointer\",\n },\n errorTitle: {\n display: \"flex\",\n alignItems: \"center\",\n },\n errorLabel: {\n color: \"#000\",\n fontSize: 18,\n fontWeight: 500,\n marginLeft: 5,\n marginRight: 25,\n },\n messageIcon: {\n color: \"#C72C48\",\n display: \"flex\",\n \"& svg\": {\n width: 32,\n height: 32,\n },\n },\n detailsButton: {\n color: \"#9C9C9C\",\n display: \"flex\",\n alignItems: \"center\",\n border: 0,\n backgroundColor: \"transparent\",\n paddingLeft: 5,\n fontSize: 14,\n transformDuration: \"0.3s\",\n cursor: \"pointer\",\n },\n extraDetailsContainer: {\n fontStyle: \"italic\",\n color: \"#9C9C9C\",\n lineHeight: 0,\n padding: \"0 10px\",\n transition: \"all .2s ease-in-out\",\n overflow: \"hidden\",\n },\n extraDetailsOpen: {\n lineHeight: 1,\n padding: \"3px 10px\",\n },\n arrowElement: {\n marginLeft: -5,\n },\n arrowOpen: {\n transform: \"rotateZ(90deg)\",\n transformDuration: \"0.3s\",\n },\n });\n\nvar timerI: any;\n\nconst startHideTimer = (callbackFunction: () => void) => {\n timerI = setInterval(callbackFunction, 10000);\n};\n\nconst stopHideTimer = () => {\n clearInterval(timerI);\n};\n\nconst ModalError = ({\n classes,\n modalSnackMessage,\n displayErrorMessage,\n customStyle,\n}: ImodalErrorProps) => {\n const [detailsOpen, setDetailsOpen] = useState(false);\n const [displayErrorMsg, setDisplayErrorMsg] = useState(false);\n\n const closeErrorMessage = useCallback(() => {\n setDisplayErrorMsg(false);\n }, []);\n\n useEffect(() => {\n if (!displayErrorMsg) {\n displayErrorMessage({ detailedError: \"\", errorMessage: \"\" });\n setDetailsOpen(false);\n //clearInterval(timerI);\n }\n }, [displayErrorMessage, displayErrorMsg]);\n\n useEffect(() => {\n if (\n modalSnackMessage.message !== \"\" &&\n modalSnackMessage.type === \"error\"\n ) {\n //Error message received, we trigger the animation\n setDisplayErrorMsg(true);\n //startHideTimer(closeErrorMessage);\n }\n }, [closeErrorMessage, modalSnackMessage.message, modalSnackMessage.type]);\n\n const detailsToggle = () => {\n setDetailsOpen(!detailsOpen);\n };\n\n const message = get(modalSnackMessage, \"message\", \"\");\n const messageDetails = get(modalSnackMessage, \"detailedErrorMsg\", \"\");\n\n if (modalSnackMessage.type !== \"error\" || message === \"\") {\n return null;\n }\n\n return (\n \n startHideTimer(closeErrorMessage)}\n >\n \n
\n \n \n \n {message}\n
\n {messageDetails !== \"\" && (\n \n
\n \n
\n \n {messageDetails}\n \n
\n )}\n \n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n modalSnackMessage: state.system.modalSnackBar,\n});\n\nconst mapDispatchToProps = {\n displayErrorMessage: setModalErrorSnackMessage,\n};\n\nconst connector = connect(mapState, mapDispatchToProps);\n\nexport default connector(withStyles(styles)(ModalError));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Snackbar from \"@mui/material/Snackbar\";\nimport { Dialog, DialogContent, DialogTitle } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n deleteDialogStyles,\n snackBarCommon,\n} from \"../FormComponents/common/styleLibrary\";\nimport { AppState } from \"../../../../store\";\nimport { snackBarMessage } from \"../../../../types\";\nimport { setModalSnackMessage } from \"../../../../actions\";\nimport ModalError from \"../FormComponents/ModalError/ModalError\";\nimport CloseIcon from \"@mui/icons-material/Close\";\n\ninterface IModalProps {\n classes: any;\n onClose: () => void;\n modalOpen: boolean;\n title: string | React.ReactNode;\n children: any;\n wideLimit?: boolean;\n modalSnackMessage?: snackBarMessage;\n noContentPadding?: boolean;\n setModalSnackMessage: typeof setModalSnackMessage;\n titleIcon?: React.ReactNode;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...deleteDialogStyles,\n root: {\n \"& .MuiPaper-root\": {\n padding: \"1rem 2rem 2rem 1rem\",\n },\n },\n content: {\n padding: 25,\n paddingBottom: 0,\n },\n customDialogSize: {\n width: \"100%\",\n maxWidth: 765,\n },\n ...snackBarCommon,\n });\n\nconst ModalWrapper = ({\n onClose,\n modalOpen,\n title,\n children,\n classes,\n wideLimit = true,\n modalSnackMessage,\n noContentPadding,\n setModalSnackMessage,\n titleIcon = null,\n}: IModalProps) => {\n const [openSnackbar, setOpenSnackbar] = useState(false);\n\n useEffect(() => {\n setModalSnackMessage(\"\");\n }, [setModalSnackMessage]);\n\n useEffect(() => {\n if (modalSnackMessage) {\n if (modalSnackMessage.message === \"\") {\n setOpenSnackbar(false);\n return;\n }\n // Open SnackBar\n if (modalSnackMessage.type !== \"error\") {\n setOpenSnackbar(true);\n }\n }\n }, [modalSnackMessage]);\n\n const closeSnackBar = () => {\n setOpenSnackbar(false);\n setModalSnackMessage(\"\");\n };\n\n const customSize = wideLimit\n ? {\n classes: {\n paper: classes.customDialogSize,\n },\n }\n : { maxWidth: \"lg\" as const, fullWidth: true };\n\n let message = \"\";\n\n if (modalSnackMessage) {\n message = modalSnackMessage.detailedErrorMsg;\n if (\n modalSnackMessage.detailedErrorMsg === \"\" ||\n modalSnackMessage.detailedErrorMsg.length < 5\n ) {\n message = modalSnackMessage.message;\n }\n }\n\n return (\n {\n if (reason !== \"backdropClick\") {\n onClose(); // close on Esc but not on click outside\n }\n }}\n className={classes.root}\n >\n \n
\n {titleIcon} {title}\n
\n
\n \n \n \n
\n
\n\n \n {\n closeSnackBar();\n }}\n message={message}\n ContentProps={{\n className: `${classes.snackBar} ${\n modalSnackMessage && modalSnackMessage.type === \"error\"\n ? classes.errorSnackBar\n : \"\"\n }`,\n }}\n autoHideDuration={\n modalSnackMessage && modalSnackMessage.type === \"error\" ? 10000 : 5000\n }\n />\n \n {children}\n \n \n );\n};\n\nconst mapState = (state: AppState) => ({\n modalSnackMessage: state.system.modalSnackBar,\n});\n\nconst connector = connect(mapState, {\n setModalSnackMessage,\n});\n\nexport default withStyles(styles)(connector(ModalWrapper));\n"],"names":["connector","connect","setModalErrorSnackMessage","withStyles","theme","createStyles","formFieldStyles","modalStyleUtils","classes","open","enabled","cfg","selectedBucket","closeModalAndRefresh","useState","loading","setLoading","quotaEnabled","setQuotaEnabled","quotaType","setQuotaType","quotaSize","setQuotaSize","quotaUnit","setQuotaUnit","useEffect","type","quota","maxUnit","maxQuota","i","units","Math","pow","modalOpen","onClose","title","titleIcon","noValidate","autoComplete","onSubmit","e","event","preventDefault","req","amount","parseInt","getBytes","quota_type","api","then","catch","err","enableBucketEncryption","container","item","xs","className","formScrollable","formFieldRow","value","id","name","checked","onChange","target","label","currentSelection","selectorOptions","required","min","style","width","options","factorForDropdown","modalButtonBar","variant","color","disabled","onClick","StyledSwitch","root","height","padding","margin","switchBase","transform","palette","common","white","backgroundColor","boxShadow","opacity","border","thumb","marginLeft","track","borderRadius","transition","transitions","create","focusVisible","switchContainer","display","alignItems","justifyContent","Switch","divContainer","marginBottom","indicatorLabelOn","fontWeight","indicatorLabel","fontSize","fieldDescription","marginTop","tooltip","actionsTray","fieldBasic","switchOnly","description","indicatorLabels","switchComponent","clsx","length","inputProps","disableRipple","disableFocusRipple","disableTouchRipple","sm","md","htmlFor","inputLabel","tooltipContainer","placement","textAlign","component","inputStyles","makeStyles","inputFieldStyles","InputField","props","InputProps","tooltipHelper","textBoxContainer","flexGrow","position","overlayAction","right","top","maxWidth","maxHeight","multiline","index","error","placeholder","max","overlayIcon","overlayObject","extraInputProps","noLabelMinWidth","pattern","autoFocus","errorInField","inputBoxContainer","noMinWidthLabel","fullWidth","helperText","inputRebase","size","radioStyles","radioIcons","RadioButton","checkedIcon","radioSelectedIcon","icon","radioUnselectedIcon","optionLabel","marginRight","checkedOption","disableOptions","displayInColumn","radioOptionsLayout","row","map","selectorOption","control","SelectStyled","lineHeight","spacing","input","borderColor","InputBase","fieldContainer","flexFlow","option","timerI","stopHideTimer","clearInterval","mapDispatchToProps","displayErrorMessage","state","modalSnackMessage","system","modalSnackBar","modalErrorContainer","borderLeftWidth","zIndex","left","transitionDuration","modalErrorShow","closeButton","cursor","errorTitle","errorLabel","messageIcon","detailsButton","paddingLeft","transformDuration","extraDetailsContainer","fontStyle","overflow","extraDetailsOpen","arrowElement","arrowOpen","customStyle","detailsOpen","setDetailsOpen","displayErrorMsg","setDisplayErrorMsg","closeErrorMessage","useCallback","detailedError","errorMessage","message","get","messageDetails","Fragment","onMouseOver","onMouseLeave","setInterval","Close","ErrorOutline","detailsContainerLink","ArrowRight","setModalSnackMessage","deleteDialogStyles","content","paddingBottom","customDialogSize","snackBarCommon","children","wideLimit","noContentPadding","openSnackbar","setOpenSnackbar","customSize","paper","detailedErrorMsg","Dialog","scroll","reason","DialogTitle","titleText","closeContainer","IconButton","Snackbar","snackBarModal","ContentProps","snackBar","errorSnackBar","autoHideDuration","DialogContent"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"static/js/1711.a046e26c.chunk.js","mappings":"mVAsOMA,GAAYC,EAAAA,EAAAA,IAAQ,KAAM,CAC9BC,0BAAAA,EAAAA,KAGF,WAAeC,EAAAA,EAAAA,IAnMA,SAACC,GAAD,OACbC,EAAAA,EAAAA,IAAa,kBACRC,EAAAA,IACAC,EAAAA,OAgMP,CAAkCP,GAnLd,SAAC,GAQK,IAPxBQ,EAOuB,EAPvBA,QACAC,EAMuB,EANvBA,KACAC,EAKuB,EALvBA,QACAC,EAIuB,EAJvBA,IACAC,EAGuB,EAHvBA,eACAC,EAEuB,EAFvBA,qBACAX,EACuB,EADvBA,0BAEA,GAA8BY,EAAAA,EAAAA,WAAkB,GAAhD,eAAOC,EAAP,KAAgBC,EAAhB,KACA,GAAwCF,EAAAA,EAAAA,WAAkB,GAA1D,eAAOG,EAAP,KAAqBC,EAArB,KACA,GAAkCJ,EAAAA,EAAAA,UAAiB,QAAnD,eAAOK,EAAP,KAAkBC,EAAlB,KACA,GAAkCN,EAAAA,EAAAA,UAAiB,KAAnD,eAAOO,EAAP,KAAkBC,EAAlB,KACA,GAAkCR,EAAAA,EAAAA,UAAiB,OAAnD,eAAOS,EAAP,KAAkBC,EAAlB,MAEAC,EAAAA,EAAAA,YAAU,WACR,GAAIf,IACFQ,GAAgB,GACZP,GAAK,CACPS,EAAaT,EAAIe,MACjBJ,EAAa,GAAD,OAA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CACE,aAAW,QACX/M,UAAWjD,EAAQ0M,YACnBnI,QAAS5C,EACT0F,eAAa,EACb2C,KAAK,QALP,UAOE,SAACwE,EAAA,EAAD,YAKN,SAAC,EAAD,KACA,SAACyB,EAAA,EAAD,CACEhQ,KAAMoP,EACNpM,UAAWjD,EAAQkQ,cACnBvO,QAAS,WA1Db2N,GAAgB,GAChBV,EAAqB,KA4DjBX,QAASA,EACTkC,aAAc,CACZlN,UAAU,GAAD,OAAKjD,EAAQoQ,SAAb,YACPnE,GAAgD,UAA3BA,EAAkB/K,KACnClB,EAAQqQ,cACR,KAGRC,iBACErE,GAAgD,UAA3BA,EAAkB/K,KAAmB,IAAQ,OAGtE,SAACqP,EAAA,EAAD,CAAetN,UAAWmM,EAAmB,GAAKpP,EAAQ8O,QAA1D,SACGI","sources":["screens/Console/Buckets/BucketDetails/EnableQuota.tsx","screens/Console/Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper.tsx","screens/Console/Common/FormComponents/InputBoxWrapper/InputBoxWrapper.tsx","screens/Console/Common/FormComponents/RadioGroupSelector/RadioGroupSelector.tsx","screens/Console/Common/FormComponents/SelectWrapper/SelectWrapper.tsx","screens/Console/Common/FormComponents/ModalError/ModalError.tsx","screens/Console/Common/ModalWrapper/ModalWrapper.tsx"],"sourcesContent":["// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Button, LinearProgress, SelectChangeEvent } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport Grid from \"@mui/material/Grid\";\nimport { factorForDropdown, getBytes, units } from \"../../../../common/utils\";\nimport { BucketQuota } from \"../types\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport { ErrorResponseHandler } from \"../../../../common/types\";\nimport {\n formFieldStyles,\n modalStyleUtils,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport FormSwitchWrapper from \"../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport RadioGroupSelector from \"../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport SelectWrapper from \"../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport api from \"../../../../common/api\";\nimport { BucketQuotaIcon } from \"../../../../icons\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...formFieldStyles,\n ...modalStyleUtils,\n });\n\ninterface IEnableQuotaProps {\n classes: any;\n open: boolean;\n enabled: boolean;\n cfg: BucketQuota | null;\n selectedBucket: string;\n closeModalAndRefresh: () => void;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst EnableQuota = ({\n classes,\n open,\n enabled,\n cfg,\n selectedBucket,\n closeModalAndRefresh,\n setModalErrorSnackMessage,\n}: IEnableQuotaProps) => {\n const [loading, setLoading] = useState(false);\n const [quotaEnabled, setQuotaEnabled] = useState(false);\n const [quotaType, setQuotaType] = useState(\"hard\");\n const [quotaSize, setQuotaSize] = useState(\"1\");\n const [quotaUnit, setQuotaUnit] = useState(\"TiB\");\n\n useEffect(() => {\n if (enabled) {\n setQuotaEnabled(true);\n if (cfg) {\n setQuotaType(cfg.type);\n setQuotaSize(`${cfg.quota}`);\n setQuotaUnit(`B`);\n\n let maxUnit = \"B\";\n let maxQuota = cfg.quota;\n\n for (let i = 0; i < units.length; i++) {\n if (cfg.quota % Math.pow(1024, i) === 0) {\n maxQuota = cfg.quota / Math.pow(1024, i);\n maxUnit = units[i];\n } else {\n break;\n }\n }\n setQuotaSize(`${maxQuota}`);\n setQuotaUnit(maxUnit);\n }\n }\n }, [enabled, cfg]);\n\n const enableBucketEncryption = (event: React.FormEvent) => {\n event.preventDefault();\n if (loading) {\n return;\n }\n let req = {\n enabled: quotaEnabled,\n amount: parseInt(getBytes(quotaSize, quotaUnit, false)),\n quota_type: quotaType,\n };\n\n api\n .invoke(\"PUT\", `/api/v1/buckets/${selectedBucket}/quota`, req)\n .then(() => {\n setLoading(false);\n closeModalAndRefresh();\n })\n .catch((err: ErrorResponseHandler) => {\n setLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n return (\n {\n closeModalAndRefresh();\n }}\n title=\"Enable Bucket Quota\"\n titleIcon={}\n >\n ) => {\n enableBucketEncryption(e);\n }}\n >\n \n \n \n ) => {\n setQuotaEnabled(event.target.checked);\n }}\n label={\"Quota\"}\n />\n \n {quotaEnabled && (\n \n \n ) => {\n setQuotaType(e.target.value as string);\n }}\n selectorOptions={[{ value: \"hard\", label: \"Hard\" }]}\n />\n \n \n \n \n ) => {\n setQuotaSize(e.target.value);\n }}\n label=\"Quota\"\n value={quotaSize}\n required\n min=\"1\"\n />\n \n \n
\n ) => {\n setQuotaUnit(e.target.value as string);\n }}\n options={factorForDropdown()}\n />\n
\n
\n
\n
\n
\n )}\n
\n \n {\n closeModalAndRefresh();\n }}\n >\n Cancel\n \n\n \n Save\n \n \n {loading && (\n \n \n \n )}\n
\n \n \n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(EnableQuota));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { InputLabel, Switch, Tooltip, Typography } from \"@mui/material\";\nimport Grid from \"@mui/material/Grid\";\nimport { actionsTray, fieldBasic } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport clsx from \"clsx\";\n\ninterface IFormSwitch {\n label?: string;\n classes: any;\n onChange: (e: React.ChangeEvent) => void;\n value: string | boolean;\n id: string;\n name: string;\n disabled?: boolean;\n tooltip?: string;\n description?: string;\n index?: number;\n checked: boolean;\n switchOnly?: boolean;\n indicatorLabels?: string[];\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n divContainer: {\n marginBottom: 20,\n },\n indicatorLabelOn: {\n fontWeight: \"bold\",\n color: \"#081C42 !important\",\n },\n indicatorLabel: {\n fontSize: 12,\n color: \"#E2E2E2\",\n margin: \"0 8px 0 10px\",\n },\n fieldDescription: {\n marginTop: 4,\n color: \"#999999\",\n },\n tooltip: {\n fontSize: 16,\n },\n ...actionsTray,\n ...fieldBasic,\n });\n\nconst StyledSwitch = withStyles((theme) => ({\n root: {\n width: 50,\n height: 24,\n padding: 0,\n margin: 0,\n },\n switchBase: {\n padding: 1,\n \"&$checked\": {\n transform: \"translateX(24px)\",\n color: theme.palette.common.white,\n \"& + $track\": {\n backgroundColor: \"#4CCB92\",\n boxShadow: \"inset 0px 1px 4px rgba(0,0,0,0.1)\",\n opacity: 1,\n border: \"none\",\n },\n },\n \"&$focusVisible $thumb\": {\n color: \"#4CCB92\",\n border: \"6px solid #fff\",\n },\n },\n thumb: {\n width: 22,\n height: 22,\n backgroundColor: \"#FAFAFA\",\n border: \"2px solid #FFFFFF\",\n marginLeft: 1,\n },\n track: {\n borderRadius: 24 / 2,\n backgroundColor: \"#E2E2E2\",\n boxShadow: \"inset 0px 1px 4px rgba(0,0,0,0.1)\",\n opacity: 1,\n transition: theme.transitions.create([\"background-color\", \"border\"]),\n },\n checked: {},\n focusVisible: {},\n switchContainer: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n },\n}))(Switch);\n\nconst FormSwitchWrapper = ({\n label = \"\",\n onChange,\n value,\n id,\n name,\n checked = false,\n disabled = false,\n switchOnly = false,\n tooltip = \"\",\n description = \"\",\n classes,\n indicatorLabels,\n}: IFormSwitch) => {\n const switchComponent = (\n \n {!switchOnly && (\n \n {indicatorLabels && indicatorLabels.length > 1\n ? indicatorLabels[1]\n : \"OFF\"}\n
\n )}\n \n {!switchOnly && (\n \n {indicatorLabels ? indicatorLabels[0] : \"ON\"}\n \n )}\n \n );\n\n if (switchOnly) {\n return switchComponent;\n }\n\n return (\n
\n \n \n \n \n {label !== \"\" && (\n \n {label}\n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n )}\n
\n \n {description !== \"\" && (\n \n {description}\n \n )}\n \n
\n
\n\n \n {switchComponent}\n
\n \n
\n );\n};\n\nexport default withStyles(styles)(FormSwitchWrapper);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React from \"react\";\nimport {\n Grid,\n IconButton,\n InputLabel,\n TextField,\n TextFieldProps,\n Tooltip,\n} from \"@mui/material\";\nimport { OutlinedInputProps } from \"@mui/material/OutlinedInput\";\nimport { InputProps as StandardInputProps } from \"@mui/material/Input\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n fieldBasic,\n inputFieldStyles,\n tooltipHelper,\n} from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport clsx from \"clsx\";\n\ninterface InputBoxProps {\n label: string;\n classes: any;\n onChange: (e: React.ChangeEvent) => void;\n value: string | boolean;\n id: string;\n name: string;\n disabled?: boolean;\n multiline?: boolean;\n type?: string;\n tooltip?: string;\n autoComplete?: string;\n index?: number;\n error?: string;\n required?: boolean;\n placeholder?: string;\n min?: string;\n max?: string;\n overlayIcon?: any;\n overlayAction?: () => void;\n overlayObject?: any;\n extraInputProps?: StandardInputProps[\"inputProps\"];\n noLabelMinWidth?: boolean;\n pattern?: string;\n autoFocus?: boolean;\n className?: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n textBoxContainer: {\n flexGrow: 1,\n position: \"relative\",\n },\n overlayAction: {\n position: \"absolute\",\n right: 5,\n top: 6,\n \"& svg\": {\n maxWidth: 15,\n maxHeight: 15,\n },\n \"&.withLabel\": {\n top: 5,\n },\n },\n inputLabel: {\n ...fieldBasic.inputLabel,\n fontWeight: \"normal\",\n },\n });\n\nconst inputStyles = makeStyles((theme: Theme) =>\n createStyles({\n ...inputFieldStyles,\n })\n);\n\nfunction InputField(props: TextFieldProps) {\n const classes = inputStyles();\n\n return (\n }\n {...props}\n />\n );\n}\n\nconst InputBoxWrapper = ({\n label,\n onChange,\n value,\n id,\n name,\n type = \"text\",\n autoComplete = \"off\",\n disabled = false,\n multiline = false,\n tooltip = \"\",\n index = 0,\n error = \"\",\n required = false,\n placeholder = \"\",\n min,\n max,\n overlayIcon = null,\n overlayObject = null,\n extraInputProps = {},\n overlayAction,\n noLabelMinWidth = false,\n pattern = \"\",\n autoFocus = false,\n classes,\n className = \"\",\n}: InputBoxProps) => {\n let inputProps: any = { \"data-index\": index, ...extraInputProps };\n\n if (type === \"number\" && min) {\n inputProps[\"min\"] = min;\n }\n\n if (type === \"number\" && max) {\n inputProps[\"max\"] = max;\n }\n\n if (pattern !== \"\") {\n inputProps[\"pattern\"] = pattern;\n }\n\n return (\n \n \n {label !== \"\" && (\n \n \n {label}\n {required ? \"*\" : \"\"}\n \n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n \n )}\n\n
\n \n {overlayIcon && (\n \n {\n overlayAction();\n }\n : () => null\n }\n size={\"small\"}\n disableFocusRipple={false}\n disableRipple={false}\n disableTouchRipple={false}\n >\n {overlayIcon}\n \n
\n )}\n {overlayObject && (\n \n {overlayObject}\n \n )}\n \n \n
\n );\n};\n\nexport default withStyles(styles)(InputBoxWrapper);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React from \"react\";\nimport clsx from \"clsx\";\nimport Grid from \"@mui/material/Grid\";\nimport RadioGroup from \"@mui/material/RadioGroup\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Radio, { RadioProps } from \"@mui/material/Radio\";\nimport { InputLabel, Tooltip } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport { fieldBasic, radioIcons, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\n\nexport interface SelectorTypes {\n label: string;\n value: string;\n}\n\ninterface RadioGroupProps {\n selectorOptions: SelectorTypes[];\n currentSelection: string;\n label: string;\n id: string;\n name: string;\n tooltip?: string;\n disableOptions?: boolean;\n onChange: (e: React.ChangeEvent) => void;\n classes: any;\n displayInColumn?: boolean;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n optionLabel: {\n \"&.Mui-disabled\": {\n \"& .MuiFormControlLabel-label\": {\n color: \"#9c9c9c\",\n },\n },\n \"&:last-child\": {\n marginRight: 0,\n },\n \"& .MuiFormControlLabel-label\": {\n fontSize: 12,\n color: \"#07193E\",\n },\n },\n checkedOption: {\n \"& .MuiFormControlLabel-label\": {\n fontSize: 12,\n color: \"#07193E\",\n fontWeight: 700,\n },\n },\n });\n\nconst radioStyles = makeStyles({\n root: {\n \"&:hover\": {\n backgroundColor: \"transparent\",\n },\n },\n ...radioIcons,\n});\n\nconst RadioButton = (props: RadioProps) => {\n const classes = radioStyles();\n\n return (\n }\n icon={}\n {...props}\n />\n );\n};\n\nexport const RadioGroupSelector = ({\n selectorOptions = [],\n currentSelection,\n label,\n id,\n name,\n onChange,\n tooltip = \"\",\n disableOptions = false,\n classes,\n displayInColumn = false,\n}: RadioGroupProps) => {\n return (\n \n \n \n {label}\n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n
\n \n \n {selectorOptions.map((selectorOption) => {\n return (\n }\n label={selectorOption.label}\n disabled={disableOptions}\n className={clsx(classes.optionLabel, {\n [classes.checkedOption]:\n selectorOption.value === currentSelection,\n })}\n />\n );\n })}\n \n \n
\n );\n};\n\nexport default withStyles(styles)(RadioGroupSelector);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport {\n FormControl,\n InputLabel,\n MenuItem,\n Select,\n InputBase,\n Tooltip,\n SelectChangeEvent,\n} from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\n\nexport interface selectorTypes {\n label: string;\n value: string;\n}\n\ninterface SelectProps {\n options: selectorTypes[];\n value: string;\n label: string;\n id: string;\n name: string;\n tooltip?: string;\n onChange: (e: SelectChangeEvent) => void;\n disabled?: boolean;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n inputLabel: {\n ...fieldBasic.inputLabel,\n \"& span\": {\n fontWeight: \"normal\",\n },\n },\n fieldContainer: {\n display: \"flex\",\n \"@media (max-width: 600px)\": {\n flexFlow: \"column\",\n },\n },\n });\n\nconst SelectStyled = withStyles((theme: Theme) =>\n createStyles({\n root: {\n height: 38,\n lineHeight: 1,\n \"label + &\": {\n marginTop: theme.spacing(3),\n },\n },\n input: {\n height: 38,\n position: \"relative\",\n color: \"#07193E\",\n fontSize: 13,\n fontWeight: 600,\n padding: \"8px 20px 10px 10px\",\n border: \"#e5e5e5 1px solid\",\n borderRadius: 4,\n display: \"flex\",\n alignItems: \"center\",\n \"&:hover\": {\n borderColor: \"#393939\",\n },\n \"&:focus\": {\n backgroundColor: \"#fff\",\n },\n },\n })\n)(InputBase);\n\nconst SelectWrapper = ({\n classes,\n id,\n name,\n onChange,\n options,\n label,\n tooltip = \"\",\n value,\n disabled = false,\n}: SelectProps) => {\n return (\n \n \n {label !== \"\" && (\n \n {label}\n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n )}\n \n }\n disabled={disabled}\n >\n {options.map((option) => (\n \n {option.label}\n \n ))}\n \n \n
\n
\n );\n};\n\nexport default withStyles(styles)(SelectWrapper);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\n// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport ArrowRightIcon from \"@mui/icons-material/ArrowRight\";\nimport ErrorOutlineIcon from \"@mui/icons-material/ErrorOutline\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"../../../../../store\";\nimport {\n setErrorSnackMessage,\n setModalErrorSnackMessage,\n} from \"../../../../../actions\";\nimport { snackBarMessage } from \"../../../../../types\";\n\ninterface ImodalErrorProps {\n customStyle?: any;\n classes: any;\n modalSnackMessage: snackBarMessage;\n displayErrorMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n modalErrorContainer: {\n position: \"absolute\",\n marginTop: 10,\n width: \"80%\",\n backgroundColor: \"#fff\",\n border: \"#C72C48 1px solid\",\n borderLeftWidth: 12,\n borderRadius: 3,\n zIndex: 1000,\n padding: \"10px 15px\",\n left: \"50%\",\n transform: \"translateX(-50%)\",\n opacity: 0,\n transitionDuration: \"0.2s\",\n },\n modalErrorShow: {\n opacity: 1,\n },\n closeButton: {\n position: \"absolute\",\n right: 5,\n fontSize: \"small\",\n border: 0,\n backgroundColor: \"#fff\",\n cursor: \"pointer\",\n },\n errorTitle: {\n display: \"flex\",\n alignItems: \"center\",\n },\n errorLabel: {\n color: \"#000\",\n fontSize: 18,\n fontWeight: 500,\n marginLeft: 5,\n marginRight: 25,\n },\n messageIcon: {\n color: \"#C72C48\",\n display: \"flex\",\n \"& svg\": {\n width: 32,\n height: 32,\n },\n },\n detailsButton: {\n color: \"#9C9C9C\",\n display: \"flex\",\n alignItems: \"center\",\n border: 0,\n backgroundColor: \"transparent\",\n paddingLeft: 5,\n fontSize: 14,\n transformDuration: \"0.3s\",\n cursor: \"pointer\",\n },\n extraDetailsContainer: {\n fontStyle: \"italic\",\n color: \"#9C9C9C\",\n lineHeight: 0,\n padding: \"0 10px\",\n transition: \"all .2s ease-in-out\",\n overflow: \"hidden\",\n },\n extraDetailsOpen: {\n lineHeight: 1,\n padding: \"3px 10px\",\n },\n arrowElement: {\n marginLeft: -5,\n },\n arrowOpen: {\n transform: \"rotateZ(90deg)\",\n transformDuration: \"0.3s\",\n },\n });\n\nvar timerI: any;\n\nconst startHideTimer = (callbackFunction: () => void) => {\n timerI = setInterval(callbackFunction, 10000);\n};\n\nconst stopHideTimer = () => {\n clearInterval(timerI);\n};\n\nconst ModalError = ({\n classes,\n modalSnackMessage,\n displayErrorMessage,\n customStyle,\n}: ImodalErrorProps) => {\n const [detailsOpen, setDetailsOpen] = useState(false);\n const [displayErrorMsg, setDisplayErrorMsg] = useState(false);\n\n const closeErrorMessage = useCallback(() => {\n setDisplayErrorMsg(false);\n }, []);\n\n useEffect(() => {\n if (!displayErrorMsg) {\n displayErrorMessage({ detailedError: \"\", errorMessage: \"\" });\n setDetailsOpen(false);\n //clearInterval(timerI);\n }\n }, [displayErrorMessage, displayErrorMsg]);\n\n useEffect(() => {\n if (\n modalSnackMessage.message !== \"\" &&\n modalSnackMessage.type === \"error\"\n ) {\n //Error message received, we trigger the animation\n setDisplayErrorMsg(true);\n //startHideTimer(closeErrorMessage);\n }\n }, [closeErrorMessage, modalSnackMessage.message, modalSnackMessage.type]);\n\n const detailsToggle = () => {\n setDetailsOpen(!detailsOpen);\n };\n\n const message = get(modalSnackMessage, \"message\", \"\");\n const messageDetails = get(modalSnackMessage, \"detailedErrorMsg\", \"\");\n\n if (modalSnackMessage.type !== \"error\" || message === \"\") {\n return null;\n }\n\n return (\n \n startHideTimer(closeErrorMessage)}\n >\n \n
\n \n \n \n {message}\n
\n {messageDetails !== \"\" && (\n \n
\n \n
\n \n {messageDetails}\n \n
\n )}\n \n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n modalSnackMessage: state.system.modalSnackBar,\n});\n\nconst mapDispatchToProps = {\n displayErrorMessage: setModalErrorSnackMessage,\n};\n\nconst connector = connect(mapState, mapDispatchToProps);\n\nexport default connector(withStyles(styles)(ModalError));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Snackbar from \"@mui/material/Snackbar\";\nimport { Dialog, DialogContent, DialogTitle } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n deleteDialogStyles,\n snackBarCommon,\n} from \"../FormComponents/common/styleLibrary\";\nimport { AppState } from \"../../../../store\";\nimport { snackBarMessage } from \"../../../../types\";\nimport { setModalSnackMessage } from \"../../../../actions\";\nimport ModalError from \"../FormComponents/ModalError/ModalError\";\nimport CloseIcon from \"@mui/icons-material/Close\";\n\ninterface IModalProps {\n classes: any;\n onClose: () => void;\n modalOpen: boolean;\n title: string | React.ReactNode;\n children: any;\n wideLimit?: boolean;\n modalSnackMessage?: snackBarMessage;\n noContentPadding?: boolean;\n setModalSnackMessage: typeof setModalSnackMessage;\n titleIcon?: React.ReactNode;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...deleteDialogStyles,\n root: {\n \"& .MuiPaper-root\": {\n padding: \"1rem 2rem 2rem 1rem\",\n },\n },\n content: {\n padding: 25,\n paddingBottom: 0,\n },\n customDialogSize: {\n width: \"100%\",\n maxWidth: 765,\n },\n ...snackBarCommon,\n });\n\nconst ModalWrapper = ({\n onClose,\n modalOpen,\n title,\n children,\n classes,\n wideLimit = true,\n modalSnackMessage,\n noContentPadding,\n setModalSnackMessage,\n titleIcon = null,\n}: IModalProps) => {\n const [openSnackbar, setOpenSnackbar] = useState(false);\n\n useEffect(() => {\n setModalSnackMessage(\"\");\n }, [setModalSnackMessage]);\n\n useEffect(() => {\n if (modalSnackMessage) {\n if (modalSnackMessage.message === \"\") {\n setOpenSnackbar(false);\n return;\n }\n // Open SnackBar\n if (modalSnackMessage.type !== \"error\") {\n setOpenSnackbar(true);\n }\n }\n }, [modalSnackMessage]);\n\n const closeSnackBar = () => {\n setOpenSnackbar(false);\n setModalSnackMessage(\"\");\n };\n\n const customSize = wideLimit\n ? {\n classes: {\n paper: classes.customDialogSize,\n },\n }\n : { maxWidth: \"lg\" as const, fullWidth: true };\n\n let message = \"\";\n\n if (modalSnackMessage) {\n message = modalSnackMessage.detailedErrorMsg;\n if (\n modalSnackMessage.detailedErrorMsg === \"\" ||\n modalSnackMessage.detailedErrorMsg.length < 5\n ) {\n message = modalSnackMessage.message;\n }\n }\n\n return (\n {\n if (reason !== \"backdropClick\") {\n onClose(); // close on Esc but not on click outside\n }\n }}\n className={classes.root}\n >\n \n
\n {titleIcon} {title}\n
\n
\n \n \n \n
\n
\n\n \n {\n closeSnackBar();\n }}\n message={message}\n ContentProps={{\n className: `${classes.snackBar} ${\n modalSnackMessage && modalSnackMessage.type === \"error\"\n ? classes.errorSnackBar\n : \"\"\n }`,\n }}\n autoHideDuration={\n modalSnackMessage && modalSnackMessage.type === \"error\" ? 10000 : 5000\n }\n />\n \n {children}\n \n \n );\n};\n\nconst mapState = (state: AppState) => ({\n modalSnackMessage: state.system.modalSnackBar,\n});\n\nconst connector = connect(mapState, {\n setModalSnackMessage,\n});\n\nexport default withStyles(styles)(connector(ModalWrapper));\n"],"names":["connector","connect","setModalErrorSnackMessage","withStyles","theme","createStyles","formFieldStyles","modalStyleUtils","classes","open","enabled","cfg","selectedBucket","closeModalAndRefresh","useState","loading","setLoading","quotaEnabled","setQuotaEnabled","quotaType","setQuotaType","quotaSize","setQuotaSize","quotaUnit","setQuotaUnit","useEffect","type","quota","maxUnit","maxQuota","i","units","Math","pow","modalOpen","onClose","title","titleIcon","noValidate","autoComplete","onSubmit","e","event","preventDefault","req","amount","parseInt","getBytes","quota_type","api","then","catch","err","enableBucketEncryption","container","item","xs","className","formScrollable","formFieldRow","value","id","name","checked","onChange","target","label","currentSelection","selectorOptions","required","min","style","width","options","factorForDropdown","modalButtonBar","variant","color","disabled","onClick","StyledSwitch","root","height","padding","margin","switchBase","transform","palette","common","white","backgroundColor","boxShadow","opacity","border","thumb","marginLeft","track","borderRadius","transition","transitions","create","focusVisible","switchContainer","display","alignItems","justifyContent","Switch","divContainer","marginBottom","indicatorLabelOn","fontWeight","indicatorLabel","fontSize","fieldDescription","marginTop","tooltip","actionsTray","fieldBasic","switchOnly","description","indicatorLabels","switchComponent","clsx","length","inputProps","disableRipple","disableFocusRipple","disableTouchRipple","sm","md","htmlFor","inputLabel","tooltipContainer","placement","textAlign","component","inputStyles","makeStyles","inputFieldStyles","InputField","props","InputProps","tooltipHelper","textBoxContainer","flexGrow","position","overlayAction","right","top","maxWidth","maxHeight","multiline","index","error","placeholder","max","overlayIcon","overlayObject","extraInputProps","noLabelMinWidth","pattern","autoFocus","errorInField","inputBoxContainer","noMinWidthLabel","fullWidth","helperText","inputRebase","size","radioStyles","radioIcons","RadioButton","checkedIcon","radioSelectedIcon","icon","radioUnselectedIcon","optionLabel","marginRight","checkedOption","disableOptions","displayInColumn","radioOptionsLayout","row","map","selectorOption","control","SelectStyled","lineHeight","spacing","input","borderColor","InputBase","fieldContainer","flexFlow","option","timerI","stopHideTimer","clearInterval","mapDispatchToProps","displayErrorMessage","state","modalSnackMessage","system","modalSnackBar","modalErrorContainer","borderLeftWidth","zIndex","left","transitionDuration","modalErrorShow","closeButton","cursor","errorTitle","errorLabel","messageIcon","detailsButton","paddingLeft","transformDuration","extraDetailsContainer","fontStyle","overflow","extraDetailsOpen","arrowElement","arrowOpen","customStyle","detailsOpen","setDetailsOpen","displayErrorMsg","setDisplayErrorMsg","closeErrorMessage","useCallback","detailedError","errorMessage","message","get","messageDetails","Fragment","onMouseOver","onMouseLeave","setInterval","Close","ErrorOutline","detailsContainerLink","ArrowRight","setModalSnackMessage","deleteDialogStyles","content","paddingBottom","customDialogSize","snackBarCommon","children","wideLimit","noContentPadding","openSnackbar","setOpenSnackbar","customSize","paper","detailedErrorMsg","Dialog","scroll","reason","DialogTitle","titleText","closeContainer","IconButton","Snackbar","snackBarModal","ContentProps","snackBar","errorSnackBar","autoHideDuration","DialogContent"],"sourceRoot":""} \ No newline at end of file diff --git a/portal-ui/build/static/js/1719.191f462f.chunk.js b/portal-ui/build/static/js/1719.fbaa408a.chunk.js similarity index 99% rename from portal-ui/build/static/js/1719.191f462f.chunk.js rename to portal-ui/build/static/js/1719.fbaa408a.chunk.js index 01abd47e1..631384e41 100644 --- a/portal-ui/build/static/js/1719.191f462f.chunk.js +++ b/portal-ui/build/static/js/1719.fbaa408a.chunk.js @@ -1,2 +1,2 @@ -"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1719],{66964:function(n,t,e){var o=e(18489),a=e(50390),i=e(12066),r=e(25594),s=e(14602),l=e(94187),c=e(95467),d=e(86509),u=e(62449),g=e(4285),p=e(72462),m=e(97538),f=e(44977),v=e(62559),Z=(0,u.Z)((function(n){return(0,d.Z)((0,o.Z)({},p.gM))}));function h(n){var t=Z();return(0,v.jsx)(i.Z,(0,o.Z)({InputProps:{classes:t}},n))}t.Z=(0,g.Z)((function(n){return(0,d.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},p.YI),p.Hr),{},{textBoxContainer:{flexGrow:1,position:"relative"},overlayAction:{position:"absolute",right:5,top:6,"& svg":{maxWidth:15,maxHeight:15},"&.withLabel":{top:5}},inputLabel:(0,o.Z)((0,o.Z)({},p.YI.inputLabel),{},{fontWeight:"normal"})}))}))((function(n){var t=n.label,e=n.onChange,i=n.value,d=n.id,u=n.name,g=n.type,p=void 0===g?"text":g,Z=n.autoComplete,x=void 0===Z?"off":Z,b=n.disabled,I=void 0!==b&&b,j=n.multiline,P=void 0!==j&&j,y=n.tooltip,S=void 0===y?"":y,C=n.index,L=void 0===C?0:C,N=n.error,w=void 0===N?"":N,M=n.required,E=void 0!==M&&M,k=n.placeholder,R=void 0===k?"":k,T=n.min,B=n.max,F=n.overlayIcon,D=void 0===F?null:F,A=n.overlayObject,W=void 0===A?null:A,K=n.extraInputProps,O=void 0===K?{}:K,z=n.overlayAction,G=n.noLabelMinWidth,H=void 0!==G&&G,Y=n.pattern,$=void 0===Y?"":Y,_=n.autoFocus,q=void 0!==_&&_,Q=n.classes,V=n.className,X=void 0===V?"":V,J=(0,o.Z)({"data-index":L},O);return"number"===p&&T&&(J.min=T),"number"===p&&B&&(J.max=B),""!==$&&(J.pattern=$),(0,v.jsx)(a.Fragment,{children:(0,v.jsxs)(r.ZP,{container:!0,className:(0,f.Z)(""!==X?X:"",""!==w?Q.errorInField:Q.inputBoxContainer),children:[""!==t&&(0,v.jsxs)(s.Z,{htmlFor:d,className:H?Q.noMinWidthLabel:Q.inputLabel,children:[(0,v.jsxs)("span",{children:[t,E?"*":""]}),""!==S&&(0,v.jsx)("div",{className:Q.tooltipContainer,children:(0,v.jsx)(l.Z,{title:S,placement:"top-start",children:(0,v.jsx)("div",{className:Q.tooltip,children:(0,v.jsx)(m.Z,{})})})})]}),(0,v.jsxs)("div",{className:Q.textBoxContainer,children:[(0,v.jsx)(h,{id:d,name:u,fullWidth:!0,value:i,autoFocus:q,disabled:I,onChange:e,type:p,multiline:P,autoComplete:x,inputProps:J,error:""!==w,helperText:w,placeholder:R,className:Q.inputRebase}),D&&(0,v.jsx)("div",{className:"".concat(Q.overlayAction," ").concat(""!==t?"withLabel":""),children:(0,v.jsx)(c.Z,{onClick:z?function(){z()}:function(){return null},size:"small",disableFocusRipple:!1,disableRipple:!1,disableTouchRipple:!1,children:D})}),W&&(0,v.jsx)("div",{className:"".concat(Q.overlayAction," ").concat(""!==t?"withLabel":""),children:W})]})]})})}))},21639:function(n,t,e){var o=e(23430),a=e(50390),i=e(30324);t.Z=function(n,t){var e=(0,a.useState)(!1),r=(0,o.Z)(e,2),s=r[0],l=r[1];return[s,function(e,o,a){l(!0),i.Z.invoke(e,o,a).then((function(t){l(!1),n(t)})).catch((function(n){l(!1),t(n)}))}]}},60656:function(n,t,e){var o=e(18489),a=e(50390),i=e(84402),r=e(78426),s=e(93085),l=e(7887),c=e(66946),d=e(14476),u=e(95467),g=e(21278),p=e(86509),m=e(4285),f=e(72462),v=e(62559);t.Z=(0,m.Z)((function(n){return(0,p.Z)((0,o.Z)({},f.Qw))}))((function(n){var t=n.isOpen,e=void 0!==t&&t,p=n.onClose,m=n.onCancel,f=n.onConfirm,Z=n.classes,h=void 0===Z?{}:Z,x=n.title,b=void 0===x?"":x,I=n.isLoading,j=n.confirmationContent,P=n.cancelText,y=void 0===P?"Cancel":P,S=n.confirmText,C=void 0===S?"Confirm":S,L=n.confirmButtonProps,N=void 0===L?{}:L,w=n.cancelButtonProps,M=void 0===w?{}:w,E=n.titleIcon,k=void 0===E?null:E;return(0,v.jsxs)(i.Z,{open:e,onClose:function(n,t){"backdropClick"!==t&&p()},className:h.root,sx:{"& .MuiPaper-root":{padding:"1rem 2rem 2rem 1rem"}},children:[(0,v.jsxs)(r.Z,{className:h.title,children:[(0,v.jsxs)("div",{className:h.titleText,children:[k," ",b]}),(0,v.jsx)("div",{className:h.closeContainer,children:(0,v.jsx)(u.Z,{"aria-label":"close",className:h.closeButton,onClick:p,disableRipple:!0,size:"small",children:(0,v.jsx)(g.Z,{})})})]}),(0,v.jsx)(s.Z,{className:h.content,children:j}),(0,v.jsxs)(l.Z,{className:h.actions,children:[(0,v.jsx)(c.Z,(0,o.Z)((0,o.Z)({className:h.cancelButton,onClick:m||p,disabled:I,type:"button"},M),{},{variant:"outlined",color:"primary",children:y})),(0,v.jsx)(d.Z,(0,o.Z)((0,o.Z)({className:h.confirmButton,type:"button",onClick:f,loading:I,disabled:I,variant:"outlined",color:"secondary",loadingPosition:"start",startIcon:(0,v.jsx)(a.Fragment,{}),autoFocus:!0},N),{},{children:C}))]})]})}))},51719:function(n,t,e){e.r(t),e.d(t,{default:function(){return P}});var o=e(23430),a=e(18489),i=e(50390),r=e(34424),s=e(86509),l=e(4285),c=e(72462),d=e(28948),u=e(44149),g=e(30324),p=e(17777),m=e(23473),f=e(66964),v=e(25594),Z=e(21639),h=e(60656),x=e(77138),b=e(62559),I=(0,r.$j)(null,{setErrorSnackMessage:u.Ih})((function(n){var t=n.deleteOpen,e=n.selectedPod,a=n.closeDeleteModalAndRefresh,r=n.setErrorSnackMessage,s=(0,i.useState)(""),l=(0,o.Z)(s,2),c=l[0],d=l[1],u=(0,Z.Z)((function(){return a(!0)}),(function(n){return r(n)})),g=(0,o.Z)(u,2),p=g[0],I=g[1];return(0,b.jsx)(h.Z,{title:"Delete Pod",confirmText:"Delete",isOpen:t,titleIcon:(0,b.jsx)(x.Nv,{}),isLoading:p,onConfirm:function(){c===e.name?I("DELETE","/api/v1/namespaces/".concat(e.namespace,"/tenants/").concat(e.tenant,"/pods/").concat(e.name)):r({errorMessage:"Tenant name is incorrect",detailedError:""})},onClose:function(){return a(!1)},confirmButtonProps:{disabled:c!==e.name||p},confirmationContent:(0,b.jsxs)(m.Z,{children:["To continue please type ",(0,b.jsx)("b",{children:e.name})," in the box.",(0,b.jsx)(v.ZP,{item:!0,xs:12,children:(0,b.jsx)(f.Z,{id:"retype-pod",name:"retype-pod",onChange:function(n){d(n.target.value)},label:"",value:c})})]})})})),j=(0,r.$j)((function(n){return{loadingTenant:n.tenants.tenantDetails.loadingTenant}}),{setErrorSnackMessage:u.Ih}),P=(0,l.Z)((function(n){return(0,s.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},c.oZ),c.VX),(0,c.Bz)(n.spacing(4))))}))(j((function(n){var t=n.classes,e=n.match,a=n.history,r=n.loadingTenant,s=(0,i.useState)([]),l=(0,o.Z)(s,2),c=l[0],m=l[1],f=(0,i.useState)(!0),Z=(0,o.Z)(f,2),h=Z[0],x=Z[1],j=(0,i.useState)(!1),P=(0,o.Z)(j,2),y=P[0],S=P[1],C=(0,i.useState)(null),L=(0,o.Z)(C,2),N=L[0],w=L[1],M=e.params.tenantName,E=e.params.tenantNamespace,k=[{type:"view",onClick:function(n){a.push("/namespaces/".concat(E,"/tenants/").concat(M,"/pods/").concat(n.name))}},{type:"delete",onClick:function(n){n.tenant=M,n.namespace=E,w(n),S(!0)}}];return(0,i.useEffect)((function(){r&&x(!0)}),[r]),(0,i.useEffect)((function(){h&&g.Z.invoke("GET","/api/v1/namespaces/".concat(E,"/tenants/").concat(M,"/pods")).then((function(n){for(var t=0;t :not(:first-of-type)":{marginLeft:8}})})),f=i.forwardRef((function(n,t){var e=(0,c.Z)({props:n,name:"MuiDialogActions"}),i=e.className,l=e.disableSpacing,d=void 0!==l&&l,f=(0,o.Z)(e,p),v=(0,a.Z)({},e,{disableSpacing:d}),Z=function(n){var t=n.classes,e={root:["root",!n.disableSpacing&&"spacing"]};return(0,s.Z)(e,u,t)}(v);return(0,g.jsx)(m,(0,a.Z)({className:(0,r.Z)(Z.root,i),ownerState:v,ref:t},f))}))},23473:function(n,t,e){e.d(t,{Z:function(){return f}});var o=e(1048),a=e(32793),i=e(50390),r=e(50076),s=e(8208),l=e(15573),c=e(35477),d=e(10594);function u(n){return(0,d.Z)("MuiDialogContentText",n)}(0,e(43349).Z)("MuiDialogContentText",["root"]);var g=e(62559),p=["children"],m=(0,s.ZP)(c.Z,{shouldForwardProp:function(n){return(0,s.FO)(n)||"classes"===n},name:"MuiDialogContentText",slot:"Root",overridesResolver:function(n,t){return t.root}})({}),f=i.forwardRef((function(n,t){var e=(0,l.Z)({props:n,name:"MuiDialogContentText"}),i=(0,o.Z)(e,p),s=function(n){var t=n.classes,e=(0,r.Z)({root:["root"]},u,t);return(0,a.Z)({},t,e)}(i);return(0,g.jsx)(m,(0,a.Z)({component:"p",variant:"body1",color:"text.secondary",ref:t,ownerState:i},e,{classes:s}))}))}}]); -//# sourceMappingURL=1719.191f462f.chunk.js.map \ No newline at end of file +"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1719],{66964:function(n,t,e){var o=e(18489),a=e(50390),i=e(12066),r=e(25594),s=e(14602),l=e(94187),c=e(95467),d=e(86509),u=e(62449),g=e(4285),p=e(72462),m=e(97538),f=e(44977),v=e(62559),Z=(0,u.Z)((function(n){return(0,d.Z)((0,o.Z)({},p.gM))}));function h(n){var t=Z();return(0,v.jsx)(i.Z,(0,o.Z)({InputProps:{classes:t}},n))}t.Z=(0,g.Z)((function(n){return(0,d.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},p.YI),p.Hr),{},{textBoxContainer:{flexGrow:1,position:"relative"},overlayAction:{position:"absolute",right:5,top:6,"& svg":{maxWidth:15,maxHeight:15},"&.withLabel":{top:5}},inputLabel:(0,o.Z)((0,o.Z)({},p.YI.inputLabel),{},{fontWeight:"normal"})}))}))((function(n){var t=n.label,e=n.onChange,i=n.value,d=n.id,u=n.name,g=n.type,p=void 0===g?"text":g,Z=n.autoComplete,x=void 0===Z?"off":Z,b=n.disabled,I=void 0!==b&&b,j=n.multiline,P=void 0!==j&&j,y=n.tooltip,S=void 0===y?"":y,C=n.index,L=void 0===C?0:C,N=n.error,w=void 0===N?"":N,M=n.required,E=void 0!==M&&M,k=n.placeholder,R=void 0===k?"":k,T=n.min,B=n.max,F=n.overlayIcon,D=void 0===F?null:F,A=n.overlayObject,W=void 0===A?null:A,K=n.extraInputProps,O=void 0===K?{}:K,z=n.overlayAction,G=n.noLabelMinWidth,H=void 0!==G&&G,Y=n.pattern,$=void 0===Y?"":Y,_=n.autoFocus,q=void 0!==_&&_,Q=n.classes,V=n.className,X=void 0===V?"":V,J=(0,o.Z)({"data-index":L},O);return"number"===p&&T&&(J.min=T),"number"===p&&B&&(J.max=B),""!==$&&(J.pattern=$),(0,v.jsx)(a.Fragment,{children:(0,v.jsxs)(r.ZP,{container:!0,className:(0,f.Z)(""!==X?X:"",""!==w?Q.errorInField:Q.inputBoxContainer),children:[""!==t&&(0,v.jsxs)(s.Z,{htmlFor:d,className:H?Q.noMinWidthLabel:Q.inputLabel,children:[(0,v.jsxs)("span",{children:[t,E?"*":""]}),""!==S&&(0,v.jsx)("div",{className:Q.tooltipContainer,children:(0,v.jsx)(l.Z,{title:S,placement:"top-start",children:(0,v.jsx)("div",{className:Q.tooltip,children:(0,v.jsx)(m.Z,{})})})})]}),(0,v.jsxs)("div",{className:Q.textBoxContainer,children:[(0,v.jsx)(h,{id:d,name:u,fullWidth:!0,value:i,autoFocus:q,disabled:I,onChange:e,type:p,multiline:P,autoComplete:x,inputProps:J,error:""!==w,helperText:w,placeholder:R,className:Q.inputRebase}),D&&(0,v.jsx)("div",{className:"".concat(Q.overlayAction," ").concat(""!==t?"withLabel":""),children:(0,v.jsx)(c.Z,{onClick:z?function(){z()}:function(){return null},size:"small",disableFocusRipple:!1,disableRipple:!1,disableTouchRipple:!1,children:D})}),W&&(0,v.jsx)("div",{className:"".concat(Q.overlayAction," ").concat(""!==t?"withLabel":""),children:W})]})]})})}))},21639:function(n,t,e){var o=e(23430),a=e(50390),i=e(30324);t.Z=function(n,t){var e=(0,a.useState)(!1),r=(0,o.Z)(e,2),s=r[0],l=r[1];return[s,function(e,o,a){l(!0),i.Z.invoke(e,o,a).then((function(t){l(!1),n(t)})).catch((function(n){l(!1),t(n)}))}]}},60656:function(n,t,e){var o=e(18489),a=e(50390),i=e(84402),r=e(78426),s=e(93085),l=e(7887),c=e(66946),d=e(14476),u=e(95467),g=e(21278),p=e(86509),m=e(4285),f=e(72462),v=e(62559);t.Z=(0,m.Z)((function(n){return(0,p.Z)((0,o.Z)({},f.Qw))}))((function(n){var t=n.isOpen,e=void 0!==t&&t,p=n.onClose,m=n.onCancel,f=n.onConfirm,Z=n.classes,h=void 0===Z?{}:Z,x=n.title,b=void 0===x?"":x,I=n.isLoading,j=n.confirmationContent,P=n.cancelText,y=void 0===P?"Cancel":P,S=n.confirmText,C=void 0===S?"Confirm":S,L=n.confirmButtonProps,N=void 0===L?{}:L,w=n.cancelButtonProps,M=void 0===w?{}:w,E=n.titleIcon,k=void 0===E?null:E;return(0,v.jsxs)(i.Z,{open:e,onClose:function(n,t){"backdropClick"!==t&&p()},className:h.root,sx:{"& .MuiPaper-root":{padding:"1rem 2rem 2rem 1rem"}},children:[(0,v.jsxs)(r.Z,{className:h.title,children:[(0,v.jsxs)("div",{className:h.titleText,children:[k," ",b]}),(0,v.jsx)("div",{className:h.closeContainer,children:(0,v.jsx)(u.Z,{"aria-label":"close",className:h.closeButton,onClick:p,disableRipple:!0,size:"small",children:(0,v.jsx)(g.Z,{})})})]}),(0,v.jsx)(s.Z,{className:h.content,children:j}),(0,v.jsxs)(l.Z,{className:h.actions,children:[(0,v.jsx)(c.Z,(0,o.Z)((0,o.Z)({className:h.cancelButton,onClick:m||p,disabled:I,type:"button"},M),{},{variant:"outlined",color:"primary",children:y})),(0,v.jsx)(d.Z,(0,o.Z)((0,o.Z)({className:h.confirmButton,type:"button",onClick:f,loading:I,disabled:I,variant:"outlined",color:"secondary",loadingPosition:"start",startIcon:(0,v.jsx)(a.Fragment,{}),autoFocus:!0},N),{},{children:C}))]})]})}))},51719:function(n,t,e){e.r(t),e.d(t,{default:function(){return P}});var o=e(23430),a=e(18489),i=e(50390),r=e(34424),s=e(86509),l=e(4285),c=e(72462),d=e(28948),u=e(44149),g=e(30324),p=e(17777),m=e(23473),f=e(66964),v=e(25594),Z=e(21639),h=e(60656),x=e(11387),b=e(62559),I=(0,r.$j)(null,{setErrorSnackMessage:u.Ih})((function(n){var t=n.deleteOpen,e=n.selectedPod,a=n.closeDeleteModalAndRefresh,r=n.setErrorSnackMessage,s=(0,i.useState)(""),l=(0,o.Z)(s,2),c=l[0],d=l[1],u=(0,Z.Z)((function(){return a(!0)}),(function(n){return r(n)})),g=(0,o.Z)(u,2),p=g[0],I=g[1];return(0,b.jsx)(h.Z,{title:"Delete Pod",confirmText:"Delete",isOpen:t,titleIcon:(0,b.jsx)(x.Nv,{}),isLoading:p,onConfirm:function(){c===e.name?I("DELETE","/api/v1/namespaces/".concat(e.namespace,"/tenants/").concat(e.tenant,"/pods/").concat(e.name)):r({errorMessage:"Tenant name is incorrect",detailedError:""})},onClose:function(){return a(!1)},confirmButtonProps:{disabled:c!==e.name||p},confirmationContent:(0,b.jsxs)(m.Z,{children:["To continue please type ",(0,b.jsx)("b",{children:e.name})," in the box.",(0,b.jsx)(v.ZP,{item:!0,xs:12,children:(0,b.jsx)(f.Z,{id:"retype-pod",name:"retype-pod",onChange:function(n){d(n.target.value)},label:"",value:c})})]})})})),j=(0,r.$j)((function(n){return{loadingTenant:n.tenants.tenantDetails.loadingTenant}}),{setErrorSnackMessage:u.Ih}),P=(0,l.Z)((function(n){return(0,s.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},c.oZ),c.VX),(0,c.Bz)(n.spacing(4))))}))(j((function(n){var t=n.classes,e=n.match,a=n.history,r=n.loadingTenant,s=(0,i.useState)([]),l=(0,o.Z)(s,2),c=l[0],m=l[1],f=(0,i.useState)(!0),Z=(0,o.Z)(f,2),h=Z[0],x=Z[1],j=(0,i.useState)(!1),P=(0,o.Z)(j,2),y=P[0],S=P[1],C=(0,i.useState)(null),L=(0,o.Z)(C,2),N=L[0],w=L[1],M=e.params.tenantName,E=e.params.tenantNamespace,k=[{type:"view",onClick:function(n){a.push("/namespaces/".concat(E,"/tenants/").concat(M,"/pods/").concat(n.name))}},{type:"delete",onClick:function(n){n.tenant=M,n.namespace=E,w(n),S(!0)}}];return(0,i.useEffect)((function(){r&&x(!0)}),[r]),(0,i.useEffect)((function(){h&&g.Z.invoke("GET","/api/v1/namespaces/".concat(E,"/tenants/").concat(M,"/pods")).then((function(n){for(var t=0;t :not(:first-of-type)":{marginLeft:8}})})),f=i.forwardRef((function(n,t){var e=(0,c.Z)({props:n,name:"MuiDialogActions"}),i=e.className,l=e.disableSpacing,d=void 0!==l&&l,f=(0,o.Z)(e,p),v=(0,a.Z)({},e,{disableSpacing:d}),Z=function(n){var t=n.classes,e={root:["root",!n.disableSpacing&&"spacing"]};return(0,s.Z)(e,u,t)}(v);return(0,g.jsx)(m,(0,a.Z)({className:(0,r.Z)(Z.root,i),ownerState:v,ref:t},f))}))},23473:function(n,t,e){e.d(t,{Z:function(){return f}});var o=e(1048),a=e(32793),i=e(50390),r=e(50076),s=e(8208),l=e(15573),c=e(35477),d=e(10594);function u(n){return(0,d.Z)("MuiDialogContentText",n)}(0,e(43349).Z)("MuiDialogContentText",["root"]);var g=e(62559),p=["children"],m=(0,s.ZP)(c.Z,{shouldForwardProp:function(n){return(0,s.FO)(n)||"classes"===n},name:"MuiDialogContentText",slot:"Root",overridesResolver:function(n,t){return t.root}})({}),f=i.forwardRef((function(n,t){var e=(0,l.Z)({props:n,name:"MuiDialogContentText"}),i=(0,o.Z)(e,p),s=function(n){var t=n.classes,e=(0,r.Z)({root:["root"]},u,t);return(0,a.Z)({},t,e)}(i);return(0,g.jsx)(m,(0,a.Z)({component:"p",variant:"body1",color:"text.secondary",ref:t,ownerState:i},e,{classes:s}))}))}}]); +//# sourceMappingURL=1719.fbaa408a.chunk.js.map \ No newline at end of file diff --git a/portal-ui/build/static/js/1719.191f462f.chunk.js.map b/portal-ui/build/static/js/1719.fbaa408a.chunk.js.map similarity index 99% rename from portal-ui/build/static/js/1719.191f462f.chunk.js.map rename to portal-ui/build/static/js/1719.fbaa408a.chunk.js.map index a061c8d99..0f047ec5c 100644 --- a/portal-ui/build/static/js/1719.191f462f.chunk.js.map +++ b/portal-ui/build/static/js/1719.fbaa408a.chunk.js.map @@ -1 +1 @@ -{"version":3,"file":"static/js/1719.191f462f.chunk.js","mappings":"0QA4FMA,GAAcC,EAAAA,EAAAA,IAAW,SAACC,GAAD,OAC7BC,EAAAA,EAAAA,IAAa,UACRC,EAAAA,QAIP,SAASC,EAAWC,GAClB,IAAMC,EAAUP,IAEhB,OACE,SAAC,KAAD,QACEQ,WAAY,CAAED,QAAAA,IACVD,IAsIV,KAAeG,EAAAA,EAAAA,IA5KA,SAACP,GAAD,OACbC,EAAAA,EAAAA,IAAa,0BACRO,EAAAA,IACAC,EAAAA,IAFO,IAGVC,iBAAkB,CAChBC,SAAU,EACVC,SAAU,YAEZC,cAAe,CACbD,SA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,EAAiC1D,GAC/C,OAAOC,EAAAA,EAAAA,GAAqB,uBAAwBD,IAErBE,E,SAAAA,GAAuB,uBAAwB,CAAC,SAAjF,I,WCFMC,EAAY,CAAC,YAqBbwD,GAAwBtD,EAAAA,EAAAA,IAAOuD,EAAAA,EAAY,CAC/CrD,kBAAmB,SAAAC,GAAI,OAAIC,EAAAA,EAAAA,IAAsBD,IAAkB,YAATA,GAC1D7J,KAAM,uBACNqJ,KAAM,OACNU,kBAAmB,SAACnL,EAAOoL,GAAR,OAAmBA,EAAOhG,OAJjB0F,CAK3B,IA2CH,EA1CuC6B,EAAAA,YAAiB,SAA2BC,EAASC,GAC1F,IAAM7M,GAAQ8M,EAAAA,EAAAA,GAAc,CAC1B9M,MAAO4M,EACPxL,KAAM,yBAGFoK,GAAa2B,EAAAA,EAAAA,GAA8BnN,EAAO4K,GAElD3K,EAzBkB,SAAAuL,GACxB,IACEvL,EACEuL,EADFvL,QAKIwN,GAAkBC,EAAAA,EAAAA,GAHV,CACZtI,KAAM,CAAC,SAEqC+I,EAAkClO,GAChF,OAAOwL,EAAAA,EAAAA,GAAS,GAAIxL,EAASwN,GAiBbE,CAAkBnC,GAClC,OAAoB6B,EAAAA,EAAAA,KAAKe,GAAuB3C,EAAAA,EAAAA,GAAS,CACvD6C,UAAW,IACXzI,QAAS,QACTC,MAAO,iBACP+G,IAAKA,EACLrB,WAAYA,GACXxL,EAAO,CACRC,QAASA","sources":["screens/Console/Common/FormComponents/InputBoxWrapper/InputBoxWrapper.tsx","screens/Console/Common/Hooks/useApi.tsx","screens/Console/Common/ModalWrapper/ConfirmDialog.tsx","screens/Console/Tenants/TenantDetails/DeletePod.tsx","screens/Console/Tenants/TenantDetails/PodsSummary.tsx","../node_modules/@mui/lab/LoadingButton/loadingButtonClasses.js","../node_modules/@mui/lab/LoadingButton/LoadingButton.js","../node_modules/@mui/material/DialogActions/dialogActionsClasses.js","../node_modules/@mui/material/DialogActions/DialogActions.js","../node_modules/@mui/material/DialogContentText/dialogContentTextClasses.js","../node_modules/@mui/material/DialogContentText/DialogContentText.js"],"sourcesContent":["// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React from \"react\";\nimport {\n Grid,\n IconButton,\n InputLabel,\n TextField,\n TextFieldProps,\n Tooltip,\n} from \"@mui/material\";\nimport { OutlinedInputProps } from \"@mui/material/OutlinedInput\";\nimport { InputProps as StandardInputProps } from \"@mui/material/Input\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n fieldBasic,\n inputFieldStyles,\n tooltipHelper,\n} from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport clsx from \"clsx\";\n\ninterface InputBoxProps {\n label: string;\n classes: any;\n onChange: (e: React.ChangeEvent) => void;\n value: string | boolean;\n id: string;\n name: string;\n disabled?: boolean;\n multiline?: boolean;\n type?: string;\n tooltip?: string;\n autoComplete?: string;\n index?: number;\n error?: string;\n required?: boolean;\n placeholder?: string;\n min?: string;\n max?: string;\n overlayIcon?: any;\n overlayAction?: () => void;\n overlayObject?: any;\n extraInputProps?: StandardInputProps[\"inputProps\"];\n noLabelMinWidth?: boolean;\n pattern?: string;\n autoFocus?: boolean;\n className?: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n textBoxContainer: {\n flexGrow: 1,\n position: \"relative\",\n },\n overlayAction: {\n position: \"absolute\",\n right: 5,\n top: 6,\n \"& svg\": {\n maxWidth: 15,\n maxHeight: 15,\n },\n \"&.withLabel\": {\n top: 5,\n },\n },\n inputLabel: {\n ...fieldBasic.inputLabel,\n fontWeight: \"normal\",\n },\n });\n\nconst inputStyles = makeStyles((theme: Theme) =>\n createStyles({\n ...inputFieldStyles,\n })\n);\n\nfunction InputField(props: TextFieldProps) {\n const classes = inputStyles();\n\n return (\n }\n {...props}\n />\n );\n}\n\nconst InputBoxWrapper = ({\n label,\n onChange,\n value,\n id,\n name,\n type = \"text\",\n autoComplete = \"off\",\n disabled = false,\n multiline = false,\n tooltip = \"\",\n index = 0,\n error = \"\",\n required = false,\n placeholder = \"\",\n min,\n max,\n overlayIcon = null,\n overlayObject = null,\n extraInputProps = {},\n overlayAction,\n noLabelMinWidth = false,\n pattern = \"\",\n autoFocus = false,\n classes,\n className = \"\",\n}: InputBoxProps) => {\n let inputProps: any = { \"data-index\": index, ...extraInputProps };\n\n if (type === \"number\" && min) {\n inputProps[\"min\"] = min;\n }\n\n if (type === \"number\" && max) {\n inputProps[\"max\"] = max;\n }\n\n if (pattern !== \"\") {\n inputProps[\"pattern\"] = pattern;\n }\n\n return (\n \n \n {label !== \"\" && (\n \n \n {label}\n {required ? \"*\" : \"\"}\n \n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n \n )}\n\n
\n \n {overlayIcon && (\n \n {\n overlayAction();\n }\n : () => null\n }\n size={\"small\"}\n disableFocusRipple={false}\n disableRipple={false}\n disableTouchRipple={false}\n >\n {overlayIcon}\n \n
\n )}\n {overlayObject && (\n \n {overlayObject}\n \n )}\n \n \n
\n );\n};\n\nexport default withStyles(styles)(InputBoxWrapper);\n","import { useState } from \"react\";\nimport api from \"../../../../common/api\";\nimport { ErrorResponseHandler } from \"../../../../common/types\";\n\ntype NoReturnFunction = (param?: any) => void;\ntype ApiMethodToInvoke = (method: string, url: string, data?: any) => void;\ntype IsApiInProgress = boolean;\n\nconst useApi = (\n onSuccess: NoReturnFunction,\n onError: NoReturnFunction\n): [IsApiInProgress, ApiMethodToInvoke] => {\n const [isLoading, setIsLoading] = useState(false);\n\n const callApi = (method: string, url: string, data?: any) => {\n setIsLoading(true);\n api\n .invoke(method, url, data)\n .then((res: any) => {\n setIsLoading(false);\n onSuccess(res);\n })\n .catch((err: ErrorResponseHandler) => {\n setIsLoading(false);\n onError(err);\n });\n };\n\n return [isLoading, callApi];\n};\n\nexport default useApi;\n","import React from \"react\";\nimport {\n Button,\n ButtonProps,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n} from \"@mui/material\";\nimport { LoadingButton } from \"@mui/lab\";\nimport IconButton from \"@mui/material/IconButton\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { deleteDialogStyles } from \"../FormComponents/common/styleLibrary\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...deleteDialogStyles,\n });\n\ntype ConfirmDialogProps = {\n isOpen?: boolean;\n onClose: () => void;\n onCancel?: () => void;\n onConfirm: () => void;\n classes?: any;\n title: string;\n isLoading?: boolean;\n confirmationContent: React.ReactNode | React.ReactNode[];\n cancelText?: string;\n confirmText?: string;\n confirmButtonProps?: Partial;\n cancelButtonProps?: Partial;\n titleIcon?: React.ReactNode;\n};\n\nconst ConfirmDialog = ({\n isOpen = false,\n onClose,\n onCancel,\n onConfirm,\n classes = {},\n title = \"\",\n isLoading,\n confirmationContent,\n cancelText = \"Cancel\",\n confirmText = \"Confirm\",\n confirmButtonProps = {},\n cancelButtonProps = {},\n titleIcon = null,\n}: ConfirmDialogProps) => {\n return (\n {\n if (reason !== \"backdropClick\") {\n onClose(); // close on Esc but not on click outside\n }\n }}\n className={classes.root}\n sx={{\n \"& .MuiPaper-root\": {\n padding: \"1rem 2rem 2rem 1rem\",\n },\n }}\n >\n \n
\n {titleIcon} {title}\n
\n
\n \n \n \n
\n
\n\n \n {confirmationContent}\n \n \n \n {cancelText}\n \n\n }\n autoFocus\n {...confirmButtonProps}\n >\n {confirmText}\n \n \n \n );\n};\n\nexport default withStyles(styles)(ConfirmDialog);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useState } from \"react\";\nimport { DialogContentText } from \"@mui/material\";\nimport { IPodListElement } from \"../ListTenants/types\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport Grid from \"@mui/material/Grid\";\nimport { connect } from \"react-redux\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport { ErrorResponseHandler } from \"../../../../common/types\";\nimport useApi from \"../../Common/Hooks/useApi\";\nimport ConfirmDialog from \"../../Common/ModalWrapper/ConfirmDialog\";\nimport { ConfirmDeleteIcon } from \"../../../../icons\";\n\ninterface IDeletePod {\n deleteOpen: boolean;\n selectedPod: IPodListElement;\n closeDeleteModalAndRefresh: (refreshList: boolean) => any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst DeletePod = ({\n deleteOpen,\n selectedPod,\n closeDeleteModalAndRefresh,\n setErrorSnackMessage,\n}: IDeletePod) => {\n const [retypePod, setRetypePod] = useState(\"\");\n\n const onDelSuccess = () => closeDeleteModalAndRefresh(true);\n const onDelError = (err: ErrorResponseHandler) => setErrorSnackMessage(err);\n const onClose = () => closeDeleteModalAndRefresh(false);\n\n const [deleteLoading, invokeDeleteApi] = useApi(onDelSuccess, onDelError);\n\n const onConfirmDelete = () => {\n if (retypePod !== selectedPod.name) {\n setErrorSnackMessage({\n errorMessage: \"Tenant name is incorrect\",\n detailedError: \"\",\n });\n return;\n }\n invokeDeleteApi(\n \"DELETE\",\n `/api/v1/namespaces/${selectedPod.namespace}/tenants/${selectedPod.tenant}/pods/${selectedPod.name}`\n );\n };\n\n return (\n }\n isLoading={deleteLoading}\n onConfirm={onConfirmDelete}\n onClose={onClose}\n confirmButtonProps={{\n disabled: retypePod !== selectedPod.name || deleteLoading,\n }}\n confirmationContent={\n \n To continue please type {selectedPod.name} in the box.\n \n ) => {\n setRetypePod(event.target.value);\n }}\n label=\"\"\n value={retypePod}\n />\n \n \n }\n />\n );\n};\n\nconst connector = connect(null, {\n setErrorSnackMessage,\n});\n\nexport default connector(DeletePod);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n containerForHeader,\n tableStyles,\n tenantDetailsStyles,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport { niceDays } from \"../../../../common/utils\";\nimport { IPodListElement } from \"../ListTenants/types\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport api from \"../../../../common/api\";\nimport TableWrapper from \"../../Common/TableWrapper/TableWrapper\";\nimport { AppState } from \"../../../../store\";\nimport { setTenantDetailsLoad } from \"../actions\";\nimport { ErrorResponseHandler } from \"../../../../common/types\";\nimport DeletePod from \"./DeletePod\";\nimport { Grid } from \"@mui/material\";\n\ninterface IPodsSummary {\n classes: any;\n match: any;\n history: any;\n loadingTenant: boolean;\n setTenantDetailsLoad: typeof setTenantDetailsLoad;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...tenantDetailsStyles,\n ...tableStyles,\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst PodsSummary = ({\n classes,\n match,\n history,\n loadingTenant,\n}: IPodsSummary) => {\n const [pods, setPods] = useState([]);\n const [loadingPods, setLoadingPods] = useState(true);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [selectedPod, setSelectedPod] = useState(null);\n\n const tenantName = match.params[\"tenantName\"];\n const tenantNamespace = match.params[\"tenantNamespace\"];\n\n const podViewAction = (pod: IPodListElement) => {\n history.push(\n `/namespaces/${tenantNamespace}/tenants/${tenantName}/pods/${pod.name}`\n );\n return;\n };\n\n const closeDeleteModalAndRefresh = (reloadData: boolean) => {\n setDeleteOpen(false);\n setLoadingPods(true);\n };\n\n const confirmDeletePod = (pod: IPodListElement) => {\n pod.tenant = tenantName;\n pod.namespace = tenantNamespace;\n setSelectedPod(pod);\n setDeleteOpen(true);\n };\n\n const podTableActions = [\n { type: \"view\", onClick: podViewAction },\n { type: \"delete\", onClick: confirmDeletePod },\n ];\n\n useEffect(() => {\n if (loadingTenant) {\n setLoadingPods(true);\n }\n }, [loadingTenant]);\n\n useEffect(() => {\n if (loadingPods) {\n api\n .invoke(\n \"GET\",\n `/api/v1/namespaces/${tenantNamespace}/tenants/${tenantName}/pods`\n )\n .then((result: IPodListElement[]) => {\n for (let i = 0; i < result.length; i++) {\n let currentTime = (Date.now() / 1000) | 0;\n result[i].time = niceDays(\n (currentTime - parseInt(result[i].timeCreated)).toString()\n );\n }\n setPods(result);\n setLoadingPods(false);\n })\n .catch((err: ErrorResponseHandler) => {\n setErrorSnackMessage({\n errorMessage: \"Error loading pods\",\n detailedError: err.detailedError,\n });\n });\n }\n }, [loadingPods, tenantName, tenantNamespace]);\n\n return (\n \n {deleteOpen && (\n \n )}\n

Pods

\n \n {\n return input !== null ? input : 0;\n },\n },\n { label: \"Node\", elementKey: \"node\" },\n ]}\n isLoading={loadingPods}\n records={pods}\n itemActions={podTableActions}\n entityName=\"Servers\"\n idField=\"name\"\n />\n \n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n loadingTenant: state.tenants.tenantDetails.loadingTenant,\n});\n\nconst connector = connect(mapState, {\n setErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(PodsSummary));\n","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getLoadingButtonUtilityClass(slot) {\n return generateUtilityClass('MuiLoadingButton', slot);\n}\nconst loadingButtonClasses = generateUtilityClasses('MuiLoadingButton', ['root', 'loading', 'loadingIndicator', 'loadingIndicatorCenter', 'loadingIndicatorStart', 'loadingIndicatorEnd', 'endIconLoadingEnd', 'startIconLoadingStart']);\nexport default loadingButtonClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"disabled\", \"id\", \"loading\", \"loadingIndicator\", \"loadingPosition\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { chainPropTypes } from '@mui/utils';\nimport { capitalize, unstable_useId as useId } from '@mui/material/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport Button from '@mui/material/Button';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport loadingButtonClasses, { getLoadingButtonUtilityClass } from './loadingButtonClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n loading,\n loadingPosition,\n classes\n } = ownerState;\n const slots = {\n root: ['root', loading && 'loading'],\n startIcon: [loading && `startIconLoading${capitalize(loadingPosition)}`],\n endIcon: [loading && `endIconLoading${capitalize(loadingPosition)}`],\n loadingIndicator: ['loadingIndicator', loading && `loadingIndicator${capitalize(loadingPosition)}`]\n };\n const composedClasses = composeClasses(slots, getLoadingButtonUtilityClass, classes);\n return _extends({}, classes, composedClasses);\n}; // TODO use `import { rootShouldForwardProp } from '../styles/styled';` once move to core\n\n\nconst rootShouldForwardProp = prop => prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as' && prop !== 'classes';\n\nconst LoadingButtonRoot = styled(Button, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiLoadingButton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n return [styles.root, styles.startIconLoadingStart && {\n [`& .${loadingButtonClasses.startIconLoadingStart}`]: styles.startIconLoadingStart\n }, styles.endIconLoadingEnd && {\n [`& .${loadingButtonClasses.endIconLoadingEnd}`]: styles.endIconLoadingEnd\n }];\n }\n})(({\n ownerState,\n theme\n}) => _extends({\n [`& .${loadingButtonClasses.startIconLoadingStart}, & .${loadingButtonClasses.endIconLoadingEnd}`]: {\n transition: theme.transitions.create(['opacity'], {\n duration: theme.transitions.duration.short\n }),\n opacity: 0\n }\n}, ownerState.loadingPosition === 'center' && {\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color'], {\n duration: theme.transitions.duration.short\n }),\n [`&.${loadingButtonClasses.loading}`]: {\n color: 'transparent'\n }\n}, ownerState.loadingPosition === 'start' && ownerState.fullWidth && {\n [`& .${loadingButtonClasses.startIconLoadingStart}, & .${loadingButtonClasses.endIconLoadingEnd}`]: {\n transition: theme.transitions.create(['opacity'], {\n duration: theme.transitions.duration.short\n }),\n opacity: 0,\n marginRight: -8\n }\n}, ownerState.loadingPosition === 'end' && ownerState.fullWidth && {\n [`& .${loadingButtonClasses.startIconLoadingStart}, & .${loadingButtonClasses.endIconLoadingEnd}`]: {\n transition: theme.transitions.create(['opacity'], {\n duration: theme.transitions.duration.short\n }),\n opacity: 0,\n marginLeft: -8\n }\n}));\nconst LoadingButtonLoadingIndicator = styled('div', {\n name: 'MuiLoadingButton',\n slot: 'LoadingIndicator',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.loadingIndicator, styles[`loadingIndicator${capitalize(ownerState.loadingPosition)}`]];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n position: 'absolute',\n visibility: 'visible',\n display: 'flex'\n}, ownerState.loadingPosition === 'start' && (ownerState.variant === 'outlined' || ownerState.variant === 'contained') && {\n left: 14\n}, ownerState.loadingPosition === 'start' && ownerState.variant === 'text' && {\n left: 6\n}, ownerState.loadingPosition === 'center' && {\n left: '50%',\n transform: 'translate(-50%)',\n color: theme.palette.action.disabled\n}, ownerState.loadingPosition === 'end' && (ownerState.variant === 'outlined' || ownerState.variant === 'contained') && {\n right: 14\n}, ownerState.loadingPosition === 'end' && ownerState.variant === 'text' && {\n right: 6\n}, ownerState.loadingPosition === 'start' && ownerState.fullWidth && {\n position: 'relative',\n left: -10\n}, ownerState.loadingPosition === 'end' && ownerState.fullWidth && {\n position: 'relative',\n right: -10\n}));\nconst LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiLoadingButton'\n });\n\n const {\n children,\n disabled = false,\n id: idProp,\n loading = false,\n loadingIndicator: loadingIndicatorProp,\n loadingPosition = 'center',\n variant = 'text'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const id = useId(idProp);\n const loadingIndicator = loadingIndicatorProp != null ? loadingIndicatorProp : /*#__PURE__*/_jsx(CircularProgress, {\n \"aria-labelledby\": id,\n color: \"inherit\",\n size: 16\n });\n\n const ownerState = _extends({}, props, {\n disabled,\n loading,\n loadingIndicator,\n loadingPosition,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(LoadingButtonRoot, _extends({\n disabled: disabled || loading,\n id: id,\n ref: ref\n }, other, {\n variant: variant,\n classes: classes,\n ownerState: ownerState,\n children: ownerState.loadingPosition === 'end' ? /*#__PURE__*/_jsxs(React.Fragment, {\n children: [children, loading && /*#__PURE__*/_jsx(LoadingButtonLoadingIndicator, {\n className: classes.loadingIndicator,\n ownerState: ownerState,\n children: loadingIndicator\n })]\n }) : /*#__PURE__*/_jsxs(React.Fragment, {\n children: [loading && /*#__PURE__*/_jsx(LoadingButtonLoadingIndicator, {\n className: classes.loadingIndicator,\n ownerState: ownerState,\n children: loadingIndicator\n }), children]\n })\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? LoadingButton.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * @ignore\n */\n id: PropTypes.string,\n\n /**\n * If `true`, the loading indicator is shown.\n * @default false\n */\n loading: PropTypes.bool,\n\n /**\n * Element placed before the children if the button is in loading state.\n * The node should contain an element with `role=\"progressbar\"` with an accessible name.\n * By default we render a `CircularProgress` that is labelled by the button itself.\n * @default \n */\n loadingIndicator: PropTypes.node,\n\n /**\n * The loading indicator can be positioned on the start, end, or the center of the button.\n * @default 'center'\n */\n loadingPosition: chainPropTypes(PropTypes.oneOf(['start', 'end', 'center']), props => {\n if (props.loadingPosition === 'start' && !props.startIcon) {\n return new Error(`MUI: The loadingPosition=\"start\" should be used in combination with startIcon.`);\n }\n\n if (props.loadingPosition === 'end' && !props.endIcon) {\n return new Error(`MUI: The loadingPosition=\"end\" should be used in combination with endIcon.`);\n }\n\n return null;\n }),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n\n /**\n * The variant to use.\n * @default 'text'\n */\n variant: PropTypes.oneOf(['contained', 'outlined', 'text'])\n} : void 0;\nexport default LoadingButton;","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getDialogActionsUtilityClass(slot) {\n return generateUtilityClass('MuiDialogActions', slot);\n}\nconst dialogActionsClasses = generateUtilityClasses('MuiDialogActions', ['root', 'spacing']);\nexport default dialogActionsClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"disableSpacing\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport { getDialogActionsUtilityClass } from './dialogActionsClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableSpacing\n } = ownerState;\n const slots = {\n root: ['root', !disableSpacing && 'spacing']\n };\n return composeClasses(slots, getDialogActionsUtilityClass, classes);\n};\n\nconst DialogActionsRoot = styled('div', {\n name: 'MuiDialogActions',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.disableSpacing && styles.spacing];\n }\n})(({\n ownerState\n}) => _extends({\n display: 'flex',\n alignItems: 'center',\n padding: 8,\n justifyContent: 'flex-end',\n flex: '0 0 auto'\n}, !ownerState.disableSpacing && {\n '& > :not(:first-of-type)': {\n marginLeft: 8\n }\n}));\nconst DialogActions = /*#__PURE__*/React.forwardRef(function DialogActions(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiDialogActions'\n });\n\n const {\n className,\n disableSpacing = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n disableSpacing\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(DialogActionsRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogActions.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n * @default false\n */\n disableSpacing: PropTypes.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default DialogActions;","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getDialogContentTextUtilityClass(slot) {\n return generateUtilityClass('MuiDialogContentText', slot);\n}\nconst dialogContentTextClasses = generateUtilityClasses('MuiDialogContentText', ['root']);\nexport default dialogContentTextClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport styled, { rootShouldForwardProp } from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport Typography from '../Typography';\nimport { getDialogContentTextUtilityClass } from './dialogContentTextClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n const composedClasses = composeClasses(slots, getDialogContentTextUtilityClass, classes);\n return _extends({}, classes, composedClasses);\n};\n\nconst DialogContentTextRoot = styled(Typography, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiDialogContentText',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\nconst DialogContentText = /*#__PURE__*/React.forwardRef(function DialogContentText(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiDialogContentText'\n });\n\n const ownerState = _objectWithoutPropertiesLoose(props, _excluded);\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(DialogContentTextRoot, _extends({\n component: \"p\",\n variant: \"body1\",\n color: \"text.secondary\",\n ref: ref,\n ownerState: ownerState\n }, props, {\n classes: classes\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogContentText.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default DialogContentText;"],"names":["inputStyles","makeStyles","theme","createStyles","inputFieldStyles","InputField","props","classes","InputProps","withStyles","fieldBasic","tooltipHelper","textBoxContainer","flexGrow","position","overlayAction","right","top","maxWidth","maxHeight","inputLabel","fontWeight","label","onChange","value","id","name","type","autoComplete","disabled","multiline","tooltip","index","error","required","placeholder","min","max","overlayIcon","overlayObject","extraInputProps","noLabelMinWidth","pattern","autoFocus","className","inputProps","container","clsx","errorInField","inputBoxContainer","htmlFor","noMinWidthLabel","tooltipContainer","title","placement","fullWidth","helperText","inputRebase","onClick","size","disableFocusRipple","disableRipple","disableTouchRipple","onSuccess","onError","useState","isLoading","setIsLoading","method","url","data","api","then","res","catch","err","deleteDialogStyles","isOpen","onClose","onCancel","onConfirm","confirmationContent","cancelText","confirmText","confirmButtonProps","cancelButtonProps","titleIcon","open","event","reason","root","sx","padding","titleText","closeContainer","closeButton","content","actions","cancelButton","variant","color","confirmButton","loading","loadingPosition","startIcon","connect","setErrorSnackMessage","deleteOpen","selectedPod","closeDeleteModalAndRefresh","retypePod","setRetypePod","useApi","deleteLoading","invokeDeleteApi","ConfirmDialog","namespace","tenant","errorMessage","detailedError","DialogContentText","Grid","item","xs","InputBoxWrapper","target","connector","state","loadingTenant","tenants","tenantDetails","tenantDetailsStyles","tableStyles","containerForHeader","spacing","match","history","pods","setPods","loadingPods","setLoadingPods","setDeleteOpen","setSelectedPod","tenantName","params","tenantNamespace","podTableActions","pod","push","useEffect","result","i","length","currentTime","Date","now","time","niceDays","parseInt","timeCreated","toString","Fragment","reloadData","sectionTitle","tableBlock","TableWrapper","columns","elementKey","renderFunction","input","records","itemActions","entityName","idField","getLoadingButtonUtilityClass","slot","generateUtilityClass","generateUtilityClasses","_excluded","LoadingButtonRoot","styled","Button","shouldForwardProp","prop","rootShouldForwardProp","overridesResolver","styles","startIconLoadingStart","loadingButtonClasses","endIconLoadingEnd","ownerState","_extends","transition","transitions","create","duration","short","opacity","marginRight","marginLeft","LoadingButtonLoadingIndicator","loadingIndicator","capitalize","visibility","display","left","transform","palette","action","React","inProps","ref","useThemeProps","children","idProp","loadingIndicatorProp","other","_objectWithoutPropertiesLoose","useId","_jsx","CircularProgress","slots","endIcon","composedClasses","composeClasses","useUtilityClasses","_jsxs","getDialogActionsUtilityClass","DialogActionsRoot","disableSpacing","alignItems","justifyContent","flex","getDialogContentTextUtilityClass","DialogContentTextRoot","Typography","component"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"static/js/1719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LrB,WAAYA,GACXxL,EAAO,CACRC,QAASA","sources":["screens/Console/Common/FormComponents/InputBoxWrapper/InputBoxWrapper.tsx","screens/Console/Common/Hooks/useApi.tsx","screens/Console/Common/ModalWrapper/ConfirmDialog.tsx","screens/Console/Tenants/TenantDetails/DeletePod.tsx","screens/Console/Tenants/TenantDetails/PodsSummary.tsx","../node_modules/@mui/lab/LoadingButton/loadingButtonClasses.js","../node_modules/@mui/lab/LoadingButton/LoadingButton.js","../node_modules/@mui/material/DialogActions/dialogActionsClasses.js","../node_modules/@mui/material/DialogActions/DialogActions.js","../node_modules/@mui/material/DialogContentText/dialogContentTextClasses.js","../node_modules/@mui/material/DialogContentText/DialogContentText.js"],"sourcesContent":["// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React from \"react\";\nimport {\n Grid,\n IconButton,\n InputLabel,\n TextField,\n TextFieldProps,\n Tooltip,\n} from \"@mui/material\";\nimport { OutlinedInputProps } from \"@mui/material/OutlinedInput\";\nimport { InputProps as StandardInputProps } from \"@mui/material/Input\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n fieldBasic,\n inputFieldStyles,\n tooltipHelper,\n} from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport clsx from \"clsx\";\n\ninterface InputBoxProps {\n label: string;\n classes: any;\n onChange: (e: React.ChangeEvent) => void;\n value: string | boolean;\n id: string;\n name: string;\n disabled?: boolean;\n multiline?: boolean;\n type?: string;\n tooltip?: string;\n autoComplete?: string;\n index?: number;\n error?: string;\n required?: boolean;\n placeholder?: string;\n min?: string;\n max?: string;\n overlayIcon?: any;\n overlayAction?: () => void;\n overlayObject?: any;\n extraInputProps?: StandardInputProps[\"inputProps\"];\n noLabelMinWidth?: boolean;\n pattern?: string;\n autoFocus?: boolean;\n className?: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n textBoxContainer: {\n flexGrow: 1,\n position: \"relative\",\n },\n overlayAction: {\n position: \"absolute\",\n right: 5,\n top: 6,\n \"& svg\": {\n maxWidth: 15,\n maxHeight: 15,\n },\n \"&.withLabel\": {\n top: 5,\n },\n },\n inputLabel: {\n ...fieldBasic.inputLabel,\n fontWeight: \"normal\",\n },\n });\n\nconst inputStyles = makeStyles((theme: Theme) =>\n createStyles({\n ...inputFieldStyles,\n })\n);\n\nfunction InputField(props: TextFieldProps) {\n const classes = inputStyles();\n\n return (\n }\n {...props}\n />\n );\n}\n\nconst InputBoxWrapper = ({\n label,\n onChange,\n value,\n id,\n name,\n type = \"text\",\n autoComplete = \"off\",\n disabled = false,\n multiline = false,\n tooltip = \"\",\n index = 0,\n error = \"\",\n required = false,\n placeholder = \"\",\n min,\n max,\n overlayIcon = null,\n overlayObject = null,\n extraInputProps = {},\n overlayAction,\n noLabelMinWidth = false,\n pattern = \"\",\n autoFocus = false,\n classes,\n className = \"\",\n}: InputBoxProps) => {\n let inputProps: any = { \"data-index\": index, ...extraInputProps };\n\n if (type === \"number\" && min) {\n inputProps[\"min\"] = min;\n }\n\n if (type === \"number\" && max) {\n inputProps[\"max\"] = max;\n }\n\n if (pattern !== \"\") {\n inputProps[\"pattern\"] = pattern;\n }\n\n return (\n \n \n {label !== \"\" && (\n \n \n {label}\n {required ? \"*\" : \"\"}\n \n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n \n )}\n\n
\n \n {overlayIcon && (\n \n {\n overlayAction();\n }\n : () => null\n }\n size={\"small\"}\n disableFocusRipple={false}\n disableRipple={false}\n disableTouchRipple={false}\n >\n {overlayIcon}\n \n
\n )}\n {overlayObject && (\n \n {overlayObject}\n \n )}\n \n \n
\n );\n};\n\nexport default withStyles(styles)(InputBoxWrapper);\n","import { useState } from \"react\";\nimport api from \"../../../../common/api\";\nimport { ErrorResponseHandler } from \"../../../../common/types\";\n\ntype NoReturnFunction = (param?: any) => void;\ntype ApiMethodToInvoke = (method: string, url: string, data?: any) => void;\ntype IsApiInProgress = boolean;\n\nconst useApi = (\n onSuccess: NoReturnFunction,\n onError: NoReturnFunction\n): [IsApiInProgress, ApiMethodToInvoke] => {\n const [isLoading, setIsLoading] = useState(false);\n\n const callApi = (method: string, url: string, data?: any) => {\n setIsLoading(true);\n api\n .invoke(method, url, data)\n .then((res: any) => {\n setIsLoading(false);\n onSuccess(res);\n })\n .catch((err: ErrorResponseHandler) => {\n setIsLoading(false);\n onError(err);\n });\n };\n\n return [isLoading, callApi];\n};\n\nexport default useApi;\n","import React from \"react\";\nimport {\n Button,\n ButtonProps,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n} from \"@mui/material\";\nimport { LoadingButton } from \"@mui/lab\";\nimport IconButton from \"@mui/material/IconButton\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { deleteDialogStyles } from \"../FormComponents/common/styleLibrary\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...deleteDialogStyles,\n });\n\ntype ConfirmDialogProps = {\n isOpen?: boolean;\n onClose: () => void;\n onCancel?: () => void;\n onConfirm: () => void;\n classes?: any;\n title: string;\n isLoading?: boolean;\n confirmationContent: React.ReactNode | React.ReactNode[];\n cancelText?: string;\n confirmText?: string;\n confirmButtonProps?: Partial;\n cancelButtonProps?: Partial;\n titleIcon?: React.ReactNode;\n};\n\nconst ConfirmDialog = ({\n isOpen = false,\n onClose,\n onCancel,\n onConfirm,\n classes = {},\n title = \"\",\n isLoading,\n confirmationContent,\n cancelText = \"Cancel\",\n confirmText = \"Confirm\",\n confirmButtonProps = {},\n cancelButtonProps = {},\n titleIcon = null,\n}: ConfirmDialogProps) => {\n return (\n {\n if (reason !== \"backdropClick\") {\n onClose(); // close on Esc but not on click outside\n }\n }}\n className={classes.root}\n sx={{\n \"& .MuiPaper-root\": {\n padding: \"1rem 2rem 2rem 1rem\",\n },\n }}\n >\n \n
\n {titleIcon} {title}\n
\n
\n \n \n \n
\n
\n\n \n {confirmationContent}\n \n \n \n {cancelText}\n \n\n }\n autoFocus\n {...confirmButtonProps}\n >\n {confirmText}\n \n \n \n );\n};\n\nexport default withStyles(styles)(ConfirmDialog);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useState } from \"react\";\nimport { DialogContentText } from \"@mui/material\";\nimport { IPodListElement } from \"../ListTenants/types\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport Grid from \"@mui/material/Grid\";\nimport { connect } from \"react-redux\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport { ErrorResponseHandler } from \"../../../../common/types\";\nimport useApi from \"../../Common/Hooks/useApi\";\nimport ConfirmDialog from \"../../Common/ModalWrapper/ConfirmDialog\";\nimport { ConfirmDeleteIcon } from \"../../../../icons\";\n\ninterface IDeletePod {\n deleteOpen: boolean;\n selectedPod: IPodListElement;\n closeDeleteModalAndRefresh: (refreshList: boolean) => any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst DeletePod = ({\n deleteOpen,\n selectedPod,\n closeDeleteModalAndRefresh,\n setErrorSnackMessage,\n}: IDeletePod) => {\n const [retypePod, setRetypePod] = useState(\"\");\n\n const onDelSuccess = () => closeDeleteModalAndRefresh(true);\n const onDelError = (err: ErrorResponseHandler) => setErrorSnackMessage(err);\n const onClose = () => closeDeleteModalAndRefresh(false);\n\n const [deleteLoading, invokeDeleteApi] = useApi(onDelSuccess, onDelError);\n\n const onConfirmDelete = () => {\n if (retypePod !== selectedPod.name) {\n setErrorSnackMessage({\n errorMessage: \"Tenant name is incorrect\",\n detailedError: \"\",\n });\n return;\n }\n invokeDeleteApi(\n \"DELETE\",\n `/api/v1/namespaces/${selectedPod.namespace}/tenants/${selectedPod.tenant}/pods/${selectedPod.name}`\n );\n };\n\n return (\n }\n isLoading={deleteLoading}\n onConfirm={onConfirmDelete}\n onClose={onClose}\n confirmButtonProps={{\n disabled: retypePod !== selectedPod.name || deleteLoading,\n }}\n confirmationContent={\n \n To continue please type {selectedPod.name} in the box.\n \n ) => {\n setRetypePod(event.target.value);\n }}\n label=\"\"\n value={retypePod}\n />\n \n \n }\n />\n );\n};\n\nconst connector = connect(null, {\n setErrorSnackMessage,\n});\n\nexport default connector(DeletePod);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n containerForHeader,\n tableStyles,\n tenantDetailsStyles,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport { niceDays } from \"../../../../common/utils\";\nimport { IPodListElement } from \"../ListTenants/types\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport api from \"../../../../common/api\";\nimport TableWrapper from \"../../Common/TableWrapper/TableWrapper\";\nimport { AppState } from \"../../../../store\";\nimport { setTenantDetailsLoad } from \"../actions\";\nimport { ErrorResponseHandler } from \"../../../../common/types\";\nimport DeletePod from \"./DeletePod\";\nimport { Grid } from \"@mui/material\";\n\ninterface IPodsSummary {\n classes: any;\n match: any;\n history: any;\n loadingTenant: boolean;\n setTenantDetailsLoad: typeof setTenantDetailsLoad;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...tenantDetailsStyles,\n ...tableStyles,\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst PodsSummary = ({\n classes,\n match,\n history,\n loadingTenant,\n}: IPodsSummary) => {\n const [pods, setPods] = useState([]);\n const [loadingPods, setLoadingPods] = useState(true);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [selectedPod, setSelectedPod] = useState(null);\n\n const tenantName = match.params[\"tenantName\"];\n const tenantNamespace = match.params[\"tenantNamespace\"];\n\n const podViewAction = (pod: IPodListElement) => {\n history.push(\n `/namespaces/${tenantNamespace}/tenants/${tenantName}/pods/${pod.name}`\n );\n return;\n };\n\n const closeDeleteModalAndRefresh = (reloadData: boolean) => {\n setDeleteOpen(false);\n setLoadingPods(true);\n };\n\n const confirmDeletePod = (pod: IPodListElement) => {\n pod.tenant = tenantName;\n pod.namespace = tenantNamespace;\n setSelectedPod(pod);\n setDeleteOpen(true);\n };\n\n const podTableActions = [\n { type: \"view\", onClick: podViewAction },\n { type: \"delete\", onClick: confirmDeletePod },\n ];\n\n useEffect(() => {\n if (loadingTenant) {\n setLoadingPods(true);\n }\n }, [loadingTenant]);\n\n useEffect(() => {\n if (loadingPods) {\n api\n .invoke(\n \"GET\",\n `/api/v1/namespaces/${tenantNamespace}/tenants/${tenantName}/pods`\n )\n .then((result: IPodListElement[]) => {\n for (let i = 0; i < result.length; i++) {\n let currentTime = (Date.now() / 1000) | 0;\n result[i].time = niceDays(\n (currentTime - parseInt(result[i].timeCreated)).toString()\n );\n }\n setPods(result);\n setLoadingPods(false);\n })\n .catch((err: ErrorResponseHandler) => {\n setErrorSnackMessage({\n errorMessage: \"Error loading pods\",\n detailedError: err.detailedError,\n });\n });\n }\n }, [loadingPods, tenantName, tenantNamespace]);\n\n return (\n \n {deleteOpen && (\n \n )}\n

Pods

\n \n {\n return input !== null ? input : 0;\n },\n },\n { label: \"Node\", elementKey: \"node\" },\n ]}\n isLoading={loadingPods}\n records={pods}\n itemActions={podTableActions}\n entityName=\"Servers\"\n idField=\"name\"\n />\n \n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n loadingTenant: state.tenants.tenantDetails.loadingTenant,\n});\n\nconst connector = connect(mapState, {\n setErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(PodsSummary));\n","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getLoadingButtonUtilityClass(slot) {\n return generateUtilityClass('MuiLoadingButton', slot);\n}\nconst loadingButtonClasses = generateUtilityClasses('MuiLoadingButton', ['root', 'loading', 'loadingIndicator', 'loadingIndicatorCenter', 'loadingIndicatorStart', 'loadingIndicatorEnd', 'endIconLoadingEnd', 'startIconLoadingStart']);\nexport default loadingButtonClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"disabled\", \"id\", \"loading\", \"loadingIndicator\", \"loadingPosition\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { chainPropTypes } from '@mui/utils';\nimport { capitalize, unstable_useId as useId } from '@mui/material/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport Button from '@mui/material/Button';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport loadingButtonClasses, { getLoadingButtonUtilityClass } from './loadingButtonClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n loading,\n loadingPosition,\n classes\n } = ownerState;\n const slots = {\n root: ['root', loading && 'loading'],\n startIcon: [loading && `startIconLoading${capitalize(loadingPosition)}`],\n endIcon: [loading && `endIconLoading${capitalize(loadingPosition)}`],\n loadingIndicator: ['loadingIndicator', loading && `loadingIndicator${capitalize(loadingPosition)}`]\n };\n const composedClasses = composeClasses(slots, getLoadingButtonUtilityClass, classes);\n return _extends({}, classes, composedClasses);\n}; // TODO use `import { rootShouldForwardProp } from '../styles/styled';` once move to core\n\n\nconst rootShouldForwardProp = prop => prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as' && prop !== 'classes';\n\nconst LoadingButtonRoot = styled(Button, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiLoadingButton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n return [styles.root, styles.startIconLoadingStart && {\n [`& .${loadingButtonClasses.startIconLoadingStart}`]: styles.startIconLoadingStart\n }, styles.endIconLoadingEnd && {\n [`& .${loadingButtonClasses.endIconLoadingEnd}`]: styles.endIconLoadingEnd\n }];\n }\n})(({\n ownerState,\n theme\n}) => _extends({\n [`& .${loadingButtonClasses.startIconLoadingStart}, & .${loadingButtonClasses.endIconLoadingEnd}`]: {\n transition: theme.transitions.create(['opacity'], {\n duration: theme.transitions.duration.short\n }),\n opacity: 0\n }\n}, ownerState.loadingPosition === 'center' && {\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color'], {\n duration: theme.transitions.duration.short\n }),\n [`&.${loadingButtonClasses.loading}`]: {\n color: 'transparent'\n }\n}, ownerState.loadingPosition === 'start' && ownerState.fullWidth && {\n [`& .${loadingButtonClasses.startIconLoadingStart}, & .${loadingButtonClasses.endIconLoadingEnd}`]: {\n transition: theme.transitions.create(['opacity'], {\n duration: theme.transitions.duration.short\n }),\n opacity: 0,\n marginRight: -8\n }\n}, ownerState.loadingPosition === 'end' && ownerState.fullWidth && {\n [`& .${loadingButtonClasses.startIconLoadingStart}, & .${loadingButtonClasses.endIconLoadingEnd}`]: {\n transition: theme.transitions.create(['opacity'], {\n duration: theme.transitions.duration.short\n }),\n opacity: 0,\n marginLeft: -8\n }\n}));\nconst LoadingButtonLoadingIndicator = styled('div', {\n name: 'MuiLoadingButton',\n slot: 'LoadingIndicator',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.loadingIndicator, styles[`loadingIndicator${capitalize(ownerState.loadingPosition)}`]];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n position: 'absolute',\n visibility: 'visible',\n display: 'flex'\n}, ownerState.loadingPosition === 'start' && (ownerState.variant === 'outlined' || ownerState.variant === 'contained') && {\n left: 14\n}, ownerState.loadingPosition === 'start' && ownerState.variant === 'text' && {\n left: 6\n}, ownerState.loadingPosition === 'center' && {\n left: '50%',\n transform: 'translate(-50%)',\n color: theme.palette.action.disabled\n}, ownerState.loadingPosition === 'end' && (ownerState.variant === 'outlined' || ownerState.variant === 'contained') && {\n right: 14\n}, ownerState.loadingPosition === 'end' && ownerState.variant === 'text' && {\n right: 6\n}, ownerState.loadingPosition === 'start' && ownerState.fullWidth && {\n position: 'relative',\n left: -10\n}, ownerState.loadingPosition === 'end' && ownerState.fullWidth && {\n position: 'relative',\n right: -10\n}));\nconst LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiLoadingButton'\n });\n\n const {\n children,\n disabled = false,\n id: idProp,\n loading = false,\n loadingIndicator: loadingIndicatorProp,\n loadingPosition = 'center',\n variant = 'text'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const id = useId(idProp);\n const loadingIndicator = loadingIndicatorProp != null ? loadingIndicatorProp : /*#__PURE__*/_jsx(CircularProgress, {\n \"aria-labelledby\": id,\n color: \"inherit\",\n size: 16\n });\n\n const ownerState = _extends({}, props, {\n disabled,\n loading,\n loadingIndicator,\n loadingPosition,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(LoadingButtonRoot, _extends({\n disabled: disabled || loading,\n id: id,\n ref: ref\n }, other, {\n variant: variant,\n classes: classes,\n ownerState: ownerState,\n children: ownerState.loadingPosition === 'end' ? /*#__PURE__*/_jsxs(React.Fragment, {\n children: [children, loading && /*#__PURE__*/_jsx(LoadingButtonLoadingIndicator, {\n className: classes.loadingIndicator,\n ownerState: ownerState,\n children: loadingIndicator\n })]\n }) : /*#__PURE__*/_jsxs(React.Fragment, {\n children: [loading && /*#__PURE__*/_jsx(LoadingButtonLoadingIndicator, {\n className: classes.loadingIndicator,\n ownerState: ownerState,\n children: loadingIndicator\n }), children]\n })\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? LoadingButton.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * @ignore\n */\n id: PropTypes.string,\n\n /**\n * If `true`, the loading indicator is shown.\n * @default false\n */\n loading: PropTypes.bool,\n\n /**\n * Element placed before the children if the button is in loading state.\n * The node should contain an element with `role=\"progressbar\"` with an accessible name.\n * By default we render a `CircularProgress` that is labelled by the button itself.\n * @default \n */\n loadingIndicator: PropTypes.node,\n\n /**\n * The loading indicator can be positioned on the start, end, or the center of the button.\n * @default 'center'\n */\n loadingPosition: chainPropTypes(PropTypes.oneOf(['start', 'end', 'center']), props => {\n if (props.loadingPosition === 'start' && !props.startIcon) {\n return new Error(`MUI: The loadingPosition=\"start\" should be used in combination with startIcon.`);\n }\n\n if (props.loadingPosition === 'end' && !props.endIcon) {\n return new Error(`MUI: The loadingPosition=\"end\" should be used in combination with endIcon.`);\n }\n\n return null;\n }),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n\n /**\n * The variant to use.\n * @default 'text'\n */\n variant: PropTypes.oneOf(['contained', 'outlined', 'text'])\n} : void 0;\nexport default LoadingButton;","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getDialogActionsUtilityClass(slot) {\n return generateUtilityClass('MuiDialogActions', slot);\n}\nconst dialogActionsClasses = generateUtilityClasses('MuiDialogActions', ['root', 'spacing']);\nexport default dialogActionsClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"disableSpacing\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport { getDialogActionsUtilityClass } from './dialogActionsClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableSpacing\n } = ownerState;\n const slots = {\n root: ['root', !disableSpacing && 'spacing']\n };\n return composeClasses(slots, getDialogActionsUtilityClass, classes);\n};\n\nconst DialogActionsRoot = styled('div', {\n name: 'MuiDialogActions',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.disableSpacing && styles.spacing];\n }\n})(({\n ownerState\n}) => _extends({\n display: 'flex',\n alignItems: 'center',\n padding: 8,\n justifyContent: 'flex-end',\n flex: '0 0 auto'\n}, !ownerState.disableSpacing && {\n '& > :not(:first-of-type)': {\n marginLeft: 8\n }\n}));\nconst DialogActions = /*#__PURE__*/React.forwardRef(function DialogActions(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiDialogActions'\n });\n\n const {\n className,\n disableSpacing = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n disableSpacing\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(DialogActionsRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogActions.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n * @default false\n */\n disableSpacing: PropTypes.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default DialogActions;","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getDialogContentTextUtilityClass(slot) {\n return generateUtilityClass('MuiDialogContentText', slot);\n}\nconst dialogContentTextClasses = generateUtilityClasses('MuiDialogContentText', ['root']);\nexport default dialogContentTextClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport styled, { rootShouldForwardProp } from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport Typography from '../Typography';\nimport { getDialogContentTextUtilityClass } from './dialogContentTextClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n const composedClasses = composeClasses(slots, getDialogContentTextUtilityClass, classes);\n return _extends({}, classes, composedClasses);\n};\n\nconst DialogContentTextRoot = styled(Typography, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiDialogContentText',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\nconst DialogContentText = /*#__PURE__*/React.forwardRef(function DialogContentText(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiDialogContentText'\n });\n\n const ownerState = _objectWithoutPropertiesLoose(props, _excluded);\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(DialogContentTextRoot, _extends({\n component: \"p\",\n variant: \"body1\",\n color: \"text.secondary\",\n ref: ref,\n ownerState: ownerState\n }, props, {\n classes: classes\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogContentText.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default DialogContentText;"],"names":["inputStyles","makeStyles","theme","createStyles","inputFieldStyles","InputField","props","classes","InputProps","withStyles","fieldBasic","tooltipHelper","textBoxContainer","flexGrow","position","overlayAction","right","top","maxWidth","maxHeight","inputLabel","fontWeight","label","onChange","value","id","name","type","autoComplete","disabled","multiline","tooltip","index","error","required","placeholder","min","max","overlayIcon","overlayObject","extraInputProps","noLabelMinWidth","pattern","autoFocus","className","inputProps","container","clsx","errorInField","inputBoxContainer","htmlFor","noMinWidthLabel","tooltipContainer","title","placement","fullWidth","helperText","inputRebase","onClick","size","disableFocusRipple","disableRipple","disableTouchRipple","onSuccess","onError","useState","isLoading","setIsLoading","method","url","data","api","then","res","catch","err","deleteDialogStyles","isOpen","onClose","onCancel","onConfirm","confirmationContent","cancelText","confirmText","confirmButtonProps","cancelButtonProps","titleIcon","open","event","reason","root","sx","padding","titleText","closeContainer","closeButton","content","actions","cancelButton","variant","color","confirmButton","loading","loadingPosition","startIcon","connect","setErrorSnackMessage","deleteOpen","selectedPod","closeDeleteModalAndRefresh","retypePod","setRetypePod","useApi","deleteLoading","invokeDeleteApi","ConfirmDialog","namespace","tenant","errorMessage","detailedError","DialogContentText","Grid","item","xs","InputBoxWrapper","target","connector","state","loadingTenant","tenants","tenantDetails","tenantDetailsStyles","tableStyles","containerForHeader","spacing","match","history","pods","setPods","loadingPods","setLoadingPods","setDeleteOpen","setSelectedPod","tenantName","params","tenantNamespace","podTableActions","pod","push","useEffect","result","i","length","currentTime","Date","now","time","niceDays","parseInt","timeCreated","toString","Fragment","reloadData","sectionTitle","tableBlock","TableWrapper","columns","elementKey","renderFunction","input","records","itemActions","entityName","idField","getLoadingButtonUtilityClass","slot","generateUtilityClass","generateUtilityClasses","_excluded","LoadingButtonRoot","styled","Button","shouldForwardProp","prop","rootShouldForwardProp","overridesResolver","styles","startIconLoadingStart","loadingButtonClasses","endIconLoadingEnd","ownerState","_extends","transition","transitions","create","duration","short","opacity","marginRight","marginLeft","LoadingButtonLoadingIndicator","loadingIndicator","capitalize","visibility","display","left","transform","palette","action","React","inProps","ref","useThemeProps","children","idProp","loadingIndicatorProp","other","_objectWithoutPropertiesLoose","useId","_jsx","CircularProgress","slots","endIcon","composedClasses","composeClasses","useUtilityClasses","_jsxs","getDialogActionsUtilityClass","DialogActionsRoot","disableSpacing","alignItems","justifyContent","flex","getDialogContentTextUtilityClass","DialogContentTextRoot","Typography","component"],"sourceRoot":""} \ No newline at end of file diff --git a/portal-ui/build/static/js/1724.d1b98d6d.chunk.js b/portal-ui/build/static/js/1724.d1b98d6d.chunk.js deleted file mode 100644 index 55286a2fe..000000000 --- a/portal-ui/build/static/js/1724.d1b98d6d.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1724],{89345:function(e,t,n){var a=n(18489),i=n(50390),r=n(62449),l=n(98247),o=n(49044),s=n(62559),c=(0,r.Z)({root:{backgroundColor:"transparent",paddingTop:0,paddingBottom:0,fontSize:22,textTransform:"uppercase",color:"#D0D0D0"},selected:{"& .MuiTab-wrapper":{color:"#07193E",fontWeight:"bold"}},indicator:{background:"transparent linear-gradient(90deg, #072B4E 0%, #081C42 100%) 0% 0% no-repeat padding-box;",height:4},scroller:{maxWidth:1185,position:"relative","&::after":{content:'" "',backgroundColor:"#EEF1F4",height:4,width:"100%",display:"block"}}});t.Z=function(e){var t=e.selectedTab,n=e.onChange,r=e.tabOptions,d=c();return(0,s.jsx)(i.Fragment,{children:(0,s.jsx)(l.Z,{indicatorColor:"primary",textColor:"primary","aria-label":"cluster-tabs",variant:"scrollable",scrollButtons:"auto",value:t,onChange:function(e,t){n(t)},classes:{indicator:d.indicator,scroller:d.scroller},children:r.map((function(e,t){var n={label:e.label};return e.value&&(n=(0,a.Z)((0,a.Z)({},n),{},{value:e.value})),e.disabled&&(n=(0,a.Z)((0,a.Z)({},n),{},{disabled:e.disabled})),(0,i.createElement)(o.Z,(0,a.Z)((0,a.Z)({},n),{},{classes:{root:d.root,selected:d.selected},id:"simple-tab-".concat(t),"aria-controls":"simple-tabpanel-".concat(t),key:"tab-".concat(t,"-").concat(e.label)}))}))})})}},80076:function(e,t,n){n.d(t,{Z:function(){return w}});var a=n(35531),i=n(23430),r=n(18489),l=n(50390),o=n(86509),s=n(4285),c=n(25594),d=n(28948),u=n(4795),m=n(16356),g=n(86192),x=n(77138),f=n(38342),p=n.n(f),h=n(72462),v=n(62559),j=(0,s.Z)((function(e){return(0,o.Z)((0,r.Z)({},h.SJ))}))((function(e){var t=e.classes,n=e.server,a=e.index,i=Object.keys(p()(n,"network",{})),r=i.length,l=n.drives?n.drives.length:0,o=i.reduce((function(e,t){return"online"===n.network[t]?e+1:e}),0),s=n.drives?n.drives.filter((function(e){return"ok"===e.state})).length:0;return(0,v.jsx)(m.Z,{className:t.cardContainer,children:(0,v.jsx)(g.Z,{className:t.cardHeader,title:(0,v.jsxs)("div",{children:[(0,v.jsxs)("div",{className:t.cardNumber,children:["Server ",a]}),(0,v.jsxs)("div",{className:t.referenceTitle,children:[n.state&&(0,v.jsx)("span",{className:function(e){switch(e){case"offline":return t.redState;case"online":return t.greenState;default:return t.greyState}}(n.state),children:(0,v.jsx)(x.J$,{})}),n.endpoint||""]})]}),subheader:(0,v.jsxs)(c.ZP,{item:!0,xs:12,className:t.stateContainer,children:[(0,v.jsxs)("span",{className:t.infoValue,children:[(0,v.jsx)("span",{className:"".concat(t.innerState," ").concat(s<=l/2&&t.redState," ").concat(2!==l&&s===l/2+1&&t.yellowState," ").concat(s===l&&t.greenState),children:(0,v.jsx)(x.J$,{})}),"Drives: ",s,"/",l," "]}),(0,v.jsxs)("span",{className:t.infoValue,children:[(0,v.jsx)("span",{className:"".concat(t.innerState," ").concat(o<=r/2&&t.redState," ").concat(o===r/2+1&&t.yellowState," ").concat(o===r&&t.greenState),children:(0,v.jsx)(x.J$,{})}),"Network: ",o,"/",r," "]}),(0,v.jsxs)("span",{className:t.infoValue,children:["Uptime: ",n.uptime?(0,d.v1)(n.uptime):"N/A"]}),(0,v.jsxs)("span",{className:t.infoValue,children:[(0,v.jsx)(x.Db,{}),(0,v.jsx)("strong",{children:"Version"})," ",n.version?n.version:"N/A"]})]})})})})),y=(0,s.Z)((function(e){return(0,o.Z)((0,r.Z)({},h.SJ))}))((function(e){var t=e.classes,n=e.drive;return(0,v.jsx)(l.Fragment,{children:(0,v.jsx)(m.Z,{className:t.cardContainer,children:(0,v.jsx)(g.Z,{className:t.cardHeader,title:(0,v.jsxs)("div",{className:t.referenceTitle,children:[n.state&&(0,v.jsx)("span",{className:function(e){switch(e){case"offline":return t.redState;case"ok":return t.greenState;default:return t.greyState}}(n.state),children:(0,v.jsx)(x.J$,{})}),n.endpoint||""]}),subheader:(0,v.jsxs)(c.ZP,{item:!0,xs:12,className:t.stateContainer,children:[(0,v.jsxs)("span",{className:t.infoValue,children:[(0,v.jsx)("strong",{children:"Capacity:"})," ",(0,d.ae)(n.totalSpace?n.totalSpace.toString():"0")]}),(0,v.jsxs)("span",{className:t.infoValue,children:[(0,v.jsx)("strong",{children:"Used:"})," ",(0,d.ae)(n.usedSpace?n.usedSpace.toString():"0")]}),(0,v.jsxs)("span",{className:t.infoValue,children:[(0,v.jsx)("strong",{children:"Available:"})," ",(0,d.ae)(n.availableSpace?n.availableSpace.toString():"0")]})]})})})})})),C=n(48820),b=n(89345),Z=n(62449),N=n(43353),S=(0,Z.Z)({ul:{"& .MuiPaginationItem-root":{color:"#07193E",fontSize:14,"&.Mui-selected":{backgroundColor:"transparent",fontWeight:"bold","&::after":{backgroundColor:"#07193E",width:"100%",height:3,content:'" "',position:"absolute",bottom:-3}}}}}),A=(0,s.Z)((function(e){return(0,o.Z)({paginatorContainer:{margin:"10px 0 18px",flexWrap:"wrap"},paginatorInformation:{color:"#848484",fontSize:12,fontStyle:"italic",whiteSpace:"nowrap"},paginatorEntity:{color:"#767676",fontSize:12,fontWeight:"bold"},paginationElement:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",color:"#848484",fontSize:12}})}))((function(e){var t=e.classes,n=e.page,a=void 0===n?1:n,i=e.itemsPerPage,r=void 0===i?5:i,o=e.entity,s=e.totalItems,d=e.onChange,u=S(),m=a*r-r+1,g=m+r-1,x=g>s?s:g,f=Math.ceil(s/r);return(0,v.jsx)(l.Fragment,{children:(0,v.jsxs)(c.ZP,{container:!0,className:t.paginatorContainer,children:[(0,v.jsxs)(c.ZP,{item:!0,xs:6,children:[(0,v.jsx)("span",{className:t.paginatorEntity,children:o}),(0,v.jsx)("br",{}),(0,v.jsxs)("span",{className:t.paginatorInformation,children:["Showing"," ",f>1?(0,v.jsxs)(l.Fragment,{children:[m," - ",x," out of"," "]}):null,s," Total ",o]})]}),(0,v.jsx)(c.ZP,{item:!0,xs:6,className:t.paginationElement,children:f>1&&(0,v.jsxs)(l.Fragment,{children:["Go to:"," ",(0,v.jsx)(N.Z,{count:f,variant:"text",siblingCount:3,page:a,size:"small",hideNextButton:!0,hidePrevButton:!0,onChange:function(e,t){d(t)},classes:{ul:u.ul}})]})})]})})})),E=n(8235),w=(0,s.Z)((function(e){return(0,o.Z)((0,r.Z)({generalStatusTitle:{color:"#767676",fontSize:16,fontWeight:"bold",margin:"15px 10px 0 10px"},paginatorContainer:{maxWidth:1185,width:"100%"}},h.bN))}))((function(e){var t=e.classes,n=e.usage,r=(0,l.useState)(0),o=(0,i.Z)(r,2),s=o[0],m=o[1],g=(0,l.useState)(1),f=(0,i.Z)(g,2),p=f[0],h=f[1],Z=(0,l.useState)(1),N=(0,i.Z)(Z,2),S=N[0],w=N[1],k=function(e){return null!==e?e.servers.sort((function(e,t){var n=e.endpoint.toLowerCase(),a=t.endpoint.toLowerCase();return na?1:0})):[]}(n||null),F=function(e){return void 0===e?{total:"0",unit:"Mi"}:(0,d.Am)(e)}(n&&n.usage?n.usage.toString():"0"),P=[];k.forEach((function(e){var t=e.drives.map((function(e){return e}));P=[].concat((0,a.Z)(P),(0,a.Z)(t))}));var T=k.slice(5*p-5,5*p),M=P.slice(5*S-5,5*S);return(0,v.jsxs)(l.Fragment,{children:[(0,v.jsx)("div",{className:t.dashboardBG}),(null===n||void 0===n?void 0:n.prometheusNotReady)&&(0,v.jsx)(c.ZP,{container:!0,justifyContent:"center",alignContent:"center",alignItems:"center",children:(0,v.jsx)(c.ZP,{item:!0,xs:8,children:(0,v.jsx)(E.Z,{iconComponent:(0,v.jsx)(x.MY,{}),title:"We can't retrieve advanced metrics at this time",help:(0,v.jsxs)(l.Fragment,{children:["MinIO Dashboard will display basic metrics as we couldn't connect to Prometheus successfully.",(0,v.jsx)("br",{})," ",(0,v.jsx)("br",{}),"Please try again in a few minutes. If the problem persists, you can review your configuration and confirm that Prometheus server is up and running."]})})})}),(0,v.jsxs)(c.ZP,{container:!0,spacing:2,children:[(0,v.jsx)(c.ZP,{item:!0,xs:12,className:t.generalStatusTitle,children:"General Status"}),(0,v.jsxs)(c.ZP,{item:!0,xs:12,className:t.dashboardRow,children:[(0,v.jsx)(c.ZP,{item:!0,xs:7,sm:8,md:6,lg:3,className:t.widgetPanelDelimiter,children:(0,v.jsx)(C.Z,{title:"All Buckets",metricValue:n?(0,d.nk)(n.buckets):0,extraMargin:!0})}),(0,v.jsx)(c.ZP,{item:!0,xs:7,sm:8,md:6,lg:3,className:t.widgetPanelDelimiter,children:(0,v.jsx)(C.Z,{title:"Usage",metricValue:F.total,metricUnit:F.unit,extraMargin:!0})}),(0,v.jsx)(c.ZP,{item:!0,xs:7,sm:8,md:6,lg:3,className:t.widgetPanelDelimiter,children:(0,v.jsx)(C.Z,{title:"Total Objects",metricValue:n?(0,d.nk)(n.objects):0,extraMargin:!0})}),(0,v.jsx)(c.ZP,{item:!0,xs:7,sm:8,md:6,lg:3,className:t.widgetPanelDelimiter,children:(0,v.jsx)(C.Z,{title:"Servers",metricValue:n?function(e){return void 0===e?0:e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}(k.length):0,subMessage:{message:"Total"},extraMargin:!0})})]}),(0,v.jsx)(c.ZP,{item:!0,xs:12,children:(0,v.jsx)(b.Z,{selectedTab:s,onChange:function(e){m(e)},tabOptions:[{label:"Servers"},{label:"Drives"}]})}),(0,v.jsxs)(c.ZP,{item:!0,xs:12,className:t.widgetsContainer,children:[(0,v.jsxs)(u.x,{index:0,value:s,children:[(0,v.jsx)("div",{className:t.paginatorContainer,children:(0,v.jsx)(A,{page:p,entity:"Servers",totalItems:k.length,onChange:h,itemsPerPage:5})}),T.map((function(e,t){return(0,v.jsx)(c.ZP,{item:!0,xs:12,children:(0,v.jsx)(j,{server:e,index:t+1})},"serverDS-".concat(t.toString()))}))]}),(0,v.jsxs)(u.x,{index:1,value:s,children:[(0,v.jsx)("div",{className:t.paginatorContainer,children:(0,v.jsx)(A,{page:S,entity:"Drives",totalItems:P.length,onChange:w,itemsPerPage:5})}),M.map((function(e,t){return(0,v.jsx)(c.ZP,{item:!0,xs:12,children:(0,v.jsx)(y,{drive:e})},"drive-".concat(t,"-").concat(e.uuid))}))]})]})]}),!(null!==n&&void 0!==n&&n.prometheusNotReady)&&(0,v.jsx)(c.ZP,{container:!0,justifyContent:"center",alignContent:"center",alignItems:"center",children:(0,v.jsx)(c.ZP,{item:!0,xs:8,children:(0,v.jsx)(E.Z,{iconComponent:(0,v.jsx)(x.MY,{}),title:"Monitoring",help:(0,v.jsxs)(l.Fragment,{children:["The MinIO Dashboard is displaying basic metrics only due to missing the"," ",(0,v.jsx)("a",{href:"https://docs.min.io/minio/baremetal/console/minio-console.html?ref=con#configuration",target:"_blank",rel:"noreferrer",children:"necessary settings"})," ","for displaying extended metrics.",(0,v.jsx)("br",{}),(0,v.jsx)("br",{}),"See"," ",(0,v.jsx)("a",{href:"https://docs.min.io/minio/baremetal/monitoring/metrics-alerts/collect-minio-metrics-using-prometheus.html?ref=con#minio-metrics-collect-using-prometheus",target:"_blank",rel:"noreferrer",children:"Collect MinIO Metrics Using Prometheus"})," ","for a complete tutorial on scraping and visualizing MinIO metrics with Prometheus."]})})})})]})}))},48820:function(e,t,n){var a=n(18489),i=n(16356),r=n(86192),l=n(6369),o=n(86509),s=n(4285),c=n(62449),d=n(50390),u=n(72462),m=n(62559),g=(0,c.Z)({root:{backgroundColor:"#fff",padding:0},title:(0,a.Z)({},u.NP.titleContainer),content:{maxWidth:"100%"}});t.Z=(0,s.Z)((function(e){return(0,o.Z)((0,a.Z)((0,a.Z)({},u.NP),{},{cardRoot:(0,a.Z)((0,a.Z)({},u.NP.singleValueContainer),{},{"&.MuiPaper-root":{borderRadius:10}}),metricText:{fontSize:70,lineHeight:1.1,color:"#07193E",fontWeight:"bold"},unitText:{fontSize:10,color:"#767676",fontWeight:"normal"},subHearderContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},subMessage:{fontSize:10,color:"#767676","&.bold":{fontWeight:"bold"}},headerContainer:{display:"flex",justifyContent:"space-between"},viewAll:{fontSize:10,color:"#C83B51",textTransform:"capitalize","& a, & a:hover, & a:visited, & a:active":{color:"#C83B51"}},extraMargin:{margin:"10px 20px 10px 0"}}))}))((function(e){var t=e.title,n=e.metricValue,a=e.metricUnit,o=e.subMessage,s=e.moreLink,c=e.rightComponent,u=e.extraMargin,x=void 0!==u&&u,f=e.classes,p=g(),h=function(){return(0,m.jsx)(d.Fragment,{children:(0,m.jsxs)("div",{className:f.subHearderContainer,children:[(0,m.jsxs)("div",{className:f.leftSide,children:[(0,m.jsx)("div",{children:(0,m.jsxs)("span",{className:f.metricText,children:[n,(0,m.jsx)("span",{className:f.unitText,children:a})]})}),o&&(0,m.jsx)("div",{className:"".concat(f.subMessage," ").concat(o.fontWeight?o.fontWeight:""),children:o.message})]}),(0,m.jsx)("div",{className:f.rightSide,children:c})]})})},v=function(){return(0,m.jsx)(d.Fragment,{children:(0,m.jsxs)("div",{className:f.headerContainer,children:[(0,m.jsx)("span",{className:f.title,children:t}),s&&(0,m.jsx)(d.Fragment,{children:(0,m.jsx)("span",{className:f.viewAll,children:(0,m.jsx)(l.rU,{to:s,children:"View All"})})})]})})};return(0,m.jsx)(d.Fragment,{children:(0,m.jsx)(i.Z,{className:"".concat(f.cardRoot," ").concat(x?f.extraMargin:""),children:""!==n&&(0,m.jsx)(r.Z,{title:(0,m.jsx)(v,{}),subheader:(0,m.jsx)(d.Fragment,{children:(0,m.jsx)(h,{})}),classes:{root:p.root,title:p.title,content:p.content}})})})}))},82165:function(e,t,n){n.d(t,{Z:function(){return pe}});var a,i=n(23430),r=n(18489),l=n(50390),o=n(34424),s=n(25594),c=n(86509),d=n(4285),u=n(13512),m=n(72462),g=n(38342),x=n.n(g);!function(e){e.singleValue="singleValue",e.linearGraph="linearGraph",e.areaGraph="areaGraph",e.barChart="barChart",e.pieChart="pieChart",e.singleRep="singleRep",e.simpleWidget="simpleWidget"}(a||(a={}));var f=n(28948),p=n(20426),h=n(73891),v=n(77138),j=n(62559),y=["#C4D4E9","#DCD1EE","#D1EEE7","#EEDED1","#AAF38F","#F9E6C5","#C83B51","#F4CECE","#D6D6D6"],C=function(e){return(0,f.v1)(e,"ns")},b=function(e){return parseInt(e).toString(10)},Z=[{id:1,title:"Uptime",data:"N/A",type:a.simpleWidget,widgetIcon:(0,j.jsx)(v.oN,{}),labelDisplayFunction:f.v1},{id:50,title:"Capacity",data:[],dataOuter:[{name:"outer",value:100}],widgetConfiguration:{outerChart:{colorList:["#9c9c9c"],innerRadius:0,outerRadius:0,startAngle:0,endAngle:0},innerChart:{colorList:y,innerRadius:20,outerRadius:50,startAngle:90,endAngle:-200}},type:a.pieChart,innerLabel:"N/A",labelDisplayFunction:f.ae},{id:68,title:"Data Usage Growth",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:a.areaGraph,yAxisFormatter:f.ae,xAxisFormatter:f.Ue},{id:52,title:"Object size distribution",data:[],widgetConfiguration:[{dataKey:"a",color:y[0],background:{fill:"#EEF1F4"},greatestColor:"#081C42"}],customStructure:[{originTag:"LESS_THAN_1024_B",displayTag:"Less than 1024B"},{originTag:"BETWEEN_1024_B_AND_1_MB",displayTag:"Between 1024B and 1MB"},{originTag:"BETWEEN_1_MB_AND_10_MB",displayTag:"Between 1MB and 10MB"},{originTag:"BETWEEN_10_MB_AND_64_MB",displayTag:"Between 10MB and 64MB"},{originTag:"BETWEEN_64_MB_AND_128_MB",displayTag:"Between 64MB and 128MB"},{originTag:"BETWEEN_128_MB_AND_512_MB",displayTag:"Between 128MB and 512MB"},{originTag:"GREATER_THAN_512_MB",displayTag:"Greater than 512MB"}],type:a.barChart},{id:66,title:"Buckets",data:[],innerLabel:"N/A",type:a.singleRep,color:"#0071BC",fillColor:"#ADD5E0"},{id:44,title:"Objects",data:[],innerLabel:"N/A",type:a.singleRep,color:"#0071BC",fillColor:"#ADD5E0"},{id:63,title:"API Data Received Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:a.linearGraph,xAxisFormatter:f.Ue,yAxisFormatter:f.ae},{id:61,title:"Total Open FDs",data:[],innerLabel:"N/A",type:a.singleRep,color:"#22B573",fillColor:"#A6E8C4"},{id:62,title:"Total Goroutines",data:[],innerLabel:"N/A",type:a.singleRep,color:"#F7655E",fillColor:"#F4CECE"},{id:77,title:"Node CPU Usage",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:a.linearGraph,yAxisFormatter:b,xAxisFormatter:f.Ue},{id:60,title:"API Request Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:a.linearGraph,xAxisFormatter:f.Ue},{id:70,title:"API Data Sent Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:a.linearGraph,xAxisFormatter:f.Ue,yAxisFormatter:f.ae},{id:17,title:"Internode Data Transfer",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:a.linearGraph,yAxisFormatter:f.ae,xAxisFormatter:f.Ue},{id:73,title:"Node IO",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:a.linearGraph,yAxisFormatter:f.ae,xAxisFormatter:f.Ue},{id:80,title:"Time Since Last Heal Activity",data:"N/A",type:a.simpleWidget,widgetIcon:(0,j.jsx)(p.Z,{}),labelDisplayFunction:C},{id:81,title:"Time Since Last Scan Activity",data:"N/A",type:a.simpleWidget,widgetIcon:(0,j.jsx)(h.Z,{}),labelDisplayFunction:C},{id:71,title:"API Request Error Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:a.linearGraph,xAxisFormatter:f.Ue},{id:76,title:"Node Memory Usage",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:a.linearGraph,xAxisFormatter:f.Ue,yAxisFormatter:f.ae},{id:74,title:"Drive Used Capacity",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:a.linearGraph,xAxisFormatter:f.Ue,yAxisFormatter:f.ae},{id:82,title:"Drives Free Inodes",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:a.linearGraph,disableYAxis:!0,xAxisFormatter:f.Ue},{id:11,title:"Node Syscalls",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:a.linearGraph,yAxisFormatter:b,xAxisFormatter:f.Ue},{id:8,title:"Node File Descriptors",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:a.linearGraph,yAxisFormatter:b,xAxisFormatter:f.Ue},{id:500,mergedPanels:[{id:53,title:"Online",data:"N/A",type:a.singleValue},{id:69,title:"Offline",data:"N/A",type:a.singleValue}],title:"Servers"},{id:501,mergedPanels:[{id:9,title:"Online",data:"N/A",type:a.singleValue},{id:78,title:"Offline",data:"N/A",type:a.singleValue}],title:"Drives"},{id:502,mergedPanels:[{id:65,title:"Upload",data:"N/A",type:a.singleValue,labelDisplayFunction:f.ae},{id:64,title:"Download",data:"N/A",type:a.singleValue,labelDisplayFunction:f.ae}],title:"Network"}],N=function(e,t){if(0===e.length)return["","0"];if("mean"===t){var n=e.reduce((function(e,t){return e+parseFloat(t[1])}),0);return["",Math.floor(n/e.length).toString()]}var a=e.sort((function(e,t){return e[0]-t[0]}));return a[a.length-1]},S=function(e,t){if(!e)return t;var n=e.type;switch(t.type){case a.singleValue:case a.simpleWidget:if("stat"===n||"singlestat"===n){var i=x()(e,"targets[0].result[0].values",[]);null===i&&(i=[]);var l=x()(e,"options.reduceOptions.calcs[0]","lastNotNull"),o=N(i,l),s=t.labelDisplayFunction?t.labelDisplayFunction(o[1]):o[1];return(0,r.Z)((0,r.Z)({},t),{},{data:s})}break;case a.pieChart:if("gauge"===n){var c=x()(e,"targets[0].result",[]);null===c&&(c=[]);var d=x()(e,"options.reduceOptions.calcs[0]","lastNotNull"),u=c.length>0?c[0].values:[],m=N(u,d),g=c.map((function(e){var t=x()(e,"values",[]),n=Object.keys(e.metric),a=t.sort((function(e,t){return e[0]-t[0]})),i=e.metric[n[0]],r=a[a.length-1];return{name:i,value:parseInt(r)}})),p=t.labelDisplayFunction?t.labelDisplayFunction(m[1]):m[1];return(0,r.Z)((0,r.Z)({},t),{},{data:g,innerLabel:p})}break;case a.linearGraph:case a.areaGraph:if("graph"===n){var h=x()(e,"targets",[]);null===h&&(h=[]);var v=[],j=[];h.forEach((function(e,t){var n=x()(e,"result",[]),a=e.legendFormat;null===n&&(n=[]),n.forEach((function(e){var n=function(e,t){var n=Object.keys(e),a=new RegExp("{{(".concat(n.join("|"),")}}"),"g"),i=t.replace(a,(function(t){var n=t.replace(/({{|}})/g,"");return e[n]})),r=(i.match(/{{/g)||[]).length,l=(i.match(/}}/g)||[]).length,o=i.replace(/{{(.*?)}}/g,"");return r===l&&0!==r&&0!==l&&(n.forEach((function(t){i=i.replace(t,e[t])})),o=i),o}(e.metric,a),i="key_".concat(t).concat(n);v.push({dataKey:i,keyLabel:n,lineColor:"",fillColor:""});var r=x()(e,"values",[]);null===r&&(r=[]),r.forEach((function(e){var t=j.findIndex((function(t){return t.name===e[0]}));if(-1===t){var n={name:e[0]};n[i]=e[1],j.push(n)}else j[t][i]=e[1]}))}))}));var C=v.sort((function(e,t){return e.keyLabelt.keyLabel?1:0})).map((function(e,t){return(0,r.Z)((0,r.Z)({},e),{},{lineColor:y[t]||(0,f.C5)(e.keyLabel),fillColor:y[t]||(0,f.C5)(e.keyLabel)})})),b=j.sort((function(e,t){return e.name-t.name}));return(0,r.Z)((0,r.Z)({},t),{},{widgetConfiguration:C,data:b})}break;case a.barChart:if("bargauge"===n){var Z=x()(e,"targets[0].result",[]);null===Z&&(Z=[]);var S=function(e,t){return e[0]-t[0]},A=[];return A=t.customStructure?t.customStructure.map((function(e){var t=Z.find((function(t){var n=Object.keys(t.metric);return t.metric[n[0]]===e.originTag})),n=x()(t,"values",[]).sort(S),a=n[n.length-1]||["","0"];return{name:e.displayTag,a:parseInt(a[1])}})):Z.map((function(e){var t=Object.keys(e.metric),n=e.metric[t[0]],a=x()(e,"values",[]).sort(S),i=a[a.length-1]||["","0"];return{name:n,a:parseInt(i[1])}})),(0,r.Z)((0,r.Z)({},t),{},{data:A})}break;case a.singleRep:if("stat"===n){var E=x()(e,"targets[0].result[0].values",[]);null===E&&(E=[]);var w=x()(e,"options.reduceOptions.calcs[0]","lastNotNull"),k=N(E,w),F=E.sort((function(e,t){return e[0]-t[0]})),P=[];1===F.length&&P.push({value:0}),F.forEach((function(e){P.push({value:parseInt(e[1])})}));var T=t.labelDisplayFunction?t.labelDisplayFunction(k[1]):k[1];return(0,r.Z)((0,r.Z)({},t),{},{data:P,innerLabel:T})}}return t},A=function(e){var t=e.split(" "),n=function(){var t=e;return isNaN(parseFloat(e))||(t=(0,f.nk)(parseFloat(e))),(0,j.jsx)(l.Fragment,{children:t})};return 2!==t.length?n():f.Dl.includes(t[1])?(0,j.jsxs)("span",{className:"commonValue",children:[t[0],(0,j.jsx)("span",{className:"unitText",children:t[1]})]}):n()},E=n(4795),w=n(44149),k=n(30324),F=n(89345),P=n(48820),T=function(e){var t=e.title,n=e.leftComponent,a=e.rightComponent;return(0,j.jsx)(l.Fragment,{children:(0,j.jsx)(P.Z,{title:t,metricValue:n,rightComponent:a})})},M=n(88970),D=n(27505),L=n(50990),I=n(62879),B=n(34107),R=n(65607),W=n(29503),G=n(18201),z=n(58089),O=(0,d.Z)((function(e){return(0,c.Z)((0,r.Z)({},m.Rp))}))((function(e){var t=e.active,n=e.payload,a=e.label,i=e.barChartConfiguration,r=e.classes;return t?(0,j.jsxs)("div",{className:r.customTooltip,children:[(0,j.jsx)("div",{className:r.timeStampTitle,children:a}),n&&n.map((function(e,t){return(0,j.jsxs)("div",{className:r.labelContainer,children:[(0,j.jsx)("div",{className:r.labelColor,style:{backgroundColor:i[t].color}}),(0,j.jsx)("div",{className:r.itemValue,children:(0,j.jsx)("span",{className:r.valueContainer,children:e.value})})]},"pltiem-".concat(t,"-").concat(a))}))]}):null})),_=n(47373),V=n(32657),U=function(e){var t=e.y,n=e.payload;return(0,j.jsx)("text",{width:50,fontSize:"63%",textAnchor:"start",fill:"#333",transform:"translate(5,".concat(t,")"),fontWeight:700,dy:3,children:n.value})},K=(0,o.$j)(null,{displayErrorMessage:w.Ih,openZoomPage:_.xG}),$=(0,d.Z)((function(e){return(0,c.Z)((0,r.Z)((0,r.Z)({},m.NP),{},{loadingAlign:{width:"100%",paddingTop:"15px",textAlign:"center",margin:"auto"}}))}))(K((function(e){var t=e.classes,n=e.title,a=e.panelItem,r=e.timeStart,o=e.timeEnd,s=e.propLoading,c=e.displayErrorMessage,d=e.apiPrefix,m=e.zoomActivated,g=void 0!==m&&m,x=e.openZoomPage,f=(0,l.useState)(!0),p=(0,i.Z)(f,2),h=p[0],v=p[1],y=(0,l.useState)([]),C=(0,i.Z)(y,2),b=C[0],Z=C[1],N=(0,l.useState)(null),A=(0,i.Z)(N,2),E=A[0],w=A[1];(0,l.useEffect)((function(){s&&v(!0)}),[s]),(0,l.useEffect)((function(){if(h){var e=0;if(null!==r&&null!==o){var t=o.unix()-r.unix(),n=Math.floor(t/60);e=n<1?15:n}k.Z.invoke("GET","/api/v1/".concat(d,"/info/widgets/").concat(a.id,"/?step=").concat(e,"&").concat(null!==r?"&start=".concat(r.unix()):"").concat(null!==r&&null!==o?"&":"").concat(null!==o?"end=".concat(o.unix()):"")).then((function(e){var t=S(e,a);Z(t.data),w(t),v(!1)})).catch((function(e){c(e),v(!1)}))}}),[h,a,o,r,c,d]);var F=E?E.widgetConfiguration:[],P=0,T=0;if(1===F.length){var _=F[0];b.forEach((function(e,t){e[_.dataKey]>T&&(T=e[_.dataKey],P=t)}))}var K=(0,V.Z)(),$=(0,u.Z)(K.breakpoints.up("md"));return(0,j.jsxs)("div",{className:g?"":t.singleValueContainer,children:[!g&&(0,j.jsxs)("div",{className:t.titleContainer,children:[n," ",(0,j.jsx)("button",{onClick:function(){x(a)},className:t.zoomChartIcon,children:(0,j.jsx)(z.Z,{})})]}),h&&(0,j.jsx)("div",{className:t.loadingAlign,children:(0,j.jsx)(G.Z,{})}),!h&&(0,j.jsx)("div",{className:g?t.zoomChartCont:t.contentContainer,children:(0,j.jsx)(M.h,{width:"99%",children:(0,j.jsxs)(D.v,{data:b,layout:"vertical",barCategoryGap:1,children:[(0,j.jsx)(L.K,{type:"number",hide:!0}),(0,j.jsx)(I.B,{dataKey:"name",type:"category",interval:0,tick:(0,j.jsx)(U,{}),tickLine:!1,axisLine:!1,width:150,hide:!$}),F.map((function(e){return(0,j.jsx)(B.$,{dataKey:e.dataKey,fill:e.color,background:e.background,barSize:g?25:12,children:1===F.length?(0,j.jsx)(l.Fragment,{children:b.map((function(t,n){return(0,j.jsx)(R.b,{fill:n===P?e.greatestColor:e.color},"chart-bar-".concat(n.toString()))}))}):null},"bar-".concat(e.dataKey))})),(0,j.jsx)(W.u,{cursor:{fill:"rgba(255, 255, 255, 0.3)"},content:(0,j.jsx)(O,{barChartConfiguration:F})})]})})})]})}))),H=n(89472),Y=n(86072),J=n(84930),q=n(84109),Q=(0,d.Z)((function(e){return(0,c.Z)((0,r.Z)({},m.Rp))}))((function(e){var t=e.active,n=e.payload,a=e.label,i=e.linearConfiguration,r=e.yAxisFormatter,l=e.classes;return t?(0,j.jsxs)("div",{className:l.customTooltip,children:[(0,j.jsx)("div",{className:l.timeStampTitle,children:(0,f.Ue)(a,!0)}),n&&n.map((function(e,t){return(0,j.jsxs)("div",{className:l.labelContainer,children:[(0,j.jsx)("div",{className:l.labelColor,style:{backgroundColor:i[t].lineColor}}),(0,j.jsx)("div",{className:l.itemValue,children:(0,j.jsxs)("span",{className:l.valueContainer,children:[i[t].keyLabel,":"," ",r(e.value)]})})]},"lbPl-".concat(t,"-").concat(i[t].keyLabel))}))]}):null})),X=(0,o.$j)(null,{displayErrorMessage:w.Ih,openZoomPage:_.xG}),ee=(0,d.Z)((function(e){return(0,c.Z)((0,r.Z)((0,r.Z)({},m.NP),{},{containerElements:{display:"flex",flexDirection:"row",height:"100%",flexGrow:1},verticalAlignment:{flexDirection:"column"},chartCont:{position:"relative",height:140,width:"100%"},legendChart:{display:"flex",flexDirection:"column",flex:"0 1 auto",maxHeight:130,margin:0,overflowY:"auto",position:"relative",textAlign:"center",width:"100%",justifyContent:"flex-start",color:"#404143",fontWeight:"bold",fontSize:12},loadingAlign:{margin:"auto"}}))}))(X((function(e){var t=e.classes,n=e.title,a=e.displayErrorMessage,r=e.timeStart,o=e.timeEnd,s=e.propLoading,c=e.panelItem,d=e.apiPrefix,m=e.hideYAxis,g=void 0!==m&&m,x=e.areaWidget,f=void 0!==x&&x,p=e.yAxisFormatter,h=void 0===p?function(e){return e}:p,v=e.xAxisFormatter,y=void 0===v?function(e){return e}:v,C=e.zoomActivated,b=void 0!==C&&C,Z=e.openZoomPage,N=(0,l.useState)(!0),A=(0,i.Z)(N,2),E=A[0],w=A[1],F=(0,l.useState)([]),P=(0,i.Z)(F,2),T=P[0],D=P[1],B=(0,l.useState)(0),R=(0,i.Z)(B,2),O=R[0],_=R[1],U=(0,l.useState)(null),K=(0,i.Z)(U,2),$=K[0],X=K[1];(0,l.useEffect)((function(){s&&w(!0)}),[s]),(0,l.useEffect)((function(){if(E){var e=0;if(null!==r&&null!==o){var t=o.unix()-r.unix(),n=Math.floor(t/60);e=n<1?15:n}k.Z.invoke("GET","/api/v1/".concat(d,"/info/widgets/").concat(c.id,"/?step=").concat(e,"&").concat(null!==r?"&start=".concat(r.unix()):"").concat(null!==r&&null!==o?"&":"").concat(null!==o?"end=".concat(o.unix()):"")).then((function(e){var t=S(e,c);D(t.data),X(t),w(!1);var n,a=0,i=(0,H.Z)(t.data);try{for(i.s();!(n=i.n()).done;){var r=n.value;for(var l in r)if("name"!==l){var o=parseInt(r[l]);isNaN(o)&&(o=0),a5&&void 0!==arguments[5]&&arguments[5];switch(e.type){case a.singleValue:return(0,j.jsx)(de,{title:e.title,panelItem:e,timeStart:t,timeEnd:n,propLoading:i,apiPrefix:r});case a.simpleWidget:return(0,j.jsx)(le,{title:e.title,panelItem:e,timeStart:t,timeEnd:n,propLoading:i,apiPrefix:r,iconWidget:e.widgetIcon});case a.pieChart:return(0,j.jsx)(ie,{title:e.title,panelItem:e,timeStart:t,timeEnd:n,propLoading:i,apiPrefix:r});case a.linearGraph:case a.areaGraph:return(0,j.jsx)(ee,{title:e.title,panelItem:e,timeStart:t,timeEnd:n,propLoading:i,hideYAxis:e.disableYAxis,xAxisFormatter:e.xAxisFormatter,yAxisFormatter:e.yAxisFormatter,apiPrefix:r,areaWidget:e.type===a.areaGraph,zoomActivated:l});case a.barChart:return(0,j.jsx)($,{title:e.title,panelItem:e,timeStart:t,timeEnd:n,propLoading:i,apiPrefix:r,zoomActivated:l});case a.singleRep:var o=e.fillColor?e.fillColor:e.color;return(0,j.jsx)(se,{title:e.title,panelItem:e,timeStart:t,timeEnd:n,propLoading:i,color:e.color,fillColor:o,apiPrefix:r});default:return null}},me=n(76352),ge=(0,o.$j)(null,{onCloseAction:_.jv})((function(e){var t=e.value,n=e.modalOpen,a=e.timeStart,i=e.timeEnd,r=e.apiPrefix,o=e.onCloseAction;return t?(0,j.jsx)(me.Z,{title:t.title,onClose:function(){o()},modalOpen:n,wideLimit:!1,noContentPadding:!0,children:(0,j.jsx)(l.Fragment,{children:ue(t,a,i,!0,r,!0)})}):null})),xe=n(17778),fe=(0,o.$j)((function(e){return{zoomOpen:e.dashboard.zoom.openZoom,zoomWidget:e.dashboard.zoom.widgetRender}}),{displayErrorMessage:w.Ih}),pe=(0,d.Z)((function(e){return(0,c.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},m.OR),m.bN),{},{dashboardRow:{display:"flex",flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",maxWidth:1180}}))}))(fe((function(e){var t=e.classes,n=e.displayErrorMessage,a=e.apiPrefix,r=void 0===a?"admin":a,o=e.zoomOpen,c=e.zoomWidget,d=(0,l.useState)(null),m=(0,i.Z)(d,2),g=m[0],x=m[1],f=(0,l.useState)(null),p=(0,i.Z)(f,2),h=p[0],v=p[1],y=(0,l.useState)(!0),C=(0,i.Z)(y,2),b=C[0],N=C[1],A=(0,l.useState)(Z),w=(0,i.Z)(A,2),P=w[0],M=w[1],D=(0,l.useState)(0),L=(0,i.Z)(D,2),I=L[0],B=L[1],R=(0,V.Z)(),W=(0,u.Z)(R.breakpoints.up("md")),G=(0,l.useCallback)((function(e,n){return null===n||void 0===n?void 0:n.map((function(n,a){var i=n.length,o=Math.floor(12/i);return!W&&i>=4?o=6:!W&&i>=3&&(o=12),o<1?o=1:o>12&&(o=12),(0,j.jsx)(s.ZP,{item:!0,xs:12,className:t.dashboardRow,children:n.map((function(e,n){var a=P.find((function(t){return t.id===e}));return(0,j.jsx)(s.ZP,{className:t.widgetPanelDelimiter,item:!0,xs:12,sm:o,md:o,lg:o,children:(0,j.jsx)(s.ZP,{item:!0,xs:12,children:a?(0,j.jsx)(l.Fragment,{children:a.mergedPanels?(0,j.jsx)(l.Fragment,{children:(0,j.jsx)(T,{title:a.title,leftComponent:ue(a.mergedPanels[0],g,h,b,r),rightComponent:ue(a.mergedPanels[1],g,h,b,r)})}):ue(a,g,h,b,r)}):null})},"widget-".concat(e,"-").concat(n))}))},"line-".concat(e,"-").concat(a))}))}),[g,h,b,r,t.dashboardRow,t.widgetPanelDelimiter,P,W]),z=(0,l.useCallback)((function(){var e=0;if(null!==g&&null!==h){var t=h.unix()-g.unix(),a=Math.floor(t/60);e=a<1?15:a}k.Z.invoke("GET","/api/v1/".concat(r,"/info?step=").concat(e,"&").concat(null!==g?"&start=".concat(g.unix()):"").concat(null!==g&&null!==h?"&":"").concat(null!==h?"end=".concat(h.unix()):"")).then((function(e){if(e.widgets){var t=(a=e.widgets,Z.map((function(e){var t=a.find((function(t){return t.title.toLowerCase().trim()===e.title.toLowerCase().trim()}));return S(t,e)})));M(t)}else n({errorMessage:"Widget information could not be retrieved at this time. Please try again",detailedError:""});var a;N(!1)})).catch((function(e){n(e),N(!1)}))}),[g,h,n,r]);(0,l.useEffect)((function(){b&&z()}),[b,z]);var O=[[66,44,500,501],[80,81,1],[68,52],[63,70]];W?O.splice(1,0,[50,502]):(O.splice(1,0,[50]),O.splice(1,0,[502]));return(0,j.jsxs)(l.Fragment,{children:[o&&(0,j.jsx)(ge,{modalOpen:o,timeStart:g,timeEnd:h,widgetRender:0,value:c,apiPrefix:r}),(0,j.jsx)(xe.Z,{timeStart:g,setTimeStart:x,timeEnd:h,setTimeEnd:v,triggerSync:function(){N(!0)}}),(0,j.jsx)(s.ZP,{item:!0,xs:12,children:(0,j.jsx)(F.Z,{selectedTab:I,onChange:function(e){B(e)},tabOptions:[{label:"Usage"},{label:"Traffic"},{label:"Resources"}]})}),(0,j.jsxs)(s.ZP,{item:!0,xs:12,className:t.widgetsContainer,children:[(0,j.jsx)(E.x,{index:0,value:I,children:G("Summary",O)}),(0,j.jsx)(E.x,{index:1,value:I,children:G("Traffic",[[60],[71,17],[73]])}),(0,j.jsx)(E.x,{index:2,value:I,children:G("Resources",[[76,77],[11,8],[82,74]])})]})]})})))},4795:function(e,t,n){n.d(t,{x:function(){return s}});var a=n(18489),i=n(83738),r=n(50390),l=n(62559),o=["children","value","index"],s=function(e){var t=e.children,n=e.value,s=e.index,c=(0,i.Z)(e,o);return(0,l.jsx)("div",(0,a.Z)((0,a.Z)({role:"tabpanel",hidden:n!==s,id:"simple-tabpanel-".concat(s),"aria-labelledby":"simple-tab-".concat(s),style:{marginTop:"5px"}},c),{},{children:n===s&&(0,l.jsx)(r.Fragment,{children:t})}))}}}]); -//# sourceMappingURL=1724.d1b98d6d.chunk.js.map \ No newline at end of file diff --git a/portal-ui/build/static/js/1724.d1b98d6d.chunk.js.map b/portal-ui/build/static/js/1724.d1b98d6d.chunk.js.map deleted file mode 100644 index 238689126..000000000 --- a/portal-ui/build/static/js/1724.d1b98d6d.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/js/1724.d1b98d6d.chunk.js","mappings":"mLA4BMA,GAAeC,EAAAA,EAAAA,GAAW,CAC9BC,KAAM,CACJC,gBAAiB,cACjBC,WAAY,EACZC,cAAe,EACfC,SAAU,GACVC,cAAe,YACfC,MAAO,WAETC,SAAU,CAAE,oBAAqB,CAAED,MAAO,UAAWE,WAAY,SACjEC,UAAW,CACTC,WACE,4FACFC,OAAQ,GAEVC,SAAU,CACRC,SAAU,KACVC,SAAU,WACV,WAAY,CACVC,QAAS,MACTd,gBAAiB,UACjBU,OAAQ,EACRK,MAAO,OACPC,QAAS,YAwDf,IAnDoB,SAAC,GAAyD,IAAvDC,EAAsD,EAAtDA,YAAaC,EAAyC,EAAzCA,SAAUC,EAA+B,EAA/BA,WACtCC,EAAYvB,IAElB,OACE,SAAC,EAAAw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EACdjJ,QAASA,EACTkJ,WAAYA,EACZwB,YAhDc,WAClBrK,GAAW,OAiDT,SAACpR,EAAA,GAAD,CAAMC,MAAI,EAACC,GAAI,GAAf,UACE,SAACuG,EAAA,EAAD,CACElK,YAAagH,EACb/G,SAAU,SAACU,GACTsG,EAAUtG,IAEZT,WAAY,CACV,CAAEc,MAAO,SACT,CAAEA,MAAO,WACT,CAAEA,MAAO,mBAIf,UAACyC,EAAA,GAAD,CAAMC,MAAI,EAACC,GAAI,GAAIhB,UAAW/B,EAAQuJ,iBAAtC,WACE,SAAC,IAAD,CAAUpJ,MAAO,EAAGN,MAAOuG,EAA3B,SACG6W,EAAO,UAAWkB,MAErB,SAAC,IAAD,CAAUhe,MAAO,EAAGN,MAAOuG,EAA3B,SACG6W,EAAO,UAvCO,CAAC,CAAC,IAAK,CAAC,GAAI,IAAK,CAAC,SAyCnC,SAAC,IAAD,CAAU9c,MAAO,EAAGN,MAAOuG,EAA3B,SACG6W,EAAO,YA/CQ,CACtB,CAAC,GAAI,IACL,CAAC,GAAI,GACL,CAAC,GAAI,mB,oIC1NIsB,EAAW,SAACC,GACvB,IAAQC,EAAqCD,EAArCC,SAAU5e,EAA2B2e,EAA3B3e,MAAOM,EAAoBqe,EAApBre,MAAUue,GAAnC,OAA6CF,EAA7C,GAEA,OACE,gCACEG,KAAK,WACLC,OAAQ/e,IAAUM,EAClBG,GAAE,0BAAqBH,GACvB,uCAA+BA,GAC/ByS,MAAO,CAAEiM,UAAW,QAChBH,GANN,aAQG7e,IAAUM,IAAS,SAAC,EAAAX,SAAD,UAAWif","sources":["screens/Console/Common/TabSelector/TabSelector.tsx","screens/Console/Dashboard/BasicDashboard/ServerInfoCard.tsx","screens/Console/Dashboard/BasicDashboard/DriveInfoCard.tsx","screens/Console/Common/GeneralUsePaginator/GeneralUsePaginator.tsx","screens/Console/Dashboard/BasicDashboard/BasicDashboard.tsx","screens/Console/Dashboard/CommonCard.tsx","screens/Console/Dashboard/Prometheus/types.ts","screens/Console/Dashboard/Prometheus/utils.tsx","screens/Console/Dashboard/Prometheus/MergedWidgets.tsx","screens/Console/Dashboard/Prometheus/Widgets/tooltips/BarChartTooltip.tsx","screens/Console/Dashboard/Prometheus/Widgets/BarChartWidget.tsx","screens/Console/Dashboard/Prometheus/Widgets/tooltips/LineChartTooltip.tsx","screens/Console/Dashboard/Prometheus/Widgets/LinearGraphWidget.tsx","screens/Console/Dashboard/Prometheus/Widgets/PieChartWidget.tsx","screens/Console/Dashboard/Prometheus/Widgets/SimpleWidget.tsx","screens/Console/Dashboard/Prometheus/Widgets/SingleRepWidget.tsx","screens/Console/Dashboard/Prometheus/Widgets/SingleValueWidget.tsx","screens/Console/Dashboard/Prometheus/widgetUtils.tsx","screens/Console/Dashboard/Prometheus/ZoomWidget.tsx","screens/Console/Dashboard/Prometheus/PrDashboard.tsx","screens/shared/tabs.tsx"],"sourcesContent":["// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment } from \"react\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\nimport { ITabOption } from \"./types\";\n\ninterface ITabSelector {\n selectedTab: number;\n onChange: (newValue: number) => void;\n tabOptions: ITabOption[];\n}\n\nconst tabSubStyles = makeStyles({\n root: {\n backgroundColor: \"transparent\",\n paddingTop: 0,\n paddingBottom: 0,\n fontSize: 22,\n textTransform: \"uppercase\",\n color: \"#D0D0D0\",\n },\n selected: { \"& .MuiTab-wrapper\": { color: \"#07193E\", fontWeight: \"bold\" } },\n indicator: {\n background:\n \"transparent linear-gradient(90deg, #072B4E 0%, #081C42 100%) 0% 0% no-repeat padding-box;\",\n height: 4,\n },\n scroller: {\n maxWidth: 1185,\n position: \"relative\",\n \"&::after\": {\n content: '\" \"',\n backgroundColor: \"#EEF1F4\",\n height: 4,\n width: \"100%\",\n display: \"block\",\n },\n },\n});\n\nconst TabSelector = ({ selectedTab, onChange, tabOptions }: ITabSelector) => {\n const subStyles = tabSubStyles();\n\n return (\n \n , newValue: number) => {\n onChange(newValue);\n }}\n classes={{\n indicator: subStyles.indicator,\n scroller: subStyles.scroller,\n }}\n >\n {tabOptions.map((option, index) => {\n let tabOptions: ITabOption = {\n label: option.label,\n };\n\n if (option.value) {\n tabOptions = { ...tabOptions, value: option.value };\n }\n\n if (option.disabled) {\n tabOptions = { ...tabOptions, disabled: option.disabled };\n }\n\n return (\n \n );\n })}\n \n \n );\n};\n\nexport default TabSelector;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport Grid from \"@mui/material/Grid\";\nimport { ServerInfo } from \"../types\";\nimport { niceDays } from \"../../../../common/utils\";\nimport { Card, CardHeader } from \"@mui/material\";\nimport { CircleIcon, VersionIcon } from \"../../../../icons\";\nimport get from \"lodash/get\";\nimport { commonDashboardInfocard } from \"../../Common/FormComponents/common/styleLibrary\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...commonDashboardInfocard,\n });\n\ninterface ICardProps {\n classes: any;\n server: ServerInfo;\n index: number;\n}\n\nconst ServerInfoCard = ({ classes, server, index }: ICardProps) => {\n const serverStatusToClass = (health_status: string) => {\n switch (health_status) {\n case \"offline\":\n return classes.redState;\n case \"online\":\n return classes.greenState;\n default:\n return classes.greyState;\n }\n };\n const networkKeys = Object.keys(get(server, \"network\", {}));\n const networkTotal = networkKeys.length;\n const totalDrives = server.drives ? server.drives.length : 0;\n const activeNetwork = networkKeys.reduce((acc: number, currValue: string) => {\n const item = server.network[currValue];\n if (item === \"online\") {\n return acc + 1;\n }\n return acc;\n }, 0);\n const activeDisks = server.drives\n ? server.drives.filter((element) => element.state === \"ok\").length\n : 0;\n return (\n \n \n
Server {index}
\n
\n {server.state && (\n \n \n \n )}\n {server.endpoint || \"\"}\n
\n \n }\n subheader={\n \n \n \n \n \n Drives: {activeDisks}/{totalDrives}{\" \"}\n
\n \n \n \n \n Network: {activeNetwork}/{networkTotal}{\" \"}\n \n \n Uptime: {server.uptime ? niceDays(server.uptime) : \"N/A\"}\n \n \n \n Version {server.version ? server.version : \"N/A\"}\n \n \n }\n />\n \n );\n};\nexport default withStyles(styles)(ServerInfoCard);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment } from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport Grid from \"@mui/material/Grid\";\nimport { IDriveInfo } from \"../types\";\nimport { niceBytes } from \"../../../../common/utils\";\nimport { Card, CardHeader } from \"@mui/material\";\nimport { CircleIcon } from \"../../../../icons\";\nimport { commonDashboardInfocard } from \"../../Common/FormComponents/common/styleLibrary\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...commonDashboardInfocard,\n });\n\ninterface ICardProps {\n classes: any;\n drive: IDriveInfo;\n}\n\nconst DriveInfoCard = ({ classes, drive }: ICardProps) => {\n const driveStatusToClass = (health_status: string) => {\n switch (health_status) {\n case \"offline\":\n return classes.redState;\n case \"ok\":\n return classes.greenState;\n default:\n return classes.greyState;\n }\n };\n\n return (\n \n \n \n {drive.state && (\n \n \n \n )}\n {drive.endpoint || \"\"}\n \n }\n subheader={\n \n \n Capacity:{\" \"}\n {niceBytes(\n drive.totalSpace ? drive.totalSpace.toString() : \"0\"\n )}\n \n \n Used:{\" \"}\n {niceBytes(drive.usedSpace ? drive.usedSpace.toString() : \"0\")}\n \n \n Available:{\" \"}\n {niceBytes(\n drive.availableSpace ? drive.availableSpace.toString() : \"0\"\n )}\n \n \n }\n />\n \n \n );\n};\n\nexport default withStyles(styles)(DriveInfoCard);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment } from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport Grid from \"@mui/material/Grid\";\nimport Pagination from \"@mui/material/Pagination\";\n\ninterface IGeneralUsePaginator {\n classes: any;\n page: number;\n itemsPerPage?: number;\n entity: string;\n totalItems: number;\n onChange: (newPage: number) => void;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n paginatorContainer: {\n margin: \"10px 0 18px\",\n flexWrap: \"wrap\",\n },\n paginatorInformation: {\n color: \"#848484\",\n fontSize: 12,\n fontStyle: \"italic\",\n whiteSpace: \"nowrap\",\n },\n paginatorEntity: {\n color: \"#767676\",\n fontSize: 12,\n fontWeight: \"bold\",\n },\n paginationElement: {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n color: \"#848484\",\n fontSize: 12,\n },\n });\n\nconst paginatorStyling = makeStyles({\n ul: {\n \"& .MuiPaginationItem-root\": {\n color: \"#07193E\",\n fontSize: 14,\n \"&.Mui-selected\": {\n backgroundColor: \"transparent\",\n fontWeight: \"bold\",\n \"&::after\": {\n backgroundColor: \"#07193E\",\n width: \"100%\",\n height: 3,\n content: '\" \"',\n position: \"absolute\",\n bottom: -3,\n },\n },\n },\n },\n});\n\nconst GeneralUsePaginator = ({\n classes,\n page = 1,\n itemsPerPage = 5,\n entity,\n totalItems,\n onChange,\n}: IGeneralUsePaginator) => {\n const paginatorStyles = paginatorStyling();\n\n const currentInitialItem = page * itemsPerPage - itemsPerPage + 1;\n const currentEndItem = currentInitialItem + itemsPerPage - 1;\n const displayCurrentEndItem =\n currentEndItem > totalItems ? totalItems : currentEndItem;\n const totalPages = Math.ceil(totalItems / itemsPerPage);\n\n return (\n \n \n \n {entity}\n
\n \n Showing{\" \"}\n {totalPages > 1 ? (\n \n {currentInitialItem} - {displayCurrentEndItem} out of{\" \"}\n \n ) : null}\n {totalItems} Total {entity}\n \n
\n \n {totalPages > 1 && (\n \n Go to:{\" \"}\n {\n onChange(newPage);\n }}\n classes={{ ul: paginatorStyles.ul }}\n />\n \n )}\n \n
\n
\n );\n};\n\nexport default withStyles(styles)(GeneralUsePaginator);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useState } from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport Grid from \"@mui/material/Grid\";\nimport { IDriveInfo, Usage } from \"../types\";\nimport { calculateBytes, representationNumber } from \"../../../../common/utils\";\nimport { TabPanel } from \"../../../shared/tabs\";\nimport ServerInfoCard from \"./ServerInfoCard\";\nimport DriveInfoCard from \"./DriveInfoCard\";\nimport CommonCard from \"../CommonCard\";\nimport TabSelector from \"../../Common/TabSelector/TabSelector\";\nimport GeneralUsePaginator from \"../../Common/GeneralUsePaginator/GeneralUsePaginator\";\nimport { widgetContainerCommon } from \"../../Common/FormComponents/common/styleLibrary\";\nimport { PrometheusIcon } from \"../../../../icons\";\nimport HelpBox from \"../../../../common/HelpBox\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n generalStatusTitle: {\n color: \"#767676\",\n fontSize: 16,\n fontWeight: \"bold\",\n margin: \"15px 10px 0 10px\",\n },\n paginatorContainer: {\n maxWidth: 1185,\n width: \"100%\",\n },\n ...widgetContainerCommon,\n });\n\ninterface IDashboardProps {\n classes: any;\n usage: Usage | null;\n}\n\nconst itemsPerPage = 5;\n\nconst BasicDashboard = ({ classes, usage }: IDashboardProps) => {\n const [curTab, setCurTab] = useState(0);\n const [serversPageNumber, setServersPageNumber] = useState(1);\n const [drivesPageNumber, setDrivesPageNumber] = useState(1);\n\n const prettyUsage = (usage: string | undefined) => {\n if (usage === undefined) {\n return { total: \"0\", unit: \"Mi\" };\n }\n\n const calculatedBytes = calculateBytes(usage);\n\n return calculatedBytes;\n };\n\n const prettyNumber = (usage: number | undefined) => {\n if (usage === undefined) {\n return 0;\n }\n\n return usage.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n };\n\n const makeServerArray = (usage: Usage | null) => {\n if (usage !== null) {\n return usage.servers.sort(function (a, b) {\n var nameA = a.endpoint.toLowerCase();\n var nameB = b.endpoint.toLowerCase();\n if (nameA < nameB) {\n return -1;\n }\n if (nameA > nameB) {\n return 1;\n }\n return 0;\n });\n }\n\n return [];\n };\n\n const serverArray = makeServerArray(usage || null);\n\n const usageToRepresent = prettyUsage(\n usage && usage.usage ? usage.usage.toString() : \"0\"\n );\n\n let allDrivesArray: IDriveInfo[] = [];\n\n serverArray.forEach((server) => {\n const drivesInput = server.drives.map((drive) => {\n return drive;\n });\n\n allDrivesArray = [...allDrivesArray, ...drivesInput];\n });\n\n const splitedServers = serverArray.slice(\n serversPageNumber * itemsPerPage - itemsPerPage,\n serversPageNumber * itemsPerPage\n );\n\n const splitedDrives = allDrivesArray.slice(\n drivesPageNumber * itemsPerPage - itemsPerPage,\n drivesPageNumber * itemsPerPage\n );\n\n return (\n \n
\n {usage?.prometheusNotReady && (\n \n \n }\n title={\"We can't retrieve advanced metrics at this time\"}\n help={\n \n MinIO Dashboard will display basic metrics as we couldn't\n connect to Prometheus successfully.\n

\n Please try again in a few minutes. If the problem persists,\n you can review your configuration and confirm that Prometheus\n server is up and running.\n
\n }\n />\n
\n \n )}\n \n \n General Status\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {\n setCurTab(newValue);\n }}\n tabOptions={[{ label: \"Servers\" }, { label: \"Drives\" }]}\n />\n \n \n \n
\n \n
\n {splitedServers.map((server, index) => (\n \n \n \n ))}\n
\n \n
\n \n
\n {splitedDrives.map((drive, index) => (\n \n \n \n ))}\n
\n
\n \n {!usage?.prometheusNotReady && (\n \n \n }\n title={\"Monitoring\"}\n help={\n \n The MinIO Dashboard is displaying basic metrics only due to\n missing the{\" \"}\n \n necessary settings\n {\" \"}\n for displaying extended metrics.\n
\n
\n See{\" \"}\n \n Collect MinIO Metrics Using Prometheus\n {\" \"}\n for a complete tutorial on scraping and visualizing MinIO\n metrics with Prometheus.\n
\n }\n />\n
\n \n )}\n \n );\n};\n\nexport default withStyles(styles)(BasicDashboard);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport { Card, CardHeader } from \"@mui/material\";\nimport { Link } from \"react-router-dom\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport React, { Fragment } from \"react\";\nimport { widgetCommon } from \"../Common/FormComponents/common/styleLibrary\";\n\nexport interface ISubInterface {\n message: string;\n fontWeight?: \"normal\" | \"bold\";\n}\n\ninterface ICommonCard {\n title: string;\n metricValue: any;\n metricUnit?: string;\n subMessage?: ISubInterface;\n moreLink?: string;\n rightComponent?: any;\n extraMargin?: boolean;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...widgetCommon,\n cardRoot: {\n ...widgetCommon.singleValueContainer,\n \"&.MuiPaper-root\": {\n borderRadius: 10,\n },\n },\n metricText: {\n fontSize: 70,\n lineHeight: 1.1,\n color: \"#07193E\",\n fontWeight: \"bold\",\n },\n unitText: {\n fontSize: 10,\n color: \"#767676\",\n fontWeight: \"normal\",\n },\n subHearderContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n },\n subMessage: {\n fontSize: 10,\n color: \"#767676\",\n \"&.bold\": {\n fontWeight: \"bold\",\n },\n },\n headerContainer: {\n display: \"flex\",\n justifyContent: \"space-between\",\n },\n viewAll: {\n fontSize: 10,\n color: \"#C83B51\",\n textTransform: \"capitalize\",\n\n \"& a, & a:hover, & a:visited, & a:active\": {\n color: \"#C83B51\",\n },\n },\n extraMargin: {\n margin: \"10px 20px 10px 0\",\n },\n });\n\nconst cardSubStyles = makeStyles({\n root: { backgroundColor: \"#fff\", padding: 0 },\n title: {\n ...widgetCommon.titleContainer,\n },\n content: {\n maxWidth: \"100%\",\n },\n});\n\nconst CommonCard = ({\n title,\n metricValue,\n metricUnit,\n subMessage,\n moreLink,\n rightComponent,\n extraMargin = false,\n classes,\n}: ICommonCard) => {\n const subStyles = cardSubStyles();\n const SubHeader = () => {\n return (\n \n
\n
\n
\n \n {metricValue}\n {metricUnit}\n \n
\n {subMessage && (\n \n {subMessage.message}\n
\n )}\n
\n
{rightComponent}
\n
\n
\n );\n };\n\n const Header = () => {\n return (\n \n
\n {title}\n {moreLink && (\n \n \n View All\n \n \n )}\n
\n
\n );\n };\n\n return (\n \n \n {metricValue !== \"\" && (\n }\n subheader={\n \n \n \n }\n classes={{\n root: subStyles.root,\n title: subStyles.title,\n content: subStyles.content,\n }}\n />\n )}\n \n \n );\n};\n\nexport default withStyles(styles)(CommonCard);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport {\n IBarChartConfiguration,\n IBarChartRelation,\n IDataSRep,\n ILinearGraphConfiguration,\n IPieChartConfiguration,\n} from \"./Widgets/types\";\n\nexport enum widgetType {\n singleValue = \"singleValue\",\n linearGraph = \"linearGraph\",\n areaGraph = \"areaGraph\",\n barChart = \"barChart\",\n pieChart = \"pieChart\",\n singleRep = \"singleRep\",\n simpleWidget = \"simpleWidget\",\n}\n\nexport interface IDashboardPanel {\n id: number;\n mergedPanels?: IDashboardPanel[];\n title: string;\n data?: string | object[] | IDataSRep[];\n dataOuter?: string | object[];\n type?: widgetType;\n widgetIcon?: any;\n widgetConfiguration?:\n | ILinearGraphConfiguration[]\n | IBarChartConfiguration[]\n | IPieChartConfiguration;\n color?: string;\n fillColor?: string;\n innerLabel?: string;\n labelDisplayFunction?: (value: string) => any;\n disableYAxis?: boolean;\n xAxisFormatter?: (item: string) => string;\n yAxisFormatter?: (item: string) => string;\n customStructure?: IBarChartRelation[];\n}\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment } from \"react\";\nimport get from \"lodash/get\";\nimport { IDashboardPanel, widgetType } from \"./types\";\nimport {\n getTimeFromTimestamp,\n niceBytes,\n niceDays,\n representationNumber,\n textToRGBColor,\n units,\n} from \"../../../../common/utils\";\nimport HealIcon from \"../../../../icons/HealIcon\";\nimport DiagnosticsIcon from \"../../../../icons/DiagnosticsIcon\";\nimport { UptimeIcon } from \"../../../../icons\";\n\nconst colorsMain = [\n \"#C4D4E9\",\n \"#DCD1EE\",\n \"#D1EEE7\",\n \"#EEDED1\",\n \"#AAF38F\",\n \"#F9E6C5\",\n \"#C83B51\",\n \"#F4CECE\",\n \"#D6D6D6\",\n];\n\nconst niceDaysFromNS = (seconds: string) => {\n return niceDays(seconds, \"ns\");\n};\n\nconst roundNumber = (value: string) => {\n return parseInt(value).toString(10);\n};\n\nexport const panelsConfiguration: IDashboardPanel[] = [\n {\n id: 1,\n title: \"Uptime\",\n data: \"N/A\",\n type: widgetType.simpleWidget,\n widgetIcon: ,\n labelDisplayFunction: niceDays,\n },\n {\n id: 50,\n title: \"Capacity\",\n data: [],\n dataOuter: [{ name: \"outer\", value: 100 }],\n widgetConfiguration: {\n outerChart: {\n colorList: [\"#9c9c9c\"],\n innerRadius: 0,\n outerRadius: 0,\n startAngle: 0,\n endAngle: 0,\n },\n innerChart: {\n colorList: colorsMain,\n innerRadius: 20,\n outerRadius: 50,\n startAngle: 90,\n endAngle: -200,\n },\n },\n type: widgetType.pieChart,\n innerLabel: \"N/A\",\n labelDisplayFunction: niceBytes,\n },\n {\n id: 68,\n title: \"Data Usage Growth\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.areaGraph,\n yAxisFormatter: niceBytes,\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n id: 52,\n title: \"Object size distribution\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"a\",\n color: colorsMain[0],\n background: {\n fill: \"#EEF1F4\",\n },\n greatestColor: \"#081C42\",\n },\n ],\n customStructure: [\n { originTag: \"LESS_THAN_1024_B\", displayTag: \"Less than 1024B\" },\n {\n originTag: \"BETWEEN_1024_B_AND_1_MB\",\n displayTag: \"Between 1024B and 1MB\",\n },\n {\n originTag: \"BETWEEN_1_MB_AND_10_MB\",\n displayTag: \"Between 1MB and 10MB\",\n },\n {\n originTag: \"BETWEEN_10_MB_AND_64_MB\",\n displayTag: \"Between 10MB and 64MB\",\n },\n {\n originTag: \"BETWEEN_64_MB_AND_128_MB\",\n displayTag: \"Between 64MB and 128MB\",\n },\n {\n originTag: \"BETWEEN_128_MB_AND_512_MB\",\n displayTag: \"Between 128MB and 512MB\",\n },\n {\n originTag: \"GREATER_THAN_512_MB\",\n displayTag: \"Greater than 512MB\",\n },\n ],\n type: widgetType.barChart,\n },\n {\n id: 66,\n title: \"Buckets\",\n data: [],\n innerLabel: \"N/A\",\n type: widgetType.singleRep,\n color: \"#0071BC\",\n fillColor: \"#ADD5E0\",\n },\n {\n id: 44,\n title: \"Objects\",\n data: [],\n innerLabel: \"N/A\",\n type: widgetType.singleRep,\n color: \"#0071BC\",\n fillColor: \"#ADD5E0\",\n },\n {\n id: 63,\n title: \"API Data Received Rate\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n\n xAxisFormatter: getTimeFromTimestamp,\n yAxisFormatter: niceBytes,\n },\n {\n id: 61,\n title: \"Total Open FDs\",\n data: [],\n innerLabel: \"N/A\",\n type: widgetType.singleRep,\n color: \"#22B573\",\n fillColor: \"#A6E8C4\",\n },\n {\n id: 62,\n title: \"Total Goroutines\",\n data: [],\n innerLabel: \"N/A\",\n type: widgetType.singleRep,\n color: \"#F7655E\",\n fillColor: \"#F4CECE\",\n },\n {\n id: 77,\n title: \"Node CPU Usage\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n\n yAxisFormatter: roundNumber,\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n id: 60,\n title: \"API Request Rate\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n id: 70,\n title: \"API Data Sent Rate\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n\n xAxisFormatter: getTimeFromTimestamp,\n yAxisFormatter: niceBytes,\n },\n {\n id: 17,\n title: \"Internode Data Transfer\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n\n yAxisFormatter: niceBytes,\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n id: 73,\n title: \"Node IO\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n\n yAxisFormatter: niceBytes,\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n id: 80,\n title: \"Time Since Last Heal Activity\",\n data: \"N/A\",\n type: widgetType.simpleWidget,\n widgetIcon: ,\n labelDisplayFunction: niceDaysFromNS,\n },\n {\n id: 81,\n title: \"Time Since Last Scan Activity\",\n data: \"N/A\",\n type: widgetType.simpleWidget,\n widgetIcon: ,\n labelDisplayFunction: niceDaysFromNS,\n },\n {\n id: 71,\n title: \"API Request Error Rate\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n id: 76,\n title: \"Node Memory Usage\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n\n xAxisFormatter: getTimeFromTimestamp,\n yAxisFormatter: niceBytes,\n },\n {\n id: 74,\n title: \"Drive Used Capacity\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n\n xAxisFormatter: getTimeFromTimestamp,\n yAxisFormatter: niceBytes,\n },\n {\n id: 82,\n title: \"Drives Free Inodes\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n\n disableYAxis: true,\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n id: 11,\n title: \"Node Syscalls\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n yAxisFormatter: roundNumber,\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n id: 8,\n title: \"Node File Descriptors\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n yAxisFormatter: roundNumber,\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n id: 500,\n mergedPanels: [\n {\n id: 53,\n title: \"Online\",\n data: \"N/A\",\n type: widgetType.singleValue,\n },\n {\n id: 69,\n title: \"Offline\",\n data: \"N/A\",\n type: widgetType.singleValue,\n },\n ],\n title: \"Servers\",\n },\n {\n id: 501,\n mergedPanels: [\n {\n id: 9,\n title: \"Online\",\n data: \"N/A\",\n type: widgetType.singleValue,\n },\n {\n id: 78,\n title: \"Offline\",\n data: \"N/A\",\n type: widgetType.singleValue,\n },\n ],\n title: \"Drives\",\n },\n {\n id: 502,\n mergedPanels: [\n {\n id: 65,\n title: \"Upload\",\n data: \"N/A\",\n type: widgetType.singleValue,\n\n labelDisplayFunction: niceBytes,\n },\n {\n id: 64,\n title: \"Download\",\n data: \"N/A\",\n type: widgetType.singleValue,\n\n labelDisplayFunction: niceBytes,\n },\n ],\n title: \"Network\",\n },\n];\n\nconst calculateMainValue = (elements: any[], metricCalc: string) => {\n if (elements.length === 0) {\n return [\"\", \"0\"];\n }\n\n switch (metricCalc) {\n case \"mean\":\n const sumValues = elements.reduce((accumulator, currValue) => {\n return accumulator + parseFloat(currValue[1]);\n }, 0);\n\n const mean = Math.floor(sumValues / elements.length);\n\n return [\"\", mean.toString()];\n default:\n const sortResult = elements.sort(\n (value1: any[], value2: any[]) => value1[0] - value2[0]\n );\n\n return sortResult[sortResult.length - 1];\n }\n};\n\nconst constructLabelNames = (metrics: any, legendFormat: string) => {\n const keysToReplace = Object.keys(metrics);\n const expToReplace = new RegExp(`{{(${keysToReplace.join(\"|\")})}}`, \"g\");\n\n let replacedLegend = legendFormat.replace(expToReplace, (matchItem) => {\n const nwMatchItem = matchItem.replace(/({{|}})/g, \"\");\n return metrics[nwMatchItem];\n });\n\n const countVarsOpen = (replacedLegend.match(/{{/g) || []).length;\n const countVarsClose = (replacedLegend.match(/}}/g) || []).length;\n\n let cleanLegend = replacedLegend.replace(/{{(.*?)}}/g, \"\");\n\n if (\n countVarsOpen === countVarsClose &&\n countVarsOpen !== 0 &&\n countVarsClose !== 0\n ) {\n keysToReplace.forEach((element) => {\n replacedLegend = replacedLegend.replace(element, metrics[element]);\n });\n\n cleanLegend = replacedLegend;\n }\n\n // In case not all the legends were replaced, we remove the placeholders.\n return cleanLegend;\n};\n\nexport const getWidgetsWithValue = (payload: any[]): IDashboardPanel[] => {\n return panelsConfiguration.map((panelItem: IDashboardPanel) => {\n const payloadData = payload.find(\n (panelT) =>\n panelT.title.toLowerCase().trim() ===\n panelItem.title.toLowerCase().trim()\n );\n return widgetDetailsToPanel(payloadData, panelItem);\n });\n};\n\nexport const widgetDetailsToPanel = (\n payloadData: any,\n panelItem: IDashboardPanel\n) => {\n if (!payloadData) {\n return panelItem;\n }\n\n const typeOfPayload = payloadData.type;\n\n switch (panelItem.type) {\n case widgetType.singleValue:\n case widgetType.simpleWidget:\n if (typeOfPayload === \"stat\" || typeOfPayload === \"singlestat\") {\n // We sort values & get the last value\n let elements = get(payloadData, \"targets[0].result[0].values\", []);\n\n if (elements === null) {\n elements = [];\n }\n\n const metricCalc = get(\n payloadData,\n \"options.reduceOptions.calcs[0]\",\n \"lastNotNull\"\n );\n\n const valueDisplay = calculateMainValue(elements, metricCalc);\n\n const data = panelItem.labelDisplayFunction\n ? panelItem.labelDisplayFunction(valueDisplay[1])\n : valueDisplay[1];\n\n return {\n ...panelItem,\n data,\n };\n }\n break;\n case widgetType.pieChart:\n if (typeOfPayload === \"gauge\") {\n let chartSeries = get(payloadData, \"targets[0].result\", []);\n\n if (chartSeries === null) {\n chartSeries = [];\n }\n\n const metricCalc = get(\n payloadData,\n \"options.reduceOptions.calcs[0]\",\n \"lastNotNull\"\n );\n\n const valuesArray = chartSeries.length > 0 ? chartSeries[0].values : [];\n\n const totalValues = calculateMainValue(valuesArray, metricCalc);\n\n const values = chartSeries.map((elementValue: any) => {\n const values = get(elementValue, \"values\", []);\n const metricKeyItem = Object.keys(elementValue.metric);\n\n const sortResult = values.sort(\n (value1: any[], value2: any[]) => value1[0] - value2[0]\n );\n\n const metricName = elementValue.metric[metricKeyItem[0]];\n const value = sortResult[sortResult.length - 1];\n return { name: metricName, value: parseInt(value) };\n });\n\n const innerLabel = panelItem.labelDisplayFunction\n ? panelItem.labelDisplayFunction(totalValues[1])\n : totalValues[1];\n\n return {\n ...panelItem,\n data: values,\n innerLabel,\n };\n }\n break;\n case widgetType.linearGraph:\n case widgetType.areaGraph:\n if (typeOfPayload === \"graph\") {\n let targets = get(payloadData, \"targets\", []);\n if (targets === null) {\n targets = [];\n }\n\n const series: any[] = [];\n const plotValues: any[] = [];\n\n targets.forEach(\n (\n targetMaster: { legendFormat: string; result: any[] },\n index: number\n ) => {\n // Add a new serie to plot variables in case it is not from multiple values\n let results = get(targetMaster, \"result\", []);\n const legendFormat = targetMaster.legendFormat;\n if (results === null) {\n results = [];\n }\n\n results.forEach((itemVals: { metric: object; values: any[] }) => {\n // Label Creation\n const labelName = constructLabelNames(\n itemVals.metric,\n legendFormat\n );\n const keyName = `key_${index}${labelName}`;\n\n // series creation with recently created label\n series.push({\n dataKey: keyName,\n keyLabel: labelName,\n lineColor: \"\",\n fillColor: \"\",\n });\n\n // we iterate over values and create elements\n let values = get(itemVals, \"values\", []);\n if (values === null) {\n values = [];\n }\n\n values.forEach((valInfo: any[]) => {\n const itemIndex = plotValues.findIndex(\n (element) => element.name === valInfo[0]\n );\n\n // Element not exists yet\n if (itemIndex === -1) {\n let itemToPush: any = { name: valInfo[0] };\n itemToPush[keyName] = valInfo[1];\n\n plotValues.push(itemToPush);\n } else {\n plotValues[itemIndex][keyName] = valInfo[1];\n }\n });\n });\n }\n );\n\n const sortedSeries = series.sort((series1: any, series2: any) => {\n if (series1.keyLabel < series2.keyLabel) {\n return -1;\n }\n if (series1.keyLabel > series2.keyLabel) {\n return 1;\n }\n return 0;\n });\n\n const seriesWithColors = sortedSeries.map(\n (serialC: any, index: number) => {\n return {\n ...serialC,\n lineColor: colorsMain[index] || textToRGBColor(serialC.keyLabel),\n fillColor: colorsMain[index] || textToRGBColor(serialC.keyLabel),\n };\n }\n );\n\n const sortedVals = plotValues.sort(\n (value1: any, value2: any) => value1.name - value2.name\n );\n\n return {\n ...panelItem,\n widgetConfiguration: seriesWithColors,\n data: sortedVals,\n };\n }\n break;\n case widgetType.barChart:\n if (typeOfPayload === \"bargauge\") {\n let chartBars = get(payloadData, \"targets[0].result\", []);\n\n if (chartBars === null) {\n chartBars = [];\n }\n\n const sortFunction = (value1: any[], value2: any[]) =>\n value1[0] - value2[0];\n\n let values = [];\n if (panelItem.customStructure) {\n values = panelItem.customStructure.map((structureItem) => {\n const metricTake = chartBars.find((element: any) => {\n const metricKeyItem = Object.keys(element.metric);\n\n const metricName = element.metric[metricKeyItem[0]];\n\n return metricName === structureItem.originTag;\n });\n\n const elements = get(metricTake, \"values\", []);\n\n const sortResult = elements.sort(sortFunction);\n const lastValue = sortResult[sortResult.length - 1] || [\"\", \"0\"];\n\n return {\n name: structureItem.displayTag,\n a: parseInt(lastValue[1]),\n };\n });\n } else {\n // If no configuration is set, we construct the series for bar chart and return the element\n values = chartBars.map((elementValue: any) => {\n const metricKeyItem = Object.keys(elementValue.metric);\n\n const metricName = elementValue.metric[metricKeyItem[0]];\n\n const elements = get(elementValue, \"values\", []);\n\n const sortResult = elements.sort(sortFunction);\n const lastValue = sortResult[sortResult.length - 1] || [\"\", \"0\"];\n return { name: metricName, a: parseInt(lastValue[1]) };\n });\n }\n\n return {\n ...panelItem,\n data: values,\n };\n }\n break;\n case widgetType.singleRep:\n if (typeOfPayload === \"stat\") {\n // We sort values & get the last value\n let elements = get(payloadData, \"targets[0].result[0].values\", []);\n if (elements === null) {\n elements = [];\n }\n const metricCalc = get(\n payloadData,\n \"options.reduceOptions.calcs[0]\",\n \"lastNotNull\"\n );\n\n const valueDisplay = calculateMainValue(elements, metricCalc);\n\n const sortResult = elements.sort(\n (value1: any[], value2: any[]) => value1[0] - value2[0]\n );\n\n let valuesForBackground = [];\n\n if (sortResult.length === 1) {\n valuesForBackground.push({ value: 0 });\n }\n\n sortResult.forEach((eachVal: any) => {\n valuesForBackground.push({ value: parseInt(eachVal[1]) });\n });\n\n const innerLabel = panelItem.labelDisplayFunction\n ? panelItem.labelDisplayFunction(valueDisplay[1])\n : valueDisplay[1];\n\n return {\n ...panelItem,\n data: valuesForBackground,\n innerLabel,\n };\n }\n break;\n }\n\n return panelItem;\n};\n\nconst verifyNumeric = (item: string) => {\n return !isNaN(parseFloat(item));\n};\n\nexport const splitSizeMetric = (val: string) => {\n const splittedText = val.split(\" \");\n // Value is not a size metric, we return as common string\n\n const singleValue = () => {\n let vl = val;\n\n if (verifyNumeric(val)) {\n vl = representationNumber(parseFloat(val));\n }\n return {vl};\n };\n\n if (splittedText.length !== 2) {\n return singleValue();\n }\n\n if (!units.includes(splittedText[1])) {\n return singleValue();\n }\n\n return (\n \n {splittedText[0]}\n {splittedText[1]}\n \n );\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment } from \"react\";\nimport CommonCard from \"../CommonCard\";\n\ninterface IMergedWidgets {\n title: string;\n leftComponent: any;\n rightComponent: any;\n}\n\nconst MergedWidgets = ({\n title,\n leftComponent,\n rightComponent,\n}: IMergedWidgets) => {\n return (\n \n \n \n );\n};\n\nexport default MergedWidgets;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { tooltipCommon } from \"../../../../Common/FormComponents/common/styleLibrary\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...tooltipCommon,\n });\n\nconst BarChartTooltip = ({\n active,\n payload,\n label,\n barChartConfiguration,\n classes,\n}: any) => {\n if (active) {\n return (\n
\n
{label}
\n {payload &&\n payload.map((pl: any, index: number) => {\n return (\n \n \n
\n {pl.value}\n
\n
\n );\n })}\n \n );\n }\n\n return null;\n};\n\nexport default withStyles(styles)(BarChartTooltip);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n Bar,\n BarChart,\n Cell,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from \"recharts\";\nimport { CircularProgress, useMediaQuery } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport ZoomOutMapIcon from \"@mui/icons-material/ZoomOutMap\";\nimport { IBarChartConfiguration } from \"./types\";\nimport { widgetCommon } from \"../../../Common/FormComponents/common/styleLibrary\";\nimport BarChartTooltip from \"./tooltips/BarChartTooltip\";\nimport { setErrorSnackMessage } from \"../../../../../actions\";\nimport { IDashboardPanel } from \"../types\";\nimport { widgetDetailsToPanel } from \"../utils\";\nimport { ErrorResponseHandler } from \"../../../../../common/types\";\nimport api from \"../../../../../common/api\";\nimport { openZoomPage } from \"../../actions\";\nimport { useTheme } from \"@mui/styles\";\n\ninterface IBarChartWidget {\n classes: any;\n title: string;\n panelItem: IDashboardPanel;\n timeStart: any;\n timeEnd: any;\n propLoading: boolean;\n displayErrorMessage: any;\n apiPrefix: string;\n zoomActivated?: boolean;\n openZoomPage: typeof openZoomPage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...widgetCommon,\n loadingAlign: {\n width: \"100%\",\n paddingTop: \"15px\",\n textAlign: \"center\",\n margin: \"auto\",\n },\n });\n\nconst CustomizedAxisTick = ({ y, payload }: any) => {\n return (\n \n {payload.value}\n \n );\n};\n\nconst BarChartWidget = ({\n classes,\n title,\n panelItem,\n timeStart,\n timeEnd,\n propLoading,\n displayErrorMessage,\n apiPrefix,\n zoomActivated = false,\n openZoomPage,\n}: IBarChartWidget) => {\n const [loading, setLoading] = useState(true);\n const [data, setData] = useState([]);\n const [result, setResult] = useState(null);\n\n useEffect(() => {\n if (propLoading) {\n setLoading(true);\n }\n }, [propLoading]);\n\n useEffect(() => {\n if (loading) {\n let stepCalc = 0;\n if (timeStart !== null && timeEnd !== null) {\n const secondsInPeriod = timeEnd.unix() - timeStart.unix();\n const periods = Math.floor(secondsInPeriod / 60);\n\n stepCalc = periods < 1 ? 15 : periods;\n }\n\n api\n .invoke(\n \"GET\",\n `/api/v1/${apiPrefix}/info/widgets/${\n panelItem.id\n }/?step=${stepCalc}&${\n timeStart !== null ? `&start=${timeStart.unix()}` : \"\"\n }${timeStart !== null && timeEnd !== null ? \"&\" : \"\"}${\n timeEnd !== null ? `end=${timeEnd.unix()}` : \"\"\n }`\n )\n .then((res: any) => {\n const widgetsWithValue = widgetDetailsToPanel(res, panelItem);\n setData(widgetsWithValue.data);\n setResult(widgetsWithValue);\n setLoading(false);\n })\n .catch((err: ErrorResponseHandler) => {\n displayErrorMessage(err);\n setLoading(false);\n });\n }\n }, [loading, panelItem, timeEnd, timeStart, displayErrorMessage, apiPrefix]);\n\n const barChartConfiguration = result\n ? (result.widgetConfiguration as IBarChartConfiguration[])\n : [];\n\n let greatestIndex = 0;\n let currentValue = 0;\n\n if (barChartConfiguration.length === 1) {\n const dataGraph = barChartConfiguration[0];\n data.forEach((item: any, index: number) => {\n if (item[dataGraph.dataKey] > currentValue) {\n currentValue = item[dataGraph.dataKey];\n greatestIndex = index;\n }\n });\n }\n\n const theme = useTheme();\n const biggerThanMd = useMediaQuery(theme.breakpoints.up(\"md\"));\n\n return (\n
\n {!zoomActivated && (\n
\n {title}{\" \"}\n {\n openZoomPage(panelItem);\n }}\n className={classes.zoomChartIcon}\n >\n \n \n
\n )}\n {loading && (\n
\n \n
\n )}\n {!loading && (\n \n \n \n \n }\n tickLine={false}\n axisLine={false}\n width={150}\n hide={!biggerThanMd}\n />\n {barChartConfiguration.map((bar) => (\n \n {barChartConfiguration.length === 1 ? (\n \n {data.map((_: any, index: number) => (\n \n ))}\n \n ) : null}\n \n ))}\n \n }\n />\n \n \n
\n )}\n \n );\n};\n\nconst connector = connect(null, {\n displayErrorMessage: setErrorSnackMessage,\n openZoomPage: openZoomPage,\n});\n\nexport default withStyles(styles)(connector(BarChartWidget));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { getTimeFromTimestamp } from \"../../../../../../common/utils\";\nimport { tooltipCommon } from \"../../../../Common/FormComponents/common/styleLibrary\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...tooltipCommon,\n });\n\nconst LineChartTooltip = ({\n active,\n payload,\n label,\n linearConfiguration,\n yAxisFormatter,\n classes,\n}: any) => {\n if (active) {\n return (\n
\n
\n {getTimeFromTimestamp(label, true)}\n
\n {payload &&\n payload.map((pl: any, index: number) => {\n return (\n \n \n
\n \n {linearConfiguration[index].keyLabel}:{\" \"}\n {yAxisFormatter(pl.value)}\n \n
\n
\n );\n })}\n \n );\n }\n\n return null;\n};\n\nexport default withStyles(styles)(LineChartTooltip);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n Area,\n AreaChart,\n CartesianGrid,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from \"recharts\";\nimport { CircularProgress, useMediaQuery } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport ZoomOutMapIcon from \"@mui/icons-material/ZoomOutMap\";\nimport { ILinearGraphConfiguration } from \"./types\";\nimport { widgetCommon } from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { IDashboardPanel } from \"../types\";\nimport { setErrorSnackMessage } from \"../../../../../actions\";\nimport { widgetDetailsToPanel } from \"../utils\";\nimport { ErrorResponseHandler } from \"../../../../../common/types\";\nimport api from \"../../../../../common/api\";\nimport LineChartTooltip from \"./tooltips/LineChartTooltip\";\nimport { openZoomPage } from \"../../actions\";\nimport { useTheme } from \"@mui/styles\";\n\ninterface ILinearGraphWidget {\n classes: any;\n title: string;\n panelItem: IDashboardPanel;\n timeStart: any;\n timeEnd: any;\n propLoading: boolean;\n displayErrorMessage: any;\n apiPrefix: string;\n hideYAxis?: boolean;\n yAxisFormatter?: (item: string) => string;\n xAxisFormatter?: (item: string) => string;\n areaWidget?: boolean;\n zoomActivated?: boolean;\n openZoomPage: typeof openZoomPage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...widgetCommon,\n containerElements: {\n display: \"flex\",\n flexDirection: \"row\",\n height: \"100%\",\n flexGrow: 1,\n },\n verticalAlignment: {\n flexDirection: \"column\",\n },\n chartCont: {\n position: \"relative\",\n height: 140,\n width: \"100%\",\n },\n legendChart: {\n display: \"flex\",\n flexDirection: \"column\",\n flex: \"0 1 auto\",\n maxHeight: 130,\n margin: 0,\n overflowY: \"auto\",\n position: \"relative\",\n textAlign: \"center\",\n width: \"100%\",\n justifyContent: \"flex-start\",\n color: \"#404143\",\n fontWeight: \"bold\",\n fontSize: 12,\n },\n loadingAlign: {\n margin: \"auto\",\n },\n });\n\nconst LinearGraphWidget = ({\n classes,\n title,\n displayErrorMessage,\n timeStart,\n timeEnd,\n propLoading,\n panelItem,\n apiPrefix,\n hideYAxis = false,\n areaWidget = false,\n yAxisFormatter = (item: string) => item,\n xAxisFormatter = (item: string) => item,\n zoomActivated = false,\n openZoomPage,\n}: ILinearGraphWidget) => {\n const [loading, setLoading] = useState(true);\n const [data, setData] = useState([]);\n const [dataMax, setDataMax] = useState(0);\n const [result, setResult] = useState(null);\n\n useEffect(() => {\n if (propLoading) {\n setLoading(true);\n }\n }, [propLoading]);\n\n useEffect(() => {\n if (loading) {\n let stepCalc = 0;\n if (timeStart !== null && timeEnd !== null) {\n const secondsInPeriod = timeEnd.unix() - timeStart.unix();\n const periods = Math.floor(secondsInPeriod / 60);\n\n stepCalc = periods < 1 ? 15 : periods;\n }\n\n api\n .invoke(\n \"GET\",\n `/api/v1/${apiPrefix}/info/widgets/${\n panelItem.id\n }/?step=${stepCalc}&${\n timeStart !== null ? `&start=${timeStart.unix()}` : \"\"\n }${timeStart !== null && timeEnd !== null ? \"&\" : \"\"}${\n timeEnd !== null ? `end=${timeEnd.unix()}` : \"\"\n }`\n )\n .then((res: any) => {\n const widgetsWithValue = widgetDetailsToPanel(res, panelItem);\n setData(widgetsWithValue.data);\n setResult(widgetsWithValue);\n setLoading(false);\n let maxVal = 0;\n for (const dp of widgetsWithValue.data) {\n for (const key in dp) {\n if (key === \"name\") {\n continue;\n }\n let val = parseInt(dp[key]);\n\n if (isNaN(val)) {\n val = 0;\n }\n\n if (maxVal < val) {\n maxVal = val;\n }\n }\n }\n setDataMax(maxVal);\n })\n .catch((err: ErrorResponseHandler) => {\n displayErrorMessage(err);\n setLoading(false);\n });\n }\n }, [loading, panelItem, timeEnd, timeStart, displayErrorMessage, apiPrefix]);\n\n let intervalCount = Math.floor(data.length / 5);\n\n const linearConfiguration = result\n ? (result?.widgetConfiguration as ILinearGraphConfiguration[])\n : [];\n\n const CustomizedDot = (prop: any) => {\n const { cx, cy, index } = prop;\n\n if (index % 3 !== 0) {\n return null;\n }\n return ;\n };\n\n const theme = useTheme();\n const biggerThanMd = useMediaQuery(theme.breakpoints.up(\"md\"));\n\n return (\n
\n {!zoomActivated && (\n
\n {title}{\" \"}\n {\n openZoomPage(panelItem);\n }}\n className={classes.zoomChartIcon}\n >\n \n \n
\n )}\n \n {loading && }\n {!loading && (\n \n \n \n \n {areaWidget && (\n \n \n \n \n \n \n )}\n \n xAxisFormatter(value)}\n interval={intervalCount}\n tick={{\n fontSize: \"70%\",\n fontWeight: \"bold\",\n color: \"#404143\",\n }}\n tickCount={10}\n stroke={\"#082045\"}\n />\n yAxisFormatter(value)}\n tick={{\n fontSize: \"70%\",\n fontWeight: \"bold\",\n color: \"#404143\",\n }}\n stroke={\"#082045\"}\n />\n {linearConfiguration.map((section, index) => {\n return (\n : false}\n />\n );\n })}\n \n }\n wrapperStyle={{\n zIndex: 5000,\n }}\n />\n \n \n
\n {!areaWidget && (\n \n {zoomActivated && (\n \n Series\n
\n
\n
\n )}\n {biggerThanMd && (\n
\n {linearConfiguration.map((section, index) => {\n return (\n \n \n
\n {section.keyLabel}\n
\n
\n );\n })}\n \n )}\n
\n )}\n \n )}\n \n \n );\n};\n\nconst connector = connect(null, {\n displayErrorMessage: setErrorSnackMessage,\n openZoomPage: openZoomPage,\n});\n\nexport default withStyles(styles)(connector(LinearGraphWidget));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { CircularProgress } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Cell, Pie, PieChart, ResponsiveContainer } from \"recharts\";\nimport { IPieChartConfiguration } from \"./types\";\nimport { widgetCommon } from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { setErrorSnackMessage } from \"../../../../../actions\";\nimport { IDashboardPanel } from \"../types\";\nimport { splitSizeMetric, widgetDetailsToPanel } from \"../utils\";\nimport { ErrorResponseHandler } from \"../../../../../common/types\";\nimport get from \"lodash/get\";\nimport api from \"../../../../../common/api\";\n\ninterface IPieChartWidget {\n classes: any;\n title: string;\n panelItem: IDashboardPanel;\n timeStart: any;\n timeEnd: any;\n propLoading: boolean;\n displayErrorMessage: any;\n apiPrefix: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...widgetCommon,\n loadingAlign: {\n width: \"100%\",\n paddingTop: \"15px\",\n textAlign: \"center\",\n margin: \"auto\",\n },\n pieChartLabel: {\n fontSize: 60,\n color: \"#07193E\",\n fontWeight: \"bold\",\n width: \"100%\",\n \"& .unitText\": {\n color: \"#767676\",\n fontSize: 12,\n },\n },\n chartContainer: {\n width: \"100%\",\n height: 140,\n },\n });\n\nconst PieChartWidget = ({\n classes,\n title,\n panelItem,\n timeStart,\n timeEnd,\n propLoading,\n displayErrorMessage,\n apiPrefix,\n}: IPieChartWidget) => {\n const [loading, setLoading] = useState(true);\n const [dataInner, setDataInner] = useState([]);\n const [dataOuter, setDataOuter] = useState([]);\n const [result, setResult] = useState(null);\n\n useEffect(() => {\n if (propLoading) {\n setLoading(true);\n }\n }, [propLoading]);\n\n useEffect(() => {\n if (loading) {\n let stepCalc = 0;\n if (timeStart !== null && timeEnd !== null) {\n const secondsInPeriod = timeEnd.unix() - timeStart.unix();\n const periods = Math.floor(secondsInPeriod / 60);\n\n stepCalc = periods < 1 ? 15 : periods;\n }\n\n api\n .invoke(\n \"GET\",\n `/api/v1/${apiPrefix}/info/widgets/${\n panelItem.id\n }/?step=${stepCalc}&${\n timeStart !== null ? `&start=${timeStart.unix()}` : \"\"\n }${timeStart !== null && timeEnd !== null ? \"&\" : \"\"}${\n timeEnd !== null ? `end=${timeEnd.unix()}` : \"\"\n }`\n )\n .then((res: any) => {\n const widgetsWithValue = widgetDetailsToPanel(res, panelItem);\n setDataInner(widgetsWithValue.data);\n setDataOuter(widgetsWithValue.dataOuter as object[]);\n setResult(widgetsWithValue);\n setLoading(false);\n })\n .catch((err: ErrorResponseHandler) => {\n displayErrorMessage(err);\n setLoading(false);\n });\n }\n }, [loading, panelItem, timeEnd, timeStart, displayErrorMessage, apiPrefix]);\n\n const pieChartConfiguration = result\n ? (result.widgetConfiguration as IPieChartConfiguration)\n : [];\n const middleLabel = result?.innerLabel;\n\n const innerColors = get(pieChartConfiguration, \"innerChart.colorList\", []);\n const outerColors = get(pieChartConfiguration, \"outerChart.colorList\", []);\n\n return (\n
\n
{title}
\n {loading && (\n
\n \n
\n )}\n {!loading && (\n
\n \n {middleLabel && splitSizeMetric(middleLabel)}\n \n
\n \n \n {dataOuter && (\n \n {dataOuter.map((entry, index) => (\n \n ))}\n \n )}\n {dataInner && (\n \n {dataInner.map((entry, index) => {\n return (\n \n );\n })}\n \n )}\n \n \n
\n
\n )}\n
\n );\n};\n\nconst connector = connect(null, {\n displayErrorMessage: setErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(PieChartWidget));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { CircularProgress } from \"@mui/material\";\nimport api from \"../../../../../common/api\";\nimport { widgetDetailsToPanel } from \"../utils\";\nimport { IDashboardPanel } from \"../types\";\nimport { setErrorSnackMessage } from \"../../../../../actions\";\nimport { ErrorResponseHandler } from \"../../../../../common/types\";\n\ninterface ISimpleWidget {\n classes: any;\n iconWidget: any;\n title: string;\n panelItem: IDashboardPanel;\n timeStart: any;\n timeEnd: any;\n propLoading: boolean;\n displayErrorMessage: any;\n apiPrefix: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n mainWidgetContainer: {\n display: \"inline-flex\",\n color: \"#072A4D\",\n alignItems: \"center\",\n },\n icon: {\n color: \"#072A4D\",\n fill: \"#072A4D\",\n marginRight: 5,\n marginLeft: 12,\n },\n widgetLabel: {\n fontWeight: \"bold\",\n textTransform: \"uppercase\",\n marginRight: 10,\n },\n widgetValue: {\n marginRight: 25,\n },\n });\n\nconst SimpleWidget = ({\n classes,\n iconWidget,\n title,\n panelItem,\n timeStart,\n timeEnd,\n propLoading,\n displayErrorMessage,\n apiPrefix,\n}: ISimpleWidget) => {\n const [loading, setLoading] = useState(true);\n const [data, setData] = useState(\"\");\n\n useEffect(() => {\n if (propLoading) {\n setLoading(true);\n }\n }, [propLoading]);\n\n useEffect(() => {\n if (loading) {\n let stepCalc = 0;\n if (timeStart !== null && timeEnd !== null) {\n const secondsInPeriod = timeEnd.unix() - timeStart.unix();\n const periods = Math.floor(secondsInPeriod / 60);\n\n stepCalc = periods < 1 ? 15 : periods;\n }\n\n api\n .invoke(\n \"GET\",\n `/api/v1/${apiPrefix}/info/widgets/${\n panelItem.id\n }/?step=${stepCalc}&${\n timeStart !== null ? `&start=${timeStart.unix()}` : \"\"\n }${timeStart !== null && timeEnd !== null ? \"&\" : \"\"}${\n timeEnd !== null ? `end=${timeEnd.unix()}` : \"\"\n }`\n )\n .then((res: any) => {\n const widgetsWithValue = widgetDetailsToPanel(res, panelItem);\n setData(widgetsWithValue.data);\n setLoading(false);\n })\n .catch((err: ErrorResponseHandler) => {\n displayErrorMessage(err);\n setLoading(false);\n });\n }\n }, [loading, panelItem, timeEnd, timeStart, displayErrorMessage, apiPrefix]);\n\n return (\n \n {loading && (\n
\n \n
\n )}\n {!loading && (\n \n {iconWidget ? iconWidget : null}\n {title}: \n {data}\n \n )}\n
\n );\n};\n\nconst connector = connect(null, {\n displayErrorMessage: setErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(SimpleWidget));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useEffect, useState } from \"react\";\nimport { Area, AreaChart, ResponsiveContainer, YAxis } from \"recharts\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { widgetCommon } from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { IDataSRep } from \"./types\";\nimport { connect } from \"react-redux\";\nimport { setErrorSnackMessage } from \"../../../../../actions\";\nimport { IDashboardPanel } from \"../types\";\nimport { widgetDetailsToPanel } from \"../utils\";\nimport { CircularProgress } from \"@mui/material\";\nimport { ErrorResponseHandler } from \"../../../../../common/types\";\nimport api from \"../../../../../common/api\";\nimport { representationNumber } from \"../../../../../common/utils\";\n\ninterface ISingleRepWidget {\n classes: any;\n title: string;\n panelItem: IDashboardPanel;\n timeStart: any;\n timeEnd: any;\n propLoading: boolean;\n displayErrorMessage: any;\n color: string;\n fillColor: string;\n apiPrefix: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...widgetCommon,\n loadingAlign: {\n width: \"100%\",\n paddingTop: \"5px\",\n textAlign: \"center\",\n margin: \"auto\",\n },\n });\n\nconst SingleRepWidget = ({\n classes,\n title,\n panelItem,\n timeStart,\n timeEnd,\n propLoading,\n displayErrorMessage,\n color,\n fillColor,\n apiPrefix,\n}: ISingleRepWidget) => {\n const [loading, setLoading] = useState(true);\n const [data, setData] = useState([]);\n const [result, setResult] = useState(null);\n\n useEffect(() => {\n if (propLoading) {\n setLoading(true);\n }\n }, [propLoading]);\n\n useEffect(() => {\n if (loading) {\n let stepCalc = 0;\n if (timeStart !== null && timeEnd !== null) {\n const secondsInPeriod = timeEnd.unix() - timeStart.unix();\n const periods = Math.floor(secondsInPeriod / 60);\n\n stepCalc = periods < 1 ? 15 : periods;\n }\n\n api\n .invoke(\n \"GET\",\n `/api/v1/${apiPrefix}/info/widgets/${\n panelItem.id\n }/?step=${stepCalc}&${\n timeStart !== null ? `&start=${timeStart.unix()}` : \"\"\n }${timeStart !== null && timeEnd !== null ? \"&\" : \"\"}${\n timeEnd !== null ? `end=${timeEnd.unix()}` : \"\"\n }`\n )\n .then((res: any) => {\n const widgetsWithValue = widgetDetailsToPanel(res, panelItem);\n setResult(widgetsWithValue);\n setData(widgetsWithValue.data);\n setLoading(false);\n })\n .catch((err: ErrorResponseHandler) => {\n displayErrorMessage(err);\n setLoading(false);\n });\n }\n }, [loading, panelItem, timeEnd, timeStart, displayErrorMessage, apiPrefix]);\n const gradientID = `colorGradient-${title.split(\" \").join(\"-\")}`;\n\n let repNumber = \"\";\n\n if (result) {\n const resultRep = parseInt(result.innerLabel || \"0\");\n\n if (!isNaN(resultRep)) {\n repNumber = representationNumber(resultRep);\n } else {\n repNumber = \"0\";\n }\n }\n\n return (\n
\n
{title}
\n {loading && (\n
\n \n
\n )}\n {!loading && (\n
\n \n \n \n \n \n \n \n \n dataMax * 2]}\n hide={true}\n />\n \n \n {result ? repNumber : \"\"}\n \n \n \n
\n )}\n
\n );\n};\n\nconst connector = connect(null, {\n displayErrorMessage: setErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(SingleRepWidget));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { widgetCommon } from \"../../../Common/FormComponents/common/styleLibrary\";\nimport api from \"../../../../../common/api\";\nimport { splitSizeMetric, widgetDetailsToPanel } from \"../utils\";\nimport { IDashboardPanel } from \"../types\";\nimport { connect } from \"react-redux\";\nimport { setErrorSnackMessage } from \"../../../../../actions\";\nimport { CircularProgress } from \"@mui/material\";\nimport { ErrorResponseHandler } from \"../../../../../common/types\";\n\ninterface ISingleValueWidget {\n title: string;\n panelItem: IDashboardPanel;\n timeStart: any;\n timeEnd: any;\n propLoading: boolean;\n displayErrorMessage: any;\n classes: any;\n apiPrefix: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...widgetCommon,\n loadingAlign: {\n width: \"100%\",\n textAlign: \"center\",\n margin: \"auto\",\n },\n metric: {\n fontSize: 60,\n lineHeight: 1,\n color: \"#07193E\",\n fontWeight: 700,\n },\n titleElement: {\n fontSize: 10,\n color: \"#767676\",\n fontWeight: 700,\n },\n containerAlignment: {\n display: \"flex\",\n height: 140,\n flexDirection: \"column\",\n justifyContent: \"center\",\n \"& .unitText\": {\n color: \"#767676\",\n fontSize: 12,\n },\n },\n });\n\nconst SingleValueWidget = ({\n title,\n panelItem,\n timeStart,\n timeEnd,\n propLoading,\n displayErrorMessage,\n classes,\n apiPrefix,\n}: ISingleValueWidget) => {\n const [loading, setLoading] = useState(true);\n const [data, setData] = useState(\"\");\n\n useEffect(() => {\n if (propLoading) {\n setLoading(true);\n }\n }, [propLoading]);\n\n useEffect(() => {\n if (loading) {\n let stepCalc = 0;\n if (timeStart !== null && timeEnd !== null) {\n const secondsInPeriod = timeEnd.unix() - timeStart.unix();\n const periods = Math.floor(secondsInPeriod / 60);\n\n stepCalc = periods < 1 ? 15 : periods;\n }\n\n api\n .invoke(\n \"GET\",\n `/api/v1/${apiPrefix}/info/widgets/${\n panelItem.id\n }/?step=${stepCalc}&${\n timeStart !== null ? `&start=${timeStart.unix()}` : \"\"\n }${timeStart !== null && timeEnd !== null ? \"&\" : \"\"}${\n timeEnd !== null ? `end=${timeEnd.unix()}` : \"\"\n }`\n )\n .then((res: any) => {\n const widgetsWithValue = widgetDetailsToPanel(res, panelItem);\n setData(widgetsWithValue.data);\n setLoading(false);\n })\n .catch((err: ErrorResponseHandler) => {\n displayErrorMessage(err);\n setLoading(false);\n });\n }\n }, [loading, panelItem, timeEnd, timeStart, displayErrorMessage, apiPrefix]);\n return (\n
\n {loading && (\n
\n \n
\n )}\n {!loading && (\n \n
{splitSizeMetric(data)}
\n
{title}
\n
\n )}\n
\n );\n};\n\nconst connector = connect(null, {\n displayErrorMessage: setErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(SingleValueWidget));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { IDashboardPanel, widgetType } from \"./types\";\nimport BarChartWidget from \"./Widgets/BarChartWidget\";\nimport LinearGraphWidget from \"./Widgets/LinearGraphWidget\";\nimport PieChartWidget from \"./Widgets/PieChartWidget\";\nimport SimpleWidget from \"./Widgets/SimpleWidget\";\nimport SingleRepWidget from \"./Widgets/SingleRepWidget\";\nimport SingleValueWidget from \"./Widgets/SingleValueWidget\";\n\nexport const componentToUse = (\n value: IDashboardPanel,\n timeStart: any,\n timeEnd: any,\n loading: boolean,\n apiPrefix: string,\n zoomActivated: boolean = false\n) => {\n switch (value.type) {\n case widgetType.singleValue:\n return (\n \n );\n case widgetType.simpleWidget:\n return (\n \n );\n case widgetType.pieChart:\n return (\n \n );\n case widgetType.linearGraph:\n case widgetType.areaGraph:\n return (\n \n );\n case widgetType.barChart:\n return (\n \n );\n case widgetType.singleRep:\n const fillColor = value.fillColor ? value.fillColor : value.color;\n return (\n \n );\n default:\n return null;\n }\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment } from \"react\";\nimport { connect } from \"react-redux\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport { IDashboardPanel } from \"./types\";\nimport { componentToUse } from \"./widgetUtils\";\nimport { closeZoomPage } from \"../actions\";\n\ninterface IZoomWidget {\n widgetRender: number;\n value: IDashboardPanel | null;\n modalOpen: boolean;\n timeStart: any;\n timeEnd: any;\n apiPrefix: string;\n onCloseAction: typeof closeZoomPage;\n}\nconst ZoomWidget = ({\n value,\n modalOpen,\n timeStart,\n timeEnd,\n apiPrefix,\n onCloseAction,\n}: IZoomWidget) => {\n if (!value) {\n return null;\n }\n\n return (\n {\n onCloseAction();\n }}\n modalOpen={modalOpen}\n wideLimit={false}\n noContentPadding\n >\n \n {componentToUse(value, timeStart, timeEnd, true, apiPrefix, true)}\n \n \n );\n};\n\nconst connector = connect(null, {\n onCloseAction: closeZoomPage,\n});\n\nexport default connector(ZoomWidget);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@mui/material/Grid\";\n\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { GridSize, useMediaQuery } from \"@mui/material\";\nimport {\n actionsTray,\n widgetContainerCommon,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport { IDashboardPanel } from \"./types\";\nimport { getWidgetsWithValue, panelsConfiguration } from \"./utils\";\nimport { TabPanel } from \"../../../shared/tabs\";\nimport { ErrorResponseHandler } from \"../../../../common/types\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport api from \"../../../../common/api\";\n\nimport TabSelector from \"../../Common/TabSelector/TabSelector\";\nimport MergedWidgets from \"./MergedWidgets\";\nimport { componentToUse } from \"./widgetUtils\";\nimport ZoomWidget from \"./ZoomWidget\";\nimport { AppState } from \"../../../../store\";\nimport DateRangeSelector from \"../../Common/FormComponents/DateRangeSelector/DateRangeSelector\";\nimport { useTheme } from \"@mui/styles\";\n\ninterface IPrDashboard {\n classes: any;\n displayErrorMessage: typeof setErrorSnackMessage;\n apiPrefix?: string;\n zoomOpen: boolean;\n zoomWidget: null | IDashboardPanel;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...actionsTray,\n ...widgetContainerCommon,\n dashboardRow: {\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"flex-start\",\n flexWrap: \"wrap\",\n maxWidth: 1180,\n },\n });\n\nconst PrDashboard = ({\n classes,\n displayErrorMessage,\n apiPrefix = \"admin\",\n zoomOpen,\n zoomWidget,\n}: IPrDashboard) => {\n const [timeStart, setTimeStart] = useState(null);\n const [timeEnd, setTimeEnd] = useState(null);\n const [loading, setLoading] = useState(true);\n const [panelInformation, setPanelInformation] =\n useState(panelsConfiguration);\n const [curTab, setCurTab] = useState(0);\n\n const theme = useTheme();\n const biggerThanMd = useMediaQuery(theme.breakpoints.up(\"md\"));\n\n const panels = useCallback(\n (tabName: string, filterPanels?: number[][] | null) => {\n return filterPanels?.map((panelLine, indexLine) => {\n const totalPanelsContained = panelLine.length;\n\n let perc = Math.floor(12 / totalPanelsContained);\n\n if (!biggerThanMd && totalPanelsContained >= 4) {\n perc = 6;\n } else if (!biggerThanMd && totalPanelsContained >= 3) {\n perc = 12;\n }\n\n if (perc < 1) {\n perc = 1;\n } else if (perc > 12) {\n perc = 12;\n }\n\n return (\n \n {panelLine.map((panelInline, indexPanel) => {\n const panelInfo = panelInformation.find(\n (panel) => panel.id === panelInline\n );\n\n return (\n \n \n {panelInfo ? (\n \n {panelInfo.mergedPanels ? (\n \n \n \n ) : (\n componentToUse(\n panelInfo,\n timeStart,\n timeEnd,\n loading,\n apiPrefix\n )\n )}\n \n ) : null}\n \n \n );\n })}\n \n );\n });\n },\n [\n timeStart,\n timeEnd,\n loading,\n apiPrefix,\n classes.dashboardRow,\n classes.widgetPanelDelimiter,\n panelInformation,\n biggerThanMd,\n ]\n );\n\n const fetchUsage = useCallback(() => {\n let stepCalc = 0;\n\n if (timeStart !== null && timeEnd !== null) {\n const secondsInPeriod = timeEnd.unix() - timeStart.unix();\n const periods = Math.floor(secondsInPeriod / 60);\n\n stepCalc = periods < 1 ? 15 : periods;\n }\n\n api\n .invoke(\n \"GET\",\n `/api/v1/${apiPrefix}/info?step=${stepCalc}&${\n timeStart !== null ? `&start=${timeStart.unix()}` : \"\"\n }${timeStart !== null && timeEnd !== null ? \"&\" : \"\"}${\n timeEnd !== null ? `end=${timeEnd.unix()}` : \"\"\n }`\n )\n .then((res: any) => {\n if (res.widgets) {\n const widgetsWithValue = getWidgetsWithValue(res.widgets);\n setPanelInformation(widgetsWithValue);\n } else {\n displayErrorMessage({\n errorMessage:\n \"Widget information could not be retrieved at this time. Please try again\",\n detailedError: \"\",\n });\n }\n\n setLoading(false);\n })\n .catch((err: ErrorResponseHandler) => {\n displayErrorMessage(err);\n setLoading(false);\n });\n }, [timeStart, timeEnd, displayErrorMessage, apiPrefix]);\n\n const triggerLoad = () => {\n setLoading(true);\n };\n\n useEffect(() => {\n if (loading) {\n fetchUsage();\n }\n }, [loading, fetchUsage]);\n\n const summaryPanels = [\n [66, 44, 500, 501],\n [80, 81, 1],\n [68, 52],\n [63, 70],\n ];\n\n if (biggerThanMd) {\n summaryPanels.splice(1, 0, [50, 502]);\n } else {\n summaryPanels.splice(1, 0, [50]);\n summaryPanels.splice(1, 0, [502]);\n }\n\n const resourcesPanels = [\n [76, 77],\n [11, 8],\n [82, 74],\n ];\n const requestsPanels = [[60], [71, 17], [73]];\n\n return (\n \n {zoomOpen && (\n \n )}\n \n \n {\n setCurTab(newValue);\n }}\n tabOptions={[\n { label: \"Usage\" },\n { label: \"Traffic\" },\n { label: \"Resources\" },\n ]}\n />\n \n \n \n {panels(\"Summary\", summaryPanels)}\n \n \n {panels(\"Traffic\", requestsPanels)}\n \n \n {panels(\"Resources\", resourcesPanels)}\n \n \n \n );\n};\n\nconst mapState = (state: AppState) => ({\n zoomOpen: state.dashboard.zoom.openZoom,\n zoomWidget: state.dashboard.zoom.widgetRender,\n});\n\nconst connector = connect(mapState, {\n displayErrorMessage: setErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(PrDashboard));\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment } from \"react\";\n\ninterface TabPanelProps {\n children?: React.ReactNode;\n index: any;\n value: any;\n}\n\nexport const TabPanel = (props: TabPanelProps) => {\n const { children, value, index, ...other } = props;\n\n return (\n