@@ -69,6 +69,7 @@ import { Form } from 'react-final-form'
69
69
import useConfirmModal from 'src/hooks/useConfirmModal'
70
70
import { setCurrentTenant } from 'src/store/features/app'
71
71
import {
72
+ CippOffcanvas ,
72
73
CippCodeBlock ,
73
74
ModalService ,
74
75
StatusIcon ,
@@ -821,7 +822,7 @@ const ExcludedTenantsSettings = () => {
821
822
}
822
823
const SecuritySettings = ( ) => {
823
824
const [ listBackend , listBackendResult ] = useLazyGenericGetRequestQuery ( )
824
-
825
+ const [ visible , setVisible ] = useState ( false )
825
826
return (
826
827
< div >
827
828
{ listBackendResult . isUninitialized && listBackend ( { path : 'api/ExecBackendURLs' } ) }
@@ -833,16 +834,16 @@ const SecuritySettings = () => {
833
834
< CCardTitle > Resource Group</ CCardTitle >
834
835
</ CCardHeader >
835
836
< CCardBody >
836
- < CRow className = "mb-3" >
837
+ < p >
837
838
The Resource group contains all the CIPP resources in your tenant, except the SAM
838
839
Application
839
- </ CRow >
840
+ </ p >
840
841
< a
841
842
target = { '_blank' }
842
843
href = { listBackendResult . data ?. Results ?. ResourceGroup }
843
844
rel = "noreferrer"
844
845
>
845
- < CButton > Go to Resource Group</ CButton >
846
+ < CButton className = "mb-3" > Go to Resource Group</ CButton >
846
847
</ a >
847
848
</ CCardBody >
848
849
</ CCard >
@@ -853,16 +854,16 @@ const SecuritySettings = () => {
853
854
< CCardTitle > Key Vault</ CCardTitle >
854
855
</ CCardHeader >
855
856
< CCardBody >
856
- < CRow className = "mb-3" >
857
+ < p >
857
858
The keyvault allows you to check token information. By default you do not have
858
859
access.
859
- </ CRow >
860
+ </ p >
860
861
< a
861
862
target = { '_blank' }
862
863
href = { listBackendResult . data ?. Results ?. KeyVault }
863
864
rel = "noreferrer"
864
865
>
865
- < CButton > Go to Keyvault</ CButton >
866
+ < CButton className = "mb-3" > Go to Keyvault</ CButton >
866
867
</ a >
867
868
</ CCardBody >
868
869
</ CCard >
@@ -873,16 +874,16 @@ const SecuritySettings = () => {
873
874
< CCardTitle > Static Web App (Role Management)</ CCardTitle >
874
875
</ CCardHeader >
875
876
< CCardBody >
876
- < CRow className = "mb-3" >
877
+ < p >
877
878
The Static Web App role management allows you to invite other users to the
878
879
application.
879
- </ CRow >
880
+ </ p >
880
881
< a
881
882
target = { '_blank' }
882
883
href = { listBackendResult . data ?. Results ?. SWARoles }
883
884
rel = "noreferrer"
884
885
>
885
- < CButton > Go to Role Management</ CButton >
886
+ < CButton className = "mb-3" > Go to Role Management</ CButton >
886
887
</ a >
887
888
</ CCardBody >
888
889
</ CCard >
@@ -895,15 +896,13 @@ const SecuritySettings = () => {
895
896
< CCardTitle > Function App (Deployment Center)</ CCardTitle >
896
897
</ CCardHeader >
897
898
< CCardBody >
898
- < CRow className = "mb-3" >
899
- The Function App Deployment Center allows you to run updates on the API
900
- </ CRow >
899
+ < p > The Function App Deployment Center allows you to run updates on the API</ p >
901
900
< a
902
901
target = { '_blank' }
903
902
href = { listBackendResult . data ?. Results ?. FunctionDeployment }
904
903
rel = "noreferrer"
905
904
>
906
- < CButton > Go to Function App Deployment Center</ CButton >
905
+ < CButton className = "mb-3" > Go to Function App Deployment Center</ CButton >
907
906
</ a >
908
907
</ CCardBody >
909
908
</ CCard >
@@ -914,17 +913,17 @@ const SecuritySettings = () => {
914
913
< CCardTitle > Function App (Configuration)</ CCardTitle >
915
914
</ CCardHeader >
916
915
< CCardBody >
917
- < CRow className = "mb-3" >
916
+ < p >
918
917
At the Function App Configuration you can check the status of the API access to
919
918
your keyvault
920
- < a
921
- target = { '_blank' }
922
- href = { listBackendResult . data ?. Results ?. FunctionConfig }
923
- rel = "noreferrer"
924
- >
925
- < CButton > Go to Function App Configuration </ CButton >
926
- </ a >
927
- </ CRow >
919
+ </ p >
920
+ < a
921
+ target = { '_blank' }
922
+ href = { listBackendResult . data ?. Results ?. FunctionConfig }
923
+ rel = "noreferrer"
924
+ >
925
+ < CButton className = "mb-3" > Go to Function App Configuration </ CButton >
926
+ </ a >
928
927
</ CCardBody >
929
928
</ CCard >
930
929
</ CCol >
@@ -934,20 +933,118 @@ const SecuritySettings = () => {
934
933
< CCardTitle > Function App (Overview)</ CCardTitle >
935
934
</ CCardHeader >
936
935
< CCardBody >
937
- < CRow className = "mb-3" >
938
- At the function App Overview, you can stop and start the backend API
939
- </ CRow >
936
+ < p > At the function App Overview, you can stop and start the backend API</ p >
940
937
< a
941
938
target = { '_blank' }
942
939
href = { listBackendResult . data ?. Results ?. FunctionApp }
943
940
rel = "noreferrer"
944
941
>
945
- < CButton > Go to Function App Overview</ CButton >
942
+ < CButton className = "mb-3" > Go to Function App Overview</ CButton >
946
943
</ a >
947
944
</ CCardBody >
948
945
</ CCard >
949
946
</ CCol >
950
947
</ CRow >
948
+ < CRow className = "mb-3" >
949
+ < CCol md = { 4 } >
950
+ < CCard className = "h-100" >
951
+ < CCardHeader >
952
+ < CCardTitle > Cloud Shell</ CCardTitle >
953
+ </ CCardHeader >
954
+ < CCardBody >
955
+ < p > Launch an Azure Cloud Shell Window</ p >
956
+ < CLink
957
+ onClick = { ( ) =>
958
+ window . open (
959
+ 'https://shell.azure.com/powershell' ,
960
+ '_blank' ,
961
+ 'toolbar=no,scrollbars=yes,resizable=yes,menubar=no,location=no,status=no' ,
962
+ )
963
+ }
964
+ rel = "noreferrer"
965
+ >
966
+ < CButton className = "mb-3 me-3" > Cloud Shell</ CButton >
967
+ </ CLink >
968
+ < CButton onClick = { ( ) => setVisible ( true ) } className = "mb-3" >
969
+ Command Reference
970
+ </ CButton >
971
+ </ CCardBody >
972
+ </ CCard >
973
+ </ CCol >
974
+ </ CRow >
975
+ < CippOffcanvas
976
+ id = "command-offcanvas"
977
+ visible = { visible }
978
+ placement = "end"
979
+ className = "cipp-offcanvas"
980
+ hideFunction = { ( ) => setVisible ( false ) }
981
+ title = "Command Reference"
982
+ >
983
+ < h5 className = "my-3" > Function App Config</ h5 >
984
+ < CippCodeBlock
985
+ language = "powershell"
986
+ code = {
987
+ '$Function = Get-AzFunctionApp -ResourceGroupName ' +
988
+ listBackendResult . data ?. Results ?. RGName +
989
+ ' -Name ' +
990
+ listBackendResult . data ?. Results ?. FunctionName +
991
+ '; $Function | select Name, Status, Location, Runtime, ApplicationSettings'
992
+ }
993
+ showLineNumbers = { false }
994
+ wrapLongLines = { true }
995
+ />
996
+ < h5 className = "my-3" > Function App Deployment</ h5 >
997
+ < CippCodeBlock
998
+ language = "powershell"
999
+ code = {
1000
+ '$FunctionDeployment = az webapp deployment source show --resource-group ' +
1001
+ listBackendResult . data ?. Results ?. RGName +
1002
+ ' --name ' +
1003
+ listBackendResult . data ?. Results ?. FunctionName +
1004
+ ' | ConvertFrom-Json; $FunctionDeployment | Select-Object repoUrl, branch, isGitHubAction, isManualIntegration, githubActionConfiguration'
1005
+ }
1006
+ showLineNumbers = { false }
1007
+ wrapLongLines = { true }
1008
+ />
1009
+ < h5 className = "my-3" > Watch Function Logs</ h5 >
1010
+ < CippCodeBlock
1011
+ language = "powershell"
1012
+ code = {
1013
+ 'az webapp log tail --resource-group ' +
1014
+ listBackendResult . data ?. Results ?. RGName +
1015
+ ' --name ' +
1016
+ listBackendResult . data ?. Results ?. FunctionName
1017
+ }
1018
+ showLineNumbers = { false }
1019
+ wrapLongLines = { true }
1020
+ />
1021
+ < h5 className = "my-3" > Static Web App Config</ h5 >
1022
+ < CippCodeBlock
1023
+ language = "powershell"
1024
+ code = {
1025
+ '$StaticWebApp = Get-AzStaticWebApp -ResourceGroupName ' +
1026
+ listBackendResult . data ?. Results ?. RGName +
1027
+ ' -Name ' +
1028
+ listBackendResult . data ?. Results ?. SWAName +
1029
+ '; $StaticWebApp | Select-Object Name, CustomDomain, DefaultHostname, RepositoryUrl'
1030
+ }
1031
+ showLineNumbers = { false }
1032
+ wrapLongLines = { true }
1033
+ />
1034
+ < h5 className = "my-3" > List CIPP Users</ h5 >
1035
+ < CippCodeBlock
1036
+ language = "powershell"
1037
+ code = {
1038
+ 'Get-AzStaticWebAppUser -ResourceGroupName ' +
1039
+ listBackendResult . data ?. Results ?. RGName +
1040
+ ' -Name ' +
1041
+ listBackendResult . data ?. Results ?. SWAName +
1042
+ ' -AuthProvider all | Select-Object DisplayName, Role'
1043
+ }
1044
+ showLineNumbers = { false }
1045
+ wrapLongLines = { true }
1046
+ />
1047
+ </ CippOffcanvas >
951
1048
</ >
952
1049
</ div >
953
1050
)
0 commit comments