- new "Head Navigation" added to /setup page, closed #689

- decreased memory requirement for _Redis_ (Cache backend) `128M` → `64M`, #686
- fixed broken "nearby" overlay table
This commit is contained in:
Mark Friedrich
2018-09-26 02:58:11 +02:00
parent 17039ae22d
commit 6e9920bd93
13 changed files with 186 additions and 101 deletions

View File

@@ -154,6 +154,9 @@ class Setup extends Controller {
// body element class
$f3->set('tplBodyClass', 'pf-landing');
// top navigation configuration
$f3->set('tplNavigation', $this->getNavigationConfig());
return true;
}
@@ -169,13 +172,16 @@ class Setup extends Controller {
$f3->set('cacheType', $this->getCacheType($f3));
// simple counter (called within template)
$counter = 0;
$f3->set('tplCounter', function(string $action = 'add') use (&$counter){
$counter = [];
$f3->set('tplCounter', function(string $action = 'increment', string $type = 'default', $val = 0) use (&$counter){
$return = null;
switch($action){
case 'add': $counter++; break;
case 'get': return $counter; break;
case 'reset': $counter = 0; break;
case 'increment': $counter[$type]++; break;
case 'add': $counter[$type] += (int)$val; break;
case 'get': $return = $counter[$type]? : null; break;
case 'reset': unset($counter[$type]); break;
}
return $return;
});
// render view
@@ -267,6 +273,35 @@ class Setup extends Controller {
$f3->set('checkRedisConfig', $this->checkRedisConfig($f3));
}
/**
* get top navigation configuration
* @return array
*/
protected function getNavigationConfig() : array {
$config = [
'server' => [
'icon' => 'fa-home'
],
'environment' => [
'icon' => 'fa-server'
],
'settings' => [
'icon' => 'fa-sliders-h'
],
'database' => [
'icon' => 'fa-database'
],
'socket' => [
'icon' => 'fa-exchange-alt'
],
'administration' => [
'icon' => 'fa-wrench'
],
];
return $config;
}
/**
* set environment information
* @param \Base $f3

View File

@@ -268,7 +268,7 @@ class Config extends \Prefab {
*/
static function getMapsDefaultConfig($mapType = ''){
if( $mapConfig = self::getPathfinderData('map' . ($mapType ? '.' . $mapType : '')) ){
$mapConfig = Util::arrayChangeKeyCaseRecursive( $mapConfig );
$mapConfig = Util::arrayChangeKeyCaseRecursive($mapConfig);
}
return $mapConfig;

View File

@@ -72,8 +72,8 @@ FOREIGN_KEY_CHECKS = ON
[REQUIREMENTS.REDIS]
VERSION = 3.0
; max memory limit (Bytes) "binary" (default: 128M)
MAX_MEMORY = 134217728
; max memory limit (Bytes) "binary" (default: 64M)
MAX_MEMORY = 67108864
; how Redis behaves if "maxmemory" limit reached
; https://redis.io/topics/lru-cache
MAXMEMORY_POLICY = allkeys-lru

View File

@@ -249,18 +249,6 @@ define([
});
};
/**
* Access a nested JSON object by "dot.notation" syntax
* @param obj
* @param selector
* @returns {*}
*/
let getDescendantProp = (obj, selector) => {
return selector.split('.').reduce(function(a, b){
return a[b];
}, obj);
};
/**
* init tooltip for a "DataTables" Cell
* @param api
@@ -274,7 +262,7 @@ define([
$(this).tooltip({
container: 'body',
title: String( getDescendantProp(rowData, titleSelector) ),
title: Util.getObjVal(rowData, titleSelector),
placement: 'left',
delay: 100
}).tooltip('show');
@@ -393,7 +381,7 @@ define([
info: false,
searching: false,
hover: false,
autoWidth: false,
responsive: false, // true "hides" some columns on init (why?)
rowId: function(rowData){
return 'pf-local-row_' + rowData.id; // characterId
},
@@ -409,7 +397,7 @@ define([
className: [Util.config.helpDefaultClass, 'text-center'].join(' '),
data: 'jumps',
render: {
_: function(data, type, row, meta){
_: (data, type, row, meta) => {
let value = data;
if(type === 'display'){
if(value === 0){
@@ -431,7 +419,7 @@ define([
className: [Util.config.helpDefaultClass, 'text-center', config.tableCellImageClass].join(' '),
data: 'log.ship',
render: {
_: function(data, type, row, meta){
_: (data, type, row, meta) => {
let value = data.typeName;
if(type === 'display'){
value = '<img src="' + Init.url.ccpImageServer + '/Render/' + data.typeId + '_32.png"/>';
@@ -450,7 +438,7 @@ define([
width: '80px',
data: 'log.ship',
render: {
_: function(data, type, row, meta){
_: (data, type, row, meta) => {
let value = data.name;
if(type === 'display'){
value = '<div class="' + MapUtil.config.tableCellEllipsisClass + ' ' + MapUtil.config.tableCellEllipsis80Class + '">' + data.name + '</div>';
@@ -465,7 +453,7 @@ define([
title: 'pilot',
data: 'name',
render: {
_: function(data, type, row, meta){
_: (data, type, row, meta) => {
let value = data;
if(type === 'display'){
value = '<div class="' + MapUtil.config.tableCellEllipsisClass + ' ' + MapUtil.config.tableCellEllipsis90Class + '">' + data + '</div>';
@@ -481,7 +469,7 @@ define([
className: [Util.config.helpDefaultClass].join(' '),
data: 'log',
render: {
_: function(data, type, row, meta){
_: (data, type, row, meta) => {
let value = '';
if(type === 'display'){
if(data.station && data.station.id > 0){
@@ -511,7 +499,7 @@ define([
className: [config.tableCellActionClass].join(' '),
data: 'id',
render: {
_: function(data, type, row, meta){
_: (data, type, row, meta) => {
let value = data;
if(type === 'display'){
value = '<i class="fas fa-id-card ' + config.tableCellActionIconClass + '"></i>';

View File

@@ -7,7 +7,7 @@ define([
'app/init',
'app/util',
'app/map/util'
], function($, Init, Util, MapUtil){
], ($, Init, Util, MapUtil) => {
'use strict';
let config = {
@@ -43,7 +43,7 @@ define([
* @param mapElement
* @returns {*}
*/
let getMapObjectFromMapElement = (mapElement) => {
let getMapObjectFromMapElement = mapElement => {
let Map = require('app/map/map');
return Map.getMapInstance( mapElement.data('id') );
};
@@ -53,7 +53,7 @@ define([
* @param overlayIcon
* @returns {*}
*/
let getMapObjectFromOverlayIcon = (overlayIcon) => {
let getMapObjectFromOverlayIcon = overlayIcon => {
let mapElement = Util.getMapElementFromOverlay(overlayIcon);
return getMapObjectFromMapElement( mapElement );
@@ -173,7 +173,7 @@ define([
* @param parts
* @returns {string}
*/
let formatTimeParts = (parts) => {
let formatTimeParts = parts => {
let label = '';
if(parts.days){
label += parts.days + 'd ';
@@ -187,7 +187,7 @@ define([
* hide default icon and replace it with "loading" icon
* @param iconElement
*/
let showLoading = (iconElement) => {
let showLoading = iconElement => {
iconElement = $(iconElement);
let dataName = 'default-icon';
let defaultIconClass = iconElement.data(dataName);
@@ -206,7 +206,7 @@ define([
* hide "loading" icon and replace with default icon
* @param iconElement
*/
let hideLoading = (iconElement) => {
let hideLoading = iconElement => {
iconElement = $(iconElement);
let dataName = 'default-icon';
let defaultIconClass = iconElement.data(dataName);

View File

@@ -83,7 +83,7 @@ define([
});
// tooltips ---------------------------------------------------------------------------------------------------
body.initTooltips();
body.find('[title]').tooltip();
// change url (remove logout parameter)
if(history.pushState){
@@ -152,14 +152,21 @@ define([
* @param data
*/
let updateWebSocketPanel = (data) => {
let badgeSocketWarning = $('.navbar a[data-anchor="#pf-setup-socket"] .txt-color-warning');
let badgeSocketDanger = $('.navbar a[data-anchor="#pf-setup-socket"] .txt-color-danger');
let socketWarningCount = parseInt(badgeSocketWarning.text()) || 0;
let socketDangerCount = parseInt(badgeSocketDanger.text()) || 0;
if(data.uri){
let uriRow = webSocketPanel.find('.panel-body table tr');
uriRow.find('td:nth-child(2) kbd').html(data.uri.value);
if(data.uri.status){
let statusIcon = uriRow.find('td:nth-child(3) i');
removeColorClasses(statusIcon);
statusIcon.toggleClass('fa-exclamation-triangle', false).toggleClass('fa-check', true).addClass('txt-color-success');
// update head badge. "Decrease" warning count, default for "URI" connection is "warn + 1"
socketWarningCount--;
}
}
@@ -167,7 +174,23 @@ define([
let footer = webSocketPanel.find('.panel-footer h3');
removeColorClasses(footer);
footer.text(data.status.label).addClass(data.status.class);
// update head badge
switch(data.status.type){
case 'success':
socketWarningCount = '';
socketDangerCount = '';
break;
case 'warning':
break;
case 'danger':
socketDangerCount = 1;
break;
}
}
badgeSocketWarning.text(socketWarningCount ? socketWarningCount : '');
badgeSocketDanger.text(socketDangerCount ? socketDangerCount : '');
};
// update initial
@@ -177,6 +200,7 @@ define([
status: true
},
status: {
type: 'warning',
label: 'CONNECTING...',
class: 'txt-color-warning'
}
@@ -188,6 +212,7 @@ define([
socket.onopen = (e) => {
updateWebSocketPanel({
status: {
type: 'warning',
label: 'OPEN wait for response...',
class: 'txt-color-warning'
}
@@ -209,6 +234,7 @@ define([
// SUCCESS
updateWebSocketPanel({
status: {
type: 'success',
label: 'CONNECTED',
class: 'txt-color-success'
}
@@ -217,6 +243,7 @@ define([
// Got response but INVALID
updateWebSocketPanel({
status: {
type: 'warning',
label: 'INVALID RESPONSE',
class: 'txt-color-warning'
}
@@ -228,6 +255,7 @@ define([
socket.onerror = (e) => {
updateWebSocketPanel({
status: {
type: 'danger',
label: 'CONNECTION ERROR',
class: 'txt-color-danger'
}
@@ -239,6 +267,7 @@ define([
socket.onclose = (closeEvent) => {
updateWebSocketPanel({
status: {
type: 'danger',
label: 'CONNECTION FAILED',
class: 'txt-color-danger'
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -249,18 +249,6 @@ define([
});
};
/**
* Access a nested JSON object by "dot.notation" syntax
* @param obj
* @param selector
* @returns {*}
*/
let getDescendantProp = (obj, selector) => {
return selector.split('.').reduce(function(a, b){
return a[b];
}, obj);
};
/**
* init tooltip for a "DataTables" Cell
* @param api
@@ -274,7 +262,7 @@ define([
$(this).tooltip({
container: 'body',
title: String( getDescendantProp(rowData, titleSelector) ),
title: Util.getObjVal(rowData, titleSelector),
placement: 'left',
delay: 100
}).tooltip('show');
@@ -393,7 +381,7 @@ define([
info: false,
searching: false,
hover: false,
autoWidth: false,
responsive: false, // true "hides" some columns on init (why?)
rowId: function(rowData){
return 'pf-local-row_' + rowData.id; // characterId
},
@@ -409,7 +397,7 @@ define([
className: [Util.config.helpDefaultClass, 'text-center'].join(' '),
data: 'jumps',
render: {
_: function(data, type, row, meta){
_: (data, type, row, meta) => {
let value = data;
if(type === 'display'){
if(value === 0){
@@ -431,7 +419,7 @@ define([
className: [Util.config.helpDefaultClass, 'text-center', config.tableCellImageClass].join(' '),
data: 'log.ship',
render: {
_: function(data, type, row, meta){
_: (data, type, row, meta) => {
let value = data.typeName;
if(type === 'display'){
value = '<img src="' + Init.url.ccpImageServer + '/Render/' + data.typeId + '_32.png"/>';
@@ -450,7 +438,7 @@ define([
width: '80px',
data: 'log.ship',
render: {
_: function(data, type, row, meta){
_: (data, type, row, meta) => {
let value = data.name;
if(type === 'display'){
value = '<div class="' + MapUtil.config.tableCellEllipsisClass + ' ' + MapUtil.config.tableCellEllipsis80Class + '">' + data.name + '</div>';
@@ -465,7 +453,7 @@ define([
title: 'pilot',
data: 'name',
render: {
_: function(data, type, row, meta){
_: (data, type, row, meta) => {
let value = data;
if(type === 'display'){
value = '<div class="' + MapUtil.config.tableCellEllipsisClass + ' ' + MapUtil.config.tableCellEllipsis90Class + '">' + data + '</div>';
@@ -481,7 +469,7 @@ define([
className: [Util.config.helpDefaultClass].join(' '),
data: 'log',
render: {
_: function(data, type, row, meta){
_: (data, type, row, meta) => {
let value = '';
if(type === 'display'){
if(data.station && data.station.id > 0){
@@ -511,7 +499,7 @@ define([
className: [config.tableCellActionClass].join(' '),
data: 'id',
render: {
_: function(data, type, row, meta){
_: (data, type, row, meta) => {
let value = data;
if(type === 'display'){
value = '<i class="fas fa-id-card ' + config.tableCellActionIconClass + '"></i>';

View File

@@ -7,7 +7,7 @@ define([
'app/init',
'app/util',
'app/map/util'
], function($, Init, Util, MapUtil){
], ($, Init, Util, MapUtil) => {
'use strict';
let config = {
@@ -43,7 +43,7 @@ define([
* @param mapElement
* @returns {*}
*/
let getMapObjectFromMapElement = (mapElement) => {
let getMapObjectFromMapElement = mapElement => {
let Map = require('app/map/map');
return Map.getMapInstance( mapElement.data('id') );
};
@@ -53,7 +53,7 @@ define([
* @param overlayIcon
* @returns {*}
*/
let getMapObjectFromOverlayIcon = (overlayIcon) => {
let getMapObjectFromOverlayIcon = overlayIcon => {
let mapElement = Util.getMapElementFromOverlay(overlayIcon);
return getMapObjectFromMapElement( mapElement );
@@ -173,7 +173,7 @@ define([
* @param parts
* @returns {string}
*/
let formatTimeParts = (parts) => {
let formatTimeParts = parts => {
let label = '';
if(parts.days){
label += parts.days + 'd ';
@@ -187,7 +187,7 @@ define([
* hide default icon and replace it with "loading" icon
* @param iconElement
*/
let showLoading = (iconElement) => {
let showLoading = iconElement => {
iconElement = $(iconElement);
let dataName = 'default-icon';
let defaultIconClass = iconElement.data(dataName);
@@ -206,7 +206,7 @@ define([
* hide "loading" icon and replace with default icon
* @param iconElement
*/
let hideLoading = (iconElement) => {
let hideLoading = iconElement => {
iconElement = $(iconElement);
let dataName = 'default-icon';
let defaultIconClass = iconElement.data(dataName);

View File

@@ -83,7 +83,7 @@ define([
});
// tooltips ---------------------------------------------------------------------------------------------------
body.initTooltips();
body.find('[title]').tooltip();
// change url (remove logout parameter)
if(history.pushState){
@@ -152,14 +152,21 @@ define([
* @param data
*/
let updateWebSocketPanel = (data) => {
let badgeSocketWarning = $('.navbar a[data-anchor="#pf-setup-socket"] .txt-color-warning');
let badgeSocketDanger = $('.navbar a[data-anchor="#pf-setup-socket"] .txt-color-danger');
let socketWarningCount = parseInt(badgeSocketWarning.text()) || 0;
let socketDangerCount = parseInt(badgeSocketDanger.text()) || 0;
if(data.uri){
let uriRow = webSocketPanel.find('.panel-body table tr');
uriRow.find('td:nth-child(2) kbd').html(data.uri.value);
if(data.uri.status){
let statusIcon = uriRow.find('td:nth-child(3) i');
removeColorClasses(statusIcon);
statusIcon.toggleClass('fa-exclamation-triangle', false).toggleClass('fa-check', true).addClass('txt-color-success');
// update head badge. "Decrease" warning count, default for "URI" connection is "warn + 1"
socketWarningCount--;
}
}
@@ -167,7 +174,23 @@ define([
let footer = webSocketPanel.find('.panel-footer h3');
removeColorClasses(footer);
footer.text(data.status.label).addClass(data.status.class);
// update head badge
switch(data.status.type){
case 'success':
socketWarningCount = '';
socketDangerCount = '';
break;
case 'warning':
break;
case 'danger':
socketDangerCount = 1;
break;
}
}
badgeSocketWarning.text(socketWarningCount ? socketWarningCount : '');
badgeSocketDanger.text(socketDangerCount ? socketDangerCount : '');
};
// update initial
@@ -177,6 +200,7 @@ define([
status: true
},
status: {
type: 'warning',
label: 'CONNECTING...',
class: 'txt-color-warning'
}
@@ -188,6 +212,7 @@ define([
socket.onopen = (e) => {
updateWebSocketPanel({
status: {
type: 'warning',
label: 'OPEN wait for response...',
class: 'txt-color-warning'
}
@@ -209,6 +234,7 @@ define([
// SUCCESS
updateWebSocketPanel({
status: {
type: 'success',
label: 'CONNECTED',
class: 'txt-color-success'
}
@@ -217,6 +243,7 @@ define([
// Got response but INVALID
updateWebSocketPanel({
status: {
type: 'warning',
label: 'INVALID RESPONSE',
class: 'txt-color-warning'
}
@@ -228,6 +255,7 @@ define([
socket.onerror = (e) => {
updateWebSocketPanel({
status: {
type: 'danger',
label: 'CONNECTION ERROR',
class: 'txt-color-danger'
}
@@ -239,6 +267,7 @@ define([
socket.onclose = (closeEvent) => {
updateWebSocketPanel({
status: {
type: 'danger',
label: 'CONNECTION FAILED',
class: 'txt-color-danger'
}

View File

@@ -4,30 +4,7 @@
<include href="img/logo.svg"/>
{* counter for DB warnings (all databases) *}
<set dbWarnings="0" />
<nav id="pf-navbar" class="navbar navbar-default navbar-fixed-top pf-head">
<div class="container col-sm-12">
<div id="pf-head" class="navbar-header">
<span class="navbar-brand pf-head-menu">
<svg class="pf-head-menu-logo" width="24px" height="24px">
<use xlink:href="#pf-logo"/>
</svg>
&nbsp;&nbsp;Setup
</span>
</div>
<div class="navbar-collapse">
<ul class="nav navbar-nav navbar-right" role="tablist">
<li class="hide-before"><a class="page-scroll" data-anchor="#pf-setup-server" href="#"><i class="fas fa-fw fa-home"></i>&nbsp;Server</a></li>
<li class="hide-before"><a class="page-scroll" data-anchor="#pf-setup-environment" href="#"><i class="fas fa-fw fa-server"></i>&nbsp;Environment</a></li>
<li class="hide-before"><a class="page-scroll" data-anchor="#pf-setup-settings" href="#"><i class="fas fa-fw fa-sliders-h"></i>&nbsp;Settings</a></li>
<li class="hide-before"><a class="page-scroll" data-anchor="#pf-setup-database" href="#"><i class="fas fa-fw fa-database"></i>&nbsp;Database</a></li>
<li class="hide-before"><a class="page-scroll" data-anchor="#pf-setup-socket" href="#"><i class="fas fa-fw fa-exchange-alt"></i>&nbsp;Socket</a></li>
<li class="hide-before"><a class="page-scroll" data-anchor="#pf-setup-administration" href="#"><i class="fas fa-fw fa-wrench"></i>&nbsp;Administration</a></li>
</ul>
</div>
</div>
</nav>
{{ @tplCounter('reset', 'database_warning_all') }}
<section id="pf-setup-server">
<div class="container">
@@ -213,6 +190,7 @@
</check>
</div>
</div>
{{ @tplCounter('add', 'server_warning', @tplCounter('get')) }}
{{ @tplCounter('reset') }}
</check>
</div>
@@ -250,6 +228,7 @@
</check>
</div>
</div>
{{ @tplCounter('add', 'environment_warning', @tplCounter('get')) }}
{{ @tplCounter('reset') }}
</div>
@@ -275,6 +254,7 @@
</check>
</div>
</div>
{{ @tplCounter('add', 'environment_warning', @tplCounter('get')) }}
{{ @tplCounter('reset') }}
{* Redis requirements *}
@@ -299,6 +279,7 @@
</check>
</div>
</div>
{{ @tplCounter('add', 'environment_warning', @tplCounter('get')) }}
{{ @tplCounter('reset') }}
</check>
</div>
@@ -437,7 +418,7 @@
<kbd class="txt-color txt-color-success">enabled</kbd>
</case>
<case value="0" break="true">
<kbd class="txt-color txt-color-warning">disabled</kbd>
<kbd>disabled</kbd>
</case>
<default>
<kbd>{{ @mapTypeConfValue }}</kbd>
@@ -471,22 +452,22 @@
<set dbConnectionStatus="OK" />
<set dbStatusCheck="OK" />
<check if="{{ @dbInformation.info.dbCreate }}">
<true>
<set dbConnectionStatus="Database not found" />
<set dbWarnings="{{ @dbWarnings }} + 1" />
{{ @tplCounter('increment', 'database_danger') }}
{{ @tplCounter('increment', 'database_warning_all') }}
</true>
<false>
<check if="{{ !@dbInformation.info.connected }}">
<set dbConnectionStatus="Connection failed" />
<set dbWarnings="{{ @dbWarnings }} + 1" />
{{ @tplCounter('increment', 'database_danger') }}
{{ @tplCounter('increment', 'database_warning_all') }}
</check>
</false>
</check>
<div class="col-xs-12 col-md-6 pf-landing-pricing-panel">
<div class="panel panel-default pricing-big">
@@ -857,7 +838,8 @@
<check if="{{ @dbInformation.info.statusCheckCount > 0 }}">
<true>
<h3 class="panel-title txt-color txt-color-warning">{{ @dbInformation.info.statusCheckCount }} warning</h3>
<set dbWarnings="{{ @dbWarnings }} + {{ @dbInformation.info.statusCheckCount }}" />
{{ @tplCounter('add', 'database_warning', @dbInformation.info.statusCheckCount) }}
{{ @tplCounter('add', 'database_warning_all', @dbInformation.info.statusCheckCount) }}
</true>
<false>
<h3 class="panel-title txt-color txt-color-success">{{ @dbConnectionStatus }}</h3>
@@ -894,7 +876,7 @@
<div class="panel-footer btn-group btn-group-justified">
<check if="{{ @dbInformation.info.dbCreate }}">
<true>
<a href="?action=createDB&db={{ @dbKey }}#pf-setup-database" class="btn btn-success {{ true ?'':'disabled' }}" title="Try to create new '{{ @dbInformation.info.name }}' database.">
<a href="?action=createDB&db={{ @dbKey }}#pf-setup-database" class="btn btn-success {{ true ?'':'disabled' }}" title="Try to create new '{{ @dbInformation.info.name }}' database." data-container="body">
<i class="fas fa-fw fa-plus"></i> Create database
</a>
</true>
@@ -922,7 +904,7 @@
<section id="pf-setup-socket">
<div class="container">
<h4><i class="fas fa-fw fa-exchange-alt"></i> Socket configuration <span class="txt-color txt-color-gray">[advanced]</span></h4>
<h4><i class="fas fa-fw fa-exchange-alt"></i> Socket configuration <span class="txt-color txt-color-gray">[optional]</span></h4>
<div class="row text-center">
@@ -949,6 +931,7 @@
</true>
<false>
<i class="fas fa-fw fa-exclamation-triangle txt-color txt-color-warning"></i>
{{ @tplCounter('increment', 'socket_warning') }}
</false>
</check>
</td>
@@ -965,6 +948,7 @@
</true>
<false>
<h3 class="panel-title txt-color txt-color-danger">INIT CONNECTION...</h3>
{{ @tplCounter('increment', 'socket_danger') }}
</false>
</check>
</div>
@@ -994,7 +978,7 @@
Index data
<i class="fas fa-fw fa-sm fa-question-circle pf-help-light" title="
Indexed data is required for some queries (e.g. route finder module, static wormholes,... ).
Building/Importing data may take a while (~20s). Increase 'max_execution_time' if you run into PHP timeouts."></i>
Building/Importing data may take a while (~20s). Increase 'max_execution_time' if you run into PHP timeouts." data-container="body"></i>
</h3>
</div>
@@ -1011,12 +995,14 @@
</check>
<check if="{{ @indexData.countBuild > 0 && @indexData.countBuild < @indexData.countAll}}">
<kbd class="txt-color txt-color-warning">{{ @indexData.countBuild }}/{{ @indexData.countAll }}</kbd>
{{ @tplCounter('increment', 'administration_warning') }}
</check>
<check if="{{ @indexData.countBuild <= 0 }}">
<kbd class="txt-color txt-color-danger">{{ @indexData.countBuild }}/{{ @indexData.countAll }}</kbd>
{{ @tplCounter('increment', 'administration_danger') }}
</check>
<check if="{{ @indexData.tooltip }}">
<i class="fas fa-fw fa-sm fa-question-circle pf-help-light" title="{{ @indexData.tooltip }}"></i>
<i class="fas fa-fw fa-sm fa-question-circle pf-help-light" title="{{ @indexData.tooltip }}" data-container="body"></i>
</check>
</check>
</div>
@@ -1026,7 +1012,7 @@
<a href="?action={{ @taskData.action }}&model={{ @type }}#pf-setup-administration"
data-type="{{ @type }}" data-action="{{ @taskData.action }}"
data-loading-text="<i class='fas fa-sync fa-spin'></i>&nbsp;&nbsp;wait&hellip;<div class='btn-progress'></div>" autocomplete="off"
class="btn {{ @taskData.btn }} {{ @taskData.btn=='btn-default' && !@indexData.countBuild ?'disabled':'' }} {{ @dbWarnings ?'disabled':'' }}" role="button">
class="btn {{ @taskData.btn }} {{ @taskData.btn=='btn-default' && !@indexData.countBuild ?'disabled':'' }} {{ @tplCounter('get', 'database_warning_all') ?'disabled':'' }}" role="button">
<i class="fas {{ @taskData.icon }}"></i>&nbsp;&nbsp;{{ @taskData.label }}
</a>
</repeat>
@@ -1133,5 +1119,31 @@
</div>
</section>
{* Top navigation *}
<nav id="pf-navbar" class="navbar navbar-default navbar-fixed-top pf-head">
<div class="container col-sm-12">
<div id="pf-head" class="navbar-header">
<span class="navbar-brand pf-head-menu">
<svg class="pf-head-menu-logo" width="24px" height="24px">
<use xlink:href="#pf-logo"/>
</svg>
&nbsp;&nbsp;Setup
</span>
</div>
<div class="navbar-collapse">
<ul class="nav navbar-nav navbar-right" role="tablist">
<repeat group="{{ @tplNavigation }}" key="{{ @navKey }}" value="{{ @navConfig }}">
<li class="hide-before">
<a class="page-scroll" data-anchor="#pf-setup-{{ @navKey }}" href="#"><i class="fas fa-fw {{ @navConfig.icon }}"></i>&nbsp;{{ lcfirst(@navKey) }}
<span class="badge txt-color txt-color-warning" title="warning" data-placement="bottom">{{ @tplCounter('get', @navKey . '_warning') }}</span>
<span class="badge txt-color txt-color-danger" title="error" data-placement="bottom">{{ @tplCounter('get', @navKey . '_danger') }}</span>
</a>
</li>
</repeat>
</ul>
</div>
</div>
</nav>
TREST: {{ @tplCounter('get', 'database_warning_all') }}
{* footer *}
<include href="templates/ui/footer.html"/>

View File

@@ -1389,6 +1389,10 @@ code {
.badge{
background-color: $gray;
color: $gray-lighter;
&:empty{
display: none;
}
}
small{