-
Notifications
You must be signed in to change notification settings - Fork 233
Expand file tree
/
Copy pathobjects.py
More file actions
110 lines (90 loc) · 2.95 KB
/
objects.py
File metadata and controls
110 lines (90 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/usr/bin/env python3
# Knowage, Open Source Business Intelligence suite
# Copyright (C) 2016 Engineering Ingegneria Informatica S.p.A.
#
# Knowage is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Knowage is distributed in the hope that it will be useful,
# 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/>.
from app.utilities import utils
class PythonWidgetExecution:
_knowage_address = None
_user_id = None
_document_id = None
_widget_id = None
_script = None
_output_variable = None
_dataset_name = None
_datastore_request = None
_analytical_drivers = None
def __init__(self, analytical_drivers=None, user_id=None, document_id=None, widget_id=None,
script=None, output_variable=None, dataset_name=None, datastore_request=None):
self._knowage_address = utils.getKnowageAddress()
self._user_id = user_id
self._document_id = document_id
self._widget_id = widget_id
self._script = script
self._output_variable = output_variable
self._dataset_name = dataset_name
self._datastore_request = datastore_request
self._analytical_drivers = analytical_drivers
@property
def knowage_address(self):
return self._knowage_address
@property
def analytical_drivers(self):
return self._analytical_drivers
@property
def user_id(self):
return self._user_id
@property
def document_id(self):
return self._document_id
@property
def widget_id(self):
return self._widget_id
@property
def script(self):
return self._script
@property
def output_variable(self):
return self._output_variable
@script.setter
def script(self, value):
self._script = value
@property
def dataset_name(self):
return self._dataset_name
@property
def datastore_request(self):
return self._datastore_request
class BokehResourceList:
_thread = None
_timestamp = None
_port = None
_dataset_name = None
def __init__(self, thread, timestamp, port, dataset_name):
self._thread = thread
self._timestamp = timestamp
self._port = port
self._dataset_name = dataset_name
@property
def thread(self):
return self._thread
@property
def timestamp(self):
return self._timestamp
@property
def port(self):
return self._port
@property
def dataset_name(self):
return self._dataset_name