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
c186cadd
Commit
c186cadd
authored
Aug 23, 2021
by
Sarah GP
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Standardize init file
parent
3ceba6e9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
36 deletions
+64
-36
app/assets/javascripts/pipelines/pipeline_details_bundle.js
app/assets/javascripts/pipelines/pipeline_details_bundle.js
+24
-36
app/assets/javascripts/pipelines/pipeline_test_details.js
app/assets/javascripts/pipelines/pipeline_test_details.js
+34
-0
locale/gitlab.pot
locale/gitlab.pot
+6
-0
No files found.
app/assets/javascripts/pipelines/pipeline_details_bundle.js
View file @
c186cadd
import
Vue
from
'
vue
'
;
import
createFlash
from
'
~/flash
'
;
import
{
parseBoolean
}
from
'
~/lib/utils/common_utils
'
;
import
{
__
}
from
'
~/locale
'
;
import
Translate
from
'
~/vue_shared/translate
'
;
import
TestReports
from
'
./components/test_reports/test_reports.vue
'
;
import
createDagApp
from
'
./pipeline_details_dag
'
;
import
{
createPipelinesDetailApp
}
from
'
./pipeline_details_graph
'
;
import
{
createPipelineHeaderApp
}
from
'
./pipeline_details_header
'
;
import
{
apolloProvider
}
from
'
./pipeline_shared_client
'
;
import
createTestReportsStore
from
'
./stores/test_reports
'
;
Vue
.
use
(
Translate
);
import
{
createTestDetails
}
from
'
./pipeline_test_details
'
;
const
SELECTORS
=
{
PIPELINE_DETAILS
:
'
.js-pipeline-details-vue
'
,
...
...
@@ -19,33 +13,6 @@ const SELECTORS = {
PIPELINE_TESTS
:
'
#js-pipeline-tests-detail
'
,
};
const
createTestDetails
=
()
=>
{
const
el
=
document
.
querySelector
(
SELECTORS
.
PIPELINE_TESTS
);
const
{
blobPath
,
emptyStateImagePath
,
hasTestReport
,
summaryEndpoint
,
suiteEndpoint
}
=
el
?.
dataset
||
{};
const
testReportsStore
=
createTestReportsStore
({
blobPath
,
summaryEndpoint
,
suiteEndpoint
,
});
// eslint-disable-next-line no-new
new
Vue
({
el
,
components
:
{
TestReports
,
},
provide
:
{
emptyStateImagePath
,
hasTestReport
:
parseBoolean
(
hasTestReport
),
},
store
:
testReportsStore
,
render
(
createElement
)
{
return
createElement
(
'
test-reports
'
);
},
});
};
export
default
async
function
initPipelineDetailsBundle
()
{
const
{
dataset
}
=
document
.
querySelector
(
SELECTORS
.
PIPELINE_DETAILS
);
...
...
@@ -65,6 +32,27 @@ export default async function initPipelineDetailsBundle() {
});
}
createDagApp
(
apolloProvider
);
createTestDetails
();
try
{
createPipelineHeaderApp
(
SELECTORS
.
PIPELINE_HEADER
,
apolloProvider
,
dataset
.
graphqlResourceEtag
);
}
catch
{
createFlash
({
message
:
__
(
'
An error occurred while loading a section of this page.
'
),
});
}
try
{
createDagApp
(
apolloProvider
);
}
catch
{
createFlash
({
message
:
__
(
'
An error occurred while loading the Needs tab.
'
),
});
}
try
{
createTestDetails
(
SELECTORS
.
PIPELINE_TESTS
);
}
catch
{
createFlash
({
message
:
__
(
'
An error occurred while loading the Test Reports tab.
'
),
});
}
}
app/assets/javascripts/pipelines/pipeline_test_details.js
0 → 100644
View file @
c186cadd
import
Vue
from
'
vue
'
;
import
{
parseBoolean
}
from
'
~/lib/utils/common_utils
'
;
import
Translate
from
'
~/vue_shared/translate
'
;
import
TestReports
from
'
./components/test_reports/test_reports.vue
'
;
import
createTestReportsStore
from
'
./stores/test_reports
'
;
Vue
.
use
(
Translate
);
export
const
createTestDetails
=
(
selector
)
=>
{
const
el
=
document
.
querySelector
(
selector
);
const
{
blobPath
,
emptyStateImagePath
,
hasTestReport
,
summaryEndpoint
,
suiteEndpoint
}
=
el
?.
dataset
||
{};
const
testReportsStore
=
createTestReportsStore
({
blobPath
,
summaryEndpoint
,
suiteEndpoint
,
});
// eslint-disable-next-line no-new
new
Vue
({
el
,
components
:
{
TestReports
,
},
provide
:
{
emptyStateImagePath
,
hasTestReport
:
parseBoolean
(
hasTestReport
),
},
store
:
testReportsStore
,
render
(
createElement
)
{
return
createElement
(
'
test-reports
'
);
},
});
};
locale/gitlab.pot
View file @
c186cadd
...
...
@@ -3698,6 +3698,12 @@ msgstr ""
msgid "An error occurred while loading merge requests."
msgstr ""
msgid "An error occurred while loading the Needs tab."
msgstr ""
msgid "An error occurred while loading the Test Reports tab."
msgstr ""
msgid "An error occurred while loading the access tokens form, please try again."
msgstr ""
...
...
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