diff --git a/OpenRPA.PS/NodeRED/AddNoderedInstance.cs b/OpenRPA.PS/NodeRED/AddNoderedInstance.cs index 6b1c741d..2b4e7b2c 100644 --- a/OpenRPA.PS/NodeRED/AddNoderedInstance.cs +++ b/OpenRPA.PS/NodeRED/AddNoderedInstance.cs @@ -1,33 +1,33 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using OpenRPA.Interfaces; -using System.Management.Automation; -using Newtonsoft.Json.Linq; -using System.Collections.ObjectModel; +//using System; +//using System.Collections.Generic; +//using System.Linq; +//using System.Text; +//using System.Threading.Tasks; +//using OpenRPA.Interfaces; +//using System.Management.Automation; +//using Newtonsoft.Json.Linq; +//using System.Collections.ObjectModel; -namespace OpenRPA.PS -{ - [Cmdlet(VerbsCommon.Add, "NoderedInstance")] - public class AddNoderedInstance : OpenRPACmdlet - { - [Parameter(Position = 0, ValueFromPipeline = true)] public string _id { get; set; } - protected override async Task ProcessRecordAsync() - { - try - { - string traceId = ""; string spanId = ""; - if (string.IsNullOrEmpty(_id)) { _id = global.webSocketClient.user._id; } - await global.webSocketClient.EnsureNoderedInstance(_id, traceId, spanId); - } - catch (Exception ex) - { - WriteError(new ErrorRecord(ex, "", ErrorCategory.NotSpecified, null)); - } +//namespace OpenRPA.PS +//{ +// [Cmdlet(VerbsCommon.Add, "NoderedInstance")] +// public class AddNoderedInstance : OpenRPACmdlet +// { +// [Parameter(Position = 0, ValueFromPipeline = true)] public string _id { get; set; } +// protected override async Task ProcessRecordAsync() +// { +// try +// { +// string traceId = ""; string spanId = ""; +// if (string.IsNullOrEmpty(_id)) { _id = global.webSocketClient.user._id; } +// await global.webSocketClient.EnsureNoderedInstance(_id, traceId, spanId); +// } +// catch (Exception ex) +// { +// WriteError(new ErrorRecord(ex, "", ErrorCategory.NotSpecified, null)); +// } - } - } -} +// } +// } +//} diff --git a/OpenRPA.PS/NodeRED/GetNoderedInstance.cs b/OpenRPA.PS/NodeRED/GetNoderedInstance.cs index fcd74adf..a5bbaa77 100644 --- a/OpenRPA.PS/NodeRED/GetNoderedInstance.cs +++ b/OpenRPA.PS/NodeRED/GetNoderedInstance.cs @@ -1,54 +1,54 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using OpenRPA.Interfaces; -using System.Management.Automation; -using Newtonsoft.Json.Linq; -using System.Collections.ObjectModel; +//using System; +//using System.Collections.Generic; +//using System.Linq; +//using System.Text; +//using System.Threading.Tasks; +//using OpenRPA.Interfaces; +//using System.Management.Automation; +//using Newtonsoft.Json.Linq; +//using System.Collections.ObjectModel; -namespace OpenRPA.PS -{ - [Cmdlet(VerbsCommon.Get, "NoderedInstance")] - public class GetNoderedInstance : OpenRPACmdlet - { - [Parameter(Position = 0, ValueFromPipeline = true)] public string _id { get; set; } - [Parameter(Position = 1)] public int Minutes { get; set; } - protected override async Task ProcessRecordAsync() - { - try - { - if (Minutes < 1) Minutes = 1; - // string dt = DateTime.UtcNow.AddMinutes(Minutes).ToString("o", System.Globalization.CultureInfo.InvariantCulture); - string dt = DateTime.UtcNow.AddMinutes(-Minutes).ToString("yyyy-MM-dd'T'HH:mm:ss.fffK", System.Globalization.CultureInfo.InvariantCulture); - string json = "{\"_type\":\"user\", \"_noderedheartbeat\": { \"$gte\": \"" + dt + "\" } }"; - if (!string.IsNullOrEmpty(_id)) { json = "{\"_type\":\"user\", \"_id\": \"" + _id + "\"}"; } - var entities = await global.webSocketClient.Query("users", json, top: 100); - int index = 0; - foreach (var entity in entities) - { - if (entity.ContainsKey("name")) - { - WriteVerbose("Parsing " + entity.Value("_id") + " " + entity.Value("name")); - } - else - { - WriteVerbose("Parsing " + entity.Value("_id")); - } - // results.Add(obj); - WriteObject(entity.toPSObjectWithTypeName("users")); - index++; - if (index % 10 == 9) await Task.Delay(1); - } +//namespace OpenRPA.PS +//{ +// [Cmdlet(VerbsCommon.Get, "NoderedInstance")] +// public class GetNoderedInstance : OpenRPACmdlet +// { +// [Parameter(Position = 0, ValueFromPipeline = true)] public string _id { get; set; } +// [Parameter(Position = 1)] public int Minutes { get; set; } +// protected override async Task ProcessRecordAsync() +// { +// try +// { +// if (Minutes < 1) Minutes = 1; +// // string dt = DateTime.UtcNow.AddMinutes(Minutes).ToString("o", System.Globalization.CultureInfo.InvariantCulture); +// string dt = DateTime.UtcNow.AddMinutes(-Minutes).ToString("yyyy-MM-dd'T'HH:mm:ss.fffK", System.Globalization.CultureInfo.InvariantCulture); +// string json = "{\"_type\":\"user\", \"_noderedheartbeat\": { \"$gte\": \"" + dt + "\" } }"; +// if (!string.IsNullOrEmpty(_id)) { json = "{\"_type\":\"user\", \"_id\": \"" + _id + "\"}"; } +// var entities = await global.webSocketClient.Query("users", json, top: 100); +// int index = 0; +// foreach (var entity in entities) +// { +// if (entity.ContainsKey("name")) +// { +// WriteVerbose("Parsing " + entity.Value("_id") + " " + entity.Value("name")); +// } +// else +// { +// WriteVerbose("Parsing " + entity.Value("_id")); +// } +// // results.Add(obj); +// WriteObject(entity.toPSObjectWithTypeName("users")); +// index++; +// if (index % 10 == 9) await Task.Delay(1); +// } - } - catch (Exception ex) - { - WriteError(new ErrorRecord(ex, "", ErrorCategory.NotSpecified, null)); - } +// } +// catch (Exception ex) +// { +// WriteError(new ErrorRecord(ex, "", ErrorCategory.NotSpecified, null)); +// } - } - } -} +// } +// } +//} diff --git a/OpenRPA.PS/NodeRED/RemoveNoderedInstance.cs b/OpenRPA.PS/NodeRED/RemoveNoderedInstance.cs index 9b9338ca..5b5524c5 100644 --- a/OpenRPA.PS/NodeRED/RemoveNoderedInstance.cs +++ b/OpenRPA.PS/NodeRED/RemoveNoderedInstance.cs @@ -1,33 +1,33 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using OpenRPA.Interfaces; -using System.Management.Automation; -using Newtonsoft.Json.Linq; -using System.Collections.ObjectModel; +//using System; +//using System.Collections.Generic; +//using System.Linq; +//using System.Text; +//using System.Threading.Tasks; +//using OpenRPA.Interfaces; +//using System.Management.Automation; +//using Newtonsoft.Json.Linq; +//using System.Collections.ObjectModel; -namespace OpenRPA.PS -{ - [Cmdlet(VerbsCommon.Remove, "NoderedInstance")] - public class RemoveNoderedInstance : OpenRPACmdlet - { - [Parameter(Position = 0, ValueFromPipeline = true)] public string _id { get; set; } - protected override async Task ProcessRecordAsync() - { - try - { - string traceId = ""; string spanId = ""; - if (string.IsNullOrEmpty(_id)) { _id = global.webSocketClient.user._id; } - await global.webSocketClient.DeleteNoderedInstance(_id, "", ""); - } - catch (Exception ex) - { - WriteError(new ErrorRecord(ex, "", ErrorCategory.NotSpecified, null)); - } +//namespace OpenRPA.PS +//{ +// [Cmdlet(VerbsCommon.Remove, "NoderedInstance")] +// public class RemoveNoderedInstance : OpenRPACmdlet +// { +// [Parameter(Position = 0, ValueFromPipeline = true)] public string _id { get; set; } +// protected override async Task ProcessRecordAsync() +// { +// try +// { +// string traceId = ""; string spanId = ""; +// if (string.IsNullOrEmpty(_id)) { _id = global.webSocketClient.user._id; } +// await global.webSocketClient.DeleteNoderedInstance(_id, "", ""); +// } +// catch (Exception ex) +// { +// WriteError(new ErrorRecord(ex, "", ErrorCategory.NotSpecified, null)); +// } - } - } -} +// } +// } +//} diff --git a/OpenRPA/LocallyCached.cs b/OpenRPA/LocallyCached.cs index 3a722bd7..8d89a51f 100644 --- a/OpenRPA/LocallyCached.cs +++ b/OpenRPA/LocallyCached.cs @@ -129,10 +129,6 @@ public async Task Save(bool skipOnline = false) where T : apibase var exists = collection.FindById(_id); if (exists != null) { collection.Update(entity); Log.Verbose("Updated in local db as version " + entity._version + " " + entity._type + " " + entity.name); } if (exists == null) { collection.Insert(entity); Log.Verbose("Inserted in local db as version " + entity._version + " " + entity._type + " " + entity.name); } - } else - { - // WHY ???? - System.Diagnostics.Debugger.Break(); } } finally diff --git a/OpenRPA/MainWindow.xaml b/OpenRPA/MainWindow.xaml index ebdde035..f5d2426b 100644 --- a/OpenRPA/MainWindow.xaml +++ b/OpenRPA/MainWindow.xaml @@ -53,11 +53,6 @@ - - - - - diff --git a/OpenRPA/MainWindow.xaml.cs b/OpenRPA/MainWindow.xaml.cs index 71442936..34a6052d 100644 --- a/OpenRPA/MainWindow.xaml.cs +++ b/OpenRPA/MainWindow.xaml.cs @@ -2975,15 +2975,36 @@ private bool CanAllways(object _item) } private void OnOpenChromePage(object _item) { - System.Diagnostics.Process.Start("chrome.exe", "https://chrome.google.com/webstore/detail/openrpa/hpnihnhlcnfejboocnckgchjdofeaphe"); + try + { + System.Diagnostics.Process.Start("chrome.exe", "https://chrome.google.com/webstore/detail/openrpa/hpnihnhlcnfejboocnckgchjdofeaphe"); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } } private void OnOpenFirefoxPageCommand(object _item) { - System.Diagnostics.Process.Start("firefox.exe", "https://addons.mozilla.org/en-US/firefox/addon/openrpa/"); + try + { + System.Diagnostics.Process.Start("firefox.exe", "https://addons.mozilla.org/en-US/firefox/addon/openrpa/"); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } } private void OnOpenEdgePageCommand(object _item) { - System.Diagnostics.Process.Start("msedge.exe", "https://chrome.google.com/webstore/detail/openrpa/hpnihnhlcnfejboocnckgchjdofeaphe"); + try + { + System.Diagnostics.Process.Start("msedge.exe", "https://chrome.google.com/webstore/detail/openrpa/hpnihnhlcnfejboocnckgchjdofeaphe"); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } } private int lastsapprocessid = -1; diff --git a/OpenRPA/OpenRPA.csproj b/OpenRPA/OpenRPA.csproj index 880e5ba1..18a08084 100644 --- a/OpenRPA/OpenRPA.csproj +++ b/OpenRPA/OpenRPA.csproj @@ -11,7 +11,7 @@ Base UI of OpenRPA, used as part of OpenRPA robot MPL-2.0 https://github.com/open-rpa/openrpa - 1.4.50 + 1.4.51 openrpa.png Debug;Release;ReleaseNuget;PrepInstaller diff --git a/README.md b/README.md index b46cd886..c8604635 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,9 @@ Open Source Robotic Process Automation Software Download and try it out here [💾here](https://github.com/open-rpa/openrpa/releases/latest/download/OpenRPA.msi) and manage your [🔧OpenFlow account here](https://app.openiap.io) -Join our [🤷💻🤦 Community Forum](https://bb.openiap.io/) for for help or giving feedback +Join our [🤷💻🤦 Community Forum](discourse.openiap.io/) for for help or giving feedback -Join our [💬 community](https://rocket.openiap.io/) for for help or giving feedback - -Click here for [💲🤷Commercial Support](https://openrpa.dk/) +Click here for [💲🤷Commercial Support](https://openiap.io/) Check out the [📘documentation](https://docs.openiap.io/) or knows issue and updated documentation on our [❔wiki pages](https://github.com/open-rpa/openrpa/wiki)