Skip to content

Commit

Permalink
v0.9.1 (#714)
Browse files Browse the repository at this point in the history
  • Loading branch information
1day2die authored Feb 5, 2023
2 parents fb8138a + fd6e8bd commit 6b45719
Show file tree
Hide file tree
Showing 65 changed files with 4,631 additions and 24,369 deletions.
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/---bug-report.md

This file was deleted.

31 changes: 0 additions & 31 deletions .github/ISSUE_TEMPLATE/---feature-request.md

This file was deleted.

43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "\U0001F41B Bug report"
description: Create a report to help us improve
title: "[Bug]: "
labels: ["bug"]
body:
- type: textarea
id: what-happened
attributes:
label: What is your request about?
description: |
Provide a clear description of what the problem is.
validations:
required: true
- type: dropdown
id: version
attributes:
label: Branch
description: What branch are you on?
multiple: false
options:
- "main"
- "development"
validations:
required: true
- type: textarea
id: solution
attributes:
label: Solution idea
description: |
Provide a clear description of how you want this bug to be fixed (Optional)
validations:
required: false
- type: textarea
id: controlpanel-logs
attributes:
label: Controlpanel Logs
description: Please copy and paste your laravel-log output. You may also provide a link to it using the following command `tail -n 100 /var/www/controlpanel/storage/logs/laravel.log | nc pteropaste.com 99`
render: Shell
- type: textarea
id: additional-info
attributes:
label: Additional Info
description: Anything else that could be used to narrow down the issue, like your config.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "\U0001F680 Feature request"
description: Suggest a feature or idea for this project
title: "[Feature] "
labels: ["feature"]
body:
- type: textarea
id: feature-description
attributes:
label: Feature Description
description: Provide a clear description of what your idea is all about, what it tries to solve and why it should be implemented.
validations:
required: true
- type: textarea
id: solution
attributes:
label: Solution Idea
description: Provide a clear description how the idea should be implemented and why.
validations:
required: true
- type: textarea
id: additional-info
attributes:
label: Additional Info
description: Anything else that could be used to implement your idea.
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- PayPal Integration
- Stripe Integration
- Referral System
- Partner System
- Ticket System
- Upgrade/Downgrade Server Resources
- Store (credit system with hourly billing and invoices)
Expand All @@ -12,27 +13,29 @@
- User/Server Management
- Customisable server plans
- Vouchers
- Alert System
- Theme Support
- and so much more!

# ControlPanel-gg

![controlpanel](https://user-images.githubusercontent.com/45005889/123518824-06b05000-d6a8-11eb-91b9-d1ed36bd2317.png)
![controlpanel](https://user-images.githubusercontent.com/67899387/214684708-739c1d21-06e8-4dec-a4f1-81533a46cc7e.png)


![](https://img.shields.io/endpoint?label=v0.8%20Installations&url=https%3A%2F%2Fmarket.controlpanel.gg%2Fcallhome.php%3Fgetinstalls)
![](https://img.shields.io/endpoint?label=v0.9%20Installations&url=https%3A%2F%2Fmarket.controlpanel.gg%2Fcallhome.php%3Fgetinstalls)
![](https://img.shields.io/badge/Overall%20Installations-3500%2B-green)
![](https://img.shields.io/github/stars/ControlPanel-gg/dashboard) ![](https://img.shields.io/github/forks/ControlPanel-gg/dashboard) ![](https://img.shields.io/github/tag/ControlPanel-gg/dashboard) [![Crowdin](https://badges.crowdin.net/controlpanelgg/localized.svg)](https://crowdin.com/project/controlpanelgg) ![](https://img.shields.io/github/issues/ControlPanel-gg/dashboard) ![](https://img.shields.io/github/license/ControlPanel-gg/dashboard) ![](https://img.shields.io/discord/787829714483019826)
## About

ControlPanel's Dashboard is a dashboard application designed to offer clients a management tool to manage their pterodactyl servers. This dashboard comes with a credit-based billing solution that credits users hourly for each server they have and suspends them if they run out of credits.

This dashboard offers an easy to use and free billing solution for all starting and experienced hosting providers. This dashboard has many customization options and added discord 0auth verification to offer a solid link between your discord server and your dashboard. You can check our Demo here ([Demo](https://demo.controlpanel.gg "Demo"))
This dashboard offers an easy to use and free billing solution for all starting and experienced hosting providers. This dashboard has many customisation options and added discord Oauth verification to offer a solid link between your discord server and your dashboard. You can check our [Demo here](https://demo.controlpanel.gg "Demo").

### [Installation](https://controlpanel.gg/docs/intro "Installation")

### [Updating](https://controlpanel.gg/docs/Installation/updating "Updating")

### [Discord](https://discord.gg/4Y6HjD2uyU "discord")
### [Discord](https://discord.gg/4Y6HjD2uyU "Discord")

### [Contributing](https://controlpanel.gg/docs/Contributing/contributing "Contributing")

Expand All @@ -43,15 +46,22 @@ This dashboard offers an easy to use and free billing solution for all starting
# Preview

### Server Creation
![image](https://user-images.githubusercontent.com/8725848/171575021-bc248f12-2aba-44e8-82aa-bdc907b1d3fc.png)
![image](https://user-images.githubusercontent.com/67899387/214687234-d1ae58c0-5667-4e99-ac39-adeaabfcc7f2.png)

### Overview
![image](https://user-images.githubusercontent.com/8725848/171575809-7620ed4f-5715-420f-8c25-8bfa1c4342f7.png)
![image](https://user-images.githubusercontent.com/67899387/214685859-03c8d9e1-c685-4a07-979f-df2e88ec3931.png)

### Example server products
![image](https://user-images.githubusercontent.com/8725848/171575987-c1398ff6-83fa-4cb8-bd1f-986cee4da565.png)
![image](https://user-images.githubusercontent.com/67899387/214686950-218e1ede-6a1f-4e53-b3f4-fe1abc371a9c.png)

### Ticket System
![image](https://user-images.githubusercontent.com/8725848/184131270-9d997ebf-8965-4910-90d2-b410ae37f201.png)
![image](https://user-images.githubusercontent.com/67899387/214687123-0a3d0f8f-b53c-4b0d-869a-4d5df45f5184.png)

### Voucher System
![image](https://user-images.githubusercontent.com/67899387/214686578-ec9f0b0f-6047-4665-835f-70594b56dfd5.png)

### Partner System
![image](https://user-images.githubusercontent.com/67899387/214686321-36ba97a3-4181-4e60-9ba3-c9b318fe66a8.png)



1 change: 1 addition & 0 deletions app/Classes/Settings/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public function updateSettings(Request $request)
'pterodactyl-admin-api-key' => 'required|string',
'enable-upgrades' => 'string',
'enable-disable-servers' => 'string',
'enable-disable-new-users' => 'string',
'show-imprint' => 'string',
'show-privacy' => 'string',
'show-tos' => 'string',
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Commands/ChargeCreditsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function handle()
$server->suspend();

//add user to notify list
if (! in_array($user, $this->usersToNotify)) {
if (!in_array($user, $this->usersToNotify)) {
array_push($this->usersToNotify, $user);
}
} catch (\Exception $exception) {
Expand All @@ -85,7 +85,7 @@ public function handle()
*/
public function notifyUsers()
{
if (! empty($this->usersToNotify)) {
if (!empty($this->usersToNotify)) {
/** @var User $user */
foreach ($this->usersToNotify as $user) {
$this->line("<fg=yellow>Notified user:</> <fg=blue>{$user->name}</>");
Expand Down
42 changes: 42 additions & 0 deletions app/Console/Commands/CleanupOpenPayments.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

namespace App\Console\Commands;

use App\Models\Payment;
use Illuminate\Console\Command;

class CleanupPayments extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'payments:open:clear';

/**
* The console command description.
*
* @var string
*/
protected $description = 'Clears all payments from the database that have state "open"';

/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
// delete all payments that have state "open" and are older than 1 hour
try {
Payment::where('status', 'open')->where('updated_at', '<', now()->subHour())->delete();
} catch (\Exception $e) {
$this->error('Could not delete payments: ' . $e->getMessage());
return 1;
}

$this->info('Successfully deleted all open payments');
return Command::SUCCESS;
}
}
8 changes: 7 additions & 1 deletion app/Console/Commands/MakeUserCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@

use App\Classes\Pterodactyl;
use App\Models\User;
use App\Traits\Referral;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Str;

class MakeUserCommand extends Command
{
use Referral;

/**
* The name and signature of the console command.
*
Expand Down Expand Up @@ -37,6 +41,7 @@ public function __construct(Pterodactyl $pterodactyl)
$this->pterodactyl = $pterodactyl;
}


/**
* Execute the console command.
*
Expand Down Expand Up @@ -78,12 +83,12 @@ public function handle()

return 0;
}

$user = User::create([
'name' => $response['first_name'],
'email' => $response['email'],
'role' => 'admin',
'password' => Hash::make($password),
'referral_code' => $this->createReferralCode(),
'pterodactyl_id' => $response['id'],
]);

Expand All @@ -93,6 +98,7 @@ public function handle()
['Username', $user->name],
['Ptero-ID', $user->pterodactyl_id],
['Admin', $user->role],
['Referral code', $user->referral_code],
]);

return 1;
Expand Down
5 changes: 3 additions & 2 deletions app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ protected function schedule(Schedule $schedule)
{
$schedule->command('credits:charge')->hourly();
$schedule->command('cp:versioncheck:get')->daily();
$schedule->command('payments:open:clear')->daily();

//log cronjob activity
$schedule->call(function () {
Storage::disk('logs')->put('cron.log', 'Last activity from cronjobs - '.now());
Storage::disk('logs')->put('cron.log', 'Last activity from cronjobs - ' . now());
})->everyMinute();
}

Expand All @@ -32,7 +33,7 @@ protected function schedule(Schedule $schedule)
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');
$this->load(__DIR__ . '/Commands');

require base_path('routes/console.php');
}
Expand Down
19 changes: 19 additions & 0 deletions app/Enums/UsefulLinkLocation.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace App\Enums;

enum UsefulLinkLocation:String
{
/**
* Top bar
* Only visible in the dashboard view
*/
case topbar = "topbar";

/**
* Dashboard
* Only visible in the dashboard view
*/
case dashboard = "dashboard";

}
1 change: 1 addition & 0 deletions app/Extensions/PaymentGateways/PayPal/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ function getConfig()
"name" => "PayPal",
"description" => "PayPal payment gateway",
"RoutesIgnoreCsrf" => [],
"enabled" => (config('SETTINGS::PAYMENTS:PAYPAL:SECRET') && config('SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID')) || (config('SETTINGS::PAYMENTS:PAYPAL:SANDBOX_SECRET') && config('SETTINGS::PAYMENTS:PAYPAL:SANDBOX_CLIENT_ID') && env("APP_ENV") === "local"),
];
}
1 change: 1 addition & 0 deletions app/Extensions/PaymentGateways/Stripe/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ function getConfig()
"RoutesIgnoreCsrf" => [
"payment/StripeWebhooks",
],
"enabled" => config('SETTINGS::PAYMENTS:STRIPE:SECRET') && config('SETTINGS::PAYMENTS:STRIPE:CLIENT_ID'),
];
}
Loading

0 comments on commit 6b45719

Please sign in to comment.