diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/Cpu.vue b/platypush/backend/http/webapp/src/components/panels/Entities/Cpu.vue new file mode 120000 index 0000000000..792c769532 --- /dev/null +++ b/platypush/backend/http/webapp/src/components/panels/Entities/Cpu.vue @@ -0,0 +1 @@ +Device.vue \ No newline at end of file diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/CpuInfo.vue b/platypush/backend/http/webapp/src/components/panels/Entities/CpuInfo.vue index e641ed6b87..5d68e4eca4 100644 --- a/platypush/backend/http/webapp/src/components/panels/Entities/CpuInfo.vue +++ b/platypush/backend/http/webapp/src/components/panels/Entities/CpuInfo.vue @@ -9,7 +9,7 @@
-
CPU Info
+
@@ -18,7 +18,7 @@
-
+
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 0000000000..8c845e685a --- /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 1fae044a4d..aaf4e2fd4d 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 4484dec7e8..2e3831b888 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__, + }