Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
debomatic-webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
debomatic-webui-admins
debomatic-webui
Commits
2eb94188
Commit
2eb94188
authored
Sep 08, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correctly build the all_* vectors
parent
68f098cb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
13 deletions
+8
-13
debomatic-webui/public/javascripts/page_history.js
debomatic-webui/public/javascripts/page_history.js
+8
-13
No files found.
debomatic-webui/public/javascripts/page_history.js
View file @
2eb94188
...
...
@@ -11,7 +11,7 @@ function Page_History() {
var
distributions_counter
=
{};
var
days_counter
=
{};
var
all_distributions
=
[];
var
all_days
=
{}
;
var
all_days
=
[]
;
function
_get_short_day
(
timestamp
)
{
var
date
=
new
Date
(
timestamp
*
1000
);
...
...
@@ -52,6 +52,8 @@ function Page_History() {
if
(
distributions_counter
.
hasOwnProperty
(
p
.
distribution
))
distributions_counter
[
p
.
distribution
]
++
;
else
distributions_counter
[
p
.
distribution
]
=
1
;
if
(
all_distributions
.
indexOf
(
p
.
distribution
)
<
0
)
all_distributions
.
push
(
p
.
distribution
);
}
function
_count_days
(
package_status
)
{
...
...
@@ -66,7 +68,8 @@ function Page_History() {
days_counter
[
p
.
distribution
]
=
{};
days_counter
[
p
.
distribution
][
day
]
=
1
;
}
all_days
[
day
]
=
0
;
if
(
all_days
.
indexOf
(
day
)
<
0
)
all_days
.
push
(
day
);
}
function
_sort_table
()
{
...
...
@@ -107,10 +110,8 @@ function Page_History() {
if
(
distributions_counter
.
hasOwnProperty
(
distro
))
{
distributions_data
.
series
.
push
(
distributions_counter
[
distro
]);
distributions_data
.
labels
.
push
(
distro
+
"
(
"
+
distributions_counter
[
distro
]
+
"
)
"
);
all_distributions
.
push
(
distro
);
}
}
Chartist
.
Pie
(
'
#distributions-chart
'
,
distributions_data
,
{
donut
:
true
,
donutWidth
:
15
,
...
...
@@ -121,18 +122,13 @@ function Page_History() {
// build the days Line graph
var
days_data
=
{
series
:
[],
labels
:
[]
labels
:
all_days
};
for
(
var
day
in
all_days
)
{
if
(
all_days
.
hasOwnProperty
(
day
))
days_data
.
labels
.
push
(
day
);
}
for
(
var
i
=
0
;
i
<
all_distributions
.
length
;
i
++
)
{
var
info
=
[];
var
distro
=
all_distributions
[
i
];
for
(
var
day
in
all_days
)
{
if
(
!
all_days
.
hasOwnProperty
(
day
))
continue
;
for
(
var
j
=
0
;
j
<
all_days
.
length
;
j
++
)
{
var
day
=
all_days
[
j
];
if
(
days_counter
[
distro
].
hasOwnProperty
(
day
))
info
.
push
(
days_counter
[
distro
][
day
]);
else
...
...
@@ -144,7 +140,6 @@ function Page_History() {
}
// init table and some objects
for
(
var
i
=
0
;
i
<
dom_history
.
length
;
i
++
)
{
var
p
=
dom_history
[
i
];
...
...
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