update
This commit is contained in:
+29
@@ -0,0 +1,29 @@
|
||||
New-UDApp -Title 'SyncVMwareVMtoSharePoint' -Pages @(
|
||||
New-UDPage -Name "Home" -Content {
|
||||
New-UDForm -Content {
|
||||
New-UDTypography -Text 'Enter a VMware VM name below and click the Submit button'
|
||||
New-UDRow -Columns {
|
||||
New-UDColumn -SmallSize 6 -LargeSize 6 -Content {
|
||||
New-UDTextbox -Id 'VMName'
|
||||
}
|
||||
}
|
||||
} -OnValidate {
|
||||
$FormContent = $EventData
|
||||
|
||||
if ($FormContent.VMName -eq $null -or $FormContent.VMName -eq '') {
|
||||
New-UDFormValidationResult -ValidationError "VMName is required"
|
||||
} else {
|
||||
New-UDFormValidationResult -Valid
|
||||
}
|
||||
} -OnSubmit {
|
||||
Show-UDToast -Message ($EventData.VMName + " sync in progress.") -Duration 5000
|
||||
|
||||
Invoke-PSUScript -Script 'Sync-ITDVMwareVMMetadataToSharePoint_script.ps1' -VMName $EventData.VMName -Wait | Out-Null
|
||||
|
||||
Show-UDToast -Message ($EventData.VMName + " sync finished.") -Duration 10000
|
||||
} -OnProcessing {
|
||||
New-UDTypography -Text ("Syncing " + $EventData.VMName + " ...")
|
||||
New-UDProgress
|
||||
}
|
||||
}
|
||||
)
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
New-UDPage -Name 'Home' -Content {
|
||||
New-UDTypography -Text 'Home' -Id 'homeText'
|
||||
} -Generated
|
||||
Reference in New Issue
Block a user