Skip to content
This repository has been archived by the owner on Jan 4, 2025. It is now read-only.

Commit

Permalink
Merge pull request #894 from ironmansoftware/moar-help
Browse files Browse the repository at this point in the history
Help for a bunch more controls.
  • Loading branch information
adamdriscoll authored Jun 20, 2019
2 parents 48e7ce2 + 739d178 commit 1f2b209
Show file tree
Hide file tree
Showing 41 changed files with 197 additions and 1,418 deletions.
4 changes: 1 addition & 3 deletions src/UniversalDashboard/Help/New-UDGridLayout.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ New-UDGridLayout [[-Id] <String>] [[-RowHeight] <Int32>] [[-Content] <ScriptBloc
```

## DESCRIPTION
Layout components using a JSON-based grid system. This uses the react-grid-layout component: https://github.com/strml/react-grid-layout#features

If you are using Enterprise, you can use the -Design flag on Start-UDDashboard to drag and drop components.
Layout components using a JSON-based grid system. This uses the react-grid-layout component: https://github.com/strml/react-grid-layout#features If you are using Enterprise, you can use the -Design flag on Start-UDDashboard to drag and drop components.

## EXAMPLES

Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/New-UDHtml.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Creates a section of HTML.

### Example 1
```
New-UDHtml -Markup '<h3>Hi! I'm HTML</h3>'
New-UDHtml -Markup "<h3>Hi! I'm HTML</h3>"
```

Creates header text in the dashboard.
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/New-UDIFrame.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Creates a new iframe.

### Example 1
```
New-UDIFrame -Uri https://www.google.com
New-UDIFrame -Uri https://www.ironmansoftware.com
```

Creates an iframe that embeds Google.
Expand Down
9 changes: 1 addition & 8 deletions src/UniversalDashboard/Help/New-UDImage.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Renders an image in the dashboard.

### Example 1
```
New-UDImage -Url "http://www.google.com/logo.png" -Height 50 -Width 50
New-UDImage -Url "https://i1.wp.com/ironmansoftware.com/wp-content/uploads/2019/01/dsl.png" -Height 50 -Width 50
```

Inserts the Google logo and sizes it to 50px by 50px.
Expand All @@ -43,13 +43,6 @@ New-UDImage -Height 125 -Width 125 -Url "data:image/svg+xml;base64,PHN2ZyB3aWR0a

Inserts an SVG, base64 logo and sizes it to 50px by 50px.

### Example 3
```
New-UDImage -Height 125 -Width 125 -Path ".\my_image.png"
```

Inserts my_image.png from the local machine.

## PARAMETERS

### -Attributes
Expand Down
22 changes: 21 additions & 1 deletion src/UniversalDashboard/Help/New-UDInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,27 @@ New-UDInput -Title "User Information" -Endpoint {
}
```

Accepts user input and sends the data to another server. The endpoint then returns a toast message to the client.
Accepts user input and a toast message to the client.


### Custom Input Fields
```
New-UDInput -Title "User Information" -Content {
New-UDInputField -Type textbox -Name FirstName -Placeholder 'First Name'
New-UDInputField -Type textbox -Name LastName -Placeholder 'Last Name'
New-UDInputField -Type textbox -Name Address -Placeholder 'Address'
New-UDInputField -Type textbox -Name PhoneNumber -Placeholder 'Phone Number'
New-UDInputField -Type password -Name Password -Placeholder 'Password'
New-UDInputField -Type date -Name StartDate -Placeholder 'Start Date'
New-UDInputField -Type time -Name StartTime -Placeholder 'Start Time'
} -Endpoint {
param($FirstName, $LastName, $Address, $PhoneNumber, $Password, $StartDate, $StartTime)
New-UDInputAction -Toast "Record saved! $FirstName, $LastName, $Address, $PhoneNumber, $Password, $StartDate, $StartTime"
}
```

Users custom input fields to configure the form and then sends a toast to the user when the button is clicked.

## PARAMETERS

Expand Down
10 changes: 5 additions & 5 deletions src/UniversalDashboard/Help/New-UDMonitor.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version:
online version: https://github.com/ironmansoftware/universal-dashboard/blob/master/src/UniversalDashboard/Help/New-UDMonitor.md
schema: 2.0.0
---

Expand All @@ -26,14 +26,14 @@ Creates a live updating chart that shows a single type of data. This is paired

## EXAMPLES

### Example 1
### Basic Monitor
```
PS C:\> New-UDMonitor -Type Line -Title "CPU" -RefreshInterval 1 -DataPointHistory 100 -Endpoint {
Get-Counter '\Memory\Available MBytes' | Select-Object -ExpandProperty CounterSamples | Select -ExpandProperty CookedValue | Out-UDMonitorData
New-UDMonitor -Type Line -Title "CPU" -RefreshInterval 1 -DataPointHistory 100 -Endpoint {
Get-Random | Out-UDMonitorData
}
```

Displays available memory in megabytes for the machine.
Displays random data on the monitor.

## PARAMETERS

Expand Down
20 changes: 17 additions & 3 deletions src/UniversalDashboard/Help/New-UDPreloader.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version:
online version: https://github.com/ironmansoftware/universal-dashboard/blob/master/src/UniversalDashboard/Help/New-UDPreloader.md
schema: 2.0.0
---

Expand Down Expand Up @@ -33,13 +33,27 @@ Creates a new preloader. Preloaders can be used to show progress or indicate to

## EXAMPLES

### Example 1
### Percent Complete
```
PS C:\> New-UDPreloader -PercentComplete 10
New-UDPreloader -PercentComplete 10
```

Creates a new determinate preloader with a percentage complete of 10.

### Indeterminate
```
New-UDPreloader -ProgressColor red
```

Creates a preloader with a progress color set to red.

### Circular
```
New-UDPreloader -Color blue -Circular
```

Creates a blue, circular preloader.

## PARAMETERS

### -BackgroundColor
Expand Down
35 changes: 29 additions & 6 deletions src/UniversalDashboard/Help/New-UDRadio.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version:
online version: https://github.com/ironmansoftware/universal-dashboard/blob/master/src/UniversalDashboard/Help/New-UDRadio.md
schema: 2.0.0
---

Expand All @@ -22,19 +22,42 @@ Creates a radio. Radios can be used to select between a set of items. They shoul

## EXAMPLES

### Example 1
### Basic Radio
```
PS C:\> New-UDRadio -Label 'Option 1' -Group 'Group 1'
PS C:\> New-UDRadio -Label 'Option 2' -Group 'Group 1'
PS C:\> New-UDRadio -Label 'Option 3' -Group 'Group 1'
New-UDRadio -Label 'Option 1' -Group 'Group 1'
New-UDRadio -Label 'Option 2' -Group 'Group 1'
New-UDRadio -Label 'Option 3' -Group 'Group 1'
```

Creates three options for a radio group.

### OnChange
```
New-UDRadio -Label 'Option 1' -Group 'Group 1' -OnChange { Show-UDToast -Message $EventData }
New-UDRadio -Label 'Option 2' -Group 'Group 1' -OnChange { Show-UDToast -Message $EventData }
New-UDRadio -Label 'Option 3' -Group 'Group 1' -OnChange { Show-UDToast -Message $EventData }
```

Creates three options for a radio group with onChange event handlers.


### Multiple groupos
```
New-UDRadio -Label 'Option 1' -Group 'Group 1'
New-UDRadio -Label 'Option 2' -Group 'Group 1'
New-UDRadio -Label 'Option 3' -Group 'Group 1'
New-UDRadio -Label 'Option 1' -Group 'Group 2'
New-UDRadio -Label 'Option 2' -Group 'Group 2'
New-UDRadio -Label 'Option 3' -Group 'Group 2'
```

Creates three options for two radio groups.

## PARAMETERS

### -Checked
{{Fill Checked Description}}
Whether the radio is checked.

```yaml
Type: SwitchParameter
Expand Down
16 changes: 8 additions & 8 deletions src/UniversalDashboard/Help/New-UDRow.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version:
online version: https://github.com/ironmansoftware/universal-dashboard/blob/master/src/UniversalDashboard/Help/New-UDRow.md
schema: 2.0.0
---

Expand Down Expand Up @@ -29,12 +29,12 @@ Creates a new row on the dashboard. Columns are defined with New-UDColumn.

### Example 1
```
PS C:\> New-UDRow {
New-UDRow {
New-UDColumn -Size 6 {
New-UDCard -Content {} -BackgroundColor black
}
New-UDColumn -Size 6 {
New-UDCard -Content {} -BackgroundColor black
}
}
```
Expand All @@ -43,19 +43,19 @@ Defines a row with two columns are equal size.

### Example 2
```
PS C:\> New-UDRow {
New-UDRow {
New-UDColumn -Size 6 {
New-UDRow {
New-UDColumn -Size 6 {
New-UDCard -Content {} -BackgroundColor black
}
New-UDColumn -Size 6 {
New-UDCard -Content {} -BackgroundColor black
}
}
}
New-UDColumn -Size 6 {
New-UDCard -Content {} -BackgroundColor black
}
}
```
Expand Down
6 changes: 3 additions & 3 deletions src/UniversalDashboard/Help/New-UDSelect.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version:
online version: https://github.com/ironmansoftware/universal-dashboard/blob/master/src/UniversalDashboard/Help/New-UDSelect.md
schema: 2.0.0
---

Expand All @@ -24,12 +24,12 @@ Creates a select.

### Example 1
```
PS C:\> New-UDSelect -Label "State" -Option {
New-UDSelect -Label "State" -Option {
New-UDSelectOption -Name "Wisconsin" -Value 1
New-UDSelectOption -Name "Idaho" -Value 2
New-UDSelectOption -Name "Washington" -Value 3
} -OnChange {
$Session:State = $EventData
Show-UDToast -Message $EventData
}
```

Expand Down
13 changes: 10 additions & 3 deletions src/UniversalDashboard/Help/New-UDSwitch.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version:
online version: https://github.com/ironmansoftware/universal-dashboard/blob/master/src/UniversalDashboard/Help/New-UDSwitch.md
schema: 2.0.0
---

Expand All @@ -22,13 +22,20 @@ Creates a switch control. Switches are similar in function to checkboxes but use

## EXAMPLES

### Example 1
### Basic Switch
```
PS C:\> New-UDSwitch -OnText "yes" -OffText "No"
New-UDSwitch -OnText "yes" -OffText "No"
```

Creates a switch that has yes and no as options.

### OnChange
```
New-UDSwitch -OnText "yes" -OffText "No" -OnChange { Show-UDToast -Message $EventData }
```

Shows a toast when the switch is changed.

## PARAMETERS

### -Disabled
Expand Down
20 changes: 12 additions & 8 deletions src/UniversalDashboard/Help/New-UDTabContainer.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version:
online version:https://github.com/ironmansoftware/universal-dashboard/blob/master/src/UniversalDashboard/Help/New-UDTabContainer.md
schema: 2.0.0
---

# New-UDTabContainer

## SYNOPSIS
{{ Fill in the Synopsis }}
Creates a tab container.

## SYNTAX

Expand All @@ -17,21 +17,25 @@ New-UDTabContainer -Tabs <ScriptBlock> [-Id <String>] [<CommonParameters>]
```

## DESCRIPTION
{{ Fill in the Description }}
Creates a tab container. Use New-UDTab to create tabs within the tab container.

## EXAMPLES

### Example 1
### Basic Tabs
```powershell
PS C:\> {{ Add example code here }}
New-UDTabContainer -Tabs {
New-UDTab -Text 'Tab 1' -Content { New-UDHeading -Text 'Tab 1 Content' }
New-UDTab -Text 'Tab 2' -Content { New-UDHeading -Text 'Tab 2 Content' }
New-UDTab -Text 'Tab 3' -Content { New-UDHeading -Text 'Tab 3 Content' }
}
```

{{ Add example description here }}
Creates a tab container with 3 tabs.

## PARAMETERS

### -Id
{{ Fill Id Description }}
ID of this component.

```yaml
Type: String
Expand All @@ -46,7 +50,7 @@ Accept wildcard characters: False
```
### -Tabs
{{ Fill Tabs Description }}
The tabs for this container. Use New-UDTab to create the tabs.
```yaml
Type: ScriptBlock
Expand Down
12 changes: 9 additions & 3 deletions src/UniversalDashboard/Help/New-UDTable.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version:
online version: https://github.com/ironmansoftware/universal-dashboard/blob/master/src/UniversalDashboard/Help/New-UDTable.md
schema: 2.0.0
---

Expand Down Expand Up @@ -33,8 +33,14 @@ Creates a new table of data within the dashboard.

### Example 1
```
PS C:\> New-UDTable -Title "Process Ids" -Header @("Name", "Process Id") -Endpoint {
Get-Process -Name Chrome | Out-UDTableData -Property @("name", "id")
New-UDTable -Title "Process Ids" -Header @("Name", "Process Id") -Endpoint {
$Data = @(
[PSCustomObject]@{ name = "Chrome"; id = 12352 }
[PSCustomObject]@{ name = "devenv"; id = 342 }
[PSCustomObject]@{ name = "code"; id = 634532 }
[PSCustomObject]@{ name = "powershell_ise"; id = 345342 }
)
$Data | Out-UDTableData -Property @("name", "id")
}
```

Expand Down
Loading

0 comments on commit 1f2b209

Please sign in to comment.