Commit c7ce67d9 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch 'feat/webui' into 'develop'

Multiple small improvements and bug fixes in WebUI

See merge request teraflow-h2020/controller!119
parents 6d7e1f08 8dfb471d
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
#!/bin/bash
# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/)
#
# 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.


PROJECTDIR=`pwd`

cd $PROJECTDIR/src
RCFILE=$PROJECTDIR/coverage/.coveragerc

# Run unitary tests and analyze coverage of code at same time

# Useful flags for pytest:
#-o log_cli=true -o log_file=device.log -o log_file_level=DEBUG

coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \
    device/tests/test_unitary.py
+0 −1
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ from device.service.driver_api.AnyTreeTools import TreeNode, get_subnode, set_su
from .templates import ALL_RESOURCE_KEYS, EMPTY_CONFIG, compose_config, get_filter, parse
from .RetryDecorator import retry


DEBUG_MODE = False
logging.getLogger('ncclient.manager').setLevel(logging.DEBUG if DEBUG_MODE else logging.WARNING)
logging.getLogger('ncclient.transport.ssh').setLevel(logging.DEBUG if DEBUG_MODE else logging.WARNING)
+3 −0
Original line number Diff line number Diff line
@@ -36,3 +36,6 @@ CONTEXT_SERVICE_PORT = int(os.environ.get('CONTEXTSERVICE_SERVICE_PORT_GRPC', 10

DEVICE_SERVICE_ADDRESS = os.environ.get('DEVICESERVICE_SERVICE_HOST', 'deviceservice')
DEVICE_SERVICE_PORT = int(os.environ.get('DEVICESERVICE_SERVICE_PORT_GRPC', 2020))

SERVICE_SERVICE_ADDRESS = os.environ.get('SERVICESERVICE_SERVICE_HOST', 'serviceservice')
SERVICE_SERVICE_PORT = int(os.environ.get('SERVICESERVICE_SERVICE_PORT_GRPC', 3030))
+3 −0
Original line number Diff line number Diff line
@@ -54,6 +54,9 @@ COPY --chown=webui:webui context/client/. context/client
COPY --chown=webui:webui device/__init__.py device/__init__.py
COPY --chown=webui:webui device/proto/. device/proto
COPY --chown=webui:webui device/client/. device/client
COPY --chown=webui:webui service/__init__.py service/__init__.py
COPY --chown=webui:webui service/proto/. service/proto
COPY --chown=webui:webui service/client/. service/client
COPY --chown=webui:webui webui/. webui

# Start webui service
+6 −8
Original line number Diff line number Diff line
@@ -227,12 +227,12 @@
          "current": {
            "selected": true,
            "text": [
              "R1-INF",
              "R3-INF"
              "R1-EMU",
              "R3-EMU"
            ],
            "value": [
              "R1-INF",
              "R3-INF"
              "R1-EMU",
              "R3-EMU"
            ]
          },
          "datasource": null,
@@ -257,12 +257,10 @@
          "current": {
            "selected": true,
            "text": [
              "13/2/0",
              "13/2/1"
              "13/1/2"
            ],
            "value": [
              "13/2/0",
              "13/2/1"
              "13/1/2"
            ]
          },
          "datasource": null,
Loading