Skip to content

Commit ec87330

Browse files
committed
Merge branch 'feature/vuejs' into develop
2 parents 3290d39 + 8055b44 commit ec87330

File tree

235 files changed

+18014
-2766
lines changed

Some content is hidden

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

235 files changed

+18014
-2766
lines changed

.babelrc

Lines changed: 0 additions & 8 deletions
This file was deleted.

.dev/vagrant/provision.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ debconf-set-selections <<< 'mariadb-server-5.5 mysql-server/root_password_again
2121
# actually install
2222
apt-get install -y php7.2 php7.2-cli php7.2-gd php7.2-mysql php7.2-pdo php7.2-mbstring php7.2-tokenizer php7.2-bcmath php7.2-xml php7.2-fpm php7.2-memcached php7.2-curl php7.2-zip php-xdebug mariadb-server nginx curl tar unzip git memcached > /dev/null
2323

24+
echo "Install nodejs and yarn"
25+
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
26+
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
27+
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
28+
apt-get -y install nodejs yarn > /dev/null
29+
2430
echo "Install composer"
2531
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
2632

.env.dusk

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
APP_ENV=local
2+
APP_DEBUG=false
3+
APP_KEY=NDWgIKKi9ovNK1PXZpzfNVSBdfCXGb5i
4+
APP_JWT_KEY=test1234
5+
APP_TIMEZONE=America/Los_Angeles
6+
APP_URL=http://pterodactyl.local
7+
8+
CACHE_DRIVER=file
9+
SESSION_DRIVER=file
10+
11+
HASHIDS_SALT=IqRr0g82tCTeuyxGs8RV
12+
HASHIDS_LENGTH=8
13+
14+
MAIL_DRIVER=log
15+
MAIL_FROM=support@pterodactyl.io
16+
QUEUE_DRIVER=array
17+
18+
APP_SERVICE_AUTHOR=testing@pterodactyl.io
19+
MAIL_FROM_NAME="Pterodactyl Panel"
20+
RECAPTCHA_ENABLED=false
21+
22+
DB_CONNECTION=testing
23+
TESTING_DB_HOST=192.168.1.202
24+
TESTING_DB_DATABASE=panel_test
25+
TESTING_DB_USERNAME=panel_test
26+
TESTING_DB_PASSWORD=Test1234

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ MAIL_FROM=no-reply@example.com
2828

2929
QUEUE_HIGH=high
3030
QUEUE_STANDARD=standard
31-
QUEUE_LOW=low
31+
QUEUE_LOW=low

