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
45613341
Commit
45613341
authored
Sep 25, 2018
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dismissable_callout as it has become an unneeded wrapper for persistent_user_callout
parent
ba2ad0f0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
16 deletions
+15
-16
app/assets/javascripts/clusters/clusters_bundle.js
app/assets/javascripts/clusters/clusters_bundle.js
+8
-2
app/assets/javascripts/clusters/clusters_index.js
app/assets/javascripts/clusters/clusters_index.js
+3
-2
app/assets/javascripts/dismissable_callout.js
app/assets/javascripts/dismissable_callout.js
+0
-10
app/assets/javascripts/pages/projects/index.js
app/assets/javascripts/pages/projects/index.js
+4
-2
No files found.
app/assets/javascripts/clusters/clusters_bundle.js
View file @
45613341
import
Visibility
from
'
visibilityjs
'
;
import
Visibility
from
'
visibilityjs
'
;
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
initDismissableCallout
from
'
~/dismissable
_callout
'
;
import
PersistentUserCallout
from
'
../persistent_user
_callout
'
;
import
{
s__
,
sprintf
}
from
'
../locale
'
;
import
{
s__
,
sprintf
}
from
'
../locale
'
;
import
Flash
from
'
../flash
'
;
import
Flash
from
'
../flash
'
;
import
Poll
from
'
../lib/utils/poll
'
;
import
Poll
from
'
../lib/utils/poll
'
;
...
@@ -62,7 +62,7 @@ export default class Clusters {
...
@@ -62,7 +62,7 @@ export default class Clusters {
this
.
showTokenButton
=
document
.
querySelector
(
'
.js-show-cluster-token
'
);
this
.
showTokenButton
=
document
.
querySelector
(
'
.js-show-cluster-token
'
);
this
.
tokenField
=
document
.
querySelector
(
'
.js-cluster-token
'
);
this
.
tokenField
=
document
.
querySelector
(
'
.js-cluster-token
'
);
initDismissableCallout
(
'
.js-cluster-security-warning
'
);
Clusters
.
initDismissableCallout
(
);
initSettingsPanels
();
initSettingsPanels
();
setupToggleButtons
(
document
.
querySelector
(
'
.js-cluster-enable-toggle-area
'
));
setupToggleButtons
(
document
.
querySelector
(
'
.js-cluster-enable-toggle-area
'
));
this
.
initApplications
();
this
.
initApplications
();
...
@@ -105,6 +105,12 @@ export default class Clusters {
...
@@ -105,6 +105,12 @@ export default class Clusters {
});
});
}
}
static
initDismissableCallout
()
{
const
callout
=
document
.
querySelector
(
'
.js-cluster-security-warning
'
);
if
(
callout
)
new
PersistentUserCallout
(
callout
);
// eslint-disable-line no-new
}
addListeners
()
{
addListeners
()
{
if
(
this
.
showTokenButton
)
this
.
showTokenButton
.
addEventListener
(
'
click
'
,
this
.
showToken
);
if
(
this
.
showTokenButton
)
this
.
showTokenButton
.
addEventListener
(
'
click
'
,
this
.
showToken
);
eventHub
.
$on
(
'
installApplication
'
,
this
.
installApplication
);
eventHub
.
$on
(
'
installApplication
'
,
this
.
installApplication
);
...
...
app/assets/javascripts/clusters/clusters_index.js
View file @
45613341
import
createFlash
from
'
~/flash
'
;
import
createFlash
from
'
~/flash
'
;
import
{
__
}
from
'
~/locale
'
;
import
{
__
}
from
'
~/locale
'
;
import
setupToggleButtons
from
'
~/toggle_buttons
'
;
import
setupToggleButtons
from
'
~/toggle_buttons
'
;
import
initDismissableCallout
from
'
~/dismissable
_callout
'
;
import
PersistentUserCallout
from
'
../persistent_user
_callout
'
;
import
ClustersService
from
'
./services/clusters_service
'
;
import
ClustersService
from
'
./services/clusters_service
'
;
export
default
()
=>
{
export
default
()
=>
{
const
clusterList
=
document
.
querySelector
(
'
.js-clusters-list
'
);
const
clusterList
=
document
.
querySelector
(
'
.js-clusters-list
'
);
initDismissableCallout
(
'
.gcp-signup-offer
'
);
const
callout
=
document
.
querySelector
(
'
.gcp-signup-offer
'
);
if
(
callout
)
new
PersistentUserCallout
(
callout
);
// eslint-disable-line no-new
// The empty state won't have a clusterList
// The empty state won't have a clusterList
if
(
clusterList
)
{
if
(
clusterList
)
{
...
...
app/assets/javascripts/dismissable_callout.js
deleted
100644 → 0
View file @
ba2ad0f0
import
PersistentUserCallout
from
'
.persistent_user_callout
'
;
export
default
function
initDismissableCallout
(
alertSelector
)
{
const
alertEl
=
document
.
querySelector
(
alertSelector
);
if
(
!
alertEl
)
{
return
;
}
new
PersistentUserCallout
(
alertEl
);
}
app/assets/javascripts/pages/projects/index.js
View file @
45613341
import
initDismissableCallout
from
'
~/dismissable_callout
'
;
import
initGkeDropdowns
from
'
~/projects/gke_cluster_dropdowns
'
;
import
initGkeDropdowns
from
'
~/projects/gke_cluster_dropdowns
'
;
import
PersistentUserCallout
from
'
../../persistent_user_callout
'
;
import
Project
from
'
./project
'
;
import
Project
from
'
./project
'
;
import
ShortcutsNavigation
from
'
../../behaviors/shortcuts/shortcuts_navigation
'
;
import
ShortcutsNavigation
from
'
../../behaviors/shortcuts/shortcuts_navigation
'
;
...
@@ -12,7 +12,9 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -12,7 +12,9 @@ document.addEventListener('DOMContentLoaded', () => {
];
];
if
(
newClusterViews
.
indexOf
(
page
)
>
-
1
)
{
if
(
newClusterViews
.
indexOf
(
page
)
>
-
1
)
{
initDismissableCallout
(
'
.gcp-signup-offer
'
);
const
callout
=
document
.
querySelector
(
'
.gcp-signup-offer
'
);
if
(
callout
)
new
PersistentUserCallout
(
callout
);
// eslint-disable-line no-new
initGkeDropdowns
();
initGkeDropdowns
();
}
}
...
...
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