diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-23 15:09:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-23 15:09:52 +0300 |
commit | ecf1ffc19875a94c9de675b0559adc408b202515 (patch) | |
tree | 92f76d0b7cbd9161eb4dff35ca4753f45f4bc6d2 /app/assets/javascripts/admin | |
parent | 65f7976d0cd11d91a4c0945b2c63a1aa2f888b07 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/admin')
-rw-r--r-- | app/assets/javascripts/admin/users/tabs.js | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/app/assets/javascripts/admin/users/tabs.js b/app/assets/javascripts/admin/users/tabs.js deleted file mode 100644 index cbaab7df4e9..00000000000 --- a/app/assets/javascripts/admin/users/tabs.js +++ /dev/null @@ -1,32 +0,0 @@ -import Api from '~/api'; -import { historyPushState } from '~/lib/utils/common_utils'; -import { mergeUrlParams } from '~/lib/utils/url_utility'; - -const COHORTS_PANE = 'cohorts'; -const COHORTS_PANE_TAB_CLICK_EVENT = 'i_analytics_cohorts'; - -const tabClickHandler = (e) => { - const { hash } = e.currentTarget; - - let tab = null; - - if (hash === `#${COHORTS_PANE}`) { - tab = COHORTS_PANE; - Api.trackRedisHllUserEvent(COHORTS_PANE_TAB_CLICK_EVENT); - } - - const newUrl = mergeUrlParams({ tab }, window.location.href); - historyPushState(newUrl); -}; - -const initTabs = () => { - const tabLinks = document.querySelectorAll('.js-users-tab-item a'); - - if (tabLinks.length) { - tabLinks.forEach((tabLink) => { - tabLink.addEventListener('click', (e) => tabClickHandler(e)); - }); - } -}; - -export default initTabs; |