""" Schema: Dashboard ================= Contains -------- Dashboard: Dashboard config to store gridster settings """ from isomer.schemata.defaultform import * from isomer.schemata.base import base_object, uuid_object DashboardSchema = base_object('dashboardconfig', all_roles='crew') DashboardSchema['properties'].update({ 'locked': {'type': 'boolean', 'title': 'Locked Dashboard', 'description': 'Determines whether the Dashboard should ' 'be locked against changes.'}, 'refreshrate': {'title': 'Refreshrate', 'type': 'number', 'description': 'General refresh rate of dashboard'}, 'shared': {'type': 'boolean', 'title': 'Shared Dashboard', 'description': 'Share Dashboard with the crew'}, 'description': {'type': 'string', 'format': 'html', 'title': 'Dashboard description', 'description': 'Dashboard description'}, 'cards': { 'type': 'array', 'default': [],
# but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. __author__ = "Heiko 'riot' Weinen" __license__ = "AGPLv3" """ Schema: Spreadsheet =================== Contains -------- Definition of a spreadsheet object to represent EtherCalc documents. """ from isomer.schemata.base import base_object from isomer.schemata.defaultform import defaultform SpreadsheetSchema = base_object('spreadsheet', all_roles='crew') SpreadsheetForm = defaultform Spreadsheet = {'schema': SpreadsheetSchema, 'form': SpreadsheetForm}
-------- Project reference entry for the todo management See also -------- Provisions """ from isomer.schemata.defaultform import editbuttons from isomer.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', 'title': 'Tags', 'description': 'Attached tags' }, 'notes': {
-------- Geoobject: General geoobject configuration data encapsulating geojson See also -------- Provisions """ from isomer.schemata.defaultform import defaultform from isomer.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' }, 'iconcolor': { 'type': 'string', 'title': 'Icon Color', # 'format': 'color', 'description': 'GeoObject icon color indicator', 'default': 'white' }, 'newvar': {'type': 'string', 'title': 'Foobar'},
""" Schema: Controllable ==================== Contains -------- Controllable: Patterns of remote control """ from isomer.schemata.defaultform import defaultform from isomer.schemata.base import base_object ControllableSchema = base_object('controllable') ControllableSchema['properties'].update({ 'description': { 'type': 'string' }, 'type': { 'enum': ['analog', 'digital'] }, 'min': { 'type': 'integer', 'default': 0 }, 'center': { 'type': 'integer', 'default': 127
__author__ = "Heiko 'riot' Weinen" __license__ = "AGPLv3" """ Schema: Vessel ============== Contains -------- Vessel: Vesselprofile to store Vessel specific settings """ from isomer.schemata.base import base_object, uuid_object VesselSchema = base_object('vessel') VesselSchema['properties'].update({ 'mapviewuuid': uuid_object('Unique Vessel Moving Mapview ID'), 'sog': { 'type': 'number', 'title': 'SOG', 'description': 'Speed over ground (kn)' }, 'cog': { 'type': 'number', 'title': 'COG', 'description': 'Course over ground (rel. to true North)' }, 'rot': {
"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":
""" from isomer.schemata.defaultform import ( savebutton, lookup_field, # country_field, # area_field, ) from isomer.schemata.base import base_object, uuid_object, language_field blend_modes = [ "normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "difference", "exclusion", "hue", "saturation", "color", "luminosity" ] 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",
""" Schema: Equipment ================= Contains -------- Equipment specifications """ from isomer.schemata.defaultform import editbuttons from isomer.schemata.base import base_object EquipmentSchema = base_object('equipment', all_roles='crew') StatusEnums = [ 'Okay', 'Not quite right', 'Broken', 'Maintenance', 'Needs attention' ] EquipmentSchema['properties'].update({ 'notes': { 'type': 'string', 'format': 'html', 'title': 'User notes', 'description': 'Entry notes' }, 'status': { 'type': 'string', 'title': 'Status',
""" Schema: region ============== Contains -------- region: combines groups of moderators with region-local locations and other meta data """ from isomer.schemata.defaultform import * from isomer.schemata.base import base_object, uuid_object, geo_coordinate regionSchema = base_object('region', no_additional=True) regionSchema['properties'].update({ 'title': {'type': 'string'}, 'description': {'type': 'string'}, 'zoom': {'type': 'integer', 'max': 16, 'min': 5}, 'coordinate': geo_coordinate(), 'moderators': { 'type': 'array', 'items': uuid_object('user'), }, 'active': {'type': 'boolean'}, 'hide': {'type': 'boolean'}, 'hide_message': {'type': 'string'}, 'slug': {'type': 'string'},
""" Schema: Case ============ Contains -------- Case - against IUU fishery """ from isomer.schemata.defaultform import editbuttons, lookup_field from isomer.schemata.base import base_object, uuid_object caseSchema = base_object('case', all_roles='crew') caseSchema['properties'].update({ 'report': uuid_object(title='Report', description='Associated report'), 'reporter': uuid_object(title='Reporter', description='Reporting user'), 'vessel': uuid_object(title='Vessel', description='Select a Vessel'), 'evidence': { 'type': 'array', 'items': { 'type': 'object', 'properties': { 'evidence_type': { 'type': 'string', 'enum': ['photo', 'video', 'ais-track', 'satellite-image', 'witness-report', 'inspection'] }, #'details': {
-------- Book reference entry for the library. See also -------- Provisions """ from isomer.schemata.defaultform import editbuttons from isomer.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: Mapview =============== Contains -------- MapView: User generated Mapviews """ from isomer.schemata.defaultform import lookup_field, editbuttons from isomer.schemata.base import base_object, uuid_object MapViewSchema = base_object('mapview', roles_read=['admin', 'crew'], roles_write=['admin', 'navigator', 'crew'], roles_create=['admin', 'navigator', 'crew'], roles_list=['admin', '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'
Task reference entry for the todo management See also -------- Provisions """ from isomer.schemata.defaultform import editbuttons, section, lookup_field from isomer.schemata.tag import TagData, TagForm from isomer.schemata.base import base_object, uuid_object TaskSchema = base_object('task', all_roles='crew') TaskSchema['properties'].update({ 'project': uuid_object('Project which this task is part of', 'Select a project'), 'creator': uuid_object('Creator', 'Select a creator'), 'assignee': uuid_object('Assignee', 'Select an assignee'), 'taskgroup': uuid_object(title='Task group', description='Group, this task belongs to'), 'tags': TagData, 'alert_time': { 'type': 'string', 'title': 'Alert', 'format': 'datetimepicker', 'description': 'Alert time' }, 'due_time': { 'type': 'string', 'title': 'Due', 'format': 'datetimepicker',
Calendar object for grouping of Events See also -------- Provisions """ from isomer.schemata.base import base_object from isomer.schemata.defaultform import editbuttons from isomer.schemata.geometry import GeometrySchema CalendarSchema = base_object('calendar', all_roles='crew') CalendarSchema['properties'].update({ "category": { "type": "string" }, "description": { "type": "string" }, "color": { "type": "string", "format": "color" }, "tz": { 'type': "string" },
=============== Contains -------- SessionType: Generic object to store data about lectures, lightning talks etc. """ from isomer.schemata.defaultform import editbuttons, section from isomer.schemata.base import base_object SessionTypeSchema = base_object('sessiontype', roles_write=['chair'], roles_create=['chair'], roles_read=['crew'], roles_list=['crew']) SessionTypeSchema['properties'].update({ 'name': { 'type': 'string', 'title': 'Title', 'description': 'Title of SessionType' }, 'open': { 'type': 'boolean', 'title': 'Open', 'description': 'Allow SessionType type registration' }, 'length': {
""" Schema: Achievement ================= Contains -------- Generic countable thing definition """ from isomer.schemata.base import base_object AchievementSchema = base_object('achievement', all_roles='crew') AchievementSchema['properties'].update({ 'notes': { 'type': 'string', 'format': 'html', 'title': 'User notes', 'description': 'Entry notes' }, }) AchievementForm = [ { 'type': 'section', 'htmlClass': 'row', 'items': [ { 'type': 'section',
Schema: WikiPage ================ Contains -------- WikiPage: WikiPage to store collaborative data """ from isomer.schemata.defaultform import defaultform, editbuttons from copy import deepcopy from isomer.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'},
""" Schema: Radio ============= Contains -------- Radio: Radio configurations to store onboard radio system data """ from isomer.schemata.defaultform import editbuttons from isomer.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': {
-------- Shareable object for common item time sharing management See also -------- Provisions """ from isomer.schemata.base import base_object from isomer.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',
Schema: Controller ================== Contains -------- Controller: Remote control input device to controllable mapping """ from isomer.schemata.defaultform import defaultform from isomer.schemata.base import base_object, uuid_object ControllerSchema = base_object('controller') ControllerSchema['properties'].update({ 'description': { 'type': 'string' }, 'mappings': { 'type': 'array', 'items': { 'type': 'object', 'properties': { 'controltype': { 'enum': ['analog', 'digital'] }, 'controlaxis': { 'type': 'integer'
""" Schema: Chat Message ==================== Contains -------- ChatMessage: ChatMessage to store messages in rooms and private chats """ from isomer.schemata.defaultform import defaultform from isomer.schemata.base import base_object, uuid_object ChatMessageSchema = base_object('chatmessage', all_roles='crew') ChatMessageSchema['properties'].update({ 'timestamp': { 'type': 'string', 'title': 'Timestamp', 'format': 'datetimepicker', 'description': 'Message timestamp' }, 'recipient': uuid_object('Unique User ID of recipient'), 'sender': uuid_object('Unique User ID of sender'), 'content': { 'type': 'string', 'minLength': 1,
Route: A configurable group of predefined layers See also -------- Provisions """ from isomer.schemata.defaultform import editbuttons from isomer.schemata.base import base_object RouteSchema = base_object('route', roles_read=['admin', 'crew'], roles_write=['admin', 'navigator'], roles_create=['admin', 'navigator'], roles_list=['admin', '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',
=============== Contains -------- Session: Generic object to store data about lectures, lightning talks etc. """ from isomer.schemata.defaultform import editbuttons, section, lookup_field from isomer.schemata.base import base_object, uuid_object SessionSchema = base_object('session', roles_create='crew', roles_list=['admin', 'chair'], roles_read=['admin', 'chair'], roles_write=['admin', 'chair']) SessionSchema['properties'].update({ 'sessiontype': uuid_object('Session Type', 'Select a session type'), 'name': { 'type': 'string', 'title': 'Title', 'description': 'Title of session' }, 'abstract': { 'type': 'string', 'title': 'Abstract', 'format': 'html',
__license__ = "AGPLv3" """ Schema: AmbientLoop ============ Contains -------- ambientLoop: Metadata about ambient sound loops for ambient scenes. """ from isomer.schemata.defaultform import * from isomer.schemata.base import base_object, uuid_object AmbientLoopSchema = base_object('ambientloop') AmbientLoopSchema['properties'].update({ 'description': { 'type': 'string', 'format': 'html', 'title': 'Loop description', 'description': 'Loop description' }, 'file': uuid_object('file', description='Select a loop file'), 'default_volume': { 'type': 'number' }, })
""" Schema: BeverageOrder ===================== Contains -------- BeverageOrder: Stores orders of beverages """ from isomer.schemata.defaultform import * from isomer.schemata.base import base_object, uuid_object BeverageOrderSchema = base_object('beverage_order', roles_write='owner', roles_read='crew') BeverageOrderSchema['properties'].update({ 'supplier': uuid_object('supplier'), 'items': { 'type': 'array', 'default': [], 'items': { 'type': 'object', 'items': [ { 'beverage': uuid_object('beverage', 'Select a beverage') }, { 'crates': {'type': 'integer'} } ]
LayerGroup: A configurable group of predefined layers See also -------- Provisions """ from isomer.schemata.defaultform import editbuttons from isomer.schemata.base import base_object, uuid_object LayerGroupSchema = base_object('layergroup', roles_read=['admin', 'crew'], roles_write=['admin', 'navigator'], roles_create=['admin', 'navigator'], roles_list=['admin', 'crew']) LayerGroupSchema['properties'].update({ 'owner': { 'type': 'string', 'minLength': 36, 'title': "Owner's Unique ID", 'description': 'HIDDEN' }, 'color': { 'type': 'string', 'title': 'Group Color', 'format': 'color', 'description': 'This group'
Schema: MeshNode ============ Contains -------- MeshNode reference entry for the mesh to set up pump start times and durations as well as conditions.. """ from isomer.schemata.defaultform import savebutton from isomer.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',
Schema: Countable ================= Contains -------- Generic countable thing definition """ from isomer.schemata.defaultform import editbuttons from isomer.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} }) CountableForm = [ { 'type': 'section', 'htmlClass': 'row', 'items': [
""" Schema: System ============== Contains -------- System: Global systemwide settings """ from isomer.schemata.defaultform import savebutton from isomer.schemata.base import base_object, language_field SystemconfigSchema = base_object("systemconfig", roles_read=["admin", "crew"], roles_write=["admin"]) 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",