shyft.dashboard.apps.dtss_viewer.dtsc_helper_functions

Functions

check_dtss_url(host_port)

This function evaluates if the url belogns to a running dts server :param host_port: url of dtss like localhost:20000

detect_unit_of(url)

Just a helper to illustrate multiple axis based on unit

find_all_ts_names_and_url(*, host_port, ...)

This function returns a list of time series names and urls for each Time Series in the container of the dtss at the ts_url.

try_dtss_connection(host_port)

This function evaluates if the url belogs to a running dts server :param host_port: url of dtss like localhost:20000

Classes

DtssTsAdapter(dtss_url, ts_url[, unit])

A very primitive synchronous dtss adapter to keep it simple

shyft.dashboard.apps.dtss_viewer.dtsc_helper_functions.check_dtss_url(host_port)[source]

This function evaluates if the url belogns to a running dts server :param host_port: url of dtss like localhost:20000

Return type:

True if dtss reachable with given url, False if not

Parameters:

host_port (str)

shyft.dashboard.apps.dtss_viewer.dtsc_helper_functions.try_dtss_connection(host_port)[source]

This function evaluates if the url belogs to a running dts server :param host_port: url of dtss like localhost:20000

Return type:

True if dtss reachable with given url

Raises:

RuntimeError if no dtss can be found under given url

Parameters:

host_port (str)

shyft.dashboard.apps.dtss_viewer.dtsc_helper_functions.detect_unit_of(url)[source]

Just a helper to illustrate multiple axis based on unit

Parameters:

url (str)

Return type:

str

shyft.dashboard.apps.dtss_viewer.dtsc_helper_functions.find_all_ts_names_and_url(*, host_port, container, pattern)[source]

This function returns a list of time series names and urls for each Time Series in the container of the dtss at the ts_url.

Parameters:
  • host_port (str) – host_port to dtss

  • container (str) – dtss data container to search in

  • pattern (str) – what time-series to match, regular expression

Return type:

List of Tuple with (ts_url, name) for each ts in the container

Raises:

RuntimeError if no dtss can be found under given url

class shyft.dashboard.apps.dtss_viewer.dtsc_helper_functions.DtssTsAdapter(dtss_url, ts_url, unit='')[source]

Bases: TsAdapter

A very primitive synchronous dtss adapter to keep it simple

Parameters:
  • dtss_url (str)

  • ts_url (str)

  • unit (str)

__init__(dtss_url, ts_url, unit='')[source]
Parameters:
  • dtss_url (str)

  • ts_url (str)

  • unit (str)

Return type:

None

__call__(*, time_axis, unit)[source]

Call self as a function.

Parameters:
  • time_axis (TimeAxis)

  • unit (str | Unit)

Return type:

Quantity[TsVector]