2015-06-30 00:51:55 -05:00
|
|
|
##########################################################################
|
|
|
|
#
|
|
|
|
# pgAdmin 4 - PostgreSQL Tools
|
|
|
|
#
|
2023-01-02 00:23:55 -06:00
|
|
|
# Copyright (C) 2013 - 2023, The pgAdmin Development Team
|
2015-06-30 00:51:55 -05:00
|
|
|
# This software is released under the PostgreSQL Licence
|
|
|
|
#
|
|
|
|
##########################################################################
|
|
|
|
|
2015-06-29 02:54:05 -05:00
|
|
|
PRIORITY = 100
|
|
|
|
|
2015-06-29 01:58:41 -05:00
|
|
|
|
2022-11-18 22:43:41 -06:00
|
|
|
class MenuItem():
|
2015-06-29 01:58:41 -05:00
|
|
|
def __init__(self, **kwargs):
|
|
|
|
self.__dict__.update(**kwargs)
|
2015-06-29 02:54:05 -05:00
|
|
|
|
|
|
|
|
2022-11-18 22:43:41 -06:00
|
|
|
class Panel():
|
2018-01-31 07:58:55 -06:00
|
|
|
def __init__(
|
2020-07-14 08:53:50 -05:00
|
|
|
self, name, title, content='', width=500, height=600, **kwargs
|
2018-01-31 07:58:55 -06:00
|
|
|
):
|
2015-06-29 02:54:05 -05:00
|
|
|
self.name = name
|
|
|
|
self.title = title
|
|
|
|
self.content = content
|
|
|
|
self.width = width
|
|
|
|
self.height = height
|
2020-07-14 08:53:50 -05:00
|
|
|
self.isIframe = kwargs.get('is_iframe', True)
|
|
|
|
self.showTitle = kwargs.get('show_title', True)
|
|
|
|
self.isCloseable = kwargs.get('is_closeable', True)
|
|
|
|
self.isPrivate = kwargs.get('is_private', None)
|
|
|
|
self.icon = kwargs.get('icon', None)
|
|
|
|
self.data = kwargs.get('data', None)
|
|
|
|
self.events = kwargs.get('events', None)
|
|
|
|
self.limit = kwargs.get('limit', False)
|
|
|
|
self.canHide = kwargs.get('can_hide', False)
|
|
|
|
priority = kwargs.get('priority', None)
|
2015-06-29 02:54:05 -05:00
|
|
|
if priority is None:
|
|
|
|
global PRIORITY
|
|
|
|
PRIORITY += 100
|
|
|
|
priority = PRIORITY
|
|
|
|
self.priority = priority
|