Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
15d5b343
Commit
15d5b343
authored
Nov 01, 2019
by
kevalbhatt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3503 : UI: Add classification count table in statistics popup
parent
5ae7fbec
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
154 additions
and
40 deletions
+154
-40
loader.scss
dashboardv2/public/css/scss/loader.scss
+2
-1
table.scss
dashboardv2/public/css/scss/table.scss
+0
-3
Statistics_tmpl.html
dashboardv2/public/js/templates/site/Statistics_tmpl.html
+27
-0
entity_tmpl.html
dashboardv2/public/js/templates/site/entity_tmpl.html
+1
-1
Statistics.js
dashboardv2/public/js/views/site/Statistics.js
+47
-15
loader.scss
dashboardv3/public/css/scss/loader.scss
+2
-1
table.scss
dashboardv3/public/css/scss/table.scss
+0
-3
Statistics_tmpl.html
dashboardv3/public/js/templates/site/Statistics_tmpl.html
+27
-0
entity_tmpl.html
dashboardv3/public/js/templates/site/entity_tmpl.html
+1
-1
Statistics.js
dashboardv3/public/js/views/site/Statistics.js
+47
-15
No files found.
dashboardv2/public/css/scss/loader.scss
View file @
15d5b343
...
...
@@ -156,7 +156,8 @@
background
:
linear-gradient
(
to
right
,
#eeeeee
8%
,
#dddddd
18%
,
#eeeeee
33%
);
background-size
:
700px
10px
;
border-radius
:
8px
;
outline
:
1px
#fff
solid
;
outline-offset
:
-1px
;
}
@keyframes
placeHolderLoader
{
...
...
dashboardv2/public/css/scss/table.scss
View file @
15d5b343
...
...
@@ -244,8 +244,6 @@ td {
height
:
20px
;
margin
:
0px
5px
;
float
:
left
;
outline
:
1px
#fff
solid
;
outline-offset
:
-1px
;
}
}
}
\ No newline at end of file
dashboardv2/public/js/templates/site/Statistics_tmpl.html
View file @
15d5b343
...
...
@@ -143,6 +143,33 @@
</div>
</div>
</div>
<div
class=
"panel panel-default custom-panel expand_collapse_panel-icon"
data-id=
"classification"
>
<div
class=
"panel-heading"
data-toggle=
"collapse"
href=
"#classificationCountCollapse"
aria-expanded=
"false"
>
<h4
class=
"panel-title"
>
<a>
Classifications
<span
class=
"count"
>
(0)
</span></a>
</h4>
<div
class=
"btn-group pull-left"
>
<button
type=
"button"
title=
"Collapse"
><i
class=
"ec-icon fa"
></i></button>
</div>
</div>
<div
id=
"classificationCountCollapse"
class=
"panel-collapse collapse"
>
<div
class=
"panel-body"
>
<table
class=
"table stat-table classificationTable"
>
<thead>
<tr>
<th
class=
""
>
Name
</th>
<th
class=
""
>
Count
<span
class=
"count"
>
(0)
</span></th>
</tr>
</thead>
<tbody
data-id=
"classification-card"
>
<tr
class=
"empty text-center"
>
<td
colspan=
"3"
><span>
No records found!
</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div
class=
"fontLoader-relative statsLoader show"
>
<i
class=
"fa fa-refresh fa-spin-custom"
></i>
...
...
dashboardv2/public/js/templates/site/entity_tmpl.html
View file @
15d5b343
...
...
@@ -16,7 +16,7 @@
-->
<thead>
<tr>
<th>
Entit
ies
</th>
<th>
Entit
y Type
</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>
...
...
dashboardv2/public/js/views/site/Statistics.js
View file @
15d5b343
...
...
@@ -44,11 +44,13 @@ define(['require',
/** ui selector cache */
ui
:
{
entityHeader
:
"[data-id='entity'] .count"
,
classificationHeader
:
"[data-id='classification'] .count"
,
serverCard
:
"[data-id='server-card']"
,
connectionCard
:
"[data-id='connection-card']"
,
notificationCard
:
"[data-id='notification-card']"
,
statsNotificationTable
:
"[data-id='stats-notification-table']"
,
entityCard
:
"[data-id='entity-card']"
,
classificationCard
:
"[data-id='classification-card']"
,
offsetCard
:
"[data-id='offset-card']"
,
osCard
:
"[data-id='os-card']"
,
runtimeCard
:
"[data-id='runtime-card']"
,
...
...
@@ -99,6 +101,7 @@ define(['require',
that
.
renderStats
({
valueObject
:
data
.
general
.
stats
,
dataObject
:
data
.
general
});
that
.
renderEntities
({
data
:
data
});
that
.
renderSystemDeatils
({
data
:
data
});
that
.
renderClassifications
({
data
:
data
});
that
.
$
(
'.statsContainer,.statsNotificationContainer'
).
removeClass
(
'hide'
);
that
.
$
(
'.statsLoader,.statsNotificationLoader'
).
removeClass
(
'show'
);
if
(
options
&&
options
.
update
)
{
...
...
@@ -129,6 +132,43 @@ define(['require',
});
return
stats
;
},
createTable
:
function
(
obj
)
{
var
that
=
this
,
tableBody
=
''
,
data
=
obj
.
data
;
_
.
each
(
data
,
function
(
value
,
key
,
list
)
{
tableBody
+=
'<tr><td>'
+
key
+
'</td><td class="">'
+
that
.
getValue
({
"value"
:
value
})
+
'</td></tr>'
;
});
return
tableBody
;
},
renderClassifications
:
function
(
options
)
{
var
that
=
this
,
data
=
options
.
data
,
classificationData
=
data
.
tag
||
{},
tagEntitiesData
=
classificationData
?
classificationData
.
tagEntities
||
{}
:
{},
tagsCount
=
0
,
newTagEntitiesData
=
{};
_
.
each
(
_
.
sortBy
(
_
.
keys
(
tagEntitiesData
),
function
(
o
)
{
return
o
.
toLocaleLowerCase
();
}),
function
(
key
)
{
var
val
=
tagEntitiesData
[
key
];
newTagEntitiesData
[
key
]
=
val
;
tagsCount
+=
val
;
});
tagEntitiesData
=
newTagEntitiesData
;
if
(
!
_
.
isEmpty
(
tagEntitiesData
))
{
this
.
ui
.
classificationCard
.
html
(
that
.
createTable
({
"data"
:
tagEntitiesData
})
);
this
.
ui
.
classificationHeader
.
html
(
" ("
+
_
.
numberFormatWithComa
(
tagsCount
)
+
")"
);
}
},
renderEntities
:
function
(
options
)
{
var
that
=
this
,
data
=
options
.
data
,
...
...
@@ -163,6 +203,7 @@ define(['require',
}
})
};
createEntityData
({
"entityData"
:
activeEntities
,
"type"
:
"active"
...
...
@@ -178,7 +219,9 @@ define(['require',
if
(
!
_
.
isEmpty
(
stats
))
{
that
.
ui
.
entityCard
.
html
(
EntityTable
({
"data"
:
_
.
pick
(
stats
,
(
_
.
keys
(
stats
).
sort
())),
"data"
:
_
.
pick
(
stats
,
_
.
sortBy
(
_
.
keys
(
stats
),
function
(
o
)
{
return
o
.
toLocaleLowerCase
();
})),
})
);
that
.
$
(
'[data-id="activeEntity"]'
).
html
(
" ("
+
_
.
numberFormatWithComa
(
activeEntityCount
)
+
")"
);
...
...
@@ -290,21 +333,10 @@ define(['require',
systemData
=
data
.
system
,
systemOS
=
systemData
.
os
||
{},
systemRuntimeData
=
systemData
.
runtime
||
{},
systemMemoryData
=
systemData
.
memory
||
{},
createSystemTable
=
function
(
obj
)
{
var
tableBody
=
''
,
data
=
obj
.
data
;
_
.
each
(
data
,
function
(
value
,
key
,
list
)
{
tableBody
+=
'<tr><td>'
+
key
+
'</td><td class="">'
+
that
.
getValue
({
"value"
:
value
})
+
'</td></tr>'
;
});
return
tableBody
;
};
systemMemoryData
=
systemData
.
memory
||
{};
if
(
!
_
.
isEmpty
(
systemOS
))
{
that
.
ui
.
osCard
.
html
(
createSystem
Table
({
that
.
create
Table
({
"data"
:
systemOS
})
);
...
...
@@ -314,7 +346,7 @@ define(['require',
var
space
})
that
.
ui
.
runtimeCard
.
html
(
createSystem
Table
({
that
.
create
Table
({
"data"
:
systemRuntimeData
})
);
...
...
dashboardv3/public/css/scss/loader.scss
View file @
15d5b343
...
...
@@ -153,7 +153,8 @@
background
:
linear-gradient
(
to
right
,
#eeeeee
8%
,
#dddddd
18%
,
#eeeeee
33%
);
background-size
:
700px
10px
;
border-radius
:
8px
;
outline
:
1px
#fff
solid
;
outline-offset
:
-1px
;
}
@keyframes
placeHolderLoader
{
...
...
dashboardv3/public/css/scss/table.scss
View file @
15d5b343
...
...
@@ -238,8 +238,6 @@ td {
height
:
20px
;
margin
:
0px
5px
;
float
:
left
;
outline
:
1px
#fff
solid
;
outline-offset
:
-1px
;
}
}
}
\ No newline at end of file
dashboardv3/public/js/templates/site/Statistics_tmpl.html
View file @
15d5b343
...
...
@@ -144,6 +144,33 @@
</div>
</div>
</div>
<div
class=
"panel panel-default custom-panel expand_collapse_panel-icon"
data-id=
"classification"
>
<div
class=
"panel-heading"
data-toggle=
"collapse"
href=
"#classificationCountCollapse"
aria-expanded=
"false"
>
<h4
class=
"panel-title"
>
<a>
Classifications
<span
class=
"count"
>
(0)
</span></a>
</h4>
<div
class=
"btn-group pull-left"
>
<button
type=
"button"
title=
"Collapse"
><i
class=
"ec-icon fa"
></i></button>
</div>
</div>
<div
id=
"classificationCountCollapse"
class=
"panel-collapse collapse"
>
<div
class=
"panel-body"
>
<table
class=
"table stat-table classificationTable"
>
<thead>
<tr>
<th
class=
""
>
Name
</th>
<th
class=
""
>
Count
<span
class=
"count"
>
(0)
</span></th>
</tr>
</thead>
<tbody
data-id=
"classification-card"
>
<tr
class=
"empty text-center"
>
<td
colspan=
"3"
><span>
No records found!
</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div
class=
"fontLoader-relative statsLoader show"
>
<i
class=
"fa fa-refresh fa-spin-custom"
></i>
...
...
dashboardv3/public/js/templates/site/entity_tmpl.html
View file @
15d5b343
...
...
@@ -16,7 +16,7 @@
-->
<thead>
<tr>
<th>
Entit
ies
</th>
<th>
Entit
y Type
</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>
...
...
dashboardv3/public/js/views/site/Statistics.js
View file @
15d5b343
...
...
@@ -44,11 +44,13 @@ define(['require',
/** ui selector cache */
ui
:
{
entityHeader
:
"[data-id='entity'] .count"
,
classificationHeader
:
"[data-id='classification'] .count"
,
serverCard
:
"[data-id='server-card']"
,
connectionCard
:
"[data-id='connection-card']"
,
notificationCard
:
"[data-id='notification-card']"
,
statsNotificationTable
:
"[data-id='stats-notification-table']"
,
entityCard
:
"[data-id='entity-card']"
,
classificationCard
:
"[data-id='classification-card']"
,
offsetCard
:
"[data-id='offset-card']"
,
osCard
:
"[data-id='os-card']"
,
runtimeCard
:
"[data-id='runtime-card']"
,
...
...
@@ -97,6 +99,7 @@ define(['require',
that
.
renderStats
({
valueObject
:
data
.
general
.
stats
,
dataObject
:
data
.
general
});
that
.
renderEntities
({
data
:
data
});
that
.
renderSystemDeatils
({
data
:
data
});
that
.
renderClassifications
({
data
:
data
});
that
.
$
(
'.statsContainer,.statsNotificationContainer'
).
removeClass
(
'hide'
);
that
.
$
(
'.statsLoader,.statsNotificationLoader'
).
removeClass
(
'show'
);
if
(
options
&&
options
.
update
)
{
...
...
@@ -127,6 +130,43 @@ define(['require',
});
return
stats
;
},
createTable
:
function
(
obj
)
{
var
that
=
this
,
tableBody
=
''
,
data
=
obj
.
data
;
_
.
each
(
data
,
function
(
value
,
key
,
list
)
{
tableBody
+=
'<tr><td>'
+
key
+
'</td><td class="">'
+
that
.
getValue
({
"value"
:
value
})
+
'</td></tr>'
;
});
return
tableBody
;
},
renderClassifications
:
function
(
options
)
{
var
that
=
this
,
data
=
options
.
data
,
classificationData
=
data
.
tag
||
{},
tagEntitiesData
=
classificationData
?
classificationData
.
tagEntities
||
{}
:
{},
tagsCount
=
0
,
newTagEntitiesData
=
{};
_
.
each
(
_
.
sortBy
(
_
.
keys
(
tagEntitiesData
),
function
(
o
)
{
return
o
.
toLocaleLowerCase
();
}),
function
(
key
)
{
var
val
=
tagEntitiesData
[
key
];
newTagEntitiesData
[
key
]
=
val
;
tagsCount
+=
val
;
});
tagEntitiesData
=
newTagEntitiesData
;
if
(
!
_
.
isEmpty
(
tagEntitiesData
))
{
this
.
ui
.
classificationCard
.
html
(
that
.
createTable
({
"data"
:
tagEntitiesData
})
);
this
.
ui
.
classificationHeader
.
html
(
" ("
+
_
.
numberFormatWithComa
(
tagsCount
)
+
")"
);
}
},
renderEntities
:
function
(
options
)
{
var
that
=
this
,
data
=
options
.
data
,
...
...
@@ -161,6 +201,7 @@ define(['require',
}
})
};
createEntityData
({
"entityData"
:
activeEntities
,
"type"
:
"active"
...
...
@@ -176,7 +217,9 @@ define(['require',
if
(
!
_
.
isEmpty
(
stats
))
{
that
.
ui
.
entityCard
.
html
(
EntityTable
({
"data"
:
_
.
pick
(
stats
,
(
_
.
keys
(
stats
).
sort
())),
"data"
:
_
.
pick
(
stats
,
_
.
sortBy
(
_
.
keys
(
stats
),
function
(
o
)
{
return
o
.
toLocaleLowerCase
();
})),
})
);
that
.
$
(
'[data-id="activeEntity"]'
).
html
(
" ("
+
_
.
numberFormatWithComa
(
activeEntityCount
)
+
")"
);
...
...
@@ -288,21 +331,10 @@ define(['require',
systemData
=
data
.
system
,
systemOS
=
systemData
.
os
||
{},
systemRuntimeData
=
systemData
.
runtime
||
{},
systemMemoryData
=
systemData
.
memory
||
{},
createSystemTable
=
function
(
obj
)
{
var
tableBody
=
''
,
data
=
obj
.
data
;
_
.
each
(
data
,
function
(
value
,
key
,
list
)
{
tableBody
+=
'<tr><td>'
+
key
+
'</td><td class="">'
+
that
.
getValue
({
"value"
:
value
})
+
'</td></tr>'
;
});
return
tableBody
;
};
systemMemoryData
=
systemData
.
memory
||
{};
if
(
!
_
.
isEmpty
(
systemOS
))
{
that
.
ui
.
osCard
.
html
(
createSystem
Table
({
that
.
create
Table
({
"data"
:
systemOS
})
);
...
...
@@ -312,7 +344,7 @@ define(['require',
var
space
})
that
.
ui
.
runtimeCard
.
html
(
createSystem
Table
({
that
.
create
Table
({
"data"
:
systemRuntimeData
})
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment