Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
tev
plugin_event
Commits
f64805a9
Commit
f64805a9
authored
Mar 15, 2017
by
LE GAC Renaud
Browse files
Update ui_viewport to remove obsolete code.
parent
e9e45161
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
122 deletions
+4
-122
modules/plugin_event/ui_viewport.py
modules/plugin_event/ui_viewport.py
+4
-122
No files found.
modules/plugin_event/ui_viewport.py
View file @
f64805a9
...
...
@@ -35,11 +35,7 @@ class ViewportUi(object):
ViewportUi
.
object_node
(
db
,
T
),
ViewportUi
.
event_node
(
db
,
T
),
ViewportUi
.
list_node
(
db
,
T
,
selector_panel
),
ViewportUi
.
list2_node
(
db
,
T
,
selector_panel
),
ViewportUi
.
metric1d_node
(
db
,
T
,
selector_panel
),
ViewportUi
.
metric2d_node
(
db
,
T
,
selector_panel
),
ViewportUi
.
metric2d2_node
(
db
,
T
,
selector_panel
),
ViewportUi
.
graph_node
(
db
,
T
,
selector_panel
)]
ViewportUi
.
metric2d_node
(
db
,
T
,
selector_panel
)]
modifier
=
dbui
.
ViewportModifier
()
modifier
.
add_node
(
*
nodes
)
...
...
@@ -137,12 +133,8 @@ class ViewportUi(object):
node
=
Node
(
T
(
"Configure"
))
add_child
=
node
.
add_child
add_child
(
T
(
"the lists"
),
to_grid
(
db
.
lists
))
add_child
(
T
(
"the lists #2"
),
to_grid
(
db
.
lists2
))
add_child
(
T
(
"the metrics 1d"
),
to_grid
(
db
.
metrics1d
))
add_child
(
T
(
"the metrics 2d"
),
to_grid
(
db
.
metrics2d
))
add_child
(
T
(
"the metrics 2d2"
),
to_grid
(
db
.
metrics2d2
))
add_child
(
T
(
"the graphs"
),
to_grid
(
db
.
graphs
))
add_child
(
T
(
"the lists"
),
to_grid
(
db
.
lists2
))
add_child
(
T
(
"the metrics 2d"
),
to_grid
(
db
.
metrics2d2
))
return
node
...
...
@@ -243,34 +235,6 @@ class ViewportUi(object):
add_child
=
node
.
add_child
for
row
in
db
(
db
.
lists
.
id
>
0
).
select
(
orderby
=
db
.
lists
.
name
):
panel
=
selector_panel
panel
.
baseUrl
=
URL
(
"plugin_event"
,
"grid"
)
panel
.
baseParams
=
{
"id_lists"
:
row
.
id
}
add_child
(
row
.
name
,
panel
)
return
node
@
staticmethod
def
list2_node
(
db
,
T
,
selector_panel
):
"""To deal with lists.
Args:
db (pyDAL.DAL): database connection
T (gluon.languages.translator): language translator
selector_panel (gluon.storage.Storage):
configuration of the selector panel.
Returns:
dbui.Node:
the configuration of a tree node.
"""
node
=
Node
(
T
(
"The lists #2"
))
add_child
=
node
.
add_child
for
row
in
db
(
db
.
lists2
.
id
>
0
).
select
(
orderby
=
db
.
lists2
.
name
):
panel
=
selector_panel
...
...
@@ -281,64 +245,8 @@ class ViewportUi(object):
return
node
@
staticmethod
def
metric1d_node
(
db
,
T
,
selector_panel
):
"""To deal with one-dimension metrics.
Args:
db (pyDAL.DAL): database connection
T (gluon.languages.translator): language translator
selector_panel (gluon.storage.Storage):
configuration of the selector panel.
Returns:
dbui.Node:
the configuration of a tree node.
"""
node
=
Node
(
T
(
"The metrics 1d"
))
add_child
=
node
.
add_child
for
row
in
db
(
db
.
metrics1d
.
id
>
0
).
select
(
orderby
=
db
.
metrics1d
.
name
):
panel
=
selector_panel
panel
.
baseUrl
=
URL
(
"plugin_event"
,
"grid"
)
panel
.
baseParams
=
{
"id_metrics1d"
:
row
.
id
}
add_child
(
row
.
name
,
panel
)
return
node
@
staticmethod
def
metric2d_node
(
db
,
T
,
selector_panel
):
"""To deal wiht two-dimension metrics.
Args:
db (pyDAL.DAL): database connection
T (gluon.languages.translator): language translator
selector_panel (gluon.storage.Storage):
configuration of the selector panel.
Returns:
dbui.Node:
the configuration of a tree node.
"""
node
=
Node
(
T
(
"The metrics 2d"
))
add_child
=
node
.
add_child
for
row
in
db
(
db
.
metrics2d
.
id
>
0
).
select
(
orderby
=
db
.
metrics2d
.
name
):
panel
=
selector_panel
panel
.
baseUrl
=
URL
(
"plugin_event"
,
"grid"
)
panel
.
baseParams
=
{
"id_metrics2d"
:
row
.
id
}
add_child
(
row
.
name
,
panel
)
return
node
@
staticmethod
def
metric2d2_node
(
db
,
T
,
selector_panel
):
"""To deal with two-dimension metrics.
Args:
...
...
@@ -351,7 +259,7 @@ class ViewportUi(object):
dbui.Node:
the configuration of a tree node.
"""
node
=
Node
(
T
(
"The metrics 2d
2
"
))
node
=
Node
(
T
(
"The metrics 2d"
))
add_child
=
node
.
add_child
...
...
@@ -364,29 +272,3 @@ class ViewportUi(object):
add_child
(
row
.
name
,
panel
)
return
node
@
staticmethod
def
graph_node
(
db
,
T
,
selector_panel
):
"""To deal with graphs.
Args:
db (pyDAL.DAL): database connection
T (gluon.languages.translator): language translator
selector_panel (gluon.storage.Storage):
configuration of the selector panel.
Returns:
dbui.Node:
the configuration of a tree node.
"""
node
=
Node
(
T
(
"The graphs"
))
for
row
in
db
(
db
.
graphs
.
id
>
0
).
select
(
orderby
=
db
.
graphs
.
name
):
panel
=
selector_panel
panel
.
baseUrl
=
URL
(
"plugin_event"
,
"graph_mpl"
)
panel
.
baseParams
=
{
"id_graphs"
:
row
.
id
}
node
.
add_child
(
row
.
name
,
panel
)
return
node
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment