v.1.1 changes 16-04-2026:

- Minor changes to interface.
- Fixed different missing includes.
- Access now denied to api calls that are related to disabled modules.
- Fixed sorting of CPU and memory in server overview.
This commit is contained in:
2026-04-16 15:02:25 +02:00
parent eec1d13cf5
commit 7e5d764483
16 changed files with 2884 additions and 0 deletions

20
config.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
/**
* This file is used for connecting to the database and configuring the superuser password
* Rename this file to config.php to make it take effect
*/
# database server name
$db_server = "localhost";
# database server port
$db_port = "3306";
# database name
$db_database = "sentri_dev";
# database user
$db_user = "sentri_dev";
# Database password
$db_password = "nTYN30NE9b3EkSm4xpLMhBDSPk";

1
docs/Sentri/.obsidian/app.json vendored Normal file
View File

@@ -0,0 +1 @@
{}

3
docs/Sentri/.obsidian/appearance.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"cssTheme": "Minimal"
}

View File

@@ -0,0 +1 @@
[]

33
docs/Sentri/.obsidian/core-plugins.json vendored Normal file
View File

@@ -0,0 +1,33 @@
{
"file-explorer": true,
"global-search": true,
"switcher": true,
"graph": true,
"backlink": true,
"canvas": true,
"outgoing-link": true,
"tag-pane": true,
"footnotes": false,
"properties": true,
"page-preview": true,
"daily-notes": true,
"templates": true,
"note-composer": true,
"command-palette": true,
"slash-command": false,
"editor-status": true,
"bookmarks": true,
"markdown-importer": false,
"zk-prefixer": false,
"random-note": false,
"outline": true,
"word-count": true,
"slides": false,
"audio-recorder": false,
"workspaces": false,
"file-recovery": true,
"publish": false,
"sync": true,
"bases": true,
"webviewer": false
}

22
docs/Sentri/.obsidian/graph.json vendored Normal file
View File

