Table of Contents

Replacing a visual overview

In this example, you use the DataMiner App agent to rebuild a visual overview as a custom web app. As an example, a visual overview of a signal chain is used: a background drawing with shapes that show the alarm state of devices, a few key parameter values, buttons to switch between a primary and a backup chain, and a button that executes a switchover script.

A web app can offer a responsive layout that works on any screen size, and it can be maintained without Microsoft Visio. When a visual overview is used as a template across multiple elements, services, or views, you can also build the replacement app generically so that it reads the metadata of the target element, service, or view dynamically.

The agent analyzes the visual overview from two sources, so that you do not have to document it yourself:

  • The Visio file (.vsdx) tells the agent what each shape does. A .vsdx file is a ZIP package with XML files, from which the agent can read the pages, the shapes, their shape data, and any context-bound placeholders.
  • The visual overview in the browser shows the agent how it looks and behaves with real data. The agent takes screenshots and clicks through the pages.
Note

In the web apps, a visual overview is rendered on the DataMiner Agent and sent to the browser as images. The captured network traffic therefore does not show which data each shape uses. This is why the agent also needs the .vsdx file.

Prerequisites

  • The App agent is installed, and all its prerequisites are met.
  • Your AI client has a browser tool the agent can use. See Letting the agent inspect your DataMiner System.
  • The visual overview is available on a non-production DataMiner System with representative data.
  • You have the Visio file (.vsdx) of the visual overview. You can for example get it by opening the visual overview in edit mode in DataMiner Cube and saving a copy.
  • The visual overview can be opened in a browser, e.g., in a dashboard with a visual overview component. Note the URL.

Overview

Milestone Result What you review
1. Analyze the visual overview reference/inventory.md with screenshots and the meaning of every shape Is every shape and behavior in the inventory?
2. Plan the rebuild plan.md with the build milestones Is this the app you want, in the right order?
3. Layout The background and the device indicators at the right positions, without live data Does it look like the visual overview, also on other screen sizes?
4. Live data Alarm colors and parameter values, updated in real time Do the colors and values match the visual overview?
5. Navigation and details Switching between chains, and a details panel per device Does it behave like the visual overview?
6. Actions The switchover button Does it have the same effect in DataMiner?
7. Switch over Users open the new app instead of the visual overview Do users find and use the new app?

Milestone 1: Let the agent analyze the visual overview

  1. Create an empty workspace folder, e.g., C:\Apps\signal-chain, with a reference subfolder.

  2. Copy the .vsdx file into the reference folder.

  3. Optionally, add an SVG export of the background, e.g., reference/background.svg, if the drawing has a background you want to keep, such as a floor plan or a signal chain diagram. In Visio, remove the DataMiner shapes from a copy of the page, and save the page as SVG via File > Save As.

  4. Open the workspace folder in your AI client, select DataMiner App agent, and switch to Plan mode if your AI client supports it.

  5. Enter a prompt that asks for an analysis only. For example:

    We are going to replace a DataMiner visual overview with a custom app. Do not build anything yet.
    
    1. Read reference/signal-chain.vsdx. For every page, list every shape that has DataMiner shape data (Element, Parameter, View, Service, Link, Execute, SetVar, etc.), with its value, its position, and what it shows or does. Note any context-bound placeholders (such as [this element], [this ElementID], [this service], [this ServiceID], [this view], [this ViewID], [This card object], [This card objectID], [property:...], or [attachedproperty:...]) that make the drawing generic across elements, services, or views.
    2. Open the visual overview in the browser: https://my-dma/dashboard/#/db/signal-chain.dmadb
       I will sign in when you ask me to.
       Take a screenshot of every page, and save them in reference/screenshots. Click the navigation buttons to see how the pages are linked. Do not click any shape that executes a script or changes data.
    3. Match the shapes from the .vsdx file with what you see in the browser.
    
    Write the result to reference/inventory.md, and list anything you could not interpret.
    
  6. When the agent opens the visual overview, sign in in the shared browser, and tell the agent you are done.

  7. Review reference/inventory.md, and add what the agent cannot know: the meaning of shapes that only make sense with operational knowledge, how operators use the visual overview, which element, service, or view metadata (such as properties, protocol, or child items) drives the generic visualization across different objects, and which parts are no longer needed.

Tip

To capture different states, e.g., with and without alarms, raise a test alarm on the test system while the agent takes screenshots, or ask the agent to describe the expected appearance per state based on the shape data.

