A Dashboard to help my help desk gather and triage

#1

I wrote this for our front line folks to be able to quickly lookup account info (AD), generate support session links (Bomgar API), send critical alerts (KACE API, PRTG API and GroupMe API), and more.

I can’t share the whole code but anyone wondering how something was done, let me know, and i can sanitize snippets.

The KACE API Module, I also wrote, and is open-source, available on the PSGallery

It’s AzureAD authenticated single-sign-on, and is running in IIS.

I can only post a single image (new user), so here’s a simple AD query:

6 Likes

How to make a card a link?
#2

Easy question: how did you change the title at the top from ‘PowerShell Universal Dashboard’ and lose the footer?

0 Likes

#3

Thee footer removal is an enterprise license feature, i don’t believe it’s doable with the community edition. You specify in New-UDDashboard:

-Footer (New-UDFooter -Links (New-UDLink -Text ''Footer Text" -Url 'https://www.google.com'))

To change it from ‘Created with UniversalDashboard’.

I’m not sure what top part you are referring to, do you have an example?

1 Like

#4

Thanks for the quick reply. I was able to figure out the title part at the top by revisiting the New-UDDashboard parameters. I had previously tried to add a -Title to my dashboard and all of the sudden the login page would stop loading and go right to the dashboard. I tried again just now and it’s working, so it must have been a typo in my script.

I do have Enterprise and I was able to change the text thanks to your tip.

1 Like

#5

@artvandelay440 How did you get that to pop up on your page?

0 Likes

#6

New-UDButton -Text “Button 1…” -OnClick {
Show-UDModal -Header {
New-UDHeading -Size 4 -Text “Hey azurefanboy”
} -Content {
New-UDCard -Title “Card in a box!” -Content {
}
}

0 Likes

#7

What version of UD are you using? @PorreKaj

0 Likes

#8

The feature was introduced in 2.0 if I remember correctly.

The code above was from 2.1

0 Likes

#9

@PorreKaj I am using 2.2 and button does nothing.

I even used the snippet from the Get-Help example:

New-UDButton -Text "Create Member"  -OnClick {
                Show-UDModal -Header {
                    New-UDHeading -Size 4 -Text "Modal"
                } -Context {
                    "This is a modal"
                }
            }
0 Likes

#10

How are you running your dashboard? Do buttons usually work?

0 Likes

#11

@PorreKaj Yes. I just replaced the action of another button I already had in place.

0 Likes

#12

If you bring up developer tools in your browser. Does it log anything when you hit the button?

0 Likes

#13

image @PorreKaj

0 Likes

#14

Maybe you ought to make a topic on the help section. It’s a bit out of my league.

Better chance of Adam seeing it there :slight_smile:

1 Like

#15

The missing fonts dont effect your modal , if you can share a sample of you dashboard code, we can take a look.

0 Likes

#16

I tried to keep is simple to make sure this was working, but no luck.

New-UDPage -Name “Test” -Icon male -Content {

New-UDButton -Text “Test” -OnClick {
Show-UDModal -Header {
New-UDHeading -Size 4 -Text “Modal”
} -Context {
“This is a modal”
}

}

}

0 Likes

#17

@azurefanboy

you used -Context. the parameter is -Content.

0 Likes

#18

I like how your cards look (image sizing, links). Could you share a snip?

0 Likes

#19

Sure, here’s the top left with the 4 links

$CardSplat = @{
                BackgroundColor = "#eeeeee"
                Image           = (New-UDImage -Url (Get-ImageBase64Uri -Path '.\assets\image01.svg'))
            }
            New-UDCard @CardSplat -Endpoint {
                New-UDButton -Flat -Text "Website 1" -IconAlignment left -Icon dot_circle_o -OnClick {
                    Invoke-UDRedirect -Url 'https://website01'
                }
                New-UDButton -Flat -Text "Website 2" -IconAlignment left -Icon dot_circle_o -OnClick {
                    Invoke-UDRedirect -Url 'https://website02'
                }
                New-UDButton -Flat -Text "Website 3" -IconAlignment left -Icon dot_circle_o -OnClick {
                    Invoke-UDRedirect -Url 'https://website03'
                }
                New-UDButton -Flat -Text "Website 4" -IconAlignment left -Icon dot_circle_o -OnClick {
                    Invoke-UDRedirect -Url 'https://website04'
                }
                
            }

For that exact code, you’ll need a helper function that converts the .svg image to base64 (Get-ImageBase64Uri)

Function Get-ImageBase64Uri {
    param(
        [Parameter(Mandatory=$True)]
        [string]
        $Path
    )
    "data:image/svg+xml;base64," + [convert]::ToBase64String((get-content $Path -encoding byte))
}
1 Like

#20

Thank you. My dashboard is looking better now :slight_smile:

0 Likes