migrate therinaldos.com data
Build & Deploy to DigitalOcean Space / build (push) Failing after 2m38s

This commit is contained in:
2024-05-05 15:50:45 -04:00
commit ef1ff240d4
23182 changed files with 3801898 additions and 0 deletions
@@ -0,0 +1,95 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2020 Daniel Kesselberg <mail@danielkesselberg.de>
*
* @author Daniel Kesselberg <mail@danielkesselberg.de>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\ServerInfo\Resources;
class Disk {
private string $device = '';
private string $fs = '';
private int $used = 0;
private int $available = 0;
private string $percent = '';
private string $mount = '';
public function getDevice(): string {
return $this->device;
}
public function setDevice(string $device): void {
$this->device = $device;
}
public function getFs(): string {
return $this->fs;
}
public function setFs(string $fs): void {
$this->fs = $fs;
}
/**
* @return int in MB
*/
public function getUsed(): int {
return $this->used;
}
/**
* @param int $used in MB
*/
public function setUsed(int $used): void {
$this->used = $used;
}
/**
* @return int in MB
*/
public function getAvailable(): int {
return $this->available;
}
/**
* @param int $available in MB
*/
public function setAvailable(int $available): void {
$this->available = $available;
}
public function getPercent(): string {
return $this->percent;
}
public function setPercent(string $percent): void {
$this->percent = $percent;
}
public function getMount(): string {
return $this->mount;
}
public function setMount(string $mount): void {
$this->mount = $mount;
}
}
@@ -0,0 +1,104 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2020 Daniel Kesselberg <mail@danielkesselberg.de>
*
* @author Daniel Kesselberg <mail@danielkesselberg.de>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\ServerInfo\Resources;
class Memory {
private int $memTotal = -1;
private int $memFree = -1;
private int $memAvailable = -1;
private int $swapTotal = -1;
private int $swapFree = -1;
/**
* @return int in MB
*/
public function getMemTotal(): int {
return $this->memTotal;
}
/**
* @param int $memTotal in MB
*/
public function setMemTotal(int $memTotal): void {
$this->memTotal = $memTotal;
}
/**
* @return int in MB
*/
public function getMemFree(): int {
return $this->memFree;
}
/**
* @param int $memFree in MB
*/
public function setMemFree(int $memFree): void {
$this->memFree = $memFree;
}
/**
* @return int in MB
*/
public function getMemAvailable(): int {
return $this->memAvailable;
}
/**
* @param int $memAvailable in MB
*/
public function setMemAvailable(int $memAvailable): void {
$this->memAvailable = $memAvailable;
}
/**
* @return int in MB
*/
public function getSwapTotal(): int {
return $this->swapTotal;
}
/**
* @param int $swapTotal in MB
*/
public function setSwapTotal(int $swapTotal): void {
$this->swapTotal = $swapTotal;
}
/**
* @return int in MB
*/
public function getSwapFree(): int {
return $this->swapFree;
}
/**
* @param int $swapFree in MB
*/
public function setSwapFree(int $swapFree): void {
$this->swapFree = $swapFree;
}
}
@@ -0,0 +1,114 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2022 Daniel Kesselberg <mail@danielkesselberg.de>
*
* @author Daniel Kesselberg <mail@danielkesselberg.de>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\ServerInfo\Resources;
class NetInterface {
private string $name = '';
private bool $up = false;
private array $ipv4 = [];
private array $ipv6 = [];
private string $mac = '';
private string $speed = 'unknown';
private string $duplex = 'unknown';
private bool $loopback = false;
public function __construct(string $name, bool $up) {
$this->name = $name;
$this->up = $up;
}
public function getName(): string {
return $this->name;
}
public function setName(string $name): void {
$this->name = $name;
}
public function isUp(): bool {
return $this->up;
}
public function setUp(bool $up): void {
$this->up = $up;
}
/**
* @return string[]
*/
public function getIPv4(): array {
return $this->ipv4;
}
public function addIPv4(string $ipv4): void {
$this->ipv4[] = $ipv4;
if ($ipv4 === '127.0.0.1') {
$this->loopback = true;
}
}
/**
* @return string[]
*/
public function getIPv6(): array {
return $this->ipv6;
}
public function addIPv6(string $ipv6): void {
$this->ipv6[] = $ipv6;
if ($ipv6 === '::1') {
$this->loopback = true;
}
}
public function getMAC(): string {
return $this->mac;
}
public function setMAC(string $mac): void {
$this->mac = $mac;
}
public function getSpeed(): string {
return $this->speed;
}
public function setSpeed(string $speed): void {
$this->speed = $speed;
}
public function getDuplex(): string {
return $this->duplex;
}
public function setDuplex(string $duplex): void {
$this->duplex = $duplex;
}
public function isLoopback(): bool {
return $this->loopback;
}
}
@@ -0,0 +1,54 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2023 Daniel Kesselberg <mail@danielkesselberg.de>
*
* @author Daniel Kesselberg <mail@danielkesselberg.de>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\ServerInfo\Resources;
class ThermalZone implements \JsonSerializable {
public function __construct(
private string $zone,
private string $type,
private float $temp) {
}
public function getZone(): string {
return $this->zone;
}
public function getType(): string {
return $this->type;
}
public function getTemp(): float {
return $this->temp;
}
public function jsonSerialize(): array {
return [
'zone' => $this->zone,
'type' => $this->type,
'temp' => $this->temp,
];
}
}