New Export/Import pointHierarchy. [ScadaLTS]

New Export/Import pointHierarchy. [ScadaLTS]

526.png

Issue:
#526

The task involved:

  • Adding and configuring vuejs to incremental rewriting of user interface.
  • Adding REST API for export import.
  • Adding component vuejs in order to realize Export/Import (with progress bar and cancel button).
  • Programming the next stages of import.

How exports work

Export collects data witch create
array of folders with xid points in the following format.

  "folders": [
    {
      "parentXid": null,
      "name": "Test",
      "xidFolder": "DIR_1",
      "pointXids": [
        "DP_1",
        "DP_2"
      ]
    },
    {
      "parentXid": "DIR_1",
      "name": "Test",
      "xidFolder": "DIR_2",
      "pointXids": [
        "DP_3",
        "DP_4"
      ]
    }
   ...
  ]
}

How import works

Required fields: parentXid, name, xidFolder, pointXids.

Optional fields: toDelete: (true/false)

Examples of use:

  • Adding folder and moving it to the xid DIR_1 folder and moving DP_3, DP-4 points to xid DIR__NOT_EXIST folder witch will be created.
  "folders": [
        {
            "parentXid": "DIR_1",
             "name": "Test",
             "xidFolder": "DIR__NOT_EXIST", 
             "pointXids": [
                "DP_3",
                "DP_4"
              ]
        }
         ]
}
  • Deleting a folder:
  "folders": [
    {
        "parentXid": null,
         "name": "Test",
         "xidFolder": "DIR_1",
         "pointXids": [
          ],
        "toDelete":"true"
    }
    ]
    } 
  • Renaming the folder
  "folders": [
{
    "parentXid": null,
     "name": "Test_NEW_NAME",
     "xidFolder": "DIR_2",
     "pointXids": [
          ],
    "toDelete":"false"
}
]
} 
  • Moving points to pointXids: ["DP_1", "DP_2", "DP_3", "DP_4"] to folder o xidFolder: "DIR_2"
  "folders": [
{
    "parentXid": null,
     "name": "Test",
     "xidFolder": "DIR_2",
     "pointXids": [
        "DP_1",
         "DP_2", 
        "DP_3",
         "DP_4"
          ],
    "toDelete":"false"
}
]
}

Changes have come to pre realease version 0.0.9.5

https://github.com/SCADA-LTS/Scada-LTS/releases

Pull request:

https://github.com/SCADA-LTS/Scada-LTS/pull/643

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now