gitlab-radiator 4.1.4 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/package.json +11 -11
- package/public/client.js +1 -1
- package/public/client.less +32 -0
- package/src/app.js +1 -0
- package/src/config.js +1 -0
- package/src/gitlab/pipelines.js +3 -3
package/public/client.less
CHANGED
|
@@ -228,6 +228,38 @@ ol.jobs {
|
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
+
.horizontal {
|
|
232
|
+
.stages {
|
|
233
|
+
flex-direction: column;
|
|
234
|
+
flex-wrap: nowrap;
|
|
235
|
+
flex-grow: 1;
|
|
236
|
+
|
|
237
|
+
.stage {
|
|
238
|
+
flex-wrap: nowrap;
|
|
239
|
+
align-items: flex-start;
|
|
240
|
+
flex-direction: row;
|
|
241
|
+
|
|
242
|
+
.name {
|
|
243
|
+
min-width: 170px;
|
|
244
|
+
margin-top: 6px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.jobs {
|
|
248
|
+
flex-direction: row;
|
|
249
|
+
flex-wrap: wrap;
|
|
250
|
+
|
|
251
|
+
li {
|
|
252
|
+
margin-right: 5px;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
:last-child {
|
|
256
|
+
margin-bottom: 5px;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
231
263
|
ol.groups {
|
|
232
264
|
list-style: none;
|
|
233
265
|
width: 100vmax;
|
package/src/app.js
CHANGED
package/src/config.js
CHANGED
|
@@ -11,6 +11,7 @@ config.interval = Number(config.interval || 10) * 1000
|
|
|
11
11
|
config.port = Number(config.port || 3000)
|
|
12
12
|
config.zoom = Number(config.zoom || 1.0)
|
|
13
13
|
config.columns = Number(config.columns || 1)
|
|
14
|
+
config.horizontal = config.horizontal || false
|
|
14
15
|
config.groupSuccessfulProjects = config.groupSuccessfulProjects || false
|
|
15
16
|
config.projectsOrder = config.projectsOrder || ['name']
|
|
16
17
|
config.gitlabs = config.gitlabs.map((gitlab) => {
|
package/src/gitlab/pipelines.js
CHANGED
|
@@ -44,11 +44,11 @@ async function fetchPipelines(projectId, config, options) {
|
|
|
44
44
|
|
|
45
45
|
async function fetchDownstreamJobs(projectId, pipelineId, config) {
|
|
46
46
|
const {data: gitlabBridgeJobs} = await gitlabRequest(`/projects/${projectId}/pipelines/${pipelineId}/bridges`, {per_page: 100}, config)
|
|
47
|
-
const childPipelines = gitlabBridgeJobs.filter(bridge => bridge.downstream_pipeline.status !== 'skipped')
|
|
47
|
+
const childPipelines = gitlabBridgeJobs.filter(bridge => bridge.downstream_pipeline !== null && bridge.downstream_pipeline.status !== 'skipped')
|
|
48
48
|
|
|
49
49
|
const downstreamStages = []
|
|
50
50
|
for(const childPipeline of childPipelines) {
|
|
51
|
-
const {stages} = await fetchJobs(
|
|
51
|
+
const {stages} = await fetchJobs(childPipeline.downstream_pipeline.project_id, childPipeline.downstream_pipeline.id, config)
|
|
52
52
|
downstreamStages.push(stages.map(stage => ({
|
|
53
53
|
...stage,
|
|
54
54
|
name: `${childPipeline.stage}:${stage.name}`
|
|
@@ -60,7 +60,7 @@ async function fetchDownstreamJobs(projectId, pipelineId, config) {
|
|
|
60
60
|
async function fetchJobs(projectId, pipelineId, config) {
|
|
61
61
|
const {data: gitlabJobs} = await gitlabRequest(`/projects/${projectId}/pipelines/${pipelineId}/jobs?include_retried=true`, {per_page: 100}, config)
|
|
62
62
|
if (gitlabJobs.length === 0) {
|
|
63
|
-
return {}
|
|
63
|
+
return {commit: undefined, stages: []}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
const commit = findCommit(gitlabJobs)
|