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
a51594a1
Commit
a51594a1
authored
Sep 21, 2020
by
Amy Troschinetz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrates to gl-tabs for environments folder view
parent
c634e3df
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
6 deletions
+28
-6
app/assets/javascripts/environments/folder/environments_folder_view.vue
...ascripts/environments/folder/environments_folder_view.vue
+20
-4
changelogs/unreleased/230720-tabs-vue-migrate-app-assets-javascripts-environments-folder-enviro.yml
...ate-app-assets-javascripts-environments-folder-enviro.yml
+5
-0
spec/frontend/environments/folder/environments_folder_view_spec.js
...tend/environments/folder/environments_folder_view_spec.js
+3
-2
No files found.
app/assets/javascripts/environments/folder/environments_folder_view.vue
View file @
a51594a1
<
script
>
import
{
GlBadge
,
GlTab
,
GlTabs
}
from
'
@gitlab/ui
'
;
import
environmentsMixin
from
'
../mixins/environments_mixin
'
;
import
CIPaginationMixin
from
'
../../vue_shared/mixins/ci_pagination_api_mixin
'
;
import
StopEnvironmentModal
from
'
../components/stop_environment_modal.vue
'
;
...
...
@@ -6,8 +7,11 @@ import DeleteEnvironmentModal from '../components/delete_environment_modal.vue';
export
default
{
components
:
{
StopEnvironmentModal
,
DeleteEnvironmentModal
,
GlBadge
,
GlTab
,
GlTabs
,
StopEnvironmentModal
,
},
mixins
:
[
environmentsMixin
,
CIPaginationMixin
],
...
...
@@ -73,9 +77,21 @@ export default {
<b>
{{
folderName
}}
</b>
</h4>
<div
class=
"top-area"
>
<tabs
v-if=
"!isLoading"
:tabs=
"tabs"
scope=
"environments"
@
onChangeTab=
"onChangeTab"
/>
</div>
<gl-tabs
v-if=
"!isLoading"
scope=
"environments"
content-class=
"gl-display-none"
>
<gl-tab
v-for=
"(tab, i) in tabs"
:key=
"`$
{tab.name}-${i}`"
:active="tab.isActive"
:title-item-class="tab.isActive ? 'gl-outline-none' : ''"
:title-link-attributes="{ 'data-testid': `environments-tab-${tab.scope}` }"
@click="onChangeTab(tab.scope)"
>
<template
#title
>
<span>
{{
tab
.
name
}}
</span>
<gl-badge
size=
"sm"
class=
"gl-tab-counter-badge"
>
{{
tab
.
count
}}
</gl-badge>
</
template
>
</gl-tab>
</gl-tabs>
<container
:is-loading=
"isLoading"
...
...
changelogs/unreleased/230720-tabs-vue-migrate-app-assets-javascripts-environments-folder-enviro.yml
0 → 100644
View file @
a51594a1
---
title
:
Migrate environments folder tabs to GlTabs
merge_request
:
42894
author
:
type
:
changed
spec/frontend/environments/folder/environments_folder_view_spec.js
View file @
a51594a1
...
...
@@ -46,9 +46,10 @@ describe('Environments Folder View', () => {
wrapper
=
mount
(
EnvironmentsFolderViewComponent
,
{
propsData
:
mockData
});
};
const
findEnvironmentsTabAvailable
=
()
=>
wrapper
.
find
(
'
.js-environments-tab-available
'
);
const
findEnvironmentsTabAvailable
=
()
=>
wrapper
.
find
(
'
[data-testid="environments-tab-available"]
'
);
const
findEnvironmentsTabStopped
=
()
=>
wrapper
.
find
(
'
.js-environments-tab-stopped
'
);
const
findEnvironmentsTabStopped
=
()
=>
wrapper
.
find
(
'
[data-testid="environments-tab-stopped"]
'
);
beforeEach
(()
=>
{
mock
=
new
MockAdapter
(
axios
);
...
...
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