DashboardControlsAdd

Syntax

DashboardControl DashboardControlsAdd(string mon, DashboardControl arg)

Parameters

mon. Moniker for working with information panel controls.

arg. Settings of the created control.

Description

The DashboardControlsAdd operation creates an information panel control.

Comments

To execute the operation, in the mon field specify moniker of opened information panel instance with the !Controls postfix, and in the arg field specify settings of the created control. The moniker can be obtained on executing the OpenDashboard operation. The minimum required fields are arg.id (empty string can be specified) and arg.k (the -1 value can be specified). Default values will be generated for all the settings that were not determined.

The operation results in the settings of the created control.

Example

Below is the example of creating a new control. The request contains moniker for working with controls, empty identifier, and key. The response contains basic settings of the created control.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<DashboardControlsAdd xmlns="http://www.fsight.ru/PP.SOM.Som">
  <mon xmlns="">DDAHEFONHJEHGOAEEDLJNELPBEBAIMJEJILGKJKBBPLABDMK!M!S!PMAMCNGONHJEHGOAEGHJFDCONGPFPHECEDKMIJJCJCFJDMONM!Controls</mon>
<arg xmlns="">
  <k>-1</k>
  <id />
  </arg>
  </DashboardControlsAdd>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<DashboardControlsAddResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <k xmlns="">2</k>
  <id xmlns="">ITEM1</id>
<title xmlns="">
  <text>Control 1</text>
  <title>Control 1</title>
<font>
  <family>Roboto</family>
<style>
  <it>Regular</it>
  </style>
<size>
  <width>-1</width>
  <height>14</height>
  <units>Pt</units>
  </size>
  </font>
  <textColor>#54575B</textColor>
  <backgroundColor>#FFFFFF</backgroundColor>
  <textAlignment>Near</textAlignment>
  <verticalTextAlignment>Center</verticalTextAlignment>
<size>
  <width>-1</width>
  <height>8000</height>
  <units>Mkm</units>
  </size>
  <visible>1</visible>
  <htmlText><span style="font-weight: normal;font-size: 14pt;color: #54575b;background-color: #ffffff;text-align: left;font-family: Roboto; "><span style="color: #54575b;background-color: #ffffff;font-size: 14pt;font-weight: normal;font-family: Roboto; ">Control 1</span></span></htmlText>
  <htmlTitle><span style="font-weight: normal;font-size: 14pt;color: #54575b;background-color: #ffffff;text-align: left;font-family: Roboto; "><span style="color: #54575b;background-color: #ffffff;font-size: 14pt;font-weight: normal;font-family: Roboto; ">Control 1</span></span></htmlTitle>
  <isControl>1</isControl>
  <autoHeight>0</autoHeight>
  <customFormat F="" FT="0" />
  </title>
  <visualizerKey xmlns="">-1</visualizerKey>
  <fieldKey xmlns="">-1</fieldKey>
  <binding xmlns="" />
<slideKeys xmlns="">
  <u>1</u>
  <u>2</u>
  </slideKeys>
  <reciveKeys xmlns="" />
<font xmlns="">
  <family>Roboto</family>
<style>
  <it>Regular</it>
  </style>
<size>
  <width>-1</width>
  <height>14</height>
  <units>Pt</units>
  </size>
  </font>
  <textColor xmlns="">#54575B</textColor>
  <backgroundColor xmlns="">#FFFFFF</backgroundColor>
  </DashboardControlsAddResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"DashboardControlsAdd" :
{
"mon" : "DDAHEFONHJEHGOAEEDLJNELPBEBAIMJEJILGKJKBBPLABDMK!M!S!PMAMCNGONHJEHGOAEGHJFDCONGPFPHECEDKMIJJCJCFJDMONM!Controls",
"arg" :
{
"k" : "-1",
"id" : ""
}
}
}

JSON response:

{
"DashboardControlsAddResult" :
{
"k" : "2",
"id" : "ITEM1",
"title" :
{
"text" : "Control 1",
"title" : "Control 1",
"font" :
{
"family" : "Roboto",
"style" :
{
"it" : "Regular"
},
"size" :
{
"width" : "-1",
"height" : "14",
"units" : "Pt"
}
},
"textColor" : "#54575B",
"backgroundColor" : "#FFFFFF",
"textAlignment" : "Near",
"verticalTextAlignment" : "Center",
"size" :
{
"width" : "-1",
"height" : "8000",
"units" : "Mkm"
},
"visible" : "1",
"htmlText" : "<span style="font-weight: normal;font-size: 14pt;color: #54575b;background-color: #ffffff;text-align: left;font-family: Roboto; "><span style="color: #54575b;background-color: #ffffff;font-size: 14pt;font-weight: normal;font-family: Roboto; ">Control 1</span></span>",
"htmlTitle" : "<span style="font-weight: normal;font-size: 14pt;color: #54575b;background-color: #ffffff;text-align: left;font-family: Roboto; "><span style="color: #54575b;background-color: #ffffff;font-size: 14pt;font-weight: normal;font-family: Roboto; ">Control 1</span></span>",
"isControl" : "1",
"autoHeight" : "0",
"customFormat" :
{
"@F" : "",
"@FT" : "0"
}
},
"visualizerKey" : "4294967295",
"fieldKey" : "4294967295",
"binding" : "",
"slideKeys" :
{
"u" :
[
"1",
"2"
]
},
"reciveKeys" : "",
"font" :
{
"family" : "Roboto",
"style" :
{
"it" : "Regular"
},
"size" :
{
"width" : "-1",
"height" : "14",
"units" : "Pt"
}
},
"textColor" : "#54575B",
"backgroundColor" : "#FFFFFF"
}
}
public static DashboardControl DashboardControlsAdd(string moniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tAdd = new DashboardControlsAdd()
{
arg = new DashboardControl()
{
id = string.Empty,
k = uint.MaxValue
},
mon = moniker + "!Controls"
};
// Create a control in information panel
var result = somClient.DashboardControlsAdd(tAdd);
return result;
}

See also:

Working with Information Panels