Commit 1285541d authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Added the option for disabling HTTP basicauth embedding. Minor fixes and cleanup.

parent a0573701
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
# Generated by Django 2.2.1 on 2023-10-15 15:32

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('core_app', '0035_auto_20231007_1249'),
    ]

    operations = [
        migrations.AddField(
            model_name='container',
            name='disable_http_basicauth_embedding',
            field=models.BooleanField(default=False, verbose_name='Disable HTTP basicauth credentials embedding'),
        ),
    ]
+1 −0
Original line number Diff line number Diff line
@@ -140,6 +140,7 @@ class Container(models.Model):
    supports_custom_interface_port = models.BooleanField('Supports custom interface port', default=False) # BASE_PORT
    supports_interface_auth = models.BooleanField('Supports interface auth', default=False) # AUTH_USER / AUTH_PASS
    interface_auth_user = models.CharField('Interface auth fixed user if any', max_length=36, blank=True, null=True)
    disable_http_basicauth_embedding = models.BooleanField('Disable HTTP basicauth credentials embedding', default=False)

    # Env vars for some container control
    env_vars = JSONField('Container env vars', blank=True, null=True)
+7 −0
Original line number Diff line number Diff line
@@ -142,6 +142,13 @@
            </td>
           </tr>

           <tr>
            <td colspan=2>
             <b>Disable HTTP auth embedding</b> &nbsp; 
             <input type="checkbox" name="container_disable_http_basicauth_embedding" value="True" />
            </td>
           </tr>

           <tr>
            <td><b>Environment variables</b></td>
            <td>
+14 −2
Original line number Diff line number Diff line
@@ -101,7 +101,19 @@
           <input type="checkbox" name="supports_interface_auth" checked disabled/> 
         {% else %}
           <input type="checkbox" name="supports_interface_auth" disabled/> 
         {% endif %}        </td>
         {% endif %}
         </td>
       </tr>

       <tr>
        <td colspan=2>
         <b>Disable HTTP auth embedding</b> &nbsp; 
         {% if container.disable_http_basicauth_embedding %}
           <input type="checkbox" name="disable_http_basicauth_embedding" checked disabled/> 
         {% else %}
           <input type="checkbox" name="disable_http_basicauth_embedding" disabled/> 
         {% endif %}
         </td>
       </tr>

       {% if container.env_vars %}
@@ -114,7 +126,7 @@
       {% if container.user %}
       <tr>
        <td><b>Operations</b></td>
        <td><a href="?action=delete&uuid={{ container.uuid }}">Delete</a></td>
        <td><a href="?action=delete&container_uuid={{ container.uuid }}">Delete</a></td>
       </tr>
       {% endif %}
      </table>
+0 −64
Original line number Diff line number Diff line


      <div style="width:300px; float:left; border: #e0e0e0 solid 1px; margin:10px; background:#f8f8f8; margin-bottom:15px">
        <form action="/aaa" method=GET>
        
        
        <div style="padding:10px; margin-top:5px; text-align:center; border-bottom: {{container.color}} solid 10px; ">
        <a href="/software/?container_family={{ family_id }}">{{ container_family.name }}</a>&nbsp; 
        </div>
        
        <div style="padding:10px; height: 125px; ">
        <!-- <div style="position: relative; top: 50%; transform: translateY(-50%);"> -->
        
        {% if container_family.description %} 
        <div class="description-box" title="{{ container_family.description }}">
        {{ container_family.description }}
        </div>
        {% else %}
        <br/>  
        {% endif %}
        
        <div class="image-version-box">
        <b>Image:</b> <code>{{ container_family.image }}</code><br/>
        <div style="margin-top:2px">
        
        <span style="vertical-align:top;"><b>Tag:</b>&nbsp;</span>
        <select name="task_container_uuid_and_arch" style="font-size:0.8em">
        {% for arch,container_by_tags in container_family.container_by_tags_by_arch.items %}
        <optgroup label={{ arch }}>
        {% for tag,container in container_by_tags.items %}
        <option value="{{ container.uuid }}-{{ arch }}">{{ tag }}</option>
        {% endfor %}
        </optgroup>
        {% endfor %}
        </select>
             
        </div>
        </div>
        <!-- </div> -->
        </div>
        
        <div style="margin-bottom:8px; margin-top: 3px; text-align:center">
        {% if not disable_play_button %}
        
               
        <button type="submit" onclick="myFunction()" class="btn-link btn btn-light" style="border: #c0c0c0 1px solid">
        &nbsp;<i class="fa fa-play" style="color:green"></i>
        </button>
        
        {% endif %}
        </form>
        </div>    
      
      
      
      </div>
      






      
 No newline at end of file
Loading