Milestone 2: Plan the rebuild

  1. Switch to Plan mode if your AI client supports it, and ask the agent to create a plan based on the inventory. For example:

    Based on reference/inventory.md, create plan.md for a new app called "Signal Chain" that replaces the visual overview.
    
    - Make the app generic so it works across any element, service, or view that uses this visual overview: read the target object's metadata (such as properties, protocol, parameters, and related items) dynamically, read context query parameters via URLSearchParams(window.location.search) (e.g., objectId, objectName, elementId, viewId, or serviceId), and show an in-app selector when no query parameter is provided.
    - Use reference/background.svg as the background of the main page, with the device indicators at the same positions as the shapes, also when the window is resized.
    - Clicking a device opens a side panel with its active alarms and key parameters, instead of opening the element card (and optionally include a cube:// link to open the item in DataMiner Cube).
    - The switchover button executes the automation script "Chain_Switchover" and asks for confirmation first.
    
    Split the work into milestones that I can each review against the visual overview:
    the layout without live data, then the live alarm colors and values, then the navigation and details panel, then the switchover action.
    

    If your AI client does not have a Plan mode, add "Do not write code yet." to the prompt.

  2. Review the plan, and check in particular how the agent translates the Visual Overview features. The following table shows how they are typically translated:

    Visual Overview feature In the app built by the agent
    Context placeholders ([this element], [this service], [this view], [This card object], [property:...], [attachedproperty:...]) Dynamic metadata lookup (properties, parameters, and relations) for the target element, service, or view selected in the app or read from URLSearchParams(window.location.search) (objectId, objectName, elementId, viewId, serviceId, etc.).
    Shape linked to an element, service, or view An indicator that shows the alarm state, retrieved with a GQI query and updated in real time.
    Shape that displays a parameter value A value retrieved with a GQI query and updated in real time.
    Page navigation and links to other pages Pages, tabs, or routes in the app.
    Shape that opens an element card A detail panel in the app, optionally with a Cube URL such as cube://<host>?element=<DmaID>/<ElementID> (or view= / service=) to open the card in DataMiner Cube.
    Shape that executes an automation script A button that calls the automation script and shows its result.
    Session variables (SetVar) Application state, e.g., a selected item.
    Background drawing An SVG or image, with the indicators positioned on top of it.
    Important

    Some Visual Overview features have no direct equivalent and need extra effort, e.g., dynamically generated shapes based on filters, connectivity lines based on DCF connections, or embedded DataMiner Cube components such as trend graphs. Make sure the plan states how these are handled.

  3. Answer the open questions in the plan, and let the agent update it until you agree with it.

Milestones 3 to 6: Build and validate one milestone at a time

Repeat the following for every build milestone in plan.md:

  1. Ask the agent to implement the next milestone, e.g., "Implement milestone 3 from plan.md".

  2. When the agent asks to access your DataMiner System to discover the queries, use the non-production system and an approved secure authentication method.

    Do not share credentials in chat.

  3. Let the agent finish the implementation, the tests, and the build.

  4. Package and upload the build as a draft in DataMiner as described under Deploying an app.

  5. Let the agent compare the new app with the visual overview in the browser. For example:

    The draft of milestone 4 is uploaded at <draft-app-URL> (copy the draft URL from your browser after uploading the ZIP).
    Open the visual overview and the new app in the browser, take screenshots of both, and compare the alarm color and the values of every device in the inventory.
    Report every difference, and fix the differences that are not intended.
    
  6. Check the result yourself as well: raise and clear a test alarm, and check that both show the change.

    If the app is generic across elements, services, or views, test it with multiple objects (by switching in the in-app selector or changing the URL query parameter) to confirm that it reads each object's metadata dynamically. Check the layout on the screens your operators use.

  7. Commit the workspace to Git, and let the agent mark the milestone as done in plan.md.

For a milestone with actions, such as the switchover, test the action yourself on the test system, and check the result in DataMiner.

Milestone 7: Switch users over

Upload the app and, depending on how users currently open the visual overview, choose one of the following options:

When users have fully switched over, you can remove the original visual overview, or keep only the page that embeds the new app. Store the source workspace of the new app, including plan.md and the reference folder, in a repository, so that it can be maintained later.

Let users open the app directly

Publish the app as described under Deploying an app and configure its security settings.

Once published, the app appears automatically on the DataMiner landing page for users with permission to access it, or you can share the app URL directly (optionally with a query parameter such as ?serviceId=... to preselect a specific object; otherwise users can pick the target element, service, or view in the app).

Use the visual overview in Cube

Publish the app, and embed the new app inside the existing visual overview during the transition to using the new app.

To embed the app in Visio:

  1. Add a full-page rectangle shape with the following shape data fields to the Visio drawing:

    • Link: #https://<DMAIP>/app/<app-ID>?embed

      • The leading # displays the app inside the shape (Linking a shape to a webpage).
      • <DMAIP> resolves dynamically to the certificate address, hostname, or IP address of the connected DataMiner Agent.
      • ?embed hides the DataMiner header bar inside the shape.
      • For a reusable Visio template where the app ID is stored in a custom property on the element, service, or view, use #https://<DMAIP>/app/[property:<PropertyName>]?embed and add ForcePropertyFromPage to Options.
    • Dock: Top|Bottom|Left|Right

      This stretches the embedded browser to fill the Cube card when the window is resized (Docking a shape).

    • Options: UseEdge|SingleSignOn|DisposeWebBrowserWhenNotSelectedPage=false

  2. To pass the target element, view, or service metadata into a generic app, append query parameters with Visio placeholders to the Link URL:

    • Universal (Element, View, and Service cards):

      #https://<DMAIP>/app/<app-ID>?embed&objectId=[This card objectID]&objectName=[This card object]
      

      [This card objectID] resolves to DmaID/ID for elements and services, or ViewID for views.

    • Type-specific placeholders:

      • Element cards: [this ElementID] (DmaID/ElementID) and [this element] (name), e.g., #https://<DMAIP>/app/<app-ID>?embed&elementId=[this ElementID].
      • View cards: [this ViewID] (ViewID) and [this view] (name), e.g., #https://<DMAIP>/app/<app-ID>?embed&viewId=[this ViewID].
      • Service cards: [this ServiceID] (DmaID/ServiceID) and [this service] (name), e.g., #https://<DMAIP>/app/<app-ID>?embed&serviceId=[this ServiceID].
      • Custom properties: [property:<PropertyName>] (with ForcePropertyFromPage in Options).
    Important

    Use [this ElementID] (with square brackets) rather than <ElementID> unless the shape itself also has an Element shape data field.

Note

Depending on the client and authentication setup, users may need to sign in again inside the embedded page. Test this with a regular user account before you roll it out.

Advanced search syntax