Loading src/webui/service/main/routes.py +2 −5 Original line number Diff line number Diff line Loading @@ -58,11 +58,11 @@ def home(): contexts : ContextList = context_client.ListContexts(Empty()) for context_ in contexts.contexts: context_uuid : str = context_.context_id.context_uuid.uuid #context_uuid : str = context_.context_id.context_uuid.uuid context_name : str = context_.name topologies : TopologyList = context_client.ListTopologies(context_.context_id) for topology_ in topologies.topologies: topology_uuid : str = topology_.topology_id.topology_uuid.uuid #topology_uuid : str = topology_.topology_id.topology_uuid.uuid topology_name : str = topology_.name raw_values = context_name, topology_name b64_values = [base64.b64encode(v.encode('utf-8')).decode('utf-8') for v in raw_values] Loading @@ -75,9 +75,7 @@ def home(): context_topology_uuid = context_topology_form.context_topology.data if len(context_topology_uuid) > 0: b64_values = context_topology_uuid.split(',') LOGGER.warning('b64_values={:s}'.format(str(b64_values))) raw_values = [base64.b64decode(v.encode('utf-8')).decode('utf-8') for v in b64_values] LOGGER.warning('raw_values={:s}'.format(str(raw_values))) context_name, topology_name = raw_values #session.clear() session['context_topology_uuid'] = context_topology_uuid Loading @@ -85,7 +83,6 @@ def home(): #session['context_name'] = context_name session['topology_uuid'] = topology_name #session['topology_name'] = topology_name LOGGER.warning('session.items={:s}'.format(str(session.items()))) MSG = f'Context({context_name})/Topology({topology_name}) successfully selected.' flash(MSG, 'success') return redirect(url_for('main.home')) Loading Loading
src/webui/service/main/routes.py +2 −5 Original line number Diff line number Diff line Loading @@ -58,11 +58,11 @@ def home(): contexts : ContextList = context_client.ListContexts(Empty()) for context_ in contexts.contexts: context_uuid : str = context_.context_id.context_uuid.uuid #context_uuid : str = context_.context_id.context_uuid.uuid context_name : str = context_.name topologies : TopologyList = context_client.ListTopologies(context_.context_id) for topology_ in topologies.topologies: topology_uuid : str = topology_.topology_id.topology_uuid.uuid #topology_uuid : str = topology_.topology_id.topology_uuid.uuid topology_name : str = topology_.name raw_values = context_name, topology_name b64_values = [base64.b64encode(v.encode('utf-8')).decode('utf-8') for v in raw_values] Loading @@ -75,9 +75,7 @@ def home(): context_topology_uuid = context_topology_form.context_topology.data if len(context_topology_uuid) > 0: b64_values = context_topology_uuid.split(',') LOGGER.warning('b64_values={:s}'.format(str(b64_values))) raw_values = [base64.b64decode(v.encode('utf-8')).decode('utf-8') for v in b64_values] LOGGER.warning('raw_values={:s}'.format(str(raw_values))) context_name, topology_name = raw_values #session.clear() session['context_topology_uuid'] = context_topology_uuid Loading @@ -85,7 +83,6 @@ def home(): #session['context_name'] = context_name session['topology_uuid'] = topology_name #session['topology_name'] = topology_name LOGGER.warning('session.items={:s}'.format(str(session.items()))) MSG = f'Context({context_name})/Topology({topology_name}) successfully selected.' flash(MSG, 'success') return redirect(url_for('main.home')) Loading