You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by sa...@apache.org on 2019/10/07 18:18:05 UTC
[atlas] branch master updated: ATLAS-3438: UI: Show shell entity
count in metric popup.
This is an automated email from the ASF dual-hosted git repository.
sarath pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new 678043f ATLAS-3438: UI: Show shell entity count in metric popup.
678043f is described below
commit 678043f80e064248352cb073fd7385a82deebe9a
Author: sameer79 <fi...@yahoo.co.in>
AuthorDate: Mon Oct 7 20:36:13 2019 +0530
ATLAS-3438: UI: Show shell entity count in metric popup.
Signed-off-by: Sarath Subramanian <sa...@apache.org>
---
dashboardv2/public/js/templates/site/entity_tmpl.html | 6 ++++++
dashboardv2/public/js/views/site/Statistics.js | 15 +++++++++++++--
dashboardv3/public/js/templates/site/entity_tmpl.html | 6 ++++++
dashboardv3/public/js/views/site/Statistics.js | 13 ++++++++++++-
4 files changed, 37 insertions(+), 3 deletions(-)
diff --git a/dashboardv2/public/js/templates/site/entity_tmpl.html b/dashboardv2/public/js/templates/site/entity_tmpl.html
index e4190d1..40bf436 100644
--- a/dashboardv2/public/js/templates/site/entity_tmpl.html
+++ b/dashboardv2/public/js/templates/site/entity_tmpl.html
@@ -19,6 +19,7 @@
<th>Entities</th>
<th>Active <span data-id="activeEntity"></span></th>
<th>Deleted <span data-id="deletedEntity"></span></th>
+ <th>Shell <span data-id="shellEntity"></span></th>
</tr>
</thead>
{{#if data}}
@@ -36,6 +37,11 @@
{{else}}
<td>0</td>
{{/if}}
+ {{#if this.shell}}
+ <td>{{this.shell}}</td>
+ {{else}}
+ <td>0</td>
+ {{/if}}
</tr>
{{/each}}
</tbody>
diff --git a/dashboardv2/public/js/views/site/Statistics.js b/dashboardv2/public/js/views/site/Statistics.js
index 8befe68..7a66daf 100644
--- a/dashboardv2/public/js/views/site/Statistics.js
+++ b/dashboardv2/public/js/views/site/Statistics.js
@@ -128,18 +128,24 @@ define(['require',
entityData = data.entity,
activeEntities = entityData.entityActive || {},
deletedEntities = entityData.entityDeleted || {},
+ shellEntities = entityData.entityShell || {},
stats = {},
activeEntityCount = 0,
deletedEntityCount = 0,
+ shellEntityCount = 0,
createEntityData = function(opt) {
var entityData = opt.entityData,
type = opt.type;
_.each(entityData, function(val, key) {
var intVal = _.isUndefined(val) ? 0 : val;
- if (type == "active") {
+ if (type === "active") {
activeEntityCount += intVal;
- } else {
+ }
+ if(type === "deleted"){
deletedEntityCount += intVal;
+ }
+ if(type === "shell") {
+ shellEntityCount += intVal
}
intVal = _.numberFormatWithComa(intVal)
if (stats[key]) {
@@ -158,6 +164,10 @@ define(['require',
"entityData": deletedEntities,
"type": "deleted"
});
+ createEntityData({
+ "entityData": shellEntities,
+ "type": "shell"
+ });
if (!_.isEmpty(stats)) {
that.ui.entityCard.html(
EntityTable({
@@ -166,6 +176,7 @@ define(['require',
);
that.$('[data-id="activeEntity"]').html(" (" + _.numberFormatWithComa(activeEntityCount) + ")");
that.$('[data-id="deletedEntity"]').html(" (" + _.numberFormatWithComa(deletedEntityCount) + ")");
+ that.$('[data-id="shellEntity"]').html(" (" + _.numberFormatWithComa(shellEntityCount) + ")");
that.ui.entityHeader.html(" (" + _.numberFormatWithComa(data.general.entityCount) + ")");
}
},
diff --git a/dashboardv3/public/js/templates/site/entity_tmpl.html b/dashboardv3/public/js/templates/site/entity_tmpl.html
index e4190d1..40bf436 100644
--- a/dashboardv3/public/js/templates/site/entity_tmpl.html
+++ b/dashboardv3/public/js/templates/site/entity_tmpl.html
@@ -19,6 +19,7 @@
<th>Entities</th>
<th>Active <span data-id="activeEntity"></span></th>
<th>Deleted <span data-id="deletedEntity"></span></th>
+ <th>Shell <span data-id="shellEntity"></span></th>
</tr>
</thead>
{{#if data}}
@@ -36,6 +37,11 @@
{{else}}
<td>0</td>
{{/if}}
+ {{#if this.shell}}
+ <td>{{this.shell}}</td>
+ {{else}}
+ <td>0</td>
+ {{/if}}
</tr>
{{/each}}
</tbody>
diff --git a/dashboardv3/public/js/views/site/Statistics.js b/dashboardv3/public/js/views/site/Statistics.js
index 8befe68..64455b4 100644
--- a/dashboardv3/public/js/views/site/Statistics.js
+++ b/dashboardv3/public/js/views/site/Statistics.js
@@ -128,9 +128,11 @@ define(['require',
entityData = data.entity,
activeEntities = entityData.entityActive || {},
deletedEntities = entityData.entityDeleted || {},
+ shellEntities = entityData.entityShell || {},
stats = {},
activeEntityCount = 0,
deletedEntityCount = 0,
+ shellEntityCount = 0,
createEntityData = function(opt) {
var entityData = opt.entityData,
type = opt.type;
@@ -138,8 +140,12 @@ define(['require',
var intVal = _.isUndefined(val) ? 0 : val;
if (type == "active") {
activeEntityCount += intVal;
- } else {
+ }
+ if(type == "deleted"){
deletedEntityCount += intVal;
+ }
+ if(type == "shell") {
+ shellEntityCount += intVal
}
intVal = _.numberFormatWithComa(intVal)
if (stats[key]) {
@@ -158,6 +164,10 @@ define(['require',
"entityData": deletedEntities,
"type": "deleted"
});
+ createEntityData({
+ "entityData": shellEntities,
+ "type": "shell"
+ });
if (!_.isEmpty(stats)) {
that.ui.entityCard.html(
EntityTable({
@@ -166,6 +176,7 @@ define(['require',
);
that.$('[data-id="activeEntity"]').html(" (" + _.numberFormatWithComa(activeEntityCount) + ")");
that.$('[data-id="deletedEntity"]').html(" (" + _.numberFormatWithComa(deletedEntityCount) + ")");
+ that.$('[data-id="shellEntity"]').html(" (" + _.numberFormatWithComa(shellEntityCount) + ")");
that.ui.entityHeader.html(" (" + _.numberFormatWithComa(data.general.entityCount) + ")");
}
},