diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json
index 53ea9fd..b1d199a 100644
--- a/Admin/Install/Navigation.install.json
+++ b/Admin/Install/Navigation.install.json
@@ -34,7 +34,7 @@
"type": 3,
"subtype": 1,
"name": "Import",
- "uri": "/{/lang}/backend/admin/exchange/import?{?}",
+ "uri": "/{/lang}/backend/admin/exchange/import/list?{?}",
"target": "self",
"icon": null,
"order": 5,
@@ -49,7 +49,7 @@
"type": 3,
"subtype": 1,
"name": "Export",
- "uri": "/{/lang}/backend/admin/exchange/export?{?}",
+ "uri": "/{/lang}/backend/admin/exchange/export/list?{?}",
"target": "self",
"icon": null,
"order": 10,
@@ -57,21 +57,6 @@
"permission": { "type": null, "element": null },
"parent": 1007001001,
"children": []
- },
- {
- "id": 1007002004,
- "pid": "/backend/admin/exchange",
- "type": 3,
- "subtype": 1,
- "name": "Setup",
- "uri": "/{/lang}/backend/admin/exchange/setup?{?}",
- "target": "self",
- "icon": null,
- "order": 15,
- "from": "Exchange",
- "permission": { "type": null, "element": null },
- "parent": 1007001001,
- "children": []
}
]
}
diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php
index 92d4125..5a507de 100644
--- a/Admin/Routes/Web/Backend.php
+++ b/Admin/Routes/Web/Backend.php
@@ -3,13 +3,25 @@
use phpOMS\Router\RouteVerb;
return [
- '^.*/backend/admin/exchange/import.*$' => [
+ '^.*/backend/admin/exchange/import/list.*$' => [
+ [
+ 'dest' => '\Modules\Exchange\Controller:viewExchangeImportList',
+ 'verb' => RouteVerb::GET,
+ ],
+ ],
+ '^.*/backend/admin/exchange/export/list.*$' => [
+ [
+ 'dest' => '\Modules\Exchange\Controller:viewExchangeExportList',
+ 'verb' => RouteVerb::GET,
+ ],
+ ],
+ '^.*/backend/admin/exchange/import/profile.*$' => [
[
'dest' => '\Modules\Exchange\Controller:viewExchangeImport',
'verb' => RouteVerb::GET,
],
],
- '^.*/backend/admin/exchange/export.*$' => [
+ '^.*/backend/admin/exchange/export/profile.*$' => [
[
'dest' => '\Modules\Exchange\Controller:viewExchangeExport',
'verb' => RouteVerb::GET,
@@ -21,10 +33,4 @@ return [
'verb' => RouteVerb::GET,
],
],
- '^.*/backend/admin/exchange/setup.*$' => [
- [
- 'dest' => '\Modules\Exchange\Controller:viewExchangeSetup',
- 'verb' => RouteVerb::GET,
- ],
- ],
];
diff --git a/Controller.php b/Controller.php
index dce18b4..ccc4a42 100644
--- a/Controller.php
+++ b/Controller.php
@@ -82,4 +82,49 @@ final class Controller extends ModuleAbstract implements WebInterface
*/
protected static $dependencies = [
];
+
+ public function viewExchangeDashboard(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable
+ {
+ $view = new View($this->app, $request, $response);
+ $view->setTemplate('/Modules/Exchange/Theme/Backend/exchange-dashboard');
+ $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1007001001, $request, $response));
+
+ return $view;
+ }
+
+ public function viewExchangeExportList(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable
+ {
+ $view = new View($this->app, $request, $response);
+ $view->setTemplate('/Modules/Exchange/Theme/Backend/exchange-export-list');
+ $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1007001001, $request, $response));
+
+ return $view;
+ }
+
+ public function viewExchangeImportList(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable
+ {
+ $view = new View($this->app, $request, $response);
+ $view->setTemplate('/Modules/Exchange/Theme/Backend/exchange-import-list');
+ $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1007001001, $request, $response));
+
+ return $view;
+ }
+
+ public function viewExchangeExport(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable
+ {
+ $view = new View($this->app, $request, $response);
+ $view->setTemplate('/Modules/Exchange/Theme/Backend/exchange-export');
+ $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1007001001, $request, $response));
+
+ return $view;
+ }
+
+ public function viewExchangeImport(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable
+ {
+ $view = new View($this->app, $request, $response);
+ $view->setTemplate('/Modules/Exchange/Theme/Backend/exchange-import');
+ $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1007001001, $request, $response));
+
+ return $view;
+ }
}
diff --git a/Theme/Backend/Lang/Navigation.en.lang.php b/Theme/Backend/Lang/Navigation.en.lang.php
index 224c035..cd6ae5c 100644
--- a/Theme/Backend/Lang/Navigation.en.lang.php
+++ b/Theme/Backend/Lang/Navigation.en.lang.php
@@ -15,5 +15,4 @@ return ['Navigation' => [
'Exchange' => 'Exchange',
'Export' => 'Export',
'Import' => 'Import',
- 'Setup' => 'Setup',
]];
diff --git a/Theme/Backend/exchange-dashboard.tpl.php b/Theme/Backend/exchange-dashboard.tpl.php
index 7381814..012ddfa 100644
--- a/Theme/Backend/exchange-dashboard.tpl.php
+++ b/Theme/Backend/exchange-dashboard.tpl.php
@@ -10,61 +10,8 @@
* @version 1.0.0
* @link http://website.orange-management.de
*/
-$logs = $this->app->logger->countLogs();
-$penetrators = $this->app->logger->getHighestPerpetrator();
+/**
+ * @var \phpOMS\Views\View $this
+ */
echo $this->getData('nav')->render(); ?>
-
-
-
-
- = $this->getHtml('System'); ?>
-
-
-
- | = $this->getHtml('OS'); ?> | = $this->printHtml(php_uname('s')); ?>
- |
| = $this->getHtml('Version'); ?> | = $this->printHtml(php_uname('v')); ?>
- |
| = $this->getHtml('Release'); ?> | = $this->printHtml(php_uname('r')); ?>
- |
| = $this->getHtml('RAMUsage'); ?> | = $this->printHtml(memory_get_usage(true)/(1024*1024)); ?> MB
- |
| = $this->getHtml('MemoryLimit'); ?> | = $this->printHtml(ini_get('memory_limit')); ?>
- |
| = $this->getHtml('SystemRAM'); ?> | = $this->printHtml(\phpOMS\System\SystemUtils::getRAM()/(1024)); ?> MB
- |
| = $this->getHtml('CPUUsage'); ?> | = $this->printHtml(\phpOMS\System\SystemUtils::getCpuUsage()); ?>%
- |
-
-
-
-
-
-
- = $this->getHtml('Logs'); ?>
-
-
-
- | = $this->getHtml('Emergencies'); ?> | = $this->printHtml($logs['emergency'] ?? 0); ?>
- |
| = $this->getHtml('Criticals'); ?> | = $this->printHtml($logs['critical'] ?? 0); ?>
- |
| = $this->getHtml('Errors'); ?> | = $this->printHtml($logs['error'] ?? 0); ?>
- |
| = $this->getHtml('Warnings'); ?> | = $this->printHtml($logs['warning'] ?? 0); ?>
- |
| = $this->getHtml('Alerts'); ?> | = $this->printHtml($logs['alert'] ?? 0); ?>
- |
| = $this->getHtml('Notices'); ?> | = $this->printHtml($logs['notice'] ?? 0); ?>
- |
| = $this->getHtml('Info'); ?> | = $this->printHtml($logs['info'] ?? 0); ?>
- |
| = $this->getHtml('Debug'); ?> | = $this->printHtml($logs['debug'] ?? 0); ?>
- |
| = $this->getHtml('Total'); ?> | = $this->printHtml(array_sum($logs)); ?>
- |
-
-
-
-
-
-
- = $this->getHtml('Penetrators'); ?>
-
-
-
- $count) : ?>
- | = $this->printHtml($ip); ?> | = $this->printHtml($count); ?>
-
- |
-
-
-
-
diff --git a/Theme/Backend/exchange-export-list.tpl.php b/Theme/Backend/exchange-export-list.tpl.php
new file mode 100644
index 0000000..012ddfa
--- /dev/null
+++ b/Theme/Backend/exchange-export-list.tpl.php
@@ -0,0 +1,17 @@
+getData('nav')->render(); ?>
diff --git a/Theme/Backend/exchange-export.tpl.php b/Theme/Backend/exchange-export.tpl.php
new file mode 100644
index 0000000..6450588
--- /dev/null
+++ b/Theme/Backend/exchange-export.tpl.php
@@ -0,0 +1,17 @@
+getData('nav')->render(); ?>
diff --git a/Theme/Backend/exchange-import-list.tpl.php b/Theme/Backend/exchange-import-list.tpl.php
new file mode 100644
index 0000000..012ddfa
--- /dev/null
+++ b/Theme/Backend/exchange-import-list.tpl.php
@@ -0,0 +1,17 @@
+getData('nav')->render(); ?>
diff --git a/Theme/Backend/exchange-import.tpl.php b/Theme/Backend/exchange-import.tpl.php
new file mode 100644
index 0000000..6450588
--- /dev/null
+++ b/Theme/Backend/exchange-import.tpl.php
@@ -0,0 +1,17 @@
+getData('nav')->render(); ?>
diff --git a/Theme/Backend/export.tpl.php b/Theme/Backend/export.tpl.php
deleted file mode 100644
index ad7dcb5..0000000
--- a/Theme/Backend/export.tpl.php
+++ /dev/null
@@ -1,92 +0,0 @@
-app->logger->getByLine((int) $this->request->getData('id') ?? 1);
-$temp = trim($log['backtrace']);
-$log['backtrace'] = json_decode($temp, true);
-
-$details = '* Uri: `' . trim($log['path']) . "`\n"
- . '* Level: `' . trim($log['level']) . "`\n"
- . '* Message: `' . trim($log['message']) . "`\n"
- . '* File: `' . trim($log['file']) . "`\n"
- . '* Line: `' . trim($log['line']) . "`\n"
- . '* Version: `' . trim($log['version']) . "`\n"
- . '* OS: `' . trim($log['os']) . "`\n\n"
- . "Backtrace: \n\n```\n" . json_encode($log['backtrace'], JSON_PRETTY_PRINT);
-
-echo $this->getData('nav')->render(); ?>
-
-
-
-
- = $this->getHtml('Logs') ?>
-
-
-
-
- | = $this->getHtml('ID', 0, 0); ?>
- |
- | = $this->printHtml((int) $this->request->getData('id') ?? 0); ?>
- |
- | = $this->getHtml('Time') ?>
- |
- | = $this->printHtml($log['datetime']); ?>
- |
- | = $this->getHtml('Uri') ?>
- |
- | = $this->printHtml($log['path']); ?>
- |
- | = $this->getHtml('Source') ?>
- |
- | = $this->printHtml($log['ip']); ?>
- |
- | = $this->getHtml('Level') ?>
- |
-
- | = $this->printHtml($log['level']); ?>
- |
- | = $this->getHtml('Message') ?>
- |
- | = $this->printHtml($log['message']); ?>
- |
- | = $this->getHtml('File') ?>
- |
- | = $this->printHtml($log['file']); ?>
- |
- | = $this->getHtml('Line') ?>
- |
- | = $this->printHtml($log['line']); ?>
- |
- | = $this->getHtml('Version') ?>
- |
- | = $this->printHtml($log['version']); ?>
- |
- | = $this->getHtml('OS') ?>
- |
- | = $this->printHtml($log['os']); ?>
- |
- | = $this->getHtml('Backtrace') ?>
- |
-
- = $this->printHtml(json_encode($log['backtrace'], JSON_PRETTY_PRINT)); ?>
- |
- | = $this->getHtml('Report') ?>
- |
-
-
-
-
diff --git a/Theme/Backend/import.tpl.php b/Theme/Backend/import.tpl.php
deleted file mode 100644
index 512ee17..0000000
--- a/Theme/Backend/import.tpl.php
+++ /dev/null
@@ -1,48 +0,0 @@
-app->logger->get(25), true);
-
-echo $this->getData('nav')->render(); ?>
-
-