123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- @extends('admin/layout')
- @section('header')
- <link href="{{asset('css/plugins/chosen/chosen.css')}}" rel="stylesheet">
- <link href="{{asset('css/plugins/switchery/switchery.css')}}" rel="stylesheet">
- <style>
- .for_area {
- display: inline-block;
- width: 200px;
- }
- .upload_img {
- height: 150px;
- }
- </style>
- @endsection
- @section('content')
- <body class="gray-bg">
- <div class="wrapper wrapper-content animated fadeInRight">
- <div class="row">
- <div class="col-sm-12">
- <div class="ibox float-e-margins">
- <div class="ibox-content">
- <form class="form-horizontal" id="form">
- <div class="form-group">
- <label class="col-sm-2 control-label" for="server_name">服务器名称</label>
- <div class="col-sm-8">
- <input type="text" class="form-control" id="server_name" name="server_name"
- value="{{$data->server_name ?? ''}}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="server_ip">服务器Ip:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control" id="server_ip" name="server_ip"
- value="{{$data->server_ip ?? ''}}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="server_user_name">服务器用户名:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control" id="server_user_name"
- name="server_user_name"
- value="{{$data->server_user_name??''}}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="server_passwd">服务器密码:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control" id="server_passwd" name="server_passwd"
- value="{{$data->server_passwd??''}}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="server_description">描述:</label>
- <div class="col-sm-8">
- <textarea class="form-control" id="server_description"
- name="server_description">{{$data->server_description??''}}</textarea>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="server_type">服务器类型:</label>
- <div class="col-sm-4">
- <select name="server_type" id="server_type" class="form-control">
- <option value="">请选择</option>
- @foreach(\App\Http\Models\Server::SERVER_TYPE as $inx=>$val)
- <option value="{{$inx}}" @if(($data->server_type??null)==$inx) selected @endif>
- {{$val}}
- </option>
- @endforeach
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="mysql_user_name">mysql用户名:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control" id="mysql_user_name" name="mysql_user_name"
- value="{{$data->mysql_user_name??''}}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="mysql_passwd">mysql密码:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control" id="mysql_passwd" name="mysql_passwd"
- value="{{$data->mysql_passwd??''}}">
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <div class="col-sm-4 col-sm-offset-2">
- <button class="btn btn-primary" type="button" onclick="units.save()">
- 保存
- </button>
- <button class="btn btn-white closeLayer" type="button">取消</button>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- @endsection
- @section('footer')
- <script>
- var units = {
- save: function () {
- var data = tips.getFormValues('#form');
- var config = {
- url: '/admin/servers/' + "{{$data->server_id??0}}",
- type: 'put',
- data: data,
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 1500},function () {
- tips.closeParentLayer();
- window.parent.tips.tableRefresh('#table');
- });
- }
- };
- tips.ajax(config);
- }
- };
- </script>
- @endsection
|