Skip to content
Snippets Groups Projects
Commit 0724a912 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Pre-merge code cleanup

parent fd85ee15
No related branches found
No related tags found
2 merge requests!294Release TeraFlowSDN 4.0,!284Resolve: "(CNIT) Multi-Granular Optical Nodes and Optical Transpoders management"
This commit is part of merge request !284. Comments created here will be created in the context of that merge request.
......@@ -140,7 +140,7 @@ export CRDB_DEPLOY_MODE="single"
export CRDB_DROP_DATABASE_IF_EXISTS=""
# Disable flag for re-deploying CockroachDB from scratch.
export CRDB_REDEPLOY="YES"
export CRDB_REDEPLOY=""
# ----- NATS -------------------------------------------------------------------
......
......@@ -21,7 +21,8 @@ from context.client.ContextClient import ContextClient
from device.client.DeviceClient import DeviceClient
from qkd_app.client.QKDAppClient import QKDAppClient
from common.Settings import (
is_deployed_bgpls, is_deployed_load_gen, is_deployed_policy, is_deployed_qkd_app, is_deployed_slice
is_deployed_bgpls, is_deployed_load_gen, is_deployed_optical,
is_deployed_policy, is_deployed_qkd_app, is_deployed_slice
)
def get_working_context() -> str:
......@@ -86,43 +87,43 @@ def create_app(use_config=None, web_app_root=None):
app.register_blueprint(healthz, url_prefix='/healthz')
from webui.service.js.routes import js # pylint: disable=import-outside-toplevel
from webui.service.js.routes import js # pylint: disable=import-outside-toplevel
app.register_blueprint(js)
from webui.service.main.routes import main # pylint: disable=import-outside-toplevel
from webui.service.main.routes import main # pylint: disable=import-outside-toplevel
app.register_blueprint(main)
from webui.service.load_gen.routes import load_gen # pylint: disable=import-outside-toplevel
from webui.service.load_gen.routes import load_gen # pylint: disable=import-outside-toplevel
app.register_blueprint(load_gen)
from webui.service.base_optical.route import base_optical # pylint: disable=import-outside-toplevel
from webui.service.base_optical.route import base_optical # pylint: disable=import-outside-toplevel
app.register_blueprint(base_optical)
from webui.service.opticalconfig.routes import opticalconfig # pylint: disable=import-outside-toplevel
from webui.service.opticalconfig.routes import opticalconfig # pylint: disable=import-outside-toplevel
app.register_blueprint(opticalconfig)
from webui.service.optical_link.routes import optical_link # pylint: disable=import-outside-toplevel
from webui.service.optical_link.routes import optical_link # pylint: disable=import-outside-toplevel
app.register_blueprint(optical_link)
from webui.service.service.routes import service # pylint: disable=import-outside-toplevel
from webui.service.service.routes import service # pylint: disable=import-outside-toplevel
app.register_blueprint(service)
from webui.service.slice.routes import slice # pylint: disable=import-outside-toplevel,redefined-builtin
from webui.service.slice.routes import slice # pylint: disable=import-outside-toplevel,redefined-builtin
app.register_blueprint(slice)
from webui.service.device.routes import device # pylint: disable=import-outside-toplevel
from webui.service.device.routes import device # pylint: disable=import-outside-toplevel
app.register_blueprint(device)
from webui.service.bgpls.routes import bgpls # pylint: disable=import-outside-toplevel
from webui.service.bgpls.routes import bgpls # pylint: disable=import-outside-toplevel
app.register_blueprint(bgpls)
from webui.service.link.routes import link # pylint: disable=import-outside-toplevel
from webui.service.link.routes import link # pylint: disable=import-outside-toplevel
app.register_blueprint(link)
from webui.service.qkd_app.routes import qkd_app # pylint: disable=import-outside-toplevel
from webui.service.qkd_app.routes import qkd_app # pylint: disable=import-outside-toplevel
app.register_blueprint(qkd_app)
from webui.service.policy_rule.routes import policy_rule # pylint: disable=import-outside-toplevel
from webui.service.policy_rule.routes import policy_rule # pylint: disable=import-outside-toplevel
app.register_blueprint(policy_rule)
app.jinja_env.globals.update({ # pylint: disable=no-member
......@@ -135,6 +136,7 @@ def create_app(use_config=None, web_app_root=None):
'is_deployed_bgpls' : is_deployed_bgpls,
'is_deployed_load_gen': is_deployed_load_gen,
'is_deployed_optical' : is_deployed_optical,
'is_deployed_policy' : is_deployed_policy,
'is_deployed_qkd_app' : is_deployed_qkd_app,
'is_deployed_slice' : is_deployed_slice,
......
......@@ -111,7 +111,3 @@ def delete_all () :
except Exception as e :
flash(f"Problem in delete all optical link => {e}",'danger')
return redirect(url_for('optical_link.home'))
\ No newline at end of file
......@@ -79,27 +79,6 @@
<a class="nav-link" href="{{ url_for('service.home') }}">Service</a>
{% endif %}
</li>
<li class="nav-item">
{% if '/slice/' in request.path %}
<a class="nav-link active" aria-current="page" href="{{ url_for('slice.home') }}">Slice</a>
{% else %}
<a class="nav-link" href="{{ url_for('slice.home') }}">Slice</a>
{% endif %}
</li>
<li class="nav-item">
{% if '/base_optical/' in request.path %}
<a class="nav-link active" aria-current="page" href="{{ url_for('base_optical.home') }}">Optical Config</a>
{% else %}
<a class="nav-link" href="{{ url_for('base_optical.home') }}">Optical Config</a>
{% endif %}
</li>
<li class="nav-item">
{% if '/policy_rule/' in request.path %}
<a class="nav-link active" aria-current="page" href="{{ url_for('policy_rule.home') }}">Policy Rules</a>
{% else %}
<a class="nav-link" href="{{ url_for('policy_rule.home') }}">Policy Rules</a>
{% endif %}
</li>
{% if is_deployed_slice() %}
<li class="nav-item">
......@@ -111,6 +90,16 @@
</li>
{% endif %}
{% if is_deployed_optical() %}
<li class="nav-item">
{% if '/base_optical/' in request.path %}
<a class="nav-link active" aria-current="page" href="{{ url_for('base_optical.home') }}">Optical Config</a>
{% else %}
<a class="nav-link" href="{{ url_for('base_optical.home') }}">Optical Config</a>
{% endif %}
</li>
{% endif %}
{% if is_deployed_policy() %}
<li class="nav-item">
{% if '/policy_rule/' in request.path %}
......
......@@ -12,9 +12,9 @@
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' %}
-->
{% extends 'base.html' %}
{% block content %}
<h1>Optical Links</h1>
......@@ -119,4 +119,4 @@
</div>
</div>
{% endblock %}
\ No newline at end of file
{% endblock %}
......@@ -52,4 +52,5 @@
</div>
</fieldset>
</form>
{% endblock %}
\ No newline at end of file
{% endblock %}
<!--
Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
......@@ -150,9 +149,4 @@
</div>
</div>
{% endblock %}
......@@ -12,7 +12,7 @@
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' %}
......@@ -109,8 +109,5 @@
</form>
</div> -->
</div>
{% endblock %}
\ No newline at end of file
{% endblock %}
......@@ -86,4 +86,5 @@
</div>
</fieldset>
</form>
{% endblock %}
\ No newline at end of file
{% endblock %}
<!--
Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (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' %}
......@@ -48,4 +63,5 @@
</div>
</fieldset>
</form>
{% endblock %}
\ No newline at end of file
{% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment