|
| 1 | +{{-- Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com> --}} |
| 2 | + |
| 3 | +{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} |
| 4 | +{{-- of this software and associated documentation files (the "Software"), to deal --}} |
| 5 | +{{-- in the Software without restriction, including without limitation the rights --}} |
| 6 | +{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} |
| 7 | +{{-- copies of the Software, and to permit persons to whom the Software is --}} |
| 8 | +{{-- furnished to do so, subject to the following conditions: --}} |
| 9 | + |
| 10 | +{{-- The above copyright notice and this permission notice shall be included in all --}} |
| 11 | +{{-- copies or substantial portions of the Software. --}} |
| 12 | + |
| 13 | +{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} |
| 14 | +{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} |
| 15 | +{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} |
| 16 | +{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} |
| 17 | +{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} |
| 18 | +{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} |
| 19 | +{{-- SOFTWARE. --}} |
| 20 | +@extends('layouts.admin') |
| 21 | + |
| 22 | +@section('title') |
| 23 | + Manage Services |
| 24 | +@endsection |
| 25 | + |
| 26 | +@section('content') |
| 27 | +<div class="col-md-12"> |
| 28 | + <ul class="breadcrumb"> |
| 29 | + <li><a href="/admin">Admin Control</a></li> |
| 30 | + <li><a href="{{ route('admin.services') }}">Services</a></li> |
| 31 | + <li class="active">New Service</li> |
| 32 | + </ul> |
| 33 | + <h3 class="nopad">Add New Service</h3><hr /> |
| 34 | + <form action="{{ route('admin.services.new') }}" method="POST"> |
| 35 | + <div class="row"> |
| 36 | + <div class="col-md-6 form-group"> |
| 37 | + <label class="control-label">Service Name:</label> |
| 38 | + <div> |
| 39 | + <input type="text" name="name" class="form-control" value="{{ old('name') }}" /> |
| 40 | + <p class="text-muted"><small>This should be a descriptive category name that emcompasses all of the options within the service.</small></p> |
| 41 | + </div> |
| 42 | + </div> |
| 43 | + <div class="col-md-6 form-group"> |
| 44 | + <label class="control-label">Service Description:</label> |
| 45 | + <div> |
| 46 | + <textarea name="description" class="form-control" rows="4">{{ old('description') }}</textarea> |
| 47 | + </div> |
| 48 | + </div> |
| 49 | + </div> |
| 50 | + <div class="row"> |
| 51 | + <div class="col-md-6 form-group"> |
| 52 | + <label class="control-label">Service Configuration File:</label> |
| 53 | + <div class="input-group"> |
| 54 | + <span class="input-group-addon">/src/services/</span> |
| 55 | + <input type="text" name="file" class="form-control" value="{{ old('file') }}" /> |
| 56 | + <span class="input-group-addon">/index.js</span> |
| 57 | + </div> |
| 58 | + <p class="text-muted"><small>This should be the name of the folder on the daemon that contains all of the service logic.</small></p> |
| 59 | + </div> |
| 60 | + <div class="col-md-6 form-group"> |
| 61 | + <label class="control-label">Display Executable:</label> |
| 62 | + <div> |
| 63 | + <input type="text" name="executable" class="form-control" value="{{ old('executable') }}" /> |
| 64 | + </div> |
| 65 | + <p class="text-muted"><small>Changing this has no effect on operation of the daemon, it is simply used for display purposes on the panel. This can be changed per-option.</small></p> |
| 66 | + </div> |
| 67 | + </div> |
| 68 | + <div class="row"> |
| 69 | + <div class="col-md-12 form-group"> |
| 70 | + <label class="control-label">Default Startup:</label> |
| 71 | + <div class="input-group"> |
| 72 | + <span class="input-group-addon" id="disp_exec"></span> |
| 73 | + <input type="text" name="startup" class="form-control" value="{{ old('startup') }}" /> |
| 74 | + </div> |
| 75 | + <p class="text-muted"><small>This is the default startup that will be used for all servers created using this service. This can be changed per-option.</small></p> |
| 76 | + </div> |
| 77 | + </div> |
| 78 | + <div class="row"> |
| 79 | + <div class="col-md-12"> |
| 80 | + <div class="alert alert-info">You will be able to add service options and variables once the service is created.</div> |
| 81 | + {!! csrf_field() !!} |
| 82 | + <input type="submit" class="btn btn-sm btn-primary" value="Add New Service" /> |
| 83 | + </div> |
| 84 | + </div> |
| 85 | + </form> |
| 86 | +</div> |
| 87 | +<script> |
| 88 | +$(document).ready(function () { |
| 89 | + $('#sidebar_links').find("a[href='/admin/services/new']").addClass('active'); |
| 90 | + $('input[name="executable"]').on('keyup', function() { |
| 91 | + $("#disp_exec").html(escape($(this).val())); |
| 92 | + }); |
| 93 | +}); |
| 94 | +</script> |
| 95 | +@endsection |
0 commit comments