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() {
...
@@ -11,7 +11,7 @@ function Page_History() {
var
distributions_counter
=
{};
var
distributions_counter
=
{};
var
days_counter
=
{};
var
days_counter
=
{};
var
all_distributions
=
[];
var
all_distributions
=
[];
var
all_days
=
{}
;
var
all_days
=
[]
;
function
_get_short_day
(
timestamp
)
{
function
_get_short_day
(
timestamp
)
{
var
date
=
new
Date
(
timestamp
*
1000
);
var
date
=
new
Date
(
timestamp
*
1000
);
...
@@ -52,6 +52,8 @@ function Page_History() {
...
@@ -52,6 +52,8 @@ function Page_History() {
if
(
distributions_counter
.
hasOwnProperty
(
p
.
distribution
))
if
(
distributions_counter
.
hasOwnProperty
(
p
.
distribution
))
distributions_counter
[
p
.
distribution
]
++
;
distributions_counter
[
p
.
distribution
]
++
;
else
distributions_counter
[
p
.
distribution
]
=
1
;
else
distributions_counter
[
p
.
distribution
]
=
1
;
if
(
all_distributions
.
indexOf
(
p
.
distribution
)
<
0
)
all_distributions
.
push
(
p
.
distribution
);
}
}
function
_count_days
(
package_status
)
{
function
_count_days
(
package_status
)
{
...
@@ -66,7 +68,8 @@ function Page_History() {
...
@@ -66,7 +68,8 @@ function Page_History() {
days_counter
[
p
.
distribution
]
=
{};
days_counter
[
p
.
distribution
]
=
{};
days_counter
[
p
.
distribution
][
day
]
=
1
;
days_counter
[
p
.
distribution
][
day
]
=
1
;
}
}
all_days
[
day
]
=
0
;
if
(
all_days
.
indexOf
(
day
)
<
0
)
all_days
.
push
(
day
);
}
}
function
_sort_table
()
{
function
_sort_table
()
{
...
@@ -107,10 +110,8 @@ function Page_History() {
...
@@ -107,10 +110,8 @@ function Page_History() {
if
(
distributions_counter
.
hasOwnProperty
(
distro
))
{
if
(
distributions_counter
.
hasOwnProperty
(
distro
))
{
distributions_data
.
series
.
push
(
distributions_counter
[
distro
]);
distributions_data
.
series
.
push
(
distributions_counter
[
distro
]);
distributions_data
.
labels
.
push
(
distro
+
"
(
"
+
distributions_counter
[
distro
]
+
"
)
"
);
distributions_data
.
labels
.
push
(
distro
+
"
(
"
+
distributions_counter
[
distro
]
+
"
)
"
);
all_distributions
.
push
(
distro
);
}
}
}
}
Chartist
.
Pie
(
'
#distributions-chart
'
,
distributions_data
,
{
Chartist
.
Pie
(
'
#distributions-chart
'
,
distributions_data
,
{
donut
:
true
,
donut
:
true
,
donutWidth
:
15
,
donutWidth
:
15
,
...
@@ -121,18 +122,13 @@ function Page_History() {
...
@@ -121,18 +122,13 @@ function Page_History() {
// build the days Line graph
// build the days Line graph
var
days_data
=
{
var
days_data
=
{
series
:
[],
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
++
)
{
for
(
var
i
=
0
;
i
<
all_distributions
.
length
;
i
++
)
{
var
info
=
[];
var
info
=
[];
var
distro
=
all_distributions
[
i
];
var
distro
=
all_distributions
[
i
];
for
(
var
day
in
all_days
)
{
for
(
var
j
=
0
;
j
<
all_days
.
length
;
j
++
)
{
if
(
!
all_days
.
hasOwnProperty
(
day
))
var
day
=
all_days
[
j
];
continue
;
if
(
days_counter
[
distro
].
hasOwnProperty
(
day
))
if
(
days_counter
[
distro
].
hasOwnProperty
(
day
))
info
.
push
(
days_counter
[
distro
][
day
]);
info
.
push
(
days_counter
[
distro
][
day
]);
else
else
...
@@ -144,7 +140,6 @@ function Page_History() {
...
@@ -144,7 +140,6 @@ function Page_History() {
}
}
// init table and some objects
// init table and some objects
for
(
var
i
=
0
;
i
<
dom_history
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
dom_history
.
length
;
i
++
)
{
var
p
=
dom_history
[
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