-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathweb_app.py
More file actions
67 lines (47 loc) · 1.49 KB
/
Copy pathweb_app.py
File metadata and controls
67 lines (47 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
"""
EmberBurn Web Application
Flask-based web UI for OPC UA Industrial Gateway
Author: Patrick Ryan, CTO - Fireball Industries
License: MIT
"""
from flask import Blueprint, render_template, jsonify, request, redirect, url_for
import logging
# Create Blueprint for web UI
web_ui = Blueprint('web_ui', __name__,
template_folder='templates',
static_folder='static',
static_url_path='/static/web')
logger = logging.getLogger("EmberBurnUI")
@web_ui.route('/')
def index():
"""Serve the main dashboard."""
return render_template('index.html')
@web_ui.route('/dashboard')
def dashboard():
"""Dashboard view - redirect to main index."""
return redirect(url_for('web_ui.index'))
@web_ui.route('/tags')
def tags():
"""Tag monitor view."""
return render_template('tags.html')
@web_ui.route('/publishers')
def publishers():
"""Publishers management view."""
return render_template('publishers.html')
@web_ui.route('/alarms')
def alarms():
"""Alarms view."""
return render_template('alarms.html')
@web_ui.route('/config')
def config():
"""Configuration view."""
return render_template('config.html')
@web_ui.route('/tag-generator')
def tag_generator():
"""OPC UA Tag Generator / Creator."""
return render_template('tag_generator.html')
# Health check for the UI blueprint
@web_ui.route('/health')
def health():
"""UI health check."""
return jsonify({"status": "healthy", "service": "emberburn-ui"})