mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
Merge branch 'support/3.0' into develop
This commit is contained in:
@@ -1008,8 +1008,8 @@ class Config
|
||||
'type' => 'integer',
|
||||
'description' => 'Maximum length of the history table (in the "History" tab on each object) before it gets truncated. Latest modifications are displayed first.',
|
||||
// examples... not used
|
||||
'default' => 50,
|
||||
'value' => 50,
|
||||
'default' => 200,
|
||||
'value' => 200,
|
||||
'source_of_value' => '',
|
||||
'show_in_conf_sample' => false,
|
||||
],
|
||||
|
||||
@@ -710,6 +710,7 @@ abstract class LogAPI
|
||||
/**
|
||||
* @throws \ConfigException if log wrongly configured
|
||||
* @uses GetMinLogLevel
|
||||
* @since 3.0.0 N°3731
|
||||
*/
|
||||
final public static function IsLogLevelEnabled(string $sLevel, string $sChannel, string $sConfigKey = self::ENUM_CONFIG_PARAM_FILE): bool
|
||||
{
|
||||
|
||||
@@ -1262,7 +1262,6 @@ $(function()
|
||||
});
|
||||
|
||||
this._UpdateEntryGroupsVisibility();
|
||||
this._UpdateLoadMoreEntriesButtonVisibility();
|
||||
this._UpdateMessagesCounters();
|
||||
},
|
||||
_ShowAllEntries: function()
|
||||
@@ -1337,30 +1336,6 @@ $(function()
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Update the "load more entries" button visibility regarding the current filters
|
||||
*
|
||||
* @private
|
||||
* @return {void}
|
||||
*/
|
||||
_UpdateLoadMoreEntriesButtonVisibility: function () {
|
||||
const oMoreButtonElem = this.element.find(this.js_selectors.load_more_entries);
|
||||
const oAllButtonElem = this.element.find(this.js_selectors.load_all_entries);
|
||||
|
||||
// Check if button exists (if all entries have been loaded, we might have remove it
|
||||
if (oMoreButtonElem.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Show button only if the states / edits filters are selected as log entries are always fully loaded
|
||||
if (this._GetActiveTabToolbarElement().find(this.js_selectors.activity_filter + '[data-target-entry-types!="'+this.enums.entry_types.caselog+'"]:checked').length > 0) {
|
||||
oMoreButtonElem.removeClass(this.css_classes.is_hidden);
|
||||
oAllButtonElem.removeClass(this.css_classes.is_hidden);
|
||||
} else {
|
||||
oMoreButtonElem.addClass(this.css_classes.is_hidden);
|
||||
oAllButtonElem.addClass(this.css_classes.is_hidden);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Load the next entries and append them to the current ones
|
||||
*
|
||||
|
||||
@@ -91,10 +91,10 @@
|
||||
<div class="ibo-activity-panel--load-more-entries-container" data-role="ibo-activity-panel--load-more-entries-container">
|
||||
{# Note: The "more entries" button is hidden by default to avoid a visual glitch. #}
|
||||
{# Otherwise when the page is loaded, the button is displayed even if the current tab only show log entries (which are all loaded) #}
|
||||
<a href="#" class="ibo-activity-panel--load-more-entries ibo-activity-panel--load-entries-button ibo-is-hidden" data-role="ibo-activity-panel--load-more-entries" data-tooltip-content="{{ 'UI:Layout:ActivityPanel:LoadMoreEntries:Tooltip'|dict_s }}">
|
||||
<a href="#" class="ibo-activity-panel--load-more-entries ibo-activity-panel--load-entries-button" data-role="ibo-activity-panel--load-more-entries" data-tooltip-content="{{ 'UI:Layout:ActivityPanel:LoadMoreEntries:Tooltip'|dict_s }}">
|
||||
<span class="ibo-activity-panel--load-entries-icon fas fa-fw fa-angle-down" data-role="ibo-activity-panel--load-more-entries-icon"></span>
|
||||
</a>
|
||||
<a href="#" class="ibo-activity-panel--load-all-entries ibo-activity-panel--load-entries-button ibo-is-hidden" data-role="ibo-activity-panel--load-all-entries" data-tooltip-content="{{ 'UI:Layout:ActivityPanel:LoadAllEntries:Tooltip'|dict_s }}">
|
||||
<a href="#" class="ibo-activity-panel--load-all-entries ibo-activity-panel--load-entries-button" data-role="ibo-activity-panel--load-all-entries" data-tooltip-content="{{ 'UI:Layout:ActivityPanel:LoadAllEntries:Tooltip'|dict_s }}">
|
||||
<span class="ibo-activity-panel--load-entries-icon fas fa-fw fa-angle-double-down" data-role="ibo-activity-panel--load-all-entries-icon"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,6 @@ namespace Combodo\iTop\Test\UnitTest\Core\Log;
|
||||
|
||||
use Combodo\iTop\Test\UnitTest\ItopDataTestCase;
|
||||
use ExceptionLog;
|
||||
use MetaModel;
|
||||
|
||||
|
||||
require_once(__DIR__.'/ExceptionLogTest/Exceptions.php');
|
||||
@@ -33,12 +32,6 @@ class ExceptionLogTest extends ItopDataTestCase
|
||||
{
|
||||
require_once(__DIR__.'/ExceptionLogTest/Exceptions.php');
|
||||
parent::setUp();
|
||||
|
||||
// We are using PHPUnit\Framework\MockObject\Generator::generateMock that is throwing notice !
|
||||
// Changing config so that those won't be caught by \DeprecatedCallsLog::DeprecatedNoticesErrorHandler
|
||||
// disabling devenv is easier than changing log config O:)
|
||||
$oConfig = MetaModel::GetConfig();
|
||||
$oConfig->Set('developer_mode.enabled', false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,7 +15,6 @@ namespace Combodo\iTop\Test\UnitTest\Core\Log;
|
||||
|
||||
|
||||
use Combodo\iTop\Test\UnitTest\ItopDataTestCase;
|
||||
use MetaModel;
|
||||
|
||||
/**
|
||||
* @runTestsInSeparateProcesses
|
||||
@@ -31,12 +30,6 @@ class LogAPITest extends ItopDataTestCase
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
// We are using PHPUnit\Framework\MockObject\Generator::generateMock that is throwing notice !
|
||||
// Changing config so that those won't be caught by \DeprecatedCallsLog::DeprecatedNoticesErrorHandler
|
||||
// disabling devenv is easier than changing log config O:)
|
||||
$oConfig = MetaModel::GetConfig();
|
||||
$oConfig->Set('developer_mode.enabled', false);
|
||||
|
||||
$this->mockFileLog = $this->createMock('FileLog');
|
||||
$this->oMetaModelConfig = $this->createMock('Config');
|
||||
}
|
||||
|
||||
@@ -34,10 +34,6 @@ class UserLocalTest extends ItopDataTestCase
|
||||
*/
|
||||
public function testValidatePassword($sPassword, $aValidatorNames, $aConfigValueMap, $bExpectedCheckStatus, $expectedCheckIssues = null, $sUserLanguage = null)
|
||||
{
|
||||
// We are calling methods that generates DEPRECATED warnings :( Like PHPUnit\Framework\MockObject\Generator::generateMock
|
||||
// Since N°3002 this would make the test fail, so this is a workaround !
|
||||
// changing ways to do mock will be done in N°4224
|
||||
set_error_handler(array(__CLASS__, 'VoidErrorHandlerForDeprecated'));
|
||||
$configMock = $this->createMock(\Config::class);
|
||||
$configMock
|
||||
->method('GetModuleSetting')
|
||||
@@ -74,28 +70,6 @@ class UserLocalTest extends ItopDataTestCase
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake error handler to silently discard DEPRECATED warnings
|
||||
*
|
||||
* @param int $iErrNo
|
||||
* @param string $sErrStr
|
||||
* @param string $sErrFile
|
||||
* @param int $iErrLine
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public static function VoidErrorHandlerForDeprecated($iErrno, $sErrStr, $sErrFile, $iErrLine)
|
||||
{
|
||||
if (
|
||||
(\E_USER_DEPRECATED !== $iErrno)
|
||||
&& (\E_DEPRECATED !== $iErrno)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true; // Ignore the error
|
||||
}
|
||||
|
||||
public function ProviderValidatePassword()
|
||||
{
|
||||
return array(
|
||||
@@ -262,7 +236,6 @@ class UserLocalTest extends ItopDataTestCase
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @dataProvider ProviderPasswordRenewal
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user