Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
8d8c161a
Commit
8d8c161a
authored
Jan 07, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Speedup dashboard via loading events with ajax
parent
6c777ff8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
4 deletions
+14
-4
app/assets/javascripts/pager.js
app/assets/javascripts/pager.js
+9
-2
app/views/dashboard/_activities.html.haml
app/views/dashboard/_activities.html.haml
+1
-1
app/views/dashboard/index.html.haml
app/views/dashboard/index.html.haml
+1
-1
features/dashboard/dashboard.feature
features/dashboard/dashboard.feature
+3
-0
No files found.
app/assets/javascripts/pager.js
View file @
8d8c161a
...
@@ -4,9 +4,16 @@ var Pager = {
...
@@ -4,9 +4,16 @@ var Pager = {
disable
:
false
,
disable
:
false
,
init
:
init
:
function
(
limit
)
{
function
(
limit
,
preload
)
{
this
.
limit
=
limit
;
this
.
limit
=
limit
;
this
.
offset
=
limit
;
if
(
preload
)
{
this
.
offset
=
0
;
this
.
getOld
();
}
else
{
this
.
offset
=
limit
;
}
this
.
initLoadMore
();
this
.
initLoadMore
();
},
},
...
...
app/views/dashboard/_activities.html.haml
View file @
8d8c161a
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
=
event_filter_link
EventFilter
.
team
,
'Team'
=
event_filter_link
EventFilter
.
team
,
'Team'
-
if
@events
.
any?
-
if
@events
.
any?
.content_list
=
render
@events
.content_list
-
else
-
else
%p
.nothing_here_message
Projects activity will be displayed here
%p
.nothing_here_message
Projects activity will be displayed here
.loading.hide
.loading.hide
app/views/dashboard/index.html.haml
View file @
8d8c161a
...
@@ -8,4 +8,4 @@
...
@@ -8,4 +8,4 @@
-
else
-
else
=
render
"zero_authorized_projects"
=
render
"zero_authorized_projects"
:javascript
:javascript
$
(
function
(){
Pager
.
init
(
20
);
});
$
(
function
(){
Pager
.
init
(
20
,
true
);
});
features/dashboard/dashboard.feature
View file @
8d8c161a
...
@@ -5,6 +5,7 @@ Feature: Dashboard
...
@@ -5,6 +5,7 @@ Feature: Dashboard
And
project
"Shop"
has push event
And
project
"Shop"
has push event
And
I visit dashboard page
And
I visit dashboard page
@javascript
Scenario
:
I
should see projects list
Scenario
:
I
should see projects list
Then
I should see
"New Project"
link
Then
I should see
"New Project"
link
Then
I should see
"Shop"
project link
Then
I should see
"Shop"
project link
...
@@ -26,11 +27,13 @@ Feature: Dashboard
...
@@ -26,11 +27,13 @@ Feature: Dashboard
And
I click
"Create Merge Request"
link
And
I click
"Create Merge Request"
link
Then
I see prefilled new Merge Request page
Then
I see prefilled new Merge Request page
@javascript
Scenario
:
I
should see User joined Project event
Scenario
:
I
should see User joined Project event
Given
user with name
"John Doe"
joined project
"Shop"
Given
user with name
"John Doe"
joined project
"Shop"
When
I visit dashboard page
When
I visit dashboard page
Then
I should see
"John Doe joined project at Shop"
event
Then
I should see
"John Doe joined project at Shop"
event
@javascript
Scenario
:
I
should see User left Project event
Scenario
:
I
should see User left Project event
Given
user with name
"John Doe"
joined project
"Shop"
Given
user with name
"John Doe"
joined project
"Shop"
And
user with name
"John Doe"
left project
"Shop"
And
user with name
"John Doe"
left project
"Shop"
...
...
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