.gitignore

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,12 @@ storage/framework/*
77
/.idea
88
/nbproject
99

10-
package-lock.json
11-
composer.lock
1210
node_modules
13-
14-
_ide_helper_models.php
11+
*.log
1512
_ide_helper.php
16-
17-
sami.phar
18-
/.sami
13+
.phpstorm.meta.php
14+
.php_cs.cache
15+
public/assets/*
1916

2017
# For local development with docker
2118
# Remove if we ever put the Dockerfile in the repo
@@ -32,3 +29,6 @@ coverage.xml
3229

3330
# Vagrant
3431
*.log
32+
resources/lang/locales.js
33+
resources/assets/pterodactyl/scripts/helpers/ziggy.js
34+
resources/assets/scripts/helpers/ziggy.js

BUILDING.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Local Development
2+
Pterodactyl is now powered by Vuejs and Tailwindcss and uses webpack at its core to generate compiled assets. Release
3+
versions of Pterodactyl will include pre-compiled, minified, and hashed assets ready-to-go.
4+
5+
However, if you are interested in running custom themes or making modifications to the Vue files you'll need a build
6+
system in place to generate these compiled assets. To get your environment setup, you'll first need to install at least Nodejs
7+
`8`, and it is _highly_ recommended that you also install [Yarn](https://yarnpkg.com) to manage your `node_modules`.
8+
9+
### Install Dependencies
10+
```bash
11+
yarn install
12+
```
13+
14+
The command above will download all of the dependencies necessary to get Pterodactyl assets building. After that, its as
15+
simple as running the command below to generate assets while you're developing.
16+
17+
```bash
18+
# build the compiled assets for development
19+
yarn run build
20+
21+
# build the assets automatically when files are modified
22+
yarn run watch
23+
```
24+
25+
26+
### Hot Module Reloading
27+
For more advanced users, we also support 'Hot Module Reloading', allowing you to quickly see changes you're making
28+
to the Vue template files without having to reload the page you're on. To Get started with this, you just need
29+
to run the command below.
30+
31+
```bash
32+
PUBLIC_PATH=http://192.168.1.1:8080 yarn run serve --host 192.168.1.1
33+
```
34+
35+
There are two _very important_ parts of this command to take note of and change for your specific environment. The first
36+
is the `--host` flag, which is required and should point to the machine where the `webpack-serve` server will be running.
37+
The second is the `PUBLIC_PATH` environment variable which is the URL pointing to the HMR server and is appended to all of
38+
the asset URLs used in Pterodactyl.
39+
40+
#### Vagrant
41+
If you want to use HMR with our Vagrant image, you can use `yarn run v:serve` as a shortcut for the correct parameters.
42+
In order to have proper file change detection you can use the [`vagrant-notify-forwarder`](https://github.com/mhallin/vagrant-notify-forwarder) to notify file events from the host to the VM.
43+
```sh
44+
vagrant plugin install vagrant-notify-forwarder
45+
vagrant reload
46+
```
47+
48+
### Building for Production
49+
Once you have your files squared away and ready for the live server, you'll be needing to generate compiled, minified, and
50+
hashed assets to push live. To do so, run the command below:
51+
52+
```bash
53+
yarn run build:production
54+
```
55+
56+
This will generate a production ready `bundle.js` and `bundle.css` as well as a `manifest.json` and store them in
57+
the `/public/assets` directory where they can then be access by clients, and read by the Panel.

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ the response from the server `GET` endpoint.
239239
* Nest and Egg listings now show the associated ID in order to make API requests easier.
240240
* Added star indicators to user listing in Admin CP to indicate users who are set as a root admin.
241241
* Creating a new node will now requires a SSL connection if the Panel is configured to use SSL as well.
242-
* Socketio error messages due to permissions are now rendered correctly in the UI rather than causing a silent failure.
242+
* Connector error messages due to permissions are now rendered correctly in the UI rather than causing a silent failure.
243243
* File manager now supports mass deletion option for files and folders.
244244
* Support for CS:GO as a default service option selection.
245245
* Support for GMOD as a default service option selection.
@@ -369,7 +369,7 @@ the response from the server `GET` endpoint.
369369
* Changed 2FA login process to be more secure. Previously authentication checking happened on the 2FA post page, now it happens prior and is passed along to the 2FA page to avoid storing any credentials.
370370

371371
### Added
372-
* Socketio error messages due to permissions are now rendered correctly in the UI rather than causing a silent failure.
372+
* Connector error messages due to permissions are now rendered correctly in the UI rather than causing a silent failure.
373373

374374
## v0.7.0-beta.1 (Derelict Dermodactylus)
375375
### Added
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
namespace Pterodactyl\Contracts\Http;
4+
5+
interface ClientPermissionsRequest
6+
{
7+
/**
8+
* Returns the permissions string indicating which permission should be used to
9+
* validate that the authenticated user has permission to perform this action aganist
10+
* the given resource (server).
11+
*
12+
* @return string
13+
*/
14+
public function permission(): string;
15+
}

app/Contracts/Repository/Daemon/FileRepositoryInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ interface FileRepositoryInterface extends BaseRepositoryInterface
1313
* @param string $path
1414
* @return \stdClass
1515
*
16-
* @throws \GuzzleHttp\Exception\RequestException
16+
* @throws \GuzzleHttp\Exception\TransferException
1717
*/
1818
public function getFileStat(string $path): stdClass;
1919

@@ -23,7 +23,7 @@ public function getFileStat(string $path): stdClass;
2323
* @param string $path
2424
* @return string
2525
*
26-
* @throws \GuzzleHttp\Exception\RequestException
26+
* @throws \GuzzleHttp\Exception\TransferException
2727
*/
2828
public function getContent(string $path): string;
2929

@@ -34,7 +34,7 @@ public function getContent(string $path): string;
3434
* @param string $content
3535
* @return \Psr\Http\Message\ResponseInterface
3636
*
37-
* @throws \GuzzleHttp\Exception\RequestException
37+
* @throws \GuzzleHttp\Exception\TransferException
3838
*/
3939
public function putContent(string $path, string $content): ResponseInterface;
4040

@@ -44,7 +44,7 @@ public function putContent(string $path, string $content): ResponseInterface;
4444
* @param string $path
4545
* @return array
4646
*
47-
* @throws \GuzzleHttp\Exception\RequestException
47+
* @throws \GuzzleHttp\Exception\TransferException
4848
*/
4949
public function getDirectory(string $path): array;
5050
}

app/Exceptions/Handler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ public static function isReportable(Exception $exception): bool
268268
protected function unauthenticated($request, AuthenticationException $exception)
269269
{
270270
if ($request->expectsJson()) {
271-
return response()->json(['error' => 'Unauthenticated.'], 401);
271+
return response()->json(self::convertToArray($exception), 401);
272272
}
273273

274274
return redirect()->guest(route('auth.login'));

0 commit comments

Comments
 (0)