• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moosetechnology / GitProjectHealth / 16020007540

02 Jul 2025 08:25AM UTC coverage: 74.906% (+0.5%) from 74.453%
16020007540

Pull #209

github

web-flow
Merge pull request #215 from moosetechnology/fix-commit-distributions

fixing commit not sort and comparing commit within different time zone
Pull Request #209: Update with correct average for notes

654 of 1074 new or added lines in 8 files covered. (60.89%)

52 existing lines in 2 files now uncovered.

17567 of 23452 relevant lines covered (74.91%)

0.75 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/GitLabHealth-Model-Visualization/GLHGroupVisualization.class.st
1
Class {
2
        #name : #GLHGroupVisualization,
3
        #superclass : #MiAbstractVisualization,
4
        #instVars : [
5
                'noPipelineColor',
6
                'passingPipelineColor',
7
                'failingPipelinecolor'
8
        ],
9
        #category : #'GitLabHealth-Model-Visualization'
10
}
11

12
{ #category : #running }
NEW
13
GLHGroupVisualization >> createLegend [
×
NEW
14

×
NEW
15
        | legend |
×
NEW
16
        legend := RSLegend new.
×
NEW
17
        legend
×
NEW
18
                text: 'Repository with last pipeline passing'
×
NEW
19
                withBoxColor: self passingPipelineColor.
×
NEW
20
        legend
×
NEW
21
                text: 'Repository with last Pipeline failing'
×
NEW
22
                withBoxColor: self failingPipelinecolor.
×
NEW
23
        legend
×
NEW
24
                text: 'Repository without pipeline'
×
NEW
25
                withBoxColor: self noPipelineColor.
×
NEW
26

×
NEW
27
        legend legendDo: [ :l |
×
NEW
28
                l
×
NEW
29
                        draggable;
×
NEW
30
                        withBorder;
×
NEW
31
                        padding: 20 ].
×
NEW
32
        legend location right middle.
×
NEW
33

×
NEW
34
        ^ legend
×
NEW
35
]
×
36

37
{ #category : #running }
NEW
38
GLHGroupVisualization >> createShapeFor: project [
×
NEW
39

×
NEW
40
        | box inspect |
×
NEW
41

×
NEW
42
        box := RSBox new
×
NEW
43
                       size: 5;
×
NEW
44
                       model: project;
×
NEW
45
                       yourself.
×
NEW
46
        box color: (project lastPipeline
×
NEW
47
                ifNil: [ self noPipelineColor ]
×
NEW
48
                ifNotNil: [ :lastPipeline |
×
NEW
49
                        (lastPipeline status = #success)
×
NEW
50
                                ifTrue: [ Color green ]
×
NEW
51
                                ifFalse: [ Color red ]
×
NEW
52
                ]).
×
NEW
53

×
NEW
54
        inspect := RSInspectableInteraction new.
×
NEW
55
        inspect inspectShapeBlock: [ :proj |
×
NEW
56
                proj inspect.
×
NEW
57
                "block must return a Window :-("
×
NEW
58
                SystemWindow  new
×
NEW
59
        ].
×
NEW
60
        box @ inspect.
×
NEW
61

×
NEW
62
        box @ (RSPopup text: [ :proj |
×
NEW
63
                String streamContents: [ :st | 
×
NEW
64
                        st << proj name ;  cr ; << 'on: '.
×
NEW
65
                        BasicDatePrinter default printYMD: proj lastPipelineDate withLeadingSpace: false on: st.
×
NEW
66
                        st space.
×
NEW
67
                        BasicDatePrinter default printHMS: proj lastPipelineDate separatedBy: $: on: st ] ]).
×
NEW
68

×
NEW
69
        ^ box
×
NEW
70
]
×
71

72
{ #category : #running }
NEW
73
GLHGroupVisualization >> createShapes: aGLHGroup [
×
NEW
74

×
NEW
75
        ^(aGLHGroup allToScope: GLHGroup) collect: [ :group || lbl projects composite |
×
NEW
76
                projects := (group projects sorted: [:a :b | a lastPipelineDate > b lastPipelineDate])
×
NEW
77
                        collect: [ :project | self createShapeFor: project ]
×
NEW
78
                        as: RSGroup.
×
NEW
79

×
NEW
80
                RSGridLayout on: projects.
×
NEW
81
                lbl := RSLabel new
×
NEW
82
                                 text: group name;
×
NEW
83
                                 color: Color white;
×
NEW
84
                                 yourself.
×
NEW
85

×
NEW
86
                RSLocation new
×
NEW
87
                        above;
×
NEW
88
                        move: lbl on: projects.
×
NEW
89
                composite := RSComposite new.
×
NEW
90
                composite @ RSAnimatedPopup @ RSDraggable.
×
NEW
91

×
NEW
92
                composite
×
NEW
93
                        color: Color gray;
×
NEW
94
                        model: group;
×
NEW
95
                        shapes: projects , { lbl }.
×
NEW
96
                composite padding: 10.
×
NEW
97
                composite
×
NEW
98
        ]
×
NEW
99
]
×
100

101
{ #category : #accessing }
NEW
102
GLHGroupVisualization >> failingPipelinecolor [
×
NEW
103

×
NEW
104
        ^ failingPipelinecolor
×
NEW
105
]
×
106

107
{ #category : #accessing }
NEW
108
GLHGroupVisualization >> failingPipelinecolor: anObject [
×
NEW
109

×
NEW
110
        failingPipelinecolor := anObject
×
NEW
111
]
×
112

113
{ #category : #running }
NEW
114
GLHGroupVisualization >> forGroup: aGLHGroups [
×
NEW
115

×
NEW
116
        | c shapes legend |
×
NEW
117
        c := RSCanvas new.
×
NEW
118

×
NEW
119
        shapes := aGLHGroups flatCollect: [ :group |
×
NEW
120
                          self createShapes: group ].
×
NEW
121
        c addAll: shapes.
×
NEW
122

×
NEW
123
        c @ RSCanvasController.
×
NEW
124
        RSLineBuilder orthoHorizontal
×
NEW
125
                markerEnd: (RSMarker new
×
NEW
126
                                 offset: 2;
×
NEW
127
                                 shape: (RSShapeFactory triangle
×
NEW
128
                                                  color: Color black;
×
NEW
129
                                                  size: 5;
×
NEW
130
                                                  yourself));
×
NEW
131
                attachPoint: RSHorizontalAttachPoint new;
×
NEW
132
                canvas: c;
×
NEW
133
                shapes: c nodes;
×
NEW
134
                connectFrom: #group.
×
NEW
135
        RSHorizontalVanDerPloegTreeLayout new on: c nodes.
×
NEW
136

×
NEW
137
        legend := self createLegend.
×
NEW
138
        legend container: c.
×
NEW
139
        legend build.
×
NEW
140

×
NEW
141
        ^ c
×
NEW
142
]
×
143

144
{ #category : #initialization }
NEW
145
GLHGroupVisualization >> initialize [
×
NEW
146

×
NEW
147
        super initialize.
×
NEW
148

×
NEW
149
        noPipelineColor := Color purple lighter.
×
NEW
150
        passingPipelineColor := Color green.
×
NEW
151
        failingPipelinecolor := Color red
×
NEW
152
]
×
153

154
{ #category : #accessing }
NEW
155
GLHGroupVisualization >> noPipelineColor [
×
NEW
156

×
NEW
157
        ^ noPipelineColor
×
NEW
158
]
×
159

160
{ #category : #accessing }
NEW
161
GLHGroupVisualization >> noPipelineColor: anObject [
×
NEW
162

×
NEW
163
        noPipelineColor := anObject
×
NEW
164
]
×
165

166
{ #category : #accessing }
NEW
167
GLHGroupVisualization >> passingPipelineColor [
×
NEW
168

×
NEW
169
        ^ passingPipelineColor
×
NEW
170
]
×
171

172
{ #category : #accessing }
NEW
173
GLHGroupVisualization >> passingPipelineColor: anObject [
×
NEW
174

×
NEW
175
        passingPipelineColor := anObject
×
NEW
176
]
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc