Compare commits
	
		
			2 Commits
		
	
	
		
			31ec07ea15
			...
			b780a834cc
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| b780a834cc | |||
| 5ad898f97d | 
@ -110,6 +110,7 @@ class WhaleContainerLog(db.Model):
 | 
			
		||||
    challenge_id = db.Column(None, db.ForeignKey("challenges.id"))
 | 
			
		||||
    start_time = db.Column(db.DateTime, nullable=False, default=datetime.utcnow)
 | 
			
		||||
    uuid = db.Column(db.String(256))
 | 
			
		||||
    port = db.Column(db.Integer, nullable=True, default=0)
 | 
			
		||||
    flag = db.Column(db.String(128), nullable=False)
 | 
			
		||||
 | 
			
		||||
    # Relationships
 | 
			
		||||
@ -124,8 +125,9 @@ class WhaleContainerLog(db.Model):
 | 
			
		||||
        self.challenge_id = container.challenge_id
 | 
			
		||||
        self.start_time = container.start_time
 | 
			
		||||
        self.uuid = container.uuid
 | 
			
		||||
        self.port = container.port
 | 
			
		||||
        self.flag = container.flag
 | 
			
		||||
 | 
			
		||||
    def __repr__(self):
 | 
			
		||||
        return "<WhaleContainer ID:{0} {1} {2} {3} {4} {5}>".format(self.id, self.user_id, self.challenge_id,
 | 
			
		||||
                                                                self.start_time, self.uuid, self.flag)
 | 
			
		||||
                                                                self.start_time, self.uuid, self.port)
 | 
			
		||||
 | 
			
		||||
@ -33,7 +33,7 @@
 | 
			
		||||
                        >{{ container.user.name | truncate(5) }}
 | 
			
		||||
                        </a>
 | 
			
		||||
                    </h6>
 | 
			
		||||
                    <p class="card-text">UUID: {{ container.uuid }}</p>
 | 
			
		||||
                    <p class="card-text">Container: {{ container.uuid }}</p>
 | 
			
		||||
                    <p class="card-text">{{ container.flag }}</p>
 | 
			
		||||
                    Time Started: {{ container.start_time }}
 | 
			
		||||
                    <span class="badge badge-secondary float-right">Log Record</span>
 | 
			
		||||
 | 
			
		||||
@ -11,10 +11,10 @@
 | 
			
		||||
                <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>UUID</b></td>
 | 
			
		||||
                <th class="text-center"><b>Container</b></td>
 | 
			
		||||
                <th class="text-center"><b>Port</b></td>
 | 
			
		||||
                <th class="text-center"><b>Flag</b></td>
 | 
			
		||||
                <th class="sort-col text-center"><b>Startup Time</b></td>
 | 
			
		||||
                <th class="text-center"><b>Actions</b></td>
 | 
			
		||||
            </tr>
 | 
			
		||||
            </thead>
 | 
			
		||||
            <tbody>
 | 
			
		||||
@ -38,11 +38,15 @@
 | 
			
		||||
                            {{ container.challenge.name }}
 | 
			
		||||
                        </a>
 | 
			
		||||
                    </td>
 | 
			
		||||
                    <td class="text-center">
 | 
			
		||||
                        <button class="btn btn-link p-0 click-copy" data-copy="{{ container.uuid }}">
 | 
			
		||||
                    <td class="text-center" style="word-break: break-all; white-space: normal; max-width: 200px;">
 | 
			
		||||
                        <span class="d-inline-block" style="font-family: monospace; font-size: 0.85em;">{{ container.uuid }}</span>
 | 
			
		||||
                        <button class="btn btn-link p-0 click-copy ml-1" data-copy="{{ container.uuid }}" title="复制UUID">
 | 
			
		||||
                            <i class="fas fa-clipboard"></i>
 | 
			
		||||
                        </button>
 | 
			
		||||
                    </td>
 | 
			
		||||
                    <td class="text-center">
 | 
			
		||||
                        {{ container.port if container.port else '-' }}
 | 
			
		||||
                    </td>
 | 
			
		||||
                    <td class="text-center">
 | 
			
		||||
                        <button class="btn btn-link p-0 click-copy" data-copy="{{ container.flag }}">
 | 
			
		||||
                            <i class="fas fa-clipboard"></i>
 | 
			
		||||
@ -51,9 +55,6 @@
 | 
			
		||||
                    <td class="text-center">
 | 
			
		||||
                        <span data-time="{{ container.start_time | isoformat }}"></span>
 | 
			
		||||
                    </td>
 | 
			
		||||
                    <td class="text-center">
 | 
			
		||||
                        <span class="badge badge-secondary">Log Record</span>
 | 
			
		||||
                    </td>
 | 
			
		||||
                </tr>
 | 
			
		||||
            {% endfor %}
 | 
			
		||||
            </tbody>
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user