@@ -0,0 +1,22 @@
{
"collapse-filter": true,
"search": "",
"showTags": false,
"showAttachments": false,
"hideUnresolved": false,
"showOrphans": true,
"collapse-color-groups": true,
"colorGroups": [],
"collapse-display": true,
"showArrow": false,
"textFadeMultiplier": 0,
"nodeSizeMultiplier": 1,
"lineSizeMultiplier": 1,
"collapse-forces": true,
"centerStrength": 0.518713248970312,
"repelStrength": 10,
"linkStrength": 1,
"linkDistance": 250,
"scale": 1,
"close": true
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,11 @@
{
"id": "obsidian-minimal-settings",
"name": "Minimal Theme Settings",
"version": "8.1.1",
"minAppVersion": "1.1.9",
"description": "Change the colors, fonts and features of Minimal Theme.",
"author": "@kepano",
"authorUrl": "https://www.twitter.com/kepano",
"fundingUrl": "https://www.buymeacoffee.com/kepano",
"isDesktopOnly": false
}

View File

@@ -0,0 +1,8 @@
{
"name": "Minimal",
"version": "8.1.2",
"minAppVersion": "1.9.0",
"author": "@kepano",
"authorUrl": "https://twitter.com/kepano",
"fundingUrl": "https://www.buymeacoffee.com/kepano"
}

File diff suppressed because one or more lines are too long

220
docs/Sentri/.obsidian/workspace.json vendored Normal file
View File

@@ -0,0 +1,220 @@
{
"main": {
"id": "5d08973366166348",
"type": "split",
"children": [
{
"id": "d5a30e0392add453",
"type": "tabs",
"children": [
{
"id": "f2e72b6dbea3ee4c",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "API.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "API"
}
},
{
"id": "dd67761a6e52c5c5",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "API/servers/POST Create new server.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "POST Create new server"
}
}
],
"currentTab": 1
}
],
"direction": "vertical"
},
"left": {
"id": "a0bc49889f939d48",
"type": "split",
"children": [
{
"id": "6d001f5a2dcd74e9",
"type": "tabs",
"children": [
{
"id": "ecf74217bb469157",
"type": "leaf",
"state": {
"type": "file-explorer",
"state": {
"sortOrder": "alphabetical",
"autoReveal": false
},
"icon": "lucide-folder-closed",
"title": "Files"
}
},
{
"id": "064b53fd0de4c654",
"type": "leaf",
"state": {
"type": "search",
"state": {
"query": "",
"matchingCase": false,
"explainSearch": false,
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical"
},
"icon": "lucide-search",
"title": "Search"
}
},
{
"id": "b04728a90b6bce71",
"type": "leaf",
"state": {
"type": "bookmarks",
"state": {},
"icon": "lucide-bookmark",
"title": "Bookmarks"
}
}
]
}
],
"direction": "horizontal",
"width": 300
},
"right": {
"id": "57bead4784259b09",
"type": "split",
"children": [
{
"id": "136ecdfdd766ffe9",
"type": "tabs",
"children": [
{
"id": "7fe2c1eeaa27bd50",
"type": "leaf",
"state": {
"type": "backlink",
"state": {
"file": "Welcome.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
"showSearch": false,
"searchQuery": "",
"backlinkCollapsed": false,
"unlinkedCollapsed": true
},
"icon": "links-coming-in",
"title": "Backlinks for Welcome"
}
},
{
"id": "3d6ca3cf7f647c8f",
"type": "leaf",
"state": {
"type": "outgoing-link",
"state": {
"file": "Welcome.md",
"linksCollapsed": false,
"unlinkedCollapsed": true
},
"icon": "links-going-out",
"title": "Outgoing links from Welcome"
}
},
{
"id": "7b8e3c893d7fa006",
"type": "leaf",
"state": {
"type": "tag",
"state": {
"sortOrder": "frequency",
"useHierarchy": true,
"showSearch": false,
"searchQuery": ""
},
"icon": "lucide-tags",
"title": "Tags"
}
},
{
"id": "c78cfcac07059109",
"type": "leaf",
"state": {
"type": "all-properties",
"state": {
"sortOrder": "frequency",
"showSearch": false,
"searchQuery": ""
},
"icon": "lucide-archive",
"title": "All properties"
}
},
{
"id": "ce29528e52ac0bc0",
"type": "leaf",
"state": {
"type": "outline",
"state": {
"file": "Welcome.md",
"followCursor": false,
"showSearch": false,
"searchQuery": ""
},
"icon": "lucide-list",
"title": "Outline of Welcome"
}
}
]
}
],
"direction": "horizontal",
"width": 300,
"collapsed": true
},
"left-ribbon": {
"hiddenItems": {
"switcher:Open quick switcher": false,
"graph:Open graph view": false,
"canvas:Create new canvas": false,
"daily-notes:Open today's daily note": false,
"templates:Insert template": false,
"command-palette:Open command palette": false,
"bases:Create new base": false
}
},
"active": "dd67761a6e52c5c5",
"lastOpenFiles": [
"_index.md",
"API/servers/POST Create new server.md",
"{{APP_PATH}}api.md",
"API.md",
"API/Getting Started.md",
"themes",
"static",
"layouts",
"i18n",
"data",
"content",
"assets",
"archetypes/default.md",
"archetypes",
"hugo.toml",
"API/servers"
]
}

0
docs/Sentri/API.md Normal file
View File

View File

@@ -0,0 +1,20 @@
This document will explain how to get started with the Sentri API.
## Requirements
To connect to the Sentri API, you will need the following:
- Basic knowledge of how APIs work and some programming or scripting experience.
- The Sentri base URL.
- An API bearer token.
- Network access to Sentri on port 443 from the devices making API requests.
## Creating a authentication bearer token
Make sure you have the `user-apitoken-self` read/write permission, as this allows you to create an authentication bearer token.
Once logged in, go to your profile at `/userprofile` and click Generate API Token.
A token will be displayed, as shown below. This token will be used as the authentication bearer token, so make sure to copy it as it will only be shown once.
```
c8aaf11d-e10e-11f0-9b16-00155d00153f.83f0383262a4875f6c6d4bb5aa8577818ca7f71cb2ba80b9e9b9cb43f5b86831
```
## Trouble shooting
When running into a problem with the API you most likely get an HTTP code in return.
### Response codes
These are some of the response codes you may receive when making a call to the API:

View File

