Commit graph

2,444 commits

Author SHA1 Message Date
Goffi
fbd9737b9a plugin XEP-0060: added node watching methods to bridge:
new methods psNodeWatchAdd and psNodeWatchRemove allows to set a watch for the time of the session on one node, to have a signal called when something change on this node.
This signal (psEventRaw) send raw data (raw XML), in opposition to psEvent which is there to send high level data (e.g. parsed blog data).
Those method are primarely there to let frontends manage local cache for pubsub nodes.
2017-11-19 16:51:39 +01:00
Goffi
da077485d2 core: added a mechanism to associate short names to namespaces:
- new internal registerNamespace can be used by a plugin to associate a short name to a namespace
- new NamespacesGet bridge method retrieve those associations
2017-11-19 16:46:07 +01:00
Goffi
4df7673f64 plugin XEP-0060: added "options" argument to psSubscribe, and return subscription id if present 2017-11-19 16:41:59 +01:00
Goffi
a7781537d6 jp (debug/monitor): if data can't be parsed (happen at beginning/end of stream because it's not complete XML), it is printed directly. 2017-11-19 16:38:35 +01:00
Goffi
3042d42bc4 plugin XML Log: Monkey patch is done on the whole XmlStream class, making it available as soon as the stream start + long received message are sent once fully parsed (not cut anymore) 2017-11-18 18:49:57 +01:00
Goffi
b79a309250 jp (pubsub): added new "set" command tu publish or update an item in a non-interactive way (while "edit" do it interactively). 2017-11-18 18:37:21 +01:00
Goffi
b762596721 core (sat.sh): force python 2 to launch twistd, and avoid launching wrong version if twistd is installed for python 3 too 2017-11-17 10:59:59 +01:00
Goffi
a014e6a873 plugins blog import, tickets import, XEP-0277: fixed call to getCommentsService (it is now returning a Deferred) 2017-11-16 07:31:00 +01:00
Goffi
a6e55a6c56 plugin import: fixed deserialisation of pubsub service 2017-11-15 21:15:42 +01:00
Goffi
a8b302b27d template (XMLUI): added JidInputWidget 2017-11-15 08:58:56 +01:00
Goffi
5522aed007 plugin tickets: specify parent service when using getCommentsService + fill reporter_jid is missing (will be discarded later if not in the schema) 2017-11-15 08:58:38 +01:00
Goffi
bf91404351 plugin XEP-0277: better getCommentsService:
getCommentsService now checks if the parent service is on a third party server and if it's PEP, and return the service to use accordingly.
2017-11-15 08:57:19 +01:00
Goffi
7de0ba6c64 plugin XEP-0060: use new findServiceEntity to get default pubsub service 2017-11-15 08:55:47 +01:00
Goffi
30768ce305 memory (disco): added findServiceEntity helper method to get first service of a kind 2017-11-15 08:54:32 +01:00
Goffi
774d9a37a4 plugin tickets: fill reporter field when it is not already filled 2017-11-11 18:39:26 +01:00
Goffi
c336351115 core (XMLUI): form's XMLUI is use as first arguments for filters in dataForm2Widgets 2017-11-11 18:39:26 +01:00
Goffi
243ffb9400 core (XMLUI): added a "value" property in TextWidget 2017-11-11 18:39:24 +01:00
Goffi
b6a97ced81 plugin identity: fixed jid.userhostJID call + capitalize user when jid is used. 2017-11-11 18:35:28 +01:00
Goffi
b3dcb3a490 plugin schema: prepend a "publisher" field after "id" in getDataFormItems with published given by PubSub service 2017-11-11 18:34:21 +01:00
Goffi
0b0bb0e2c9 template: added dict_ext filter to extend a dictionary 2017-11-09 07:54:28 +01:00
Goffi
936843bb67 frontends (xmlui): fixed crash on advanced_list use:
the data variable was set to None but kept for other nodes, resulting in a crash in a later test where a dict was expected.
2017-11-08 08:31:21 +01:00
Goffi
a45a20ca34 XEP-0060: fixed bad attribute in getItems 2017-11-08 07:47:01 +01:00
Goffi
95508766f5 template: fixed the use of eval_context_filter in item_filter 2017-11-05 23:36:45 +01:00
Goffi
f3d19392ea plugin schema: separate lines of text-multi in different values as requested by XEP-0004 2017-11-05 20:34:51 +01:00
Goffi
3b9659e52e plugin tickets: added ticketsSet and ticketsSchemaGet methods:
those methods are high level methods specialised for tickets.

ticketsSet will use default tickets node if node is not set, set "created" and "updated" fields, create comments node if the ticket is new, and associate it with "comments_uri" field.

