Commit f54740b5 authored by Tom Darneix's avatar Tom Darneix
Browse files

Merge branch 'master' of github.com:centreon/centreon

parents 756c6196 8b78edb5
......@@ -44,7 +44,7 @@ class LegacyLogger implements LoggerInterface
log as traitLog;
}
public function emergency($message, array $context = [])
public function emergency($message, array $context = []): void
{
$this->traitEmergency($message, $context);
}
......@@ -52,7 +52,7 @@ class LegacyLogger implements LoggerInterface
/**
* @inheritDoc
*/
public function alert($message, array $context = [])
public function alert($message, array $context = []): void
{
$this->traitAlert($message, $context);
}
......@@ -60,7 +60,7 @@ class LegacyLogger implements LoggerInterface
/**
* @inheritDoc
*/
public function critical($message, array $context = [])
public function critical($message, array $context = []): void
{
$this->traitCritical($message, $context);
}
......@@ -68,7 +68,7 @@ class LegacyLogger implements LoggerInterface
/**
* @inheritDoc
*/
public function error($message, array $context = [])
public function error($message, array $context = []): void
{
$this->traitError($message, $context);
}
......@@ -76,7 +76,7 @@ class LegacyLogger implements LoggerInterface
/**
* @inheritDoc
*/
public function warning($message, array $context = [])
public function warning($message, array $context = []): void
{
$this->traitWarning($message, $context);
}
......@@ -84,7 +84,7 @@ class LegacyLogger implements LoggerInterface
/**
* @inheritDoc
*/
public function notice($message, array $context = [])
public function notice($message, array $context = []): void
{
$this->traitNotice($message, $context);
}
......@@ -92,7 +92,7 @@ class LegacyLogger implements LoggerInterface
/**
* @inheritDoc
*/
public function info($message, array $context = [])
public function info($message, array $context = []): void
{
$this->traitInfo($message, $context);
}
......@@ -100,7 +100,7 @@ class LegacyLogger implements LoggerInterface
/**
* @inheritDoc
*/
public function debug($message, array $context = [])
public function debug($message, array $context = []): void
{
$this->traitDebug($message, $context);
}
......@@ -108,7 +108,7 @@ class LegacyLogger implements LoggerInterface
/**
* @inheritDoc
*/
public function log($level, $message, array $context = [])
public function log($level, $message, array $context = []): void
{
$this->traitLog($level, $message, $context);
}
......
......@@ -190,4 +190,16 @@
--list-ack-hover-background-color: var(--list-one-hover-background-color);
--md-checkbox--disabled-border-color-before: var(--color-black-rgba-6);
--md-checkbox--disabled-checked-background-color-before: var(--color-black-rgba-54);
--btc-color: var(--color-black);
--ui-button-focus-font-color: var(--btc-color);
--input-submit-color: var(--btc-color);
--a-btc-color: var(--btc-color);
--bt-action-color: var(--btc-color);
--bt-default-ui-state-hover-color: var(--btc-color);
--bt-success-ui-state-hover-color: var(--btc-color);
--bt-danger-ui-state-hover-color: var(--btc-color);
--bt-info-ui-state-hover-color: var(--btc-color);
--bt-warning-ui-state-hover-color: var(--btc-color);
--button-group-input-color: var(--btc-color);
--button-icons-fill-color: var(--btc-color);
}
......@@ -772,6 +772,7 @@
--help-tool-tip-icon-fill-color: var(--color-primary-dark);
--icons-fill-color: var(--color-primary-dark);
--icons-disabled-fill-color: var(--color-teal-blue);
--button-icons-fill-color: var(--color-white);
/* ------ END : New Icons variables -----*/
/* ------ START : Plugin pack variables -----*/
--pluginpack-block-h2-font-color: var(--body-color);
......
<svg xmlns='http://www.w3.org/2000/svg' height='24' width='24' viewBox='0 0 24 17'><path d='M11 19V13H5V11H11V5H13V11H19V13H13V19Z'/></svg>
\ No newline at end of file
<svg xmlns='http://www.w3.org/2000/svg' height='45px' viewBox='0 0 24 20' width='40px'><path d='M0 0h24v24H0V0z' fill='none'/><path d='M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z'/></svg>
\ No newline at end of file
<svg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 20' width='24px'><path d='M0 0h24v24H0V0z' fill='none'/><path d='M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.06-.02-.12-.03-.18-.03-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98 0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7.14 1.13zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z'/></svg>
\ No newline at end of file
<svg xmlns='http://www.w3.org/2000/svg' height='36px' viewBox='0 0 24 17' width='36px'><path d='M0 0h24v24H0V0z' fill='none'/><path d='M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z'/></svg>
\ No newline at end of file
<svg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 20' width='24px'><path d='M0 0h24v24H0V0z' fill='none'/><path d='M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z'/></svg>
\ No newline at end of file
<svg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 20' width='24px'><path d='M0 0h24v24H0z' fill='none'/><path d='M8 5v14l11-7z'/></svg>
\ No newline at end of file
<svg xmlns='http://www.w3.org/2000/svg' height='18px' viewBox='0 0 24 20' width='18px'><path d='M0 0h24v24H0V0z' fill='none'/><path d='M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z'/></svg>
\ No newline at end of file
<svg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 22' width='24px'><path d='M0 0h24v24H0V0z' fill='none'/><path d='M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z'/></svg>
\ No newline at end of file
<svg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 20' width='24px'><path d='M0 0h24v24H0V0z' fill='none'/><path d='M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z'/></svg>
\ No newline at end of file
<div id="{$cloneId}_controls">
<div id="{$cloneId}_add">
<div id="{$cloneId}_add" class="add-new-entry">
<span style="cursor:pointer;">
{assign var=isFrozen value=0}
{foreach from=$cloneSet item=v}
......
......@@ -52,24 +52,24 @@
{if !$isRemote}
{if $mode_access == 'w'}
<a href="{$wizardAddBtn.link}" class="{$wizardAddBtn.class}" isreact="true" target="_top">
<span class="ui-icon ui-icon-white {$wizardAddBtn.iconClass}"></span> {$wizardAddBtn.text}
{$wizardAddBtn.icon} {$wizardAddBtn.text}
</a>
<a href="{$addBtn.link}" class="{$addBtn.class}">
<span class="ui-icon ui-icon-white {$addBtn.iconClass}"></span> {$addBtn.text}
{$addBtn.icon} {$addBtn.text}
</a>
{/if}
{if $is_admin == 1 || $can_generate == 1}
<button type="button" class="{$exportBtn.class}" name="{$exportBtn.name}"
onClick="{$exportBtn.onClickAction}">
<span class="ui-icon ui-icon-white {$exportBtn.iconClass}"></span> {$exportBtn.text}
{$exportBtn.icon} {$exportBtn.text}
</button>
{/if}
{if $mode_access == 'w'}
<button type="submit" class="{$duplicateBtn.class}" name="{$duplicateBtn.name}" onClick="{$duplicateBtn.onClickAction}">
<span class="ui-icon ui-icon-white {$duplicateBtn.iconClass}"></span> {$duplicateBtn.text}
{$duplicateBtn.icon} {$duplicateBtn.text}
</button>
<button type="submit" class="{$deleteBtn.class}" name="{$deleteBtn.name}" onClick="{$deleteBtn.onClickAction}">
<span class="ui-icon ui-icon-white {$deleteBtn.iconClass}"></span> {$deleteBtn.text}
{$deleteBtn.icon} {$deleteBtn.text}
</button>
{/if}
{/if}
......
......@@ -321,7 +321,7 @@ if (!$isRemote) {
"link" => "./poller-wizard/1",
"text" => _("Add"),
"class" => "btc bt-poller-action bt_success",
"iconClass" => "ui-icon-plus"
"icon" => returnSvg("www/img/icons/add.svg", "var(--button-icons-fill-color)", 16, 16)
)
);
......@@ -331,7 +331,7 @@ if (!$isRemote) {
"link" => "main.php?p=" . $p . "&o=a",
"text" => _("Add (advanced)"),
"class" => "btc bt-poller-action bt_success",
"iconClass" => "ui-icon-plus"
"icon" => returnSvg("www/img/icons/add.svg", "var(--button-icons-fill-color)", 16, 16)
)
);
......@@ -342,7 +342,7 @@ if (!$isRemote) {
"text" => _("Duplicate"),
"class" => "btc bt-poller-action bt_success",
"name" => "duplicate_action",
"iconClass" => "ui-icon-copy",
"icon" => returnSvg("www/img/icons/duplicate.svg", "var(--button-icons-fill-color)", 16, 14),
"onClickAction" => "javascript: " .
" var bChecked = isChecked(); " .
" if (!bChecked) { alert('" . _("Please select one or more items") . "'); return false;} " .
......@@ -356,7 +356,7 @@ if (!$isRemote) {
"text" => _("Delete"),
"class" => "btc bt-poller-action bt_danger",
"name" => "delete_action",
"iconClass" => "ui-icon-trash",
"icon" => returnSvg("www/img/icons/trash.svg", "var(--button-icons-fill-color)", 16, 16),
"onClickAction" => "javascript: " .
" var bChecked = isChecked(); " .
" if (!bChecked) { alert('" . _("Please select one or more items") . "'); return false;} " .
......@@ -373,7 +373,7 @@ if (!$isRemote) {
"text" => _("Export configuration"),
"class" => "btc bt-poller-action bt_info",
"name" => "apply_configuration",
"iconClass" => "ui-icon-extlink",
"icon" => returnSvg("www/img/icons/export.svg", "var(--button-icons-fill-color)", 14, 14),
"onClickAction" => "applyConfiguration();"
)
);
......
......@@ -12,7 +12,7 @@
{if $aclAddView == 1}
<!-- Button for add a view -->
<div class="cntn">
<button class='addView btnAction btc bt_success'>{t}Add view{/t}</button>
<button class='addView btnAction btc bt_success'>{$addIcon} {t}Add view{/t}</button>
<!-- Form for add a view -->
<div class="position_toggle_wrapper">
<div class="toggle_wrapper inactive" id="addView">
......@@ -63,7 +63,7 @@
<!-- Button for edit a view -->
{if $aclEdit == 1}
<div class="cntn">
<button class='editView btnAction btnExtraAction btc bt_info'>{t}Edit view{/t}</button>
<button class='editView btnAction btnExtraAction btc bt_info'>{$editIcon} {t}Edit view{/t}</button>
<div class="position_toggle_wrapper">
<div class="toggle_wrapper inactive" id="editView">
<div>
......@@ -106,18 +106,18 @@
<!-- Button for delete a view -->
{if $aclDeleteView == 1}
<button class='deleteView btnExtraAction btc bt_danger'>{t}Delete view{/t}</button>
<button class='deleteView btnExtraAction btc bt_danger'>{$deleteIcon} {t}Delete view{/t}</button>
{/if}
<!-- Button for set default a view -->
{if $aclSetDefault == 1}
<button class='setDefault btnExtraAction btc bt_default'>{t}Set default{/t}</button>
<button class='setDefault btnExtraAction btc bt_default'>{$returnIcon} {t}Set default{/t}</button>
{/if}
<!-- Button for share a view -->
{if $aclShare == 1}
<div class="cntn">
<button class='shareView btnAction btnExtraAction btc bt_info'>{t}Share view{/t}</button>
<button class='shareView btnAction btnExtraAction btc bt_info'>{$folderIcon} {t}Share view{/t}</button>
<div class="position_toggle_wrapper">
<div class="toggle_wrapper inactive" id="shareView">
<form {$formShareView.attributes}>
......@@ -166,7 +166,7 @@
<!-- Button for add a widget -->
{if $aclAddWidget == 1}
<div class="cntn">
<button class='addWidget btnAction btnExtraAction btc bt_success'>{t}Add widget{/t}</button>
<button class='addWidget btnAction btnExtraAction btc bt_success'>{$addIcon} {t}Add widget{/t}</button>
<div class="position_toggle_wrapper">
<div class="toggle_wrapper inactive" id="addwdgt">
<form {$formAddWidget.attributes}>
......@@ -202,7 +202,7 @@
<!-- Button for activate rotation -->
{if $aclRotation == 1}
<div class="cntn">
<button class='setRotate btnAction btnExtraAction btc bt_info'>{t}Rotation{/t}</button>
<button class='setRotate btnAction btnExtraAction btc bt_info'>{$playIcon} {t}Rotation{/t}</button>
<div class="position_toggle_wrapper">
<div class="toggle_wrapper inactive" id="rotationTabs">
<div id='rotation_timer'></div>
......@@ -220,7 +220,9 @@
<div id="tabs">
<div class="info_box">
<h4>
<img src='./img/icones/16x16/help_button.png' style='padding-right:5px;'>
<span style='padding-right:5px;'>
{$helpIcon}
</span>
{t}No view available. To create a new view, please click "Add view" button.{/t}
</h4>
</div>
......@@ -678,7 +680,7 @@ jQuery(function () {
jQuery('#tabs').tabs();
/* Initialize buttons */
jQuery('.addView').button({icon: "ui-icon-plus"}).on('click', function () {
jQuery('.addView').button().on('click', function () {
//reset select2
jQuery("#formAddView #viewLoad").empty().append($('<option>'));
//reset add view form
......@@ -691,21 +693,21 @@ jQuery(function () {
jQuery('#formAddView input[name="public"]').prop('checked', false);
});
jQuery('.setDefault').button({ icons : { primary: 'ui-icon-arrowreturnthick-1-w'}}).on('click', function () {
jQuery('.setDefault').button().on('click', function () {
jQuery("#setDefaultConfirm").centreonPopin({
open: true
});
});
jQuery('.editView').button({ icons : { primary: 'ui-icon-gear'}});
jQuery('.editView').button();
jQuery('.deleteView').button({ icons : { primary: 'ui-icon-trash'}}).on('click', function () {
jQuery('.deleteView').button().on('click', function () {
jQuery("#deleteViewConfirm").centreonPopin({
open: true
});
});
jQuery('.shareView').button({ icons : { primary: 'ui-icon-folder-open'}}).on('click', function () {
jQuery('.shareView').button().on('click', function () {
/* Get default information for a share view */
var viewId = jQuery(
jQuery('#tabs .ui-tabs-tab.ui-state-active')[0]
......@@ -751,8 +753,8 @@ jQuery(function () {
}
});
});
jQuery('.addWidget').button({ icons : { primary: 'ui-icon-plus'}});
jQuery('.setRotate').button({ icons : { primary: 'ui-icon-play'}});
jQuery('.addWidget').button();
jQuery('.setRotate').button();
jQuery('input[name="create_load[create_load]"]').change(function (){
if (jQuery(this).val() == 'load'){
......
......@@ -346,6 +346,34 @@ try {
20
)
);
$template->assign(
'addIcon',
returnSvg("www/img/icons/add.svg", "var(--button-icons-fill-color)", 14, 16)
);
$template->assign(
'deleteIcon',
returnSvg("www/img/icons/trash.svg", "var(--button-icons-fill-color)", 14, 16)
);
$template->assign(
'editIcon',
returnSvg("www/img/icons/edit.svg", "var(--button-icons-fill-color)", 14, 14)
);
$template->assign(
'returnIcon',
returnSvg("www/img/icons/return.svg", "var(--button-icons-fill-color)", 14, 14)
);
$template->assign(
'folderIcon',
returnSvg("www/img/icons/folder.svg", "var(--button-icons-fill-color)", 14, 14)
);
$template->assign(
'playIcon',
returnSvg("www/img/icons/play.svg", "var(--button-icons-fill-color)", 14, 14)
);
$template->assign(
'helpIcon',
returnSvg("www/img/icons/question.svg", "var(--help-tool-tip-icon-fill-color)", 18, 18)
);
$template->display("index.ihtml");
} catch (CentreonCustomViewException $e) {
......
<div class="viewBody">
<div class="info_box">
<h4><img src="./img/icones/16x16/help_button.png">{$error_msg}</h4>
<h4>{$helpIcon}{$error_msg}</h4>
</div>
</div>
......@@ -13,7 +13,7 @@
</div>
{else}
<div class="info_box">
<h4><img src='./img/icones/16x16/help_button.png'> {$error_msg}</h4>
<h4>{$helpIcon} {$error_msg}</h4>
</div>
{/if}
</div>
......
......@@ -28,7 +28,7 @@
</div>
{else}
<div class="info_box">
<h4><img src='./img/icones/16x16/help_button.png'> {$error_msg}</h4>
<h4>{$helpIcon} {$error_msg}</h4>
</div>
{/if}
</div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment