Skip to content

Commit 8d57154

Browse files
author
Yiğit Kerem Oktay
authored
Merge pull request #135 from server-status-project/master
Merge new updates
2 parents e96df70 + 46c0b55 commit 8d57154

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+268
-5690
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[BUG]"
5+
labels: bug
6+
assignees: yigitkeremoktay
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: "[FEATURE-REQUEST]"
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Was this considered before?**
20+
21+
**Additional context**
22+
Add any other context or screenshots about the feature request here.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: Help Needed
3+
about: If this is not a bug but you need help
4+
title: "[HELP-NEEDED]"
5+
labels: help wanted
6+
assignees: yigitkeremoktay
7+
8+
---
9+
10+
**Describe the problem**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**What you tried?**
38+
39+
**Was this mentioned before?**
40+
**Additional context**
41+
Add any other context about the problem here.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: PR Template
3+
about: If you have submitted a PR,fill this for to help us!
4+
title: "[PR-INFO]"
5+
labels: PR
6+
assignees: ''
7+
8+
---
9+
10+
## Link to your PR:
11+
12+
## Is this from a feature request? Please link it
13+
14+
## Are there any known bugs or security issues
15+
16+
## Precisely describe what this does
17+
18+
## Give us an example use case

.github/ISSUE_TEMPLATE/stale.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 30
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 7
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- pinned
8+
- security
9+
# Label to use when marking an issue as stale
10+
staleLabel: stale
11+
# Comment to post when marking an issue as stale. Set to `false` to disable
12+
markComment: >
13+
This issue has been automatically marked as stale because it has not had
14+
recent activity. It will be closed if no further activity occurs.
15+
# Comment to post when closing a stale issue. Set to `false` to disable
16+
closeComment: >
17+
This issue has been automatically closed because it has not had
18+
recent activity.

README.md

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,21 @@
1-
# Server Status Beta (Official)
2-
## This is the official beta fork of Server Status by the contributors.
3-
![License](https://img.shields.io/github/license/Pryx/server-status.svg) ![Current release](https://img.shields.io/badge/version-2-blue)
4-
![Beta-Build](https://img.shields.io/badge/latest_beta-Developmet_Beta_7-black)
5-
![Beta-Stability](https://img.shields.io/badge/Beta_Stability-Fully_Stable_with_Visual_Imperfections-red)
6-
![Stability](https://img.shields.io/badge/master_stability-Stable-red)
7-
![Build](https://img.shields.io/badge/build-success-green)
8-
9-
## What does **contributor beta** mean?
10-
It means the beta that is heavily unstable that is meant for contributors to make changes and use as a recovery point.
11-
### Other Beta Type
12-
#### Development Beta
13-
##### This beta has some bugs that are noticeable and is sometimes unstable. Best for new contributors
14-
#### Public Beta
15-
##### This beta has some bugs that are not really noticeable and mostly exist as bugs. Best for trying the new features before updating!
1+
# Server status page
2+
![License](https://img.shields.io/github/license/Pryx/server-status.svg) ![Current release](https://img.shields.io/github/release/Pryx/server-status.svg) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/b82d62fa6d8b41119f68fd9eca3c3a08)](https://www.codacy.com/app/sajdl.vojtech/server-status?utm_source=github.com&utm_medium=referral&utm_content=Pryx/server-status&utm_campaign=Badge_Grade) [![Discord](https://img.shields.io/discord/742703112590065745?logo=discord)](https://discord.gg/Wgxnxz4)
3+
4+
![screenshot](https://status.trucksbook.eu/img/screenshot.png)
5+
166
Very simple server status page written in PHP that can run on **PHP 5.4+** - even on **shared webhosting** even without shell access. Because why waste your money on another server (or host on a server that you might want to do maintenance on), when you can use cheap webhosting? And as a cherry on top - it works even without javascript!
177

188
## How do I install this thing?
199
Simply put the files on your server and access it from your browser. There will be a simple install dialog waiting for you.
2010
If you prefer you can install manually by filling the info in config.php.template and renaming it to config.php.
2111
As this **does not** run installation scripts you need to head to your install directory and run create-server-config.php and then delete it.
2212
If you don't want to allow php to access your files or you have permission issues, use the following instructions.
23-
### FOR IIS:
24-
// Rename IISWebConfig to web.config
25-
### FOR Apache and Nginx
26-
// Rename ApacheHtaccess to .htaccess
27-
13+
### Creating server config:
14+
* **IIS**: Rename IISWebConfig to web.config
15+
* **Apache**: Rename ApacheHtaccess to .htaccess
16+
* **Nginx**: You can run with php-fpm no additional modifications required.
2817

29-
You can find more info on [our wiki page](https://github.com/Pryx/server-status/wiki)
18+
You can find more info on [our wiki page](https://github.com/server-status-project/server-status/wiki)
3019

3120
## Contributing
3221
Anyone is welcome to make pull request with new features or security patches / bug fixes.
@@ -36,7 +25,7 @@ You may create a pull request anytime or you can join our discord here(https://d
3625
### Translations
3726
Any help with translations is much welcome! You can join us at https://poeditor.com/join/project/37SpmJtyOm. You can even add your own language. Just let me know when you're done and I'm going to include the language in the next release.
3827

39-
[List of contributors](https://github.com/Pryx/server-status/wiki/contributors)
28+
[List of contributors](https://github.com/server-status-project/server-status/graphs/contributors)
4029

4130
### Does it actually run somewhere?
4231
Yes it does!
@@ -68,10 +57,8 @@ Please note that changes are reverted every hour.
6857
### I noticed there is a new release. How do I update?
6958
Updating server status is fairly straightforward. Download your config.php from the server. Delete all files. Upload the new release with config.php you downloaded earlier. You need to manually run install scripts. For that head to your domain and run create-server-config.php deleting it afterwards.
7059
If you don't want to allow php to access your files or you have permission issues, use the following instructions.
71-
#### FOR IIS:
72-
// Rename IISWebConfig to web.config
73-
#### FOR Apache and Nginx
74-
// Rename ApacheHtaccess to .htaccess
60+
#### Updating server config
61+
Follow the instructions for installation without giving the app write access. Keep in mind that you will need to re-apply any modifications you made.
7562

7663
### Is there any way to do this automatically?
7764
We are working on it but it is not yet included. Stay tuned!

admin/dashboard.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php
22
$offset = 0;
33
if (isset($_GET['ajax']))
44
{
@@ -18,11 +18,8 @@
1818
{
1919
Incident::delete($_GET['delete']);
2020
}
21-
if (isset($_GET['tasks'])) {
22-
Queue::process_queue();
23-
}
2421

25-
Template::render_header(_("Dashboard"), true);
22+
Template::render_header(_("Dashboard"), true);
2623
?>
2724

2825
<div class="text-center">
@@ -48,7 +45,7 @@
4845
<?php
4946
} ?>
5047
<div id="status-container" class="clearfix">
51-
<?php
48+
<?php
5249
if (isset($_POST['services']) && !is_array($_POST['services']))
5350
{
5451
$post_services = array($_POST['services']);
@@ -85,7 +82,7 @@
8582
</div>
8683
</div>
8784
<select class="form-control pull-left" id="type" name="type">
88-
<?php
85+
<?php
8986
if (isset($_POST['type']))
9087
{
9188
$selected_status = $_POST['type'];

admin/index.php

Lines changed: 3 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -7,58 +7,7 @@
77
else{
88
require_once("../config.php");
99
require_once("../classes/constellation.php");
10-
require_once("../classes/mailer.php");
11-
require_once("../classes/notification.php");
1210
require_once("../template.php");
13-
require_once("../libs/parsedown/Parsedown.php");
14-
require_once("../classes/queue.php");
15-
require_once("../classes/db-class.php");
16-
$db = new SSDB();
17-
define("NAME", $db->getSetting($mysqli,"name"));
18-
define("TITLE", $db->getSetting($mysqli,"title"));
19-
define("WEB_URL", $db->getSetting($mysqli,"url"));
20-
define("MAILER_NAME", $db->getSetting($mysqli,"mailer"));
21-
define("MAILER_ADDRESS", $db->getSetting($mysqli,"mailer_email"));
22-
23-
define("GOOGLE_RECAPTCHA", $db->getBooleanSetting($mysqli, "google_recaptcha"));
24-
define("GOOGLE_RECAPTCHA_SECRET", $db->getSetting($mysqli, "google_recaptcha_secret"));
25-
define("GOOGLE_RECAPTCHA_SITEKEY", $db->getSetting($mysqli, "google_recaptcha_sitekey"));
26-
define("SUBSCRIBE_EMAIL", $db->getBooleanSetting($mysqli, "subscribe_email"));
27-
define("SUBSCRIBE_TELEGRAM", $db->getBooleanSetting($mysqli, "subscribe_telegram"));
28-
define("TG_BOT_USERNAME", $db->getSetting($mysqli, "tg_bot_username"));
29-
define("TG_BOT_API_TOKEN", $db->getSetting($mysqli, "tg_bot_api_token"));
30-
define("PHP_MAILER", $db->getBooleanSetting($mysqli, "php_mailer"));
31-
define("PHP_MAILER_SMTP", $db->getBooleanSetting($mysqli, "php_mailer_smtp"));
32-
define("PHP_MAILER_PATH", $db->getSetting($mysqli, "php_mailer_path"));
33-
define("PHP_MAILER_HOST", $db->getSetting($mysqli, "php_mailer_host"));
34-
define("PHP_MAILER_PORT", $db->getSetting($mysqli, "php_mailer_port"));
35-
define("PHP_MAILER_SECURE", $db->getBooleanSetting($mysqli, "php_mailer_secure"));
36-
define("PHP_MAILER_USER", $db->getSetting($mysqli, "php_mailer_user"));
37-
define("PHP_MAILER_PASS", $db->getSetting($mysqli, "php_mailer_pass"));
38-
define("CRON_SERVER_IP", $db->getSetting($mysqli, "cron_server_ip"));
39-
40-
// Process the subscriber notification queue
41-
// If CRON_SERVER_IP is not set, call notification once incident has been saved
42-
if ( empty(CRON_SERVER_IP) )
43-
{
44-
if ( isset($_GET['sent']) && $_GET['sent'] == true )
45-
{
46-
Queue::process_queue();
47-
}
48-
}
49-
else if ( isset($_GET['task']) && $_GET['task'] == 'cron' )
50-
{
51-
// Else, base it on call to /admin?task=cron being called from IP defined by CRON_SERVER_IP
52-
if (! empty(CRON_SERVER_IP) && $_SERVER['REMOTE_ADDR'] == CRON_SERVER_IP )
53-
{
54-
Queue::process_queue();
55-
syslog(1, "CRON server processed");
56-
}
57-
else {
58-
syslog(1, "CRON called from unauthorised server");
59-
}
60-
}
61-
6211

6312
if(isset($_COOKIE['user'])&&!isset($_SESSION['user']))
6413
{
@@ -80,7 +29,7 @@
8029
require_once("login-form.php");
8130
}
8231
}
83-
else
32+
else
8433
{
8534
$user = new User($_SESSION['user']);
8635
if (!$user->is_active())
@@ -101,7 +50,7 @@
10150
case 'user':
10251
require_once("user.php");
10352
break;
104-
53+
10554
case 'settings':
10655
require_once("settings.php");
10756
break;
@@ -110,20 +59,6 @@
11059
require_once("new-user.php");
11160
break;
11261

113-
case 'new-service':
114-
case 'edit-service':
115-
require_once('service.php');
116-
break;
117-
118-
case 'new-service-group':
119-
case 'edit-service-group':
120-
require_once('service-group.php');
121-
break;
122-
123-
case 'options':
124-
require_once("options.php");
125-
break;
126-
12762
case 'logout':
12863
User::logout();
12964
break;
@@ -135,4 +70,4 @@
13570

13671
Template::render_footer(true);
13772
}
138-
}
73+
}

0 commit comments

Comments
 (0)