You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
web-panel/resources/views/device/add.blade.php

91 lines
4.3 KiB

@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header">Create New Device Configuration</div>
<div class="card-body">
@if (session('status'))
<div class="alert alert-success" role="alert">
{{ session('status') }}
</div>
@endif
<form method="POST" action="{{ url('/device/add') }}" enctype="multipart/form-data">
@csrf
<div class="form-group row">
<label for="code" class="col-md-4 col-form-label text-md-right">{{ __('Activation Code') }}</label>
<div class="col-md-6">
<input id="code" type="text" class="form-control{{ $errors->has('code') ? ' is-invalid' : '' }}" name="code" value="{{ old('code') }}" placeholder="0pva5gq4" required autofocus>
@if ($errors->has('code'))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('code') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group row">
<label for="camera" class="col-md-4 col-form-label text-md-right">{{ __('Camera Device Stream') }}</label>
<div class="col-md-6">
<input id="camera" type="text" class="form-control{{ $errors->has('camera') ? ' is-invalid' : '' }}" name="camera" value="{{ old('camera') }}" placeholder="/dev/video0" required>
@if ($errors->has('camera'))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('camera') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group row">
<label for="lotid" class="col-md-4 col-form-label text-md-right">{{ __('Lot ID (Firebase)') }}</label>
<div class="col-md-6">
<input id="lotid" type="text" class="form-control{{ $errors->has('lotid') ? ' is-invalid' : '' }}" name="lotid" value="{{ old('lotid') }}" placeholder="Lot15" required>
@if ($errors->has('lotid'))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('lotid') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group row">
<label for="ehat" class="col-md-4 col-form-label text-md-right">{{ __('Ê Threshold') }}</label>
<div class="col-md-6">
<input id="ehat" type="text" class="form-control{{ $errors->has('ehat') ? ' is-invalid' : '' }}" name="ehat" value="{{ old('ehat') }}" placeholder="10" required>
@if ($errors->has('ehat'))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('ehat') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group row mb-0">
<div class="col-md-6 offset-md-4">
<button type="submit" class="btn btn-primary">
{{ __('Create Lot') }}
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
@endsection