Below is an example of ALL the options available when defining a indicator widget. Some options are required, the options that are not required don't need to be defined unless something other than default is desired.
var ppf_widgets = {
example_indicator: { //Name of widget, must be unique within the ppf_widget definitions
data: 'v24',
datadepend: [],
ele: ['mos1'],
type: 3,
width: "125px",
height: "80px",
thrgood: ["#3a8312", "#ffffff"],
thrbad: ["#b21d1d", "#ffffff"],
throkay: ["#dbb43f", "#000000"],
textsize: "12px",
textweight: "normal",
textalign: "left",
margin: "7px",
cellpadding: "0px 0px 0px 10px", //top right bottom left
border: "",
metricsn: ['Outgoing MOS', 'Incoming MOS', 'Example', 'VoIP'],
metrics: ['voip.mos', 'voip.dmos', 'exp.(||voip.mos|| * ||voip.dmos||).toFixed(1)', 'sum|voip.dmos,voip.mos,voip.loss,voip.dloss,voip.djitter,voip.jitter'],
metricsubtitles: ['score', 'score', 'Calculation', 'Overall'],
depend: [[]]
}
}
Key | Value |
ele | Required. The element(s) defined here refer to HTML elements that should be present in the HTML page that pairs with the PPF. So, if the HTML element the table should appear in is
the ele definition would be
|
data | Required. Data refers to the data set name that should be used for the text. For example, if the following data set had been defined
The data value for the text would be...
|
datadepend |
If a widget is dependant on a certain data type then define a data dependency value. The format is an array. Common test types that can be defined are voip, act (which is Quality speed data), route, and capacity. |
type | Required. Text is type 3 and must be defined. When defined it should look like this
|
width | Width of the indicataors as they as they will appear on the page.
|
height | Height of the indicataors as they will appear on the page.
|
thrgood | This is an array of the background color (position 1) and text color (position 2) to be used for the indicator if the result is considered good, as determined by result thresholds set within MCS.
|
thrbad | This is an array of the background color (position 1) and text color (position 2) to be used for the indicator if the result is considered bad, as determined by result thresholds set within MCS.
|
throkay | This is an array of the background color (position 1) and text color (position 2) to be used for the indicator if the result is considered average, as determined by result thresholds set within MCS.
|
textsize |
Choose the text size to use for the headings, sub-headings, and results. |
textweight |
Text weight is how thin or bold a text will appear. Valid entries include thin, normal, and bold. The field also takes numerical values from 100-900 (thinest to boldest). |
textalign |
Determines the text alignment within the indicator. Valid entries are left, center, and right. |
margin |
The margin controls the distance between each indicator. As each metric specified in the widget appears as single indicator it's important to have a margin of more than 1px. |
cellpadding |
Padding creates space within the indicator. The padding setting applies to all three of the elements, heading, result, and sub-heading. The format is top, right, bottom, left, which allows different padding values to be used for different directions. |
border |
To add a border around the indicators enter a numerical value. |
depend | Click here for dependency information. |