mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-18 23:08:46 +02:00
Add audit fields
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
require_once(APPROOT.'/application/applicationcontext.class.inc.php');
|
||||
require_once(APPROOT.'/application/cmdbabstract.class.inc.php');
|
||||
require_once(APPROOT.'/application/displayblock.class.inc.php');
|
||||
require_once(APPROOT.'/application/audit.AuditFilterField.class.inc.php');
|
||||
require_once(APPROOT.'/application/audit.category.class.inc.php');
|
||||
require_once(APPROOT.'/application/audit.domain.class.inc.php');
|
||||
require_once(APPROOT.'/application/audit.rule.class.inc.php');
|
||||
|
||||
78
application/audit.AuditFilterField.class.inc.php
Normal file
78
application/audit.AuditFilterField.class.inc.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
// Copyright (C) 2010-2024 Combodo SAS
|
||||
//
|
||||
// This file is part of iTop.
|
||||
//
|
||||
// iTop is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// iTop is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||
use Combodo\iTop\Application\UI\Base\Component\Alert\AlertUIBlockFactory;
|
||||
use Combodo\iTop\Application\UI\Base\Component\Html\Html;
|
||||
|
||||
|
||||
/**
|
||||
* This class allow to define placeholder to be used in the audit "rule" and audit "category" OQL queries.
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2025 Combodo SAS
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
class AuditFilterField extends cmdbAbstractObject
|
||||
{
|
||||
public static function Init()
|
||||
{
|
||||
$aParams = array
|
||||
(
|
||||
"category" => "application,grant_by_profile",
|
||||
"key_type" => "autoincrement",
|
||||
"name_attcode" => "placeholder",
|
||||
"state_attcode" => "",
|
||||
"reconc_keys" => array('placeholder'),
|
||||
"db_table" => "priv_auditfilterfield",
|
||||
"db_key_field" => "id",
|
||||
"db_finalclass_field" => "",
|
||||
'style' => new ormStyle(null, null, null, null, null, '../images/icons/icons8-audit-filtre.svg'),
|
||||
);
|
||||
MetaModel::Init_Params($aParams);
|
||||
MetaModel::Init_AddAttribute(new AttributeString("placeholder", array("allowed_values" => null, "sql" => "placeholder", "default_value" => "", "is_null_allowed" => false, "depends_on" => array(), "validation_pattern"=>'^\w+$')));
|
||||
MetaModel::Init_AddAttribute(new AttributeString("label", array("allowed_values" => null, "sql" => "label", "default_value" => "", "is_null_allowed" => false, "depends_on" => array())));
|
||||
MetaModel::Init_AddAttribute(new AttributeOQL("oql", array("allowed_values" => null, "sql" => "oql", "default_value" => "", "is_null_allowed" => true, "depends_on" => array())));
|
||||
MetaModel::Init_AddAttribute(new AttributeString("values", array("allowed_values" => null, "sql" => "values", "default_value" => "", "is_null_allowed" => true, "depends_on" => array())));
|
||||
|
||||
// Display lists
|
||||
MetaModel::Init_SetZListItems('details', array('label', 'placeholder', 'oql', 'values')); // Attributes to be displayed for the complete details
|
||||
MetaModel::Init_SetZListItems('list', array('label', 'placeholder', 'oql','values')); // Attributes to be displayed for a list
|
||||
// Search criteria
|
||||
MetaModel::Init_SetZListItems('standard_search', array('label', 'placeholder')); // Criteria of the std search form
|
||||
MetaModel::Init_SetZListItems('default_search', array('label', 'placeholder')); // Criteria of the advanced search form
|
||||
}
|
||||
/**
|
||||
* @param WebPage $oPage
|
||||
* @return void
|
||||
* @throws ConfigException
|
||||
* @throws CoreException
|
||||
*/
|
||||
public static function DisplayListOfFields(WebPage $oPage): void
|
||||
{
|
||||
$sOQL = 'SELECT AuditFilterField';
|
||||
$oSearch = DBObjectSearch::FromOQL($sOQL);
|
||||
$oAuditFilterSet = new DBObjectSet($oSearch, array(), array());
|
||||
if ($oAuditFilterSet->Count()>0) {
|
||||
$sHtml = '<ul style="list-style: unset; padding-left: 20px;">';
|
||||
while ($oAuditFilter = $oAuditFilterSet->Fetch()) {
|
||||
$sHtml .= '<li><i>:' . $oAuditFilter->Get('placeholder') . '</i> for ' . $oAuditFilter->Get('label') . '</li>';
|
||||
}
|
||||
$sHtml .= '</ul>';
|
||||
$oPage->AddUiBlock(AlertUIBlockFactory::MakeForInformation('In OQL query, you can use this placeholders:', '')->AddSubBlock(new Html($sHtml)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,9 @@
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
use Combodo\iTop\Application\UI\Base\Component\Alert\AlertUIBlockFactory;
|
||||
use Combodo\iTop\Application\UI\Base\Component\Html\Html;
|
||||
|
||||
require_once(APPROOT.'/application/cmdbabstract.class.inc.php');
|
||||
|
||||
class AuditCategory extends cmdbAbstractObject
|
||||
@@ -92,5 +95,13 @@ class AuditCategory extends cmdbAbstractObject
|
||||
|
||||
return $aShortcutActions;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
public function DisplayBareProperties(WebPage $oPage, $bEditMode = false, $sPrefix = '', $aExtraParams = array())
|
||||
{
|
||||
AuditFilterField::DisplayListOfFields($oPage);
|
||||
$aFieldsMap = parent::DisplayBareProperties($oPage, $bEditMode, $sPrefix, $aExtraParams);;
|
||||
return $aFieldsMap;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -25,6 +25,7 @@
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
require_once(APPROOT.'/application/audit.AuditFilterField.class.inc.php');
|
||||
|
||||
/**
|
||||
* @since 3.1.0
|
||||
@@ -70,6 +71,36 @@ class AuditDomain extends cmdbAbstractObject
|
||||
|
||||
return $aShortcutActions;
|
||||
}
|
||||
public function GetDependentFields():array
|
||||
{
|
||||
$aListFields=[];
|
||||
foreach ($this->Get('categories_list') as $oLnkToCategory) {
|
||||
$aMatches = [];
|
||||
$oCategory = MetaModel::GetObject('AuditCategory', $oLnkToCategory->Get('category_id'));
|
||||
if (preg_match_all('/:\w+/', $oCategory->Get('definition_set'), $aMatches)) {
|
||||
foreach ($aMatches as $aMatchesList) {
|
||||
foreach ($aMatchesList as $sPlaceholder) {
|
||||
if (!in_array(substr($sPlaceholder, 1), $aListFields)) {
|
||||
$aListFields[] = substr($sPlaceholder, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach ($oCategory->Get('rules_list') as $oRule) {
|
||||
$aMatches = [];
|
||||
if (preg_match_all('/:\w+/', $oRule->Get('query'), $aMatches)) {
|
||||
foreach ($aMatches as $aMatchesList) {
|
||||
foreach ($aMatchesList as $sPlaceholder) {
|
||||
if (!in_array(substr($sPlaceholder, 1), $aListFields)) {
|
||||
$aListFields[] = substr($sPlaceholder, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $aListFields;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
use Combodo\iTop\Application\UI\Base\Component\Alert\AlertUIBlockFactory;
|
||||
use Combodo\iTop\Application\UI\Base\Component\Html\Html;
|
||||
|
||||
require_once(APPROOT.'/application/audit.category.class.inc.php');
|
||||
|
||||
class AuditRule extends cmdbAbstractObject
|
||||
@@ -71,5 +74,11 @@ class AuditRule extends cmdbAbstractObject
|
||||
|
||||
return $aShortcutActions;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
public function DisplayBareProperties(WebPage $oPage, $bEditMode = false, $sPrefix = '', $aExtraParams = array())
|
||||
{
|
||||
AuditFilterField::DisplayListOfFields($oPage);
|
||||
$aFieldsMap = parent::DisplayBareProperties($oPage, $bEditMode, $sPrefix, $aExtraParams);;
|
||||
return $aFieldsMap;
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,7 @@ MetaModel::IncludeModule('application/user.preferences.class.inc.php');
|
||||
MetaModel::IncludeModule('application/user.dashboard.class.inc.php');
|
||||
MetaModel::IncludeModule('application/audit.rule.class.inc.php');
|
||||
MetaModel::IncludeModule('application/audit.domain.class.inc.php');
|
||||
MetaModel::IncludeModule('application/audit.AuditFilterField.class.inc.php');
|
||||
MetaModel::IncludeModule('application/query.class.inc.php');
|
||||
MetaModel::IncludeModule('setup/moduleinstallation.class.inc.php');
|
||||
|
||||
|
||||
@@ -797,6 +797,19 @@
|
||||
<field id="friendlyname" xsi:type="AttributeFriendlyName"/>
|
||||
</fields>
|
||||
</class>
|
||||
<class id="AuditFilterField" _delta="define">
|
||||
<!-- Generated by toolkit/export-class-to-meta.php -->
|
||||
<parent>cmdbAbstractObject</parent>
|
||||
<properties>
|
||||
<category>application, grant_by_profile</category>
|
||||
</properties>
|
||||
<fields>
|
||||
<field id="placeholder" xsi:type="AttributeString"/>
|
||||
<field id="label" xsi:type="AttributeString"/>
|
||||
<field id="oql" xsi:type="AttributeOQL"/>
|
||||
<field id="values" xsi:type="AttributeString"/>
|
||||
</fields>
|
||||
</class>
|
||||
<class id="Query" _delta="define">
|
||||
<!-- Generated by toolkit/export-class-to-meta.php -->
|
||||
<parent>cmdbAbstractObject</parent>
|
||||
|
||||
@@ -100,3 +100,8 @@ $ibo-dashlet-badge--body--tooltip-title--margin-bottom: $ibo-spacing-500 !defaul
|
||||
@extend %ibo-font-weight-600;
|
||||
margin-bottom: $ibo-dashlet-badge--body--tooltip-title--margin-bottom;
|
||||
}
|
||||
|
||||
.ibo-dashlet-badge--disabled{
|
||||
cursor: not-allowed !important;
|
||||
color:$ibo-color-grey-300;
|
||||
}
|
||||
@@ -1,118 +1,142 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.3">
|
||||
<menus>
|
||||
<!-- Dashboard definitions cannot be defined directly in datamodel.application.xml, so they are here -->
|
||||
<menu id="WelcomeMenuPage" xsi:type="DashboardMenuNode" _delta="redefine">
|
||||
<rank>10</rank>
|
||||
<parent>WelcomeMenu</parent>
|
||||
<definition>
|
||||
<layout>DashboardLayoutOneCol</layout>
|
||||
<title>Menu:WelcomeMenuPage</title>
|
||||
<cells>
|
||||
<cell id="0">
|
||||
<rank>0</rank>
|
||||
<dashlets>
|
||||
<dashlet id="1" xsi:type="DashletHeaderStatic">
|
||||
<rank>0</rank>
|
||||
<title>Menu:ConfigManagementCI</title>
|
||||
<icon>../images/icons/icons8-database.svg</icon>
|
||||
</dashlet>
|
||||
<dashlet id="4" xsi:type="DashletBadge">
|
||||
<rank>3</rank>
|
||||
<class>Contact</class>
|
||||
</dashlet>
|
||||
<dashlet id="5" xsi:type="DashletBadge">
|
||||
<rank>4</rank>
|
||||
<class>Location</class>
|
||||
</dashlet>
|
||||
</dashlets>
|
||||
</cell>
|
||||
</cells>
|
||||
</definition>
|
||||
</menu>
|
||||
<menu id="AuditCategories" xsi:type="DashboardMenuNode" _delta="redefine">
|
||||
<rank>20</rank>
|
||||
<parent>AdminTools</parent>
|
||||
<definition>
|
||||
<layout>DashboardLayoutThreeCols</layout>
|
||||
<title>Menu:AuditCategories:Title</title>
|
||||
<cells>
|
||||
<cell id="0">
|
||||
<rank>0</rank>
|
||||
<dashlets>
|
||||
<dashlet id="AuditConfiguration_row0_col0_1" xsi:type="DashletPlainText">
|
||||
<rank>0</rank>
|
||||
<text>Class:AuditDomain+</text>
|
||||
</dashlet>
|
||||
<dashlet id="AuditConfiguration_row0_col0_2" xsi:type="DashletBadge">
|
||||
<rank>1</rank>
|
||||
<class>AuditDomain</class>
|
||||
</dashlet>
|
||||
</dashlets>
|
||||
</cell>
|
||||
<cell id="1">
|
||||
<rank>1</rank>
|
||||
<dashlets>
|
||||
<dashlet id="AuditConfiguration_row0_col1_1" xsi:type="DashletPlainText">
|
||||
<rank>0</rank>
|
||||
<text>Class:AuditCategory+</text>
|
||||
</dashlet>
|
||||
<dashlet id="AuditConfiguration_row0_col1_2" xsi:type="DashletBadge">
|
||||
<rank>1</rank>
|
||||
<class>AuditCategory</class>
|
||||
</dashlet>
|
||||
</dashlets>
|
||||
</cell>
|
||||
<cell id="2">
|
||||
<rank>2</rank>
|
||||
<dashlets>
|
||||
<dashlet id="AuditConfiguration_row0_col2_1" xsi:type="DashletPlainText">
|
||||
<rank>0</rank>
|
||||
<text>Class:AuditRule+</text>
|
||||
</dashlet>
|
||||
<dashlet id="AuditConfiguration_row0_col2_2" xsi:type="DashletBadge">
|
||||
<rank>1</rank>
|
||||
<class>AuditRule</class>
|
||||
</dashlet>
|
||||
</dashlets>
|
||||
</cell>
|
||||
<cell id="3">
|
||||
<rank>3</rank>
|
||||
<dashlets>
|
||||
<dashlet id="AuditConfiguration_row1_col0_1" xsi:type="DashletObjectList">
|
||||
<rank>0</rank>
|
||||
<title>Class:AuditDomain</title>
|
||||
<query>SELECT AuditDomain</query>
|
||||
<menu>true</menu>
|
||||
</dashlet>
|
||||
</dashlets>
|
||||
</cell>
|
||||
<cell id="4">
|
||||
<rank>4</rank>
|
||||
<dashlets>
|
||||
<dashlet id="AuditConfiguration_row1_col1_1" xsi:type="DashletObjectList">
|
||||
<rank>0</rank>
|
||||
<title>Class:AuditCategory</title>
|
||||
<query>SELECT AuditCategory</query>
|
||||
<menu>true</menu>
|
||||
</dashlet>
|
||||
</dashlets>
|
||||
</cell>
|
||||
<cell id="5">
|
||||
<rank>5</rank>
|
||||
<dashlets>
|
||||
<dashlet id="AuditConfiguration_row1_col2_1" xsi:type="DashletObjectList">
|
||||
<rank>0</rank>
|
||||
<title>Class:AuditRule</title>
|
||||
<query>SELECT AuditRule</query>
|
||||
<menu>true</menu>
|
||||
</dashlet>
|
||||
</dashlets>
|
||||
</cell>
|
||||
</cells>
|
||||
</definition>
|
||||
<enable_class>AuditCategory</enable_class>
|
||||
<enable_action>UR_ACTION_MODIFY</enable_action>
|
||||
</menu>
|
||||
</menus>
|
||||
<menus>
|
||||
<!-- Dashboard definitions cannot be defined directly in datamodel.application.xml, so they are here -->
|
||||
<menu id="WelcomeMenuPage" xsi:type="DashboardMenuNode" _delta="redefine">
|
||||
<rank>10</rank>
|
||||
<parent>WelcomeMenu</parent>
|
||||
<definition>
|
||||
<layout>DashboardLayoutOneCol</layout>
|
||||
<title>Menu:WelcomeMenuPage</title>
|
||||
<cells>
|
||||
<cell id="0">
|
||||
<rank>0</rank>
|
||||
<dashlets>
|
||||
<dashlet id="1" xsi:type="DashletHeaderStatic">
|
||||
<rank>0</rank>
|
||||
<title>Menu:ConfigManagementCI</title>
|
||||
<icon>../images/icons/icons8-database.svg</icon>
|
||||
</dashlet>
|
||||
<dashlet id="4" xsi:type="DashletBadge">
|
||||
<rank>3</rank>
|
||||
<class>Contact</class>
|
||||
</dashlet>
|
||||
<dashlet id="5" xsi:type="DashletBadge">
|
||||
<rank>4</rank>
|
||||
<class>Location</class>
|
||||
</dashlet>
|
||||
</dashlets>
|
||||
</cell>
|
||||
</cells>
|
||||
</definition>
|
||||
</menu>
|
||||
<menu id="AuditCategories" xsi:type="DashboardMenuNode" _delta="redefine">
|
||||
<rank>20</rank>
|
||||
<parent>AdminTools</parent>
|
||||
<definition>
|
||||
<layout>DashboardLayoutTwoCols</layout>
|
||||
<title>Menu:AuditCategories:Title</title>
|
||||
<cells>
|
||||
<cell id="0">
|
||||
<rank>0</rank>
|
||||
<dashlets>
|
||||
<dashlet id="AuditConfiguration_row0_col0_1" xsi:type="DashletPlainText">
|
||||
<rank>0</rank>
|
||||
<text>Class:AuditDomain+</text>
|
||||
</dashlet>
|
||||
<dashlet id="AuditConfiguration_row0_col0_2" xsi:type="DashletBadge">
|
||||
<rank>1</rank>
|
||||
<class>AuditDomain</class>
|
||||
</dashlet>
|
||||
</dashlets>
|
||||
</cell>
|
||||
<cell id="1">
|
||||
<rank>1</rank>
|
||||
<dashlets>
|
||||
<dashlet id="AuditConfiguration_row0_col1_1" xsi:type="DashletPlainText">
|
||||
<rank>0</rank>
|
||||
<text>Class:AuditCategory+</text>
|
||||
</dashlet>
|
||||
<dashlet id="AuditConfiguration_row0_col1_2" xsi:type="DashletBadge">
|
||||
<rank>1</rank>
|
||||
<class>AuditCategory</class>
|
||||
</dashlet>
|
||||
</dashlets>
|
||||
</cell>
|
||||
<cell id="2">
|
||||
<rank>2</rank>
|
||||
<dashlets>
|
||||
<dashlet id="AuditConfiguration_row1_col0_1" xsi:type="DashletObjectList">
|
||||
<rank>0</rank>
|
||||
<title>Class:AuditDomain</title>
|
||||
<query>SELECT AuditDomain</query>
|
||||
<menu>true</menu>
|
||||
</dashlet>
|
||||
</dashlets>
|
||||
</cell>
|
||||
<cell id="3">
|
||||
<rank>3</rank>
|
||||
<dashlets>
|
||||
<dashlet id="AuditConfiguration_row1_col1_1" xsi:type="DashletObjectList">
|
||||
<rank>0</rank>
|
||||
<title>Class:AuditCategory</title>
|
||||
<query>SELECT AuditCategory</query>
|
||||
<menu>true</menu>
|
||||
</dashlet>
|
||||
</dashlets>
|
||||
</cell>
|
||||
<cell id="4">
|
||||
<rank>4</rank>
|
||||
<dashlets>
|
||||
<dashlet id="AuditConfiguration_row2_col1_1" xsi:type="DashletPlainText">
|
||||
<rank>0</rank>
|
||||
<text>Class:AuditRule+</text>
|
||||
</dashlet>
|
||||
<dashlet id="AuditConfiguration_row2_col1_2" xsi:type="DashletBadge">
|
||||
<rank>1</rank>
|
||||
<class>AuditRule</class>
|
||||
</dashlet>
|
||||
</dashlets>
|
||||
</cell>
|
||||
<cell id="5">
|
||||
<rank>5</rank>
|
||||
<dashlets>
|
||||
<dashlet id="AuditConfiguration_row2_col2_1" xsi:type="DashletPlainText">
|
||||
<rank>0</rank>
|
||||
<text>Class:AuditFilterField+</text>
|
||||
</dashlet>
|
||||
<dashlet id="AuditConfiguration_row2_col2_2" xsi:type="DashletBadge">
|
||||
<rank>1</rank>
|
||||
<class>AuditFilterField</class>
|
||||
</dashlet>
|
||||
</dashlets>
|
||||
</cell>
|
||||
<cell id="6">
|
||||
<rank>6</rank>
|
||||
<dashlets>
|
||||
<dashlet id="AuditConfiguration_row3_col1_1" xsi:type="DashletObjectList">
|
||||
<rank>0</rank>
|
||||
<title>Class:AuditFilterField</title>
|
||||
<query>SELECT AuditFilterField</query>
|
||||
<menu>true</menu>
|
||||
</dashlet>
|
||||
</dashlets>
|
||||
</cell>
|
||||
<cell id="7">
|
||||
<rank>7</rank>
|
||||
<dashlets>
|
||||
<dashlet id="AuditConfiguration_row3_col2_1" xsi:type="DashletObjectList">
|
||||
<rank>0</rank>
|
||||
<title>Class:AuditRule</title>
|
||||
<query>SELECT AuditRule</query>
|
||||
<menu>true</menu>
|
||||
</dashlet>
|
||||
</dashlets>
|
||||
</cell>
|
||||
</cells>
|
||||
</definition>
|
||||
<enable_class>AuditCategory</enable_class>
|
||||
<enable_action>UR_ACTION_MODIFY</enable_action>
|
||||
</menu>
|
||||
</menus>
|
||||
</itop_design>
|
||||
|
||||
@@ -6,6 +6,23 @@
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*/
|
||||
|
||||
//
|
||||
// Class: AuditFilterField
|
||||
//
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
'Class:AuditFilterField' => 'Audit Filter Fields~~',
|
||||
'Class:AuditFilterField+' => 'In Audit rules and Audit categories you can use Filter Fields defined here.~~',
|
||||
'Class:AuditCategory/Attribute:label' => 'Label~~',
|
||||
'Class:AuditCategory/Attribute:label+' => 'Label for select field~~',
|
||||
'Class:AuditCategory/Attribute:placeholder' => 'Placeholder~~',
|
||||
'Class:AuditCategory/Attribute:placeholder+' => 'The field can be used in Audit rules and Audit categories requests~~',
|
||||
'Class:AuditCategory/Attribute:oql' => 'Query for select~~',
|
||||
'Class:AuditCategory/Attribute:oql+' => 'OQL query defining the set of objects to be selected in audit rules and audit categories~~',
|
||||
'Class:AuditCategory/Attribute:values' => 'List of avalaible values~~',
|
||||
'Class:AuditCategory/Attribute:values+' => ' defining the list of values to be selected in audit rules and audit categories~~',
|
||||
));
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -6,6 +6,24 @@
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*/
|
||||
|
||||
//
|
||||
// Class: AuditFilterField
|
||||
//
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
'Class:AuditFilterField' => 'Audit Filter Fields~~',
|
||||
'Class:AuditFilterField+' => 'In Audit rules and Audit categories you can use Filter Fields defined here.~~',
|
||||
'Class:AuditCategory/Attribute:label' => 'Label~~',
|
||||
'Class:AuditCategory/Attribute:label+' => 'Label for select field~~',
|
||||
'Class:AuditCategory/Attribute:placeholder' => 'Placeholder~~',
|
||||
'Class:AuditCategory/Attribute:placeholder+' => 'The field can be used in Audit rules and Audit categories requests~~',
|
||||
'Class:AuditCategory/Attribute:oql' => 'Query for select~~',
|
||||
'Class:AuditCategory/Attribute:oql+' => 'OQL query defining the set of objects to be selected in audit rules and audit categories~~',
|
||||
'Class:AuditCategory/Attribute:values' => 'List of avalaible values~~',
|
||||
'Class:AuditCategory/Attribute:values+' => ' defining the list of values to be selected in audit rules and audit categories~~',
|
||||
));
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -6,6 +6,24 @@
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*/
|
||||
|
||||
//
|
||||
// Class: AuditFilterField
|
||||
//
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
'Class:AuditFilterField' => 'Audit Filter Fields~~',
|
||||
'Class:AuditFilterField+' => 'In Audit rules and Audit categories you can use Filter Fields defined here.~~',
|
||||
'Class:AuditCategory/Attribute:label' => 'Label~~',
|
||||
'Class:AuditCategory/Attribute:label+' => 'Label for select field~~',
|
||||
'Class:AuditCategory/Attribute:placeholder' => 'Placeholder~~',
|
||||
'Class:AuditCategory/Attribute:placeholder+' => 'The field can be used in Audit rules and Audit categories requests~~',
|
||||
'Class:AuditCategory/Attribute:oql' => 'Query for select~~',
|
||||
'Class:AuditCategory/Attribute:oql+' => 'OQL query defining the set of objects to be selected in audit rules and audit categories~~',
|
||||
'Class:AuditCategory/Attribute:values' => 'List of avalaible values~~',
|
||||
'Class:AuditCategory/Attribute:values+' => ' defining the list of values to be selected in audit rules and audit categories~~',
|
||||
));
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -15,6 +15,23 @@
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
//
|
||||
// Class: AuditFilterField
|
||||
//
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
'Class:AuditFilterField' => 'Audit Filter Fields',
|
||||
'Class:AuditFilterField+' => 'In Audit rules and Audit categories you can use Filter Fields defined here.',
|
||||
'Class:AuditCategory/Attribute:label' => 'Label',
|
||||
'Class:AuditCategory/Attribute:label+' => 'Label for select field',
|
||||
'Class:AuditCategory/Attribute:placeholder' => 'Placeholder',
|
||||
'Class:AuditCategory/Attribute:placeholder+' => 'The field can be used in Audit rules and Audit categories requests',
|
||||
'Class:AuditCategory/Attribute:oql' => 'Query for select',
|
||||
'Class:AuditCategory/Attribute:oql+' => 'OQL query defining the set of objects to be selected in audit rules and audit categories',
|
||||
'Class:AuditCategory/Attribute:values' => 'List of avalaible values',
|
||||
'Class:AuditCategory/Attribute:values+' => ' defining the list of values to be selected in audit rules and audit categories',
|
||||
));
|
||||
|
||||
//
|
||||
// Class: AuditCategory
|
||||
//
|
||||
|
||||
@@ -15,6 +15,24 @@
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
//
|
||||
// Class: AuditFilterField
|
||||
//
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
'Class:AuditFilterField' => 'Audit Filter Fields~~',
|
||||
'Class:AuditFilterField+' => 'In Audit rules and Audit categories you can use Filter Fields defined here.~~',
|
||||
'Class:AuditCategory/Attribute:label' => 'Label~~',
|
||||
'Class:AuditCategory/Attribute:label+' => 'Label for select field~~',
|
||||
'Class:AuditCategory/Attribute:placeholder' => 'Placeholder~~',
|
||||
'Class:AuditCategory/Attribute:placeholder+' => 'The field can be used in Audit rules and Audit categories requests~~',
|
||||
'Class:AuditCategory/Attribute:oql' => 'Query for select~~',
|
||||
'Class:AuditCategory/Attribute:oql+' => 'OQL query defining the set of objects to be selected in audit rules and audit categories~~',
|
||||
'Class:AuditCategory/Attribute:values' => 'List of avalaible values~~',
|
||||
'Class:AuditCategory/Attribute:values+' => ' defining the list of values to be selected in audit rules and audit categories~~',
|
||||
));
|
||||
|
||||
|
||||
//
|
||||
// Class: AuditCategory
|
||||
//
|
||||
|
||||
@@ -7,7 +7,28 @@
|
||||
* @author Miguel Turrubiates <miguel_tf@yahoo.com>
|
||||
* @notas Utilizar codificación UTF-8 para mostrar acentos y otros caracteres especiales
|
||||
*/
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
//
|
||||
// Class: AuditFilterField
|
||||
//
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
'Class:AuditFilterField' => 'Audit Filter Fields~~',
|
||||
'Class:AuditFilterField+' => 'In Audit rules and Audit categories you can use Filter Fields defined here.~~',
|
||||
'Class:AuditCategory/Attribute:label' => 'Label~~',
|
||||
'Class:AuditCategory/Attribute:label+' => 'Label for select field~~',
|
||||
'Class:AuditCategory/Attribute:placeholder' => 'Placeholder~~',
|
||||
'Class:AuditCategory/Attribute:placeholder+' => 'The field can be used in Audit rules and Audit categories requests~~',
|
||||
'Class:AuditCategory/Attribute:oql' => 'Query for select~~',
|
||||
'Class:AuditCategory/Attribute:oql+' => 'OQL query defining the set of objects to be selected in audit rules and audit categories~~',
|
||||
'Class:AuditCategory/Attribute:values' => 'List of avalaible values~~',
|
||||
'Class:AuditCategory/Attribute:values+' => ' defining the list of values to be selected in audit rules and audit categories~~',
|
||||
));
|
||||
|
||||
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', [
|
||||
'BooleanLabel:no' => 'No',
|
||||
'BooleanLabel:yes' => 'Si',
|
||||
'Calendar-FirstDayOfWeek' => '0',
|
||||
'Class:AuditCategory' => 'Auditoría de Categorías',
|
||||
'Class:AuditCategory+' => 'Auditoría de Categorías',
|
||||
'Class:AuditCategory/Attribute:name' => 'Nombre de Categoría',
|
||||
|
||||
@@ -6,6 +6,24 @@
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*/
|
||||
//
|
||||
// Class: AuditFilterField
|
||||
//
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
'Class:AuditFilterField' => 'Filtre pour les audits',
|
||||
'Class:AuditFilterField+' => 'Dans les Périmètres et les règles d\'audit, vous pouvez utiliser les filtres définis ici pour limiter les objets audités',
|
||||
'Class:AuditCategory/Attribute:label' => 'Libellé',
|
||||
'Class:AuditCategory/Attribute:label+' => 'Libellé affiché dans l\'écran d\audit',
|
||||
'Class:AuditCategory/Attribute:placeholder' => 'Nom de la variable',
|
||||
'Class:AuditCategory/Attribute:placeholder+' => 'Nom de la variable utilisé dans les requêtes des Périmètres et des règles d\'audit',
|
||||
'Class:AuditCategory/Attribute:oql' => 'Query for select~~',
|
||||
'Class:AuditCategory/Attribute:oql+' => 'OQL query defining the set of objects to be selected in audit rules and audit categories~~',
|
||||
'Class:AuditCategory/Attribute:values' => 'List of avalaible values~~',
|
||||
'Class:AuditCategory/Attribute:values+' => ' defining the list of values to be selected in audit rules and audit categories~~',
|
||||
));
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -6,6 +6,24 @@
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*/
|
||||
//
|
||||
// Class: AuditFilterField
|
||||
//
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
'Class:AuditFilterField' => 'Audit Filter Fields~~',
|
||||
'Class:AuditFilterField+' => 'In Audit rules and Audit categories you can use Filter Fields defined here.~~',
|
||||
'Class:AuditCategory/Attribute:label' => 'Label~~',
|
||||
'Class:AuditCategory/Attribute:label+' => 'Label for select field~~',
|
||||
'Class:AuditCategory/Attribute:placeholder' => 'Placeholder~~',
|
||||
'Class:AuditCategory/Attribute:placeholder+' => 'The field can be used in Audit rules and Audit categories requests~~',
|
||||
'Class:AuditCategory/Attribute:oql' => 'Query for select~~',
|
||||
'Class:AuditCategory/Attribute:oql+' => 'OQL query defining the set of objects to be selected in audit rules and audit categories~~',
|
||||
'Class:AuditCategory/Attribute:values' => 'List of avalaible values~~',
|
||||
'Class:AuditCategory/Attribute:values+' => ' defining the list of values to be selected in audit rules and audit categories~~',
|
||||
));
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -6,6 +6,24 @@
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*/
|
||||
//
|
||||
// Class: AuditFilterField
|
||||
//
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
'Class:AuditFilterField' => 'Audit Filter Fields~~',
|
||||
'Class:AuditFilterField+' => 'In Audit rules and Audit categories you can use Filter Fields defined here.~~',
|
||||
'Class:AuditCategory/Attribute:label' => 'Label~~',
|
||||
'Class:AuditCategory/Attribute:label+' => 'Label for select field~~',
|
||||
'Class:AuditCategory/Attribute:placeholder' => 'Placeholder~~',
|
||||
'Class:AuditCategory/Attribute:placeholder+' => 'The field can be used in Audit rules and Audit categories requests~~',
|
||||
'Class:AuditCategory/Attribute:oql' => 'Query for select~~',
|
||||
'Class:AuditCategory/Attribute:oql+' => 'OQL query defining the set of objects to be selected in audit rules and audit categories~~',
|
||||
'Class:AuditCategory/Attribute:values' => 'List of avalaible values~~',
|
||||
'Class:AuditCategory/Attribute:values+' => ' defining the list of values to be selected in audit rules and audit categories~~',
|
||||
));
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,29 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
|
||||
//
|
||||
// Class: AuditFilterField
|
||||
//
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
'Class:AuditFilterField' => 'Audit Filter Fields~~',
|
||||
'Class:AuditFilterField+' => 'In Audit rules and Audit categories you can use Filter Fields defined here.~~',
|
||||
'Class:AuditCategory/Attribute:label' => 'Label~~',
|
||||
'Class:AuditCategory/Attribute:label+' => 'Label for select field~~',
|
||||
'Class:AuditCategory/Attribute:placeholder' => 'Placeholder~~',
|
||||
'Class:AuditCategory/Attribute:placeholder+' => 'The field can be used in Audit rules and Audit categories requests~~',
|
||||
'Class:AuditCategory/Attribute:oql' => 'Query for select~~',
|
||||
'Class:AuditCategory/Attribute:oql+' => 'OQL query defining the set of objects to be selected in audit rules and audit categories~~',
|
||||
'Class:AuditCategory/Attribute:values' => 'List of avalaible values~~',
|
||||
'Class:AuditCategory/Attribute:values+' => ' defining the list of values to be selected in audit rules and audit categories~~',
|
||||
));
|
||||
|
||||
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', [
|
||||
'BooleanLabel:no' => 'いいえ',
|
||||
'BooleanLabel:yes' => 'はい',
|
||||
'Calendar-FirstDayOfWeek' => '0~~',
|
||||
'Class:AuditCategory' => '監査カテゴリ',
|
||||
'Class:AuditCategory+' => '監査全体の内部セクション',
|
||||
'Class:AuditCategory/Attribute:name' => 'カテゴリ名',
|
||||
@@ -26,7 +48,7 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
'Class:AuditCategory/Attribute:warning_error_tolerance+' => 'Percentage of invalid objects below which the result is in error (red)~~',
|
||||
'Class:AuditCategory/Attribute:domains_list' => 'Domains~~',
|
||||
'Class:AuditCategory/Attribute:domains_list+' => 'Domains which include this category~~',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: AuditRule
|
||||
|
||||
@@ -6,6 +6,25 @@
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*/
|
||||
//
|
||||
// Class: AuditFilterField
|
||||
//
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
'Class:AuditFilterField' => 'Audit Filter Fields~~',
|
||||
'Class:AuditFilterField+' => 'In Audit rules and Audit categories you can use Filter Fields defined here.~~',
|
||||
'Class:AuditCategory/Attribute:label' => 'Label~~',
|
||||
'Class:AuditCategory/Attribute:label+' => 'Label for select field~~',
|
||||
'Class:AuditCategory/Attribute:placeholder' => 'Placeholder~~',
|
||||
'Class:AuditCategory/Attribute:placeholder+' => 'The field can be used in Audit rules and Audit categories requests~~',
|
||||
'Class:AuditCategory/Attribute:oql' => 'Query for select~~',
|
||||
'Class:AuditCategory/Attribute:oql+' => 'OQL query defining the set of objects to be selected in audit rules and audit categories~~',
|
||||
'Class:AuditCategory/Attribute:values' => 'List of avalaible values~~',
|
||||
'Class:AuditCategory/Attribute:values+' => ' defining the list of values to be selected in audit rules and audit categories~~',
|
||||
));
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author Thomas Casteleyn <thomas.casteleyn@super-visions.com>
|
||||
*/
|
||||
|
||||
@@ -6,6 +6,24 @@
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*/
|
||||
//
|
||||
// Class: AuditFilterField
|
||||
//
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
'Class:AuditFilterField' => 'Audit Filter Fields~~',
|
||||
'Class:AuditFilterField+' => 'In Audit rules and Audit categories you can use Filter Fields defined here.~~',
|
||||
'Class:AuditCategory/Attribute:label' => 'Label~~',
|
||||
'Class:AuditCategory/Attribute:label+' => 'Label for select field~~',
|
||||
'Class:AuditCategory/Attribute:placeholder' => 'Placeholder~~',
|
||||
'Class:AuditCategory/Attribute:placeholder+' => 'The field can be used in Audit rules and Audit categories requests~~',
|
||||
'Class:AuditCategory/Attribute:oql' => 'Query for select~~',
|
||||
'Class:AuditCategory/Attribute:oql+' => 'OQL query defining the set of objects to be selected in audit rules and audit categories~~',
|
||||
'Class:AuditCategory/Attribute:values' => 'List of avalaible values~~',
|
||||
'Class:AuditCategory/Attribute:values+' => ' defining the list of values to be selected in audit rules and audit categories~~',
|
||||
));
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -6,6 +6,24 @@
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*/
|
||||
//
|
||||
// Class: AuditFilterField
|
||||
//
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
'Class:AuditFilterField' => 'Audit Filter Fields~~',
|
||||
'Class:AuditFilterField+' => 'In Audit rules and Audit categories you can use Filter Fields defined here.~~',
|
||||
'Class:AuditCategory/Attribute:label' => 'Label~~',
|
||||
'Class:AuditCategory/Attribute:label+' => 'Label for select field~~',
|
||||
'Class:AuditCategory/Attribute:placeholder' => 'Placeholder~~',
|
||||
'Class:AuditCategory/Attribute:placeholder+' => 'The field can be used in Audit rules and Audit categories requests~~',
|
||||
'Class:AuditCategory/Attribute:oql' => 'Query for select~~',
|
||||
'Class:AuditCategory/Attribute:oql+' => 'OQL query defining the set of objects to be selected in audit rules and audit categories~~',
|
||||
'Class:AuditCategory/Attribute:values' => 'List of avalaible values~~',
|
||||
'Class:AuditCategory/Attribute:values+' => ' defining the list of values to be selected in audit rules and audit categories~~',
|
||||
));
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -6,6 +6,24 @@
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*/
|
||||
//
|
||||
// Class: AuditFilterField
|
||||
//
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
'Class:AuditFilterField' => 'Audit Filter Fields~~',
|
||||
'Class:AuditFilterField+' => 'In Audit rules and Audit categories you can use Filter Fields defined here.~~',
|
||||
'Class:AuditCategory/Attribute:label' => 'Label~~',
|
||||
'Class:AuditCategory/Attribute:label+' => 'Label for select field~~',
|
||||
'Class:AuditCategory/Attribute:placeholder' => 'Placeholder~~',
|
||||
'Class:AuditCategory/Attribute:placeholder+' => 'The field can be used in Audit rules and Audit categories requests~~',
|
||||
'Class:AuditCategory/Attribute:oql' => 'Query for select~~',
|
||||
'Class:AuditCategory/Attribute:oql+' => 'OQL query defining the set of objects to be selected in audit rules and audit categories~~',
|
||||
'Class:AuditCategory/Attribute:values' => 'List of avalaible values~~',
|
||||
'Class:AuditCategory/Attribute:values+' => ' defining the list of values to be selected in audit rules and audit categories~~',
|
||||
));
|
||||
|
||||
|
||||
/**
|
||||
* @author Vladimir Kunin <v.b.kunin@gmail.com>
|
||||
*
|
||||
|
||||
@@ -6,6 +6,24 @@
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*/
|
||||
//
|
||||
// Class: AuditFilterField
|
||||
//
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
'Class:AuditFilterField' => 'Audit Filter Fields~~',
|
||||
'Class:AuditFilterField+' => 'In Audit rules and Audit categories you can use Filter Fields defined here.~~',
|
||||
'Class:AuditCategory/Attribute:label' => 'Label~~',
|
||||
'Class:AuditCategory/Attribute:label+' => 'Label for select field~~',
|
||||
'Class:AuditCategory/Attribute:placeholder' => 'Placeholder~~',
|
||||
'Class:AuditCategory/Attribute:placeholder+' => 'The field can be used in Audit rules and Audit categories requests~~',
|
||||
'Class:AuditCategory/Attribute:oql' => 'Query for select~~',
|
||||
'Class:AuditCategory/Attribute:oql+' => 'OQL query defining the set of objects to be selected in audit rules and audit categories~~',
|
||||
'Class:AuditCategory/Attribute:values' => 'List of avalaible values~~',
|
||||
'Class:AuditCategory/Attribute:values+' => ' defining the list of values to be selected in audit rules and audit categories~~',
|
||||
));
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -6,6 +6,24 @@
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*/
|
||||
//
|
||||
// Class: AuditFilterField
|
||||
//
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
'Class:AuditFilterField' => 'Audit Filter Fields~~',
|
||||
'Class:AuditFilterField+' => 'In Audit rules and Audit categories you can use Filter Fields defined here.~~',
|
||||
'Class:AuditCategory/Attribute:label' => 'Label~~',
|
||||
'Class:AuditCategory/Attribute:label+' => 'Label for select field~~',
|
||||
'Class:AuditCategory/Attribute:placeholder' => 'Placeholder~~',
|
||||
'Class:AuditCategory/Attribute:placeholder+' => 'The field can be used in Audit rules and Audit categories requests~~',
|
||||
'Class:AuditCategory/Attribute:oql' => 'Query for select~~',
|
||||
'Class:AuditCategory/Attribute:oql+' => 'OQL query defining the set of objects to be selected in audit rules and audit categories~~',
|
||||
'Class:AuditCategory/Attribute:values' => 'List of avalaible values~~',
|
||||
'Class:AuditCategory/Attribute:values+' => ' defining the list of values to be selected in audit rules and audit categories~~',
|
||||
));
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -6,6 +6,24 @@
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*/
|
||||
//
|
||||
// Class: AuditFilterField
|
||||
//
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
'Class:AuditFilterField' => 'Audit Filter Fields~~',
|
||||
'Class:AuditFilterField+' => 'In Audit rules and Audit categories you can use Filter Fields defined here.~~',
|
||||
'Class:AuditCategory/Attribute:label' => 'Label~~',
|
||||
'Class:AuditCategory/Attribute:label+' => 'Label for select field~~',
|
||||
'Class:AuditCategory/Attribute:placeholder' => 'Placeholder~~',
|
||||
'Class:AuditCategory/Attribute:placeholder+' => 'The field can be used in Audit rules and Audit categories requests~~',
|
||||
'Class:AuditCategory/Attribute:oql' => 'Query for select~~',
|
||||
'Class:AuditCategory/Attribute:oql+' => 'OQL query defining the set of objects to be selected in audit rules and audit categories~~',
|
||||
'Class:AuditCategory/Attribute:values' => 'List of avalaible values~~',
|
||||
'Class:AuditCategory/Attribute:values+' => ' defining the list of values to be selected in audit rules and audit categories~~',
|
||||
));
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
221
pages/audit.php
221
pages/audit.php
@@ -11,7 +11,6 @@ use Combodo\iTop\Application\UI\Base\Component\Dashlet\DashletFactory;
|
||||
use Combodo\iTop\Application\UI\Base\Component\DataTable\DataTableUIBlockFactory;
|
||||
use Combodo\iTop\Application\UI\Base\Component\Field\FieldUIBlockFactory;
|
||||
use Combodo\iTop\Application\UI\Base\Component\Html\Html;
|
||||
use Combodo\iTop\Application\UI\Base\Component\Input\InputUIBlockFactory;
|
||||
use Combodo\iTop\Application\UI\Base\Component\Input\Select\SelectOptionUIBlockFactory;
|
||||
use Combodo\iTop\Application\UI\Base\Component\Input\Select\SelectUIBlockFactory;
|
||||
use Combodo\iTop\Application\UI\Base\Component\Panel\Panel;
|
||||
@@ -25,7 +24,6 @@ use Combodo\iTop\Application\WebPage\CSVPage;
|
||||
use Combodo\iTop\Application\WebPage\ErrorPage;
|
||||
use Combodo\iTop\Application\WebPage\iTopWebPage;
|
||||
use Combodo\iTop\Core\MetaModel\FriendlyNameType;
|
||||
use Combodo\iTop\Form\Field\SelectObjectField;
|
||||
|
||||
/**
|
||||
* Adds the context parameters to the audit rule query
|
||||
@@ -156,6 +154,7 @@ function GetRuleResultFilter($iRuleId, $oDefinitionFilter, $oAppContext, $aParam
|
||||
|
||||
function MakeSelectField($oPage, string $sLabel, string $sFieldName, string $sOql, string $sCurrentValue)
|
||||
{
|
||||
|
||||
$oSearch = DBObjectSearch::FromOQL($sOql);
|
||||
$oAllowedValues = new DBObjectSet($oSearch);
|
||||
$oAllowedValues->SetShowObsoleteData(utils::ShowObsoleteData());
|
||||
@@ -206,7 +205,7 @@ function MakeSelectField($oPage, string $sLabel, string $sFieldName, string $sOq
|
||||
foreach ($aAdditionalField as $sAdditionalField) {
|
||||
array_push($aArguments, $oAllowedValues->Get($sAdditionalField));
|
||||
}
|
||||
$sOptionName.='<br><i>'.utils::HtmlEntities(vsprintf($sFormatAdditionalField, $aArguments)).'</i>'; ;
|
||||
$sOptionName .= '<br><i>' . utils::HtmlEntities(vsprintf($sFormatAdditionalField, $aArguments)) . '</i>';;
|
||||
}
|
||||
if (!empty($sObjectImageAttCode)) {
|
||||
// Try to retrieve image for contact
|
||||
@@ -214,10 +213,10 @@ function MakeSelectField($oPage, string $sLabel, string $sFieldName, string $sOq
|
||||
$oImage = $oAllowedValues->Get($sObjectImageAttCode);
|
||||
if (!$oImage->IsEmpty()) {
|
||||
$sPicturepictureUrl = $oImage->GetDisplayURL($sClassAllowed, $oChoiceItem->GetKey(), $sObjectImageAttCode);
|
||||
$sOptionName.=' <span class="ibo-input-select--autocomplete-item-image" style="background-image: url('.$sPicturepictureUrl.');"></span>';
|
||||
$sOptionName .= ' <span class="ibo-input-select--autocomplete-item-image" style="background-image: url(' . $sPicturepictureUrl . ');"></span>';
|
||||
} else {
|
||||
$sInitials = utils::FormatInitialsForMedallion(utils::ToAcronym($oChoiceItem->Get('friendlyname')));
|
||||
$sOptionName.=' <span class="ibo-input-select--autocomplete-item-image" ">'.$sInitials.'</span>';
|
||||
$sOptionName .= ' <span class="ibo-input-select--autocomplete-item-image" ">' . $sInitials . '</span>';
|
||||
}
|
||||
}
|
||||
$oOption = SelectOptionUIBlockFactory::MakeForSelectOption($oChoiceItem->GetKey(), $sOptionName, ($sCurrentValue == $oChoiceItem->GetKey()));
|
||||
@@ -234,17 +233,14 @@ function MakeSelectField($oPage, string $sLabel, string $sFieldName, string $sOq
|
||||
JS
|
||||
);
|
||||
return $oSelect;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// Too many choices, use an autocomplete
|
||||
// Check that the given value is allowed
|
||||
$oSearch = $oAllowedValues->GetFilter();
|
||||
$oSearch->AddCondition('id', $sCurrentValue);
|
||||
$oSet = new DBObjectSet($oSearch);
|
||||
$sClass = $oSet->GetClass();
|
||||
if ($oSet->Count() == 0)
|
||||
{
|
||||
if ($oSet->Count() == 0) {
|
||||
$sCurrentValue = null;
|
||||
}
|
||||
|
||||
@@ -261,7 +257,7 @@ JS
|
||||
$sHTMLValue .= "<input class=\"field_autocomplete ibo-input ibo-input-select ibo-input-select-autocomplete\" type=\"text\" id=\"label_$sFieldName\" value=\"$sDisplayValue\" placeholder='...'/>";
|
||||
|
||||
// another hidden input to store & pass the object's Id
|
||||
$sHTMLValue .= "<input type=\"hidden\" id=\"$sFieldName\" name=\"{$sFieldName}\" value=\"".utils::HtmlEntities($sCurrentValue)."\" />\n";
|
||||
$sHTMLValue .= "<input type=\"hidden\" id=\"$sFieldName\" name=\"{$sFieldName}\" value=\"" . utils::HtmlEntities($sCurrentValue) . "\" />\n";
|
||||
|
||||
$sMessage = Dict::S('UI:Message:EmptyList:UseSearchForm');
|
||||
$oPage->add_ready_script(
|
||||
@@ -276,10 +272,10 @@ JS
|
||||
EOF
|
||||
);
|
||||
$sHTMLValue .= "<div class=\"ibo-input-select--action-buttons\">";
|
||||
$sHTMLValue .= "<a href=\"#\" class=\"ibo-input-select--action-button ibo-input-select--action-button--clear ibo-is-hidden\" id=\"mini_clear_{$sFieldName}\" onClick=\"$('#$sFieldName').val('');$('#label_$sFieldName').val(''); $('#label_$sFieldName').data('selected_value', '');\" data-tooltip-content='".Dict::S('UI:Button:Clear')."'><i class=\"fas fa-times\"></i></a>";
|
||||
$sHTMLValue .= "<a href=\"#\" class=\"ibo-input-select--action-button ibo-input-select--action-button--search\" id=\"mini_search_{$sFieldName}\" onClick=\"oACWidget_{$sFieldName}.Search();\" data-tooltip-content='".Dict::S('UI:Button:Search')."'><i class=\"fas fa-search\"></i></a>";
|
||||
$sHTMLValue .= "<a href=\"#\" class=\"ibo-input-select--action-button ibo-input-select--action-button--clear ibo-is-hidden\" id=\"mini_clear_{$sFieldName}\" onClick=\"$('#$sFieldName').val('');$('#label_$sFieldName').val(''); $('#label_$sFieldName').data('selected_value', '');\" data-tooltip-content='" . Dict::S('UI:Button:Clear') . "'><i class=\"fas fa-times\"></i></a>";
|
||||
$sHTMLValue .= "<a href=\"#\" class=\"ibo-input-select--action-button ibo-input-select--action-button--search\" id=\"mini_search_{$sFieldName}\" onClick=\"oACWidget_{$sFieldName}.Search();\" data-tooltip-content='" . Dict::S('UI:Button:Search') . "'><i class=\"fas fa-search\"></i></a>";
|
||||
if (MetaModel::IsHierarchicalClass($sClass) !== false) {
|
||||
$sHTMLValue .= "<a href=\"#\" class=\"ibo-input-select--action-button ibo-input-select--action-button--hierarchy\" id=\"mini_tree_{$sFieldName}\" onClick=\"oACWidget_{$sFieldName}.HKDisplay();\" data-tooltip-content='".Dict::S('UI:Button:SearchInHierarchy')."'><i class=\"fas fa-sitemap\"></i></a>";
|
||||
$sHTMLValue .= "<a href=\"#\" class=\"ibo-input-select--action-button ibo-input-select--action-button--hierarchy\" id=\"mini_tree_{$sFieldName}\" onClick=\"oACWidget_{$sFieldName}.HKDisplay();\" data-tooltip-content='" . Dict::S('UI:Button:SearchInHierarchy') . "'><i class=\"fas fa-sitemap\"></i></a>";
|
||||
$oPage->add_ready_script(
|
||||
<<<JS
|
||||
if ($('#ac_tree_{$sFieldName}').length == 0)
|
||||
@@ -294,8 +290,9 @@ EOF
|
||||
$sHTMLValue .= "</div>";
|
||||
$sHTMLValue .= "</div>";
|
||||
|
||||
return new Html( $sHTMLValue);
|
||||
return new Html($sHTMLValue);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
require_once('../approot.inc.php');
|
||||
@@ -305,11 +302,11 @@ try
|
||||
|
||||
$bSelectionAuditRulesByDefault = utils::GetConfig()->Get('audit.enable_selection_landing_page');
|
||||
$operation = utils::ReadParam('operation', $bSelectionAuditRulesByDefault ? 'selection' : 'audit');
|
||||
$aAuditFilter = utils::GetConfig()->Get('audit.filter');
|
||||
if ($aAuditFilter == null){
|
||||
$aAuditFilter = [];
|
||||
}
|
||||
|
||||
$sOQL = 'SELECT AuditFilterField';
|
||||
$oSearch = DBObjectSearch::FromOQL($sOQL);
|
||||
$oAuditFilterSet = new DBObjectSet($oSearch, array(), array());
|
||||
$bHasAudiFilter= ($oAuditFilterSet->Count()>0) ;
|
||||
$oAuditFilterSet->Rewind();
|
||||
$oAppContext = new ApplicationContext();
|
||||
|
||||
require_once(APPROOT.'/application/loginwebpage.class.inc.php');
|
||||
@@ -328,11 +325,11 @@ try
|
||||
|
||||
$aFilterParams = [];
|
||||
$sAddingParams = '';
|
||||
if($aAuditFilter !=[] ){
|
||||
foreach ($aAuditFilter as $sFieldName => $aFieldParam) {
|
||||
$sCurrentValue = utils::ReadParam($sFieldName, '');
|
||||
$sAddingParams .= "&$sFieldName=$sCurrentValue";
|
||||
$aFilterParams[$sFieldName] = $sCurrentValue;
|
||||
if ($bHasAudiFilter) {
|
||||
while ($oAuditFilter = $oAuditFilterSet->Fetch()) {
|
||||
$sCurrentValue = utils::ReadParam($oAuditFilter->Get('placeholder'), '');
|
||||
$sAddingParams .= '&'.$oAuditFilter->Get('placeholder').'='.$sCurrentValue;
|
||||
$aFilterParams[$oAuditFilter->Get('placeholder')] = $sCurrentValue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -348,9 +345,6 @@ try
|
||||
$bAdvanced = utils::ReadParam('advanced', false);
|
||||
$sAdvanced = $bAdvanced ? '&advanced=1' : '';
|
||||
|
||||
|
||||
|
||||
|
||||
if ($sFileName != null)
|
||||
{
|
||||
$oP = new CSVPage("iTop - Export");
|
||||
@@ -384,7 +378,7 @@ try
|
||||
$sTitle = Dict::S('UI:Audit:AuditErrors');
|
||||
$oP->SetBreadCrumbEntry('ui-tool-auditerrors', $sTitle, '', '', 'fas fa-stethoscope', iTopWebPage::ENUM_BREADCRUMB_ENTRY_ICON_TYPE_CSS_CLASSES);
|
||||
|
||||
$oBackButton = ButtonUIBlockFactory::MakeIconLink('fas fa-chevron-left', Dict::S('UI:Audit:InteractiveAudit:Back'), "./audit.php?".$oAppContext->GetForLink());
|
||||
$oBackButton = ButtonUIBlockFactory::MakeIconLink('fas fa-chevron-left', Dict::S('UI:Audit:InteractiveAudit:Back'), "./audit.php?".$oAppContext->GetForLink());
|
||||
$oP->AddUiBlock($oBackButton);
|
||||
$oP->AddUiBlock(TitleUIBlockFactory::MakeForPage($sTitle.$oAuditRule->Get('description')));
|
||||
|
||||
@@ -395,8 +389,8 @@ try
|
||||
$oP->p("</div>");
|
||||
// Adjust the size of the Textarea containing the CSV to fit almost all the remaining space
|
||||
$oP->add_ready_script(" $('#1>textarea').height(400);"); // adjust the size of the block
|
||||
$sExportUrl = utils::GetAbsoluteUrlAppRoot()."pages/audit.php?operation=csv&category=".$oAuditCategory->GetKey()."&rule=".$oAuditRule->GetKey().$sAddingParams;
|
||||
$oDownloadButton = ButtonUIBlockFactory::MakeForAlternativePrimaryAction('fas fa-chevron-left', Dict::S('UI:Audit:InteractiveAudit:Back'), "./audit.php?".$oAppContext->GetForLink());
|
||||
$sExportUrl = utils::GetAbsoluteUrlAppRoot()."pages/audit.php?operation=csv&category=".$oAuditCategory->GetKey()."&rule=".$oAuditRule->GetKey().$sAddingParams;
|
||||
$oDownloadButton = ButtonUIBlockFactory::MakeForAlternativePrimaryAction('fas fa-chevron-left', Dict::S('UI:Audit:InteractiveAudit:Back'), "./audit.php?".$oAppContext->GetForLink());
|
||||
|
||||
$oP->add_ready_script("$('a[href*=\"webservices/export.php?expression=\"]').attr('href', '".$sExportUrl."&filename=audit.csv".$sAdvanced."');");
|
||||
$oP->add_ready_script("$('#1 :checkbox').removeAttr('onclick').on('click', function() { var sAdvanced = ''; if (this.checked) sAdvanced = '&advanced=1'; window.location.href='$sExportUrl'+sAdvanced; } );");
|
||||
@@ -411,21 +405,21 @@ try
|
||||
$aFilterParams = [];
|
||||
$sAddingParams = '';
|
||||
$oPanel = PanelUIBlockFactory::MakeNeutral('',Dict::S('UI:Audit:Interactive:FilterList'));
|
||||
if($aAuditFilter !=[] ){
|
||||
foreach ($aAuditFilter as $sFieldName => $aFieldParam) {
|
||||
$sCurrentValue = utils::ReadParam($sFieldName, '');
|
||||
$sAddingParams .= "&$sFieldName=$sCurrentValue";
|
||||
$aFilterParams[$sFieldName] = $sCurrentValue;
|
||||
if ($bHasAudiFilter) {
|
||||
while ($oAuditFilter = $oAuditFilterSet->Fetch()) {
|
||||
$sCurrentValue = utils::ReadParam($oAuditFilter->Get('placeholder'), '');
|
||||
$sAddingParams .= "&".$oAuditFilter->Get('placeholder')."=$sCurrentValue";
|
||||
$aFilterParams[$oAuditFilter->Get('placeholder')] = $sCurrentValue;
|
||||
$sName = '';
|
||||
if (array_key_exists('oql', $aFieldParam) && utils::IsNotNullOrEmptyString($aFieldParam['oql'])) {
|
||||
$oSearch = new DBObjectSet(DBObjectSearch::FromOQL($aFieldParam['oql']));
|
||||
if (utils::IsNotNullOrEmptyString($oAuditFilter->Get('oql'))) {
|
||||
$oSearch = new DBObjectSet(DBObjectSearch::FromOQL($oAuditFilter->Get('oql')));
|
||||
$sClass = $oSearch->GetClass();
|
||||
$oObject = MetaModel::GetObject($sClass, $sCurrentValue);
|
||||
$sName = $oObject->GetName();
|
||||
} else {//this is a list of values
|
||||
$sName = $aFieldParam['values'][$sCurrentValue];
|
||||
$sName = $oAuditFilter->Get('values')[$sCurrentValue];
|
||||
}
|
||||
$sFilterText .= '<li>'.$aFieldParam['label'].': '.$sName.'</li>';
|
||||
$sFilterText .= '<li>'.$oAuditFilter->Get('label').': '.$sName.'</li>';
|
||||
}
|
||||
$oPanel->AddSubBlock(new Html($sFilterText.'</ul>'));
|
||||
}
|
||||
@@ -444,7 +438,7 @@ try
|
||||
$oBackButton = ButtonUIBlockFactory::MakeIconLink('fas fa-chevron-left', Dict::S('UI:Audit:Interactive:Button:Back'), "./audit.php?".$oAppContext->GetForLink());
|
||||
$oP->AddUiBlock($oBackButton);
|
||||
$oP->AddUiBlock(TitleUIBlockFactory::MakeForPage($sTitle.$oAuditRule->Get('description')));
|
||||
if($aAuditFilter !=[] ){
|
||||
if ($bHasAudiFilter) {
|
||||
$oP->AddUiBlock($oPanel);
|
||||
$oP->AddUiBlock(new Html('<br>'));
|
||||
}
|
||||
@@ -458,6 +452,8 @@ try
|
||||
break;
|
||||
|
||||
case 'selection':
|
||||
$sEnableDisableButtonJS ='';
|
||||
$aAllFields = [];
|
||||
$oP->SetBreadCrumbEntry('ui-tool-auditselection', Dict::S('UI:Audit:Interactive:Selection:BreadCrumb'), Dict::S('UI:Audit:Interactive:Selection:BreadCrumb+'), '', 'fas fa-stethoscope', iTopWebPage::ENUM_BREADCRUMB_ENTRY_ICON_TYPE_CSS_CLASSES);
|
||||
if (UserRights::IsActionAllowed('AuditCategory', UR_ACTION_MODIFY)) {
|
||||
$oButton = ButtonUIBlockFactory::MakeLinkNeutral(utils::GetAbsoluteUrlAppRoot()."pages/UI.php?c[menu]=AuditCategories", Dict::S('UI:Audit:Interactive:Button:Configuration'), 'fas fa-wrench');
|
||||
@@ -465,36 +461,49 @@ try
|
||||
}
|
||||
$oP->AddUiBlock(TitleUIBlockFactory::MakeForPage(Dict::S('UI:Audit:Interactive:Selection:Title')));
|
||||
|
||||
if($aAuditFilter !=[] ){
|
||||
$oPanel = PanelUIBlockFactory::MakeNeutral('',Dict::S('UI:Audit:Interactive:Selection:SubTitleParams'));
|
||||
$oP->AddUiBlock($oPanel);
|
||||
foreach ($aAuditFilter as $sFieldName => $aFieldParam) {
|
||||
$sAuditUrl = utils::GetAbsoluteUrlAppRoot()."pages/audit.php?operation=audit";
|
||||
$sGetParams = '';
|
||||
|
||||
$oBlock = FieldUIBlockFactory::MakeStandard($aFieldParam['label']);
|
||||
$oBlock->SetAttLabel($aFieldParam['label'])
|
||||
->AddDataAttribute("input-id", $sFieldName)
|
||||
if ($bHasAudiFilter) {
|
||||
$oPanel = PanelUIBlockFactory::MakeNeutral('',Dict::S('UI:Audit:Interactive:Selection:SubTitleParams'));
|
||||
$sPanelFilterId =$oPanel->GetId();
|
||||
$oP->AddUiBlock($oPanel);
|
||||
|
||||
while ($oAuditFilter = $oAuditFilterSet->Fetch()) {
|
||||
$oBlock = FieldUIBlockFactory::MakeStandard($oAuditFilter->Get('label'));
|
||||
$oBlock->SetAttLabel($oAuditFilter->Get('label'))
|
||||
->AddDataAttribute("input-id", $oAuditFilter->Get('placeholder'))
|
||||
->AddDataAttribute("input-type", 'input-type');
|
||||
$oValue = UIContentBlockUIBlockFactory::MakeStandard("", ["form-field-content", "ibo-input-field-wrapper"]);
|
||||
|
||||
$sCurrentValue = utils::ReadParam($sFieldName, '');
|
||||
$sCurrentValue = utils::ReadParam($oAuditFilter->Get('placeholder'), '');
|
||||
|
||||
if (array_key_exists('oql', $aFieldParam) && utils::IsNotNullOrEmptyString($aFieldParam['oql'])) {
|
||||
$oValue->AddSubBlock(MakeSelectField( $oP, $aFieldParam['label'], $sFieldName, $aFieldParam['oql'], $sCurrentValue));
|
||||
if (utils::IsNotNullOrEmptyString($oAuditFilter->Get('oql'))) {
|
||||
$oValue->AddSubBlock(MakeSelectField( $oP, $oAuditFilter->Get('label'), $oAuditFilter->Get('placeholder'), $oAuditFilter->Get('oql'), $sCurrentValue));
|
||||
} else {//this is a list of values
|
||||
$aListValues = $aFieldParam['values'];
|
||||
$oSelect = SelectUIBlockFactory::MakeForSelect($sFieldName, $sFieldName);
|
||||
$aListValues = explode(',',$oAuditFilter->Get('values'));
|
||||
$oSelect = SelectUIBlockFactory::MakeForSelect($oAuditFilter->Get('placeholder'), $oAuditFilter->Get('placeholder'));
|
||||
$oSelect->AddCSSClass('ibo-input-field-wrapper');
|
||||
|
||||
foreach($aListValues as $sKey => $sValue) {
|
||||
$oSelect->AddOption(SelectOptionUIBlockFactory::MakeForSelectOption($sKey, $sValue, ($sCurrentValue == $sKey)));
|
||||
//foreach($aListValues as $sKey => $sValue) {
|
||||
// $oSelect->AddOption(SelectOptionUIBlockFactory::MakeForSelectOption($sKey, $sValue, ($sCurrentValue == $sKey)));
|
||||
foreach($aListValues as $sValue) {
|
||||
$oSelect->AddOption(SelectOptionUIBlockFactory::MakeForSelectOption($sValue, $sValue, ($sCurrentValue == $sValue)));
|
||||
}
|
||||
|
||||
$oValue->AddSubBlock($oSelect);
|
||||
}
|
||||
$oBlock->AddSubBlock($oValue);
|
||||
$oPanel->AddSubBlock($oBlock);
|
||||
}
|
||||
|
||||
//for links
|
||||
$sGetParams .= $oAuditFilter->Get('placeholder').'=$("[name='.$oAuditFilter->Get('placeholder').']").val();';
|
||||
$sAuditUrl .= '&'.$oAuditFilter->Get('placeholder').'=\'+'.$oAuditFilter->Get('placeholder').'+\'';
|
||||
|
||||
//for JS
|
||||
$aAllFields[$oAuditFilter->Get('placeholder')] = 0;
|
||||
}
|
||||
$sAllDomainUrl = 'javascript:'.$sGetParams.' window.location = \''.$sAuditUrl.'\'';
|
||||
}
|
||||
$oP->AddUiBlock(TitleUIBlockFactory::MakeNeutral(Dict::S('UI:Audit:Interactive:Selection:SubTitle'),2));
|
||||
|
||||
@@ -508,22 +517,11 @@ try
|
||||
$oDashboardRow->AddDashboardColumn($oDashboardColumn);
|
||||
$oAllCategoriesDashlet = new DashletContainer();
|
||||
|
||||
$sDomainUrl = utils::GetAbsoluteUrlAppRoot()."pages/audit.php?operation=audit";
|
||||
if($aAuditFilter !=[] ) {
|
||||
//modif URLLink In order to send params
|
||||
$sGetParams = '';
|
||||
foreach ($aAuditFilter as $sFieldName => $aFieldParam) {
|
||||
$sGetParams .= $sFieldName."=$('[name=$sFieldName]').val();";
|
||||
$sDomainUrl .= "&".$sFieldName."='+$sFieldName+'";
|
||||
}
|
||||
$sDomainUrl = 'javascript:'.$sGetParams.' window.location = \''.$sDomainUrl.'\'';
|
||||
}
|
||||
|
||||
$oAllCategoriesDashlet
|
||||
->AddCSSClasses(['ibo-dashlet--is-inline', 'ibo-dashlet-badge'])
|
||||
->AddSubBlock(DashletFactory::MakeForDashletBadge(
|
||||
utils::GetAbsoluteUrlAppRoot().'images/icons/icons8-audit.svg',
|
||||
$sDomainUrl,
|
||||
$sAllDomainUrl,
|
||||
$iCategoryCount,
|
||||
Dict::S('UI:Audit:Interactive:Selection:BadgeAll')
|
||||
));
|
||||
@@ -544,7 +542,7 @@ try
|
||||
$iDomainCnt = 0;
|
||||
/** @var AuditDomain $oAuditDomain */
|
||||
while($oAuditDomain = $oDomainSet->Fetch()) {
|
||||
$sDomainUrl = utils::GetAbsoluteUrlAppRoot()."pages/audit.php?operation=audit&domain=".$oAuditDomain->GetKey();
|
||||
$sDomainUrl = $sAuditUrl.'&domain='.$oAuditDomain->GetKey();
|
||||
$sIconUrl = utils::GetAbsoluteUrlAppRoot().'images/icons/icons8-puzzle.svg';
|
||||
/** @var \ormDocument $oImage */
|
||||
$oImage = $oAuditDomain->Get('icon');
|
||||
@@ -553,13 +551,8 @@ try
|
||||
}
|
||||
$iCategoryCount = $oAuditDomain->Get('categories_list')->Count();
|
||||
|
||||
if($aAuditFilter !=[] ) {
|
||||
if ($bHasAudiFilter) {
|
||||
//modif URLLink In order to send params
|
||||
$sGetParams = '';
|
||||
foreach ($aAuditFilter as $sFieldName => $aFieldParam) {
|
||||
$sGetParams .= $sFieldName."=$('[name=$sFieldName]').val();";
|
||||
$sDomainUrl .= "&".$sFieldName."='+$sFieldName+'";
|
||||
}
|
||||
$sDomainUrl = 'javascript:'.$sGetParams.' window.location = \''.$sDomainUrl.'\'';
|
||||
}
|
||||
|
||||
@@ -568,8 +561,42 @@ try
|
||||
$oDomainDashlet->AddSubBlock($oDomainBlock)->AddCSSClasses(['ibo-dashlet--is-inline', 'ibo-dashlet-badge']);
|
||||
$oDashboardRow->GetSubBlocks()[$iDomainCnt % 3]->AddUIBlock($oDomainDashlet); // ;
|
||||
$iDomainCnt++;
|
||||
if ($bHasAudiFilter) {
|
||||
$sFieldCondition = '';
|
||||
//JS sEnableDisableButtonJS .= 'if ('.implode(' && ', array_keys($aAllFields)).' == 0) {';
|
||||
foreach ($oAuditDomain->GetDependentFields() as $sPlaceholder) {
|
||||
if($sFieldCondition != ''){
|
||||
$sFieldCondition .= ' && ';
|
||||
}
|
||||
$sFieldCondition .= '$("[name=' . $sPlaceholder . ']").val() != "" ';
|
||||
}
|
||||
IssueLog::Error('$sFieldCondition: ' . $sFieldCondition);
|
||||
if ($sFieldCondition != '') {
|
||||
$sEnableDisableButtonJS .= 'if(' . $sFieldCondition . '){ $("#' . $oDomainDashlet->GetId() . ' a").removeClass("ibo-dashlet-badge--disabled"); } else { $("#' . $oDomainDashlet->GetId() . ' a").addClass("ibo-dashlet-badge--disabled"); }';
|
||||
$oP->add_ready_script('$("#' . $oDomainDashlet->GetId() . ' a").addClass("ibo-dashlet-badge--disabled")');
|
||||
}
|
||||
}
|
||||
}
|
||||
$oP->AddUiBlock($oDashboardRow);
|
||||
if ($bHasAudiFilter) {
|
||||
//add function in order to disable some audit button if necessaries values are not selected
|
||||
$sListFieldsJS = implode(',', array_keys($aAllFields));
|
||||
$sJS = <<<JS
|
||||
var observerOrgFromId = new MutationObserver(function(mutations) {
|
||||
mutations.forEach(function(mutationRecord) {
|
||||
if ($.inArray(mutationRecord.target.id, [$sListFieldsJS])) {
|
||||
$sEnableDisableButtonJS
|
||||
}
|
||||
});
|
||||
});
|
||||
observerOrgFromId.observe(document.getElementById('$sPanelFilterId'), { attributes : true, attributeFilter : ['value'], subtree: true,childList: true });
|
||||
console.warn('yo');
|
||||
$('body').on('click', 'a.ibo-dashlet-badge--disabled', function(event) {
|
||||
event.preventDefault();
|
||||
});
|
||||
JS;
|
||||
$oP->add_ready_script($sJS);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -608,30 +635,34 @@ try
|
||||
$oP->AddUiBlock($oBackButton);
|
||||
$oP->AddUiBlock(TitleUIBlockFactory::MakeForPage($sTitle));
|
||||
|
||||
$aFilterParams = [];
|
||||
$sAddingParams = '';
|
||||
if ($bHasAudiFilter) {
|
||||
$oPanel = PanelUIBlockFactory::MakeNeutral('', Dict::S('UI:Audit:Interactive:FilterList'));
|
||||
$oP->AddUiBlock($oPanel);
|
||||
|
||||
$aFilterParams = [];
|
||||
$sAddingParams = '';
|
||||
if($aAuditFilter !=[] ){
|
||||
$oPanel = PanelUIBlockFactory::MakeNeutral('',Dict::S('UI:Audit:Interactive:FilterList'));
|
||||
$oP->AddUiBlock($oPanel);
|
||||
while ($oAuditFilter = $oAuditFilterSet->Fetch()) {
|
||||
$sCurrentValue = utils::ReadParam($oAuditFilter->Get('placeholder'), '');
|
||||
try {
|
||||
$sAddingParams .= '&' . $oAuditFilter->Get('placeholder') . '=' . $sCurrentValue;
|
||||
$aFilterParams[$oAuditFilter->Get('placeholder')] = $sCurrentValue;
|
||||
$sName = '';
|
||||
if (utils::IsNotNullOrEmptyString($oAuditFilter->Get('oql'))) {
|
||||
$oSearch = new DBObjectSet(DBObjectSearch::FromOQL($oAuditFilter->Get('oql')));
|
||||
$sClass = $oSearch->GetClass();
|
||||
$oObject = MetaModel::GetObject($sClass, $sCurrentValue);
|
||||
$sName = $oObject->GetName();
|
||||
} else {//this is a list of values
|
||||
$sName = $sCurrentValue;//$oAuditFilter->Get('values')[$sCurrentValue];
|
||||
}
|
||||
$sFilterText .= '<li>' . $oAuditFilter->Get('label') . ': ' . $sName . '</li>';
|
||||
} catch (Exception $e) {
|
||||
$sFilterText .= '<li> no '.$oAuditFilter->Get('label').' filter' . '</li>';
|
||||
}
|
||||
|
||||
foreach ($aAuditFilter as $sFieldName => $aFieldParam) {
|
||||
$sCurrentValue = utils::ReadParam($sFieldName, '');
|
||||
$sAddingParams .= "&$sFieldName=$sCurrentValue";
|
||||
$aFilterParams[$sFieldName] = $sCurrentValue;
|
||||
$sName = '';
|
||||
if (array_key_exists('oql', $aFieldParam) && utils::IsNotNullOrEmptyString($aFieldParam['oql'])) {
|
||||
$oSearch = new DBObjectSet(DBObjectSearch::FromOQL($aFieldParam['oql']));
|
||||
$sClass = $oSearch->GetClass();
|
||||
$oObject = MetaModel::GetObject($sClass, $sCurrentValue);
|
||||
$sName = $oObject->GetName();
|
||||
} else {//this is a list of values
|
||||
$sName = $aFieldParam['values'][$sCurrentValue];
|
||||
}
|
||||
$sFilterText .= '<li>'.$aFieldParam['label'].': '.$sName.'</li>';
|
||||
$oPanel->AddSubBlock(new Html($sFilterText . '</ul>'));
|
||||
}
|
||||
$oPanel->AddSubBlock(new Html($sFilterText.'</ul>'));
|
||||
}
|
||||
$oP->AddUiBlock(new Html('<br>'));
|
||||
|
||||
$oP->AddUiBlock(new Text($sSubTitle));
|
||||
|
||||
Reference in New Issue
Block a user