From 76cef7bf1d94d6e735a8978441936724a65144d4 Mon Sep 17 00:00:00 2001 From: Jakob Schrettenbrunner Date: Thu, 19 Jan 2017 01:06:26 +0100 Subject: [PATCH] add redesigned base.api.new view add translations --- resources/lang/en/base.php | 127 ++++++ resources/lang/en/strings.php | 5 + .../themes/pterodactyl/base/api/new.blade.php | 390 ++++++++++++++++++ 3 files changed, 522 insertions(+) create mode 100644 resources/themes/pterodactyl/base/api/new.blade.php diff --git a/resources/lang/en/base.php b/resources/lang/en/base.php index 6a45710d5..fc1d3e8c6 100644 --- a/resources/lang/en/base.php +++ b/resources/lang/en/base.php @@ -26,6 +26,133 @@ return [ 'list' => 'API Keys', 'create_new' => 'Create new API key', ], + 'new' => [ + 'header' => 'New API Key', + 'header_sub' => 'Create a new API access key', + 'form_title' => 'Details', + 'descriptive_memo' => [ + 'title' => 'Descriptive Memo', + 'description' => 'Enter a breif description of what this API key will be used for.' + ], + 'allowed_ips' => [ + 'title' => 'Allowed IPs', + 'description' => 'Enter a line delimitated list of IPs that are allowed to access the API using this key. CIDR notation is allowed. Leave blank to allow any IP.' + ], + 'base' => [ + 'title' => 'Base Information', + 'information' => [ + 'title' => 'Base Information', + 'description' => 'Returns a listing of all servers that this account has access to.', + ], + ], + 'user_management' => [ + 'title' => 'User Management', + 'list' => [ + 'title' => 'List Users', + 'description' => 'Allows listing of all users currently on the system.', + ], + 'create' => [ + 'title' => 'Create User', + 'description' => 'Allows creating a new user on the system.', + ], + 'view' => [ + 'title' => 'List Single User', + 'description' => 'Allows viewing details about a specific user including active services.', + ], + 'update' => [ + 'title' => 'Update User', + 'description' => 'Allows modifying user details (email, password, TOTP information).', + ], + 'delete' => [ + 'title' => 'Delete User', + 'description' => 'Allows deleting a user.', + ], + ], + 'node_management' => [ + 'title' => 'Node Management', + 'list' => [ + 'title' => 'List Nodes', + 'description' => 'Allows listing of all nodes currently on the system.', + ], + 'create' => [ + 'title' => 'Create Node', + 'description' => 'Allows creating a new node on the system.', + ], + 'view' => [ + 'title' => 'List Single Node', + 'description' => 'Allows viewing details about a specific node including active services.', + ], + 'allocations' => [ + 'title' => 'List Allocations', + 'description' => 'Allows viewing all allocations on the panel for all nodes.', + ], + 'delete' => [ + 'title' => 'Delete Node', + 'description' => 'Allows deleting a node.', + ], + ], + 'server_management' => [ + 'title' => 'Server Management', + 'server' => [ + 'title' => 'Server Info', + 'description' => 'Allows access to viewing information about a single server including current stats and allocations.', + ], + 'power' => [ + 'title' => 'Server Power', + 'description' => 'Allows access to control server power status.', + ], + 'view' => [ + 'title' => 'Show Single Server', + 'description' => 'Allows viewing details about a specific server including the daemon_token as current process information.', + ], + 'list' => [ + 'title' => 'List Servers', + 'description' => 'Allows listing of all servers currently on the system.', + ], + 'create' => [ + 'title' => 'Create Server', + 'description' => 'Allows creating a new server on the system.', + ], + 'config' => [ + 'title' => 'Update Configuration', + 'description' => 'Allows modifying server config (name, owner, and access token).', + ], + 'build' => [ + 'title' => 'Update Build', + 'description' => 'Allows modifying a server\'s build parameters such as memory, CPU, and disk space along with assigned and default IPs.', + ], + 'suspend' => [ + 'title' => 'Suspend Server', + 'description' => 'Allows suspending a server instance.', + ], + 'unsuspend' => [ + 'title' => 'Unsuspend Server', + 'description' => 'Allows unsuspending a server instance.', + ], + 'delete' => [ + 'title' => 'Delete Server', + 'description' => 'Allows deleting a server.', + ], + ], + 'service_management' => [ + 'title' => 'Service Management', + 'list' => [ + 'title' => 'List Services', + 'description' => 'Allows listing of all services configured on the system.', + ], + 'view' => [ + 'title' => 'List Single Service', + 'description' => 'Allows listing details about each service on the system including service options and variables.', + ], + ], + 'location_management' => [ + 'title' => 'Location Management', + 'list' => [ + 'title' => 'List Locations', + 'description' => 'Allows listing all locations and thier associated nodes.', + ], + ], + ], ], 'account' => [ 'header' => 'Your Account', diff --git a/resources/lang/en/strings.php b/resources/lang/en/strings.php index a403aa956..e6765463b 100644 --- a/resources/lang/en/strings.php +++ b/resources/lang/en/strings.php @@ -40,4 +40,9 @@ return [ 'port' => 'Port', 'username' => 'Username', 'database' => 'Database', + 'new' => 'New', + 'danger' => 'Danger', + 'create' => 'Create', + 'select_all' => 'Select All', + 'select_none' => 'Select None', ]; diff --git a/resources/themes/pterodactyl/base/api/new.blade.php b/resources/themes/pterodactyl/base/api/new.blade.php new file mode 100644 index 000000000..062a62372 --- /dev/null +++ b/resources/themes/pterodactyl/base/api/new.blade.php @@ -0,0 +1,390 @@ +{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} + +{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} +{{-- of this software and associated documentation files (the "Software"), to deal --}} +{{-- in the Software without restriction, including without limitation the rights --}} +{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} +{{-- copies of the Software, and to permit persons to whom the Software is --}} +{{-- furnished to do so, subject to the following conditions: --}} + +{{-- The above copyright notice and this permission notice shall be included in all --}} +{{-- copies or substantial portions of the Software. --}} + +{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} +{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} +{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} +{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} +{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} +{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} +{{-- SOFTWARE. --}} +@extends('layouts.master') + +@section('title') + @lang('base.api.new.header') +@endsection + +@section('content-header') +

@lang('base.api.new.header')@lang('base.api.new.header_sub')

+ +@endsection + +@section('footer-scripts') + @parent + +@endsection + +@section('content') +
+
+
+
+
+
@lang('base.api.new.form_title')
+
+
+
+
+ + +

@lang('base.api.new.descriptive_memo.description')

+
+
+ + +

@lang('base.api.new.allowed_ips.description')

+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+
+
+
@lang('base.api.new.base.title')
+
+
+
+
+
+
+ + @if(Auth::user()->isRootAdmin()) +
+
+
@lang('base.api.new.user_management.title')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
@lang('base.api.new.node_management.title')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @endif +
+ +
+
+
+
@lang('base.api.new.server_management.title')
+
+
+
+
+
+
+ @if(Auth::user()->isRootAdmin()) +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @endif +
+
+ + @if(Auth::user()->isRootAdmin()) +
+
+
@lang('base.api.new.service_management.title')
+
+
+
+
+
+
+
+
+ +
+
+
@lang('base.api.new.location_management.title')
+
+
+
+
+
+
+ @endif +
+
+
+@endsection