emoncms / device

Emoncms device module
GNU Affero General Public License v3.0
2 stars 17 forks source link

Dry-run prepare initialization #14

Closed adminde closed 6 years ago

adminde commented 6 years ago

Hi again,

I recently had the motivation to tend to the idea to dry-run an initialization with possibilities to edit the template beforehand as discussed in the forum.

My idea there was to split the initialisation process into two steps: Preparation and Initialisation. The preparation tends to template-specific decoding of constants, node ids or tags and checks if feeds, inputs or their defined process lists already exist or not. The prepared template will be shown in a dialog with the possibility to deselect e.g. creation of certain inputs or the overriding of existing process lists.

The modified template will then be passed to the initialisation function. Hence, inline modifications before initialising the template of e.g. feed tag names should be no big effort to be implemented with this. To be perfectly honest, I hope this is not a bad idea as I understand that e.g. @pb66 has some quite big templates that could be bad style to be transmitted over the HTTP API as a JSON :)

TrystanLea commented 6 years ago

wow this is epically amazing! nice work :)