Fork project
This commit is contained in:
		
							
								
								
									
										57
									
								
								templates/containers/card.containers.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								templates/containers/card.containers.html
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,57 @@
 | 
			
		||||
<style>
 | 
			
		||||
    .info-card.card {
 | 
			
		||||
        height: 11rem;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    .card-text {
 | 
			
		||||
        text-overflow: ellipsis;
 | 
			
		||||
        white-space: nowrap;
 | 
			
		||||
        overflow: hidden;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    .card-text:hover {
 | 
			
		||||
        white-space: pre-line;
 | 
			
		||||
        overflow: visible;
 | 
			
		||||
    }
 | 
			
		||||
</style>
 | 
			
		||||
 | 
			
		||||
<div class="row">
 | 
			
		||||
    {% for container in containers %}
 | 
			
		||||
        <div class="col-sm-6 pb-3">
 | 
			
		||||
            <div class="info-card card">
 | 
			
		||||
                <div class="card-body">
 | 
			
		||||
                    <h5 class="d-inline-block card-title">
 | 
			
		||||
                        <a style="width: 5rem;"
 | 
			
		||||
                           href="{{ url_for('admin.challenges_detail', challenge_id=container.challenge.id) }}"
 | 
			
		||||
                        >{{ container.challenge.name | truncate(15) }}
 | 
			
		||||
                        </a>
 | 
			
		||||
                    </h5>
 | 
			
		||||
                    <h6 class="d-inline-block card-subtitle float-right">
 | 
			
		||||
                        <a style="width: 5rem;"
 | 
			
		||||
                           class="btn btn-outline-secondary rounded"
 | 
			
		||||
                           href="{{ url_for('admin.users_detail', user_id=container.user.id) }}"
 | 
			
		||||
                        >{{ container.user.name | truncate(5) }}
 | 
			
		||||
                        </a>
 | 
			
		||||
                    </h6>
 | 
			
		||||
                    <p class="card-text">{{ container.user_access }}</p>
 | 
			
		||||
                    <p class="card-text">{{ container.flag }}</p>
 | 
			
		||||
                    Time Started: {{ container.start_time }}
 | 
			
		||||
                    <a class="delete-container float-right" container-id="{{ container.id }}"
 | 
			
		||||
                       data-toggle="tooltip" data-placement="top"
 | 
			
		||||
                       user-id="{{ container.user.id }}"
 | 
			
		||||
                       style="margin-right: 0.5rem;"
 | 
			
		||||
                       title="Destroy Container #{{ container.id }}">
 | 
			
		||||
                        <i class="fas fa-stop-circle"></i>
 | 
			
		||||
                    </a>
 | 
			
		||||
                    <a class="renew-container float-right" container-id="{{ container.id }}"
 | 
			
		||||
                       data-toggle="tooltip" data-placement="top"
 | 
			
		||||
                       user-id="{{ container.user.id }}"
 | 
			
		||||
                       style="margin-right: 0.5rem;"
 | 
			
		||||
                       title="Renew Container #{{ container.id }}">
 | 
			
		||||
                        <i class="fas fa-clock"></i>
 | 
			
		||||
                    </a>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
</div>
 | 
			
		||||
							
								
								
									
										78
									
								
								templates/containers/list.containers.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										78
									
								
								templates/containers/list.containers.html
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,78 @@
 | 
			
		||||
<div class="row">
 | 
			
		||||
    <div class="col-md-12">
 | 
			
		||||
        <table class="table table-striped border">
 | 
			
		||||
            <thead>
 | 
			
		||||
            <tr>
 | 
			
		||||
                <th class="border-right" data-checkbox>
 | 
			
		||||
                    <div class="form-check text-center"> 
 | 
			
		||||
                        <input type="checkbox" class="form-check-input" data-checkbox-all>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </th>
 | 
			
		||||
                <th class="sort-col text-center"><b>ID</b></td>
 | 
			
		||||
                <th class="text-center"><b>User</b></td>
 | 
			
		||||
                <th class="sort-col text-center"><b>Challenge</b></td>
 | 
			
		||||
                <th class="text-center"><b>Access Method</b></td>
 | 
			
		||||
                <th class="text-center"><b>Flag</b></td>
 | 
			
		||||
                <th class="sort-col text-center"><b>Startup Time</b></td>
 | 
			
		||||
                <th class="sort-col text-center"><b>Renewal Times</b></td>
 | 
			
		||||
                <th class="text-center"><b>Delete</b></td>
 | 
			
		||||
            </tr>
 | 
			
		||||
            </thead>
 | 
			
		||||
            <tbody>
 | 
			
		||||
            {% for container in containers %}
 | 
			
		||||
                <tr>
 | 
			
		||||
                    <td class="border-right" data-checkbox>
 | 
			
		||||
                        <div class="form-check text-center"> 
 | 
			
		||||
                            <input type="checkbox" class="form-check-input" data-user-id="{{ container.user.id }}">
 | 
			
		||||
                        </div>
 | 
			
		||||
                    </td>
 | 
			
		||||
                    <td class="text-center">
 | 
			
		||||
                        {{ container.id }}
 | 
			
		||||
                    </td>
 | 
			
		||||
                    <td class="text-center">
 | 
			
		||||
                        <a href="{{ url_for('admin.users_detail', user_id=container.user.id) }}">
 | 
			
		||||
                            {{ container.user.name | truncate(12) }}
 | 
			
		||||
                        </a>
 | 
			
		||||
                    </td>
 | 
			
		||||
                    <td class="text-center">
 | 
			
		||||
                        <a href="{{ url_for('admin.challenges_detail', challenge_id=container.challenge.id) }}">
 | 
			
		||||
                            {{ container.challenge.name }}
 | 
			
		||||
                        </a>
 | 
			
		||||
                    </td>
 | 
			
		||||
                    <td class="text-center">
 | 
			
		||||
                        {{ container.challenge.redirect_type }} 
 | 
			
		||||
                        <button class="btn btn-link p-0 click-copy" data-copy="{{ container.user_access }}">
 | 
			
		||||
                            <i class="fas fa-clipboard"></i>
 | 
			
		||||
                        </button>
 | 
			
		||||
                    </td>
 | 
			
		||||
                    <td class="text-center">
 | 
			
		||||
                        <button class="btn btn-link p-0 click-copy" data-copy="{{ container.flag }}">
 | 
			
		||||
                            <i class="fas fa-clipboard"></i>
 | 
			
		||||
                        </button>
 | 
			
		||||
                    </td>
 | 
			
		||||
                    <td class="text-center">
 | 
			
		||||
                        <span data-time="{{ container.start_time | isoformat }}"></span>
 | 
			
		||||
                    </td>
 | 
			
		||||
                    <td class="text-center">
 | 
			
		||||
                        {{ container.renew_count }} 
 | 
			
		||||
                        <button class="btn btn-link p-0 renew-container"
 | 
			
		||||
                           container-id="{{ container.id }}" data-toggle="tooltip"
 | 
			
		||||
                           user-id="{{ container.user.id }}" data-placement="top"
 | 
			
		||||
                           title="Renew Container #{{ container.id }}">
 | 
			
		||||
                            <i class="fas fa-sync"></i>
 | 
			
		||||
                        </button>
 | 
			
		||||
                    </td>
 | 
			
		||||
                    <td class="text-center">
 | 
			
		||||
                        <button class="btn btn-link p-0 delete-container"
 | 
			
		||||
                           container-id="{{ container.id }}" data-toggle="tooltip"
 | 
			
		||||
                           user-id="{{ container.user.id }}" data-placement="top"
 | 
			
		||||
                           title="Destroy Container #{{ container.id }}">
 | 
			
		||||
                            <i class="fas fa-times"></i>
 | 
			
		||||
                    </button>
 | 
			
		||||
                    </td>
 | 
			
		||||
                </tr>
 | 
			
		||||
            {% endfor %}
 | 
			
		||||
            </tbody>
 | 
			
		||||
        </table>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
		Reference in New Issue
	
	Block a user