ticketsSchemaGet is like getUISchema with node defaulting to tickets default node.
2017-11-05 15:36:06 +01:00
Goffi
fc2af0da9e frontends (xmlui): added an attribute to ignore some widgets (and their label) in create 2017-11-05 13:53:28 +01:00
Goffi
04c3f59571 frotends(xmlui): fixed _xmlui_for_name attribute for labels 2017-11-05 13:44:07 +01:00
Goffi
3629bb5c03 jp (debug): new monitor command to show pretty formatted XML stream 2017-11-04 22:11:45 +01:00
Goffi
d847301c70 jp (pubsub/node/create): fixed --field option 2017-11-04 22:11:01 +01:00
Goffi
06d5346714 plugin XEP-0277: minor id generation change 2017-11-04 22:10:01 +01:00
Goffi
f5f25e8ab5 misc: date update (yes it's a bit late :p ) 2017-11-03 14:31:42 +01:00
Goffi
a5f28ef7dd tmp: removed sat.tmp hierarchy and fixed references to it as it is now an independant sat_tmp repository 2017-11-03 14:19:10 +01:00
Goffi
4809f9aa38 jp (xmlui): fixed workflow when value is for a BoolWidget 2017-10-31 23:51:19 +01:00
Goffi
dba43447aa jp (ad-hoc/run): node is now a positional argument 2017-10-31 23:30:18 +01:00
Goffi
78911f8a3b jp (xmlui): XMLUIDialog.show has now a dummy argument, so workflow arguments can be put there 2017-10-31 23:29:45 +01:00
Goffi
3927da13c3 jp (ad-hoc): new "list" and "run" commands:
- list just display commands available at ad-hoc entry point. --verbose allows to display values names, which is useful for automation.

- run can either run interactively a command, or execute a workflow to automate them.
2017-10-31 23:20:04 +01:00
Goffi
4bceddea67 jp: XMLUI implementation first draft:
first implementation of XMLUI for jp. The display is simplistic for now by displaying widgets in the order in which they appear, and doing a simple input when a value is needed.

Not all widgets/dialogs are implemented yet, and most flags/options/styles are not handled.

It is possible to automate command, using "workflow" attribute:
it's a list of command that are executed in order. So far only a const (SUBMIT) and fields values can be set.

If verbosity is set, fields name are displayed, which can be useful to automate commands.
2017-10-31 23:17:37 +01:00
Goffi
7045ad3f1c core (disco): do not cache disco items when node is set 2017-10-31 23:11:58 +01:00
Goffi
a68772cdeb plugin XEP-0050: renamed "requestCommandsList" method to "list" + added a run command + fixes:
- XMLUI cancellation is fixed
- when called from bridge, "list" (adHocList) command doesn't prepend instructions
2017-10-31 23:11:13 +01:00
Goffi
fc08583152 core (xmlui): fixed data_form => XMLUI conversion when filters is None 2017-10-31 23:07:26 +01:00
Goffi
6e8375cda5 plugin tickets: high level tickets handling, first draft:
this plugin use plugin schema to handle tickets, and filter well known fields like created, updated and labels.
2017-10-27 18:24:35 +02:00
Goffi
ecb3ba897e template: improved date formatter:
the date filter is now named "date_fmt" and can be use to specify several useful formats (see docstring), using the current locale.
The "relative" format return the whole human readable relative date.

The new in_the_past test allow to check if a date is passed.
2017-10-27 18:20:10 +02:00
Goffi
dde17b2b06 template: new item_value filter
this filter is used with XMLUI to specify filters before using a generate method.
2017-10-27 18:17:35 +02:00
Goffi
26751b4f89 template: improved attribute escaping, and added it to filters under the name "attr_escape" 2017-10-27 18:13:25 +02:00
Goffi
d308bbfd6b template(XMLUI): added items property to ListWidget:
this property get values and labels from items relevant for the current list, according to styles.
2017-10-27 18:11:20 +02:00
Goffi
ada8d4756e plugin tickets import bugzilla: fixed parsing of "created" and "updated" fields 2017-10-27 18:08:53 +02:00
Goffi
0a33ab2d1d core (XMLUI): filters can now be used when converting data form to XMLUI:
they can be used to modify created widgets, this is specially useful to customise well known field.
2017-10-27 18:06:58 +02:00
Goffi
3ccb4c1038 core (XMLUI), template(XMLUI): added flags to ListWidget:
following flags have been added:
- noselect: list selection is not allowed (options are the important data)
- extensible: user can add elements to the list
- reducible: user can remove elements from the list
- inline: presentation hint: the list should be displayed horizontally
2017-10-27 18:03:35 +02:00
Goffi
55a5b603fd plugins tickets import, jp (ticket/import): implemented mapping:
- mapping is an option allowing do map imported field to a specific field in the newly created item
- importers can now use complexe data types in options using JSON
2017-10-27 17:58:05 +02:00
Goffi
baaa4b1419 plugin pubsub schema: allow any data_form schema:
the schema is actually the schema needed for the items, so it should not in pubsub schema namespace.
2017-10-27 17:54:00 +02:00