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

Commit

Permalink
Merge branch 'master' into 838
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdriscoll committed Jun 18, 2019
2 parents 3b26f3b + a0717dc commit 8ec077b
Show file tree
Hide file tree
Showing 146 changed files with 4,238 additions and 299 deletions.
9 changes: 9 additions & 0 deletions src/UniversalDashboard/Cmdlets/StartDashboardCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,20 @@ public class StartDashboardCommand : PSCmdlet
[Parameter]
public PublishedFolder[] PublishedFolder { get; set; }

[Parameter()]
public SwitchParameter Force { get; set; }

protected override void EndProcessing()
{
var assemblyBasePath = Path.GetDirectoryName(this.GetType().GetTypeInfo().Assembly.Location);
var tempPath = Path.Combine(assemblyBasePath, "..", Constants.ModuleManifest);

if (Force) {
var existingServer = Server.Servers.FirstOrDefault(m => m.Port == Port || m.Name == m.Name);
existingServer.Stop();
Server.Servers.Remove(existingServer);
}

// Cache dashboard
if (Content == null && Dashboard == null && FilePath == null && File.Exists(Constants.CachedDashboardPath)) {
using(var powershell = PowerShell.Create()) {
Expand Down
11 changes: 11 additions & 0 deletions src/UniversalDashboard/Cmdlets/StartRestApiCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Security;
using System.Security.Cryptography.X509Certificates;
using System.Management.Automation.Runspaces;
using System.Linq;

namespace UniversalDashboard.Cmdlets
{
Expand Down Expand Up @@ -41,6 +42,10 @@ public class StartRestApiCommand : PSCmdlet
public SwitchParameter AutoReload { get; set; }
[Parameter]
public PublishedFolder[] PublishedFolder { get; set; }

[Parameter()]
public SwitchParameter Force { get; set; }


protected override void EndProcessing()
{
Expand All @@ -51,6 +56,12 @@ protected override void EndProcessing()
WriteWarning("AutoReload does not work on the command line. You must save your file as a script.");
}

if (Force) {
var existingServer = Server.Servers.FirstOrDefault(m => m.Port == Port || m.Name == m.Name);
existingServer.Stop();
Server.Servers.Remove(existingServer);
}

var server = new Server(Name, MyInvocation.ScriptName, AutoReload, Host, Port);

var options = new DashboardOptions();
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/Add-UDElement.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
external help file: UniversalDashboard.dll-Help.xml
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version:
schema: 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/Clear-UDElement.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
external help file: UniversalDashboard.dll-Help.xml
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version:
schema: 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/ConvertTo-JsonEx.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
external help file: UniversalDashboard.dll-Help.xml
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version: https://go.microsoft.com/fwlink/?LinkID=217032
schema: 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/Disable-UDLogging.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
external help file: UniversalDashboard.dll-Help.xml
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version:
schema: 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/Enable-UDLogging.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
external help file: UniversalDashboard.dll-Help.xml
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version:
schema: 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/Get-UDContentType.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
external help file: UniversalDashboard-help.xml
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version:
schema: 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/Get-UDCookie.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
external help file: UniversalDashboard-help.xml
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version:
schema: 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/Get-UDDashboard.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
external help file: UniversalDashboard.dll-Help.xml
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version:
schema: 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/Get-UDElement.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
external help file: UniversalDashboard.dll-Help.xml
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version:
schema: 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/Get-UDLicense.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
external help file: UniversalDashboard.dll-Help.xml
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard
online version:
schema: 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/Get-UDRestApi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
external help file: UniversalDashboard.dll-Help.xml
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version:
schema: 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/Get-UDTheme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
external help file: UniversalDashboard.dll-Help.xml
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version:
schema: 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/Grant-UDJsonWebToken.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
external help file: UniversalDashboard.dll-Help.xml
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard
online version:
schema: 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/Hide-UDModal.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
external help file: UniversalDashboard.dll-Help.xml
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version: https://go.microsoft.com/fwlink/?LinkID=217032
schema: 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/Hide-UDToast.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
external help file: UniversalDashboard.dll-Help.xml
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version: https://go.microsoft.com/fwlink/?LinkID=217032
schema: 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/Invoke-UDRedirect.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
external help file: UniversalDashboard.dll-Help.xml
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version: https://go.microsoft.com/fwlink/?LinkID=217032
schema: 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/New-UDAuthenticationMethod.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
external help file: UniversalDashboard.dll-Help.xml
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard
online version:
schema: 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/New-UDAuthenticationResult.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
external help file: UniversalDashboard.dll-Help.xml
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard
online version:
schema: 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/New-UDBarChartDataset.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
external help file: UniversalDashboard-help.xml
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version:
schema: 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Help/New-UDBarChartOptions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
external help file: UniversalDashboard-help.xml
external help file: UniversalDashboard.Community-help.xml
Module Name: UniversalDashboard.Community
online version:
schema: 2.0.0
Expand Down
Loading

0 comments on commit 8ec077b

Please sign in to comment.