Schema: Mapview =============== Contains -------- MapView: User generated Mapviews """ from hfos.schemata.defaultform import lookup_field, editbuttons from hfos.schemata.base import base_object MapViewSchema = base_object('mapview', roles_read=['crew'], roles_write=['navigator', 'crew'], roles_create=['navigator', 'crew'], roles_list=['crew']) MapViewSchema['properties'].update({ 'name': { 'type': 'string', 'minLength': 1, 'title': 'Name', 'description': 'Name of view' }, 'color': { 'type': 'string', 'title': 'View Color', 'format': 'color', 'description': 'This views color indicator'
Schema: User ============ Account credentials and administrativa Contains -------- User: Useraccount object """ from hfos.schemata.defaultform import noform from hfos.schemata.base import base_object UserSchema = base_object('user', roles_list=['crew']) UserSchema['properties'].update({ 'passhash': { 'type': 'string' }, 'roles': { 'type': 'array', 'items': { 'type': 'string' }, 'default': ['crew'] } })
""" Schema: Taskgrid ================= Contains -------- Taskgrid: Taskgrid config to store gridster settings """ from hfos.schemata.defaultform import * from hfos.schemata.base import base_object TaskGridConfigSchema = base_object('taskgridconfig', all_roles='crew') TaskGridConfigSchema['properties'].update({ 'locked': {'type': 'boolean', 'title': 'Locked Taskgrid', 'description': 'Determines whether the Taskgrid should ' 'be locked against changes.'}, 'shared': {'type': 'boolean', 'title': 'Shared Taskgrid', 'description': 'Share Taskgrid with the crew'}, 'description': {'type': 'string', 'format': 'html', 'title': 'Taskgrid description', 'description': 'Taskgrid description'}, 'cards': { 'type': 'array', 'default': [], 'items': { 'type': 'object',
Route: A configurable group of predefined layers See also -------- Provisions """ from hfos.schemata.defaultform import editbuttons from hfos.schemata.base import base_object RouteSchema = base_object('route', roles_read=['crew'], roles_write=['navigator'], roles_create=['navigator'], roles_list=['crew']) RouteSchema['properties'].update({ 'color': { 'type': 'string', 'title': 'Group Color', 'format': 'color', 'description': 'This group' 's color indicator' }, 'notes': { 'type': 'string', 'format': 'html', 'title': 'User notes',
""" Schema: Log Message ============== Contains -------- LogMessage: LogMessage to store messages in rooms and private logs """ from hfos.schemata.defaultform import readonlyform from hfos.schemata.base import base_object LogMessageSchema = base_object('logmessage', no_perms=True) LogMessageSchema.update({'roles_create': 'SYSTEM'}) LogMessageSchema['properties'].update({ 'timestamp': {'type': 'number', 'title': 'Timestamp', 'description': 'Log Message timestamp (\xc2Sec)'}, 'emitter': {'type': 'string', 'minLength': 1, 'title': 'Emitter', 'description': 'Log Message emitter name'}, 'sourceloc': {'type': 'string', 'minLength': 1, 'title': 'Source ' 'location', 'description': 'Log Message source code location'}, 'level': {'type': 'string', 'minLength': 1, 'title': 'Level', 'description': 'Log Message elevation level'}, 'content': {'type': 'string', 'minLength': 1, 'title': 'Content', 'description': 'Log Message content'}
-------- Shareable object for common item time sharing management See also -------- Provisions """ from hfos.schemata.base import base_object from hfos.schemata.defaultform import editbuttons ShareableSchema = base_object('shareable', all_roles='crew') ShareableSchema['properties'].update({ 'creatoruuid': { 'type': 'string', 'title': 'Creator', 'description': 'Creator of Shareable' }, 'created': { 'type': 'string', 'format': 'datetimepicker', 'title': 'Creation time', 'description': 'Time of object creation' }, 'priority': { 'type': 'number',
-------- Geoobject: General geoobject configuration data encapsulating geojson See also -------- Provisions """ from hfos.schemata.defaultform import defaultform from hfos.schemata.base import base_object GeoObjectSchema = base_object('geoobject', all_roles='crew') GeoObjectSchema['properties'].update({ 'layer': { 'pattern': '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[' 'a-fA-F0-9]{4}-[a-fA-F0-9]{12}$', 'type': 'string', 'title': 'Unique GeoObject Layer ID' }, 'color': { 'type': 'string', 'title': 'Background Color', # 'format': 'color', 'description': 'GeoObject background color indicator', 'default': '#4384BF' },
""" Schema: Chat Channel ==================== Contains -------- ChatChannel: Definitions of chat rooms """ from hfos.schemata.defaultform import editbuttons from hfos.schemata.base import base_object ChannelSchema = base_object('chatchannel', all_roles='crew') ChannelSchema['properties'].update({ 'users': { 'type': 'array', 'default': [], 'items': { 'pattern': '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{' '4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$', 'type': 'string', 'title': 'Unique User ID of participant' } }, 'topic': { 'type': 'string' },
""" Schema: Automatrule =================== Contains -------- AutomatRule: Structure to store automat rule configurations """ from hfos.schemata.defaultform import * from hfos.schemata.base import base_object AutomatRuleSchema = base_object('automatrule', all_roles='crew') AutomatRuleSchema['properties'].update({ 'output': { 'type': 'object', 'properties': { 'event': { 'type': 'object', 'properties': { 'destination': { 'type': 'string', 'title': 'Destination', 'description': 'Destination of output event', 'default': '' },
-------- Book reference entry for the library. See also -------- Provisions """ from hfos.schemata.defaultform import editbuttons from hfos.schemata.base import base_object BookSchema = base_object('book', all_roles='crew') BookSchema['properties'].update({ 'authors': { 'type': 'array', 'default': [], 'items': { 'type': 'string', 'title': 'Authors', 'description': 'Authors of Book' }, 'minItems': 0 }, 'publisher': { 'type': 'string', 'title': 'Publisher',
""" Schema: Chat Message ============== Contains -------- ChatMessage: ChatMessage to store messages in rooms and private chats """ from hfos.schemata.defaultform import defaultform from hfos.schemata.base import base_object ChatMessageSchema = base_object('chatmessage', all_roles='crew') ChatMessageSchema['properties'].update({ 'timestamp': { 'type': 'number', 'title': 'Timestamp', 'format': 'datetimepicker', 'description': 'Message timestamp' }, 'recipient': { 'pattern': '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{' '4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$', 'type': 'string', 'title': 'Unique User ID of recipient' }, 'sender': {
""" Schema: Log Message ============== Contains -------- LogMessage: LogMessage to store messages in rooms and private logs """ from hfos.schemata.defaultform import readonlyform from hfos.schemata.base import base_object LogMessageSchema = base_object('logmessage', no_perms=True) LogMessageSchema.update({'roles_create': 'SYSTEM'}) LogMessageSchema['properties'].update({ 'timestamp': { 'type': 'number', 'title': 'Timestamp', 'description': 'Log Message timestamp (\xc2Sec)' }, 'emitter': { 'type': 'string', 'minLength': 1, 'title': 'Emitter', 'description': 'Log Message emitter name' },
Schema: Countable ================= Contains -------- Generic countable thing definition """ from hfos.schemata.defaultform import editbuttons from hfos.schemata.base import base_object CountableSchema = base_object('countable', all_roles='crew') CountableSchema['properties'].update({ 'notes': { 'type': 'string', 'format': 'html', 'title': 'User notes', 'description': 'Entry notes' }, 'amount': { 'type': 'number', 'title': 'Amount counted', 'default': 0 } })
""" Schema: Automatrule =================== Contains -------- AutomatRule: Structure to store automat rule configurations """ from hfos.schemata.defaultform import * from hfos.schemata.base import base_object AutomatRuleSchema = base_object('automatrule', all_roles='crew') AutomatRuleSchema['properties'].update({ 'output': { 'type': 'object', 'properties': { 'event': { 'type': 'object', 'properties': { 'destination': { 'type': 'string', 'title': 'Destination', 'description': 'Destination of output event', 'default': '' }, 'name': {
} } } }, 'duration': { 'type': 'number', 'title': 'Duration', 'description': 'Timeout in seconds to swith to the next ' 'screen' } } } ClientconfigSchema = base_object( 'client', roles_list=['crew'], roles_create=['crew'], ) ClientconfigSchema['properties'].update({ 'autologin': { 'type': 'boolean', 'title': 'Automatic login', 'description': 'Automatically logs in this client.' }, 'active': { 'type': 'boolean', 'title': 'Active client', 'description': 'Indicates whether client is currently ' 'active.' },
Schema: WikiPage ================ Contains -------- WikiPage: WikiPage to store collaborative data """ from hfos.schemata.defaultform import defaultform, editbuttons from copy import deepcopy from hfos.schemata.base import base_object WikiPageSchema = base_object('wikipage', all_roles='crew') WikiPageSchema['properties'].update({ 'title': {'type': 'string', 'title': 'Page Title', 'description': 'Short title'}, 'html': {'type': 'string', 'format': 'html', 'title': 'Page content', 'description': 'Content'}, # 'text': {'type': 'string', 'title': 'Raw text', # 'description': 'Unrendered raw text'}, # 'history': { # 'type': 'array', # 'default': [], # 'items': { # 'type': 'string', # 'title': 'Snapshot content', # 'description': 'Snapshot data'
""" Schema: Profile =============== Contains -------- Profile: Userprofile with general flags and fields """ from hfos.schemata.defaultform import savebutton from hfos.schemata.base import base_object ProfileSchema = base_object('profile', roles_create='crew') ProfileSchema['properties'].update({ 'name': {'type': 'string', 'title': 'Name', 'description': 'Profile name'}, "userdata": { "id": "#profile.userdata", "type": "object", "properties": { 'name': {'type': 'string', 'minLength': 1, 'title': 'Name', 'description': 'First name'}, 'familyname': {'type': 'string', 'minLength': 1, 'title': 'Family Name', 'description': 'Last/Family name'}, 'nick': {'type': 'string', 'title': 'nickname', 'description': 'Nick/calling name'},
Schema: Crewconfig ================== Contains -------- crewconfig: Structure to store information about crews, for timetable and other useful features """ from hfos.schemata.defaultform import * from hfos.schemata.base import base_object CrewSchema = base_object('crewconfig') CrewSchema['properties'].update({ 'locked': { 'type': 'boolean', 'title': 'Locked Crew', 'description': 'Determines whether the Crew should ' 'be locked against changes.' }, 'shared': { 'type': 'boolean', 'title': 'Shared Crew', 'description': 'Share Crew with the crew'
Task reference entry for the todo management See also -------- Provisions """ from hfos.schemata.defaultform import editbuttons from hfos.schemata.tag import TagData, TagForm from hfos.schemata.base import base_object TaskSchema = base_object('task', all_roles='crew') TaskSchema['properties'].update({ 'project': { 'pattern': '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[' 'a-fA-F0-9]{4}-[a-fA-F0-9]{12}$', 'type': 'string', 'title': 'Project which this task is part of'}, 'creator': {'type': 'string', 'title': 'Creator', 'description': 'Creator of Task'}, 'assignee': {'type': 'string', 'title': 'Assignee', 'description': 'Assigned user'}, 'taskgroup': { 'pattern': '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[' 'a-fA-F0-9]{4}-[a-fA-F0-9]{12}$', 'type': 'string',
""" Schema: Radio ============== Contains -------- Radio: Radio configurations to store onboard radio system data """ from hfos.schemata.defaultform import editbuttons from hfos.schemata.base import base_object RadioConfigSchema = base_object('radio') RadioConfigSchema['properties'].update({ 'model': { 'type': 'string', 'minLength': 1, 'title': 'Model', 'description': 'Radio model' }, 'manufacturer': { 'type': 'string', 'minLength': 1, 'title': 'Manufacturer', 'description': 'Radio manufacturer' }, 'radiotype': {
Schema: System State ==================== System state objects Contains -------- SystemState: systemstate object """ from hfos.schemata.defaultform import defaultform from hfos.schemata.base import base_object SystemStateSchema = base_object('systemstate', roles_write='admin', roles_create='admin', roles_list='crew', roles_read='crew') SystemStateSchema['properties'].update({ }) SystemStateOptions = { } SystemState = {'schema': SystemStateSchema, 'form': defaultform, 'options': SystemStateOptions}
Schema: Chat Lastlog ==================== Contains -------- ChatLastlog: Lastlog to store lastlogs for users """ from hfos.schemata.defaultform import noform from hfos.schemata.base import base_object ChatLastlogSchema = base_object('chatlastlog', has_owner=True, all_roles='owner') ChatLastlogSchema['properties'].update({ 'channels': { 'type': 'object', } # 'items': { # 'type': 'object', # 'properties': { # 'timestamp': { # 'type': 'string', 'title': 'Timestamp', # 'format': 'datetimepicker', # 'description': 'Lastlog timestamp' # }, # 'channel': {
Layer: General and renderer specific layer configuration data. See also -------- Provisions """ from hfos.schemata.defaultform import defaultform from hfos.schemata.base import base_object LayerSchema = base_object('layer', roles_read=['crew'], roles_write=['navigator'], roles_create=['navigator'], roles_list=['crew']) LayerSchema['properties'].update({ 'color': { 'type': 'string', 'title': 'View Color', 'format': 'color', 'description': 'This views color indicator' }, 'notes': { 'type': 'string', 'format': 'html', 'title': 'User notes', 'description': 'Custom user notes'
""" Schema: Profile =============== Contains -------- Profile: Userprofile with general flags and fields """ from hfos.schemata.defaultform import savebutton from hfos.schemata.base import base_object ProfileSchema = base_object('profile', roles_create='crew') ProfileSchema['properties'].update({ 'name': { 'type': 'string', 'title': 'Name', 'description': 'Profile name' }, "userdata": { "id": "#profile.userdata", "type": "object", "properties": { 'name': { 'type': 'string', 'minLength': 1, 'title': 'Name',
__author__ = "Heiko 'riot' Weinen" __license__ = "GPLv3" """ Schema: Vessel ============== Contains -------- Vessel: Vesselprofile to store Vessel specific settings """ from hfos.schemata.base import base_object VesselSchema = base_object('vessel') VesselSchema['properties'].update({ 'mapviewuuid': { 'pattern': '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[' 'a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[' 'a-fA-F0-9]{12}$', 'type': 'string', 'title': 'Unique Vessel Moving Mapview ID' }, 'description': { 'type': 'string', 'format': 'html',
Schema: MeshNode ============ Contains -------- MeshNode reference entry for the mesh to set up pump start times and durations as well as conditions.. """ from hfos.schemata.defaultform import savebutton from hfos.schemata.base import base_object MeshNodeSchema = base_object('meshnode') MeshNodeSchema['properties'].update({ 'notes': { 'type': 'string', 'format': 'html', 'title': 'User notes', 'description': 'Entry notes' }, 'hub': { 'type': 'boolean', 'title': 'Hub node', 'description': 'This node has data about other nodes' }, 'address': { 'type': 'string',
Systemwide Tag definition See also -------- Provisions """ from hfos.schemata.defaultform import editbuttons from hfos.schemata.base import base_object # Basic Tag definitions TagSchema = base_object('tag', all_roles='crew') TagSchema['properties'].update({ 'color': {'type': 'string', 'format': 'color', 'title': 'Color of tag', 'description': 'Background color of tag'}, 'notes': {'type': 'string', 'format': 'html', 'title': 'User notes', 'description': 'Descriptive Tag notes'}, 'references': { 'type': 'array', 'default': [], 'items': { 'type': 'object', 'properties': { 'schema': {'type': 'string', 'minLength': 1, 'title': 'Schema reference', 'description': 'HIDDEN'},
-------- Project reference entry for the todo management See also -------- Provisions """ from hfos.schemata.defaultform import editbuttons from hfos.schemata.base import base_object ProjectSchema = base_object('project', all_roles='crew') ProjectSchema['properties'].update({ 'creatoruuid': { 'type': 'string', 'title': 'Creator', 'description': 'Creator of Project' }, 'priority': { 'type': 'number', 'title': 'Priority', 'description': '1 is Highest priority', 'minimum': 1 }, 'tags': { 'type': 'string',
""" Schema: System ============== Contains -------- System: Global systemwide settings """ from hfos.schemata.defaultform import savebutton, lookup_field from hfos.schemata.base import base_object SystemconfigSchema = base_object('systemconfig') SystemconfigSchema['properties'].update({ 'active': { 'type': 'boolean', 'title': 'Active configuration', 'description': 'Determines which configuration will be used. ' 'Only one can be active.', 'default': False }, 'salt': { 'type': 'string', 'minLength': 1, 'title': 'Salt', 'description': 'System hashing salt' }, 'description': { 'type': 'string', 'format': 'html', 'title': 'Description',
'name': {'type': 'string', 'title': 'Argument Name' }, 'value': {'type': 'string', 'title': 'Argument Value' } } } }, 'duration': {'type': 'number', 'title': 'Duration', 'description': 'Timeout in seconds to swith to the next ' 'screen'} } } ClientconfigSchema = base_object( 'client', roles_list=['crew'], roles_create=['crew'], ) ClientconfigSchema['properties'].update({ 'autologin': { 'type': 'boolean', 'title': 'Automatic login', 'description': 'Automatically logs in this client.' }, 'active': { 'type': 'boolean', 'title': 'Active client', 'description': 'Indicates whether client is currently ' 'active.' }, 'locked': { 'type': 'boolean', 'title': 'Locked client',
""" Schema: Logbookconfig ===================== Contains -------- Logbook: Structure to store logbook configurations """ from hfos.schemata.defaultform import * from hfos.schemata.base import base_object LogbookSchema = base_object('logbookconfig', all_roles='crew') LogbookSchema['properties'].update({ 'locked': { 'type': 'boolean', 'title': 'Locked Logbook', 'description': 'Determines whether the Logbook should ' 'be locked against changes.' }, 'shared': { 'type': 'boolean', 'title': 'Shared Logbook', 'description': 'Share Logbook with the crew' }, 'description': { 'type': 'string', 'format': 'html', 'title': 'Logbook description', 'description': 'Logbook description'
Schema: User ============ Account credentials and administrativa Contains -------- User: Useraccount object """ from hfos.schemata.defaultform import noform from hfos.schemata.base import base_object UserSchema = base_object('user', roles_list=['crew']) UserSchema['properties'].update({ 'passhash': { 'type': 'string' }, 'roles': { 'type': 'array', 'items': { 'type': 'string' }, 'default': ['crew'] } }) UserOptions = {'hidden': ['passhash', 'roles']}
================== Contains -------- enrollmentconfig: Structure to store information about enrollments, for timetable and other useful features """ from hfos.schemata.defaultform import * from hfos.schemata.base import base_object EnrollmentSchema = base_object('enrollment') EnrollmentSchema['properties'].update({ 'email': { 'type': 'string', 'title': 'Address', 'description': 'Enrollment email address' }, 'status': { 'type': 'string', 'enum': ['Open', 'Pending', 'Denied', 'Accepted'], 'title': 'Enrollment description', 'description': 'Enrollment description' }, 'method': { 'type': 'string',
=================== Contains -------- Spreadsheet: Spreadsheet definitions See also -------- Provisions """ from hfos.schemata.defaultform import defaultform from hfos.schemata.base import base_object SpreadsheetSchema = base_object('spreadsheet', all_roles='crew') SpreadsheetSchema['properties'].update({ 'notes': { 'type': 'string', 'format': 'html', 'title': 'User notes', 'description': 'Custom user notes' }, }) Spreadsheet = {'schema': SpreadsheetSchema, 'form': defaultform}
__license__ = "GPLv3" """ Schema: SensorData ==================== Contains -------- SensorData: """ from hfos.schemata.base import base_object SensorDataSchema = base_object('sensorData', has_owner=False, has_uuid=False, all_roles='crew') SensorDataSchema['properties'].update({ 'value': { 'title': 'Value', 'description': 'Sensordata Value' }, 'timestamp': { 'type': 'number', 'title': 'Timestamp', 'description': 'Log Message timestamp (microSec)' }, 'type': { 'type': 'string' }
Schema: Spreadsheet =================== Contains -------- Spreadsheet: Spreadsheet definitions See also -------- Provisions """ from hfos.schemata.defaultform import defaultform from hfos.schemata.base import base_object SpreadsheetSchema = base_object('spreadsheet', all_roles='crew') SpreadsheetSchema['properties'].update({ 'notes': { 'type': 'string', 'format': 'html', 'title': 'User notes', 'description': 'Custom user notes' }, }) Spreadsheet = {'schema': SpreadsheetSchema, 'form': defaultform}