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
4de5a814
Commit
4de5a814
authored
Mar 16, 2021
by
Sarah Groff Hennigh-Palermo
Committed by
Natalia Tepluhina
Mar 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pipeline Graph Structural Update: Unify Apollo Providers
parent
57aa7792
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
26 deletions
+26
-26
app/assets/javascripts/pipelines/components/header_component.vue
...ets/javascripts/pipelines/components/header_component.vue
+7
-1
app/assets/javascripts/pipelines/pipeline_details_bundle.js
app/assets/javascripts/pipelines/pipeline_details_bundle.js
+4
-3
app/assets/javascripts/pipelines/pipeline_details_dag.js
app/assets/javascripts/pipelines/pipeline_details_dag.js
+1
-6
app/assets/javascripts/pipelines/pipeline_details_graph.js
app/assets/javascripts/pipelines/pipeline_details_graph.js
+1
-10
app/assets/javascripts/pipelines/pipeline_details_header.js
app/assets/javascripts/pipelines/pipeline_details_header.js
+2
-6
app/assets/javascripts/pipelines/pipeline_shared_client.js
app/assets/javascripts/pipelines/pipeline_shared_client.js
+11
-0
No files found.
app/assets/javascripts/pipelines/components/header_component.vue
View file @
4de5a814
...
@@ -8,6 +8,7 @@ import cancelPipelineMutation from '../graphql/mutations/cancel_pipeline.mutatio
...
@@ -8,6 +8,7 @@ import cancelPipelineMutation from '../graphql/mutations/cancel_pipeline.mutatio
import
deletePipelineMutation
from
'
../graphql/mutations/delete_pipeline.mutation.graphql
'
;
import
deletePipelineMutation
from
'
../graphql/mutations/delete_pipeline.mutation.graphql
'
;
import
retryPipelineMutation
from
'
../graphql/mutations/retry_pipeline.mutation.graphql
'
;
import
retryPipelineMutation
from
'
../graphql/mutations/retry_pipeline.mutation.graphql
'
;
import
getPipelineQuery
from
'
../graphql/queries/get_pipeline_header_data.query.graphql
'
;
import
getPipelineQuery
from
'
../graphql/queries/get_pipeline_header_data.query.graphql
'
;
import
{
getQueryHeaders
}
from
'
./graph/utils
'
;
const
DELETE_MODAL_ID
=
'
pipeline-delete-modal
'
;
const
DELETE_MODAL_ID
=
'
pipeline-delete-modal
'
;
const
POLL_INTERVAL
=
10000
;
const
POLL_INTERVAL
=
10000
;
...
@@ -34,7 +35,9 @@ export default {
...
@@ -34,7 +35,9 @@ export default {
[
DEFAULT
]:
__
(
'
An unknown error occurred.
'
),
[
DEFAULT
]:
__
(
'
An unknown error occurred.
'
),
},
},
inject
:
{
inject
:
{
// Receive `fullProject` and `pipelinesPath`
graphqlResourceEtag
:
{
default
:
''
,
},
paths
:
{
paths
:
{
default
:
{},
default
:
{},
},
},
...
@@ -47,6 +50,9 @@ export default {
...
@@ -47,6 +50,9 @@ export default {
},
},
apollo
:
{
apollo
:
{
pipeline
:
{
pipeline
:
{
context
()
{
return
getQueryHeaders
(
this
.
graphqlResourceEtag
);
},
query
:
getPipelineQuery
,
query
:
getPipelineQuery
,
variables
()
{
variables
()
{
return
{
return
{
...
...
app/assets/javascripts/pipelines/pipeline_details_bundle.js
View file @
4de5a814
...
@@ -7,6 +7,7 @@ import { reportToSentry } from './components/graph/utils';
...
@@ -7,6 +7,7 @@ import { reportToSentry } from './components/graph/utils';
import
TestReports
from
'
./components/test_reports/test_reports.vue
'
;
import
TestReports
from
'
./components/test_reports/test_reports.vue
'
;
import
GraphBundleMixin
from
'
./mixins/graph_pipeline_bundle_mixin
'
;
import
GraphBundleMixin
from
'
./mixins/graph_pipeline_bundle_mixin
'
;
import
createDagApp
from
'
./pipeline_details_dag
'
;
import
createDagApp
from
'
./pipeline_details_dag
'
;
import
{
apolloProvider
}
from
'
./pipeline_shared_client
'
;
import
createTestReportsStore
from
'
./stores/test_reports
'
;
import
createTestReportsStore
from
'
./stores/test_reports
'
;
Vue
.
use
(
Translate
);
Vue
.
use
(
Translate
);
...
@@ -80,7 +81,7 @@ const createTestDetails = () => {
...
@@ -80,7 +81,7 @@ const createTestDetails = () => {
export
default
async
function
initPipelineDetailsBundle
()
{
export
default
async
function
initPipelineDetailsBundle
()
{
createTestDetails
();
createTestDetails
();
createDagApp
();
createDagApp
(
apolloProvider
);
const
canShowNewPipelineDetails
=
const
canShowNewPipelineDetails
=
gon
.
features
.
graphqlPipelineDetails
||
gon
.
features
.
graphqlPipelineDetailsUsers
;
gon
.
features
.
graphqlPipelineDetails
||
gon
.
features
.
graphqlPipelineDetailsUsers
;
...
@@ -93,7 +94,7 @@ export default async function initPipelineDetailsBundle() {
...
@@ -93,7 +94,7 @@ export default async function initPipelineDetailsBundle() {
/* webpackChunkName: 'createPipelinesDetailApp' */
'
./pipeline_details_graph
'
/* webpackChunkName: 'createPipelinesDetailApp' */
'
./pipeline_details_graph
'
);
);
createPipelinesDetailApp
(
SELECTORS
.
PIPELINE_GRAPH
,
dataset
);
createPipelinesDetailApp
(
SELECTORS
.
PIPELINE_GRAPH
,
apolloProvider
,
dataset
);
}
catch
{
}
catch
{
Flash
(
__
(
'
An error occurred while loading the pipeline.
'
));
Flash
(
__
(
'
An error occurred while loading the pipeline.
'
));
}
}
...
@@ -111,7 +112,7 @@ export default async function initPipelineDetailsBundle() {
...
@@ -111,7 +112,7 @@ export default async function initPipelineDetailsBundle() {
const
{
createPipelineHeaderApp
}
=
await
import
(
const
{
createPipelineHeaderApp
}
=
await
import
(
/* webpackChunkName: 'createPipelineHeaderApp' */
'
./pipeline_details_header
'
/* webpackChunkName: 'createPipelineHeaderApp' */
'
./pipeline_details_header
'
);
);
createPipelineHeaderApp
(
SELECTORS
.
PIPELINE_HEADER
);
createPipelineHeaderApp
(
SELECTORS
.
PIPELINE_HEADER
,
apolloProvider
,
dataset
.
graphqlResourceEtag
);
}
catch
{
}
catch
{
Flash
(
__
(
'
An error occurred while loading a section of this page.
'
));
Flash
(
__
(
'
An error occurred while loading a section of this page.
'
));
}
}
...
...
app/assets/javascripts/pipelines/pipeline_details_dag.js
View file @
4de5a814
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
createDefaultClient
from
'
~/lib/graphql
'
;
import
Dag
from
'
./components/dag/dag.vue
'
;
import
Dag
from
'
./components/dag/dag.vue
'
;
Vue
.
use
(
VueApollo
);
Vue
.
use
(
VueApollo
);
const
apolloProvider
=
new
VueApollo
({
const
createDagApp
=
(
apolloProvider
)
=>
{
defaultClient
:
createDefaultClient
(),
});
const
createDagApp
=
()
=>
{
const
el
=
document
.
querySelector
(
'
#js-pipeline-dag-vue
'
);
const
el
=
document
.
querySelector
(
'
#js-pipeline-dag-vue
'
);
if
(
!
el
)
{
if
(
!
el
)
{
...
...
app/assets/javascripts/pipelines/pipeline_details_graph.js
View file @
4de5a814
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
createDefaultClient
from
'
~/lib/graphql
'
;
import
{
GRAPHQL
}
from
'
./components/graph/constants
'
;
import
{
GRAPHQL
}
from
'
./components/graph/constants
'
;
import
PipelineGraphWrapper
from
'
./components/graph/graph_component_wrapper.vue
'
;
import
PipelineGraphWrapper
from
'
./components/graph/graph_component_wrapper.vue
'
;
import
{
reportToSentry
}
from
'
./components/graph/utils
'
;
import
{
reportToSentry
}
from
'
./components/graph/utils
'
;
Vue
.
use
(
VueApollo
);
Vue
.
use
(
VueApollo
);
const
apolloProvider
=
new
VueApollo
({
defaultClient
:
createDefaultClient
(
{},
{
useGet
:
true
,
},
),
});
const
createPipelinesDetailApp
=
(
const
createPipelinesDetailApp
=
(
selector
,
selector
,
apolloProvider
,
{
pipelineProjectPath
,
pipelineIid
,
metricsPath
,
graphqlResourceEtag
}
=
{},
{
pipelineProjectPath
,
pipelineIid
,
metricsPath
,
graphqlResourceEtag
}
=
{},
)
=>
{
)
=>
{
// eslint-disable-next-line no-new
// eslint-disable-next-line no-new
...
...
app/assets/javascripts/pipelines/pipeline_details_header.js
View file @
4de5a814
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
createDefaultClient
from
'
~/lib/graphql
'
;
import
pipelineHeader
from
'
./components/header_component.vue
'
;
import
pipelineHeader
from
'
./components/header_component.vue
'
;
Vue
.
use
(
VueApollo
);
Vue
.
use
(
VueApollo
);
const
apolloProvider
=
new
VueApollo
({
export
const
createPipelineHeaderApp
=
(
elSelector
,
apolloProvider
,
graphqlResourceEtag
)
=>
{
defaultClient
:
createDefaultClient
(),
});
export
const
createPipelineHeaderApp
=
(
elSelector
)
=>
{
const
el
=
document
.
querySelector
(
elSelector
);
const
el
=
document
.
querySelector
(
elSelector
);
if
(
!
el
)
{
if
(
!
el
)
{
...
@@ -27,6 +22,7 @@ export const createPipelineHeaderApp = (elSelector) => {
...
@@ -27,6 +22,7 @@ export const createPipelineHeaderApp = (elSelector) => {
provide
:
{
provide
:
{
paths
:
{
paths
:
{
fullProject
:
fullPath
,
fullProject
:
fullPath
,
graphqlResourceEtag
,
pipelinesPath
,
pipelinesPath
,
},
},
pipelineId
,
pipelineId
,
...
...
app/assets/javascripts/pipelines/pipeline_shared_client.js
0 → 100644
View file @
4de5a814
import
VueApollo
from
'
vue-apollo
'
;
import
createDefaultClient
from
'
~/lib/graphql
'
;
export
const
apolloProvider
=
new
VueApollo
({
defaultClient
:
createDefaultClient
(
{},
{
useGet
:
true
,
},
),
});
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