diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json
index 3ab7714..6faecbf 100755
--- a/Admin/Install/Navigation.install.json
+++ b/Admin/Install/Navigation.install.json
@@ -5,7 +5,7 @@
"type": 2,
"subtype": 1,
"name": "OnlineResourceWatcher",
- "uri": "{/prefix}orw/dashboard?u={?u}",
+ "uri": "{/lang}/{/app}/orw/dashboard?u={?u}",
"target": "self",
"icon": null,
"order": 40,
@@ -19,7 +19,7 @@
"type": 3,
"subtype": 1,
"name": "OnlineResourceWatcher",
- "uri": "{/prefix}orw/dashboard?u={?u}",
+ "uri": "{/lang}/{/app}/orw/dashboard?u={?u}",
"target": "self",
"icon": null,
"order": 1,
@@ -34,7 +34,7 @@
"type": 3,
"subtype": 1,
"name": "Archive",
- "uri": "{/prefix}orw/archive?u={?u}",
+ "uri": "{/lang}/{/app}/orw/archive?u={?u}",
"target": "self",
"icon": null,
"order": 5,
@@ -49,7 +49,7 @@
"type": 3,
"subtype": 1,
"name": "Create",
- "uri": "{/prefix}orw/create?{?}",
+ "uri": "{/lang}/{/app}/orw/create?{?}",
"target": "self",
"icon": null,
"order": 10,
@@ -64,7 +64,7 @@
"type": 3,
"subtype": 1,
"name": "Draft",
- "uri": "{/prefix}orw/draft/list?u={?u}",
+ "uri": "{/lang}/{/app}/orw/draft/list?u={?u}",
"target": "self",
"icon": null,
"order": 15,
@@ -79,7 +79,7 @@
"type": 3,
"subtype": 1,
"name": "Analysis",
- "uri": "{/prefix}orw/analysis",
+ "uri": "{/lang}/{/app}/orw/analysis",
"target": "self",
"icon": null,
"order": 15,
diff --git a/Admin/Install/db.json b/Admin/Install/db.json
index 175d2a3..da6fc2b 100644
--- a/Admin/Install/db.json
+++ b/Admin/Install/db.json
@@ -9,6 +9,11 @@
"primary": true,
"autoincrement": true
},
+ "orw_resource_title": {
+ "name": "orw_resource_title",
+ "type": "VARCHAR(255)",
+ "null": false
+ },
"orw_resource_status": {
"name": "orw_resource_status",
"type": "TINYINT",
@@ -19,6 +24,11 @@
"type": "VARCHAR(255)",
"null": false
},
+ "orw_resource_path": {
+ "name": "orw_resource_path",
+ "type": "VARCHAR(255)",
+ "null": false
+ },
"orw_resource_xpath": {
"name": "orw_resource_xpath",
"type": "VARCHAR(255)",
@@ -37,12 +47,14 @@
"orw_resource_last_version_date": {
"name": "orw_resource_last_version_date",
"type": "DATETIME",
- "null": false
+ "null": true,
+ "default": null
},
"orw_resource_checked_at": {
"name": "orw_resource_checked_at",
"type": "DATETIME",
- "null": false
+ "null": true,
+ "default": null
},
"orw_resource_owner": {
"name": "orw_resource_owner",
@@ -52,6 +64,14 @@
"foreignTable": "account",
"foreignKey": "account_id"
},
+ "orw_resource_organization": {
+ "name": "orw_resource_organization",
+ "type": "INT",
+ "null": true,
+ "default": null,
+ "foreignTable": "account",
+ "foreignKey": "account_id"
+ },
"orw_resource_created_at": {
"name": "orw_resource_created_at",
"type": "DATETIME",
diff --git a/Controller/ApiController.php b/Controller/ApiController.php
index 92bff39..10d46e0 100644
--- a/Controller/ApiController.php
+++ b/Controller/ApiController.php
@@ -47,7 +47,7 @@ final class ApiController extends Controller
{
$val = [];
if (($val['title'] = empty($request->getData('title')))
- || ($val['path'] = empty($request->getData('path')))
+ || ($val['uri'] = empty($request->getData('uri')))
) {
return $val;
}
@@ -97,7 +97,15 @@ final class ApiController extends Controller
$resource = new Resource();
$resource->owner = new NullAccount($request->header->account);
$resource->title = (string) ($request->getData('title') ?? '');
- $resource->path = $request->getData('path') ?? '';
+ $resource->uri = $request->getData('uri') ?? '';
+ $resource->owner = new NullAccount($request->header->account);
+
+ // @todo: check if user is part of organization below AND has free resources to add!!!
+ $resource->organization = new NullAccount(
+ empty($request->getData('organization'))
+ ? $request->header->account
+ : (int) ($request->getData('organization'))
+ );
return $resource;
}
@@ -118,7 +126,7 @@ final class ApiController extends Controller
public function apiCheckResources(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
{
SystemUtils::runProc(
- __DIR__ . '/server/bin/App', ''
+ __DIR__ . '/server/bin/OnlineResourceWatcherServerApp', ''
);
$this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Resources', 'Resources are getting checked.', null);
diff --git a/Models/Resource.php b/Models/Resource.php
index 16fb6f5..a550c4b 100644
--- a/Models/Resource.php
+++ b/Models/Resource.php
@@ -28,7 +28,7 @@ use Modules\Admin\Models\NullAccount;
class Resource implements \JsonSerializable
{
/**
- * Article ID.
+ * ID.
*
* @var int
* @since 1.0.0
@@ -36,20 +36,20 @@ class Resource implements \JsonSerializable
protected int $id = 0;
/**
- * Owner.
+ * Status.
*
- * @var Account
+ * @var int
* @since 1.0.0
*/
- public Account $owner;
+ public int $status = ResourceStatus::ACTIVE;
/**
- * Created.
+ * Uri.
*
- * @var \DateTimeImmutable
+ * @var int
* @since 1.0.0
*/
- public \DateTimeImmutable $createdAt;
+ public string $uri = '';
/**
* Title.
@@ -67,6 +67,76 @@ class Resource implements \JsonSerializable
*/
public string $path = '';
+ /**
+ * Xpath.
+ *
+ * @var int
+ * @since 1.0.0
+ */
+ public string $xpath = '';
+
+ /**
+ * Hash.
+ *
+ * @var int
+ * @since 1.0.0
+ */
+ public string $hash = '';
+
+ /**
+ * Last version path.
+ *
+ * @var int
+ * @since 1.0.0
+ */
+ public string $lastVersionPath = '';
+
+ /**
+ * Owner.
+ *
+ * @var Account
+ * @since 1.0.0
+ */
+ public Account $owner;
+
+ /**
+ * Organization.
+ *
+ * The owner/creator of the resource can be different
+ * from the group/organization this resource belongs to.
+ *
+ * @todo: consider to use groups instead of organizations?
+ * groups would be better for internal purposes (e.g. departments) but accounts are better for external purposes (different customers)
+ *
+ * @var Account
+ * @since 1.0.0
+ */
+ public Account $organization;
+
+ /**
+ * Last version date.
+ *
+ * @var null|\DateTimeImmutable
+ * @since 1.0.0
+ */
+ public ?\DateTimeImmutable $lastVersionDate = null;
+
+ /**
+ * Last checked.
+ *
+ * @var null|\DateTimeImmutable
+ * @since 1.0.0
+ */
+ public ?\DateTimeImmutable $checkedAt = null;
+
+ /**
+ * Created.
+ *
+ * @var \DateTimeImmutable
+ * @since 1.0.0
+ */
+ public \DateTimeImmutable $createdAt;
+
/**
* Constructor.
*
@@ -74,8 +144,21 @@ class Resource implements \JsonSerializable
*/
public function __construct()
{
- $this->owner = new NullAccount();
- $this->createdAt = new \DateTimeImmutable('now');
+ $this->owner = new NullAccount();
+ $this->organization = new NullAccount();
+ $this->createdAt = new \DateTimeImmutable('now');
+ }
+
+ /**
+ * Get id
+ *
+ * @return int
+ *
+ * @since 1.0.0
+ */
+ public function getId() : int
+ {
+ return $this->id;
}
/**
diff --git a/Models/ResourceMapper.php b/Models/ResourceMapper.php
index 69b34e1..ed546e2 100644
--- a/Models/ResourceMapper.php
+++ b/Models/ResourceMapper.php
@@ -34,8 +34,19 @@ final class ResourceMapper extends DataMapperFactory
* @since 1.0.0
*/
public const COLUMNS = [
- 'orw_resource_id' => ['name' => 'orw_resource_id', 'type' => 'int', 'internal' => 'id'],
- 'orw_resource_owner' => ['name' => 'orw_resource_owner', 'type' => 'int', 'internal' => 'owner', 'readonly' => true],
+ 'orw_resource_id' => ['name' => 'orw_resource_id', 'type' => 'int', 'internal' => 'id'],
+ 'orw_resource_title' => ['name' => 'orw_resource_title', 'type' => 'string', 'internal' => 'title',],
+ 'orw_resource_path' => ['name' => 'orw_resource_path', 'type' => 'string', 'internal' => 'path',],
+ 'orw_resource_status' => ['name' => 'orw_resource_status', 'type' => 'int', 'internal' => 'status',],
+ 'orw_resource_uri' => ['name' => 'orw_resource_uri', 'type' => 'string', 'internal' => 'uri',],
+ 'orw_resource_xpath' => ['name' => 'orw_resource_xpath', 'type' => 'string', 'internal' => 'xpath',],
+ 'orw_resource_hash' => ['name' => 'orw_resource_hash', 'type' => 'string', 'internal' => 'hash',],
+ 'orw_resource_last_version_path' => ['name' => 'orw_resource_last_version_path', 'type' => 'string', 'internal' => 'lastVersionPath',],
+ 'orw_resource_last_version_date' => ['name' => 'orw_resource_last_version_date', 'type' => 'DateTimeImmutable', 'internal' => 'lastVersionDate',],
+ 'orw_resource_checked_at' => ['name' => 'orw_resource_checked_at', 'type' => 'DateTimeImmutable', 'internal' => 'checkedAt',],
+ 'orw_resource_owner' => ['name' => 'orw_resource_owner', 'type' => 'int', 'internal' => 'owner',],
+ 'orw_resource_organization' => ['name' => 'orw_resource_organization', 'type' => 'int', 'internal' => 'organization',],
+ 'orw_resource_created_at' => ['name' => 'orw_resource_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt',],
];
/**
@@ -49,6 +60,10 @@ final class ResourceMapper extends DataMapperFactory
'mapper' => AccountMapper::class,
'external' => 'orw_resource_owner',
],
+ 'organization' => [
+ 'mapper' => AccountMapper::class,
+ 'external' => 'orw_resource_organization',
+ ],
];
/**
diff --git a/Models/ResourceStatus.php b/Models/ResourceStatus.php
new file mode 100644
index 0000000..aec12a3
--- /dev/null
+++ b/Models/ResourceStatus.php
@@ -0,0 +1,32 @@
+getNextLink(
$audit) : ++$count;
- $url = UriFactory::build('{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
+ $url = UriFactory::build('{/lang}/{/app}/{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
|
|
diff --git a/Theme/Backend/admin-logs.tpl.php b/Theme/Backend/admin-logs.tpl.php
index d17c4c8..b90d9c6 100644
--- a/Theme/Backend/admin-logs.tpl.php
+++ b/Theme/Backend/admin-logs.tpl.php
@@ -22,7 +22,7 @@ $audits = $this->getData('audits') ?? [];
$tableView = $this->getData('tableView');
$tableView->id = 'auditList';
-$tableView->baseUri = '{/prefix}admin/audit/list';
+$tableView->baseUri = ''{/lang}/{/app}/admin/audit/list';
$tableView->setObjects($audits);
$previous = $tableView->getPreviousLink(
@@ -97,7 +97,7 @@ $next = $tableView->getNextLink(
|
$audit) : ++$count;
- $url = UriFactory::build('{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
+ $url = UriFactory::build('{/lang}/{/app}/'{/lang}/{/app}/admin/audit/single?id=' . $audit->getId()); ?>
| = $audit->getId(); ?>
| getOld() === null) : echo $this->getHtml('CREATE', '0', '0'); ?>
@@ -107,7 +107,7 @@ $next = $tableView->getNextLink(
| = $audit->getType(); ?>
| = $audit->getTrigger(); ?>
- | = $this->printHtml(
+ | = $this->printHtml(
$this->renderUserName('%3$s %2$s %1$s', [$audit->createdBy->name1, $audit->createdBy->name2, $audit->createdBy->name3, $audit->createdBy->login])
); ?>
| = $this->printHtml($audit->getRef()); ?>
diff --git a/Theme/Backend/admin-organizations.tpl.php b/Theme/Backend/admin-organizations.tpl.php
index 52739d5..da79d84 100644
--- a/Theme/Backend/admin-organizations.tpl.php
+++ b/Theme/Backend/admin-organizations.tpl.php
@@ -77,7 +77,7 @@ $next = $tableView->getNextLink(
|
$audit) : ++$count;
- $url = UriFactory::build('{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
+ $url = UriFactory::build('{/lang}/{/app}/{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
|
diff --git a/Theme/Backend/admin-resources.tpl.php b/Theme/Backend/admin-resources.tpl.php
index 149e803..c2e2f5d 100644
--- a/Theme/Backend/admin-resources.tpl.php
+++ b/Theme/Backend/admin-resources.tpl.php
@@ -16,14 +16,14 @@ use phpOMS\Uri\UriFactory;
/**
* @var \phpOMS\Views\View $this
- * @var \Modules\Audit\Models\Audit[] $audits
+ * @var \Modules\Audit\Models\Audit[] $resources
*/
-$audits = $this->getData('audits') ?? [];
+$resources = $this->getData('resources') ?? [];
$tableView = $this->getData('tableView');
$tableView->id = 'auditList';
$tableView->baseUri = '{/prefix}admin/audit/list';
-$tableView->setObjects($audits);
+$tableView->setObjects($resources);
$previous = $tableView->getPreviousLink(
$this->request,
@@ -86,8 +86,8 @@ $next = $tableView->getNextLink(
); ?>
|
$audit) : ++$count;
- $url = UriFactory::build('{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
+ foreach ($resources as $key => $resource) : ++$count;
+ $url = UriFactory::build('{/lang}/{/app}/admin/audit/single?id=' . $resource->getId()); ?>
|
|
diff --git a/Theme/Backend/admin-users.tpl.php b/Theme/Backend/admin-users.tpl.php
index 304f436..b8b9708 100644
--- a/Theme/Backend/admin-users.tpl.php
+++ b/Theme/Backend/admin-users.tpl.php
@@ -82,7 +82,7 @@ $next = $tableView->getNextLink(
|
$audit) : ++$count;
- $url = UriFactory::build('{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
+ $url = UriFactory::build('{/lang}/{/app}/{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
|
|
diff --git a/Theme/Backend/header.tpl.php b/Theme/Backend/header.tpl.php
index acf6acd..c4ddcd8 100644
--- a/Theme/Backend/header.tpl.php
+++ b/Theme/Backend/header.tpl.php
@@ -16,7 +16,7 @@ declare(strict_types=1);
use phpOMS\Uri\UriFactory;
?>
-
+
Jingga
diff --git a/Theme/Backend/nav-side.tpl.php b/Theme/Backend/nav-side.tpl.php
index abc4119..f08c0ec 100644
--- a/Theme/Backend/nav-side.tpl.php
+++ b/Theme/Backend/nav-side.tpl.php
@@ -29,23 +29,23 @@ use phpOMS\Uri\UriFactory;
= $this->getHtml('Organizations', '0', '0'); ?>
+ ?>" href="= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>admin/organizations">= $this->getHtml('Organizations', '0', '0'); ?>
= $this->getHtml('Users', '0', '0'); ?>
+ ?>" href="= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>admin/users">= $this->getHtml('Users', '0', '0'); ?>
= $this->getHtml('Resources', '0', '0'); ?>
+ ?>" href="= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>admin/resources">= $this->getHtml('Resources', '0', '0'); ?>
= $this->getHtml('Bills', '0', '0'); ?>
+ ?>" href="= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>admin/bills">= $this->getHtml('Bills', '0', '0'); ?>
= $this->getHtml('Logs', '0', '0'); ?>
+ ?>" href="= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>admin/logs">= $this->getHtml('Logs', '0', '0'); ?>
@@ -59,19 +59,19 @@ use phpOMS\Uri\UriFactory;
= $this->getHtml('Settings', '0', '0'); ?>
+ ?>" href="= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>organization/settings">= $this->getHtml('Settings', '0', '0'); ?>
= $this->getHtml('Users', '0', '0'); ?>
+ ?>" href="= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>organization/users">= $this->getHtml('Users', '0', '0'); ?>
= $this->getHtml('Resources', '0', '0'); ?>
+ ?>" href="= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>organization/resources">= $this->getHtml('Resources', '0', '0'); ?>
= $this->getHtml('Bills', '0', '0'); ?>
+ ?>" href="= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>organization/bills">= $this->getHtml('Bills', '0', '0'); ?>
@@ -84,20 +84,20 @@ use phpOMS\Uri\UriFactory;
= $this->getHtml('Dashboard', '0', '0'); ?>
= $this->getHtml('Settings', '0', '0'); ?>
+ ?>" href="= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>user/settings">= $this->getHtml('Settings', '0', '0'); ?>
= $this->getHtml('Resources', '0', '0'); ?>
+ ?>" href="= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>user/resources">= $this->getHtml('Resources', '0', '0'); ?>
= $this->getHtml('Reports', '0', '0'); ?>
+ ?>" href="= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>user/reports">= $this->getHtml('Reports', '0', '0'); ?>
diff --git a/Theme/Backend/organization-bills.tpl.php b/Theme/Backend/organization-bills.tpl.php
index 2dd431c..08cfe5f 100644
--- a/Theme/Backend/organization-bills.tpl.php
+++ b/Theme/Backend/organization-bills.tpl.php
@@ -22,7 +22,7 @@ $audits = $this->getData('audits') ?? [];
$tableView = $this->getData('tableView');
$tableView->id = 'auditList';
-$tableView->baseUri = '{/prefix}admin/audit/list';
+$tableView->baseUri = ''{/lang}/{/app}/admin/audit/list';
$tableView->setObjects($audits);
$previous = $tableView->getPreviousLink(
@@ -72,7 +72,7 @@ $next = $tableView->getNextLink(
$audit) : ++$count;
- $url = UriFactory::build('{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
+ $url = UriFactory::build('{/lang}/{/app}/'{/lang}/{/app}/admin/audit/single?id=' . $audit->getId()); ?>
|
|
diff --git a/Theme/Backend/organization-resources.tpl.php b/Theme/Backend/organization-resources.tpl.php
index 149e803..ccc1326 100644
--- a/Theme/Backend/organization-resources.tpl.php
+++ b/Theme/Backend/organization-resources.tpl.php
@@ -87,7 +87,7 @@ $next = $tableView->getNextLink(
|
$audit) : ++$count;
- $url = UriFactory::build('{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
+ $url = UriFactory::build('{/lang}/{/app}/{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
|
|
diff --git a/Theme/Backend/organization-users.tpl.php b/Theme/Backend/organization-users.tpl.php
index 87f0522..793c2d0 100644
--- a/Theme/Backend/organization-users.tpl.php
+++ b/Theme/Backend/organization-users.tpl.php
@@ -22,7 +22,7 @@ $audits = $this->getData('audits') ?? [];
$tableView = $this->getData('tableView');
$tableView->id = 'auditList';
-$tableView->baseUri = '{/prefix}admin/audit/list';
+$tableView->baseUri = ''{/lang}/{/app}/admin/audit/list';
$tableView->setObjects($audits);
$previous = $tableView->getPreviousLink(
@@ -44,7 +44,7 @@ $next = $tableView->getNextLink(
= $tableView->renderTitle(
$this->getHtml('Users', '0', '0')
); ?>
- = $this->getHtml('Add', '0', '0'); ?>
+ = $this->getHtml('Add', '0', '0'); ?>
@@ -78,7 +78,7 @@ $next = $tableView->getNextLink(
$audit) : ++$count;
- $url = UriFactory::build('{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
+ $url = UriFactory::build('{/lang}/{/app}/'{/lang}/{/app}/admin/audit/single?id=' . $audit->getId()); ?>
|
|
diff --git a/Theme/Backend/user-reports.tpl.php b/Theme/Backend/user-reports.tpl.php
index b18c88c..aaada84 100644
--- a/Theme/Backend/user-reports.tpl.php
+++ b/Theme/Backend/user-reports.tpl.php
@@ -72,7 +72,7 @@ $next = $tableView->getNextLink(
|
$audit) : ++$count;
- $url = UriFactory::build('{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
+ $url = UriFactory::build('{/lang}/{/app}/{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
|
|
diff --git a/Theme/Backend/user-resources-create.tpl.php b/Theme/Backend/user-resources-create.tpl.php
index 611367d..60f649f 100644
--- a/Theme/Backend/user-resources-create.tpl.php
+++ b/Theme/Backend/user-resources-create.tpl.php
@@ -76,7 +76,7 @@ use phpOMS\Uri\UriFactory;
| = $this->getHtml('User', '0', '0'); ?>
| = $this->getHtml('Email', '0', '0'); ?>
|
- $value) : ++$c; $url = UriFactory::build('{/prefix}admin/account/settings?{?}&id=' . $value->getId()); ?>
+ $value) : ++$c; $url = UriFactory::build('{/lang}/{/app}/{/prefix}admin/account/settings?{?}&id=' . $value->getId()); ?>
|
|
diff --git a/Theme/Backend/user-resources.tpl.php b/Theme/Backend/user-resources.tpl.php
index 6db1f31..7788aad 100644
--- a/Theme/Backend/user-resources.tpl.php
+++ b/Theme/Backend/user-resources.tpl.php
@@ -44,7 +44,7 @@ $next = $tableView->getNextLink(
= $tableView->renderTitle(
$this->getHtml('Resources', '0', '0')
); ?>
- = $this->getHtml('New', '0', '0'); ?>
+ = $this->getHtml('New', '0', '0'); ?>
@@ -78,7 +78,7 @@ $next = $tableView->getNextLink(
$audit) : ++$count;
- $url = UriFactory::build('{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
+ $url = UriFactory::build('{/lang}/{/app}/{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
|
|
diff --git a/info.json b/info.json
index 89f8a50..06495f0 100755
--- a/info.json
+++ b/info.json
@@ -12,7 +12,7 @@
},
"creator": {
"name": "Karaka",
- "website": "www.spl1nes.com"
+ "website": "jingga.app"
},
"description": "OnlineResourceWatcher module.",
"directory": "OnlineResourceWatcher",
diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt
index a31f7a0..8b44543 100755
--- a/server/CMakeLists.txt
+++ b/server/CMakeLists.txt
@@ -1,26 +1,33 @@
-cmake_minimum_required(VERSION 3.2)
-project( OnlineResourceWatcherServerApp )
-add_executable( OnlineResourceWatcherServerApp main.cpp )
+cmake_minimum_required(VERSION 3.22)
+project(OnlineResourceWatcherServerApp VERSION 1.0.0 LANGUAGES CXX)
+add_executable(OnlineResourceWatcherServerApp main.cpp)
set(CMAKE_CXX_FLAGS "-march=native -msse2 -mavx -maes")
-include_directories( /usr/include )
-link_directories( /usr/lib )
-link_directories( /usr/lib/x86_64-linux-gnu )
+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+include_directories(/usr/include)
+link_directories(/usr/lib)
+link_directories(/usr/lib/x86_64-linux-gnu)
# SQLite3
-target_link_libraries( OnlineResourceWatcherServerApp PRIVATE sqlite3 )
+target_link_libraries(OnlineResourceWatcherServerApp PRIVATE sqlite3)
# MariaDB
-target_link_libraries( OnlineResourceWatcherServerApp PRIVATE mysqlclient )
+target_link_libraries(OnlineResourceWatcherServerApp PRIVATE mysqlclient)
# Postgresql
-target_include_directories( OnlineResourceWatcherServerApp PRIVATE /usr/include/postgresql )
-target_link_directories( OnlineResourceWatcherServerApp PRIVATE /usr/lib/postgresql/10/lib )
-target_link_libraries( OnlineResourceWatcherServerApp PRIVATE pq )
+target_include_directories(OnlineResourceWatcherServerApp PRIVATE /usr/include/postgresql)
+target_link_directories(OnlineResourceWatcherServerApp PRIVATE /usr/lib/postgresql/10/lib)
+target_link_libraries(OnlineResourceWatcherServerApp PRIVATE pq)
# Libcurl
-target_link_libraries( OnlineResourceWatcherServerApp PRIVATE curl )
+target_link_libraries(OnlineResourceWatcherServerApp PRIVATE curl)
# cmake -DCMAKE_BUILD_TYPE=Debug -DOMS_DEBUG=true
# cmake -DCMAKE_BUILD_TYPE=Release -DOMS_DEMO=true
\ No newline at end of file
diff --git a/server/Controller/ApiController.h b/server/Controller/ApiController.h
index 1c217e2..daaf37f 100755
--- a/server/Controller/ApiController.h
+++ b/server/Controller/ApiController.h
@@ -18,6 +18,10 @@
#include "../cOMS/Utils/WebUtils.h"
#include "../cOMS/Hash/MeowHash.h"
#include "../cOMS/Utils/MathUtils.h"
+#include "../cOMS/Threads/Thread.h"
+
+#include "../Models/Resource.h"
+#include "../Models/ResourceType.h"
namespace Controller {
namespace ApiController {
@@ -49,9 +53,114 @@ namespace Controller {
printf("installation is performed in the web installer as described in the README.\n");
}
+ typedef struct {
+ Models::Resource **resources;
+ int count = 0;
+ int simultaneous = 0;
+ } ResourcekerData;
+
+ void onlineResourceThreaded(void *arg)
+ {
+ ResourcekerData *data = (ResourcekerData *) arg;
+
+ char **urls = (char **) malloc(data->count * sizeof(char *));
+ for (int i = 0; i < data->count; ++i) {
+ urls[i] = data->resources[i]->uri;
+ }
+
+ Utils::FileUtils::file_body *multi = Utils::WebUtils::multi_download(urls, data->count, data->simultaneous);
+
+ free(urls);
+
+ // @todo: save temp version
+ // @todo: if first download then also download all first level references + css references (= second level)
+ // @todo: probably ignore javascript references, they are not useful for static offline comparisons!?
+ // @todo: comparison with local version (only download other resources, if xPath is defined and it contains resources)
+ // @todo: flag as changed/not changed
+
+ free(data->resources);
+ free(arg);
+ }
+
+ void offlineResourceThreaded(void *arg)
+ {
+ }
+
void checkResources(int argc, char **argv)
{
- unsigned long long resourceId = atoll(Utils::ArrayUtils::get_arg("-r", argv, argc));
+ int idLength = 0;
+ Models::Resource *resources = NULL;
+
+ int i;
+ if (Utils::ArrayUtils::has_arg("-r", argv, argc)) {
+ char *resourceList = Utils::ArrayUtils::get_arg("-r", argv, argc);
+ char **resourceIdStrings = NULL;
+
+ idLength = Utils::StringUtils::str_split(resourceIdStrings, resourceList, ',');
+ resources = (Models::Resource *) malloc(idLength * sizeof(Models::Resource));
+
+ for (i = 0; i < idLength; ++i) {
+ resources[i].id = atoll(resourceIdStrings[i]);
+ }
+ } else {
+ // find and load all relevant ids from the database
+ }
+
+ // @todo: also free points in resources, call Models::free_Resource(resources[i]) on every element.
+ free(resources);
+
+ // How many resources are handled in one thread
+ // This must be multiplied with the thread count for the over all concurrent max downloads
+ int THREAD_SIZE = app.config["app"]["resources"]["online"]["downloads"].get();
+
+ Models::Resource **onlineResources = (Models::Resource **) malloc(oms_min(idLength, THREAD_SIZE) * sizeof(Models::Resource *));
+ Models::Resource **offlineResources = (Models::Resource **) malloc(oms_min(idLength, THREAD_SIZE) * sizeof(Models::Resource *));
+
+ int j = 0;
+ int c = 0;
+ int k = 0;
+
+ for (i = 0; i < idLength; ++i) {
+ if (resources[i].type == Models::ResourceType::ONLINE) {
+ onlineResources[j] = &resources[i];
+
+ ++j;
+ } else {
+ offlineResources[k] = &resources[i];
+
+ ++k;
+ }
+
+ // Handle online resources in batches here:
+ if (j > 0 && (j == THREAD_SIZE || i + 1 >= idLength)) {
+ ResourcekerData *data = (ResourcekerData *) malloc(sizeof(ResourcekerData));
+ data->resources = onlineResources;
+ data->count = j;
+ data->simultaneous = THREAD_SIZE;
+
+ Threads::pool_add_work(app.pool, onlineResourceThreaded, data);
+
+ if (i + 1 < idLength) {
+ onlineResources = (Models::Resource **) malloc((oms_min(idLength - i, THREAD_SIZE)) * sizeof(Models::Resource *));
+ j = 0;
+ }
+ }
+
+ // Handle offline resources in batches here:
+ if (k > 0 && (k == THREAD_SIZE || i + 1 >= idLength)) {
+ ResourcekerData *data = (ResourcekerData *) malloc(sizeof(ResourcekerData));
+ data->resources = offlineResources;
+ data->count = k;
+ data->simultaneous = THREAD_SIZE;
+
+ Threads::pool_add_work(app.pool, offlineResourceThreaded, data);
+
+ if (i + 1 < idLength) {
+ offlineResources = (Models::Resource **) malloc((oms_min(idLength - i, THREAD_SIZE)) * sizeof(Models::Resource *));
+ k = 0;
+ }
+ }
+ }
// @todo handle resources
// load config
@@ -59,8 +168,9 @@ namespace Controller {
// active
// last check older than 23 h
// check if resource changed
- // save new version
+ // load new resource (save temp version)
// find differences
+ // save new version
// inform users
//Resource res[10];
diff --git a/server/Install/config.json b/server/Install/config.json
index 0101c7a..ed87d5b 100755
--- a/server/Install/config.json
+++ b/server/Install/config.json
@@ -109,6 +109,14 @@
"id": "frontend",
"lang": "en"
}
+ },
+ "threads": {
+ "count": 5
+ },
+ "resources": {
+ "online": {
+ "donwloads": 10
+ }
}
},
"language": [
diff --git a/server/Models/Resource.h b/server/Models/Resource.h
index 738016f..cf4c54d 100755
--- a/server/Models/Resource.h
+++ b/server/Models/Resource.h
@@ -19,7 +19,7 @@
namespace Models {
typedef struct {
- int id = 0;
+ unsigned long long id = 0;
ResourceStatus status = ResourceStatus::INACTIVE;
@@ -31,6 +31,8 @@ namespace Models {
char *last_version_path = NULL;
+ int type = 0; // ResourceType::ONLINE or ResourceType::OFFLINE
+
time_t last_version_date = 0;
time_t checked_at = 0;
diff --git a/server/Models/ResourceType.h b/server/Models/ResourceType.h
new file mode 100644
index 0000000..8732dc3
--- /dev/null
+++ b/server/Models/ResourceType.h
@@ -0,0 +1,20 @@
+/**
+ * Karaka
+ *
+ * @package Models
+ * @copyright Dennis Eichhorn
+ * @license OMS License 1.0
+ * @version 1.0.0
+ * @link https://karaka.app
+ */
+#ifndef MODELS_RESOURCE_TYPE_H
+#define MODELS_RESOURCE_TYPE_H
+
+namespace Models {
+ typedef enum {
+ ONLINE = 1,
+ OFFLINE = 2
+ } ResourceType;
+}
+
+#endif
\ No newline at end of file
diff --git a/server/Models/Screenshot.h b/server/Models/Screenshot.h
new file mode 100644
index 0000000..e69de29
diff --git a/server/Routes.h b/server/Routes.h
index 859fafe..8fc86a3 100755
--- a/server/Routes.h
+++ b/server/Routes.h
@@ -17,14 +17,14 @@
#include "Controller/InstallController.h"
#include "cOMS/Router/Router.h"
-Router generate_routes()
+Router::Router generate_routes()
{
- Router router = Router::create_router(4);
+ Router::Router router = Router::create_router(4);
- router.set("^.*?\\-h *.*$", (void *) &Controller::ApiController::printHelp);
- router.set("^.*?\\-v *.*$", (void *) &Controller::ApiController::printVersion);
- router.set("^.*?\\-r *.*$", (void *) &Controller::ApiController::checkResources);
- router.set("^.*?\\-\\-install *.*$", (void *) &Controller::InstallController::installApplication);
+ Router::set(&router, "^.*?\\-h *.*$", (void *) &Controller::ApiController::printHelp);
+ Router::set(&router, "^.*?\\-v *.*$", (void *) &Controller::ApiController::printVersion);
+ Router::set(&router, "^.*?\\-r *.*$", (void *) &Controller::ApiController::checkResources);
+ Router::set(&router, "^.*?\\-\\-install *.*$", (void *) &Controller::InstallController::installApplication);
return router;
}
diff --git a/server/bin/CMakeCache.txt b/server/bin/CMakeCache.txt
new file mode 100644
index 0000000..bc92948
--- /dev/null
+++ b/server/bin/CMakeCache.txt
@@ -0,0 +1,691 @@
+# This is the CMakeCache file.
+# For build in directory: /home/spl1nes/Orange-Management/Modules/OnlineResourceWatcher/server/bin
+# It was generated by CMake: /snap/cmake/1210/bin/cmake
+# You can edit this file to change values found and used by cmake.
+# If you do not want to change any of the values, simply exit the editor.
+# If you do want to change a value, simply edit, save, and exit the editor.
+# The syntax for the file is as follows:
+# KEY:TYPE=VALUE
+# KEY is the name of a variable in the cache.
+# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
+# VALUE is the current value for the KEY.
+
+########################
+# EXTERNAL cache entries
+########################
+
+//Path to a program.
+CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line
+
+//Path to a program.
+CMAKE_AR:FILEPATH=/usr/bin/ar
+
+//Choose the type of build, options are: None Debug Release RelWithDebInfo
+// MinSizeRel ...
+CMAKE_BUILD_TYPE:STRING=
+
+//Enable/Disable color output during build.
+CMAKE_COLOR_MAKEFILE:BOOL=ON
+
+//CXX compiler
+CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
+
+//A wrapper around 'ar' adding the appropriate '--plugin' option
+// for the GCC compiler
+CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-11
+
+//A wrapper around 'ranlib' adding the appropriate '--plugin' option
+// for the GCC compiler
+CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-11
+
+//Flags used by the CXX compiler during all build types.
+CMAKE_CXX_FLAGS:STRING=
+
+//Flags used by the CXX compiler during DEBUG builds.
+CMAKE_CXX_FLAGS_DEBUG:STRING=-g
+
+//Flags used by the CXX compiler during MINSIZEREL builds.
+CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
+
+//Flags used by the CXX compiler during RELEASE builds.
+CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
+
+//Flags used by the CXX compiler during RELWITHDEBINFO builds.
+CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
+
+//Path to a program.
+CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND
+
+//Flags used by the linker during all build types.
+CMAKE_EXE_LINKER_FLAGS:STRING=
+
+//Flags used by the linker during DEBUG builds.
+CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
+
+//Flags used by the linker during MINSIZEREL builds.
+CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
+
+//Flags used by the linker during RELEASE builds.
+CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
+
+//Flags used by the linker during RELWITHDEBINFO builds.
+CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
+
+//Enable/Disable output of compile commands during generation.
+CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=
+
+//Value Computed by CMake.
+CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=/home/spl1nes/Orange-Management/Modules/OnlineResourceWatcher/server/bin/CMakeFiles/pkgRedirects
+
+//Install path prefix, prepended onto install directories.
+CMAKE_INSTALL_PREFIX:PATH=/usr/local
+
+//Path to a program.
+CMAKE_LINKER:FILEPATH=/usr/bin/ld
+
+//Path to a program.
+CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/gmake
+
+//Flags used by the linker during the creation of modules during
+// all build types.
+CMAKE_MODULE_LINKER_FLAGS:STRING=
+
+//Flags used by the linker during the creation of modules during
+// DEBUG builds.
+CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
+
+//Flags used by the linker during the creation of modules during
+// MINSIZEREL builds.
+CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
+
+//Flags used by the linker during the creation of modules during
+// RELEASE builds.
+CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
+
+//Flags used by the linker during the creation of modules during
+// RELWITHDEBINFO builds.
+CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
+
+//Path to a program.
+CMAKE_NM:FILEPATH=/usr/bin/nm
+
+//Path to a program.
+CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
+
+//Path to a program.
+CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
+
+//Value Computed by CMake
+CMAKE_PROJECT_DESCRIPTION:STATIC=
+
+//Value Computed by CMake
+CMAKE_PROJECT_HOMEPAGE_URL:STATIC=
+
+//Value Computed by CMake
+CMAKE_PROJECT_NAME:STATIC=OnlineResourceWatcherServerApp
+
+//Value Computed by CMake
+CMAKE_PROJECT_VERSION:STATIC=1.0.0
+
+//Value Computed by CMake
+CMAKE_PROJECT_VERSION_MAJOR:STATIC=1
+
+//Value Computed by CMake
+CMAKE_PROJECT_VERSION_MINOR:STATIC=0
+
+//Value Computed by CMake
+CMAKE_PROJECT_VERSION_PATCH:STATIC=0
+
+//Value Computed by CMake
+CMAKE_PROJECT_VERSION_TWEAK:STATIC=
+
+//Path to a program.
+CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
+
+//Path to a program.
+CMAKE_READELF:FILEPATH=/usr/bin/readelf
+
+//Flags used by the linker during the creation of shared libraries
+// during all build types.
+CMAKE_SHARED_LINKER_FLAGS:STRING=
+
+//Flags used by the linker during the creation of shared libraries
+// during DEBUG builds.
+CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
+
+//Flags used by the linker during the creation of shared libraries
+// during MINSIZEREL builds.
+CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
+
+//Flags used by the linker during the creation of shared libraries
+// during RELEASE builds.
+CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
+
+//Flags used by the linker during the creation of shared libraries
+// during RELWITHDEBINFO builds.
+CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
+
+//If set, runtime paths are not added when installing shared libraries,
+// but are added when building.
+CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
+
+//If set, runtime paths are not added when using shared libraries.
+CMAKE_SKIP_RPATH:BOOL=NO
+
+//Flags used by the linker during the creation of static libraries
+// during all build types.
+CMAKE_STATIC_LINKER_FLAGS:STRING=
+
+//Flags used by the linker during the creation of static libraries
+// during DEBUG builds.
+CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
+
+//Flags used by the linker during the creation of static libraries
+// during MINSIZEREL builds.
+CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
+
+//Flags used by the linker during the creation of static libraries
+// during RELEASE builds.
+CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
+
+//Flags used by the linker during the creation of static libraries
+// during RELWITHDEBINFO builds.
+CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
+
+//Path to a program.
+CMAKE_STRIP:FILEPATH=/usr/bin/strip
+
+//If this value is on, makefiles will be generated without the
+// .SILENT directive, and all commands will be echoed to the console
+// during the make. This is useful for debugging only. With Visual
+// Studio IDE projects all commands are done without /nologo.
+CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
+
+//Value Computed by CMake
+OnlineResourceWatcherServerApp_BINARY_DIR:STATIC=/home/spl1nes/Orange-Management/Modules/OnlineResourceWatcher/server/bin
+
+//Value Computed by CMake
+OnlineResourceWatcherServerApp_IS_TOP_LEVEL:STATIC=ON
+
+//Value Computed by CMake
+OnlineResourceWatcherServerApp_SOURCE_DIR:STATIC=/home/spl1nes/Orange-Management/Modules/OnlineResourceWatcher/server
+
+//Additional directories where find(Qt6 ...) host Qt components
+// are searched
+QT_ADDITIONAL_HOST_PACKAGES_PREFIX_PATH:STRING=
+
+//Additional directories where find(Qt6 ...) components are searched
+QT_ADDITIONAL_PACKAGES_PREFIX_PATH:STRING=
+
+//The directory containing a CMake configuration file for Qt6CoreTools.
+Qt6CoreTools_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt6CoreTools
+
+//The directory containing a CMake configuration file for Qt6Core.
+Qt6Core_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt6Core
+
+//The directory containing a CMake configuration file for Qt6.
+Qt6_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt6
+
+
+########################
+# INTERNAL cache entries
+########################
+
+//ADVANCED property for variable: CMAKE_ADDR2LINE
+CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_AR
+CMAKE_AR-ADVANCED:INTERNAL=1
+//This is the directory where this CMakeCache.txt was created
+CMAKE_CACHEFILE_DIR:INTERNAL=/home/spl1nes/Orange-Management/Modules/OnlineResourceWatcher/server/bin
+//Major version of cmake used to create the current loaded cache
+CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
+//Minor version of cmake used to create the current loaded cache
+CMAKE_CACHE_MINOR_VERSION:INTERNAL=25
+//Patch version of cmake used to create the current loaded cache
+CMAKE_CACHE_PATCH_VERSION:INTERNAL=1
+//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
+CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
+//Path to CMake executable.
+CMAKE_COMMAND:INTERNAL=/snap/cmake/1210/bin/cmake
+//Path to cpack program executable.
+CMAKE_CPACK_COMMAND:INTERNAL=/snap/cmake/1210/bin/cpack
+//Path to ctest program executable.
+CMAKE_CTEST_COMMAND:INTERNAL=/snap/cmake/1210/bin/ctest
+//ADVANCED property for variable: CMAKE_CXX_COMPILER
+CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR
+CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB
+CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_FLAGS
+CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
+CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
+CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
+CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
+CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_DLLTOOL
+CMAKE_DLLTOOL-ADVANCED:INTERNAL=1
+//Path to cache edit program executable.
+CMAKE_EDIT_COMMAND:INTERNAL=/snap/cmake/1210/bin/ccmake
+//Executable file format
+CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF
+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
+CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
+CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
+CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
+CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
+CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
+CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
+//Name of external makefile project generator.
+CMAKE_EXTRA_GENERATOR:INTERNAL=
+//Name of generator.
+CMAKE_GENERATOR:INTERNAL=Unix Makefiles
+//Generator instance identifier.
+CMAKE_GENERATOR_INSTANCE:INTERNAL=
+//Name of generator platform.
+CMAKE_GENERATOR_PLATFORM:INTERNAL=
+//Name of generator toolset.
+CMAKE_GENERATOR_TOOLSET:INTERNAL=
+//Test CMAKE_HAVE_LIBC_PTHREAD
+CMAKE_HAVE_LIBC_PTHREAD:INTERNAL=1
+//Source directory with the top level CMakeLists.txt file for this
+// project
+CMAKE_HOME_DIRECTORY:INTERNAL=/home/spl1nes/Orange-Management/Modules/OnlineResourceWatcher/server
+//Install .so files without execute permission.
+CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1
+//ADVANCED property for variable: CMAKE_LINKER
+CMAKE_LINKER-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
+CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
+CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
+CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
+CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
+CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
+CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_NM
+CMAKE_NM-ADVANCED:INTERNAL=1
+//number of local generators
+CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
+//ADVANCED property for variable: CMAKE_OBJCOPY
+CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_OBJDUMP
+CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
+//Platform information initialized
+CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_RANLIB
+CMAKE_RANLIB-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_READELF
+CMAKE_READELF-ADVANCED:INTERNAL=1
+//Path to CMake installation.
+CMAKE_ROOT:INTERNAL=/snap/cmake/1210/share/cmake-3.25
+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
+CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
+CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
+CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
+CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
+CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
+CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SKIP_RPATH
+CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
+CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
+CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
+CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
+CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
+CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_STRIP
+CMAKE_STRIP-ADVANCED:INTERNAL=1
+//uname command
+CMAKE_UNAME:INTERNAL=/usr/bin/uname
+//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
+CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
+//Details about finding Threads
+FIND_PACKAGE_MESSAGE_DETAILS_Threads:INTERNAL=[TRUE][v()]
+//Details about finding WrapAtomic
+FIND_PACKAGE_MESSAGE_DETAILS_WrapAtomic:INTERNAL=[1][v()]
+//Test HAVE_STDATOMIC
+HAVE_STDATOMIC:INTERNAL=1
+//Qt feature: aesni (from target Qt6::Core)
+QT_FEATURE_aesni:INTERNAL=ON
+//Qt feature: alloca (from target Qt6::Core)
+QT_FEATURE_alloca:INTERNAL=ON
+//Qt feature: alloca_h (from target Qt6::Core)
+QT_FEATURE_alloca_h:INTERNAL=ON
+//Qt feature: alloca_malloc_h (from target Qt6::Core)
+QT_FEATURE_alloca_malloc_h:INTERNAL=OFF
+//Qt feature: android_style_assets (from target Qt6::Core)
+QT_FEATURE_android_style_assets:INTERNAL=OFF
+//Qt feature: animation (from target Qt6::Core)
+QT_FEATURE_animation:INTERNAL=ON
+//Qt feature: appstore_compliant (from target Qt6::Core)
+QT_FEATURE_appstore_compliant:INTERNAL=OFF
+//Qt feature: arm_crc32 (from target Qt6::Core)
+QT_FEATURE_arm_crc32:INTERNAL=OFF
+//Qt feature: arm_crypto (from target Qt6::Core)
+QT_FEATURE_arm_crypto:INTERNAL=OFF
+//Qt feature: avx (from target Qt6::Core)
+QT_FEATURE_avx:INTERNAL=ON
+//Qt feature: avx2 (from target Qt6::Core)
+QT_FEATURE_avx2:INTERNAL=ON
+//Qt feature: avx512bw (from target Qt6::Core)
+QT_FEATURE_avx512bw:INTERNAL=ON
+//Qt feature: avx512cd (from target Qt6::Core)
+QT_FEATURE_avx512cd:INTERNAL=ON
+//Qt feature: avx512dq (from target Qt6::Core)
+QT_FEATURE_avx512dq:INTERNAL=ON
+//Qt feature: avx512er (from target Qt6::Core)
+QT_FEATURE_avx512er:INTERNAL=ON
+//Qt feature: avx512f (from target Qt6::Core)
+QT_FEATURE_avx512f:INTERNAL=ON
+//Qt feature: avx512ifma (from target Qt6::Core)
+QT_FEATURE_avx512ifma:INTERNAL=ON
+//Qt feature: avx512pf (from target Qt6::Core)
+QT_FEATURE_avx512pf:INTERNAL=ON
+//Qt feature: avx512vbmi (from target Qt6::Core)
+QT_FEATURE_avx512vbmi:INTERNAL=ON
+//Qt feature: avx512vl (from target Qt6::Core)
+QT_FEATURE_avx512vl:INTERNAL=ON
+//Qt feature: backtrace (from target Qt6::Core)
+QT_FEATURE_backtrace:INTERNAL=ON
+//Qt feature: c11 (from target Qt6::Core)
+QT_FEATURE_c11:INTERNAL=ON
+//Qt feature: c99 (from target Qt6::Core)
+QT_FEATURE_c99:INTERNAL=ON
+//Qt feature: cborstreamreader (from target Qt6::Core)
+QT_FEATURE_cborstreamreader:INTERNAL=ON
+//Qt feature: cborstreamwriter (from target Qt6::Core)
+QT_FEATURE_cborstreamwriter:INTERNAL=ON
+//Qt feature: clock_gettime (from target Qt6::Core)
+QT_FEATURE_clock_gettime:INTERNAL=ON
+//Qt feature: clock_monotonic (from target Qt6::Core)
+QT_FEATURE_clock_monotonic:INTERNAL=ON
+//Qt feature: commandlineparser (from target Qt6::Core)
+QT_FEATURE_commandlineparser:INTERNAL=ON
+//Qt feature: concatenatetablesproxymodel (from target Qt6::Core)
+QT_FEATURE_concatenatetablesproxymodel:INTERNAL=ON
+//Qt feature: concurrent (from target Qt6::Core)
+QT_FEATURE_concurrent:INTERNAL=ON
+//Qt feature: cpp_winrt (from target Qt6::Core)
+QT_FEATURE_cpp_winrt:INTERNAL=OFF
+//Qt feature: cross_compile (from target Qt6::Core)
+QT_FEATURE_cross_compile:INTERNAL=OFF
+//Qt feature: cxx11 (from target Qt6::Core)
+QT_FEATURE_cxx11:INTERNAL=ON
+//Qt feature: cxx11_future (from target Qt6::Core)
+QT_FEATURE_cxx11_future:INTERNAL=ON
+//Qt feature: cxx14 (from target Qt6::Core)
+QT_FEATURE_cxx14:INTERNAL=ON
+//Qt feature: cxx17 (from target Qt6::Core)
+QT_FEATURE_cxx17:INTERNAL=ON
+//Qt feature: cxx17_filesystem (from target Qt6::Core)
+QT_FEATURE_cxx17_filesystem:INTERNAL=ON
+//Qt feature: cxx1z (from target Qt6::Core)
+QT_FEATURE_cxx1z:INTERNAL=ON
+//Qt feature: cxx20 (from target Qt6::Core)
+QT_FEATURE_cxx20:INTERNAL=OFF
+//Qt feature: cxx2a (from target Qt6::Core)
+QT_FEATURE_cxx2a:INTERNAL=OFF
+//Qt feature: datestring (from target Qt6::Core)
+QT_FEATURE_datestring:INTERNAL=ON
+//Qt feature: datetimeparser (from target Qt6::Core)
+QT_FEATURE_datetimeparser:INTERNAL=ON
+//Qt feature: dbus (from target Qt6::Core)
+QT_FEATURE_dbus:INTERNAL=ON
+//Qt feature: dbus_linked (from target Qt6::Core)
+QT_FEATURE_dbus_linked:INTERNAL=ON
+//Qt feature: debug (from target Qt6::Core)
+QT_FEATURE_debug:INTERNAL=OFF
+//Qt feature: debug_and_release (from target Qt6::Core)
+QT_FEATURE_debug_and_release:INTERNAL=OFF
+//Qt feature: dlopen (from target Qt6::Core)
+QT_FEATURE_dlopen:INTERNAL=ON
+//Qt feature: doubleconversion (from target Qt6::Core)
+QT_FEATURE_doubleconversion:INTERNAL=ON
+//Qt feature: easingcurve (from target Qt6::Core)
+QT_FEATURE_easingcurve:INTERNAL=ON
+//Qt feature: enable_new_dtags (from target Qt6::Core)
+QT_FEATURE_enable_new_dtags:INTERNAL=ON
+//Qt feature: etw (from target Qt6::Core)
+QT_FEATURE_etw:INTERNAL=OFF
+//Qt feature: eventfd (from target Qt6::Core)
+QT_FEATURE_eventfd:INTERNAL=ON
+//Qt feature: f16c (from target Qt6::Core)
+QT_FEATURE_f16c:INTERNAL=ON
+//Qt feature: filesystemiterator (from target Qt6::Core)
+QT_FEATURE_filesystemiterator:INTERNAL=ON
+//Qt feature: filesystemwatcher (from target Qt6::Core)
+QT_FEATURE_filesystemwatcher:INTERNAL=ON
+//Qt feature: force_asserts (from target Qt6::Core)
+QT_FEATURE_force_asserts:INTERNAL=OFF
+//Qt feature: forkfd_pidfd (from target Qt6::Core)
+QT_FEATURE_forkfd_pidfd:INTERNAL=ON
+//Qt feature: framework (from target Qt6::Core)
+QT_FEATURE_framework:INTERNAL=OFF
+//Qt feature: futimens (from target Qt6::Core)
+QT_FEATURE_futimens:INTERNAL=ON
+//Qt feature: futimes (from target Qt6::Core)
+QT_FEATURE_futimes:INTERNAL=OFF
+//Qt feature: future (from target Qt6::Core)
+QT_FEATURE_future:INTERNAL=ON
+//Qt feature: gc_binaries (from target Qt6::Core)
+QT_FEATURE_gc_binaries:INTERNAL=OFF
+//Qt feature: gestures (from target Qt6::Core)
+QT_FEATURE_gestures:INTERNAL=ON
+//Qt feature: getauxval (from target Qt6::Core)
+QT_FEATURE_getauxval:INTERNAL=ON
+//Qt feature: getentropy (from target Qt6::Core)
+QT_FEATURE_getentropy:INTERNAL=ON
+//Qt feature: glib (from target Qt6::Core)
+QT_FEATURE_glib:INTERNAL=ON
+//Qt feature: glibc (from target Qt6::Core)
+QT_FEATURE_glibc:INTERNAL=ON
+//Qt feature: gui (from target Qt6::Core)
+QT_FEATURE_gui:INTERNAL=ON
+//Qt feature: hijricalendar (from target Qt6::Core)
+QT_FEATURE_hijricalendar:INTERNAL=ON
+//Qt feature: icu (from target Qt6::Core)
+QT_FEATURE_icu:INTERNAL=ON
+//Qt feature: identityproxymodel (from target Qt6::Core)
+QT_FEATURE_identityproxymodel:INTERNAL=ON
+//Qt feature: inotify (from target Qt6::Core)
+QT_FEATURE_inotify:INTERNAL=ON
+//Qt feature: intelcet (from target Qt6::Core)
+QT_FEATURE_intelcet:INTERNAL=ON
+//Qt feature: islamiccivilcalendar (from target Qt6::Core)
+QT_FEATURE_islamiccivilcalendar:INTERNAL=ON
+//Qt feature: itemmodel (from target Qt6::Core)
+QT_FEATURE_itemmodel:INTERNAL=ON
+//Qt feature: jalalicalendar (from target Qt6::Core)
+QT_FEATURE_jalalicalendar:INTERNAL=ON
+//Qt feature: journald (from target Qt6::Core)
+QT_FEATURE_journald:INTERNAL=OFF
+//Qt feature: largefile (from target Qt6::Core)
+QT_FEATURE_largefile:INTERNAL=ON
+//Qt feature: library (from target Qt6::Core)
+QT_FEATURE_library:INTERNAL=ON
+//Qt feature: libudev (from target Qt6::Core)
+QT_FEATURE_libudev:INTERNAL=ON
+//Qt feature: linkat (from target Qt6::Core)
+QT_FEATURE_linkat:INTERNAL=ON
+//Qt feature: lttng (from target Qt6::Core)
+QT_FEATURE_lttng:INTERNAL=OFF
+//Qt feature: mimetype (from target Qt6::Core)
+QT_FEATURE_mimetype:INTERNAL=ON
+//Qt feature: mimetype_database (from target Qt6::Core)
+QT_FEATURE_mimetype_database:INTERNAL=OFF
+//Qt feature: mips_dsp (from target Qt6::Core)
+QT_FEATURE_mips_dsp:INTERNAL=OFF
+//Qt feature: mips_dspr2 (from target Qt6::Core)
+QT_FEATURE_mips_dspr2:INTERNAL=OFF
+//Qt feature: neon (from target Qt6::Core)
+QT_FEATURE_neon:INTERNAL=OFF
+//Qt feature: network (from target Qt6::Core)
+QT_FEATURE_network:INTERNAL=ON
+//Qt feature: pcre2 (from target Qt6::Core)
+QT_FEATURE_pcre2:INTERNAL=ON
+//Qt feature: pkg_config (from target Qt6::Core)
+QT_FEATURE_pkg_config:INTERNAL=ON
+//Qt feature: plugin_manifest (from target Qt6::Core)
+QT_FEATURE_plugin_manifest:INTERNAL=ON
+//Qt feature: poll_poll (from target Qt6::Core)
+QT_FEATURE_poll_poll:INTERNAL=OFF
+//Qt feature: poll_pollts (from target Qt6::Core)
+QT_FEATURE_poll_pollts:INTERNAL=OFF
+//Qt feature: poll_ppoll (from target Qt6::Core)
+QT_FEATURE_poll_ppoll:INTERNAL=ON
+//Qt feature: poll_select (from target Qt6::Core)
+QT_FEATURE_poll_select:INTERNAL=OFF
+//Qt feature: posix_fallocate (from target Qt6::Core)
+QT_FEATURE_posix_fallocate:INTERNAL=ON
+//Qt feature: precompile_header (from target Qt6::Core)
+QT_FEATURE_precompile_header:INTERNAL=ON
+//Qt feature: printsupport (from target Qt6::Core)
+QT_FEATURE_printsupport:INTERNAL=ON
+//Qt feature: private_tests (from target Qt6::Core)
+QT_FEATURE_private_tests:INTERNAL=OFF
+//Qt feature: process (from target Qt6::Core)
+QT_FEATURE_process:INTERNAL=ON
+//Qt feature: processenvironment (from target Qt6::Core)
+QT_FEATURE_processenvironment:INTERNAL=ON
+//Qt feature: properties (from target Qt6::Core)
+QT_FEATURE_properties:INTERNAL=ON
+//Qt feature: proxymodel (from target Qt6::Core)
+QT_FEATURE_proxymodel:INTERNAL=ON
+//Qt feature: qqnx_pps (from target Qt6::Core)
+QT_FEATURE_qqnx_pps:INTERNAL=OFF
+//Qt feature: rdrnd (from target Qt6::Core)
+QT_FEATURE_rdrnd:INTERNAL=ON
+//Qt feature: rdseed (from target Qt6::Core)
+QT_FEATURE_rdseed:INTERNAL=ON
+//Qt feature: reduce_exports (from target Qt6::Core)
+QT_FEATURE_reduce_exports:INTERNAL=ON
+//Qt feature: reduce_relocations (from target Qt6::Core)
+QT_FEATURE_reduce_relocations:INTERNAL=ON
+//Qt feature: regularexpression (from target Qt6::Core)
+QT_FEATURE_regularexpression:INTERNAL=ON
+//Qt feature: relocatable (from target Qt6::Core)
+QT_FEATURE_relocatable:INTERNAL=ON
+//Qt feature: renameat2 (from target Qt6::Core)
+QT_FEATURE_renameat2:INTERNAL=OFF
+//Qt feature: rpath (from target Qt6::Core)
+QT_FEATURE_rpath:INTERNAL=OFF
+//Qt feature: separate_debug_info (from target Qt6::Core)
+QT_FEATURE_separate_debug_info:INTERNAL=OFF
+//Qt feature: settings (from target Qt6::Core)
+QT_FEATURE_settings:INTERNAL=ON
+//Qt feature: sha3_fast (from target Qt6::Core)
+QT_FEATURE_sha3_fast:INTERNAL=ON
+//Qt feature: shani (from target Qt6::Core)
+QT_FEATURE_shani:INTERNAL=ON
+//Qt feature: shared (from target Qt6::Core)
+QT_FEATURE_shared:INTERNAL=ON
+//Qt feature: sharedmemory (from target Qt6::Core)
+QT_FEATURE_sharedmemory:INTERNAL=ON
+//Qt feature: shortcut (from target Qt6::Core)
+QT_FEATURE_shortcut:INTERNAL=ON
+//Qt feature: signaling_nan (from target Qt6::Core)
+QT_FEATURE_signaling_nan:INTERNAL=ON
+//Qt feature: simdAlways (from target Qt6::Core)
+QT_FEATURE_simdAlways:INTERNAL=ON
+//Qt feature: simulator_and_device (from target Qt6::Core)
+QT_FEATURE_simulator_and_device:INTERNAL=OFF
+//Qt feature: slog2 (from target Qt6::Core)
+QT_FEATURE_slog2:INTERNAL=OFF
+//Qt feature: sortfilterproxymodel (from target Qt6::Core)
+QT_FEATURE_sortfilterproxymodel:INTERNAL=ON
+//Qt feature: sql (from target Qt6::Core)
+QT_FEATURE_sql:INTERNAL=ON
+//Qt feature: sse2 (from target Qt6::Core)
+QT_FEATURE_sse2:INTERNAL=ON
+//Qt feature: sse3 (from target Qt6::Core)
+QT_FEATURE_sse3:INTERNAL=ON
+//Qt feature: sse4_1 (from target Qt6::Core)
+QT_FEATURE_sse4_1:INTERNAL=ON
+//Qt feature: sse4_2 (from target Qt6::Core)
+QT_FEATURE_sse4_2:INTERNAL=ON
+//Qt feature: ssse3 (from target Qt6::Core)
+QT_FEATURE_ssse3:INTERNAL=ON
+//Qt feature: stack_protector_strong (from target Qt6::Core)
+QT_FEATURE_stack_protector_strong:INTERNAL=OFF
+//Qt feature: static (from target Qt6::Core)
+QT_FEATURE_static:INTERNAL=OFF
+//Qt feature: statx (from target Qt6::Core)
+QT_FEATURE_statx:INTERNAL=ON
+//Qt feature: std_atomic64 (from target Qt6::Core)
+QT_FEATURE_std_atomic64:INTERNAL=ON
+//Qt feature: stringlistmodel (from target Qt6::Core)
+QT_FEATURE_stringlistmodel:INTERNAL=ON
+//Qt feature: syslog (from target Qt6::Core)
+QT_FEATURE_syslog:INTERNAL=OFF
+//Qt feature: system_doubleconversion (from target Qt6::Core)
+QT_FEATURE_system_doubleconversion:INTERNAL=ON
+//Qt feature: system_libb2 (from target Qt6::Core)
+QT_FEATURE_system_libb2:INTERNAL=ON
+//Qt feature: system_pcre2 (from target Qt6::Core)
+QT_FEATURE_system_pcre2:INTERNAL=ON
+//Qt feature: system_zlib (from target Qt6::Core)
+QT_FEATURE_system_zlib:INTERNAL=ON
+//Qt feature: systemsemaphore (from target Qt6::Core)
+QT_FEATURE_systemsemaphore:INTERNAL=ON
+//Qt feature: temporaryfile (from target Qt6::Core)
+QT_FEATURE_temporaryfile:INTERNAL=ON
+//Qt feature: testlib (from target Qt6::Core)
+QT_FEATURE_testlib:INTERNAL=ON
+//Qt feature: textdate (from target Qt6::Core)
+QT_FEATURE_textdate:INTERNAL=ON
+//Qt feature: thread (from target Qt6::Core)
+QT_FEATURE_thread:INTERNAL=ON
+//Qt feature: threadsafe_cloexec (from target Qt6::Core)
+QT_FEATURE_threadsafe_cloexec:INTERNAL=ON
+//Qt feature: timezone (from target Qt6::Core)
+QT_FEATURE_timezone:INTERNAL=ON
+//Qt feature: translation (from target Qt6::Core)
+QT_FEATURE_translation:INTERNAL=ON
+//Qt feature: transposeproxymodel (from target Qt6::Core)
+QT_FEATURE_transposeproxymodel:INTERNAL=ON
+//Qt feature: use_bfd_linker (from target Qt6::Core)
+QT_FEATURE_use_bfd_linker:INTERNAL=OFF
+//Qt feature: use_gold_linker (from target Qt6::Core)
+QT_FEATURE_use_gold_linker:INTERNAL=OFF
+//Qt feature: use_lld_linker (from target Qt6::Core)
+QT_FEATURE_use_lld_linker:INTERNAL=OFF
+//Qt feature: use_mold_linker (from target Qt6::Core)
+QT_FEATURE_use_mold_linker:INTERNAL=OFF
+//Qt feature: widgets (from target Qt6::Core)
+QT_FEATURE_widgets:INTERNAL=ON
+//Qt feature: xml (from target Qt6::Core)
+QT_FEATURE_xml:INTERNAL=ON
+//Qt feature: xmlstream (from target Qt6::Core)
+QT_FEATURE_xmlstream:INTERNAL=ON
+//Qt feature: xmlstreamreader (from target Qt6::Core)
+QT_FEATURE_xmlstreamreader:INTERNAL=ON
+//Qt feature: xmlstreamwriter (from target Qt6::Core)
+QT_FEATURE_xmlstreamwriter:INTERNAL=ON
+//Qt feature: zstd (from target Qt6::Core)
+QT_FEATURE_zstd:INTERNAL=ON
+//linker supports push/pop state
+_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED:INTERNAL=TRUE
+
diff --git a/server/bin/OnlineResourceWatcherServerApp b/server/bin/OnlineResourceWatcherServerApp
new file mode 100755
index 0000000..0b85e30
Binary files /dev/null and b/server/bin/OnlineResourceWatcherServerApp differ
diff --git a/server/bin/cmake_install.cmake b/server/bin/cmake_install.cmake
new file mode 100644
index 0000000..64c5280
--- /dev/null
+++ b/server/bin/cmake_install.cmake
@@ -0,0 +1,54 @@
+# Install script for directory: /home/spl1nes/Orange-Management/Modules/OnlineResourceWatcher/server
+
+# Set the install prefix
+if(NOT DEFINED CMAKE_INSTALL_PREFIX)
+ set(CMAKE_INSTALL_PREFIX "/usr/local")
+endif()
+string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
+
+# Set the install configuration name.
+if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
+ if(BUILD_TYPE)
+ string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
+ CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
+ else()
+ set(CMAKE_INSTALL_CONFIG_NAME "")
+ endif()
+ message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
+endif()
+
+# Set the component getting installed.
+if(NOT CMAKE_INSTALL_COMPONENT)
+ if(COMPONENT)
+ message(STATUS "Install component: \"${COMPONENT}\"")
+ set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
+ else()
+ set(CMAKE_INSTALL_COMPONENT)
+ endif()
+endif()
+
+# Install shared libraries without execute permission?
+if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
+ set(CMAKE_INSTALL_SO_NO_EXE "1")
+endif()
+
+# Is this installation the result of a crosscompile?
+if(NOT DEFINED CMAKE_CROSSCOMPILING)
+ set(CMAKE_CROSSCOMPILING "FALSE")
+endif()
+
+# Set default install directory permissions.
+if(NOT DEFINED CMAKE_OBJDUMP)
+ set(CMAKE_OBJDUMP "/usr/bin/objdump")
+endif()
+
+if(CMAKE_INSTALL_COMPONENT)
+ set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
+else()
+ set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
+endif()
+
+string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
+ "${CMAKE_INSTALL_MANIFEST_FILES}")
+file(WRITE "/home/spl1nes/Orange-Management/Modules/OnlineResourceWatcher/server/bin/${CMAKE_INSTALL_MANIFEST}"
+ "${CMAKE_INSTALL_MANIFEST_CONTENT}")
diff --git a/server/build/config.json b/server/bin/config.json
similarity index 100%
rename from server/build/config.json
rename to server/bin/config.json
diff --git a/server/build/install.sh b/server/bin/install.sh
similarity index 100%
rename from server/build/install.sh
rename to server/bin/install.sh
diff --git a/server/build/OnlineResourceWatcherServerApp b/server/build/OnlineResourceWatcherServerApp
deleted file mode 100755
index 649cd80..0000000
Binary files a/server/build/OnlineResourceWatcherServerApp and /dev/null differ
diff --git a/server/cOMS b/server/cOMS
index a6216bd..b0d10c5 160000
--- a/server/cOMS
+++ b/server/cOMS
@@ -1 +1 @@
-Subproject commit a6216bdb586725637e85d5b57bca4a02b388d678
+Subproject commit b0d10c5eaac8c32d3e37638535bfc112cce8da23
diff --git a/server/main.cpp b/server/main.cpp
index 0d6766a..c3d8b66 100755
--- a/server/main.cpp
+++ b/server/main.cpp
@@ -14,7 +14,9 @@
#include "cOMS/Utils/ApplicationUtils.h"
#include "cOMS/DataStorage/Database/Connection/ConnectionAbstract.h"
#include "cOMS/Utils/Parser/Json.h"
+#include "cOMS/Utils/OSWrapper.h"
#include "cOMS/Router/Router.h"
+#include "cOMS/Threads/Thread.h"
#include "Routes.h"
@@ -25,6 +27,7 @@
typedef struct {
DataStorage::Database::ConnectionAbstract *db;
nlohmann::json config;
+ Threads::ThreadPool *pool;
} App;
App app = {0};
@@ -42,6 +45,7 @@ int main(int argc, char **argv)
return -1;
}
+
char *cwdT = Utils::StringUtils::search_replace(cwd, "\\", "/");
free(cwd);
cwd = cwdT;
@@ -79,14 +83,16 @@ int main(int argc, char **argv)
app.config["db"]["core"]["masters"]["admin"]["password"].get_ref().c_str(),
};
+ app.pool = Threads::pool_create(app.config["app"]["threads"]["count"].get());
+
app.db = DataStorage::Database::create_connection(dbdata);
app.db->connect();
/* --------------- Handle request --------------- */
// Handle routes
- Router router = generate_routes();
- Fptr ptr = Router::match_route(&router, arg);
+ Router::Router router = generate_routes();
+ Router::RouterFunc ptr = Router::match_route(&router, arg);
// No endpoint found
if (ptr == NULL) {
@@ -107,11 +113,7 @@ int main(int argc, char **argv)
arg = NULL;
// Reset CWD (don't know if this is necessary)
- #ifdef _WIN32
- _chdir(cwd);
- #else
- chdir(cwd);
- #endif
+ chdir(cwd);
free(cwd);
}
| | | |