Fixed errors VC

This commit is contained in:
Daniel Barbero Martin 2020-01-20 17:46:52 +01:00
parent 3545e28581
commit 98ddf3c6ee
5 changed files with 79 additions and 5 deletions

View File

@ -1419,10 +1419,64 @@ function createOrUpdateVisualConsoleItem(
baseUrl,
item
) {
var title = "Create item " + item.itemProps.type;
if (item.itemProps.id) {
title = "Update item";
var nameType = "";
switch (item.itemProps.type) {
case 0:
nameType = "Static graph";
break;
case 1:
nameType = "Module graph";
break;
case 2:
nameType = "Simple Value";
break;
case 3:
nameType = "Percentile";
break;
case 4:
nameType = "Label";
break;
case 5:
nameType = "Icon";
break;
case 10:
nameType = "Service";
break;
case 11:
nameType = "Group";
break;
case 12:
nameType = "Box";
break;
case 13:
nameType = "Line";
break;
case 14:
nameType = "Events";
break;
case 17:
nameType = "Donut graph";
break;
case 18:
nameType = "Bars graph";
break;
case 19:
nameType = "Clock";
break;
case 20:
nameType = "Color Cloud";
break;
default:
nameType = "Static graph";
break;
}
var title = "Create item ";
if (item.itemProps.id) {
title = "Update item ";
}
title += nameType;
// var props = item.props || {};
/*
var elementsVc = visualConsole.elements

View File

@ -378,6 +378,10 @@ class View extends \HTML
$data['metaconsoleId'] = \get_parameter('metaconsoleId');
$data['moduleId'] = \get_parameter('moduleId');
$data['processValue'] = \get_parameter('processValue');
// Insert line default position ball end.
if ($itemId === 0 && empty($data['label']) === true) {
$data['label'] = '(_value_)';
}
break;
case PERCENTILE_BAR:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -113,6 +113,22 @@ export default class SimpleValue extends Item<SimpleValueProps> {
return element;
}
protected resizeElement(width: number, height: number): void {
console.log("estamos dentro del resize");
if (
this.elementRef.firstElementChild !== null &&
this.elementRef.firstElementChild.firstElementChild !== null
) {
console.log(this.elementRef.firstElementChild.firstElementChild);
console.log(
this.elementRef.firstElementChild.firstElementChild.getBoundingClientRect()
);
}
super.resizeElement(width, height);
}
/**
* @override Item.createLabelDomElement
* Create a new label for the visual console item.