Compare commits
6 Commits
master
...
initial_fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d22de35b7a | ||
|
|
c48882e605 | ||
|
|
5789934db9 | ||
|
|
2255d759ec | ||
|
|
37a3395e7c | ||
|
|
d07cfe8089 |
13
README.md
13
README.md
@@ -2,7 +2,14 @@
|
|||||||
|
|
||||||
|
|
||||||
## Run
|
## Run
|
||||||
`set FLASK_APP=index.py
|
pip install -r requirements.txt
|
||||||
|
set FLASK_APP=index.py
|
||||||
set FLASK_DEBUG=1
|
set FLASK_DEBUG=1
|
||||||
set
|
flask run -p 5001
|
||||||
flask run -p 5001`
|
|
||||||
|
or
|
||||||
|
pip install -r requirements.txt
|
||||||
|
python index.py
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
3
index.py
3
index.py
@@ -68,7 +68,8 @@ def images_all_action(client_name):
|
|||||||
def image_action(client_name, image_id):
|
def image_action(client_name, image_id):
|
||||||
if client_name in clients:
|
if client_name in clients:
|
||||||
image = clients[client_name].images.get(image_id)
|
image = clients[client_name].images.get(image_id)
|
||||||
return render_template('image.html', image=image, client_name=client_name)
|
return render_template('image.html', image=image, image_attributes=json.dumps(image.attrs, indent=4),
|
||||||
|
client_name=client_name)
|
||||||
else:
|
else:
|
||||||
flash('Client name \'%s\' not found' % client_name)
|
flash('Client name \'%s\' not found' % client_name)
|
||||||
return redirect(url_for('index'))
|
return redirect(url_for('index'))
|
||||||
|
|||||||
17
requirements.txt
Normal file
17
requirements.txt
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
certifi==2018.1.18
|
||||||
|
chardet==3.0.4
|
||||||
|
click==6.7
|
||||||
|
docker==3.1.4
|
||||||
|
docker-pycreds==0.2.2
|
||||||
|
Flask==0.12.2
|
||||||
|
idna==2.6
|
||||||
|
itsdangerous==0.24
|
||||||
|
Jinja2==2.10
|
||||||
|
MarkupSafe==1.0
|
||||||
|
pypiwin32==219
|
||||||
|
requests==2.18.4
|
||||||
|
six==1.11.0
|
||||||
|
Unidecode==1.0.22
|
||||||
|
urllib3==1.22
|
||||||
|
websocket-client==0.47.0
|
||||||
|
Werkzeug==0.14.1
|
||||||
@@ -62,9 +62,9 @@ min-width: 140px;
|
|||||||
table tbody tr:nth-child(2n+1) {
|
table tbody tr:nth-child(2n+1) {
|
||||||
background-color: #f9f9f9; }
|
background-color: #f9f9f9; }
|
||||||
|
|
||||||
h1 { font-size: 2.75em; margin: 16px 32px 16px 32px;}
|
h1 { font-size: 2.75em; margin: 16px 32px 16px 0;}
|
||||||
h2 { font-size: 2em; margin: 16px 32px 16px 16px;}
|
h2 { font-size: 2em; margin: 16px 32px 16px 0;}
|
||||||
h3 { font-size: 1.5em; margin: 16px 32px 16px 32px;}
|
h3 { font-size: 1.5em; margin: 16px 32px 16px 0;}
|
||||||
|
|
||||||
a {color: dodgerblue; text-decoration: none; }
|
a {color: dodgerblue; text-decoration: none; }
|
||||||
a:hover { text-decoration: underline; }
|
a:hover { text-decoration: underline; }
|
||||||
@@ -118,10 +118,10 @@ list-style-position: inside;
|
|||||||
margin: 8px 8px;
|
margin: 8px 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container_attribute {
|
.container_attribute, .image_attribute {
|
||||||
|
|
||||||
}
|
}
|
||||||
.container_attribute-details {
|
.container_attribute-details, .image_attribute-details {
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
line-height: 1.1em;
|
line-height: 1.1em;
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
||||||
|
|
||||||
<h1><a href="/">Dashboard</a> » {{ client_name }} » Containers</h1>
|
<h1><a href="/">Dashboard</a> » {{ client_name }} » <a href="/{{ client_name }}/containers">Containers</a></h1>
|
||||||
|
|
||||||
|
|
||||||
<a class="button--link" href="/{{ client_name }}/containers/all">All Containers</a>
|
<a class="button--link" href="/{{ client_name }}/containers/all">All Containers</a>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
}} {% endif %}</h1>
|
}} {% endif %}</h1>
|
||||||
|
|
||||||
<h2>Details</h2>
|
<h2>Details</h2>
|
||||||
<pre>
|
<div class="image_attribute">
|
||||||
{{ image.attrs | pprint }}
|
<div class="image_attribute-details">{{ image_attributes }}</div>
|
||||||
</pre>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
||||||
|
|
||||||
<h1><a href="/">Dashboard</a> » {{ client_name }} » Images</h1>
|
<h1><a href="/">Dashboard</a> » {{ client_name }} » <a href="/{{ client_name }}/images">Images</a></h1>
|
||||||
|
|
||||||
|
|
||||||
<a class="button--link" href="/{{ client_name }}/images/dangling">Dangling Images</a>
|
<a class="button--link" href="/{{ client_name }}/images/dangling">Dangling Images</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user