{% extends "base.html" %}
{% block title %}New Deploy · iVistaar{% endblock %}
{% block content %}
<div class="page-head">
  <div>
    <h1>Connect a project</h1>
    <p class="muted">Like connecting a repo on Render — point iVistaar at the project root on this server, then deploy.</p>
  </div>
</div>

<form method="post" class="form-grid" id="deploy-form">
  <label class="span-2">
    Project folder
    <input type="text" name="source_path" required
           placeholder="C:\Projects\weblogic-dashboard"
           autocomplete="off"
           spellcheck="false">
    <span class="muted">Full path to the folder that contains your Flask app (app.py / requirements.txt).</span>
  </label>

  <label>
    Service name
    <input type="text" name="name" required placeholder="WebLogic Dashboard">
  </label>
  <label>
    Slug <span class="muted">(URL path)</span>
    <input type="text" name="slug" pattern="[a-z0-9]+(-[a-z0-9]+)*" placeholder="weblogic-dashboard">
  </label>

  <label>
    Entrypoint
    <input type="text" name="entrypoint" value="{{ default_entrypoint }}" placeholder="app:app">
  </label>
  <label>
    Requirements path
    <input type="text" name="requirements_path" value="{{ default_requirements }}">
  </label>

  <label class="span-2 radio">
    <input type="checkbox" name="auto_deploy" checked>
    Enable auto-deploy (watch this folder for Python source changes and redeploy)
  </label>

  <div class="span-2 actions">
    <button type="submit" class="btn primary">Deploy</button>
    <a class="btn" href="{{ url_for('admin.dashboard') }}">Cancel</a>
  </div>
</form>
{% endblock %}
