Commit Graph

217 Commits

Author SHA1 Message Date
Fabio Manganiello 33e2879413
Various UI improvements for the execute tab. 2023-05-17 10:41:02 +02:00
Fabio Manganiello 91daec579d
Reverted to the previous style for entities on mobile.
Better to use screen width wisely and avoid unnecessary padding.
2023-05-17 01:13:09 +02:00
Fabio Manganiello 8447f9a854
Improved rendering of actions/arguments documentation.
The frontend now calls `utils.rst_to_html` to render the docstrings as
HTML instead of dumping them as raw text.

Also, actions and arguments are now cached to improve performance.
2023-05-14 15:06:34 +02:00
Fabio Manganiello d4f8e51caf
A less blocking implementation of the entities loading UI logic. 2023-05-12 03:49:20 +02:00
Fabio Manganiello 6cd9cb6e76
Better entities caching on the frontend. 2023-05-12 03:18:22 +02:00
Fabio Manganiello 78c12212c6
[#260] A simple entities caching mechanism using the browser storage. 2023-05-10 02:26:06 +02:00
Fabio Manganiello 4f78d61223
Improved UI on mobile. 2023-05-06 12:34:27 +02:00
Fabio Manganiello 8af3ae17b8
A more efficient way of detecting the entity groups to display.
Instead of iterating over each of the entities in a grouping to find out
which groups should be displayed based on the selector's policy, the
selector can directly keep its `selectedGroups` attribute in sync with
the index.
2023-05-05 02:33:34 +02:00
Fabio Manganiello 4383dbb2b4
Bluetooth UI toggle aligned to the right - like all other toggles. 2023-05-05 01:04:39 +02:00
Fabio Manganiello 7db09276ca
Some small style improvements. 2023-05-04 02:20:40 +02:00
Fabio Manganiello 2398cac572
A more efficient and clean logic for `selectedEntities` calculation. 2023-05-04 02:19:55 +02:00
Fabio Manganiello 5d1c8cf8e9
Additional null check on this.searchTerm 2023-05-03 03:33:34 +02:00
Fabio Manganiello a06d0ef6a1
Merged all the items in the entities panel's header in the Selector component. 2023-05-03 03:14:46 +02:00
Fabio Manganiello 7c7818dd76
Fixed entity search.
It was broken by the previous refactor of the entities panel, which no
longer triggers the `watch` callback on the upstream `entityGroups`.

The new approach listens for entity updates on the frontend bus and
dynamically creates the entity groupings in `selectedGroups` if they are
missing.
2023-05-03 02:12:14 +02:00
Fabio Manganiello 9922305ac5
Fixed grouping for `entityGroups.id`.
Unlike the other entity groupings, which are 4-layered (`grouping ->
group -> entity_id -> entity`), the grouping by ID only needs 3 layers
(`grouping -> entity_id -> entity`).
2023-05-03 02:09:51 +02:00
Fabio Manganiello 68359b88a9
More performance improvements for the entities page.
- Don't recalculate entity groups every time. Instead, keep them in sync
  every time an entity is added or removed.

- Removed `computedChildren` from the entity component - no null nodes
  are guaranteed to be passed now, so there's no need for another
  iteration on the list of children.

- `childrenByParentId` now only looks in the scope of the entity's
  children instead of searching all the entities.
2023-05-02 10:14:03 +02:00
Fabio Manganiello 0fc0a22cd7
Reintroduced loading icon spin animation. 2023-05-02 10:08:36 +02:00
Fabio Manganiello 835ad9f2dc
Use plugin as a default entity grouping instead of category 2023-05-01 10:06:11 +02:00
Fabio Manganiello 85ecdcb0cb
Removed entity icon loading animation.
The animation has a big impact on page loading performance when the
system includes a high number of entities that all need their loading
animation to be render.
2023-05-01 09:49:34 +02:00
Fabio Manganiello b7cf1a42de
Use a proxy value in the `variable` component for the textbox.
Otherwise the value may keep being overwritten while the user is typing
a new one.
2023-05-01 01:22:20 +02:00
Fabio Manganiello a3839e637d
Set a max-width: 600px for group containers. 2023-05-01 01:22:02 +02:00
Fabio Manganiello 1e43866978
Moved more entity common CSS out of the Vue component. 2023-05-01 01:21:18 +02:00
Fabio Manganiello de84a65a22
Show prettified entity type when hover the entity icon. 2023-05-01 01:20:31 +02:00
Fabio Manganiello 7906ee2c49
Entity components style improvements.
Multiple style improvements for the entity components. Among these:

- A more consistent style for entity values and toggler buttons.
- Fixed overflowing/underflowing entities on smaller/larger screen
  sizes.
- Simplified the stylesheets for many entities as many component classes
  have now been moved to `common.scss`.
2023-04-30 22:32:50 +02:00
Fabio Manganiello 0b853e0a54
Apply `word-break: break-all` to entities' names and values.
The entity name and value in the component header may be arbitrarily
long and rendered on small screens.

We therefore need to ensure that the text won't overflow the screen
width.
2023-04-30 01:17:54 +02:00
Fabio Manganiello cbf0ea8a19
Style fixes for mobile screens. 2023-04-29 22:45:10 +02:00
Fabio Manganiello 6d9c34f06f
Added VariableModal to set variables from the dashboard. 2023-04-29 18:20:41 +02:00
Fabio Manganiello 38c87ef39f
Added frontend component for the `Variable` entity. 2023-04-29 11:37:21 +02:00
Fabio Manganiello ee54e0edbf
Use a font-awesome spinner instead of an animated gif when loading entities 2023-04-25 16:42:01 +02:00
Fabio Manganiello a72c32cb00
Added battery entity support to `system` plugin. 2023-04-23 00:41:21 +02:00
Fabio Manganiello b3440ab96b
Added support for fan sensors on the `system` plugin. 2023-04-23 00:08:27 +02:00
Fabio Manganiello 45d5f439be
Added support for system temperature sensor entities. 2023-04-22 22:42:11 +02:00
Fabio Manganiello 374f936c1f
Merged `network_stats` into `NetworkInterface` model. 2023-04-22 17:19:24 +02:00
Fabio Manganiello f4036be52b
Extracted and refactored more common elements of the Entity components. 2023-04-22 17:19:23 +02:00
Fabio Manganiello 977b55dea9
Merged network addresses into `NetworkInterface` model. 2023-04-22 17:19:23 +02:00
Fabio Manganiello 98a300c4b1
Added `NetworkInterface` entities to `system` plugin.
Plus, `platypush.schemas.system` has now been split into multiple
submodules to avoid a single-file mega-module with all the system
schemas definitions.
2023-04-21 00:45:15 +02:00
Fabio Manganiello 44b8fd4b34
Support for `disk` entities in the `system` integration. 2023-04-20 16:26:51 +02:00
Fabio Manganiello 6b03451386
Better responsive alignment for the collapse toggler. 2023-04-20 16:26:05 +02:00
Fabio Manganiello 153d03d43f
Moved CPU percentage on the level of the CPU entity instead of a child entity. 2023-04-19 01:48:05 +02:00
Fabio Manganiello 4ebfbf3851
Added memory stats entities. 2023-04-19 01:31:11 +02:00
Fabio Manganiello 1cee0459cf
Added `CpuFrequency` entity to `system`. 2023-04-18 01:49:36 +02:00
Fabio Manganiello a5b0a524f6
Added `CpuStats` entity to `system`. 2023-04-18 01:19:06 +02:00
Fabio Manganiello 4842c1911b
Frontend entities should have a reference to `allEntities`.
There are probably more optimal ways of achieving this other than
passing a reference to the full list of entities to each of the
entities, such as running a BFS to recursively expand all the entities
within the child hierarchy of an entity.

This is needed because the entity needs to know which entities aren't
direct children, but are two or more layers down in the hierarchy, so
they should be passed to their own child entities.
2023-04-17 02:25:03 +02:00
Fabio Manganiello e810025a6d
Added `Cpu` and `CpuTimes` entities. 2023-04-17 02:25:03 +02:00
Fabio Manganiello 65481dc6b4
Added `PercentSensor` entity type. 2023-04-17 02:25:02 +02:00
Fabio Manganiello 186a21f715
Added CpuInfo entity frontend components. 2023-04-17 02:25:01 +02:00
Fabio Manganiello 5a6f4bcf57
Added 3-axis sensor, accelerometer and magnetometer entities 2023-04-02 01:13:22 +02:00
Fabio Manganiello d964167631
`s/TimeDurationSensor/TimeDuration/g` 2023-04-02 00:57:48 +02:00
Fabio Manganiello 226034946f Added `distance_sensor` entity 2023-03-31 14:22:28 +02:00
Fabio Manganiello 295758bb20
Added frontend components for cloud instances. 2023-03-26 12:27:17 +02:00