iguazio.dashboard-controls 1.0.13 → 1.1.1
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/dist/i18n/en/common.json +95 -83
- package/dist/i18n/en/functions.json +110 -109
- package/dist/js/iguazio.dashboard-controls.js +6660 -5230
- package/dist/less/iguazio.dashboard-controls.less +1430 -881
- package/package.json +1 -1
- package/src/i18n/en/common.json +95 -83
- package/src/i18n/en/functions.json +110 -109
- package/src/igz_controls/components/date-time-picker/date-time-picker.component.js +689 -0
- package/src/igz_controls/components/date-time-picker/date-time-picker.component.spec.js +356 -0
- package/src/igz_controls/components/date-time-picker/date-time-picker.less +418 -0
- package/src/igz_controls/components/date-time-picker/date-time-picker.tpl.html +90 -0
- package/src/igz_controls/components/date-time-picker/prevent-parent-scroll.directive.js +27 -0
- package/src/igz_controls/components/log-table-row/log-table-row.component.js +57 -0
- package/src/igz_controls/components/log-table-row/log-table-row.component.spec.js +49 -0
- package/src/igz_controls/components/log-table-row/log-table-row.less +29 -0
- package/src/igz_controls/components/log-table-row/log-table-row.tpl.html +16 -0
- package/src/igz_controls/components/multiple-checkboxes/multiple-checkboxes.component.js +39 -5
- package/src/igz_controls/services/control-panel-logs-data.service.js +203 -0
- package/src/nuclio/common/components/deploy-log/deploy-log.component.js +1 -1
- package/src/nuclio/common/services/export.service.js +28 -5
- package/src/nuclio/functions/version/version-execution-log/version-execution-log.component.js +463 -0
- package/src/nuclio/functions/version/version-execution-log/version-execution-log.less +99 -0
- package/src/nuclio/functions/version/version-execution-log/version-execution-log.tpl.html +177 -0
- package/src/nuclio/functions/version/version.component.js +29 -2
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
.date-time-picker {
|
|
2
|
+
.date-time-picker-color-set();
|
|
3
|
+
|
|
4
|
+
outline: none;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-wrap: nowrap;
|
|
7
|
+
width: 100%;
|
|
8
|
+
position: relative;
|
|
9
|
+
|
|
10
|
+
&:after {
|
|
11
|
+
clear: both;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.datetimepicker-input, .datetimepicker-open-button {
|
|
15
|
+
background-color: @datetimepicker-input-bg-color;
|
|
16
|
+
border: @datetimepicker-input-border;
|
|
17
|
+
float: left;
|
|
18
|
+
height: 36px;
|
|
19
|
+
outline: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.datetimepicker-input {
|
|
23
|
+
font-size: 13px;
|
|
24
|
+
border-radius: 2px 0 0 2px;
|
|
25
|
+
width: 120px;
|
|
26
|
+
padding-left: 14px;
|
|
27
|
+
|
|
28
|
+
&[disabled] {
|
|
29
|
+
opacity: 1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&:focus, &:active {
|
|
33
|
+
border: @datetimepicker-input-focus-active-border;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.date-range {
|
|
37
|
+
min-width: 150px;
|
|
38
|
+
|
|
39
|
+
&.pick-time {
|
|
40
|
+
width: 285px;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.datetimepicker-open-button {
|
|
46
|
+
border-radius: 0 2px 2px 0;
|
|
47
|
+
width: 42px;
|
|
48
|
+
border-left: none;
|
|
49
|
+
vertical-align: top;
|
|
50
|
+
|
|
51
|
+
&:hover {
|
|
52
|
+
box-shadow: @datetimepicker-open-btn-hover-box-shadow;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&.active {
|
|
56
|
+
background-color: @datetimepicker-open-btn-active-bg-color;
|
|
57
|
+
box-shadow: @datetimepicker-open-btn-active-box-shadow;
|
|
58
|
+
border: @datetimepicker-open-btn-active-border;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.igz-icon-dropdown {
|
|
62
|
+
font-size: 11px;
|
|
63
|
+
line-height: 1.4;
|
|
64
|
+
vertical-align: bottom;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.revert-icon {
|
|
68
|
+
display: block;
|
|
69
|
+
transform: rotate(180deg);
|
|
70
|
+
line-height: 1;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.options-dropdown {
|
|
75
|
+
position: fixed;
|
|
76
|
+
width: 100%;
|
|
77
|
+
padding: 9px 0 0;
|
|
78
|
+
z-index: 5000;
|
|
79
|
+
font-family: @font-family-sans-serif;
|
|
80
|
+
font-size: 14px;
|
|
81
|
+
visibility: hidden;
|
|
82
|
+
font-weight: 500;
|
|
83
|
+
background-color: @options-dropdown-bg-color;
|
|
84
|
+
color: @options-dropdown-color;
|
|
85
|
+
border-radius: 2px;
|
|
86
|
+
box-shadow: @options-dropdown-box-shadow;
|
|
87
|
+
|
|
88
|
+
&.visible {
|
|
89
|
+
visibility: visible;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.options-list {
|
|
93
|
+
list-style: none;
|
|
94
|
+
margin: 0;
|
|
95
|
+
padding: 0;
|
|
96
|
+
|
|
97
|
+
.options-list-item {
|
|
98
|
+
height: 32px;
|
|
99
|
+
line-height: 32px;
|
|
100
|
+
margin: 0;
|
|
101
|
+
padding: 0 15px;
|
|
102
|
+
float: none;
|
|
103
|
+
|
|
104
|
+
.tick-icon {
|
|
105
|
+
position: absolute;
|
|
106
|
+
right: 0;
|
|
107
|
+
margin: 0 16px;
|
|
108
|
+
font-size: 16px;
|
|
109
|
+
color: @options-list-item-tick-icon-color;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&:hover {
|
|
113
|
+
background-color: @options-list-item-hover-bg-color;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&:last-child {
|
|
117
|
+
margin-bottom: 1px;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.separator {
|
|
122
|
+
border-bottom: @options-list-separator-border-bottom;
|
|
123
|
+
margin: 8px 0 7px;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&.disabled:after {
|
|
129
|
+
opacity: 0.5;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.date-time-pickers {
|
|
133
|
+
position: fixed;
|
|
134
|
+
z-index: 1000;
|
|
135
|
+
visibility: hidden;
|
|
136
|
+
width: 279px;
|
|
137
|
+
box-shadow: @date-time-pickers-box-shadow;
|
|
138
|
+
background-color: @date-time-pickers-bg-color;
|
|
139
|
+
|
|
140
|
+
&.date-range {
|
|
141
|
+
width: 538px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&.visible {
|
|
145
|
+
visibility: visible;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.datepicker-wrapper {
|
|
149
|
+
width: 255px;
|
|
150
|
+
display: inline-block;
|
|
151
|
+
padding: 4px 0 0;
|
|
152
|
+
|
|
153
|
+
&:first-child {
|
|
154
|
+
padding-left: 20px;
|
|
155
|
+
margin-right: 23px;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.glyphicon {
|
|
159
|
+
&.glyphicon-chevron-up {
|
|
160
|
+
top: 5px;
|
|
161
|
+
.igz-icon-up;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&.glyphicon-chevron-down {
|
|
165
|
+
top: -1px;
|
|
166
|
+
.igz-icon-down;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&.glyphicon-chevron-left {
|
|
170
|
+
left: -2px;
|
|
171
|
+
.igz-icon-left;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
&.glyphicon-chevron-right {
|
|
175
|
+
.igz-icon-right;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.datepicker-calendar {
|
|
180
|
+
border-radius: 3px;
|
|
181
|
+
background-color: @datepicker-calendar-bg-color;
|
|
182
|
+
top: 0;
|
|
183
|
+
left: 0;
|
|
184
|
+
padding: 0 0 10px;
|
|
185
|
+
margin: 0;
|
|
186
|
+
width: 240px;
|
|
187
|
+
|
|
188
|
+
&.separator {
|
|
189
|
+
border-bottom: @datepicker-calendar-separator-border-bottom;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.uib-daypicker {
|
|
193
|
+
outline: none;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.btn {
|
|
197
|
+
border: none;
|
|
198
|
+
padding: 5px 0;
|
|
199
|
+
outline: none;
|
|
200
|
+
|
|
201
|
+
&:not(.active) {
|
|
202
|
+
&[disabled] {
|
|
203
|
+
opacity: 1;
|
|
204
|
+
color: @datepicker-calendar-btn-disabled-color;
|
|
205
|
+
|
|
206
|
+
.text-info {
|
|
207
|
+
color: @datepicker-calendar-btn-text-info-disabled-color;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
&:not([disabled]) {
|
|
212
|
+
.text-info {
|
|
213
|
+
color: @datepicker-calendar-btn-text-info-color;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.text-muted {
|
|
217
|
+
color: @datepicker-calendar-btn-text-muted-color;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
table {
|
|
224
|
+
margin: 0;
|
|
225
|
+
width: 240px;
|
|
226
|
+
outline: none;
|
|
227
|
+
|
|
228
|
+
thead tr {
|
|
229
|
+
color: @datepicker-table-header-row-color;
|
|
230
|
+
font-size: 13px;
|
|
231
|
+
font-weight: 400;
|
|
232
|
+
line-height: 2;
|
|
233
|
+
|
|
234
|
+
&:first-child {
|
|
235
|
+
height: 55px;
|
|
236
|
+
|
|
237
|
+
button {
|
|
238
|
+
height: 55px;
|
|
239
|
+
min-width: 100% !important;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
strong {
|
|
243
|
+
color: @datepicker-table-header-row-color;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
th {
|
|
248
|
+
button:hover {
|
|
249
|
+
background-color: @datepicker-table-header-row-btn-bg-color;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
small {
|
|
253
|
+
font-size: 13px;
|
|
254
|
+
font-weight: 100;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
&:first-child, &:last-child {
|
|
258
|
+
button {
|
|
259
|
+
font-size: 12px;
|
|
260
|
+
|
|
261
|
+
&:hover {
|
|
262
|
+
color: @datepicker-table-header-row-btn-hover-bg-color;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
tr {
|
|
270
|
+
background-color: @datepicker-table-row-bg-color;
|
|
271
|
+
|
|
272
|
+
td button, th button {
|
|
273
|
+
font-family: @font-family-sans-serif;
|
|
274
|
+
text-align: center;
|
|
275
|
+
width: 28px;
|
|
276
|
+
max-width: 28px;
|
|
277
|
+
min-width: 28px !important;
|
|
278
|
+
height: 28px;
|
|
279
|
+
border: none;
|
|
280
|
+
color: @datepicker-table-row-btn-color;
|
|
281
|
+
background-color: @datepicker-table-row-btn-bg-color;
|
|
282
|
+
box-shadow: none;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
th button {
|
|
286
|
+
color: @datepicker-table-header-row-btn-color;
|
|
287
|
+
line-height: 35px;
|
|
288
|
+
font-size: 16px;
|
|
289
|
+
font-weight: 500 !important;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
td button {
|
|
293
|
+
background-color: @datepicker-table-header-row-btn-bg-color;
|
|
294
|
+
border-radius: 50%;
|
|
295
|
+
|
|
296
|
+
&:hover, &.active {
|
|
297
|
+
background-color: @datepicker-table-header-row-btn-hover-active-bg-color;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
&.btn-info.active {
|
|
301
|
+
background-color: @datepicker-table-header-row-btn-info-active-bg-color;
|
|
302
|
+
|
|
303
|
+
span {
|
|
304
|
+
color: @datepicker-table-header-row-btn-info-active-color;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.text-muted {
|
|
309
|
+
color: @datepicker-table-header-row-btn-text-muted-color;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.text-info {
|
|
313
|
+
color: @datepicker-table-header-row-btn-text-info-color;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.timepicker {
|
|
321
|
+
background-color: @timepicker-bg-color;
|
|
322
|
+
box-shadow: @timepicker-box-shadow;
|
|
323
|
+
|
|
324
|
+
.uib-timepicker {
|
|
325
|
+
margin: 0 auto;
|
|
326
|
+
|
|
327
|
+
tbody {
|
|
328
|
+
tr {
|
|
329
|
+
background-color: @timepicker-table-row-bg-color;
|
|
330
|
+
|
|
331
|
+
&:first-child, &:last-child {
|
|
332
|
+
a {
|
|
333
|
+
font-size: 12px;
|
|
334
|
+
color: @timepicker-table-row-color;
|
|
335
|
+
|
|
336
|
+
&:hover {
|
|
337
|
+
color: @timepicker-table-row-hover-color;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
&:focus, &:active {
|
|
341
|
+
outline: none;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
td {
|
|
347
|
+
input, button {
|
|
348
|
+
height: 32px;
|
|
349
|
+
width: 36px !important;
|
|
350
|
+
font-size: 13px;
|
|
351
|
+
border-radius: 2px;
|
|
352
|
+
border: @timepicker-table-cell-border;
|
|
353
|
+
box-shadow: none;
|
|
354
|
+
margin: 0 2.5px;
|
|
355
|
+
padding: 0;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
input {
|
|
359
|
+
color: @timepicker-table-cell-color;
|
|
360
|
+
font-weight: 400;
|
|
361
|
+
|
|
362
|
+
&:focus, &:active {
|
|
363
|
+
border: @timepicker-table-cell-focus-active-border;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
&.has-error input, &.invalid input {
|
|
368
|
+
background-color: @timepicker-table-cell-has-error-bg-color;
|
|
369
|
+
border: @timepicker-table-cell-has-error-border;
|
|
370
|
+
box-shadow: none;
|
|
371
|
+
outline: none;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
button {
|
|
375
|
+
color: @timepicker-table-cell-btn-color;
|
|
376
|
+
font-weight: 500;
|
|
377
|
+
margin-left: 6px;
|
|
378
|
+
|
|
379
|
+
&:hover {
|
|
380
|
+
box-shadow: @timepicker-table-cell-btn-hover-box-shadow;
|
|
381
|
+
background-color: @timepicker-table-cell-btn-hover-bg-color;
|
|
382
|
+
color: @timepicker-table-cell-btn-hover-color;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
&:active, &:focus {
|
|
386
|
+
background-color: @timepicker-table-cell-btn-active-bg-color;
|
|
387
|
+
box-shadow: @timepicker-table-cell-btn-active-box-shadow;
|
|
388
|
+
border: @timepicker-table-cell-btn-active-border;
|
|
389
|
+
color: @timepicker-table-cell-btn-active-color;
|
|
390
|
+
outline: none;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
a.disabled {
|
|
395
|
+
opacity: 1;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.buttons-block {
|
|
405
|
+
border-top: @buttons-block-border-top;
|
|
406
|
+
padding: 8px 24px;
|
|
407
|
+
text-align: right;
|
|
408
|
+
|
|
409
|
+
&.pick-time {
|
|
410
|
+
margin-top: -3px;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
button:not(:first-child) {
|
|
414
|
+
margin-left: 8px;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<div class="date-time-picker" tabindex="0"
|
|
2
|
+
data-ng-class="{'disabled' : $ctrl.isDisabled}" igz-prevent-parent-scroll>
|
|
3
|
+
<input class="datetimepicker-input"
|
|
4
|
+
name="{{$ctrl.inputName}}"
|
|
5
|
+
placeholder="{{$ctrl.placeholder}}"
|
|
6
|
+
data-ng-model="$ctrl.displayText"
|
|
7
|
+
data-ng-disabled="$ctrl.isDisabled"
|
|
8
|
+
data-ng-required="$ctrl.isRequired === true"
|
|
9
|
+
data-ng-class="{'date-range': $ctrl.isDateRange, 'pick-time': $ctrl.pickTime}"
|
|
10
|
+
data-ng-click="!$ctrl.isDisabled && ($ctrl.isDateRange ? $ctrl.showOptionsList($event) : $ctrl.showDatepickerPopup($event))"
|
|
11
|
+
data-show-button-bar="false"
|
|
12
|
+
data-igz-input-blur-on-enter
|
|
13
|
+
readonly>
|
|
14
|
+
<button class="datetimepicker-open-button"
|
|
15
|
+
data-ng-class="{'active': $ctrl.isShowDatePicker || $ctrl.isShowOptionsList}"
|
|
16
|
+
data-ng-click="!$ctrl.isDisabled && ($ctrl.isDateRange ? $ctrl.showOptionsList($event) : $ctrl.showDatepickerPopup($event))">
|
|
17
|
+
<i class="igz-icon-dropdown"
|
|
18
|
+
data-ng-class="{'revert-icon': $ctrl.isReverted}"></i>
|
|
19
|
+
</button>
|
|
20
|
+
<div class="date-time-pickers"
|
|
21
|
+
data-ng-if="$ctrl.isShowDatePicker"
|
|
22
|
+
data-ng-class="{'visible': $ctrl.isPositionCalculated, 'date-range': $ctrl.isDateRange}">
|
|
23
|
+
<div class="datepicker-wrapper">
|
|
24
|
+
<div data-uib-datepicker
|
|
25
|
+
class="datepicker-calendar"
|
|
26
|
+
data-datepicker-options="::$ctrl.datepickerOptions.from"
|
|
27
|
+
data-ng-model="$ctrl.date.from"
|
|
28
|
+
data-ng-if="$ctrl.isShowDatePicker"
|
|
29
|
+
data-ng-class="{separator: $ctrl.pickTime}"
|
|
30
|
+
data-ng-change="$ctrl.onChangeDateTime()"></div>
|
|
31
|
+
<div data-uib-timepicker class="timepicker from"
|
|
32
|
+
data-ng-if="$ctrl.pickTime"
|
|
33
|
+
data-ng-model="$ctrl.date.from"
|
|
34
|
+
data-ng-change="$ctrl.onChangeDateTime()"></div>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="datepicker-wrapper"
|
|
37
|
+
data-ng-if="$ctrl.isDateRange">
|
|
38
|
+
<div data-uib-datepicker
|
|
39
|
+
class="datepicker-calendar"
|
|
40
|
+
data-ng-model="$ctrl.date.to"
|
|
41
|
+
data-ng-if="$ctrl.isShowDatePicker"
|
|
42
|
+
data-datepicker-options="::$ctrl.datepickerOptions.to"
|
|
43
|
+
data-ng-class="{separator: $ctrl.pickTime}"
|
|
44
|
+
data-ng-change="$ctrl.onChangeDateTime()"></div>
|
|
45
|
+
<div data-uib-timepicker class="timepicker to"
|
|
46
|
+
data-ng-if="$ctrl.pickTime"
|
|
47
|
+
data-ng-model="$ctrl.date.to"
|
|
48
|
+
data-ng-change="$ctrl.onChangeDateTime()"></div>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="buttons-block" data-ng-class="{'pick-time': $ctrl.pickTime}">
|
|
51
|
+
<button class="igz-button-just-text"
|
|
52
|
+
data-ng-click="$ctrl.cancelChanges()">
|
|
53
|
+
{{ 'common:CANCEL' | i18next }}
|
|
54
|
+
</button>
|
|
55
|
+
<button class="igz-button-primary apply-button"
|
|
56
|
+
data-uib-tooltip="{{$ctrl.getErrorMessage()}}"
|
|
57
|
+
data-tooltip-placement="left"
|
|
58
|
+
data-tooltip-append-to-body="true"
|
|
59
|
+
data-tooltip-popup-delay="300"
|
|
60
|
+
data-ng-class="{'disabled': $ctrl.getErrorMessage() !== ''}"
|
|
61
|
+
data-ng-click="$ctrl.getErrorMessage() === '' && $ctrl.applyChanges()">
|
|
62
|
+
{{ 'common:APPLY' | i18next }}
|
|
63
|
+
</button>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
<div class="options-dropdown"
|
|
67
|
+
data-ng-if="$ctrl.isDateRange"
|
|
68
|
+
data-ng-show="$ctrl.isShowOptionsList"
|
|
69
|
+
data-ng-class="{'visible': $ctrl.isDropdownPositionCalculated}">
|
|
70
|
+
<ul class="options-list">
|
|
71
|
+
<li data-ng-repeat="(key, value) in $ctrl.presets"
|
|
72
|
+
class="options-list-item"
|
|
73
|
+
data-ng-click="$ctrl.onChangeDateTime(key)">{{value.label}}
|
|
74
|
+
<span class="tick-icon igz-icon-tick"
|
|
75
|
+
data-ng-if="$ctrl.isOptionSelected(key)">
|
|
76
|
+
</span>
|
|
77
|
+
</li>
|
|
78
|
+
<div class="separator"></div>
|
|
79
|
+
<li class="options-list-item"
|
|
80
|
+
data-ng-click="$ctrl.showDatepickerPopup($event)">
|
|
81
|
+
{{ 'common:SELECT_RANGE' | i18next }}
|
|
82
|
+
</li>
|
|
83
|
+
<li class="options-list-item"
|
|
84
|
+
data-ng-if="$ctrl.clearOption"
|
|
85
|
+
data-ng-click="$ctrl.clearSelectedDateTime()">
|
|
86
|
+
{{ 'common:CLEAR' | i18next }}
|
|
87
|
+
</li>
|
|
88
|
+
</ul>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
(function () {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
angular.module('iguazio.dashboard-controls')
|
|
5
|
+
.directive('igzPreventParentScroll', function () {
|
|
6
|
+
return {
|
|
7
|
+
restrict: 'A',
|
|
8
|
+
scope: false,
|
|
9
|
+
link: link
|
|
10
|
+
};
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
function link(scope, element) {
|
|
14
|
+
element.bind('mousewheel', onMouseWheel);
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Prevents scrolling parent container
|
|
18
|
+
* @param {Event} event
|
|
19
|
+
*/
|
|
20
|
+
function onMouseWheel(event) {
|
|
21
|
+
element[0].scrollTop -= (event.wheelDeltaY || (event.originalEvent && (event.originalEvent.wheelDeltaY || event.originalEvent.wheelDelta)) || event.wheelDelta || 0);
|
|
22
|
+
event.stopPropagation();
|
|
23
|
+
event.preventDefault();
|
|
24
|
+
event.returnValue = false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}());
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2018 Iguazio Systems Ltd.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License") with
|
|
4
|
+
an addition restriction as set forth herein. You may not use this
|
|
5
|
+
file except in compliance with the License. You may obtain a copy of
|
|
6
|
+
the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software
|
|
8
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
10
|
+
implied. See the License for the specific language governing
|
|
11
|
+
permissions and limitations under the License.
|
|
12
|
+
In addition, you may not use the software for any purposes that are
|
|
13
|
+
illegal under applicable law, and the grant of the foregoing license
|
|
14
|
+
under the Apache 2.0 license is conditioned upon your compliance with
|
|
15
|
+
such restriction.
|
|
16
|
+
*/
|
|
17
|
+
(function () {
|
|
18
|
+
'use strict';
|
|
19
|
+
|
|
20
|
+
angular.module('iguazio.dashboard-controls')
|
|
21
|
+
.component('igzElasticLogTableRow', {
|
|
22
|
+
bindings: {
|
|
23
|
+
entryItem: '<'
|
|
24
|
+
},
|
|
25
|
+
templateUrl: 'igz_controls/components/log-table-row/log-table-row.tpl.html',
|
|
26
|
+
controller: IgzElasticLogTableRowController
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
function IgzElasticLogTableRowController(lodash) {
|
|
30
|
+
var ctrl = this;
|
|
31
|
+
|
|
32
|
+
ctrl.getLogLevel = getLogLevel;
|
|
33
|
+
ctrl.getLogName = getLogName;
|
|
34
|
+
|
|
35
|
+
//
|
|
36
|
+
// Public methods
|
|
37
|
+
//
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Get log level display value
|
|
41
|
+
* @returns {string} the log level display value
|
|
42
|
+
*/
|
|
43
|
+
function getLogLevel() {
|
|
44
|
+
return lodash.first(ctrl.entryItem.level).toUpperCase();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Get log name display value
|
|
49
|
+
* @returns {string} the log name display value
|
|
50
|
+
*/
|
|
51
|
+
function getLogName() {
|
|
52
|
+
var name = lodash.get(ctrl.entryItem, 'name', '');
|
|
53
|
+
|
|
54
|
+
return lodash.padEnd(name.substring(0, 15), 15);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}());
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
describe('igzElasticLogTableRow component: ', function () {
|
|
2
|
+
var $componentController;
|
|
3
|
+
var $rootScope;
|
|
4
|
+
var ctrl;
|
|
5
|
+
|
|
6
|
+
beforeEach(function () {
|
|
7
|
+
module('iguazio.dashboard-controls');
|
|
8
|
+
|
|
9
|
+
inject(function (_$rootScope_, _$componentController_) {
|
|
10
|
+
$rootScope = _$rootScope_;
|
|
11
|
+
$componentController = _$componentController_;
|
|
12
|
+
|
|
13
|
+
var binding = {
|
|
14
|
+
entryItem: {
|
|
15
|
+
time: new Date,
|
|
16
|
+
level: 'info',
|
|
17
|
+
name: 'cron',
|
|
18
|
+
message: 'message',
|
|
19
|
+
more: 'message 2'
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
ctrl = $componentController('igzElasticLogTableRow', null, binding);
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
afterEach(function () {
|
|
28
|
+
$componentController = null;
|
|
29
|
+
$rootScope = null;
|
|
30
|
+
ctrl = null;
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
describe('getLogLevel():', function () {
|
|
34
|
+
it('should return the log level display value', function () {
|
|
35
|
+
expect(ctrl.getLogLevel()).toBe('I');
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
describe('getLogName():', function () {
|
|
40
|
+
it('should return the log name display value with free space in the end', function () {
|
|
41
|
+
expect(ctrl.getLogName()).toBe('cron ');
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it('should return the cropped log name display value', function () {
|
|
45
|
+
ctrl.entryItem.name = '012345678901234567890123456789';
|
|
46
|
+
expect(ctrl.getLogName()).toBe('012345678901234');
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.control-panel-log-row {
|
|
2
|
+
.control-panel-log-table-row-color-set();
|
|
3
|
+
|
|
4
|
+
.log-entry {
|
|
5
|
+
.log-entry-time {
|
|
6
|
+
color: @log-entry-time-color;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.log-entry-level-debug {
|
|
10
|
+
color: @log-entry-level-debug-color;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.log-entry-level-info {
|
|
14
|
+
color: @log-entry-level-info-color;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.log-entry-level-warn, .log-entry-level-warning {
|
|
18
|
+
color: @log-entry-level-warn-color;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.log-entry-level-error {
|
|
22
|
+
color: @log-entry-level-error-color;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.log-entry-message {
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<div class="control-panel-log-row">
|
|
2
|
+
|
|
3
|
+
<div class="log-entry">
|
|
4
|
+
<span class="log-entry-time">{{$ctrl.entryItem['@timestamp'] | date : 'yy-MM-dd HH:mm:ss.sss' }}</span>
|
|
5
|
+
<span class="log-entry-name"
|
|
6
|
+
data-uib-tooltip="{{$ctrl.entryItem.name}}"
|
|
7
|
+
data-tooltip-placement="top"
|
|
8
|
+
data-tooltip-popup-delay="200"
|
|
9
|
+
data-tooltip-append-to-body="true"> {{$ctrl.getLogName()}}</span>
|
|
10
|
+
<span class="log-entry-level-{{$ctrl.entryItem.level.toLowerCase()}}"
|
|
11
|
+
data-ng-if="$ctrl.entryItem.level"> ({{$ctrl.getLogLevel()}})</span>
|
|
12
|
+
<span class="log-entry-message"> {{$ctrl.entryItem.message}}</span>
|
|
13
|
+
<span class="log-entry-more"> {{$ctrl.entryItem.more}}</span>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
</div>
|