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
e6e37dc2
Commit
e6e37dc2
authored
Nov 12, 2020
by
Sarah Groff Hennigh-Palermo
Committed by
Denys Mishunov
Nov 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pipeline GraphQL Conversion Part I
parent
ea48c52f
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
68 additions
and
17 deletions
+68
-17
app/assets/javascripts/pages/projects/pipelines/show/index.js
...assets/javascripts/pages/projects/pipelines/show/index.js
+2
-4
app/assets/javascripts/pipelines/pipeline_details_bundle.js
app/assets/javascripts/pipelines/pipeline_details_bundle.js
+39
-11
app/assets/javascripts/pipelines/pipeline_details_dag.js
app/assets/javascripts/pipelines/pipeline_details_dag.js
+3
-2
app/assets/javascripts/pipelines/pipeline_details_graph.js
app/assets/javascripts/pipelines/pipeline_details_graph.js
+7
-0
app/controllers/projects/pipelines_controller.rb
app/controllers/projects/pipelines_controller.rb
+1
-0
config/feature_flags/development/graphql_pipeline_details.yml
...ig/feature_flags/development/graphql_pipeline_details.yml
+7
-0
ee/spec/features/projects/pipelines/pipeline_spec.rb
ee/spec/features/projects/pipelines/pipeline_spec.rb
+1
-0
locale/gitlab.pot
locale/gitlab.pot
+6
-0
spec/features/projects/pipelines/pipeline_spec.rb
spec/features/projects/pipelines/pipeline_spec.rb
+1
-0
spec/features/projects/pipelines/pipelines_spec.rb
spec/features/projects/pipelines/pipelines_spec.rb
+1
-0
No files found.
app/assets/javascripts/pages/projects/pipelines/show/index.js
View file @
e6e37dc2
import
initPipelineDetails
from
'
~/pipelines/pipeline_details_bundle
'
;
import
initPipelines
from
'
../init_pipelines
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
initPipelines
();
initPipelineDetails
();
});
initPipelines
();
initPipelineDetails
();
app/assets/javascripts/pipelines/pipeline_details_bundle.js
View file @
e6e37dc2
...
...
@@ -6,12 +6,10 @@ import { setUrlFragment, redirectTo } from '~/lib/utils/url_utility';
import
pipelineGraph
from
'
./components/graph/graph_component.vue
'
;
import
createDagApp
from
'
./pipeline_details_dag
'
;
import
GraphBundleMixin
from
'
./mixins/graph_pipeline_bundle_mixin
'
;
import
PipelinesMediator
from
'
./pipeline_details_mediator
'
;
import
legacyPipelineHeader
from
'
./components/legacy_header_component.vue
'
;
import
eventHub
from
'
./event_hub
'
;
import
TestReports
from
'
./components/test_reports/test_reports.vue
'
;
import
createTestReportsStore
from
'
./stores/test_reports
'
;
import
{
createPipelineHeaderApp
}
from
'
./pipeline_details_header
'
;
Vue
.
use
(
Translate
);
...
...
@@ -22,7 +20,7 @@ const SELECTORS = {
PIPELINE_TESTS
:
'
#js-pipeline-tests-detail
'
,
};
const
createPipelinesDetailApp
=
mediator
=>
{
const
create
Legacy
PipelinesDetailApp
=
mediator
=>
{
if
(
!
document
.
querySelector
(
SELECTORS
.
PIPELINE_GRAPH
))
{
return
;
}
...
...
@@ -127,18 +125,48 @@ const createTestDetails = () => {
});
};
export
default
()
=>
{
export
default
async
function
()
{
createTestDetails
();
createDagApp
();
const
{
dataset
}
=
document
.
querySelector
(
SELECTORS
.
PIPELINE_DETAILS
);
const
mediator
=
new
PipelinesMediator
({
endpoint
:
dataset
.
endpoint
});
mediator
.
fetchPipeline
();
let
mediator
;
if
(
!
gon
.
features
.
graphqlPipelineHeader
||
!
gon
.
features
.
graphqlPipelineDetails
)
{
try
{
const
{
default
:
PipelinesMediator
}
=
await
import
(
/* webpackChunkName: 'PipelinesMediator' */
'
./pipeline_details_mediator
'
);
mediator
=
new
PipelinesMediator
({
endpoint
:
dataset
.
endpoint
});
mediator
.
fetchPipeline
();
}
catch
{
Flash
(
__
(
'
An error occurred while loading the pipeline.
'
));
}
}
createPipelinesDetailApp
(
mediator
);
if
(
gon
.
features
.
graphqlPipelineDetails
)
{
try
{
const
{
createPipelinesDetailApp
}
=
await
import
(
/* webpackChunkName: 'createPipelinesDetailApp' */
'
./pipeline_details_graph
'
);
createPipelinesDetailApp
();
}
catch
{
Flash
(
__
(
'
An error occurred while loading the pipeline.
'
));
}
}
else
{
createLegacyPipelinesDetailApp
(
mediator
);
}
if
(
gon
.
features
.
graphqlPipelineHeader
)
{
createPipelineHeaderApp
(
SELECTORS
.
PIPELINE_HEADER
);
try
{
const
{
createPipelineHeaderApp
}
=
await
import
(
/* webpackChunkName: 'createPipelineHeaderApp' */
'
./pipeline_details_header
'
);
createPipelineHeaderApp
(
SELECTORS
.
PIPELINE_HEADER
);
}
catch
{
Flash
(
__
(
'
An error occurred while loading a section of this page.
'
));
}
}
else
{
createLegacyPipelineHeaderApp
(
mediator
);
}
createTestDetails
();
createDagApp
();
};
}
app/assets/javascripts/pipelines/pipeline_details_dag.js
View file @
e6e37dc2
...
...
@@ -10,11 +10,12 @@ const apolloProvider = new VueApollo({
});
const
createDagApp
=
()
=>
{
if
(
!
window
.
gon
?.
features
?.
dagPipelineTab
)
{
const
el
=
document
.
querySelector
(
'
#js-pipeline-dag-vue
'
);
if
(
!
window
.
gon
?.
features
?.
dagPipelineTab
||
!
el
)
{
return
;
}
const
el
=
document
.
querySelector
(
'
#js-pipeline-dag-vue
'
);
const
{
pipelineProjectPath
,
pipelineIid
,
emptySvgPath
,
dagDocPath
}
=
el
?.
dataset
;
// eslint-disable-next-line no-new
...
...
app/assets/javascripts/pipelines/pipeline_details_graph.js
0 → 100644
View file @
e6e37dc2
const
createPipelinesDetailApp
=
()
=>
{
// Placeholder. See: https://gitlab.com/gitlab-org/gitlab/-/issues/223262
// eslint-disable-next-line no-useless-return
return
;
};
export
{
createPipelinesDetailApp
};
app/controllers/projects/pipelines_controller.rb
View file @
e6e37dc2
...
...
@@ -16,6 +16,7 @@ class Projects::PipelinesController < Projects::ApplicationController
push_frontend_feature_flag
(
:pipelines_security_report_summary
,
project
)
push_frontend_feature_flag
(
:new_pipeline_form
,
project
)
push_frontend_feature_flag
(
:graphql_pipeline_header
,
project
,
type: :development
,
default_enabled:
false
)
push_frontend_feature_flag
(
:graphql_pipeline_details
,
project
,
type: :development
,
default_enabled:
false
)
push_frontend_feature_flag
(
:new_pipeline_form_prefilled_vars
,
project
,
type: :development
)
end
before_action
:ensure_pipeline
,
only:
[
:show
]
...
...
config/feature_flags/development/graphql_pipeline_details.yml
0 → 100644
View file @
e6e37dc2
---
name
:
graphql_pipeline_details
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46380
rollout_issue_url
:
type
:
development
group
:
group::pipeline authoring
default_enabled
:
false
ee/spec/features/projects/pipelines/pipeline_spec.rb
View file @
e6e37dc2
...
...
@@ -7,6 +7,7 @@ RSpec.describe 'Pipeline', :js do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
stub_feature_flags
(
graphql_pipeline_details:
false
)
sign_in
(
user
)
project
.
add_developer
(
user
)
...
...
locale/gitlab.pot
View file @
e6e37dc2
...
...
@@ -3085,6 +3085,9 @@ msgstr ""
msgid "An error occurred while initializing path locks"
msgstr ""
msgid "An error occurred while loading a section of this page."
msgstr ""
msgid "An error occurred while loading all the files."
msgstr ""
...
...
@@ -3139,6 +3142,9 @@ msgstr ""
msgid "An error occurred while loading the merge request."
msgstr ""
msgid "An error occurred while loading the pipeline."
msgstr ""
msgid "An error occurred while loading the pipelines jobs."
msgstr ""
...
...
spec/features/projects/pipelines/pipeline_spec.rb
View file @
e6e37dc2
...
...
@@ -14,6 +14,7 @@ RSpec.describe 'Pipeline', :js do
before
do
sign_in
(
user
)
project
.
add_role
(
user
,
role
)
stub_feature_flags
(
graphql_pipeline_details:
false
)
end
shared_context
'pipeline builds'
do
...
...
spec/features/projects/pipelines/pipelines_spec.rb
View file @
e6e37dc2
...
...
@@ -12,6 +12,7 @@ RSpec.describe 'Pipelines', :js do
before
do
sign_in
(
user
)
stub_feature_flags
(
graphql_pipeline_details:
false
)
project
.
add_developer
(
user
)
project
.
update!
(
auto_devops_attributes:
{
enabled:
false
})
end
...
...
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