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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
0a42967a
Commit
0a42967a
authored
Aug 04, 2017
by
Rubén Dávila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a spec plus small refactors
parent
b5d36452
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
7 deletions
+31
-7
app/assets/javascripts/ee_trial_banner/index.js
app/assets/javascripts/ee_trial_banner/index.js
+1
-1
app/assets/stylesheets/pages/ee_start_trial.scss
app/assets/stylesheets/pages/ee_start_trial.scss
+1
-1
app/views/dashboard/projects/_zero_authorized_projects.html.haml
...ws/dashboard/projects/_zero_authorized_projects.html.haml
+1
-1
app/views/layouts/header/_default.html.haml
app/views/layouts/header/_default.html.haml
+1
-1
app/views/layouts/header/_ee_license_banner.html.haml
app/views/layouts/header/_ee_license_banner.html.haml
+1
-1
app/views/layouts/header/_new.html.haml
app/views/layouts/header/_new.html.haml
+1
-1
spec/features/admin/admin_license_spec.rb
spec/features/admin/admin_license_spec.rb
+25
-1
No files found.
app/assets/javascripts/ee_trial_banner/index.js
View file @
0a42967a
import
EETrialBanner
from
'
./ee_trial_banner
'
;
$
(()
=>
{
const
$trialBanner
=
$
(
'
.js-gitlab-ee-
trial
-banner
'
);
const
$trialBanner
=
$
(
'
.js-gitlab-ee-
license
-banner
'
);
if
(
$trialBanner
.
length
)
{
const
eeTrialBanner
=
new
EETrialBanner
(
$trialBanner
);
eeTrialBanner
.
init
();
...
...
app/assets/stylesheets/pages/ee_start_trial.scss
View file @
0a42967a
...
...
@@ -16,7 +16,7 @@
}
/* Trial Banner */
.gitlab-ee-
trial
-banner.alert
{
.gitlab-ee-
license
-banner.alert
{
display
:
flex
;
align-content
:
center
;
justify-content
:
center
;
...
...
app/views/dashboard/projects/_zero_authorized_projects.html.haml
View file @
0a42967a
-
admin_without_ee_license
=
!
current_license
&&
current_user
.
admin?
.row.blank-state-parent-container
{
class:
(
'has-start-trial-container'
if
admin_without_ee_license
)
}
.section-container.section-welcome
{
class:
"#{ 'col-md-6' if admin_without_ee_license }"
}
.section-container.section-welcome
{
class:
(
'col-md-6'
if
admin_without_ee_license
)
}
.container.section-body
.blank-state.blank-state-welcome
%h2
.blank-state-welcome-title
...
...
app/views/layouts/header/_default.html.haml
View file @
0a42967a
=
render
"layouts/header/ee_
trial
_banner"
=
render
"layouts/header/ee_
license
_banner"
%header
.navbar.navbar-gitlab.js-navbar-gitlab
{
class:
nav_header_class
}
.navbar-border
%a
.sr-only.gl-accessibility
{
href:
"#content-body"
,
tabindex:
"1"
}
Skip to content
...
...
app/views/layouts/header/_ee_
trial
_banner.html.haml
→
app/views/layouts/header/_ee_
license
_banner.html.haml
View file @
0a42967a
-
if
license_message
.
present?
.alert.alert-dismissible.gitlab-ee-
trial-banner.hidden.js-gitlab-ee-trial
-banner
{
role:
'alert'
,
data:
{
license_expiry:
current_license
.
expires_at
}
}
.alert.alert-dismissible.gitlab-ee-
license-banner.hidden.js-gitlab-ee-license
-banner
{
role:
'alert'
,
data:
{
license_expiry:
current_license
.
expires_at
}
}
-# Show dismiss button only when license expiry is about trial license
-
if
current_license
.
trial?
%button
.close
{
type:
'button'
,
'data-dismiss'
=>
'alert'
,
'aria-label'
=>
'Dismiss banner'
}
...
...
app/views/layouts/header/_new.html.haml
View file @
0a42967a
=
render
"layouts/header/ee_
trial
_banner"
=
render
"layouts/header/ee_
license
_banner"
%header
.navbar.navbar-gitlab.navbar-gitlab-new.js-navbar-gitlab
{
class:
nav_header_class
}
%a
.sr-only.gl-accessibility
{
href:
"#content-body"
,
tabindex:
"1"
}
Skip to content
...
...
spec/features/admin/admin_license_spec.rb
View file @
0a42967a
...
...
@@ -33,11 +33,35 @@ feature "License Admin" do
it
'does not mention blocking of changes'
do
visit
admin_license_path
page
.
within
'.gitlab-ee-
trial
-banner'
do
page
.
within
'.gitlab-ee-
license
-banner'
do
expect
(
page
).
to
have_content
(
'Your Enterprise Edition trial license expired on'
)
expect
(
page
).
not_to
have_content
(
'Pushing code and creation of issues and merge requests has been disabled'
)
end
end
end
context
'when license key is provided in the query string'
do
let
(
:license
)
{
build
(
:license
,
data:
build
(
:gitlab_license
,
restrictions:
{
active_user_count:
2000
}).
export
)
}
before
do
License
.
destroy_all
end
it
'shows the modal to install the license'
do
visit
admin_license_path
(
trial_key:
license
.
data
)
page
.
within
'#modal-upload-trial-license'
do
expect
(
page
).
to
have_content
(
'Your trial license was issued'
)
expect
(
page
).
to
have_button
(
'Install license'
)
end
end
it
'can install the license'
do
visit
admin_license_path
(
trial_key:
license
.
data
)
click_button
'Install license'
expect
(
page
).
to
have_content
(
'The license was successfully uploaded and is now active'
)
end
end
end
end
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