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
Boxiang Sun
gitlab-ce
Commits
693e435f
Commit
693e435f
authored
Sep 06, 2018
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
port EE
parent
ab22dae9
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
67 additions
and
31 deletions
+67
-31
app/assets/javascripts/clusters/components/gcp_signup_offer.js
...ssets/javascripts/clusters/components/gcp_signup_offer.js
+3
-22
app/assets/javascripts/persistent_user_callout.js
app/assets/javascripts/persistent_user_callout.js
+32
-0
app/models/user_callout.rb
app/models/user_callout.rb
+2
-1
app/views/dashboard/activity.html.haml
app/views/dashboard/activity.html.haml
+3
-0
app/views/dashboard/groups/index.html.haml
app/views/dashboard/groups/index.html.haml
+3
-0
app/views/dashboard/issues.html.haml
app/views/dashboard/issues.html.haml
+3
-0
app/views/dashboard/merge_requests.html.haml
app/views/dashboard/merge_requests.html.haml
+3
-0
app/views/dashboard/projects/index.html.haml
app/views/dashboard/projects/index.html.haml
+3
-0
app/views/dashboard/projects/starred.html.haml
app/views/dashboard/projects/starred.html.haml
+3
-0
app/views/dashboard/todos/index.html.haml
app/views/dashboard/todos/index.html.haml
+3
-0
app/views/layouts/nav/_breadcrumbs.html.haml
app/views/layouts/nav/_breadcrumbs.html.haml
+1
-0
app/views/projects/clusters/_gcp_signup_offer_banner.html.haml
...iews/projects/clusters/_gcp_signup_offer_banner.html.haml
+2
-2
db/schema.rb
db/schema.rb
+6
-6
No files found.
app/assets/javascripts/clusters/components/gcp_signup_offer.js
View file @
693e435f
import
$
from
'
jquery
'
;
import
PersistentUserCallout
from
'
../../persistent_user_callout
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
{
__
}
from
'
~/locale
'
;
import
Flash
from
'
~/flash
'
;
export
default
function
gcpSignupOffer
()
{
export
default
function
gcpSignupOffer
()
{
const
alertEl
=
document
.
querySelector
(
'
.gcp-signup-offer
'
);
const
alertEl
=
document
.
querySelector
(
'
.gcp-signup-offer
'
);
if
(
!
alertEl
)
{
if
(
!
alertEl
)
return
;
return
;
}
const
closeButtonEl
=
alertEl
.
getElementsByClassName
(
'
close
'
)[
0
];
new
PersistentUserCallout
(
alertEl
).
init
();
const
{
dismissEndpoint
,
featureId
}
=
closeButtonEl
.
dataset
;
closeButtonEl
.
addEventListener
(
'
click
'
,
()
=>
{
axios
.
post
(
dismissEndpoint
,
{
feature_name
:
featureId
,
})
.
then
(()
=>
{
$
(
alertEl
).
alert
(
'
close
'
);
})
.
catch
(()
=>
{
Flash
(
__
(
'
An error occurred while dismissing the alert. Refresh the page and try again.
'
));
});
});
}
}
app/assets/javascripts/persistent_user_callout.js
0 → 100644
View file @
693e435f
import
axios
from
'
./lib/utils/axios_utils
'
;
import
{
__
}
from
'
./locale
'
;
import
Flash
from
'
./flash
'
;
export
default
class
PersistentUserCallout
{
constructor
(
container
)
{
const
{
dismissEndpoint
,
featureId
}
=
container
.
dataset
;
this
.
container
=
container
;
this
.
dismissEndpoint
=
dismissEndpoint
;
this
.
featureId
=
featureId
;
}
init
()
{
const
closeButton
=
this
.
container
.
querySelector
(
'
.js-close
'
);
closeButton
.
addEventListener
(
'
click
'
,
event
=>
this
.
dismiss
(
event
));
}
dismiss
(
event
)
{
event
.
preventDefault
();
axios
.
post
(
this
.
dismissEndpoint
,
{
feature_name
:
this
.
featureId
,
})
.
then
(()
=>
{
this
.
container
.
remove
();
})
.
catch
(()
=>
{
Flash
(
__
(
'
An error occurred while dismissing the alert. Refresh the page and try again.
'
));
});
}
}
app/models/user_callout.rb
View file @
693e435f
...
@@ -5,7 +5,8 @@ class UserCallout < ActiveRecord::Base
...
@@ -5,7 +5,8 @@ class UserCallout < ActiveRecord::Base
enum
feature_name:
{
enum
feature_name:
{
gke_cluster_integration:
1
,
gke_cluster_integration:
1
,
gcp_signup_offer:
2
gcp_signup_offer:
2
,
gold_trial:
3
}
}
validates
:user
,
presence:
true
validates
:user
,
presence:
true
...
...
app/views/dashboard/activity.html.haml
View file @
693e435f
...
@@ -4,6 +4,9 @@
...
@@ -4,6 +4,9 @@
=
content_for
:meta_tags
do
=
content_for
:meta_tags
do
=
auto_discovery_link_tag
(
:atom
,
dashboard_projects_url
(
rss_url_options
),
title:
"All activity"
)
=
auto_discovery_link_tag
(
:atom
,
dashboard_projects_url
(
rss_url_options
),
title:
"All activity"
)
=
content_for
:above_breadcrumbs_content
do
=
render_if_exists
"shared/gold_trial_callout"
-
page_title
"Activity"
-
page_title
"Activity"
-
header_title
"Activity"
,
activity_dashboard_path
-
header_title
"Activity"
,
activity_dashboard_path
...
...
app/views/dashboard/groups/index.html.haml
View file @
693e435f
...
@@ -3,6 +3,9 @@
...
@@ -3,6 +3,9 @@
-
header_title
"Groups"
,
dashboard_groups_path
-
header_title
"Groups"
,
dashboard_groups_path
=
render
'dashboard/groups_head'
=
render
'dashboard/groups_head'
=
content_for
:above_breadcrumbs_content
do
=
render_if_exists
"shared/gold_trial_callout"
-
if
params
[
:filter
].
blank?
&&
@groups
.
empty?
-
if
params
[
:filter
].
blank?
&&
@groups
.
empty?
=
render
'shared/groups/empty_state'
=
render
'shared/groups/empty_state'
-
else
-
else
...
...
app/views/dashboard/issues.html.haml
View file @
693e435f
...
@@ -4,6 +4,9 @@
...
@@ -4,6 +4,9 @@
=
content_for
:meta_tags
do
=
content_for
:meta_tags
do
=
auto_discovery_link_tag
(
:atom
,
safe_params
.
merge
(
rss_url_options
).
to_h
,
title:
"
#{
current_user
.
name
}
issues"
)
=
auto_discovery_link_tag
(
:atom
,
safe_params
.
merge
(
rss_url_options
).
to_h
,
title:
"
#{
current_user
.
name
}
issues"
)
=
content_for
:above_breadcrumbs_content
do
=
render_if_exists
"shared/gold_trial_callout"
.top-area
.top-area
=
render
'shared/issuable/nav'
,
type: :issues
,
display_count:
!
@no_filters_set
=
render
'shared/issuable/nav'
,
type: :issues
,
display_count:
!
@no_filters_set
.nav-controls
.nav-controls
...
...
app/views/dashboard/merge_requests.html.haml
View file @
693e435f
...
@@ -2,6 +2,9 @@
...
@@ -2,6 +2,9 @@
-
page_title
_
(
"Merge Requests"
)
-
page_title
_
(
"Merge Requests"
)
-
@breadcrumb_link
=
merge_requests_dashboard_path
(
assignee_id:
current_user
.
id
)
-
@breadcrumb_link
=
merge_requests_dashboard_path
(
assignee_id:
current_user
.
id
)
=
content_for
:above_breadcrumbs_content
do
=
render_if_exists
"shared/gold_trial_callout"
.top-area
.top-area
=
render
'shared/issuable/nav'
,
type: :merge_requests
,
display_count:
!
@no_filters_set
=
render
'shared/issuable/nav'
,
type: :merge_requests
,
display_count:
!
@no_filters_set
.nav-controls
.nav-controls
...
...
app/views/dashboard/projects/index.html.haml
View file @
693e435f
...
@@ -4,6 +4,9 @@
...
@@ -4,6 +4,9 @@
=
content_for
:meta_tags
do
=
content_for
:meta_tags
do
=
auto_discovery_link_tag
(
:atom
,
dashboard_projects_url
(
rss_url_options
),
title:
"All activity"
)
=
auto_discovery_link_tag
(
:atom
,
dashboard_projects_url
(
rss_url_options
),
title:
"All activity"
)
=
content_for
:above_breadcrumbs_content
do
=
render_if_exists
"shared/gold_trial_callout"
-
page_title
"Projects"
-
page_title
"Projects"
-
header_title
"Projects"
,
dashboard_projects_path
-
header_title
"Projects"
,
dashboard_projects_path
...
...
app/views/dashboard/projects/starred.html.haml
View file @
693e435f
...
@@ -4,6 +4,9 @@
...
@@ -4,6 +4,9 @@
-
page_title
"Starred Projects"
-
page_title
"Starred Projects"
-
header_title
"Projects"
,
dashboard_projects_path
-
header_title
"Projects"
,
dashboard_projects_path
=
content_for
:above_breadcrumbs_content
do
=
render_if_exists
"shared/gold_trial_callout"
%div
{
class:
container_class
}
%div
{
class:
container_class
}
=
render
"projects/last_push"
=
render
"projects/last_push"
=
render
'dashboard/projects_head'
=
render
'dashboard/projects_head'
...
...
app/views/dashboard/todos/index.html.haml
View file @
693e435f
...
@@ -2,6 +2,9 @@
...
@@ -2,6 +2,9 @@
-
page_title
"Todos"
-
page_title
"Todos"
-
header_title
"Todos"
,
dashboard_todos_path
-
header_title
"Todos"
,
dashboard_todos_path
=
content_for
:above_breadcrumbs_content
do
=
render_if_exists
"shared/gold_trial_callout"
-
if
current_user
.
todos
.
any?
-
if
current_user
.
todos
.
any?
.top-area
.top-area
%ul
.nav-links.mobile-separator.nav.nav-tabs
%ul
.nav-links.mobile-separator.nav.nav-tabs
...
...
app/views/layouts/nav/_breadcrumbs.html.haml
View file @
693e435f
-
container
=
@no_breadcrumb_container
?
'container-fluid'
:
container_class
-
container
=
@no_breadcrumb_container
?
'container-fluid'
:
container_class
-
hide_top_links
=
@hide_top_links
||
false
-
hide_top_links
=
@hide_top_links
||
false
=
yield
:above_breadcrumbs_content
%nav
.breadcrumbs
{
role:
"navigation"
,
class:
[
container
,
@content_class
]
}
%nav
.breadcrumbs
{
role:
"navigation"
,
class:
[
container
,
@content_class
]
}
.breadcrumbs-container
.breadcrumbs-container
-
if
defined?
(
@left_sidebar
)
-
if
defined?
(
@left_sidebar
)
...
...
app/views/projects/clusters/_gcp_signup_offer_banner.html.haml
View file @
693e435f
-
link
=
link_to
(
s_
(
'ClusterIntegration|sign up'
),
'https://console.cloud.google.com/freetrial?utm_campaign=2018_cpanel&utm_source=gitlab&utm_medium=referral'
,
target:
'_blank'
,
rel:
'noopener noreferrer'
)
-
link
=
link_to
(
s_
(
'ClusterIntegration|sign up'
),
'https://console.cloud.google.com/freetrial?utm_campaign=2018_cpanel&utm_source=gitlab&utm_medium=referral'
,
target:
'_blank'
,
rel:
'noopener noreferrer'
)
.bs-callout.gcp-signup-offer.alert.alert-block.alert-dismissable.prepend-top-default.append-bottom-default
{
role:
'alert'
}
.bs-callout.gcp-signup-offer.alert.alert-block.alert-dismissable.prepend-top-default.append-bottom-default
{
role:
'alert'
,
data:
{
feature_id:
UserCalloutsHelper
::
GCP_SIGNUP_OFFER
,
dismiss_endpoint:
user_callouts_path
}
}
%button
.close
{
type:
"button"
,
data:
{
feature_id:
UserCalloutsHelper
::
GCP_SIGNUP_OFFER
,
dismiss_endpoint:
user_callouts_path
}
}
×
%button
.close
{
type:
"button"
}
×
.gcp-signup-offer--content
.gcp-signup-offer--content
.gcp-signup-offer--icon.append-right-8
.gcp-signup-offer--icon.append-right-8
=
sprite_icon
(
"information"
,
size:
16
)
=
sprite_icon
(
"information"
,
size:
16
)
...
...
db/schema.rb
View file @
693e435f
...
@@ -164,14 +164,14 @@ ActiveRecord::Schema.define(version: 20180826111825) do
...
@@ -164,14 +164,14 @@ ActiveRecord::Schema.define(version: 20180826111825) do
t
.
boolean
"authorized_keys_enabled"
,
default:
true
,
null:
false
t
.
boolean
"authorized_keys_enabled"
,
default:
true
,
null:
false
t
.
string
"auto_devops_domain"
t
.
string
"auto_devops_domain"
t
.
boolean
"pages_domain_verification_enabled"
,
default:
true
,
null:
false
t
.
boolean
"pages_domain_verification_enabled"
,
default:
true
,
null:
false
t
.
string
"user_default_internal_regex"
t
.
boolean
"allow_local_requests_from_hooks_and_services"
,
default:
false
,
null:
false
t
.
boolean
"allow_local_requests_from_hooks_and_services"
,
default:
false
,
null:
false
t
.
boolean
"enforce_terms"
,
default:
false
t
.
boolean
"enforce_terms"
,
default:
false
t
.
boolean
"mirror_available"
,
default:
true
,
null:
false
t
.
boolean
"mirror_available"
,
default:
true
,
null:
false
t
.
boolean
"hide_third_party_offers"
,
default:
false
,
null:
false
t
.
boolean
"hide_third_party_offers"
,
default:
false
,
null:
false
t
.
boolean
"instance_statistics_visibility_private"
,
default:
fals
e
,
null:
false
t
.
boolean
"instance_statistics_visibility_private"
,
default:
tru
e
,
null:
false
t
.
boolean
"web_ide_clientside_preview_enabled"
,
default:
false
,
null:
false
t
.
boolean
"web_ide_clientside_preview_enabled"
,
default:
false
,
null:
false
t
.
boolean
"user_show_add_ssh_key_message"
,
default:
true
,
null:
false
t
.
boolean
"user_show_add_ssh_key_message"
,
default:
true
,
null:
false
t
.
string
"user_default_internal_regex"
end
end
create_table
"audit_events"
,
force: :cascade
do
|
t
|
create_table
"audit_events"
,
force: :cascade
do
|
t
|
...
@@ -330,10 +330,10 @@ ActiveRecord::Schema.define(version: 20180826111825) do
...
@@ -330,10 +330,10 @@ ActiveRecord::Schema.define(version: 20180826111825) do
t
.
integer
"auto_canceled_by_id"
t
.
integer
"auto_canceled_by_id"
t
.
boolean
"retried"
t
.
boolean
"retried"
t
.
integer
"stage_id"
t
.
integer
"stage_id"
t
.
integer
"artifacts_file_store"
t
.
integer
"artifacts_metadata_store"
t
.
boolean
"protected"
t
.
boolean
"protected"
t
.
integer
"failure_reason"
t
.
integer
"failure_reason"
t
.
integer
"artifacts_file_store"
t
.
integer
"artifacts_metadata_store"
end
end
add_index
"ci_builds"
,
[
"artifacts_expire_at"
],
name:
"index_ci_builds_on_artifacts_expire_at"
,
where:
"(artifacts_file <> ''::text)"
,
using: :btree
add_index
"ci_builds"
,
[
"artifacts_expire_at"
],
name:
"index_ci_builds_on_artifacts_expire_at"
,
where:
"(artifacts_file <> ''::text)"
,
using: :btree
...
@@ -390,13 +390,13 @@ ActiveRecord::Schema.define(version: 20180826111825) do
...
@@ -390,13 +390,13 @@ ActiveRecord::Schema.define(version: 20180826111825) do
t
.
integer
"project_id"
,
null:
false
t
.
integer
"project_id"
,
null:
false
t
.
integer
"job_id"
,
null:
false
t
.
integer
"job_id"
,
null:
false
t
.
integer
"file_type"
,
null:
false
t
.
integer
"file_type"
,
null:
false
t
.
integer
"file_store"
t
.
integer
"size"
,
limit:
8
t
.
integer
"size"
,
limit:
8
t
.
datetime_with_timezone
"created_at"
,
null:
false
t
.
datetime_with_timezone
"created_at"
,
null:
false
t
.
datetime_with_timezone
"updated_at"
,
null:
false
t
.
datetime_with_timezone
"updated_at"
,
null:
false
t
.
datetime_with_timezone
"expire_at"
t
.
datetime_with_timezone
"expire_at"
t
.
string
"file"
t
.
string
"file"
t
.
binary
"file_sha256"
t
.
binary
"file_sha256"
t
.
integer
"file_store"
t
.
integer
"file_format"
,
limit:
2
t
.
integer
"file_format"
,
limit:
2
t
.
integer
"file_location"
,
limit:
2
t
.
integer
"file_location"
,
limit:
2
end
end
...
@@ -2401,7 +2401,7 @@ ActiveRecord::Schema.define(version: 20180826111825) do
...
@@ -2401,7 +2401,7 @@ ActiveRecord::Schema.define(version: 20180826111825) do
add_foreign_key
"term_agreements"
,
"users"
,
on_delete: :cascade
add_foreign_key
"term_agreements"
,
"users"
,
on_delete: :cascade
add_foreign_key
"timelogs"
,
"issues"
,
name:
"fk_timelogs_issues_issue_id"
,
on_delete: :cascade
add_foreign_key
"timelogs"
,
"issues"
,
name:
"fk_timelogs_issues_issue_id"
,
on_delete: :cascade
add_foreign_key
"timelogs"
,
"merge_requests"
,
name:
"fk_timelogs_merge_requests_merge_request_id"
,
on_delete: :cascade
add_foreign_key
"timelogs"
,
"merge_requests"
,
name:
"fk_timelogs_merge_requests_merge_request_id"
,
on_delete: :cascade
add_foreign_key
"todos"
,
"namespaces"
,
column:
"group_id"
,
on_delete: :cascade
add_foreign_key
"todos"
,
"namespaces"
,
column:
"group_id"
,
name:
"fk_a27c483435"
,
on_delete: :cascade
add_foreign_key
"todos"
,
"notes"
,
name:
"fk_91d1f47b13"
,
on_delete: :cascade
add_foreign_key
"todos"
,
"notes"
,
name:
"fk_91d1f47b13"
,
on_delete: :cascade
add_foreign_key
"todos"
,
"projects"
,
name:
"fk_45054f9c45"
,
on_delete: :cascade
add_foreign_key
"todos"
,
"projects"
,
name:
"fk_45054f9c45"
,
on_delete: :cascade
add_foreign_key
"todos"
,
"users"
,
column:
"author_id"
,
name:
"fk_ccf0373936"
,
on_delete: :cascade
add_foreign_key
"todos"
,
"users"
,
column:
"author_id"
,
name:
"fk_ccf0373936"
,
on_delete: :cascade
...
...
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