@@ -0,0 +1,71 @@
This API call creates a server or updates it with the given information.
#### Permissions required
`servers` RW
#### Body parameters
| Parameter | Type | Required | Description |
| -------------------- | ------------------------------------------------------ | -------- | ----------------------------------------- |
| server_vm_host_id | string | yes | unique id of the vm |
| server_vm_host_name | string | no | name of the vm |
| company_uuid | string | no | company_uuid from companies |
| server_power_state | enum ['Running', 'Off'] | no | if the vm is on or off |
| server_state | enum ['new', 'active', 'deleted', 'trial', 'disabled'] | no | server state. 'new' is the default |
| server_hostname | string | no | hostname of the server |
| server_os | string | no | server operating system |
| server_cpu | int | no | amount of cpu used by the server |
| server_memory | int | no | amount of memory used by the server in MB |
| server_memory_demand | int | no | amount memory demand by the server in MB |
| server_disks | json | no | json array of the servers disks |
| server_ipv4 | json | no | json array of the ipv4 addresses |
| server_ipv6 | json | no | json array of the ipv6 addresses |
| server_vm_generation | int | no | vm machine generation or version |
| server_vm_snapshot | int | no | amount of snapshots made of the vm |
| server_licenses | json | no | json array of the server licenses |
| server_backup | json | no | json array of the server backups |
| server_description | string | no | description of the server |
### Example Body (json)
```json
{
"server_vm_id": "00155d001d3f",
"server_vm_host_name": "web01.test.example.nl",
"server_power_state": "Running",
"server_state": "new",
"server_hostname": "web01.test.example.nl",
"server_os": "AlmaLinux 10.1",
"server_cpu": 1,
"server_memory": 2048,
"server_memory_demand": 1267,
"server_disks": [
to be made
],
"server_ipv4": [
"123.12.34.113"
],
"server_ipv6": [
"2a01:4c66:4:2:44::1"
],
"server_vm_generation": 2,
"server_vm_snapshot": 1,
"server_licenses": [
{ "-directadmin": "" },
{ "+cpguard": "cpguard" },
{ "-installatron": "none" }
],
"server_backup": [
{ "+borg": "yes" }
],
"server_description": "test web server"
}
```
#### Example Request
#### Example Response
#### Known errors or issues.
None are known at the time
If you do encounter issues and get an http code in return, check the response codes on [this]({{APP_PATH}}api#response-codes) page.

214
docs/Sentri/extra.css Normal file
View File

@@ -0,0 +1,214 @@
:root > * {
--md-default-fg-color: #d5c4a1;
--md-primary-fg-color--dark: #32302F;
--md-primary-bg-color: #EBDBB2;
--md-primary-bg-color--light: #d5c4a1;
--md-default-bg-color: #282828;
--md-primary-fg-color: #32302F;
--md-accent-bg-color: #fe8019;
--md-accent-fg-color: #d65d0e;
--md-default-fg-color--light: #EBDBB2;
--md-typeset-color: #D5C4A1;
--md-typeset-a-color: #fe8019;
--md-code-fg-color: hsla(40, 38%, 73%, 1);
--md-code-bg-color: hsla(20, 3%, 19%, 1);
--md-code-bg-color--light: hsla(20, 5%, 22%, 0.77);
--md-code-bg-color--lighter: hsla(22, 7%, 29%, 0.3);
--md-code-hl-number-color: hsl(6, 96%, 59%);
--md-code-hl-special-color: hsla(2, 75%, 46%, 1);
--md-code-hl-function-color: hsla(333, 34%, 54%, 1);
--md-code-hl-constant-color: hsla(333, 34%, 54%, 1);
--md-code-hl-keyword-color: hsla(27, 99%, 55%, 1);
--md-code-hl-string-color: hsla(104, 35%, 62%, 1);
--md-code-hl-name-color: var(--md-code-fg-color);
--md-code-hl-operator-color: var(--md-default-fg-color--light);
--md-code-hl-punctuation-color: var(--md-default-fg-color--light);
--md-code-hl-comment-color: var(--md-default-fg-color--light);
--md-code-hl-generic-color: var(--md-default-fg-color--light);
--md-code-hl-variable-color: var(--md-default-fg-color--light);
--md-typeset-kbd-color: hsla(0, 0%, 98%, 1);
--md-typeset-kbd-accent-color: hsla(0, 100%, 100%, 1);
--md-typeset-kbd-border-color: hsla(0, 0%, 72%, 1);
--md-footer-fg-color: hsl(35, 17%, 59%);
--md-footer-fg-color--light: hsl(39, 24%, 66%);
--md-footer-fg-color--lighter: hsl(40, 38%, 73%);
--md-footer-bg-color: hsl(20, 3%, 19%);
--md-footer-bg-color--dark: hsla(20, 3%, 19%, 0.32);
--md-admonition-fg-color: var(--md-default-fg-color);
--md-admonition-bg-color: var(--md-default-bg-color);
}
.md-typeset .admonition.info,
.md-typeset details.info {
border-color: #458588;
}
.md-typeset .info > .admonition-title,
.md-typeset .info > summary {
background-color: #458588;
}
.md-typeset .info > .admonition-title:before,
.md-typeset .info > summary:before {
background-color: #83a598;
}
.md-typeset .info > .admonition-title:after,
.md-typeset .info > summary:after {
color: #458588;
}
.md-typeset .admonition.note,
.md-typeset details.note {
border-color: #8f3f71;
}
.md-typeset .note > .admonition-title,
.md-typeset .note > summary {
background-color: #8f3f71;
}
.md-typeset .note > .admonition-title:before,
.md-typeset .note > summary:before {
background-color: #b16286;
}
.md-typeset .note > .admonition-title:after,
.md-typeset .note > summary:after {
color: #8f3f71;
}
.md-typeset .admonition.tip,
.md-typeset details.tip {
border-color: #427b58;
}
.md-typeset .tip > .admonition-title,
.md-typeset .tip > summary {
background-color: #427b58;
}
.md-typeset .tip > .admonition-title:before,
.md-typeset .tip > summary:before {
background-color: #689d6a;
}
.md-typeset .success > .admonition-title:after,
.md-typeset .tip > summary:after {
color: #427b58;
}
.md-typeset .admonition.success,
.md-typeset details.success {
border-color: #427b58;
}
.md-typeset .success > .admonition-title,
.md-typeset .success > summary {
background-color: #427b58;
}
.md-typeset .success > .admonition-title:before,
.md-typeset .success > summary:before {
background-color: #689d6a;
}
.md-typeset .success > .admonition-title:after,
.md-typeset .success > summary:after {
color: #427b58;
}
.md-typeset .admonition.warning,
.md-typeset details.warning {
border-color: #d65d0e;
}
.md-typeset .warning > .admonition-title,
.md-typeset .warning > summary {
background-color: #d65d0e;
}
.md-typeset .warning > .admonition-title:before,
.md-typeset .warning > summary:before {
background-color: #fe8019;
}
.md-typeset .warning > .admonition-title:after,
.md-typeset .warning > summary:after {
color: #d65d0e
}
.md-typeset .admonition.quote,
.md-typeset details.quote {
border-color: #7c6f64;
}
.md-typeset .quote > .admonition-title,
.md-typeset .quote > summary {
background-color: #7c6f64;
}
.md-typeset .quote > .admonition-title:before,
.md-typeset .quote > summary:before {
background-color: #928374;
}
.md-typeset .quote > .admonition-title:after,
.md-typeset .quote > summary:after {
color: #7c6f64
}
.md-typeset .admonition.danger,
.md-typeset details.danger {
border-color: #9d0006;
}
.md-typeset .danger > .admonition-title,
.md-typeset .danger > summary {
background-color: #9d0006;
}
.md-typeset .danger > .admonition-title:before,
.md-typeset .danger > summary:before {
background-color: #CC241D;
}
.md-typeset .danger > .admonition-title:after,
.md-typeset .danger > summary:after {
color: #9d0006
}
.md-typeset .admonition.bug,
.md-typeset details.bug {
border-color: #9d0006;
}
.md-typeset .bug > .admonition-title,
.md-typeset .bug > summary {
background-color: #9d0006;
}
.md-typeset .bug > .admonition-title:before,
.md-typeset .bug > summary:before {
background-color: #CC241D;
}
.md-typeset .bug > .admonition-title:after,
.md-typeset .bug > summary:after {
color: #9d0006
}

1
index.php Normal file
View File

@@ -0,0 +1 @@
works