Skip to content

Commit 297caeb

Browse files
committed
- Remove binaries after bundling (release workflow)
- Fix broken links in README - Feed Configure Portal (data generation rules) - Removed the FULLSCREEN button (irrelevant) - Ability to specify desired number of elements of an array field (of all types) with a default count/size of 2 - Prevent array or object fields selection for SOURCE or TARGET for attribute mapping - Update to CSS theme to match (basic) solace theme (black background) - Update solace.SolclientFactoryProfiles to version10_5 - Binary pretty dump (when BYTES payload type is specified or a non-UTF-8 content is detected on the file)
1 parent 847d766 commit 297caeb

28 files changed

Lines changed: 488 additions & 200 deletions

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
zip -qq -r stm-linux-v${{ steps.package-version.outputs.current-version}}.zip . -i stm-linux
4141
zip -qq -r stm-alpine-v${{ steps.package-version.outputs.current-version}}.zip . -i stm-alpine
4242
zip -qq -r stm-win-v${{ steps.package-version.outputs.current-version}}.zip . -i stm-win.exe
43+
rm stm-macos stm-linux stm-alpine stm-win.exe
4344
cd ..
4445
4546
- name: Publish artifacts to github

README.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,33 @@
77
The Solace Try-Me CLI is a command line tool used to publish and receive messages from the Solace PubSub+ Broker. Designed to help develop, test and debug Solace PubSub+ services and applications faster without the need to use a graphical interface.
88

