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