Skip to content

Commit

Permalink
Changes 1.2.10
Browse files Browse the repository at this point in the history
  • Loading branch information
rkemmere committed Mar 11, 2020
1 parent 933eb99 commit 09389d8
Show file tree
Hide file tree
Showing 14 changed files with 106 additions and 40 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## Version 1.2.10 // 11.03.2020

# Plugin: Server 1.2.6
* Versions-Auswahl um R5.9.0 und R5.10.0 erweitert
* Tablesorter in Listenansicht angepasst
* Lesbare Darstellung vom Datum in Listen- und Detailansicht

# Plugin: Client 1.0.7
* Syslog Abfrage für > R5.9 geändert

# Plugin: Pagespeed 1.2.1
* Lesbare Darstellung vom Datum in Listenansicht

# Plugin: Hosting 1.0.4
* Lesbare Darstellung vom Datum in Listenansicht
* Notices entfernt


## Version 1.2.9 // 27.11.2019

## Plugin: Server 1.2.5
Expand Down
2 changes: 1 addition & 1 deletion package.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package: project_manager
version: '1.2.9'
version: '1.2.10'
author: 'Friends Of REDAXO'
supportpage: https://github.com/FriendsOfREDAXO/project_manager

Expand Down
8 changes: 6 additions & 2 deletions plugins/client/lib/rex_api_project_manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ public function execute()

# SYSLOG

$log = new rex_log_file(rex_path::coreData('system.log'));
if (version_compare(rex::getVersion(), '5.9') >= 0) {
$log = new rex_log_file(rex_path::log('system.log'));
} else {
$log = new rex_log_file(rex_path::coreData('system.log'));
}

$i = 0;
foreach (new LimitIterator($log, 0, 30) as $entry) {
Expand Down Expand Up @@ -139,4 +143,4 @@ public function execute()
}
}

?>
?>
2 changes: 1 addition & 1 deletion plugins/client/package.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package: project_manager/client
version: '1.0.6'
version: '1.0.7'
author: 'Friends Of REDAXO, Manétage - Ronny Kemmereit, Alexander Walther'
supportpage: https://github.com/FriendsOfREDAXO/project_manager

Expand Down
4 changes: 2 additions & 2 deletions plugins/hosting/package.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package: project_manager/hosting
version: '1.0.3'
author: 'Friends Of REDAXO, Manétage - Ronny Kemmereit, Alexander Walther'
version: '1.0.4'
author: 'Friends Of REDAXO'
supportpage: https://github.com/FriendsOfREDAXO/project_manager

page:
Expand Down
14 changes: 7 additions & 7 deletions plugins/hosting/pages/content.hosting.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@
if (is_numeric($raw['validTo'])) {

if ($raw['validTo'] < (time() + 2764800) ) {
$validTo = '<span data-color="alert-warning">'.date('Y-m-d H:i:s', $raw['validTo']).'</span>';
$validFrom = date('Y-m-d H:i:s', $raw['validFrom']);
$validTo = '<span data-color="alert-warning">'.rex_formatter::format($raw['validTo'],'date','d.m.Y H:i:s').'</span>';
$validFrom = rex_formatter::format($raw['validFrom'],'date','d.m.Y H:i:s');
} else if ($raw['validTo'] < time()) {
$validTo = '<span data-color="alert-danger">'.date('Y-m-d H:i:s', $raw['validTo']).'</span>';
$validFrom = date('Y-m-d H:i:s', $raw['validFrom']);
$validTo = '<span data-color="alert-danger">'.rex_formatter::format($raw['validTo'],'date','d.m.Y H:i:s').'</span>';
$validFrom = rex_formatter::format($raw['validFrom'],'date','d.m.Y H:i:s');
} else {
$validTo = date('Y-m-d H:i:s', $raw['validTo']);
$validFrom = date('Y-m-d H:i:s', $raw['validFrom']);
$validTo = rex_formatter::format($raw['validTo'],'date','d.m.Y H:i:s');
$validFrom = rex_formatter::format($raw['validFrom'],'date','d.m.Y H:i:s');
}
} else {
$validFrom = "-";
$validTo = "-";
}

