Lae/resources/views/admin/hosts/edit.blade.php

59 lines
2.2 KiB
PHP
Raw Permalink Normal View History

2022-11-18 11:39:30 +00:00
@extends('layouts.admin')
@section('title', '主机:' . $host->name)
@section('content')
<h3>{{ $host->name }}</h3>
{{-- 修改主机 --}}
<form method="post" action="{{ route('admin.hosts.update', $host) }}">
@csrf
2023-01-13 10:10:36 +00:00
@method('PATCH')
2022-11-18 11:39:30 +00:00
2023-01-13 10:10:36 +00:00
<div class="form-group">
<label for="name" class="col-sm-2 col-form-label">名称</label>
<input type="text" class="form-control" id="name" name="name" value="{{ $host->name }}">
</div>
2022-11-18 11:39:30 +00:00
<div class="form-group">
2022-11-19 14:42:47 +00:00
<label for="managed_price" class="col-sm-2 col-form-label">新的价格 ()</label>
2022-11-18 11:39:30 +00:00
<input type="text" class="form-control" id="managed_price" name="managed_price"
value="{{ $host->managed_price }}" placeholder="{{ $host->price }}">
留空以使用默认价格
</div>
2023-01-13 10:10:36 +00:00
<div class="form-group">
<label for="status" class="col-sm-2 col-form-label">状态</label>
<select class="form-control" id="status" name="status">
<option value="running" {{ $host->status == 'running' ? 'selected' : '' }}>运行中</option>
<option value="stopped" {{ $host->status == 'stopped' ? 'selected' : '' }}>已停止</option>
<option value="suspended" {{ $host->status == 'suspended' ? 'selected' : '' }}>已暂停</option>
2023-02-01 18:01:49 +00:00
<option value="error" {{ $host->status == 'error' ? 'selected' : '' }}>错误 (提交此项目将会被忽略)
</option>
<option value="error" {{ $host->status == 'pending' ? 'selected' : '' }}>等待中 (提交此项目将会被忽略)
</option>
2023-01-13 10:10:36 +00:00
</select>
</div>
2022-11-18 11:39:30 +00:00
<button type="submit" class="btn btn-primary mt-3">修改</button>
</form>
2023-01-13 10:42:05 +00:00
<hr/>
<form method="post" action="{{ route('admin.hosts.refresh', $host) }}">
@csrf
<button type="submit" class="btn btn-primary mt-3">刷新此主机</button>
</form>
<hr/>
2022-11-18 11:39:30 +00:00
<form method="post" action="{{ route('admin.hosts.destroy', $host) }}">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-danger mt-3">删除</button>
</form>
2022-11-18 11:39:30 +00:00
@endsection