Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
b9843a8d
Commit
b9843a8d
authored
Jun 12, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
display the first active reporting widget
parent
badf0645
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
12 deletions
+24
-12
dream/platform/static/src/dream.js
dream/platform/static/src/dream.js
+24
-12
No files found.
dream/platform/static/src/dream.js
View file @
b9843a8d
...
@@ -875,25 +875,37 @@
...
@@ -875,25 +875,37 @@
};
};
that
.
displayResult
=
function
(
idx
,
result
)
{
that
.
displayResult
=
function
(
idx
,
result
)
{
var
active_tab
=
$
(
"
#reports
"
).
data
(
"
ui-tabs
"
)
?
// the list of available widgets, in the same order that in html
$
(
"
#reports
"
).
tabs
(
"
option
"
,
"
active
"
)
:
0
;
// XXX should not be 0, but the first enabled one
$
(
'
li.result
'
).
removeClass
(
'
active
'
);
$
(
$
(
'
li.result
'
)[
idx
]).
addClass
(
'
active
'
);
if
(
$
(
"
#reports
"
).
data
(
"
ui-tabs
"
))
{
$
(
"
#reports
"
).
tabs
(
"
destroy
"
);
}
var
available_widget_list
=
[
var
available_widget_list
=
[
'
debug_json
'
,
'
station_utilisation_graph
'
,
'
station_utilisation_graph
'
,
'
capacity_utilisation_graph
'
,
'
capacity_utilisation_graph
'
,
'
job_schedule_spreadsheet
'
,
'
job_gantt
'
,
'
exit_stat
'
,
'
exit_stat
'
,
'
queue_stat
'
,
'
queue_stat
'
,
'
job_schedule_spreadsheet
'
,
'
job_gantt
'
,
'
debug_json
'
,
];
];
// The active tab is the one that is selected or the first one that is
// enabled
var
active_tab
;
if
(
$
(
"
#reports
"
).
data
(
"
ui-tabs
"
))
{
active_tab
=
$
(
"
#reports
"
).
tabs
(
"
option
"
,
"
active
"
);
}
else
{
for
(
var
i
in
available_widget_list
)
{
if
(
configuration
[
'
Dream-Configuration
'
].
gui
[
available_widget_list
[
i
]])
{
active_tab
=
i
;
break
;
}
}
}
$
(
'
li.result
'
).
removeClass
(
'
active
'
);
$
(
$
(
'
li.result
'
)[
idx
]).
addClass
(
'
active
'
);
if
(
$
(
"
#reports
"
).
data
(
"
ui-tabs
"
))
{
$
(
"
#reports
"
).
tabs
(
"
destroy
"
);
}
for
(
var
i
in
available_widget_list
)
{
for
(
var
i
in
available_widget_list
)
{
var
widget_name
=
available_widget_list
[
i
];
var
widget_name
=
available_widget_list
[
i
];
if
(
configuration
[
'
Dream-Configuration
'
].
gui
[
widget_name
])
{
if
(
configuration
[
'
Dream-Configuration
'
].
gui
[
widget_name
])
{
...
...
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