99
- [Solace Try-Me CLI](#solace-try-me-cli)
10-
* [Documentation](#documentation)
11-
+ [Installation](#installation)
12-
- [Homebrew](#homebrew)
13-
- [apt-get](#apt-get)
14-
- [Download](#download)
15-
+ [Verify Installation](#verify-installation)
16-
+ [Command Structure](#command-structure)
17-
+ [Command Parameters](#command-parameters)
18-
+ [Command Examples](#command-examples)
19-
+ [Command Persistence](#command-persistence)
20-
* [Setup `stm` configuration](#setup-stm-configuration)
21-
+ [Use with a Software Broker](#use-with-a-software-broker)
22-
+ [Use with a Cloud Broker](#use-with-a-cloud-broker)
23-
* [Run `stm` tool](#run-stm-tool)
24-
+ [Working with Software Broker](#working-with-software-broker)
25-
+ [Receive Messages](#receive-messages)
26-
+ [Working with Cloud Broker](#working-with-cloud-broker)
27-
* [Using `stm` to create and modify Broker resources](#using-stm-to-create-and-modify-broker-resources)
28-
+ [Create a Queue](#create-a-queue)
29-
* [Using `stm feed` tool for event feed generation](#using-stm-feed-tool-for-event-feed-generation)
30-
* [Contributing](#contributing)
31-
+ [Develop](#develop)
32-
* [Run from build](#run-from-build)
33-
* [Technology Stack](#technology-stack)
34-
* [Resources](#resources)
35-
* [Authors](#authors)
36-
* [License](#license)
10+
- [Documentation](#documentation)
11+
- [Installation](#installation)
12+
- [MacOS using Homebrew](#macos-using-homebrew)
13+
- [Linux (or WSL on Windows) using apt-get](#linux-or-wsl-on-windows-using-apt-get)
14+
- [Download the Archive](#download-the-archive)
15+
- [Verify Installation](#verify-installation)
16+
- [Command Structure](#command-structure)
17+
- [Command Parameters](#command-parameters)
18+
- [Command Examples](#command-examples)
19+
- [Command Persistence](#command-persistence)
20+
- [Setup `stm` configuration](#setup-stm-configuration)
21+
- [Use with a Software Broker](#use-with-a-software-broker)
22+
- [Use with a Cloud Broker](#use-with-a-cloud-broker)
23+
- [Run `stm` tool](#run-stm-tool)
24+
- [Working with Software Broker](#working-with-software-broker)
25+
- [Receive Messages](#receive-messages)
26+
- [Working with Cloud Broker](#working-with-cloud-broker)
27+
- [Using `stm` to create and modify Broker resources](#using-stm-to-create-and-modify-broker-resources)
28+
- [Create a Queue](#create-a-queue)
29+
- [Using `stm feed` tool for event feed generation](#using-stm-feed-tool-for-event-feed-generation)
30+
- [Contributing](#contributing)
31+
- [Develop](#develop)
32+
- [Run from build](#run-from-build)
33+
- [Technology Stack](#technology-stack)
34+
- [Resources](#resources)
35+
- [Authors](#authors)
36+
- [License](#license)
3737

3838
## Documentation
3939

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@solace-community/stm",
3-
"version": "0.0.54",
3+
"version": "0.0.55",
44
"description": "Solace Try-Me Command Line Tool",
55
"repository": {
66
"type": "git",
@@ -43,6 +43,8 @@
4343
"enquirer": "^2.4.1",
4444
"express": "^4.18.2",
4545
"form-data": "^4.0.0",
46+
"hexdump-nodejs": "^0.1.0",
47+
"istextorbinary": "^9.5.0",
4648
"http": "^0.0.1-security",
4749
"json-schema-library": "^10.0.0-rc1",
4850
"node-localstorage": "^3.0.5",

public/apibroker.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,9 @@
3535

3636
<!-- Right navbar links -->
3737
<ul class="navbar-nav ml-auto">
38-
<li class="nav-item">
39-
<a class="nav-link" data-widget="fullscreen" href="#" role="button">
40-
<i class="fas fa-expand-arrows-alt"></i>
41-
</a>
42-
</li>
4338
<li class="nav-item">
4439
<a class="nav-link" data-widget="sign-out" href="#" role="button" onclick="exitTool()">
45-
<i class="fas fa-sign-out-alt" aria-hidden="true"></i>
40+
<i class="fas fa-sign-out-alt fa-2x" aria-hidden="true"></i>
4641
</a>
4742
</li>
4843
</ul>

public/apifeed.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,9 @@
3737

3838
<!-- Right navbar links -->
3939
<ul class="navbar-nav ml-auto">
40-
<li class="nav-item">
41-
<a class="nav-link" data-widget="fullscreen" href="#" role="button">
42-
<i class="fas fa-expand-arrows-alt"></i>
43-
</a>
44-
</li>
4540
<li class="nav-item">
4641
<a class="nav-link" data-widget="sign-out" href="#" role="button" onclick="exitTool()">
47-
<i class="fas fa-sign-out-alt" aria-hidden="true"></i>
42+
<i class="fas fa-sign-out-alt fa-2x" aria-hidden="true"></i>
4843
</a>
4944
</li>
5045
</ul>

public/broker.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,9 @@
3535

3636
<!-- Right navbar links -->
3737
<ul class="navbar-nav ml-auto">
38-
<li class="nav-item">
39-
<a class="nav-link" data-widget="fullscreen" href="#" role="button">
40-
<i class="fas fa-expand-arrows-alt"></i>
41-
</a>
42-
</li>
4338
<li class="nav-item">
4439
<a class="nav-link" data-widget="sign-out" href="#" role="button" onclick="exitTool()">
45-
<i class="fas fa-sign-out-alt" aria-hidden="true"></i>
40+
<i class="fas fa-sign-out-alt fa-2x" aria-hidden="true"></i>
4641
</a>
4742
</li>
4843
</ul>

public/favicon.ico

196 KB
Binary file not shown.

public/feed.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,9 @@
3535

3636
<!-- Right navbar links -->
3737
<ul class="navbar-nav ml-auto">
38-
<li class="nav-item">
39-
<a class="nav-link" data-widget="fullscreen" href="#" role="button">
40-
<i class="fas fa-expand-arrows-alt"></i>
41-
</a>
42-
</li>
4338
<li class="nav-item">
4439
<a class="nav-link" data-widget="sign-out" href="#" role="button" onclick="exitTool()">
45-
<i class="fas fa-sign-out-alt" aria-hidden="true"></i>
40+
<i class="fas fa-sign-out-alt fa-2x" aria-hidden="true"></i>
4641
</a>
4742
</li>
4843
</ul>

public/feed/countform.js

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
function validateInstanceCountRule() {
2+
let valid = true;
3+
4+
let topic = $("#arr_parameterTopicName").text();
5+
let message = $("#arr_parameterMessageName").text();
6+
let fieldParam = $("#arr_parameterPayloadFieldName").text();
7+
8+
var feed = JSON.parse(localStorage.getItem('currentFeed'));
9+
var feedRule = feed.rules.find(r => r.topic === topic && r.messageName === message);
10+
11+
var field = feedRule.payload[fieldParam];
12+
if (fieldParam.indexOf('.') > 0)
13+
field = getFieldRule(feedRule.payload, fieldParam)
14+
15+
field.rule = {
16+
...field.rule,
17+
count: parseInt($('#arr_dataFieldCount').val())
18+
}
19+
20+
console.log(field.rule);
21+
localStorage.setItem('changed', true);
22+
localStorage.setItem('currentFeed', JSON.stringify(feed));
23+
24+
var parent = document.getElementById('payload-variable-pane');
25+
parent.innerHTML = '';
26+
parent.style.width = 'auto';
27+
28+
var node = $('#payload-tree-pane').treeview('getSelected')
29+
if (!node || !node.length) return;
30+
31+
var el = document.createElement('div');
32+
var field = feedRule.payload[node[0].path];
33+
if (node[0].path.indexOf('.') > 0)
34+
field = getFieldRule(feedRule.payload, node[0].path)
35+
36+
el.innerHTML = buildParamRuleUI('send', field.rule, feedRule.topic, 'payload', node[0]);
37+
parent.appendChild(el);
38+
39+
return valid;
40+
}
41+
42+
function arrayInstanceCountAssignSubmit() {
43+
'use strict';
44+
45+
// Fetch all the forms we want to apply custom Bootstrap validation styles to
46+
// const forms = document.querySelectorAll('#parameterRulesForm');
47+
const forms = document.querySelectorAll('.needs-validation#arrayParameterCountForm');
48+
49+
50+
// Loop over them and prevent submission
51+
Array.prototype.slice.call(forms).forEach((form) => {
52+
form.addEventListener('submit', async (event) => {
53+
console.log('In submit', form.id, form.classList);
54+
event.preventDefault();
55+
if (!form.checkValidity()) {
56+
event.stopPropagation();
57+
}
58+
59+
$('#field_instance_count_form').modal('toggle');
60+
validateInstanceCountRule();
61+
62+
const path = window.location.href.substring(0, window.location.href.lastIndexOf('/'));
63+
await fetch(path + `/feedrules`, {
64+
method: "POST",
65+
headers: {
66+
'Content-Type': 'application/json;charset=UTF-8'
67+
},
68+
body: localStorage.getItem('currentFeed')
69+
});
70+
71+
toastr.success('Instance count rule updated successfully.')
72+
form.classList.toggle('was-validated');
73+
return false;
74+
});
75+
});
76+
}

0 commit comments

Comments
 (0)