$output = '<table class="table table-striped"><thead><tr><th>'.$this->i18n('organisation').'</th><th>'.$this->i18n('isp').'</th><th>'. $this->i18n('project_manager_hosting_ip').'</th><th>'.$this->i18n('validFrom').'</th><th>'.$this->i18n('validTo').'</th></tr></thead><tbody>';
$output .= '<tr><td>'.$raw['org'].'</td><td>'.$raw['isp'].'<br />'.$raw['zip'].' '.$raw['city'].'<br />'.$raw['country'].'</td><td>'.$item['ip'].'</td><td class="project-manager rex-table-validFrom">'.$validFrom.'</td><td class="project-manager rex-table-validTo">'.$validTo.'</td></tr>';
$output .= '<tr><td>'.(isset($raw['org']) ? $raw['org'] : '').'</td><td>'.(isset($raw['isp']) ? $raw['isp'] : '').'<br />'.(isset($raw['zip']) ? $raw['zip'] : '').' '.(isset($raw['city']) ? $raw['city'] : '').'<br />'.(isset($raw['country']) ? $raw['country'] : '').'</td><td>'.(isset($item['ip']) ? $item['ip']: '').'</td><td class="project-manager rex-table-validFrom">'.$validFrom.'</td><td class="project-manager rex-table-validTo">'.$validTo.'</td></tr>';
$output .= '</tbody></table>';
}

Expand Down
9 changes: 6 additions & 3 deletions plugins/hosting/pages/project_manager.hosting.overview.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@
$list->setColumnParams('name', ['page' => 'project_manager/server/projects', 'func' => 'updateinfos', 'domain' => '###domain###']);

$list->setColumnLabel('createdate_psi', $this->i18n('project_manager_hosting_updatedate'));
$list->setColumnFormat('createdate_psi', 'custom', function ($params) {
return (rex_formatter::format($params['list']->getValue('createdate_psi'),'date','d.m.Y H:i:s'));
});

// icon column (Domain hinzufügen bzw. bearbeiten)
$thIcon = '<a href="'.$list->getUrl(['func' => 'domain_add']).'"><i class="rex-icon rex-icon-add-category"></i></a>';
Expand Down Expand Up @@ -142,11 +145,11 @@
if (is_numeric($raw['validTo'])) {

if ($raw['validTo'] < (time() + 2764800) ) {
return '<span data-color="alert-warning">'.date('Y-m-d H:i:s', $raw['validTo']).'</span>';
return '<span data-color="alert-warning">'.rex_formatter::format($raw['validTo'],'date','d.m.Y H:i:s').'</span>';
} else if ($raw['validTo'] < time()) {
return '<span data-color="alert-danger">'.date('Y-m-d H:i:s', $raw['validTo']).'</span>';
return '<span data-color="alert-danger">'.rex_formatter::format($raw['validTo'],'date','d.m.Y H:i:s').'</span>';
} else {
return date('Y-m-d H:i:s', $raw['validTo']);
return rex_formatter::format($raw['validTo'],'date','d.m.Y H:i:s');
}
} else {
return "-";
Expand Down
4 changes: 2 additions & 2 deletions plugins/pagespeed/package.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package: project_manager/pagespeed
version: '1.2.0'
author: 'Friends Of REDAXO, Manétage - Ronny Kemmereit, Alexander Walther'
version: '1.2.1'
author: 'Friends Of REDAXO'
supportpage: https://github.com/FriendsOfREDAXO/project_manager

page:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@
$list->setColumnParams('name', ['page' => 'project_manager/server/projects', 'func' => 'updateinfos', 'domain' => '###domain###']);

$list->setColumnLabel('createdate_psi', $this->i18n('project_manager_pagespeed_updatedate'));
$list->setColumnFormat('createdate_psi', 'custom', function ($params) {
return (rex_formatter::format($params['list']->getValue('createdate_psi'),'date','d.m.Y H:i:s'));
});

// icon column (Domain hinzufügen bzw. bearbeiten)
$thIcon = '<a href="'.$list->getUrl(['func' => 'domain_add']).'"><i class="rex-icon rex-icon-add-category"></i></a>';
Expand Down Expand Up @@ -116,7 +119,8 @@
return '<a href="http://www.'.$params['list']->getValue('domain').'/?rex-api-call=project_manager&api_key='.$params['list']->getValue('api_key').'"><span class="rex-icon fa-question"></span></a>';
}
});
$list->setColumnLayout('status', ['<th data-sorter="digit">###VALUE###</th>', '<td>###VALUE###</td>']);

$list->setColumnLayout('status', ['<th data-sorter="digit">###VALUE###</th>', '<td>###VALUE###</td>']);


