This commit is contained in:
Zack Meier
2026-04-15 15:45:50 -05:00
commit 1d304511b8
613 changed files with 140998 additions and 0 deletions
@@ -0,0 +1,21 @@
$Navigation = @(
New-UDListItem -Label 'Home' -OnClick {
Invoke-UDRedirect -Url '/Home'
}
New-UDListItem -Label 'ServerBuildRequestV1' -OnClick {
Invoke-UDRedirect -Url '/ServerBuildRequestV1'
}
New-UDListItem -Label 'ApplicationServerV2' -OnClick {
Invoke-UDRedirect -Url '/ApplicationServerV2'
}
New-UDListItem -Label 'SpCmdbCompare' -OnClick {
Invoke-UDRedirect -Url '/SpCmdbCompare'
}
)
New-UDApp -Title 'PowerShell Universal' -Pages @(
Get-UDPage -Name 'Home'
Get-UDPage -Name 'ApplicationServerV2'
Get-UDPage -Name 'ServerBuildRequestV1'
Get-UDPage -Name 'SpCmdbCompare'
) -Navigation $Navigation
@@ -0,0 +1,25 @@
New-UDPage -Url "/ApplicationServerV2" -Name "ApplicationServerV2" -Content {
New-UDTypography -Text 'Application Server request items (RITMs) submitted between 2023/02/27 and 2024/06/25 in which the field "VM Work Needed" is set to "Yes"'
$ServerInstance = "itdintsql22p1.nd.gov\INTSQL22P1"
$Database = "ITD-Systems-Automation"
$Table = 'ServiceNow_RitmDump_ApplicationServerV2'
$SqlQuery = "SELECT [number],[sys_id],[opened_at],[requested_for],[short_description],[request_type],[application_name],[environment],[additional_comments],[vm_work_needed],[server_name],[host_name],[server_type],[operating_system],[target_platform],[processors],[memory_gb],[cidr_block],[data_center],[licensing_restrictions],[agency_name],[application_info],[support_hours],[dr_protection],[startup_priority],[disk_1_os],[disk_2_swap_disk],[disk_3],[disk_4],[disk_5],[disk_6],[disk_7],[disk_8],[disk_9],[disk_10],[disk_11],[disk_12],[disk_13],[disk_14],[disk_15],[disk_16] FROM [$Database].[dbo].[$Table] WHERE vm_work_needed = '1'"
$SqlRecords = Invoke-Sqlcmd -ServerInstance $ServerInstance -Database $Database -Query $SqlQuery -Credential $Secret:sql_itdpsu1 -Verbose
New-UDTable -Columns @(
New-UDTableColumn -Property 'number' -Title 'number' -ShowSort
New-UDTableColumn -Property 'opened_at' -Title 'opened_at'
New-UDTableColumn -Property 'server_name' -Title 'server_name' -ShowFilter
New-UDTableColumn -Property 'host_name' -Title 'host_name' -ShowFilter
New-UDTableColumn -Property 'requested_for' -Title 'requested_for' -ShowFilter
New-UDTableColumn -Property 'request_type' -Title 'request_type' -ShowFilter
New-UDTableColumn -Property 'environment' -Title 'environment' -ShowFilter
New-UDTableColumn -Property 'additional_comments' -Title 'additional_comments' -ShowFilter
) -Data ($SqlRecords | Select *,@{n='Open';e={$_.sys_id}} | Sort-Object -Descending number) -Dense -ShowPagination -PageSize 20
} -Icon @{
type = 'icon'
id = 'e91ed4ef-cecd-448a-9204-2b453db9db03'
}
@@ -0,0 +1,42 @@
New-UDPage -Url "/ServerBuildRequestV1" -Name "ServerBuildRequestV1" -Content {
New-UDTypography -Text "`nServer Build Request request items (RITMs) submitted after 2024/06/25"
$ServerInstance = "itdintsql22p1.nd.gov\INTSQL22P1"
$Database = "ITD-Systems-Automation"
$Table = 'ServiceNow_RitmDump_ServerBuildRequestV1'
New-ITDServiceNowSession -Environment Production -Credential $Secret:snow_vmcred
$SqlQuery = "SELECT [RitmNum],
[RitmSysId],
[opened_at],
[requested_for],
[request_type],
[environment]
,[host_name_ref]
,[host_name]
FROM [ITD-Systems-Automation].[dbo].[ServiceNow_RitmDump_ServerBuildRequestV1]"
$SqlRecords = Invoke-Sqlcmd -ServerInstance $ServerInstance -Database $Database -Query $SqlQuery -Credential $Secret:sql_itdpsu1 -Verbose
New-UDTable -Dense -ShowPagination -PageSize 20 -Size small -Data ($SqlRecords | Sort-Object -Descending opened_at) -Columns @(
New-UDTableColumn -Property 'RitmUrl' -Title 'RitmUrl' -Render {
New-UDLink -Url ("https://northdakota.service-now.com/nav_to.do?uri=sc_req_item.do?sys_id=" + $EventData.RitmSysId) -Id "lnkRitm" -Content {
New-UDImage -Url "https://psuniversal.nd.gov/PSUniversal_Extras/servicenow_logo_icon_168835.png" -Height 20 -Width 20
}
}
New-UDTableColumn -Property 'RitmNum' -Title 'RitmNum' -ShowFilter
New-UDTableColumn -Property 'opened_at' -Title 'opened_at' -ShowFilter
New-UDTableColumn -Property 'host_name' -Title 'host_name' -ShowFilter
New-UDTableColumn -Property 'requested_for' -Title 'requested_for' -ShowFilter
New-UDTableColumn -Property 'request_type' -Title 'request_type' -ShowFilter
New-UDTableColumn -Property 'environment' -Title 'environment' -ShowFilter
#New-UDTableColumn -Property 'additional_comments' -Title 'additional_comments' -ShowFilter
)
} -Icon @{
id = '7d67b921-68aa-4085-84e8-025e92671771'
type = 'icon'
}
@@ -0,0 +1,3 @@
New-UDPage -Name 'Home' -Content {
New-UDTypography -Text 'Home' -Id 'homeText'
} -Generated