Skip to content

Commit 61b1a0b

Browse files
muenchrisChris MuenchberndbrMarkusHorstmannChris Muench
authored
NMI Fix (#102)
* Many Sonarcloud code smell fixes * Only keep SendBuffer in memory in case there are messages to send * Force Dispose of ASP.NET Core WebSocket * Avoid ArgumentOutOfRangeException in DateTimeOffset initialization * More code smells removed * Removal of WSCS no longer inside CDE * More SonarCloud Cleanup * Fix for propert update of Sub-Properties in NMI Screens; Fix for creation of properties from class if class contains collections; * security fix for scopid on page checking for known scope * Beginning of support for Wildernesslabs.co Meadow board * OPC UA Attributes for UAVariable and UAHAVariable * More support for Meadow * Drop WR and disable config files for Meadow * IsFeather option * Fx to ensure UA Attributes are applied to non-mandatory properties; new cdeFOC flag to prevent ThingRegistry writes to disk for highspeed properties. * Null pointer fix; EngineName added to DeviceTypeAttribute - used by OPC UA NodeSet Client * new OPC UA Twin Base Thing for things with dual Connectors * Access to OldValue in cdeP; OPCUA Attributes for write and hidefromanonymous * TXT for HandleMessage as consts * OldValue not serialized * Fix for SetSetting() not applied correctly * New event b4 Form Meta Sending to Browser * Typo fix and prep for NMI editor * Better support for ReloadAfterLogout; NMI Model support for DefaultPortal of Plugin; Support for Portal Page Faceplates * Set default HomeScreen in User Profile * FitToScreen option * Inner Form ClassName * More flexible FacePlate Macros * Copyright update * Copyright * New event fired before a resource is sent to the NMI allowing plugins to modify static pages before sending to the NMI * Fix for HomeScreen by CDEDL Url Path * New ThingGroup for Group Screens and Overviews * Fix for Pin based Login * Pin connection API * New Pins, Groups and Thing extensions * New NMI Editor Coming * NMI Update for saving online NMI Screen modifications * Bigger property table * Better support for Dynamic Model Changes in preperation of the new NMI Editor Pin Connector Model for NMI Runtime in Preview New Reference to ThingBase in TheThing in order to manage Things based on TheThiingBase - required for NMI Editor * Thing Group improv * Redpillshift * new Numeric Html Macro with Digits option * New OPCUABaseAttribute - base for all UA Types * FlexibleNMI Screen API optimization; cdeASPNET for net6 and net7 * NMI Group API, Allow delete rule by RuleMID * Small possible Null Pointer exception during shutdown * Change of OPC UA Namespace for Pins * UAAttributes for UA Property Definition now on Classes allowed Breaking change: UANodeId changed to UATypeNodeId * new NMI Log option for ThingBase; fix for Properties-from-Class * Fix for PropertyChange event with forms containing multiple elements with same DataItem; Fix for Storage Historian Chart reference; Typo fixes in Documentation * Fix for duplicate cdeFixupFileName * New ICDEProperty Interface for better Properties of Properties management * New NMI Editor: Add and Delete of Controls to GroupThing in Preview Support for update of Fields with different Owner Thing in Forms new OPC UA Thing - moved all OPC UA releated classes to new cdeUAThing.cs Preview of TheThingGroup: HMI Screen Support within the NMI * fix for cdeASPNET only NET6 support for now * Update dotnetcore.yml: .Net 7 * cdeASPNet: Build for .Net7 again * Fix aspnetcore.csproj * Fix for licensing * NMI Editor improvements * Fix for Bernd; Fix for NMI no longer updating table content; new Pin Functions * NMI Editor improvements * Some minor exception fixes in TheQueuedSender; NMI Editor Improvements new eventPluginStarted event allowing to wait for a specific Engine to start * NMI Updates * Fix for reset of content-type if in header and property * NMI Code Cleanup; Removed depreciated methods; Disable NMI Editor in Cloud * Code Cleanup; Disable NMI Editor in Cloud * New Rule options for triggering rules only every xx seconds * Updater support for .NET7 * Depreciation of Loging in Rules engine - moved to ICDELoggerEngine * Stage One Removal of depreciated Methods (Commented out. in stage 2 we will remove the code completely) Support for TimeSpan Property * NMI Editor Cleanup and better handling * Support for backup of Cache folder for NetStandard * Cleanup of Obsolete code * Removal of old NET45 pragmas; SonarCloud Warnings removed; * Test: add SerializeObjectToJSONStringWithCycleTest * RecordsLock cleanup * NMI Editor Enhancements; Code Cleanup; Improvements in conjunctio with Provisioning Service and Mesh Manager * fix for custom plugins from host not loading * WriteToNMILog adjusted to same parameters as SetMessage for easier transition; Update to latest Nuget References * Added .net8 to workflow * Code Cleanup * ASPNET to .net8 * Solve ArgumentOutOfRangeException calling TheCDEEngines.StartEngines * Gitignor * Azure Key Vault Signing Support for future HSMaaS * typo fix * Improved Pin Management * Fix for FitToScreen calculation Pin Lines in ThingGroup * Pin NMI Tuning * pin tuning * PinStyle tuning (not final) * style fix * Better Startup logging on errors NMI Model Improvments * Safe Settings Management * Imrpoved Certificate logging * using cleanup * Proper Locking for ThePropertyBag * Automatic Pin line drawing in ThinGroups * Remove of AzureSign Folder * fixed signme * signme fix * signme * Fix for Linux plugin Updates * Fix for Backup/Restore under linux * Getting ready for .NET Standard 2.1 * Initial Drop for CDE 6.0 with .NET Standard 2.1 * Build Targets to 6.* * Update dotnetcore.yml removed .NET4.8 updater * update of Worflow packaging of CDE * Update dotnetcore.yml Temporary disable tests * Nuget fix * Pins can be stored and restored Pins can be deleted * Tests: Migrate to NUnit 4 * Reenable test in build * Support for Pin Line Drawing correction after Dragging * Fix for Pin Setup * Pin Line Fixes * Support for NMI Edtor OnHide Event; Support for Pin Property Overrides; * Update Pin Management Improved Pin Line Drawing * Pin Improvements * Pin Fix * Pin Update Events * Fix for Screen option Override * Support for custom WebSocket Hook Fixes for Pins and NMI * fix for pin flow animation * Sonar fixes * Pin update for ESP chips Allow to set a XIndex on FacePlates * Latest Updates * New Pin IsOnline flag * Pin Quality * spacing for faceplate template * Shutdown log improvement * latest nuget * Drop support for .NET7 * new macro for SVG * New Red-Alert events any thing can subscribe to * Macro fix * Fix for a bug in the settingsd reader if the first char is a { * PropertyMapper for ThingGroups * Set Default Portal Page to NMIAUTO for proper sunset/sunrise setting * New Code sign cert * Group Update * Setting Always push to FacePlace Properties * new way to detect mobile devices * Fix for Mobile CryptoLib in Release Mode * Update dotnetcore.yml * Update dotnetcore.yml * Update dotnetcore.yml * Update dotnetcore.yml * Do not show "All Properties" on Cloud by default * NMI Wizard Style FIx --------- Co-authored-by: Chris Muench <chris.muench@live.com> Co-authored-by: Bernd Brachmaier | AUNOVIS <brachmaier@aunovis.de> Co-authored-by: MarkusHorstmann <markus.horstmann@c-labs.com> Co-authored-by: Markus Horstmann <markushorstmann@hotmail.com> Co-authored-by: Chris Muench <muenchris@c-labs.com> Co-authored-by: Chris Muench <chris@hyviva.com>
1 parent eba9a8b commit 61b1a0b

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/C-DEngine/C-DEngines/C-DNMIService/cde_NMIAPI.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2282,7 +2282,7 @@ public static cdeConcurrentDictionary<string, TheFieldInfo> AddNewWizardPage(The
22822282
int grpFld = 100 * pPageNumber;
22832283
tFlds["Group"] = AddSmartControl(pBaseThing, pForm, eFieldType.TileGroup, grpFld, 0, 0, null, null, new nmiCtrlTileGroup { TileWidth = 12, Visibility = (pPageNumber == 1), Group = $"WizarePage:{pPageNumber}" });
22842284
if (pPageTitle != null)
2285-
tFlds["Caption"] = AddSmartControl(pBaseThing, pForm, eFieldType.SmartLabel, grpFld + 1, 0, 0, null, null, new nmiCtrlSmartLabel { ParentFld = grpFld, NoTE = true, Text = pPageTitle, TileWidth = 12, TileHeight = 1, ContainerClassName = "cdeWizardCaption" });
2285+
tFlds["Caption"] = AddSmartControl(pBaseThing, pForm, eFieldType.SmartLabel, grpFld + 1, 0, 0, null, null, new nmiCtrlSmartLabel { ParentFld = grpFld, NoTE = true, Text = pPageTitle, TileWidth = 12, TileHeight = 1, ClassName= "cdeWizardCaptionText", ContainerClassName = "cdeWizardCaption" });
22862286

22872287
tFlds["LowerSpacerLine"] = AddWizardSpacer(pBaseThing, pForm, pPageNumber, 2, 12, 1, new nmiCtrlTileGroup { TileFactorY = 12, ClassName = "cdeWizardSpacer" });
22882288

@@ -2297,7 +2297,7 @@ public static cdeConcurrentDictionary<string, TheFieldInfo> AddNewWizardPage(The
22972297

22982298
tFlds["BottomSpacerLine"] = AddSmartControl(pBaseThing, pForm, eFieldType.TileGroup, grpFld + 89, 0, 0, null, null, new nmiCtrlTileGroup { ParentFld = grpFld, TileWidth = 12, TileHeight = 1, TileFactorY = 12, ClassName= "cdeWizardSpacer" });
22992299

2300-
tFlds["ButtonGroup"] = AddSmartControl(pBaseThing, pForm, eFieldType.TileGroup, grpFld + 90, 0, 0, null, null, new nmiCtrlTileGroup { ParentFld = grpFld, TileWidth = 12, TileHeight = 1 });
2300+
tFlds["ButtonGroup"] = AddSmartControl(pBaseThing, pForm, eFieldType.TileGroup, grpFld + 90, 0, 0, null, null, new nmiCtrlTileGroup { ParentFld = grpFld, TileWidth = 12, TileHeight = 1, ClassName = "cdeWizardButtonBack" });
23012301
if (pPrevPage < 0 && pNextPage < 0)
23022302
{
23032303
tFlds["Spacer"] = AddSmartControl(pBaseThing, pForm, eFieldType.TileGroup, grpFld + 94, 0, 0, null, null, new nmiCtrlTileGroup { ParentFld = grpFld + 90, TileWidth = 8, TileHeight = 1 });
@@ -2309,14 +2309,14 @@ public static cdeConcurrentDictionary<string, TheFieldInfo> AddNewWizardPage(The
23092309
tCancel = $"TTS:{tCancel}";
23102310
else
23112311
tCancel = $"TTS:{pForm.TableReference}";
2312-
tFlds["CancelButton"] = AddSmartControl(pBaseThing, pForm, eFieldType.TileButton, grpFld + 92, 2, 0, "Cancel", null, new nmiCtrlTileButton { ParentFld = grpFld + 90, TileWidth = 2, OnClick = tCancel, TileHeight = 1, NoTE = true });
2312+
tFlds["CancelButton"] = AddSmartControl(pBaseThing, pForm, eFieldType.TileButton, grpFld + 92, 2, 0, "Cancel", null, new nmiCtrlTileButton { ParentFld = grpFld + 90, TileWidth = 2, OnClick = tCancel, TileHeight = 1, NoTE = true, ClassName = "cdeWizardCancel" });
23132313

23142314
tFlds["Spacer"] = AddSmartControl(pBaseThing, pForm, eFieldType.TileGroup, grpFld + 94, 0, 0, null, null, new nmiCtrlTileGroup { ParentFld = grpFld + 90, TileWidth = 6, TileHeight = 1 });
2315-
tFlds["BackButton"] = AddSmartControl(pBaseThing, pForm, eFieldType.TileButton, grpFld + 96, pPrevPage > 0 ? 2 : 0, 0, "Back", null, new nmiCtrlTileButton { ParentFld = grpFld + 90, OnClick = (pPageNumber > 1 ? $"GRP:WizarePage:{pPrevPage}" : ""), TileWidth = 2, TileHeight = 1, NoTE = true });
2315+
tFlds["BackButton"] = AddSmartControl(pBaseThing, pForm, eFieldType.TileButton, grpFld + 96, pPrevPage > 0 ? 2 : 0, 0, "Back", null, new nmiCtrlTileButton { ParentFld = grpFld + 90, OnClick = (pPageNumber > 1 ? $"GRP:WizarePage:{pPrevPage}" : ""), TileWidth = 2, TileHeight = 1, NoTE = true, ClassName="cdeWizardBack" });
23162316
var tFinish = ThePropertyBag.PropBagGetValue(pForm.PropertyBag, "FinishScreenID", "=");
23172317
if (!string.IsNullOrEmpty(tFinish))
23182318
tFinish = $"TTS:{tFinish}";
2319-
tFlds["NextButton"] = AddSmartControl(pBaseThing, pForm, eFieldType.TileButton, grpFld + 98, 2, 0, pNextPage > 0 ? "Next" : "Finish", null, new nmiCtrlTileButton { ParentFld = grpFld + 90, IsSubmit = (pNextPage <= 0), OnClick = (pNextPage > 0 ? $"GRP:WizarePage:{pNextPage}:{pDisplayCondition}" : tFinish), TileWidth = 2, TileHeight = 1, NoTE = true });
2319+
tFlds["NextButton"] = AddSmartControl(pBaseThing, pForm, eFieldType.TileButton, grpFld + 98, 2, 0, pNextPage > 0 ? "Next" : "Finish", null, new nmiCtrlTileButton { ParentFld = grpFld + 90, IsSubmit = (pNextPage <= 0), OnClick = (pNextPage > 0 ? $"GRP:WizarePage:{pNextPage}:{pDisplayCondition}" : tFinish), TileWidth = 2, TileHeight = 1, NoTE = true, ClassName = "cdeWizardFinish" });
23202320
}
23212321
return tFlds;
23222322
}

src/C-DEngine/C-DEngines/C-DThingService/cdeThingGroup.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ public virtual bool DoCreateUX(cdeConcurrentDictionary<string, TheMetaDataBase>
298298
{
299299
bool DisallowAdd = CU.CBool(MyBaseThing.GetProperty("NMI_DisallowAdd", false)?.GetValue());
300300
bool ShowAllProperties = CU.CBool(MyBaseThing.GetProperty("NMI_ShowAllProperties", false)?.GetValue());
301+
bool AllowAllPropertiesInCloud = CU.CBool(MyBaseThing.GetProperty("NMI_AllowAllPropertiesInCloud", false)?.GetValue());
301302
bool AddRefresh = CU.CBool(MyBaseThing.GetProperty("NMI_AddRefresh", false)?.GetValue());
302303

303304
NMIEditorField = NMI.AddSmartControl(MyBaseThing, MyGroupForm, eFieldType.TileGroup, MyGroupForm.FldPos, 0, 0, null, null, new nmiCtrlTileGroup { NoTE = true });
@@ -379,7 +380,7 @@ public virtual bool DoCreateUX(cdeConcurrentDictionary<string, TheMetaDataBase>
379380

380381
if (ShowAllProperties)
381382
{
382-
pUXFlds["PropTableGroup"] = NMI.AddSmartControl(MyBaseThing, MyGroupForm, eFieldType.CollapsibleGroup, 10000, 2, 0x80, "All Properties", null, new nmiCtrlCollapsibleGroup { DoClose = true, IsSmall = true, TileWidth = 12 });
383+
pUXFlds["PropTableGroup"] = NMI.AddSmartControl(MyBaseThing, MyGroupForm, eFieldType.CollapsibleGroup, 10000, 2 + (AllowAllPropertiesInCloud ? 0 : 128), 0x80, "All Properties", null, new nmiCtrlCollapsibleGroup { DoClose = true, IsSmall = true, TileWidth = 12 });
383384
pUXFlds["PropTable"] = NMI.AddSmartControl(MyBaseThing, MyGroupForm, eFieldType.Table, 10010, 8, 0x80, null, "mypropertybag", new nmiCtrlTableView() { TileWidth = 12, TileHeight = 7, NoTE = true, ParentFld = 10000, ShowFilterField = true });
384385
}
385386
return true;

0 commit comments

Comments
 (0)