Last active
March 16, 2023 15:50
-
-
Save tuto1902/3d88941cf5e99b58599a090671ff9ee4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>{{ config('app.name') }}</title> | |
<script src="https://cdn.tailwindcss.com"></script> | |
</head> | |
<body class="bg-gray-100"> | |
<div class="relative flex min-h-screen flex-col justify-center overflow-hidden bg-gray-50 py-6 sm:py-12"> | |
<div class="relative bg-white px-6 pt-10 pb-8 shadow-xl ring-1 ring-gray-900/5 sm:mx-auto sm:max-w-lg sm:rounded-lg sm:px-10"> | |
<div class="mx-auto max-w-md"> | |
<form action="{{ route('cron.generate') }}" method="POST"> | |
@csrf | |
@if(session('error')) | |
<div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative" role="alert"> | |
<span class="block sm:inline">{{ session('error')}}</span> | |
<span class="absolute top-0 bottom-0 right-0 px-4 py-3"> | |
<svg class="fill-current h-6 w-6 text-red-500" role="button" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><title>Close</title><path d="M14.348 14.849a1.2 1.2 0 0 1-1.697 0L10 11.819l-2.651 3.029a1.2 1.2 0 1 1-1.697-1.697l2.758-3.15-2.759-3.152a1.2 1.2 0 1 1 1.697-1.697L10 8.183l2.651-3.031a1.2 1.2 0 1 1 1.697 1.697l-2.758 3.152 2.758 3.15a1.2 1.2 0 0 1 0 1.698z"/></svg> | |
</span> | |
<p class="block sm:inline">{{ session('cronExpression')}}</p> | |
</div> | |
@endif | |
<div class="divide-y divide-gray-300/50"> | |
<div class="space-y-6 pt-8 pb-4 text-base leading-7 text-gray-600"> | |
<p>Write a task schedule in natural language:</p> | |
<textarea name="schedule" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" id="username" type="text" placeholder="try using "Every 15 minutes"">{{ session('schedule') ?: '' }}</textarea> | |
@error('schedule') | |
<span class="text-red-500 text-xs italic">{{ $message }}</span> | |
@enderror | |
<p class="text-gray-500 text-4xl font-semibold tracking-widest w-full text-center">{{ session('cronExpression') ?: '* * * * *' }}</p> | |
</div> | |
<div class="pt-8 text-base font-semibold leading-7"> | |
<button type="submit" class="bg-blue-500 hover:bg-blue-700 w-full text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline" type="button"> | |
Get Cron Expression | |
</button> | |
</div> | |
</div> | |
</form> | |
</div> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment