3
3
< head >
4
4
< meta charset ="UTF-8 ">
5
5
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6
- < title > Echo </ title >
6
+ < title > MCN Practical Cloud App </ title >
7
7
< link href ="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css " rel ="stylesheet ">
8
8
< link rel ="
stylesheet "
href ="
https://cdn.jsdelivr.net/npm/[email protected] /styles/atom-one-dark.min.css "
>
9
9
< link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css ">
12
12
13
13
< style >
14
14
.json-output {
15
- background-color : # 333 ; /* Dark grey background */
16
- color : # fff ; /* Ensure text color is white */
15
+ background-color : # 333 ;
16
+ color : # fff ;
17
17
padding : 1em ;
18
18
border-radius : 0.5em ;
19
19
overflow : auto;
20
20
}
21
- .json-output pre , .json-output code { /* Ensure all text within pre and code tags inherits white color */
21
+ .json-output pre , .json-output code {
22
22
color : inherit;
23
23
}
24
+ pre code .hljs {
25
+ overflow-x : hidden;
26
+ }
27
+ pre code .hljs : hover {
28
+ overflow-x : auto;
29
+ }
24
30
</ style >
25
31
</ head >
26
32
< body >
27
33
< div class ="container ">
28
34
< div >
29
35
< h1 class ="mt-5 ">
30
- < img src ="/ static/logo.png " alt ="" width ="auto " height ="100 "/>
36
+ < img src ="https://github.com/f5devcentral/f5xc-lab-mcn-practical/blob/main/cloudapp/ static/logo.png?raw=true " alt ="" width ="auto " height ="100 "/>
31
37
MCN Practical Cloud App</ h1 >
32
38
</ div >
33
39
< div class ="card mt-3 ">
34
40
< div class ="card-header "> Environment</ div >
35
41
< div class ="card-body ">
36
42
{% if request_env == 'AWS' %}
37
- < img src ="/ static/aws.png " alt ="" width ="auto " height ="40 ">
43
+ < img src ="https://github.com/f5devcentral/f5xc-lab-mcn-practical/blob/main/cloudapp/ static/aws.png?raw=true " alt ="" width ="auto " height ="40 ">
38
44
{% elif request_env == 'Azure' %}
39
- < img src ="/ static/azure.png " alt ="" width ="auto " height ="40 ">
45
+ < img src ="https://github.com/f5devcentral/f5xc-lab-mcn-practical/blob/main/cloudapp/ static/azure.png?raw=true " alt ="" width ="auto " height ="40 ">
40
46
{% else %}
41
- < img src ="/ static/flask.png " alt ="" width ="auto " height ="40 ">
47
+ < img src ="https://github.com/f5devcentral/f5xc-lab-mcn-practical/blob/main/cloudapp/ static/flask.png?raw=true " alt ="" width ="auto " height ="40 ">
42
48
{% endif %}
43
49
 {{ request_env }}
44
50
</ div >
@@ -55,39 +61,8 @@ <h1 class="mt-5">
55
61
< div class ="card-body json-output ">
56
62
< pre > < code class ="json "> {{ request_data | to_pretty_json }}</ code > </ pre >
57
63
</ div >
58
- < div >
59
- < form action ="/pretty_echo " method ="POST ">
60
- < input type ="hidden " name ="example " value ="data ">
61
- < button type ="submit " class ="btn btn-primary "> Send POST Data</ button >
62
- </ form >
63
- </ div >
64
64
</ div >
65
65
{% endif %}
66
66
</ div >
67
- < script >
68
- document . addEventListener ( 'DOMContentLoaded' , ( event ) => {
69
- hljs . highlightAll ( ) ;
70
- } ) ;
71
-
72
- function sendPostRequest ( ) {
73
- fetch ( '/pretty_echo' , {
74
- method : 'POST' ,
75
- headers : {
76
- 'Content-Type' : 'application/json' ,
77
- } ,
78
- body : JSON . stringify ( {
79
- exampleField : 'exampleValue'
80
- } )
81
- } )
82
- . then ( response => response . json ( ) )
83
- . then ( data => {
84
- alert ( 'POST request sent.' ) ;
85
- console . log ( data ) ;
86
- } )
87
- . catch ( ( error ) => {
88
- console . error ( 'Error:' , error ) ;
89
- } ) ;
90
- }
91
- </ script >
92
67
</ body >
93
68
</ html >
0 commit comments