diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-01 00:10:12 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-01 00:10:12 +0300 |
commit | 8bb9ee876910bf5a14e116ace9ec95791486a78a (patch) | |
tree | 7e2ad1f15f11dcbb5b45b2a581b7d720c272885d /app/assets/javascripts/snippets | |
parent | 04338021ada9669bcf8d6cf2d35b0debf50e8cc1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/snippets')
-rw-r--r-- | app/assets/javascripts/snippets/components/edit.vue | 4 | ||||
-rw-r--r-- | app/assets/javascripts/snippets/components/show.vue | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/app/assets/javascripts/snippets/components/edit.vue b/app/assets/javascripts/snippets/components/edit.vue index 95d2bb0698b..896ab900fd7 100644 --- a/app/assets/javascripts/snippets/components/edit.vue +++ b/app/assets/javascripts/snippets/components/edit.vue @@ -21,6 +21,7 @@ import { import SnippetBlobEdit from './snippet_blob_edit.vue'; import SnippetVisibilityEdit from './snippet_visibility_edit.vue'; import SnippetDescriptionEdit from './snippet_description_edit.vue'; +import { SNIPPET_MARK_EDIT_APP_START } from '~/performance_constants'; export default { components: { @@ -106,6 +107,9 @@ export default { return `${this.isProjectSnippet ? 'project' : 'personal'}_snippet_description`; }, }, + beforeCreate() { + performance.mark(SNIPPET_MARK_EDIT_APP_START); + }, created() { window.addEventListener('beforeunload', this.onBeforeUnload); }, diff --git a/app/assets/javascripts/snippets/components/show.vue b/app/assets/javascripts/snippets/components/show.vue index 430c701ae95..d0df0ef7b77 100644 --- a/app/assets/javascripts/snippets/components/show.vue +++ b/app/assets/javascripts/snippets/components/show.vue @@ -9,6 +9,8 @@ import { GlLoadingIcon } from '@gitlab/ui'; import { getSnippetMixin } from '../mixins/snippets'; import { SNIPPET_VISIBILITY_PUBLIC } from '~/snippets/constants'; +import { SNIPPET_MARK_VIEW_APP_START } from '~/performance_constants'; + export default { components: { BlobEmbeddable, @@ -27,6 +29,9 @@ export default { return Boolean(this.snippet.sshUrlToRepo || this.snippet.httpUrlToRepo); }, }, + beforeCreate() { + performance.mark(SNIPPET_MARK_VIEW_APP_START); + }, }; </script> <template> |