.htaccess + more pages & routes
This commit is contained in:
1 parent
abb8b07a02
commit
b2cb0c4bf3
18 files changed
+244
-25
No files matched your search
@@ -1,18 +1,14 @@
|
||||
php_flag display_errors on
|
||||
Options -Indexes
|
||||
|
||||
RedirectMatch 404 /\.idea
|
||||
RedirectMatch 404 /\.git
|
||||
RedirectMatch 404 /src
|
||||
RedirectMatch 404 /test
|
||||
RedirectMatch 404 /core
|
||||
|
||||
RewriteEngine On
|
||||
RewriteRule ^api(/.*)?$ /index.php?api=$1 [L,QSA]
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
DirectorySlash Off
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-d [OR]
|
||||
RewriteCond %{REQUEST_URI} "(\.idea|\.git|src|test|core)(/.*)?"
|
||||
RewriteRule ^(.*)$ /index.php?site=$1 [L,QSA]
|
||||
</IfModule>
|
||||
Generated
-1
@@ -1 +0,0 @@
|
||||
DENY FROM ALL;
|
||||
@@ -81,6 +81,7 @@ class Stats extends Request {
|
||||
$this->result["pageCount"] = $pageCount;
|
||||
$this->result["visitors"] = $visitorStatistics;
|
||||
$this->result["server"] = array(
|
||||
"version" => WEBBASE_VERSION,
|
||||
"server" => $_SERVER["SERVER_SOFTWARE"] ?? "Unknown",
|
||||
"memory_usage" => memory_get_usage(),
|
||||
"load_avg" => sys_getloadavg(),
|
||||
|
||||
@@ -128,8 +128,12 @@ class CreateDatabase {
|
||||
->addBool("active", true)
|
||||
->primaryKey("uid");
|
||||
|
||||
$queries[] = $sql->insert("Route", array("request", "action", "target"))
|
||||
->addRow("^/admin(/.*)?$", "dynamic", "\\Documents\\AdminDashboard");
|
||||
$queries[] = $sql->insert("Route", array("request", "action", "target", "extra"))
|
||||
->addRow("^/admin(/.*)?$", "dynamic", "\\Documents\\AdminDashboard", NULL)
|
||||
->addRow("^/register(/)?$", "dynamic", "\\Documents\\Account", "\\Views\\Account\\Register")
|
||||
->addRow("^/confirmEmail(/)?$", "dynamic", "\\Documents\\Account", "\\Views\\Account\\ConfirmEmail")
|
||||
->addRow("^/acceptInvite(/)?$", "dynamic", "\\Documents\\Account", "\\Views\\Account\\AcceptInvite")
|
||||
->addRow("^/$", "dynamic", "\\Documents\\Welcome", NULL);
|
||||
|
||||
return $queries;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace Documents {
|
||||
|
||||
use Documents\Account\AccountBody;
|
||||
use Documents\Account\AccountHead;
|
||||
use Elements\Document;
|
||||
use Objects\User;
|
||||
|
||||
class Account extends Document {
|
||||
public function __construct(User $user, ?string $view) {
|
||||
parent::__construct($user, AccountHead::class, AccountBody::class, $view);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Documents\Account {
|
||||
|
||||
use Elements\Head;
|
||||
use Elements\SimpleBody;
|
||||
|
||||
class AccountHead extends Head {
|
||||
|
||||
public function __construct($document) {
|
||||
parent::__construct($document);
|
||||
}
|
||||
|
||||
protected function initSources() {
|
||||
|
||||
}
|
||||
|
||||
protected function initMetas() {
|
||||
return array();
|
||||
}
|
||||
|
||||
protected function initRawFields() {
|
||||
return array();
|
||||
}
|
||||
|
||||
protected function initTitle() {
|
||||
return "Account";
|
||||
}
|
||||
}
|
||||
|
||||
class AccountBody extends SimpleBody {
|
||||
|
||||
public function __construct($document) {
|
||||
parent::__construct($document);
|
||||
}
|
||||
|
||||
protected function getContent() {
|
||||
$view = $this->getDocument()->getView();
|
||||
if ($view === null) {
|
||||
return "The page you does not exist or is no longer valid. <a href='/'>Return to start page</a>";
|
||||
}
|
||||
|
||||
return $view->getCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace Documents {
|
||||
|
||||
use Documents\Welcome\WelcomeBody;
|
||||
use Documents\Welcome\WelcomeHead;
|
||||
use Elements\Document;
|
||||
use Objects\User;
|
||||
|
||||
class Welcome extends Document {
|
||||
public function __construct(User $user, ?string $view) {
|
||||
parent::__construct($user, WelcomeHead::class, WelcomeBody::class, $view);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Documents\Welcome {
|
||||
|
||||
use Elements\Head;
|
||||
use Elements\SimpleBody;
|
||||
|
||||
class WelcomeHead extends Head {
|
||||
|
||||
public function __construct($document) {
|
||||
parent::__construct($document);
|
||||
}
|
||||
|
||||
protected function initSources() {
|
||||
|
||||
}
|
||||
|
||||
protected function initMetas() {
|
||||
return array();
|
||||
}
|
||||
|
||||
protected function initRawFields() {
|
||||
return array();
|
||||
}
|
||||
|
||||
protected function initTitle() {
|
||||
return "Welcome";
|
||||
}
|
||||
}
|
||||
|
||||
class WelcomeBody extends SimpleBody {
|
||||
|
||||
public function __construct($document) {
|
||||
parent::__construct($document);
|
||||
}
|
||||
|
||||
protected function getContent() {
|
||||
return "Welcome!";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ use \Driver\SQL\Column\DateTimeColumn;
|
||||
use Driver\SQL\Column\BoolColumn;
|
||||
use Driver\SQL\Column\JsonColumn;
|
||||
|
||||
use Driver\SQL\Condition\Regex;
|
||||
use Driver\SQL\Expression\Add;
|
||||
use Driver\SQL\Strategy\Strategy;
|
||||
use \Driver\SQL\Strategy\UpdateStrategy;
|
||||
@@ -303,4 +304,16 @@ class MySQL extends SQL {
|
||||
public function getStatus() {
|
||||
return mysqli_stat($this->connection);
|
||||
}
|
||||
|
||||
protected function buildCondition($condition, &$params) {
|
||||
if($condition instanceof Regex) {
|
||||
$left = $condition->getLeftExp();
|
||||
$right = $condition->getRightExp();
|
||||
$left = ($left instanceof Column) ? $this->columnName($left->getName()) : $this->addValue($left, $params);
|
||||
$right = ($right instanceof Column) ? $this->columnName($right->getName()) : $this->addValue($right, $params);
|
||||
return $left . " REGEXP " . $right;
|
||||
} else {
|
||||
return parent::buildCondition($condition, $params);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ use \Driver\SQL\Column\DateTimeColumn;
|
||||
use Driver\SQL\Column\BoolColumn;
|
||||
use Driver\SQL\Column\JsonColumn;
|
||||
|
||||
use Driver\SQL\Condition\Regex;
|
||||
use Driver\SQL\Expression\Add;
|
||||
use Driver\SQL\Strategy\Strategy;
|
||||
use Driver\SQL\Strategy\UpdateStrategy;
|
||||
@@ -301,4 +302,16 @@ class PostgreSQL extends SQL {
|
||||
|
||||
return ($statusTexts[$status] ?? "Unknown") . " (v$version)";
|
||||
}
|
||||
|
||||
protected function buildCondition($condition, &$params) {
|
||||
if($condition instanceof Regex) {
|
||||
$left = $condition->getLeftExp();
|
||||
$right = $condition->getRightExp();
|
||||
$left = ($left instanceof Column) ? $this->columnName($left->getName()) : $this->addValue($left, $params);
|
||||
$right = ($right instanceof Column) ? $this->columnName($right->getName()) : $this->addValue($right, $params);
|
||||
return $left . " ~ " . $right;
|
||||
} else {
|
||||
return parent::buildCondition($condition, $params);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -332,12 +332,6 @@ abstract class SQL {
|
||||
}
|
||||
return implode(" AND ", $conditions);
|
||||
}
|
||||
} else if ($condition instanceof Regex) {
|
||||
$left = $condition->getLeftExp();
|
||||
$right = $condition->getRightExp();
|
||||
$left = ($left instanceof Column) ? $this->columnName($left->getName()) : $this->addValue($left, $params);
|
||||
$right = ($right instanceof Column) ? $this->columnName($right->getName()) : $this->addValue($right, $params);
|
||||
return $left . " REGEXP " . $right;
|
||||
} else {
|
||||
$this->lastError = "Unsupported condition type: " . get_class($condition);
|
||||
return false;
|
||||
|
||||
@@ -24,14 +24,15 @@ abstract class Document {
|
||||
public function getBody() { return $this->body; }
|
||||
public function getSQL() { return $this->user->getSQL(); }
|
||||
public function getUser() { return $this->user; }
|
||||
public function getView() { return $this->activeView; }
|
||||
|
||||
protected function sendHeaders() {
|
||||
header("X-Frame-Options: DENY");
|
||||
}
|
||||
public function getView() : ?View {
|
||||
|
||||
public static function createSearchableDocument($documentClass, $user) {
|
||||
return new $documentClass($user);
|
||||
$file = getClassPath($this->activeView);
|
||||
if(!file_exists($file) || !is_subclass_of($this->activeView, View::class)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new $this->activeView($this);
|
||||
}
|
||||
|
||||
function getCode() {
|
||||
@@ -47,9 +48,10 @@ abstract class Document {
|
||||
|
||||
$body = $this->body->getCode();
|
||||
$head = $this->head->getCode();
|
||||
$lang = $this->user->getLanguage()->getShortCode();
|
||||
|
||||
$html = "<!DOCTYPE html>";
|
||||
$html .= "<html>";
|
||||
$html .= "<html lang=\"$lang\">";
|
||||
$html .= $head;
|
||||
$html .= $body;
|
||||
$html .= "</html>";
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Elements;
|
||||
|
||||
abstract class SimpleBody extends Body {
|
||||
public function __construct($document) {
|
||||
parent::__construct($document);
|
||||
}
|
||||
|
||||
public function getCode() {
|
||||
$content = $this->getContent();
|
||||
return parent::getCode() . "<body>$content</body>";
|
||||
}
|
||||
|
||||
protected abstract function getContent();
|
||||
}
|
||||
@@ -83,7 +83,7 @@ abstract class View extends StaticView {
|
||||
if($classes)
|
||||
$iconClass .= " $classes";
|
||||
|
||||
return "<i class=\"$iconClass\"></i>";
|
||||
return "<i class=\"$iconClass\" />";
|
||||
}
|
||||
|
||||
protected function createErrorText($text, $id="", $hidden=false) {
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace Views\Account;
|
||||
|
||||
|
||||
use Elements\Document;
|
||||
use Elements\View;
|
||||
|
||||
class AcceptInvite extends View {
|
||||
|
||||
public function __construct(Document $document, $loadView = true) {
|
||||
parent::__construct($document, $loadView);
|
||||
}
|
||||
|
||||
public function getCode() {
|
||||
$html = parent::getCode();
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace Views\Account;
|
||||
|
||||
|
||||
use Elements\Document;
|
||||
use Elements\View;
|
||||
|
||||
class ConfirmEmail extends View {
|
||||
|
||||
public function __construct(Document $document, $loadView = true) {
|
||||
parent::__construct($document, $loadView);
|
||||
}
|
||||
|
||||
public function getCode() {
|
||||
$html = parent::getCode();
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace Views\Account;
|
||||
|
||||
|
||||
use Elements\Document;
|
||||
use Elements\View;
|
||||
|
||||
class Register extends View {
|
||||
|
||||
public function __construct(Document $document, $loadView = true) {
|
||||
parent::__construct($document, $loadView);
|
||||
}
|
||||
|
||||
public function getCode() {
|
||||
$html = parent::getCode();
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
define("WEBBASE_VERSION", "0.1.0-alpha");
|
||||
|
||||
function getSubclassesOf($parent) {
|
||||
$result = array();
|
||||
foreach (get_declared_classes() as $class) {
|
||||
|
||||
Vendored
+1
-1
@@ -7701,7 +7701,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Overview; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-router-dom */ \"./node_modules/react-router-dom/esm/react-router-dom.js\");\n/* harmony import */ var _elements_icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../elements/icon */ \"./src/elements/icon.js\");\n/* harmony import */ var react_chartjs_2__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-chartjs-2 */ \"./node_modules/react-chartjs-2/es/index.js\");\n/* harmony import */ var react_collapse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-collapse */ \"./node_modules/react-collapse/lib/index.js\");\n/* harmony import */ var react_collapse__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_collapse__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\");\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _elements_alert__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../elements/alert */ \"./src/elements/alert.js\");\n/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../global */ \"./src/global.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return functiLine truncated
|
||||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Overview; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-router-dom */ \"./node_modules/react-router-dom/esm/react-router-dom.js\");\n/* harmony import */ var _elements_icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../elements/icon */ \"./src/elements/icon.js\");\n/* harmony import */ var react_chartjs_2__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-chartjs-2 */ \"./node_modules/react-chartjs-2/es/index.js\");\n/* harmony import */ var react_collapse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-collapse */ \"./node_modules/react-collapse/lib/index.js\");\n/* harmony import */ var react_collapse__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_collapse__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\");\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _elements_alert__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../elements/alert */ \"./src/elements/alert.js\");\n/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../global */ \"./src/global.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return functiLine truncated
|
||||
|
||||
/***/ }),
|
||||
|
||||
|
||||
@@ -198,6 +198,7 @@ export default class Overview extends React.Component {
|
||||
<Collapse isOpened={this.state.statusVisible}>
|
||||
<div className="card-body">
|
||||
<ul className={"list-unstyled"}>
|
||||
<li><b>Version</b>: {this.state.server.version}</li>
|
||||
<li><b>Server</b>: {this.state.server.server}</li>
|
||||
<li><b>Memory Usage</b>: {humanReadableSize(this.state.server.memory_usage)}</li>
|
||||
<li><b>Load Average</b>: { this.state.server.load_avg.join(" ") }</li>
|
||||
|
||||
Reference in new issue
Block a user