Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MilderJoghurt
rlf-server
Commits
2286a3a3
Commit
2286a3a3
authored
Jul 02, 2015
by
Fjen Undso
Browse files
Merge branch 'PauseFeatureServer' into 'master'
pause feature See merge request
!1
parents
44f60200
b614bcec
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/controllers/VoteController.java
View file @
2286a3a3
...
...
@@ -100,11 +100,13 @@ public class VoteController extends Controller {
VoteStats
sUnderstandability
=
new
VoteStats
(
VoteStats
.
Type
.
UNDERSTANDABILITY
,
0
);
VoteStats
sRequests
=
new
VoteStats
(
VoteStats
.
Type
.
REQUEST
,
0
);
VoteStats
sUsers
=
new
VoteStats
(
VoteStats
.
Type
.
CURRENTUSERS
,
0
);
VoteStats
sBreakRequests
=
new
VoteStats
(
VoteStats
.
Type
.
BREAK
,
0
);
List
<
VoteStats
>
vsList
=
new
ArrayList
<
VoteStats
>();
vsList
.
add
(
sAll
);
vsList
.
add
(
sSpeed
);
vsList
.
add
(
sUnderstandability
);
vsList
.
add
(
sRequests
);
vsList
.
add
(
sBreakRequests
);
vsList
.
add
(
sUsers
);
// distinct list of vote owners
...
...
@@ -141,6 +143,12 @@ public class VoteController extends Controller {
sRequests
.
value
++;
}
break
;
case
BREAK:
// consider only last 10min
if
(
v
.
date
.
after
(
tenMinutesAgo
))
{
sBreakRequests
.
value
++;
}
break
;
default
:
break
;
}
...
...
app/models/Vote.java
View file @
2286a3a3
...
...
@@ -49,6 +49,9 @@ public class Vote extends Model {
@EnumValue
(
"R"
)
REQUEST
,
@EnumValue
(
"B"
)
BREAK
,
}
public
static
Finder
<
Long
,
Vote
>
find
=
new
Finder
<
Long
,
Vote
>(
Long
.
class
,
...
...
app/models/VoteStats.java
View file @
2286a3a3
...
...
@@ -20,6 +20,7 @@ public class VoteStats extends Model {
UNDERSTANDABILITY
,
REQUEST
,
CURRENTUSERS
,
BREAK
,
}
public
VoteStats
(
Type
type
,
Integer
value
)
{
...
...
Write
Preview
Supports
Markdown
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