updated view and database
This commit is contained in:
+2
-21
@@ -216,27 +216,8 @@ def reject_request(req_id):
|
||||
|
||||
@wmt_web_bp.route('/devices')
|
||||
def devices():
|
||||
"""List all WMT-registered devices."""
|
||||
try:
|
||||
with get_db().get_session() as session:
|
||||
device_list = (
|
||||
session.query(Device)
|
||||
.filter(Device.mac_address.isnot(None))
|
||||
.order_by(Device.nume_masa)
|
||||
.all()
|
||||
)
|
||||
return render_template(
|
||||
'wmt/devices.html',
|
||||
devices=device_list,
|
||||
breadcrumbs=[
|
||||
{'url': url_for('wmt_web.index'), 'title': 'WMT Management'},
|
||||
{'url': url_for('wmt_web.devices'), 'title': 'Devices'},
|
||||
],
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(f'WMT devices list error: {e}')
|
||||
flash(f'Error: {e}', 'error')
|
||||
return redirect(url_for('wmt_web.index'))
|
||||
"""Retired: WMT devices are now shown on the unified Devices page."""
|
||||
return redirect(url_for('main.devices'))
|
||||
|
||||
|
||||
@wmt_web_bp.route('/devices/new', methods=['GET', 'POST'])
|
||||
|
||||
Reference in New Issue
Block a user