The stream media cache can easily grow in MB in size. Storing it in
Redis means impacting the performance of the application, as on every
web media streaming event it'll have to fetch and deserialize MBs of
data, and Redis may also flush the .rdb file to disk several times in
the process.
- Reduced size of the Ubuntu image by removing some unneeded packages
(docutils, manpages, babel, fonts, python-pil etc.) that take a lot of
space.
- Better self-documented docker-compose.yml.
- Added reference to the registry.platypush.tech/platypush image in
docker-compose.yml (README reference will follow).
- Fixed grep condition in the Docker prepare script.
- Pass `--no-deps` to `pip install platypush`. The dependencies of the
application, now that `marshmallow_dataclasses` has been removed, are
all available in the package managers of the supported images (with
the exception for croniter in Alpine Linux for now), so they can all
be installed via system package manager rather than pip. This also
prevents Ubuntu builds from breaking because system-installed packages
are being overwritten with pip-installed copies.
If a modal was spawned from within an entity in a group, then the whole
group needs to get its zIndex bumped.
Otherwise, the modal component will be "caged" within the scope of the
parent and other entity groups will be rendered above it.
- Add `set` statement, which can be used to set context variables within
YAML procedures. Example:
```yaml
procedure.test:
- set:
foo: bar
- action: logger.info
args:
msg: ${bar}
```
- More reliable flow control for nested break/continue/return.
- Propagate changes to context variables also to upstream procedures.
Any pending `if`s in the parsing queue of a procedure should also be
cleared if the current statement in the procedure is a
break/continue/return.
In such case we should terminate the current branch, and that involves
ensuring that any `if`s branches that are still being parsed are
inserted before the branch-terminating statement.
`Draggable` components should emit `dragend`, not `drop` events.
`drop` should only be emitted by `Droppable` components, or the receiver
of a component that uses both won't be able to tell if a `drop` event
came from a component being dragged, or from an element where a dragged
element was dropped.
The reason is that an `id` specified on procedure level will be applied
to all the child requests.
This means that the first response from the first completed request will
be sent to Redis and mistakenly interpreted by HTTP listeners as the
return value of the whole procedure.
`Procedure.build` should instead calculate its own ID for the procedure,
and apply different IDs to the child requests.
- Added UI panel.
- Added support for entity types.
- Enhanced ability to edit procedures.
- Added ability to create, rename, edit, duplicate and delete stored
procedures.
- Added support for YAML dumps of non-Python procedures.
- Added support for visualizing Python procedures directly in their
source files.
This is to bridge the gap between pointer-based and touch-based devices
and provide a drag-and-drop implementation that exposes a consistent API
for both the interfaces.
These components work by wrapping an underlying draggable/droppable DOM
element and proxying the event handlers consistently when drag/touch
events are detected.
This allows to listen to high-level drag/drop events even on touch-based
interface based on touch start/move/end events.
Example usage:
```vue
<template>
<div class="draggable" ref="draggable">
I can be dragged.
</div>
<div class="droppable" ref="droppable">
Drop elements here.
</div>
<Draggable :element="$refs.draggable"
@drag="console.log('The element is being dragged')"
@drop="console.log('The element is been dropped')" />
<Droppable :element="$refs.droppable"
@dragenter="console.log('Entering')"
@dragleave="console.log('Leaving')"
@dragover="console.log('Dragging over')"
@drop="console.log('Dropped!')" />
</template>
<style lang="scss" scoped>
.draggable {
&.dragged {
opacity: 0.5;
}
}
.droppable {
&.active {
border: 1px solid green;
}
&.selected {
background: yellow;
}
}
</style>
```
- Adds the ability to select lines from the editor, which in turn will
highlight them.
- Adds the ability to load a file and scroll at a specific line if the
URL has with the `line` argument.
- Adds the ability to maximize the file editor modal.
- Added support for multiple element classes.
- Added `glow` property.
- Added support for absolute initial positioning.
- Added dynamic button size.
- Added FloatingButtons component to support groups of floating buttons.
- Don't propagate `close` events. This prevents underlying modals from
being closed on cascade when the current modal is closed.
- Added logic to filter out <ESC> keystrokes that have already targeted
the outermost open modal, so underlying modals won't be closed.
- Added `:before-close` property. This is a callback that can optionally
be passed to the component and it will run some custom logic before
the modal is closed. If it returns false then the modal will stay
open.
- Update the cached representation of the procedure asynchronously on
the `publish_entities` callback. This prevents stale records from
being loaded from the db before the entities engine has persisted the
new ones.
- Don't re-publish all entities when calling `procedures.status` at the
end of `procedures.save`. This is both for performance reasons and to
avoid sending to the entities engine stale representation of the data.
- `procedures.status` should always sync with the db to ensure that the
action returns the most up-to-date version of the procedures.
- Store, return and propagate entity procedure metadata.
- `procedures.exec` now supports running procedures "on the fly" given a
definition with a list of actions.
- Fixed procedure renaming/overwrite logic.
- Access to `_all_procedures` should always be guarded by a lock.
Earlier any extra parameters passed to the `db` configuration other than
`engine` where ignored.
This enables engine-level configurations such as:
```yaml
db:
# Display all SQL queries
echo: true
```
Messages can be quite big and verbose, and they can anyway be subscribed
over Websockets.
Full dumps are anyway enabled when Platypush is started in verbose mode.
This commit replaces the dumps on INFO level with a quick summary
containing the message ID, request/event type and response time.
If some procedures are removed either from the configuration or from the
loaded scripts, then their associated entities should also be removed
from the database when the `procedures` plugin is loaded.
If some procedures are removed either from the configuration or from the
loaded scripts, then their associated entities should also be removed
from the database when the `procedures` plugin is loaded.
- Added support for file/directory add/copy/move/rename/remove
operations.
- Added automatic detection of MIME types.
- Added support for file view/download.
- Added file uploader component.
- Added custom sorting and other visualization options.
- Added custom `Home` component to show configurable bookmarks above the
filesystem root level.
- Added file editor with automatic syntax highlight.
- Added `uppercase` property (default: true) for the modal title. This
makes it possible to override the default case of the modal title.
- Added support for custom buttons in the modal titlebar.
This is needed in several places in the code where we need to compare if
two strings differ, but either the strings are too long (e.g. content of
large files) or we don't want to pass the original values (e.g.
credentials, session tokens etc.).
- Added `style` property to pass static style rules to the dropdown
body.
- Better positioning of the dropdown when the resulting body is too long
and may overflow the top of the screen - in that case, the dropdown
position needs to be maximized at zero.