Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #11

Merged
merged 61 commits into from
Apr 30, 2024
Merged

Dev #11

Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
725b921
build a new dev
Apr 29, 2024
d0ff12c
maybe
Apr 29, 2024
4a0f04c
ship it
Apr 29, 2024
3cc591b
stupid test
Apr 29, 2024
22cf752
test uodate
Apr 29, 2024
91af508
update test
Apr 29, 2024
af40322
installer does too much
Apr 29, 2024
3ba9598
argh
Apr 29, 2024
0fceaa6
moving on....
Apr 29, 2024
1095fee
start of status
Apr 29, 2024
ceb8486
add ce-info route
Apr 29, 2024
02d37f1
more updates for status box
Apr 29, 2024
3dbb821
style test
Apr 29, 2024
c935e70
get all info from one place
Apr 29, 2024
3ab49fd
attempt at status cookie
Apr 29, 2024
bbaf4f8
route wrong
Apr 29, 2024
8d90978
stray
Apr 29, 2024
1ada99b
js flailing
Apr 29, 2024
5fbcfbd
who knows
Apr 29, 2024
b5b0a2a
more
Apr 29, 2024
ecf104f
more again
Apr 29, 2024
2c9eab3
sigh
Apr 29, 2024
0d83286
ugh
Apr 29, 2024
2ea73e6
start of style
Apr 29, 2024
ac03cf2
almost
Apr 29, 2024
3f9f1ab
prod zappa stage
kreynoldsf5 Apr 29, 2024
6f2ddc6
added images
kreynoldsf5 Apr 29, 2024
cc7eade
aesthetics
Apr 29, 2024
6e10b74
cleaup
Apr 29, 2024
1ad1ecb
add cluster back
Apr 29, 2024
d2692f6
let's see
kreynoldsf5 Apr 29, 2024
4564657
bigger
Apr 29, 2024
d8c31df
clean
Apr 29, 2024
4dd99d3
what now
Apr 29, 2024
9c7fd03
stop messing
Apr 29, 2024
9889b3e
test
Apr 29, 2024
73774a9
some issue with setup
Apr 29, 2024
a26a5bc
move on
Apr 29, 2024
c7d521c
test
Apr 29, 2024
74e9e49
do content now
Apr 29, 2024
f4df1fb
css sux
Apr 29, 2024
980ec9e
odd
Apr 29, 2024
c4402a9
argh
Apr 29, 2024
c6ef642
quick fix
Apr 29, 2024
fa32d3b
whatever
Apr 29, 2024
f1e97a4
moving on
Apr 29, 2024
fef8ce7
col
Apr 29, 2024
0cfa33f
test
Apr 29, 2024
af7930d
reusable button
Apr 29, 2024
c3bce33
buttons
Apr 29, 2024
1082e1a
ready to write the tests
Apr 29, 2024
dd47345
ready to test
Apr 29, 2024
ccff47e
needs some linting
Apr 29, 2024
d432296
strange
Apr 29, 2024
a45dd17
cleanup headers
Apr 29, 2024
5239c26
for clarity
Apr 29, 2024
37046c3
more cleanup
Apr 29, 2024
b4701d3
more test
Apr 29, 2024
7c1e104
closer
Apr 29, 2024
6126ae3
moving on
Apr 29, 2024
96f3e1a
next exercise
Apr 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more updates for status box
Kevin Reynolds committed Apr 29, 2024
commit 02d37f16ef22d47d7474e46cbe16c6f3ffbcba6a
49 changes: 38 additions & 11 deletions labapp/app/app.py
Original file line number Diff line number Diff line change
@@ -10,11 +10,11 @@
from ce import get_ce_info, get_ce_state

app = Flask(__name__)
app.config['udf'] = os.getenv('UDF', None)
info = None
if app.config['udf']:
info = get_ce_info()
app.config['ce_info'] = info
app.config['ce_info'] = None
app.config['UDF'] = None
if os.getenv('UDF', None):
app.config['ce_info'] = get_ce_info()
app.config['UDF'] = True
app.config['base_url'] = "mcn-lab.f5demos.com"
app.config['CACHE_TYPE'] = 'SimpleCache'
cache = Cache(app)
@@ -57,7 +57,11 @@ def return_err(err):
def index():
"""index page"""
html = render_md("markdown/overview.md")
return render_template('overview.html', content=html)
return render_template('standard.html',
title="MCN Practical: Overview",
content=html,
udf=app.config['UDF']
)

@app.route('/setup', methods=['GET', 'POST'])
def setup():
@@ -80,13 +84,21 @@ def setup():
flash("Ephemeral NS cleared.", "info")
return response
html = render_md("markdown/setup.md")
return render_template('setup.html', content=html)
return render_template('setup.html',
title="MCN Practical: Setup",
content=html,
udf=app.config['UDF']
)

@app.route('/arch')
def arch():
"""arch page"""
html = render_md("markdown/arch.md")
return render_template('standard.html', content=html, title="MCN Practical: Architecture")
return render_template('standard.html',
title="MCN Practical: Architecture",
content=html,
udf=app.config['UDF']
)

@app.route('/_ce_state')
@cache.cached(timeout=30)
@@ -106,21 +118,36 @@ def lb():
"""lb page"""
ns = eph_ns()
html = render_md("markdown/lb.md")
return render_template('exercise_standard.html', title="MCN Practical: LB", content=html, ns=ns)
return render_template('exercise_standard.html',
title="MCN Practical: LB",
content=html,
ns=ns,
udf=app.config['UDF']
)

@app.route('/path')
def path():
"""path page"""
ns = eph_ns()
html = render_md("markdown/path.md")
return render_template('exercise_standard.html', title="MCN Practical: Path Routing", content=html, ns=ns)
return render_template('exercise_standard.html',
title="MCN Practical: Path Routing",
content=html,
ns=ns,
udf=app.config['UDF']
)

@app.route('/header')
def header():
"""header page"""
ns = eph_ns()
html = render_md("markdown/header.md")
return render_template('exercise_standard.html', title="MCN Practical: Headers", content=html, ns=ns)
return render_template('exercise_standard.html',
title="MCN Practical: Headers",
content=html,
ns=ns,
udf=app.config['UDF']
)

@app.route('/_lb1')
def lb_aws():
18 changes: 8 additions & 10 deletions labapp/app/templates/base.html
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{% block title %}F5XC MCN Practical Lab{% endblock %}</title>
<title>{% block title %}{{ title }}{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" rel="stylesheet">

@@ -128,17 +128,15 @@
</div>
</li>
</ul>
</div>


{% if cluster-info %}
<div class="status-box bg-light p-2">
<p>Status: <strong>Active</strong></p>
</div>
{% endif %}



{% if udf %}
<div class="status-box bg-light p-2">
<p>Status: <strong>Active</strong></p>
</div>
{% endif %}


</div>

<!-- Main Content -->
9 changes: 0 additions & 9 deletions labapp/app/templates/overview.html

This file was deleted.

2 changes: 1 addition & 1 deletion labapp/app/templates/setup.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "base.html" %}

{% block title %}MCN Practical: Setup{% endblock %}
{% block title %}{{ title }}{% endblock %}

{% block content %}
<div class="markdown-body">