Skip to content

Conversation

netfabb
Copy link
Contributor

@netfabb netfabb commented Oct 9, 2025

No description provided.

csreades and others added 21 commits August 28, 2025 12:35
Added in event parameter filter to API code.
… setters (#34)

* LibMCCore: Implemented configuration list component and XML attribute setters

- Introduced new `ConfigurationList` UI component:
  - Added `AMCModule_ContentItem_ConfigurationList.js` and Vue template
  - Integrated into `AMCModule_Content.vue` and module factory
  - Supports headers, entry buttons, actions (load, set active, delete)

- Extended XML document node API:
  - Added `SetAttributeValue` and `SetAttributeIntegerValue` methods

- Updated UI constants and handler:
  - Added `visible` and `showevent` support for pages/modules
  - Extended JSON state writer to include UUID and show event
  - Added lookup by page UUID

- Improved configuration version handling:
  - Implemented `FindConfigurationVersionByUUID`
  - Fixed version number increment logic in `CreateNewVersion`

- Minor updates:
  - Enhanced combobox form element with change event handler
  - Updated tab visibility checks
  - Adjusted UI page and dialog constructors

Signed-off-by: Yury Rodzikau <[email protected]>

* LibMCCore: Implements module update API and visibility handling for content forms

- Core API/UI handler:
  - Introduced new `/ui/module/{uuid}` request type with optional state ID.
  - Added `handleModuleRequest` to serialize module state into JSON.
  - Extended `CUIHandler` and `CUIPage` with `findModule` and `findModuleByUUID`.
  - Added `addContentToJSON` and `populateModuleMap` to all module classes
    (content, form, tabs, grid, custom, GLScene, graphic, layerview, logs).

- Client side (Vue/JS):
  - Added `updateModule` and `updateModules` methods in `AMCApplication`.
  - Integrated periodic `updateModules()` call in `App.vue`.
  - Extended `AMCModule_Content` and `AMCModule_Tabs` to support updates from JSON payloads.
  - Added visibility flag support:
    - `AMCModule_ContentItem_Form` now maintains `visible` property.
    - Vue template updated to honor `visible` in rendering.
    - Server-driven updates can toggle form visibility dynamically.

- Backend (UI modules):
  - Content forms now parse `visible` attribute from XML.
  - Form JSON serialization includes `visible` property in both definition and runtime content.
  - Added `IsVisible` method and client variable population for visibility.
  - Grid modules now parse optional `caption` attribute.
  - Tabs propagate updates for child tabs via `updateFromJSON`.

This change introduces server-driven module updates and visibility control, enabling
dynamic UI adjustments and finer-grained synchronization of client state.

Signed-off-by: Yury Rodzikau <[email protected]>

* LibMCCore:: add SetAttributeDoubleValue API and extend UI JSON with UUID and showEvent

- LibMCEnv (XMLDocumentNode):
  - Added new API method `SetAttributeDoubleValue`.
  - Allows setting the double value of an attribute; fails if the attribute
    does not exist or is not of type double.

- UI handler:
  - Extended legacy state serialization to include additional fields for pages:
    * `uuid` – unique identifier of the page.
    * `showevent` – event name triggered when the page is shown.
  - Ensures clients can distinguish pages and react to show events.

These changes extend the environment API with support for writing double
attributes and enhance UI JSON with page metadata required for dynamic
client-side behavior.

---------

Signed-off-by: Yury Rodzikau <[email protected]>
@netfabb netfabb merged commit be7f7fb into master Oct 9, 2025
11 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants