iguazio.dashboard-controls 1.2.4 → 1.2.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iguazio.dashboard-controls",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "main": "dist/js/iguazio.dashboard-controls.js",
5
5
  "description": "Collection of resources (such as CSS styles, fonts and images) and AngularJs 1.x components and services to share among different Iguazio repos.",
6
6
  "repository": {
@@ -31,6 +31,7 @@ such restriction.
31
31
 
32
32
  ctrl.getLogLevel = getLogLevel;
33
33
  ctrl.getLogName = getLogName;
34
+ ctrl.getLogTrimmedName = getLogTrimmedName;
34
35
 
35
36
  //
36
37
  // Public methods
@@ -45,13 +46,19 @@ such restriction.
45
46
  }
46
47
 
47
48
  /**
48
- * Get log name display value
49
- * @returns {string} the log name display value
49
+ * Get log full name
50
+ * @returns {string} the log name
50
51
  */
51
52
  function getLogName() {
52
- var name = lodash.get(ctrl.entryItem, 'kubernetes.pod.name', lodash.get(ctrl.entryItem, 'name', ''));
53
+ return lodash.get(ctrl.entryItem, 'kubernetes.pod.name', lodash.get(ctrl.entryItem, 'name', ''));
54
+ }
53
55
 
54
- return lodash.padEnd(name.substring(0, 25), 25);
56
+ /**
57
+ * Get log trimmed name display value
58
+ * @returns {string} the log name display value
59
+ */
60
+ function getLogTrimmedName() {
61
+ return lodash.padEnd(getLogName().substring(0, 25), 25);
55
62
  }
56
63
  }
57
64
  }());
@@ -3,10 +3,10 @@
3
3
  <div class="log-entry">
4
4
  <span class="log-entry-time">{{$ctrl.entryItem['@timestamp'] | date : 'yy-MM-dd HH:mm:ss.sss' }}</span>
5
5
  <span class="log-entry-name"
6
- data-uib-tooltip="{{$ctrl.entryItem.name}}"
6
+ data-uib-tooltip="{{$ctrl.getLogName()}}"
7
7
  data-tooltip-placement="top"
8
8
  data-tooltip-popup-delay="200"
9
- data-tooltip-append-to-body="true">&nbsp;{{$ctrl.getLogName()}}</span>
9
+ data-tooltip-append-to-body="true">&nbsp;{{$ctrl.getLogTrimmedName()}}</span>
10
10
  <span class="log-entry-level-{{$ctrl.entryItem.level.toLowerCase()}}"
11
11
  data-ng-if="$ctrl.entryItem.level">&nbsp;({{$ctrl.getLogLevel()}})</span>
12
12
  <span class="log-entry-message">&nbsp;{{$ctrl.entryItem.message}}</span>
@@ -368,8 +368,7 @@ such restriction.
368
368
  if (ctrl.logs.length > 0) {
369
369
  ctrl.lastEntryTimestamp = ctrl.logs[0].time;
370
370
 
371
- if (ctrl.logs.replicas && (lodash.isEmpty(initialReplicas) ||
372
- initialReplicas.length !== ctrl.replicasList.length)) {
371
+ if (ctrl.logs.replicas) {
373
372
  ctrl.replicasList = ctrl.logs.replicas.map(function (replica) {
374
373
  return {
375
374
  label: replica,
@@ -391,10 +390,12 @@ such restriction.
391
390
  */
392
391
  function generateFilterQuery() {
393
392
  var levels = lodash.chain(ctrl.filter.level).pickBy().keys().join(' OR ').value();
394
- var queries = ['system-id:"' + ConfigService.systemId + '"', '_exists_:nuclio'];
393
+ var projectName = lodash.get(ctrl.version, ['metadata', 'labels', 'nuclio.io/project-name']);
394
+ var projectFilter = '(nuclio.project_name.keyword:' + projectName + ' OR nuclio.project_name:' + projectName + ')'
395
+ var queries = ['system-id:"' + ConfigService.systemId + '"', '_exists_:nuclio', projectFilter];
395
396
 
396
397
  if (!lodash.isEmpty(ctrl.version.metadata.name)) {
397
- queries.push('name:' + ctrl.version.metadata.name);
398
+ queries.push('(name.keyword:' + ctrl.version.metadata.name + ' OR name:' + ctrl.version.metadata.name + ')');
398
399
  }
399
400
 
400
401
  if (ctrl.selectedReplicas.length && ctrl.selectedReplicas.length !== initialReplicas.length) {