Architecture
@@ -170,16 +170,18 @@ export default {
.entity {
.head {
padding: 0.25em;
+
+ .icon {
+ margin-right: 1em;
+ }
}
}
.collapse-toggler {
display: flex;
- justify-content: center;
align-items: center;
flex: 1;
min-height: 3em;
- margin-left: 0;
cursor: pointer;
&:hover {
@@ -187,7 +189,7 @@ export default {
}
}
-.child {
+.attributes .child {
margin: 0 -0.5em;
padding: 0.5em 1em;
diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/CpuTimes.vue b/platypush/backend/http/webapp/src/components/panels/Entities/CpuTimes.vue
new file mode 100644
index 000000000..8c845e685
--- /dev/null
+++ b/platypush/backend/http/webapp/src/components/panels/Entities/CpuTimes.vue
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/meta.json b/platypush/backend/http/webapp/src/components/panels/Entities/meta.json
index 1fae044a4..aaf4e2fd4 100644
--- a/platypush/backend/http/webapp/src/components/panels/Entities/meta.json
+++ b/platypush/backend/http/webapp/src/components/panels/Entities/meta.json
@@ -16,6 +16,22 @@
},
"cpu_info": {
+ "name": "System",
+ "name_plural": "System",
+ "icon": {
+ "class": "fas fa-circle-info"
+ }
+ },
+
+ "cpu_times": {
+ "name": "System",
+ "name_plural": "System",
+ "icon": {
+ "class": "fas fa-clock"
+ }
+ },
+
+ "cpu": {
"name": "System",
"name_plural": "System",
"icon": {
diff --git a/platypush/entities/system.py b/platypush/entities/system.py
index 4484dec7e..2e3831b88 100644
--- a/platypush/entities/system.py
+++ b/platypush/entities/system.py
@@ -5,6 +5,24 @@ from platypush.common.db import Base
from . import Entity
+if 'cpu' not in Base.metadata:
+
+ class Cpu(Entity):
+ """
+ ``CPU`` ORM (container) model.
+ """
+
+ __tablename__ = 'cpu'
+
+ id = Column(
+ Integer, ForeignKey(Entity.id, ondelete='CASCADE'), primary_key=True
+ )
+
+ __mapper_args__ = {
+ 'polymorphic_identity': __tablename__,
+ }
+
+
if 'cpu_info' not in Base.metadata:
class CpuInfo(Entity):
@@ -34,3 +52,21 @@ if 'cpu_info' not in Base.metadata:
__mapper_args__ = {
'polymorphic_identity': __tablename__,
}
+
+
+if 'cpu_times' not in Base.metadata:
+
+ class CpuTimes(Entity):
+ """
+ ``CpuTimes`` ORM (container) model.
+ """
+
+ __tablename__ = 'cpu_times'
+
+ id = Column(
+ Integer, ForeignKey(Entity.id, ondelete='CASCADE'), primary_key=True
+ )
+
+ __mapper_args__ = {
+ 'polymorphic_identity': __tablename__,
+ }