- new clock element showing current EVE server time, closed #602

- small UI fixes
This commit is contained in:
Mark Friedrich
2018-03-26 23:04:48 +02:00
parent e3109e6663
commit 418ae20d98
11 changed files with 90 additions and 31 deletions

View File

@@ -403,19 +403,12 @@ class Route extends Controller\AccessController {
* @throws \Exception\PathfinderException
*/
public function searchRoute(int $systemFromId, int $systemToId, $searchDepth = 0, array $mapIds = [], array $filterData = []) : array {
// search root by ESI API
$routeData = $this->searchRouteESI($systemFromId, $systemToId, $searchDepth, $mapIds, $filterData);
self::getLogger('DEBUG')->write('NEW searchRouteESI() --------------------------------------------------');
self::getLogger('DEBUG')->write(print_r($routeData, true));
if( !empty($routeData['error']) ){
// ESI route search has errors -> fallback to custom search implementation
$routeDataTest = $this->searchRouteCustom($systemFromId, $systemToId, $searchDepth, $mapIds, $filterData);
self::getLogger('DEBUG')->write('NEW searchRouteCustom() --------------------------------------------------');
self::getLogger('DEBUG')->write(print_r($routeDataTest, true));
$routeData = $this->searchRouteCustom($systemFromId, $systemToId, $searchDepth, $mapIds, $filterData);
}
return $routeData;

View File

@@ -119,21 +119,21 @@ define([
columnDefs: [
{
targets: 0,
title: '<i class="fas fa-lg fa-tag"></i>',
title: '<i class="fas fa-tag"></i>',
width: '18px',
searchable: false,
class: ['text-center'].join(' '),
data: 'status'
},{
targets: 1,
title: '<i class="far fa-lg fa-fw fa-clock"></i>&nbsp;&nbsp;',
title: '<i class="far fa-fw fa-clock"></i>&nbsp;&nbsp;',
width: '50px',
searchable: true,
class: 'text-right',
data: 'time'
},{
targets: 2,
title: '<i class="fas fa-lg fa-fw fa-history"></i>&nbsp;&nbsp;',
title: '<i class="fas fa-fw fa-history"></i>&nbsp;&nbsp;',
width: '35px',
searchable: false,
class: 'text-right',

View File

@@ -63,6 +63,7 @@ define([
// menu
menuHeadMenuLogoClass: 'pf-head-menu-logo', // class for main menu logo
menuClockClass: 'pf-menu-clock', // class for EVE-Time clock
// helper element
dynamicElementWrapperId: 'pf-dialog-wrapper',
@@ -290,6 +291,10 @@ define([
).on('click', function(){
$(document).triggerMenuEvent('Logout', {clearCookies: 1});
})
).append(
$('<div>', {
class: config.menuClockClass
})
)
);
@@ -787,6 +792,29 @@ define([
return false;
});
initEveClock();
};
/**
* init clock element with current EVE time
*/
let initEveClock = () => {
let clockElement = $('.' + config.menuClockClass);
let checkTime = (i) => {
return (i < 10) ? '0' + i : i;
};
let startTime = () => {
let date = Util.getServerTime();
let h = date.getHours();
let m = checkTime(date.getMinutes());
clockElement.text(h + ':' + m);
let t = setTimeout(startTime, 500);
};
startTime();
};
/**

View File

@@ -507,7 +507,7 @@ define([
title: 'region',
data: 'region'
},{
title: '<i class="far fa-square fa-lg" title="system&nbsp;status" data-toggle="tooltip"></i>',
title: '<i class="far fa-square" title="system&nbsp;status" data-toggle="tooltip"></i>',
width: '12px',
searchable: false,
data: 'status',
@@ -516,7 +516,7 @@ define([
sort: 'status_sort'
}
},{
title: '<i class="fas fa-square fa-lg" title="system&nbsp;effect" data-toggle="tooltip"></i>',
title: '<i class="fas fa-square" title="system&nbsp;effect" data-toggle="tooltip"></i>',
width: '12px',
className: 'text-center',
searchable: false,
@@ -530,7 +530,7 @@ define([
width: '30px',
data: 'static'
},{
title: '<i class="fas fa-map-marker-alt fa-lg" title="your&nbsp;position" data-toggle="tooltip"></i>',
title: '<i class="fas fa-map-marker-alt" title="your&nbsp;position" data-toggle="tooltip"></i>',
width: '8px',
searchable: false,
data: 'position',
@@ -539,13 +539,13 @@ define([
sort: 'position_sort'
}
},{
title: '<i class="fas fa-plane fa-lg" title="active&nbsp;pilots" data-toggle="tooltip"></i>',
title: '<i class="fas fa-plane" title="active&nbsp;pilots" data-toggle="tooltip"></i>',
width: '12px',
className: 'text-center',
searchable: false,
data: 'userCount'
},{
title: '<i class="fas fa-lock fa-lg" title="system&nbsp;locked" data-toggle="tooltip"></i>',
title: '<i class="fas fa-lock" title="system&nbsp;locked" data-toggle="tooltip"></i>',
width: '10px',
searchable: false,
data: 'locked',
@@ -1112,7 +1112,7 @@ define([
},{
targets: 1,
name: 'timestamp',
title: '<i class="far fa-lg fa-fw fa-clock"></i>',
title: '<i class="far fa-fw fa-clock"></i>',
width: 100,
className: ['text-right'].join(' '),
data: 'datetime.date',
@@ -1205,7 +1205,7 @@ define([
data: 'context.data.formatted'
},{
targets: 8,
title: '<i class="fas fa-lg fa-code text-right"></i>',
title: '<i class="fas fa-code text-right"></i>',
width: 12,
className: [config.tableCellActionClass].join(' '),
data: 'context.data',

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -119,21 +119,21 @@ define([
columnDefs: [
{
targets: 0,
title: '<i class="fas fa-lg fa-tag"></i>',
title: '<i class="fas fa-tag"></i>',
width: '18px',
searchable: false,
class: ['text-center'].join(' '),
data: 'status'
},{
targets: 1,
title: '<i class="far fa-lg fa-fw fa-clock"></i>&nbsp;&nbsp;',
title: '<i class="far fa-fw fa-clock"></i>&nbsp;&nbsp;',
width: '50px',
searchable: true,
class: 'text-right',
data: 'time'
},{
targets: 2,
title: '<i class="fas fa-lg fa-fw fa-history"></i>&nbsp;&nbsp;',
title: '<i class="fas fa-fw fa-history"></i>&nbsp;&nbsp;',
width: '35px',
searchable: false,
class: 'text-right',

View File

@@ -63,6 +63,7 @@ define([
// menu
menuHeadMenuLogoClass: 'pf-head-menu-logo', // class for main menu logo
menuClockClass: 'pf-menu-clock', // class for EVE-Time clock
// helper element
dynamicElementWrapperId: 'pf-dialog-wrapper',
@@ -290,6 +291,10 @@ define([
).on('click', function(){
$(document).triggerMenuEvent('Logout', {clearCookies: 1});
})
).append(
$('<div>', {
class: config.menuClockClass
})
)
);
@@ -787,6 +792,29 @@ define([
return false;
});
initEveClock();
};
/**
* init clock element with current EVE time
*/
let initEveClock = () => {
let clockElement = $('.' + config.menuClockClass);
let checkTime = (i) => {
return (i < 10) ? '0' + i : i;
};
let startTime = () => {
let date = Util.getServerTime();
let h = date.getHours();
let m = checkTime(date.getMinutes());
clockElement.text(h + ':' + m);
let t = setTimeout(startTime, 500);
};
startTime();
};
/**

View File

@@ -507,7 +507,7 @@ define([
title: 'region',
data: 'region'
},{
title: '<i class="far fa-square fa-lg" title="system&nbsp;status" data-toggle="tooltip"></i>',
title: '<i class="far fa-square" title="system&nbsp;status" data-toggle="tooltip"></i>',
width: '12px',
searchable: false,
data: 'status',
@@ -516,7 +516,7 @@ define([
sort: 'status_sort'
}
},{
title: '<i class="fas fa-square fa-lg" title="system&nbsp;effect" data-toggle="tooltip"></i>',
title: '<i class="fas fa-square" title="system&nbsp;effect" data-toggle="tooltip"></i>',
width: '12px',
className: 'text-center',
searchable: false,
@@ -530,7 +530,7 @@ define([
width: '30px',
data: 'static'
},{
title: '<i class="fas fa-map-marker-alt fa-lg" title="your&nbsp;position" data-toggle="tooltip"></i>',
title: '<i class="fas fa-map-marker-alt" title="your&nbsp;position" data-toggle="tooltip"></i>',
width: '8px',
searchable: false,
data: 'position',
@@ -539,13 +539,13 @@ define([
sort: 'position_sort'
}
},{
title: '<i class="fas fa-plane fa-lg" title="active&nbsp;pilots" data-toggle="tooltip"></i>',
title: '<i class="fas fa-plane" title="active&nbsp;pilots" data-toggle="tooltip"></i>',
width: '12px',
className: 'text-center',
searchable: false,
data: 'userCount'
},{
title: '<i class="fas fa-lock fa-lg" title="system&nbsp;locked" data-toggle="tooltip"></i>',
title: '<i class="fas fa-lock" title="system&nbsp;locked" data-toggle="tooltip"></i>',
width: '10px',
searchable: false,
data: 'locked',
@@ -1112,7 +1112,7 @@ define([
},{
targets: 1,
name: 'timestamp',
title: '<i class="far fa-lg fa-fw fa-clock"></i>',
title: '<i class="far fa-fw fa-clock"></i>',
width: 100,
className: ['text-right'].join(' '),
data: 'datetime.date',
@@ -1205,7 +1205,7 @@ define([
data: 'context.data.formatted'
},{
targets: 8,
title: '<i class="fas fa-lg fa-code text-right"></i>',
title: '<i class="fas fa-code text-right"></i>',
width: 12,
className: [config.tableCellActionClass].join(' '),
data: 'context.data',

View File

@@ -1,4 +1,4 @@
<div id="{{id}}" class="alert alert-warning">
<div class="ui-pnotify-icon"><span class="fas fa-exclamation fa-fw fa-lg"></span></div>
<h4 class="ui-pnotify-title">Scheduled maintenance: <small> Expect the server to shutdown 'soon'. ETA: ASAP ;) </small></h4>
<h4 class="ui-pnotify-title">Scheduled maintenance: <small> Server infrastructure upgrade. PHPv7.0 <i class="fas fa-long-arrow-alt-right"></i> v7.2; Shutdown: ~17:00 (UTC). ETA ~18:30 (UTC)</small></h4>
</div>

View File

@@ -1316,6 +1316,16 @@ code {
padding-right: 0; // verwrite default
}
}
// left menu ======================================================================================
.pf-menu-clock{
position: absolute;
bottom: 0;
width: 100%;
padding: 6px 8px;
text-align: center;
}
// global info panel ==============================================================================
#pf-global-info{
position: absolute;