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
7de5845a
Commit
7de5845a
authored
Apr 05, 2021
by
pburdette
Committed by
Payton Burdette
Apr 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove new pipelines table ff
Remove the feature flag and some instances of it in the codebase.
parent
bda20332
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
10 additions
and
129 deletions
+10
-129
app/assets/javascripts/commit/pipelines/pipelines_table.vue
app/assets/javascripts/commit/pipelines/pipelines_table.vue
+1
-5
app/assets/javascripts/pipelines/components/pipelines_list/pipeline_triggerer.vue
...ipelines/components/pipelines_list/pipeline_triggerer.vue
+1
-9
app/assets/javascripts/pipelines/components/pipelines_list/pipeline_url.vue
...ipts/pipelines/components/pipelines_list/pipeline_url.vue
+1
-9
app/assets/javascripts/pipelines/components/pipelines_list/pipelines_table.vue
...s/pipelines/components/pipelines_list/pipelines_table.vue
+0
-36
app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue
...ascripts/pipelines/components/pipelines_list/time_ago.vue
+2
-11
app/controllers/projects/commit_controller.rb
app/controllers/projects/commit_controller.rb
+0
-6
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+0
-1
app/controllers/projects/pipelines_controller.rb
app/controllers/projects/pipelines_controller.rb
+0
-1
spec/frontend/pipelines/pipelines_table_spec.js
spec/frontend/pipelines/pipelines_table_spec.js
+5
-51
No files found.
app/assets/javascripts/commit/pipelines/pipelines_table.vue
View file @
7de5845a
...
...
@@ -90,9 +90,6 @@ export default {
canRenderPipelineButton
()
{
return
this
.
latestPipelineDetachedFlag
;
},
pipelineButtonClass
()
{
return
!
this
.
glFeatures
.
newPipelinesTable
?
'
gl-md-display-none
'
:
'
gl-lg-display-none
'
;
},
isForkMergeRequest
()
{
return
this
.
sourceProjectFullPath
!==
this
.
targetProjectFullPath
;
},
...
...
@@ -195,8 +192,7 @@ export default {
<gl-button
v-if=
"canRenderPipelineButton"
block
class=
"gl-mt-3 gl-mb-3"
:class=
"pipelineButtonClass"
class=
"gl-mt-3 gl-mb-3 gl-lg-display-none"
variant=
"confirm"
data-testid=
"run_pipeline_button_mobile"
:loading=
"state.isRunningMergeRequestPipeline"
...
...
app/assets/javascripts/pipelines/components/pipelines_list/pipeline_triggerer.vue
View file @
7de5845a
...
...
@@ -17,19 +17,11 @@ export default {
user
()
{
return
this
.
pipeline
.
user
;
},
classes
()
{
const
triggererClass
=
'
pipeline-triggerer
'
;
if
(
this
.
glFeatures
.
newPipelinesTable
)
{
return
triggererClass
;
}
return
`table-section section-10 d-none d-md-block
${
triggererClass
}
`
;
},
},
};
</
script
>
<
template
>
<div
:class=
"classes
"
data-testid=
"pipeline-triggerer"
>
<div
class=
"pipeline-triggerer
"
data-testid=
"pipeline-triggerer"
>
<user-avatar-link
v-if=
"user"
:link-href=
"user.path"
...
...
app/assets/javascripts/pipelines/components/pipelines_list/pipeline_url.vue
View file @
7de5845a
...
...
@@ -49,19 +49,11 @@ export default {
autoDevopsHelpPath
()
{
return
helpPagePath
(
'
topics/autodevops/index.md
'
);
},
classes
()
{
const
tagsClass
=
'
pipeline-tags
'
;
if
(
this
.
glFeatures
.
newPipelinesTable
)
{
return
tagsClass
;
}
return
`table-section section-10 d-none d-md-block
${
tagsClass
}
`
;
},
},
};
</
script
>
<
template
>
<div
:class=
"classe
s"
data-testid=
"pipeline-url-table-cell"
>
<div
class=
"pipeline-tag
s"
data-testid=
"pipeline-url-table-cell"
>
<gl-link
:href=
"pipeline.path"
data-testid=
"pipeline-url-link"
...
...
app/assets/javascripts/pipelines/components/pipelines_list/pipelines_table.vue
View file @
7de5845a
<
script
>
import
{
GlTable
,
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
{
s__
}
from
'
~/locale
'
;
import
glFeatureFlagMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
eventHub
from
'
../../event_hub
'
;
import
PipelineMiniGraph
from
'
./pipeline_mini_graph.vue
'
;
import
PipelineOperations
from
'
./pipeline_operations.vue
'
;
...
...
@@ -91,7 +90,6 @@ export default {
directives
:
{
GlTooltip
:
GlTooltipDirective
,
},
mixins
:
[
glFeatureFlagMixin
()],
props
:
{
pipelines
:
{
type
:
Array
,
...
...
@@ -149,41 +147,7 @@ export default {
</
script
>
<
template
>
<div
class=
"ci-table"
>
<div
v-if=
"!glFeatures.newPipelinesTable"
data-testid=
"legacy-ci-table"
>
<div
class=
"gl-responsive-table-row table-row-header"
role=
"row"
>
<div
class=
"table-section section-10 js-pipeline-status"
role=
"rowheader"
>
{{
s__
(
'
Pipeline|Status
'
)
}}
</div>
<div
class=
"table-section section-10 js-pipeline-info pipeline-info"
role=
"rowheader"
>
{{
s__
(
'
Pipeline|Pipeline
'
)
}}
</div>
<div
class=
"table-section section-10 js-triggerer-info triggerer-info"
role=
"rowheader"
>
{{
s__
(
'
Pipeline|Triggerer
'
)
}}
</div>
<div
class=
"table-section section-20 js-pipeline-commit pipeline-commit"
role=
"rowheader"
>
{{
s__
(
'
Pipeline|Commit
'
)
}}
</div>
<div
class=
"table-section section-15 js-pipeline-stages pipeline-stages"
role=
"rowheader"
>
{{
s__
(
'
Pipeline|Stages
'
)
}}
</div>
<div
class=
"table-section section-15"
role=
"rowheader"
></div>
<div
class=
"table-section section-20"
role=
"rowheader"
>
<slot
name=
"table-header-actions"
></slot>
</div>
</div>
<pipelines-table-row-component
v-for=
"model in pipelines"
:key=
"model.id"
:pipeline=
"model"
:pipeline-schedule-url=
"pipelineScheduleUrl"
:update-graph-dropdown=
"updateGraphDropdown"
:view-type=
"viewType"
:canceling-pipeline=
"cancelingPipeline"
/>
</div>
<gl-table
v-else
:fields=
"$options.fields"
:items=
"pipelines"
tbody-tr-class=
"commit"
...
...
app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue
View file @
7de5845a
...
...
@@ -48,12 +48,6 @@ export default {
return
`
${
hh
}
:
${
mm
}
:
${
ss
}
`
;
},
legacySectionClass
()
{
return
!
this
.
glFeatures
.
newPipelinesTable
?
'
table-section section-15
'
:
''
;
},
legacyTableMobileClass
()
{
return
!
this
.
glFeatures
.
newPipelinesTable
?
'
table-mobile-content
'
:
''
;
},
showInProgress
()
{
return
!
this
.
duration
&&
!
this
.
finishedTime
&&
!
this
.
skipped
;
},
...
...
@@ -64,11 +58,8 @@ export default {
};
</
script
>
<
template
>
<div
:class=
"legacySectionClass"
>
<div
v-if=
"!glFeatures.newPipelinesTable"
class=
"table-mobile-header"
role=
"rowheader"
>
{{
s__
(
'
Pipeline|Duration
'
)
}}
</div>
<div
:class=
"legacyTableMobileClass"
>
<div>
<div>
<span
v-if=
"showInProgress"
data-testid=
"pipeline-in-progress"
>
<gl-icon
v-if=
"stuck"
...
...
app/controllers/projects/commit_controller.rb
View file @
7de5845a
...
...
@@ -54,8 +54,6 @@ class Projects::CommitController < Projects::ApplicationController
# rubocop: disable CodeReuse/ActiveRecord
def
pipelines
set_pipeline_feature_flag
@pipelines
=
@commit
.
pipelines
.
order
(
id: :desc
)
@pipelines
=
@pipelines
.
where
(
ref:
params
[
:ref
]).
page
(
params
[
:page
]).
per
(
30
)
if
params
[
:ref
]
...
...
@@ -135,10 +133,6 @@ class Projects::CommitController < Projects::ApplicationController
private
def
set_pipeline_feature_flag
push_frontend_feature_flag
(
:new_pipelines_table
,
@project
,
default_enabled: :yaml
)
end
def
create_new_branch?
params
[
:create_merge_request
].
present?
||
!
can?
(
current_user
,
:push_code
,
@project
)
end
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
7de5845a
...
...
@@ -40,7 +40,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
push_frontend_feature_flag
(
:codequality_backend_comparison
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:local_file_reviews
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:paginated_notes
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:new_pipelines_table
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:confidential_notes
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:usage_data_i_testing_summary_widget_total
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:improved_emoji_picker
,
project
,
default_enabled: :yaml
)
...
...
app/controllers/projects/pipelines_controller.rb
View file @
7de5845a
...
...
@@ -19,7 +19,6 @@ class Projects::PipelinesController < Projects::ApplicationController
push_frontend_feature_flag
(
:graphql_pipeline_details
,
project
,
type: :development
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:graphql_pipeline_details_users
,
current_user
,
type: :development
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:jira_for_vulnerabilities
,
project
,
type: :development
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:new_pipelines_table
,
project
,
default_enabled: :yaml
)
end
before_action
:ensure_pipeline
,
only:
[
:show
]
...
...
spec/frontend/pipelines/pipelines_table_spec.js
View file @
7de5845a
...
...
@@ -30,23 +30,17 @@ describe('Pipelines Table', () => {
return
pipelines
.
find
((
p
)
=>
p
.
user
!==
null
&&
p
.
commit
!==
null
);
};
const
createComponent
=
(
props
=
{}
,
flagState
=
false
)
=>
{
const
createComponent
=
(
props
=
{})
=>
{
wrapper
=
extendedWrapper
(
mount
(
PipelinesTable
,
{
propsData
:
{
...
defaultProps
,
...
props
,
},
provide
:
{
glFeatures
:
{
newPipelinesTable
:
flagState
,
},
},
}),
);
};
const
findRows
=
()
=>
wrapper
.
findAll
(
'
.commit.gl-responsive-table-row
'
);
const
findGlTable
=
()
=>
wrapper
.
findComponent
(
GlTable
);
const
findStatusBadge
=
()
=>
wrapper
.
findComponent
(
PipelinesStatusBadge
);
const
findPipelineInfo
=
()
=>
wrapper
.
findComponent
(
PipelineUrl
);
...
...
@@ -56,8 +50,7 @@ describe('Pipelines Table', () => {
const
findTimeAgo
=
()
=>
wrapper
.
findComponent
(
PipelinesTimeago
);
const
findActions
=
()
=>
wrapper
.
findComponent
(
PipelineOperations
);
const
findLegacyTable
=
()
=>
wrapper
.
findByTestId
(
'
legacy-ci-table
'
);
const
findTableRows
=
()
=>
wrapper
.
findAll
(
'
[data-testid="pipeline-table-row"]
'
);
const
findTableRows
=
()
=>
wrapper
.
findAllByTestId
(
'
pipeline-table-row
'
);
const
findStatusTh
=
()
=>
wrapper
.
findByTestId
(
'
status-th
'
);
const
findPipelineTh
=
()
=>
wrapper
.
findByTestId
(
'
pipeline-th
'
);
const
findTriggererTh
=
()
=>
wrapper
.
findByTestId
(
'
triggerer-th
'
);
...
...
@@ -75,52 +68,13 @@ describe('Pipelines Table', () => {
wrapper
=
null
;
});
describe
(
'
table with feature flag off
'
,
()
=>
{
describe
(
'
renders the table correctly
'
,
()
=>
{
beforeEach
(()
=>
{
createComponent
();
});
it
(
'
should render a table
'
,
()
=>
{
expect
(
wrapper
.
classes
()).
toContain
(
'
ci-table
'
);
});
it
(
'
should render table head with correct columns
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
.table-section.js-pipeline-status
'
).
text
()).
toEqual
(
'
Status
'
);
expect
(
wrapper
.
find
(
'
.table-section.js-pipeline-info
'
).
text
()).
toEqual
(
'
Pipeline
'
);
expect
(
wrapper
.
find
(
'
.table-section.js-pipeline-commit
'
).
text
()).
toEqual
(
'
Commit
'
);
expect
(
wrapper
.
find
(
'
.table-section.js-pipeline-stages
'
).
text
()).
toEqual
(
'
Stages
'
);
});
});
describe
(
'
without data
'
,
()
=>
{
it
(
'
should render an empty table
'
,
()
=>
{
createComponent
();
expect
(
findRows
()).
toHaveLength
(
0
);
});
});
describe
(
'
with data
'
,
()
=>
{
it
(
'
should render rows
'
,
()
=>
{
createComponent
({
pipelines
:
[
pipeline
],
viewType
:
'
root
'
});
expect
(
findRows
()).
toHaveLength
(
1
);
});
});
});
describe
(
'
table with feature flag on
'
,
()
=>
{
describe
(
'
Pipelines Table
'
,
()
=>
{
beforeEach
(()
=>
{
createComponent
({
pipelines
:
[
pipeline
],
viewType
:
'
root
'
}
,
true
);
createComponent
({
pipelines
:
[
pipeline
],
viewType
:
'
root
'
});
});
it
(
'
displays
new
table
'
,
()
=>
{
it
(
'
displays table
'
,
()
=>
{
expect
(
findGlTable
().
exists
()).
toBe
(
true
);
expect
(
findLegacyTable
().
exists
()).
toBe
(
false
);
});
it
(
'
should render table head with correct columns
'
,
()
=>
{
...
...
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