$list->addColumn("Pagespeed", false, -1, ['<th>PageSpeed</th>', '<td data-title="psi" width="150px">###VALUE###</td>']);
Expand Down
38 changes: 36 additions & 2 deletions plugins/server/assets/js/tablesorter-custom.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,45 @@
$(document).on('rex:ready', function (event, container) {
$(".project_manager-tablesorter").tablesorter({
$("#rex-page-project-manager-server-overview .project_manager-tablesorter").tablesorter({
theme : 'default',
widthFixed: true,
widgets: ["saveSort"],
widgetOptions: {
saveSort: true
},
headers: { 0: { sorter: false} }
dateFormat : "ddmmyyyy",
headers: {
0: { sorter: false},
5: { sorter: "shortDate", dateFormat: "ddmmyyyy" },
6: { sorter: 'text' },
7: { sorter: 'text' }
}

});
$("#rex-page-project-manager-hosting-overview .project_manager-tablesorter").tablesorter({
theme : 'default',
widthFixed: true,
widgets: ["saveSort"],
widgetOptions: {
saveSort: true
},
dateFormat : "ddmmyyyy",
headers: {
0: { sorter: false},
7: { sorter: "shortDate", dateFormat: "ddmmyyyy" }
}
});
$("#rex-page-project-manager-pagespeed-overview .project_manager-tablesorter").tablesorter({
theme : 'default',
widthFixed: true,
widgets: ["saveSort"],
widgetOptions: {
saveSort: true
},
dateFormat : "ddmmyyyy",
headers: {
0: { sorter: false},
4: { sorter: "shortDate", dateFormat: "ddmmyyyy" }
}
});

});
4 changes: 2 additions & 2 deletions plugins/server/package.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package: project_manager/server
version: '1.2.5'
author: 'Friends Of REDAXO, Manétage - Ronny Kemmereit, Alexander Walther'
version: '1.2.6'
author: 'Friends Of REDAXO'
supportpage: https://github.com/FriendsOfREDAXO/project_manager

page:
Expand Down
2 changes: 2 additions & 0 deletions plugins/server/pages/project_manager.server.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
$select->addOption('5.7.1', '5.7.1');
$select->addOption('5.8.0', '5.8.0');
$select->addOption('5.8.1', '5.8.1');
$select->addOption('5.9.0', '5.9.0');
$select->addOption('5.10.0', '5.10.0');
$select->setSelected($this->getConfig('cms_min'));
$n['field'] = $select->get();
$formElements[] = $n;
Expand Down
15 changes: 8 additions & 7 deletions plugins/server/pages/project_manager.server.overview.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
}

} else if ($func == 'edit') {


$yform->setValueField('text', ['api_key', $this->i18n('project_manager_server_api_key_info'), 'notice' => '<small>'.$this->i18n('api_key_notice').'</small>']);
$yform->setValidateField('empty', ['api_key', $this->i18n('no_api_key_defined')]);
Expand Down Expand Up @@ -227,15 +226,16 @@
if (substr($raw['cms_version'], 0, 1) == 4 ) { //if REX 4.x
if (array_key_exists('update_article', $raw) && array_key_exists('update_media', $raw)) {
if ($raw['update_media'] > $raw['update_article']) {
return date('Y-m-d H:i:s', $raw['update_media']);
return date('d.m.Y H:i:s', $raw['update_media']);
} else {
return date('Y-m-d H:i:s', $raw['update_article']);
return date('d.m.Y H:i:s', $raw['update_article']);
}
} else {
return "-";
}
} else { //if REX 5.x
return date('Y-m-d H:i:s', strtotime($raw['article'][0]['updatedate']));
return date('d.m.Y H:i:s', strtotime($raw['article'][0]['updatedate']));

}
}
});
Expand Down Expand Up @@ -294,8 +294,8 @@
} else {
return $raw['cms_version'];
}
} else if ($params['list']->getValue('cms') == '5') {
if ( $raw['cms_version'] < $cms_min) {
} else if ($params['list']->getValue('cms') == '5') {
if (version_compare($raw['cms_version'], $cms_min) < 0 ) {
return '<span data-color="alert-danger">'.$raw['cms_version'].'</span>';
} else {
return $raw['cms_version'];
Expand All @@ -314,7 +314,8 @@
if($params['list']->getValue('raw')) {
$raw= json_decode($params['list']->getValue('raw'), true);
$php_min = rex_config::get('project_manager/server', 'php_min');
if ( $raw['php_version'] < $php_min) {

if (version_compare($raw['php_version'], $php_min) < 0 ) {
return '<span data-color="alert-danger">'.substr($raw['php_version'],0,3).'</span>';
} else {
return substr($raw['php_version'],0,3);
Expand Down
20 changes: 10 additions & 10 deletions plugins/server/pages/project_manager.server.projects.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@
$output = '<table class="table table-striped"><thead><tr><th>Letzte Änderung</th><th>Datum</th></tr></thead><tbody>';

if (array_key_exists('update_article', $raw) && array_key_exists('update_media', $raw)) {
$output .= '<tr><td>Artikel</td><td>'.date('Y-m-d H:i:s', $raw['update_article']).'</td></tr>';
$output .= '<tr><td>Medienpool</td><td>'.date('Y-m-d H:i:s', $raw['update_media']).'</td></tr>';
$output .= '<tr><td>Artikel</td><td>'.date('d.m.Y H:i:s', $raw['update_article']).'</td></tr>';
$output .= '<tr><td>Medienpool</td><td>'.date('d.m.Y H:i:s', $raw['update_media']).'</td></tr>';
}

$output .= '<tr><td>Synchronisierung mit Projekt Manager</td><td>'.$item['updatedate'].'</td></tr>';
$output .= '<tr><td>Synchronisierung mit Projekt Manager</td><td>'.date('d.m.Y H:i:s', $item['updatedate']).'</td></tr>';
$output .= '</tbody></table>';

$fragment = new rex_fragment();
Expand Down Expand Up @@ -145,9 +145,9 @@

// UPDATES
$output = '<table class="table table-striped"><thead><tr><th>Letzte Änderung</th><th>Datum</th></tr></thead><tbody>';
$output .= '<tr><td>Artikel</td><td>'.$raw['article'][0]['updatedate'].'</td></tr>';
$output .= '<tr><td>Medienpool</td><td>'.$raw['media'][0]['updatedate'].'</td></tr>';
$output .= '<tr><td>Synchronisierung mit Projekt Manager</td><td>'.$item['updatedate'].'</td></tr>';
$output .= '<tr><td>Artikel</td><td>'.rex_formatter::format($raw['article'][0]['updatedate'],'date','d.m.Y H:i:s').'</td></tr>';
$output .= '<tr><td>Medienpool</td><td>'.rex_formatter::format($raw['media'][0]['updatedate'],'date','d.m.Y H:i:s').'</td></tr>';
$output .= '<tr><td>Synchronisierung mit Projekt Manager</td><td>'.rex_formatter::format($item['updatedate'],'date','d.m.Y H:i:s').'</td></tr>';
$output .= '</tbody></table>';

$fragment = new rex_fragment();
Expand All @@ -166,7 +166,7 @@
$output .= '<tr>';
$output .= '<td>'.$login["name"].'</td>';
$output .= '<td>'.$login["login"].'</td>';
$output .= '<td>'.$login["lastlogin"].'</td>';
$output .= '<td>'.rex_formatter::format($login["lastlogin"],'date','d.m.Y H:i:s').'</td>';
$output .= '</tr>';
}
$output .= '</tbody></table>';
Expand All @@ -192,7 +192,7 @@
$output .= '<tr>';
$output .= '<td>'.$article["name"].'</td>';
$output .= '<td>'.$article["updateuser"].'</td>';
$output .= '<td>'.$article["updatedate"].'</td>';
$output .= '<td>'.rex_formatter::format($article["updatedate"],'date','d.m.Y H:i:s').'</td>';
$output .= '</tr>';
}
$output .= '</tbody></table>';
Expand All @@ -213,7 +213,7 @@
$output .= '<tr>';
$output .= '<td>'.$file["filename"].'</td>';
$output .= '<td>'.$file["updateuser"].'</td>';
$output .= '<td>'.$file["updatedate"].'</td>';
$output .= '<td>'.rex_formatter::format($file["updatedate"],'date','d.m.Y H:i:s').'</td>';
$output .= '</tr>';
}
$output .= '</tbody></table>';
Expand All @@ -237,7 +237,7 @@
foreach ($modules as $file) {
$output .= '<tr>';
$output .= '<td>'.$file["name"].'</td>';
$output .= '<td>'.$file["updatedate"].'</td>';
$output .= '<td>'.rex_formatter::format($file["updatedate"],'date','d.m.Y H:i:s').'</td>';
$output .= '</tr>';
}
$output .= '</tbody></table>';
Expand Down

0 comments on commit 09389d8

Please sign in to comment.