diff --git a/app/inventory/views.py b/app/inventory/views.py index 5c8436009da1a2cdf96c785ecc4296b76f78a351..77ec12e9d24bb668b62f495c87b118f91f5de9dd 100644 --- a/app/inventory/views.py +++ b/app/inventory/views.py @@ -245,3 +245,10 @@ def retrieve_attributes_name(kind): items = db.session.query(model).order_by(model.name) data = [(item.name, item.description) for item in items] return jsonify(data=data) + + +@bp.route('/scanner') +@login_required +def scanner(): + """Render the scanner setup codes""" + return render_template('inventory/scanner.html') diff --git a/app/static/img/activate-custom-defaults.png b/app/static/img/activate-custom-defaults.png new file mode 100644 index 0000000000000000000000000000000000000000..7966ad23efad7dd678ef1fdaaeede754c6855f84 Binary files /dev/null and b/app/static/img/activate-custom-defaults.png differ diff --git a/app/static/img/daytime-mode.png b/app/static/img/daytime-mode.png new file mode 100644 index 0000000000000000000000000000000000000000..18ded2d087cbf0b707aabc07bbe380e1063cb7fa Binary files /dev/null and b/app/static/img/daytime-mode.png differ diff --git a/app/static/img/silent-mode-with-flashing-led.png b/app/static/img/silent-mode-with-flashing-led.png new file mode 100644 index 0000000000000000000000000000000000000000..dd81eafc436de1ec46ab7eeeb040932445816f11 Binary files /dev/null and b/app/static/img/silent-mode-with-flashing-led.png differ diff --git a/app/static/img/usb-keyboard-mac.png b/app/static/img/usb-keyboard-mac.png new file mode 100644 index 0000000000000000000000000000000000000000..7c0e592d8ad6da50831feab11ca5d7a1796b142f Binary files /dev/null and b/app/static/img/usb-keyboard-mac.png differ diff --git a/app/static/img/usb-keyboard-pc.png b/app/static/img/usb-keyboard-pc.png new file mode 100644 index 0000000000000000000000000000000000000000..0b07645cfadd09b51db53a2a1e2bfe89ff83a9d9 Binary files /dev/null and b/app/static/img/usb-keyboard-pc.png differ diff --git a/app/static/img/usb-serial.png b/app/static/img/usb-serial.png new file mode 100644 index 0000000000000000000000000000000000000000..5cb1ffa7bb2ba96bb987e9c15b95e126ef077727 Binary files /dev/null and b/app/static/img/usb-serial.png differ diff --git a/app/templates/base-fluid.html b/app/templates/base-fluid.html index 58172667dda15ded4d6af78856de8f15dd3af3b5..733a509d77a97cda7fa6f08e7f7a7e68f8fe86db 100644 --- a/app/templates/base-fluid.html +++ b/app/templates/base-fluid.html @@ -16,6 +16,8 @@ href="{{ url_for('inventory.attributes', kind='Manufacturer') }}">Attributes</a> <a class="list-group-item list-group-item-action {{ is_active(path.startswith("/inventory/qrcodes")) }}" href="{{ url_for('inventory.qrcodes', kind='Action') }}">QR Codes</a> + <a class="list-group-item list-group-item-action {{ is_active(path.startswith("/inventory/scanner")) }}" + href="{{ url_for('inventory.scanner') }}">Scanner setup</a> {% elif path.startswith("/network") %} <a class="list-group-item list-group-item-action {{ is_active(path.startswith(("/network/hosts", "/network/interfaces"))) }}" href="{{ url_for('network.list_hosts') }}">Hosts</a> diff --git a/app/templates/inventory/scanner.html b/app/templates/inventory/scanner.html new file mode 100644 index 0000000000000000000000000000000000000000..d98f700ef5124eb3a70d0cde2349aa35ce81fc80 --- /dev/null +++ b/app/templates/inventory/scanner.html @@ -0,0 +1,66 @@ +{% extends "base-fluid.html" %} + +{% block title %}Scanner - CSEntry{% endblock %} + +{% block main %} + <div class="col-md-8"> + <h4 class="text-center">Scan the following codes to change the Xenon 1900 scanner settings</h4> + <div class="card"> + <h5 class="card-header">Restore default settings</h5> + <div class="card-body"> + <div class="list-group"> + <figure class="figure"> + <img src="{{ url_for('static', filename='img/activate-custom-defaults.png') }}" class="img-fluid mx-auto d-block" alt="Activate Custom Defaults"> + <figcaption class="figure-caption text-center">Activate Custom Defaults</figcaption> + </figure> + </div> + </div> + </div> + </br> + <div class="card"> + <h5 class="card-header">Lower or disable the sound</h5> + <div class="card-body"> + <div class="list-group"> + <figure class="figure"> + <img src="{{ url_for('static', filename='img/daytime-mode.png') }}" class="img-fluid mx-auto d-block" alt="Activate Custom Defaults"> + <figcaption class="figure-caption text-center">Daytime Mode (all sounds to on, but at a low volume)</figcaption> + </figure> + <figure class="figure"> + <img src="{{ url_for('static', filename='img/silent-mode-with-flashing-led.png') }}" class="img-fluid mx-auto d-block" alt="Silent Mode With Flashing LED"> + <figcaption class="figure-caption text-center">Silent Mode With Flashing LED (all sounds are silenced)</figcaption> + </figure> + </div> + </div> + </div> + </br> + <div class="card"> + <h5 class="card-header">Use csentry-scanner application</h5> + <div class="card-body"> + <p class="card-text">Configure the scanner to emulate a regular RS232-based COM port</p> + <div class="list-group"> + <figure class="figure"> + <img src="{{ url_for('static', filename='img/usb-serial.png') }}" class="img-fluid mx-auto d-block" alt="USB Serial"> + <figcaption class="figure-caption text-center">USB Serial</figcaption> + </figure> + </div> + </div> + </div> + </br> + <div class="card"> + <h5 class="card-header">Scan directly in the web UI</h5> + <div class="card-body"> + <p class="card-text">Configure the scanner as a keyboard to scan ICS id and serial numbers in the web UI</p> + <div class="list-group"> + <figure class="figure"> + <img src="{{ url_for('static', filename='img/usb-keyboard-pc.png') }}" class="img-fluid mx-auto d-block" alt="USB Keyboard (PC)"> + <figcaption class="figure-caption text-center">USB Keyboard (PC)</figcaption> + </figure> + <figure class="figure"> + <img src="{{ url_for('static', filename='img/usb-keyboard-mac.png') }}" class="img-fluid mx-auto d-block" alt="USB Keyboard (Mac)"> + <figcaption class="figure-caption text-center">USB Keyboard (Mac)</figcaption> + </figure> + </div> + </div> + </div> + </div> +{%- endblock %}