panels package¶
Subpackages¶
Submodules¶
panels.admin module¶
panels.apps module¶
panels.connectors module¶
-
class
panels.connectors.ValueConnector¶ Bases:
objectThis class defines methods to communicate the configurations for the displays with data from the alarm collection
-
classmethod
get_antennas_to_pad_values()¶ Return a dictionary with the antennas to pad associations from the related IASValue in the values_collection
-
classmethod
panels.interfaces module¶
-
class
panels.interfaces.IPanels¶ Bases:
objectThis class defines the methods that the Panels app provides to be used by other apps
-
classmethod
get_alarm_ids_of_alarm_configs()¶ Returns a list with the ids (alarm_id) of all the AlarmConfigs
- Returns:
- (list): the list of alarm ids
-
classmethod
get_alarms_views_dict_of_alarm_configs()¶ Returns a dict with the names of the views related to an alarm from all the AlarmConfigs
- Returns:
- (dict): dictionary of views names with alarm_ids as keys
-
classmethod
panels.models module¶
-
class
panels.models.AlarmConfig(config={})¶ Bases:
objectClass that defines an AlarmConfig
-
has_placemark()¶
-
has_view()¶
-
objects= <panels.models.AlarmConfigManager object>¶
-
to_dict()¶
-
-
class
panels.models.AlarmConfigManager¶ Bases:
objectManager to handle AlarmConfigs
-
all()¶ Returns a list with instances for the configurations with the original data provided in the configuration files
-
get_file_configuration_data(key, update_placemark_values={})¶ Returns a python object based on the configuration data provided in a configuration file which can be updated with new values for the placemarks
- Args:
- key (string): file key update_placemark_values (dict): dictionary with new values for the placemarks
-
get_file_configurations(key, update_placemark_values={})¶ Returns a list with instances for the configurations based on the data provided in a configuration file which can be updated with new values for the placemarks
- Args:
- key (string): file key update_placemark_values (dict): dictionary with new values for the placemarks
-
-
class
panels.models.File(key, url)¶ Bases:
objectClass to manage the information about local files with the configuration of the alarms display
-
get_configuration_data(update_placemark_values={})¶ Returns a Python object with data from the json content of the file and required updates for the configuration
-
get_configurations(update_placemark_values={})¶ Returns a list of instances for all the configurations recognized in the file
-
get_content_data()¶ Returns a Python object with data from the json content of the file
-
get_full_url()¶ Return the full url of the file
-
get_json()¶
-
is_config_file()¶
-
key= None¶ Key to identify the File on the client side
-
objects= <panels.models.FileManager object>¶
-
to_dict()¶ Return the file as a dictionary
-
url= None¶ URL with the location of the File
-
-
class
panels.models.FileManager¶ Bases:
objectManager to handle files
-
all()¶ Return a list with instances for each available file
-
all_config_files()¶ Return a list with instances for configuration files
-
basenames()¶ Return a list with the basename of the files without the .json extension
-
get_instance_for_localfile(file_basename)¶ Return an instance for a file, according to a requested basename, only if the file exists in the folder
-
-
panels.models.PERMISSIONS= ('add', 'change', 'delete', 'view')¶ Models Permissions
-
class
panels.models.Placemark(*args, **kwargs)¶ Bases:
django.db.models.base.ModelElements to be displayed in the graphical components (maps, floor plans, etc.)
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
description¶ Brief description of the placemark
-
group¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
group_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
static
has_create_permission(request)¶
-
static
has_read_permission(request)¶
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
name¶ ID of the placemark
-
objects= <django.db.models.manager.Manager object>¶
-
type¶ Type of the placemark
-
type_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
panels.models.PlacemarkGroup(*args, **kwargs)¶ Bases:
django.db.models.base.ModelGroups of position marks, used to refer to layers of related position marks that interact with each other
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
description¶ Brief description of the group
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
name¶ Name of the group
-
objects= <django.db.models.manager.Manager object>¶
-
placemarks¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
exception
-
class
panels.models.PlacemarkType(*args, **kwargs)¶ Bases:
django.db.models.base.ModelType of placemark
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
name¶ Name of the type
-
objects= <django.db.models.manager.Manager object>¶
-
placemarks¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
exception
panels.serializers module¶
-
class
panels.serializers.PlacemarkSerializer(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)¶ Bases:
rest_framework.serializers.ModelSerializerSerializer to map the Model instance into JSON format.
-
class
Meta¶ Bases:
objectMeta class to map serializer’s fields with the model fields.
-
fields= '__all__'¶
-
model¶ alias of
panels.models.Placemark
-
-
class
panels.urls module¶
panels.views module¶
-
class
panels.views.AlarmConfigViewSet(**kwargs)¶ Bases:
rest_framework.viewsets.ViewSet-
authentication_classes= (<class 'rest_framework.authentication.TokenAuthentication'>, <class 'rest_framework.authentication.SessionAuthentication'>)¶
-
basename= None¶
-
detail= None¶
-
get_json(request)¶
-
list(request, format=None)¶
-
permission_classes= (<class 'rest_framework.permissions.IsAuthenticated'>,)¶
-
suffix= None¶
-
-
class
panels.views.FileViewSet(**kwargs)¶ Bases:
rest_framework.viewsets.ViewSet-
authentication_classes= (<class 'rest_framework.authentication.TokenAuthentication'>, <class 'rest_framework.authentication.SessionAuthentication'>)¶
-
basename= None¶
-
detail= None¶
-
get_json(request)¶
-
list(request, format=None)¶
-
permission_classes= (<class 'rest_framework.permissions.IsAuthenticated'>,)¶
-
suffix= None¶
-
-
class
panels.views.PlacemarkViewSet(**kwargs)¶ Bases:
rest_framework.viewsets.ModelViewSetList, Create, Retrieve, Update and Destroy Files.
-
basename= None¶
-
detail= None¶
-
groups= <QuerySet [<PlacemarkGroup: PlacemarkGroup object (1)>, <PlacemarkGroup: PlacemarkGroup object (2)>, <PlacemarkGroup: PlacemarkGroup object (3)>, <PlacemarkGroup: PlacemarkGroup object (4)>]>¶
-
pads_by_group(request)¶ Retrieve the list of pads and their associated antenna by group
-
permission_classes= (<class 'dry_rest_permissions.generics.DRYPermissions'>,)¶
-
queryset= <QuerySet [<Placemark: Placemark object (1)>, <Placemark: Placemark object (2)>, <Placemark: Placemark object (3)>, <Placemark: Placemark object (4)>, <Placemark: Placemark object (5)>, <Placemark: Placemark object (6)>, <Placemark: Placemark object (7)>, <Placemark: Placemark object (8)>, <Placemark: Placemark object (9)>, <Placemark: Placemark object (10)>, <Placemark: Placemark object (11)>, <Placemark: Placemark object (12)>, <Placemark: Placemark object (13)>, <Placemark: Placemark object (14)>, <Placemark: Placemark object (15)>, <Placemark: Placemark object (16)>, <Placemark: Placemark object (17)>, <Placemark: Placemark object (18)>, <Placemark: Placemark object (19)>, <Placemark: Placemark object (20)>, '...(remaining elements truncated)...']>¶
-
serializer_class¶
-
suffix= None¶
-