Skip to content
details.html 3.63 KiB
Newer Older

<!--
 Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->



{% extends 'base.html' %}

{% block content %}
<h1>My Configurations</h1>

<div class="row">
  {% if device %}
  <div class="col-sm-12">
    <span>Device ID:</span>
    <h5>{{config_id}}</h5>
  </div>
  <div class="col-sm-12">
  <div class="col-sm-12">
    <div class="row">

      <div class="col-sm-3">
        <button type="button" class="btn btn-success" onclick="window.location.href='{{ url_for('opticalconfig.home') }}'">
            <i class="bi bi-box-arrow-in-left"></i>
            Back to device list
        </button>
      </div>
      <div class="col-sm-3">
        <!-- <button type="button" class="btn btn-danger"><i class="bi bi-x-square"></i>Delete device</button> -->
        <button type="button" class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#deleteModal">
            <i class="bi bi-x-square"></i>
            Delete Optical Config
        </button>
    </div>
    </div>
  <div class="col-sm-12">
    <span>Device Name:</span>
    <span>{{device_name}}</span>
    </div>
  </div>
  {% for channel in device %}
  <div class="col-sm-12">
    <span style="font-weight: 700;">channel name:{{channel.name.index}}</span>
  </div>


  <div class="col-sm-4">
    <span>Frequency:</span>
    <p class="font-weight-bold" style="font-weight: 700;">{{channel.frequency}}</p>
  </div>
  <div class="col-sm-4">
    <span>Target Output Power:</span>
    <span class="font-weight-bold" style="font-weight: 700;">{{channel.targetOutputPower}}</span>
  </div>
  <div class="col-sm-4">
    <span>Operational Mode:</span>
    <span class="font-weight-bold" style="font-weight: 700;">{{channel.operationalMode}}</span>
  </div>
  <div class="col-sm-4">
    <span>Line Port:</span>
    <span class="font-weight-bold" style="font-weight: 700;">{{channel.line_port}}</span>
  </div>


  <div class="col-sm-12 hr bg-primary" style="height:1px; margin:5px 0;"></div>
  {% endfor %}

</div>

{% else %}
<div class="col">
  <h4 colspan="7">No devices found</h4>
</div>
{% endif %}
<div class="modal fade" id="deleteModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1"
    aria-labelledby="staticBackdropLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="staticBackdropLabel">Delete Optical Config?</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                Are you sure you want to delete the Optical Config "{{config_id}}"?
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">No</button>
                <a type="button" class="btn btn-danger"
                    href="{{ url_for('opticalconfig.delete_opitcalconfig', opticalconfig_uuid=config_id) }}"><i
                        class="bi bi-exclamation-diamond"></i>Yes</a>
            </div>
        </div>
    </div>
</div>