Merge branch 'ent-6606-mostrar-descripcion-de-servicios-en-vista-de-arbol' into 'develop'
Use service description instead of name in tree view See merge request artica/pandorafms!3570
This commit is contained in:
commit
0a24fedb5a
|
@ -264,6 +264,7 @@ class TreeService extends Tree
|
|||
ts.id_agent_module,
|
||||
ts.name,
|
||||
ts.name as `alias`,
|
||||
ts.description as `description`,
|
||||
ts.id as `rootID`,
|
||||
"services" as `rootType`,
|
||||
"services" as `type`,
|
||||
|
@ -311,6 +312,7 @@ class TreeService extends Tree
|
|||
];
|
||||
$services[$service['id']]['name'] = $service['name'];
|
||||
$services[$service['id']]['id'] = $service['id'];
|
||||
$services[$service['id']]['description'] = $service['description'];
|
||||
$services[$service['id']]['serviceDetail'] = 'index.php?sec=network&sec2=enterprise/operation/services/services&tab=service_map&id_service='.(int) $service['id'];
|
||||
}
|
||||
|
||||
|
@ -512,6 +514,8 @@ class TreeService extends Tree
|
|||
$tmp['id'] = (int) $item->service()->id();
|
||||
$tmp['name'] = $item->service()->name();
|
||||
$tmp['alias'] = $item->service()->name();
|
||||
$tmp['description'] = $item->service()->description();
|
||||
$tmp['elementDescription'] = $item->description();
|
||||
|
||||
if ($this->connectedToNode === false
|
||||
&& is_metaconsole() === true
|
||||
|
@ -643,6 +647,8 @@ class TreeService extends Tree
|
|||
ts.id_agent_module,
|
||||
ts.name,
|
||||
ts.name as `alias`,
|
||||
ts.description as `description`,
|
||||
tse.description as `elementDescription`,
|
||||
tse.id_service as `rootID`,
|
||||
"services" as `rootType`,
|
||||
"services" as `type`,
|
||||
|
|
|
@ -637,7 +637,20 @@ var TreeController = {
|
|||
.css("cursor", "pointer");
|
||||
|
||||
$content.append($serviceDetailImage);
|
||||
$content.append(" " + element.name);
|
||||
if (
|
||||
typeof element.elementDescription !== "undefined" &&
|
||||
element.elementDescription != ""
|
||||
) {
|
||||
$content.append(" " + element.elementDescription);
|
||||
} else if (
|
||||
typeof element.description !== "undefined" &&
|
||||
element.description != ""
|
||||
) {
|
||||
$content.append(" " + element.description);
|
||||
} else {
|
||||
$content.append(" " + element.name);
|
||||
}
|
||||
// $content.append(" " + element.name);
|
||||
} else {
|
||||
$content.remove($node);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue