diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-19 17:16:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-19 17:16:28 +0300 |
commit | e4384360a16dd9a19d4d2d25d0ef1f2b862ed2a6 (patch) | |
tree | 2fcdfa7dcdb9db8f5208b2562f4b4e803d671243 /app/assets/javascripts/monitoring/components/graph_group.vue | |
parent | ffda4e7bcac36987f936b4ba515995a6698698f0 (diff) |
Add latest changes from gitlab-org/gitlab@16-2-stable-eev16.2.0-rc42
Diffstat (limited to 'app/assets/javascripts/monitoring/components/graph_group.vue')
-rw-r--r-- | app/assets/javascripts/monitoring/components/graph_group.vue | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/app/assets/javascripts/monitoring/components/graph_group.vue b/app/assets/javascripts/monitoring/components/graph_group.vue deleted file mode 100644 index 74a806c50a9..00000000000 --- a/app/assets/javascripts/monitoring/components/graph_group.vue +++ /dev/null @@ -1,87 +0,0 @@ -<script> -import { GlLoadingIcon, GlIcon } from '@gitlab/ui'; - -export default { - components: { - GlLoadingIcon, - GlIcon, - }, - props: { - name: { - type: String, - required: true, - }, - showPanels: { - type: Boolean, - required: false, - default: true, - }, - isLoading: { - type: Boolean, - required: false, - default: false, - }, - /** - * Initial value of collapse on mount. - */ - collapseGroup: { - type: Boolean, - required: false, - default: false, - }, - }, - data() { - return { - isCollapsed: this.collapseGroup, - }; - }, - computed: { - caretIcon() { - return this.isCollapsed ? 'chevron-lg-right' : 'chevron-lg-down'; - }, - }, - watch: { - collapseGroup(val) { - // Respond to changes in collapseGroup but do not - // collapse it once was opened by the user. - if (this.showPanels && !val) { - this.isCollapsed = false; - } - }, - }, - methods: { - collapse() { - this.isCollapsed = !this.isCollapsed; - }, - }, -}; -</script> - -<template> - <div v-if="showPanels" ref="graph-group" class="card prometheus-panel"> - <div class="card-header d-flex align-items-center"> - <h4 class="flex-grow-1">{{ name }}</h4> - <gl-loading-icon v-if="isLoading" size="sm" name="loading" /> - <a - data-testid="group-toggle-button" - :aria-label="__('Toggle collapse')" - :icon="caretIcon" - role="button" - class="js-graph-group-toggle gl-display-flex gl-ml-2 gl-text-gray-900" - tabindex="0" - @click="collapse" - @keyup.enter="collapse" - > - <gl-icon :name="caretIcon" /> - </a> - </div> - <div - v-show="!isCollapsed" - ref="graph-group-content" - class="card-body prometheus-graph-group p-0" - > - <slot></slot> - </div> - </div> - <div v-else ref="graph-group-content" class="prometheus-graph-group"><slot></slot></div> -</template> |