Commit 2d8816d0 authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Fixed some fields via dropdowns and added a missing switch in creating and editing storages.

parent 2e22d3c3
Loading
Loading
Loading
Loading
+30 −3
Original line number Diff line number Diff line
@@ -56,15 +56,42 @@
        </tr>
        <tr>
          <td><b>Type</b></td>
          <td><input type="text" name="type" value="" size="30" required /></td>
          <td>
            <select name="type" style="width: 220px;" required>
              <option value="bind">bind</option>
              <option value="volume">volume</option>
              <option value="nfs">nfs</option>
              <option value="object">object</option>
              <option value="posix">posix</option>
              <option value="s3">s3</option>
              <option value="lustre">lustre</option>
              <option value="cephfs">cephfs</option>
              <option value="other">other</option>
            </select>
          </td>
        </tr>
        <tr>
          <td><b>Access via computing</b></td>
          <td><input type="checkbox" name="access_through_computing" value="True" /></td>
        </tr>
        <tr>
          <td><b>Access mode</b></td>
          <td><input type="text" name="access_mode" value="" size="30" required /></td>
          <td>
            <select name="access_mode" style="width: 220px;" required>
              <option value="ssh+cli">ssh+cli</option>
              <option value="internal">internal</option>
            </select>
          </td>
        </tr>
        <tr>
          <td><b>Auth mode</b></td>
          <td><input type="text" name="auth_mode" value="" size="30" required /></td>
          <td>
            <select name="auth_mode" style="width: 220px;" required>
              <option value="user_keys">user_keys</option>
              <option value="platform_keys">platform_keys</option>
              <option value="internal">internal</option>
            </select>
          </td>
        </tr>
        <tr>
          <td><b>Base path</b></td>
+23 −3
Original line number Diff line number Diff line
@@ -61,15 +61,35 @@
        </tr>
        <tr>
          <td><b>Type</b></td>
          <td><input type="text" name="type" value="{{ data.storage.type }}" size="30" required /></td>
          <td>
            <select name="type" style="width: 220px;" required>
              <option value="generic_posix" {% if data.storage.type == 'generic_posix' %}selected{% endif %}>generic_posix</option>
              <option value="internal" {% if data.storage.type == 'internal' %}selected{% endif %}>internal</option>
            </select>
          </td>
        </tr>
        <tr>
          <td><b>Access via computing</b></td>
          <td><input type="checkbox" name="access_through_computing" value="True" {% if data.storage.access_through_computing %}checked{% endif %} /></td>
        </tr>
        <tr>
          <td><b>Access mode</b></td>
          <td><input type="text" name="access_mode" value="{{ data.storage.access_mode }}" size="30" required /></td>
          <td>
            <select name="access_mode" style="width: 220px;" required>
              <option value="ssh+cli" {% if data.storage.access_mode == 'ssh+cli' %}selected{% endif %}>ssh+cli</option>
              <option value="internal" {% if data.storage.access_mode == 'internal' %}selected{% endif %}>internal</option>
            </select>
          </td>
        </tr>
        <tr>
          <td><b>Auth mode</b></td>
          <td><input type="text" name="auth_mode" value="{{ data.storage.auth_mode }}" size="30" required /></td>
          <td>
            <select name="auth_mode" style="width: 220px;" required>
              <option value="user_keys" {% if data.storage.auth_mode == 'user_keys' %}selected{% endif %}>user_keys</option>
              <option value="platform_keys" {% if data.storage.auth_mode == 'platform_keys' %}selected{% endif %}>platform_keys</option>
              <option value="internal" {% if data.storage.auth_mode == 'internal' %}selected{% endif %}>internal</option>
            </select>
          </td>
        </tr>
        <tr>
          <td><b>Base path</b></td>
+2 −0
Original line number Diff line number Diff line
@@ -1444,6 +1444,7 @@ def add_storage(request):
        storage.bind_path = request.POST.get('bind_path', None)
        storage.read_only = bool(request.POST.get('read_only', False))
        storage.browsable = bool(request.POST.get('browsable', False))
        storage.access_through_computing = bool(request.POST.get('access_through_computing', False))

        # Set the computing resource
        computing_uuid = request.POST.get('computing_uuid', None)
@@ -1514,6 +1515,7 @@ def edit_storage(request):
        storage.bind_path = request.POST.get('bind_path', storage.bind_path)
        storage.read_only = bool(request.POST.get('read_only', False))
        storage.browsable = bool(request.POST.get('browsable', False))
        storage.access_through_computing = bool(request.POST.get('access_through_computing', False))

        # Update the computing resource
        computing_uuid = request.POST.get('computing_uuid', None)