Skip to content

Commit

Permalink
Prettififcation of source code
Browse files Browse the repository at this point in the history
  • Loading branch information
mountaindude committed Sep 3, 2023
1 parent 638bfb7 commit deddfa7
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 78 deletions.
6 changes: 2 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

## [0.0.4](https://github.com/ptarmiganlabs/ctrl-q-nr/compare/v0.0.3...v0.0.4) (2023-09-03)


### Bug Fixes

* Add CA cert support for QSEoW ([ff4a715](https://github.com/ptarmiganlabs/ctrl-q-nr/commit/ff4a7150118dbb06b770a6b990a01d6da9056656)), closes [#20](https://github.com/ptarmiganlabs/ctrl-q-nr/issues/20)

- Add CA cert support for QSEoW ([ff4a715](https://github.com/ptarmiganlabs/ctrl-q-nr/commit/ff4a7150118dbb06b770a6b990a01d6da9056656)), closes [#20](https://github.com/ptarmiganlabs/ctrl-q-nr/issues/20)

### Refactoring

* Put cloud and QSEoW files in separate directories ([dece4b3](https://github.com/ptarmiganlabs/ctrl-q-nr/commit/dece4b31157121023ff4430fac198271371e9881)), closes [#21](https://github.com/ptarmiganlabs/ctrl-q-nr/issues/21)
- Put cloud and QSEoW files in separate directories ([dece4b3](https://github.com/ptarmiganlabs/ctrl-q-nr/commit/dece4b31157121023ff4430fac198271371e9881)), closes [#21](https://github.com/ptarmiganlabs/ctrl-q-nr/issues/21)

## [0.0.3](https://github.com/ptarmiganlabs/ctrl-q-nr/compare/v0.0.2...v0.0.3) (2023-09-02)

Expand Down
52 changes: 31 additions & 21 deletions src/qseow/qseow-app-nr.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@
<script type="text/html" data-template-name="qseow-app">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-server"><i class="fa fa-server"></i> Qlik Sense server</label>
<input type="text" id="node-input-server" placeholder="Select Qlik Sense Server" readonly>
<input type="text" id="node-input-server" placeholder="Select Qlik Sense Server" readonly />
</div>
<div class="form-row">
<label for="node-input-op"><i class="fa fa-cog"></i> Operation</label>
Expand Down Expand Up @@ -147,13 +147,15 @@
</script>

<script type="text/html" data-help-name="qseow-app">
<p><p>A node that perform operations on apps on a client-managed Qlik Sense server.</p>

<p></p>
<p>A node that perform operations on apps on a client-managed Qlik Sense server.</p>

<h2>Shared properties</h2>
<ul>
<li><strong>Name:</strong> The name of the node.</li>
<li><strong>Qlik Sense server:</strong> The Qlik Sense server to connect to.</li>
<li><strong>Operation:</strong> The operation to perform. The options are:
<li>
<strong>Operation:</strong> The operation to perform. The options are:
<ul>
<!-- <li><strong>Create:</strong> Create one or more apps.</li> -->
<li><strong>Read:</strong> Read metadata for one or more apps.</li>
Expand All @@ -162,7 +164,8 @@ <h2>Shared properties</h2>
<li><strong>Duplicate:</strong> Duplicate one or more apps.</li>
</ul>
</li>
</ul>0
</ul>
0

<h2>Operation specific properties</h2>

Expand All @@ -172,10 +175,12 @@ <h3>Source of apps</h3>
<li><strong>App IDs below:</strong> The app IDs are defined in the node's config.</li>
<li><strong>App IDs in incoming message:</strong> The app IDs are in the incoming message.</li>
</ul>

<h3>App IDs defined in the node itself</h3>
<p>Enter one app ID per line in the editor.<br>
Empty lines are ignored. Lines starting with a hash sign (#) are ignored.</p>
<p>
Enter one app ID per line in the editor.<br />
Empty lines are ignored. Lines starting with a hash sign (#) are ignored.
</p>
<p>Example:</p>
<pre>
# Sales related apps
Expand All @@ -184,7 +189,8 @@ <h3>App IDs defined in the node itself</h3>

# Finance related apps
b8d7f6a5-c4e3-2g1i-9h8j-7k6l5m4n3o2p
</pre>
</pre
>

<h3>App IDs in incoming message</h3>
<p>The app IDs are in the <code>payload.appId</code> array of the incoming message.</p>
Expand All @@ -195,7 +201,8 @@ <h3>App IDs in incoming message</h3>
"f4c9d5e7-8b6a-4d2c-9f1e-0a3b7e6d8c5f",
"b8d7f6a5-c4e3-2g1i-9h8j-7k6l5m4n3o2p"
]
</pre>
</pre
>

<h2>Operations</h2>

Expand All @@ -207,23 +214,26 @@ <h3>Read</h3>
<li><strong>payload.app:</strong> Array of app objects, one for each app that was read.</li>
<li><strong>payload.appIdNoExist:</strong> Array of app IDs, one for each app that was not found on the Sense server.</li>
</ul>

<h3>Update</h3>
<p>Update metadata for one or more apps.</p>

<h4>Input message</h4>
<p>The input message <strong>must</strong> contain the following properties:</p>
<ul>
<li><strong>payload.app:</strong> Array of objects, one for each app to be updated. The objects have at least one of these properties set:</li>
<ul>
<li><strong>id:</strong> Id of the app to be updated.</li>
</ul>
<li>
<strong>payload.app:</strong> Array of objects, one for each app to be updated. The objects have at least one of these
properties set:
</li>
<ul>
<li><strong>id:</strong> Id of the app to be updated.</li>
</ul>
<li><strong>payload.newData</strong> Object with the new metadata for the app. The object may contain the following properties:</li>
<ul>
<li><strong>name:</strong> New name of the app.</li>
<li><strong>description:</strong> New description of the app.</li>
<li><strong>tag:</strong> Array of tags to be added to the app, in addition to any existing tags the app already has.</li>
</ul>
<ul>
<li><strong>name:</strong> New name of the app.</li>
<li><strong>description:</strong> New description of the app.</li>
<li><strong>tag:</strong> Array of tags to be added to the app, in addition to any existing tags the app already has.</li>
</ul>
</ul>

<p>The input message <strong>may</strong> contain the following properties:</p>
Expand Down
3 changes: 2 additions & 1 deletion src/qseow/qseow-app-nr.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ module.exports = function (RED) {
// Incoming message is an array of objects with properties
// - "sourceAppId" Id of source app. Mandatory
// - "newAppName" Name of new app. If empty, use name of source app + "copy" + timestamp
// - "includeCustomProperties" Flag to indicate if source app's custom properties should be copied. true/false (default: false)
// - "includeCustomProperties" Flag to indicate if source app's custom properties should be copied.
// true/false (default: false)

// Sanity check structure of incoming message.
// Error and return if a mandatory property is missing or if payload is not an array
Expand Down
14 changes: 6 additions & 8 deletions src/qseow/qseow-service-status-nr.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@
<script type="text/html" data-template-name="qseow-service-status">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-server"><i class="fa fa-server"></i> Qlik Sense Server</label>
<input type="text" id="node-input-server" placeholder="Select Qlik Sense Server" readonly>
<input type="text" id="node-input-server" placeholder="Select Qlik Sense Server" readonly />
</div>
</script>

<script type="text/html" data-help-name="qseow-service-status">
<p>A node that gets statuses from client-managed Qlik Sense services</p>

<p>It can for example be used to check if a Qlik Sense service is running or not.</p>

<h2>Properties</h2>

<ul>
Expand All @@ -44,17 +44,15 @@ <h2>Properties</h2>
</ul>

<h2>Input</h2>
<p> The node's logic will trigger when it receives a message on its input.</p>
<p>The node's logic will trigger when it receives a message on its input.</p>

<h2>Output</h2>
<p> The node will output a message with the following properties:</p>
<p>The node will output a message with the following properties:</p>
<ul>
<li><strong>payload.serviceStatus:</strong> Array of service status objects, as returned by the Sense server.</li>
</ul>

<h2>Example usage</h2>
<p>Get the status of all services, then filter out the ones that are not running:</p>
<pre>

</pre>
<pre></pre>
</script>
36 changes: 22 additions & 14 deletions src/qseow/qseow-tag-nr.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
oneditprepare() {
// eslint-disable-next-line no-unused-vars
const node = this;

// eslint-disable-next-line no-undef
this.editorTagName = RED.editor.createEditor({
id: 'node-input-tagName-editor',
Expand Down Expand Up @@ -70,11 +70,11 @@
<script type="text/html" data-template-name="qseow-tag">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-server"><i class="fa fa-server"></i> Qlik Sense Server</label>
<input type="text" id="node-input-server" placeholder="Select Qlik Sense Server" readonly>
<input type="text" id="node-input-server" placeholder="Select Qlik Sense Server" readonly />
<!-- <a href="#" class="editor-button editor-button-small" id="node-input-server-select"><i class="fa fa-pencil"></i></a> -->
</div>
<div class="form-row">
Expand Down Expand Up @@ -106,22 +106,27 @@ <h2>Shared properties</h2>
<ul>
<li><strong>Name:</strong> The name of the node.</li>
<li><strong>Server:</strong> The Qlik Sense server to connect to.</li>
<li><strong>Source of tag names:</strong> The source of the tag names to use. The options are "Tags below" and "Tags in incoming message".</li>
<li>
<strong>Source of tag names:</strong> The source of the tag names to use. The options are "Tags below" and "Tags in incoming
message".
</li>
<li><strong>Operation:</strong> The operation to perform. The options are "Create", "Read" and "Delete".</li>
</ul>

<h2>Operation specific properties</h2>

<h3>Tag select properties</h3>
<p> The tags to be used can be defined in one of two ways:</p>
<p>The tags to be used can be defined in one of two ways:</p>
<ul>
<li><strong>App IDs below:</strong> The tags are defined in the node's config.</li>
<li><strong>Tags in incoming message:</strong> The tags are in the <code>payload.tag</code> property of the incoming message.</li>
</ul>

<h4>Tags defined in the node itself</h4>
<p>Enter one tag per line in the editor.<br>
Empty lines are ignored. Lines starting with a hash sign (#) are ignored.</p>
<p>
Enter one tag per line in the editor.<br />
Empty lines are ignored. Lines starting with a hash sign (#) are ignored.
</p>
<p>Example:</p>
<pre>
# Sales related tags
Expand All @@ -131,7 +136,8 @@ <h4>Tags defined in the node itself</h4>
# Year tagging
2024
2023
</pre>
</pre
>

<h4>Tags in incoming message</h4>
<p>The tags are in the <code>payload.tag</code> array of the incoming message.</p>
Expand All @@ -143,7 +149,8 @@ <h4>Tags in incoming message</h4>
"2024",
"2023
]
</pre>
</pre
>

<h2>Operations</h2>

Expand All @@ -161,7 +168,10 @@ <h2>Read</h2>
<p>The output message includes the following properties:</p>
<ul>
<li><strong>payload.tag:</strong> Array of tag objects, one for each tag that was read.</li>
<li><strong>payload.tagNameNoExist:</strong> Array of tag names that do not exist on the Sense server. Only relevant if at least one tag was specified.</li>
<li>
<strong>payload.tagNameNoExist:</strong> Array of tag names that do not exist on the Sense server. Only relevant if at least one
tag was specified.
</li>
</ul>

<h2>Delete</h2>
Expand All @@ -173,7 +183,5 @@ <h2>Delete</h2>
</ul>

<h2>Example usage</h2>
<pre>

</pre>
<pre></pre>
</script>
Loading

0 comments on commit deddfa7

Please sign in to comment.