This commit is contained in:
Dennis Eichhorn 2022-12-10 22:17:54 +01:00
parent 0ef4ce5331
commit 826c1014a1
35 changed files with 1139 additions and 87 deletions

View File

@ -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,

View File

@ -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",

View File

@ -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);

View File

@ -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;
}
/**

View File

@ -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',
],
];
/**

32
Models/ResourceStatus.php Normal file
View File

@ -0,0 +1,32 @@
<?php
/**
* Karaka
*
* PHP Version 8.1
*
* @package Modules\OnlineResourceWatcher\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://karaka.app
*/
declare(strict_types=1);
namespace Modules\OnlineResourceWatcher\Models;
use phpOMS\Stdlib\Base\Enum;
/**
* Event type enum.
*
* @package Modules\OnlineResourceWatcher\Models
* @license OMS License 1.0
* @link https://karaka.app
* @since 1.0.0
*/
abstract class ResourceStatus extends Enum
{
public const ACTIVE = 1;
public const INACTIVE = 2;
}

View File

@ -82,7 +82,7 @@ $next = $tableView->getNextLink(
<tbody>
<?php $count = 0;
foreach ($audits as $key => $audit) : ++$count;
$url = UriFactory::build('{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
$url = UriFactory::build('{/lang}/{/app}/{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td>
<td>

View File

@ -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(
<tbody>
<?php $count = 0;
foreach ($audits as $key => $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()); ?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td><?= $audit->getId(); ?>
<td><?php if ($audit->getOld() === null) : echo $this->getHtml('CREATE', '0', '0'); ?>
@ -107,7 +107,7 @@ $next = $tableView->getNextLink(
<?php endif; ?>
<td><?= $audit->getType(); ?>
<td><?= $audit->getTrigger(); ?>
<td><a class="content" href="<?= UriFactory::build('{/prefix}admin/account/settings?id=' . $audit->createdBy->getId()); ?>"><?= $this->printHtml(
<td><a class="content" href="<?= UriFactory::build('{/lang}/{/app}/'{/lang}/{/app}/admin/account/settings?id=' . $audit->createdBy->getId()); ?>"><?= $this->printHtml(
$this->renderUserName('%3$s %2$s %1$s', [$audit->createdBy->name1, $audit->createdBy->name2, $audit->createdBy->name3, $audit->createdBy->login])
); ?></a>
<td><?= $this->printHtml($audit->getRef()); ?>

View File

@ -77,7 +77,7 @@ $next = $tableView->getNextLink(
<tbody>
<?php $count = 0;
foreach ($audits as $key => $audit) : ++$count;
$url = UriFactory::build('{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
$url = UriFactory::build('{/lang}/{/app}/{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td>
<?php endforeach; ?>

View File

@ -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(
); ?>
<tbody>
<?php $count = 0;
foreach ($audits as $key => $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()); ?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td>
<td>

View File

@ -82,7 +82,7 @@ $next = $tableView->getNextLink(
<tbody>
<?php $count = 0;
foreach ($audits as $key => $audit) : ++$count;
$url = UriFactory::build('{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
$url = UriFactory::build('{/lang}/{/app}/{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td>
<td>

View File

@ -16,7 +16,7 @@ declare(strict_types=1);
use phpOMS\Uri\UriFactory;
?>
<header>
<a id="logo" href="<?= UriFactory::build('{/prefix}'); ?>">
<a id="logo" href="<?= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>">
<span><img alt="<?= $this->getHtml('Logo', '0', '0'); ?>" src="Applications/Backend/img/logo.png" width="40px"></span>
<span id="logo-name">Jingga</span>
</a>

View File

@ -29,23 +29,23 @@ use phpOMS\Uri\UriFactory;
<li><a class="<?= $this->request->uri->getPathElement(0) === 'admin'
&& $this->request->uri->getPathElement(1) === 'organizations'
? 'active' : '';
?>" href="<?= UriFactory::build('{/prefix}'); ?>admin/organizations"><?= $this->getHtml('Organizations', '0', '0'); ?></a>
?>" href="<?= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>admin/organizations"><?= $this->getHtml('Organizations', '0', '0'); ?></a>
<li><a class="<?= $this->request->uri->getPathElement(0) === 'admin'
&& $this->request->uri->getPathElement(1) === 'users'
? 'active' : '';
?>" href="<?= UriFactory::build('{/prefix}'); ?>admin/users"><?= $this->getHtml('Users', '0', '0'); ?></a>
?>" href="<?= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>admin/users"><?= $this->getHtml('Users', '0', '0'); ?></a>
<li><a class="<?= $this->request->uri->getPathElement(0) === 'admin'
&& $this->request->uri->getPathElement(1) === 'resources'
? 'active' : '';
?>" href="<?= UriFactory::build('{/prefix}'); ?>admin/resources"><?= $this->getHtml('Resources', '0', '0'); ?></a>
?>" href="<?= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>admin/resources"><?= $this->getHtml('Resources', '0', '0'); ?></a>
<li><a class="<?= $this->request->uri->getPathElement(0) === 'admin'
&& $this->request->uri->getPathElement(1) === 'bills'
? 'active' : '';
?>" href="<?= UriFactory::build('{/prefix}'); ?>admin/bills"><?= $this->getHtml('Bills', '0', '0'); ?></a>
?>" href="<?= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>admin/bills"><?= $this->getHtml('Bills', '0', '0'); ?></a>
<li><a class="<?= $this->request->uri->getPathElement(0) === 'admin'
&& $this->request->uri->getPathElement(1) === 'logs'
? 'active' : '';
?>" href="<?= UriFactory::build('{/prefix}'); ?>admin/logs"><?= $this->getHtml('Logs', '0', '0'); ?></a>
?>" href="<?= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>admin/logs"><?= $this->getHtml('Logs', '0', '0'); ?></a>
</ul>
</li>
<li>
@ -59,19 +59,19 @@ use phpOMS\Uri\UriFactory;
<li><a class="<?= $this->request->uri->getPathElement(0) === 'organization'
&& $this->request->uri->getPathElement(1) === 'settings'
? 'active' : '';
?>" href="<?= UriFactory::build('{/prefix}'); ?>organization/settings"><?= $this->getHtml('Settings', '0', '0'); ?></a>
?>" href="<?= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>organization/settings"><?= $this->getHtml('Settings', '0', '0'); ?></a>
<li><a class="<?= $this->request->uri->getPathElement(0) === 'organization'
&& $this->request->uri->getPathElement(1) === 'users'
? 'active' : '';
?>" href="<?= UriFactory::build('{/prefix}'); ?>organization/users"><?= $this->getHtml('Users', '0', '0'); ?></a>
?>" href="<?= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>organization/users"><?= $this->getHtml('Users', '0', '0'); ?></a>
<li><a class="<?= $this->request->uri->getPathElement(0) === 'organization'
&& $this->request->uri->getPathElement(1) === 'resources'
? 'active' : '';
?>" href="<?= UriFactory::build('{/prefix}'); ?>organization/resources"><?= $this->getHtml('Resources', '0', '0'); ?></a>
?>" href="<?= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>organization/resources"><?= $this->getHtml('Resources', '0', '0'); ?></a>
<li><a class="<?= $this->request->uri->getPathElement(0) === 'organization'
&& $this->request->uri->getPathElement(1) === 'bills'
? 'active' : '';
?>" href="<?= UriFactory::build('{/prefix}'); ?>organization/bills"><?= $this->getHtml('Bills', '0', '0'); ?></a>
?>" href="<?= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>organization/bills"><?= $this->getHtml('Bills', '0', '0'); ?></a>
</ul>
</li>
<li>
@ -84,20 +84,20 @@ use phpOMS\Uri\UriFactory;
</li>
<li><a class="<?= $this->request->uri->getPathElement(0) === ''
? 'active' : '';
?>" href="<?= UriFactory::build('{/prefix}');
?>" href="<?= UriFactory::build('{/lang}/{/app}/{/prefix}');
?>"><?= $this->getHtml('Dashboard', '0', '0'); ?></a>
<li><a class="<?= $this->request->uri->getPathElement(0) === 'user'
&& $this->request->uri->getPathElement(1) === 'settings'
? 'active' : '';
?>" href="<?= UriFactory::build('{/prefix}'); ?>user/settings"><?= $this->getHtml('Settings', '0', '0'); ?></a>
?>" href="<?= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>user/settings"><?= $this->getHtml('Settings', '0', '0'); ?></a>
<li><a class="<?= $this->request->uri->getPathElement(0) === 'user'
&& $this->request->uri->getPathElement(1) === 'resources'
? 'active' : '';
?>" href="<?= UriFactory::build('{/prefix}'); ?>user/resources"><?= $this->getHtml('Resources', '0', '0'); ?></a>
?>" href="<?= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>user/resources"><?= $this->getHtml('Resources', '0', '0'); ?></a>
<li><a class="<?= $this->request->uri->getPathElement(0) === 'user'
&& $this->request->uri->getPathElement(1) === 'reports'
? 'active' : '';
?>" href="<?= UriFactory::build('{/prefix}'); ?>user/reports"><?= $this->getHtml('Reports', '0', '0'); ?></a>
?>" href="<?= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>user/reports"><?= $this->getHtml('Reports', '0', '0'); ?></a>
</ul>
</li>
<li>

View File

@ -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(
<tbody>
<?php $count = 0;
foreach ($audits as $key => $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()); ?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td>
<td>

View File

@ -87,7 +87,7 @@ $next = $tableView->getNextLink(
<tbody>
<?php $count = 0;
foreach ($audits as $key => $audit) : ++$count;
$url = UriFactory::build('{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
$url = UriFactory::build('{/lang}/{/app}/{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td>
<td>

View File

@ -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')
); ?>
<a class="button rf save" href="<?= UriFactory::build('{/prefix}'); ?>organization/users/add"><?= $this->getHtml('Add', '0', '0'); ?></a>
<a class="button rf save" href="<?= UriFactory::build('{/lang}/{/app}/'{/lang}/{/app}/'); ?>organization/users/add"><?= $this->getHtml('Add', '0', '0'); ?></a>
</div>
<div class="slider">
<table id="<?= $tableView->id; ?>" class="default sticky">
@ -78,7 +78,7 @@ $next = $tableView->getNextLink(
<tbody>
<?php $count = 0;
foreach ($audits as $key => $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()); ?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td>
<td>

View File

@ -72,7 +72,7 @@ $next = $tableView->getNextLink(
<tbody>
<?php $count = 0;
foreach ($audits as $key => $audit) : ++$count;
$url = UriFactory::build('{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
$url = UriFactory::build('{/lang}/{/app}/{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td>
<td>

View File

@ -76,7 +76,7 @@ use phpOMS\Uri\UriFactory;
<td><?= $this->getHtml('User', '0', '0'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td><?= $this->getHtml('Email', '0', '0'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<tbody>
<?php $c = 0; foreach ([] as $key => $value) : ++$c; $url = UriFactory::build('{/prefix}admin/account/settings?{?}&id=' . $value->getId()); ?>
<?php $c = 0; foreach ([] as $key => $value) : ++$c; $url = UriFactory::build('{/lang}/{/app}/{/prefix}admin/account/settings?{?}&id=' . $value->getId()); ?>
<tr data-href="<?= $url; ?>">
<td>
<td>

View File

@ -44,7 +44,7 @@ $next = $tableView->getNextLink(
<?= $tableView->renderTitle(
$this->getHtml('Resources', '0', '0')
); ?>
<a class="button rf save" href="<?= UriFactory::build('{/prefix}'); ?>user/resources/create"><?= $this->getHtml('New', '0', '0'); ?></a>
<a class="button rf save" href="<?= UriFactory::build('{/lang}/{/app}/{/prefix}'); ?>user/resources/create"><?= $this->getHtml('New', '0', '0'); ?></a>
</div>
<div class="slider">
<table id="<?= $tableView->id; ?>" class="default sticky">
@ -78,7 +78,7 @@ $next = $tableView->getNextLink(
<tbody>
<?php $count = 0;
foreach ($audits as $key => $audit) : ++$count;
$url = UriFactory::build('{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
$url = UriFactory::build('{/lang}/{/app}/{/prefix}admin/audit/single?id=' . $audit->getId()); ?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td>
<td>

View File

@ -12,7 +12,7 @@
},
"creator": {
"name": "Karaka",
"website": "www.spl1nes.com"
"website": "jingga.app"
},
"description": "OnlineResourceWatcher module.",
"directory": "OnlineResourceWatcher",

View File

@ -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

View File

@ -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<int>();
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];

View File

@ -109,6 +109,14 @@
"id": "frontend",
"lang": "en"
}
},
"threads": {
"count": 5
},
"resources": {
"online": {
"donwloads": 10
}
}
},
"language": [

View File

@ -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;

View File

@ -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

View File

View File

@ -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;
}

691
server/bin/CMakeCache.txt Normal file
View File

@ -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

Binary file not shown.

View File

@ -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}")

@ -1 +1 @@
Subproject commit a6216bdb586725637e85d5b57bca4a02b388d678
Subproject commit b0d10c5eaac8c32d3e37638535bfc112cce8da23

View File

@ -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<const std::string&>().c_str(),
};
app.pool = Threads::pool_create(app.config["app"]["threads"]["count"].get<int>());
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);
}