Skip to content

Commit

Permalink
- Remove binaries after bundling (release workflow)
Browse files Browse the repository at this point in the history
- 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)
  • Loading branch information
gvensan committed Sep 30, 2024
1 parent 847d766 commit 297caeb
Show file tree
Hide file tree
Showing 28 changed files with 488 additions and 200 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
zip -qq -r stm-linux-v${{ steps.package-version.outputs.current-version}}.zip . -i stm-linux
zip -qq -r stm-alpine-v${{ steps.package-version.outputs.current-version}}.zip . -i stm-alpine
zip -qq -r stm-win-v${{ steps.package-version.outputs.current-version}}.zip . -i stm-win.exe
rm stm-macos stm-linux stm-alpine stm-win.exe
cd ..
- name: Publish artifacts to github
Expand Down
54 changes: 27 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,33 @@
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.

- [Solace Try-Me CLI](#solace-try-me-cli)
* [Documentation](#documentation)
+ [Installation](#installation)
- [Homebrew](#homebrew)
- [apt-get](#apt-get)
- [Download](#download)
+ [Verify Installation](#verify-installation)
+ [Command Structure](#command-structure)
+ [Command Parameters](#command-parameters)
+ [Command Examples](#command-examples)
+ [Command Persistence](#command-persistence)
* [Setup `stm` configuration](#setup-stm-configuration)
+ [Use with a Software Broker](#use-with-a-software-broker)
+ [Use with a Cloud Broker](#use-with-a-cloud-broker)
* [Run `stm` tool](#run-stm-tool)
+ [Working with Software Broker](#working-with-software-broker)
+ [Receive Messages](#receive-messages)
+ [Working with Cloud Broker](#working-with-cloud-broker)
* [Using `stm` to create and modify Broker resources](#using-stm-to-create-and-modify-broker-resources)
+ [Create a Queue](#create-a-queue)
* [Using `stm feed` tool for event feed generation](#using-stm-feed-tool-for-event-feed-generation)
* [Contributing](#contributing)
+ [Develop](#develop)
* [Run from build](#run-from-build)
* [Technology Stack](#technology-stack)
* [Resources](#resources)
* [Authors](#authors)
* [License](#license)
- [Documentation](#documentation)
- [Installation](#installation)
- [MacOS using Homebrew](#macos-using-homebrew)
- [Linux (or WSL on Windows) using apt-get](#linux-or-wsl-on-windows-using-apt-get)
- [Download the Archive](#download-the-archive)
- [Verify Installation](#verify-installation)
- [Command Structure](#command-structure)
- [Command Parameters](#command-parameters)
- [Command Examples](#command-examples)
- [Command Persistence](#command-persistence)
- [Setup `stm` configuration](#setup-stm-configuration)
- [Use with a Software Broker](#use-with-a-software-broker)
- [Use with a Cloud Broker](#use-with-a-cloud-broker)
- [Run `stm` tool](#run-stm-tool)
- [Working with Software Broker](#working-with-software-broker)
- [Receive Messages](#receive-messages)
- [Working with Cloud Broker](#working-with-cloud-broker)
- [Using `stm` to create and modify Broker resources](#using-stm-to-create-and-modify-broker-resources)
- [Create a Queue](#create-a-queue)
- [Using `stm feed` tool for event feed generation](#using-stm-feed-tool-for-event-feed-generation)
- [Contributing](#contributing)
- [Develop](#develop)
- [Run from build](#run-from-build)
- [Technology Stack](#technology-stack)
- [Resources](#resources)
- [Authors](#authors)
- [License](#license)

## Documentation

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solace-community/stm",
"version": "0.0.54",
"version": "0.0.55",
"description": "Solace Try-Me Command Line Tool",
"repository": {
"type": "git",
Expand Down Expand Up @@ -43,6 +43,8 @@
"enquirer": "^2.4.1",
"express": "^4.18.2",
"form-data": "^4.0.0",
"hexdump-nodejs": "^0.1.0",
"istextorbinary": "^9.5.0",
"http": "^0.0.1-security",
"json-schema-library": "^10.0.0-rc1",
"node-localstorage": "^3.0.5",
Expand Down
7 changes: 1 addition & 6 deletions public/apibroker.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,9 @@

<!-- Right navbar links -->
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" data-widget="fullscreen" href="#" role="button">
<i class="fas fa-expand-arrows-alt"></i>
</a>
</li>
<li class="nav-item">
<a class="nav-link" data-widget="sign-out" href="#" role="button" onclick="exitTool()">
<i class="fas fa-sign-out-alt" aria-hidden="true"></i>
<i class="fas fa-sign-out-alt fa-2x" aria-hidden="true"></i>
</a>
</li>
</ul>
Expand Down
7 changes: 1 addition & 6 deletions public/apifeed.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,9 @@

<!-- Right navbar links -->
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" data-widget="fullscreen" href="#" role="button">
<i class="fas fa-expand-arrows-alt"></i>
</a>
</li>
<li class="nav-item">
<a class="nav-link" data-widget="sign-out" href="#" role="button" onclick="exitTool()">
<i class="fas fa-sign-out-alt" aria-hidden="true"></i>
<i class="fas fa-sign-out-alt fa-2x" aria-hidden="true"></i>
</a>
</li>
</ul>
Expand Down
7 changes: 1 addition & 6 deletions public/broker.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,9 @@

<!-- Right navbar links -->
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" data-widget="fullscreen" href="#" role="button">
<i class="fas fa-expand-arrows-alt"></i>
</a>
</li>
<li class="nav-item">
<a class="nav-link" data-widget="sign-out" href="#" role="button" onclick="exitTool()">
<i class="fas fa-sign-out-alt" aria-hidden="true"></i>
<i class="fas fa-sign-out-alt fa-2x" aria-hidden="true"></i>
</a>
</li>
</ul>
Expand Down
Binary file modified public/favicon.ico
Binary file not shown.
7 changes: 1 addition & 6 deletions public/feed.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,9 @@

<!-- Right navbar links -->
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" data-widget="fullscreen" href="#" role="button">
<i class="fas fa-expand-arrows-alt"></i>
</a>
</li>
<li class="nav-item">
<a class="nav-link" data-widget="sign-out" href="#" role="button" onclick="exitTool()">
<i class="fas fa-sign-out-alt" aria-hidden="true"></i>
<i class="fas fa-sign-out-alt fa-2x" aria-hidden="true"></i>
</a>
</li>
</ul>
Expand Down
76 changes: 76 additions & 0 deletions public/feed/countform.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
function validateInstanceCountRule() {
let valid = true;

let topic = $("#arr_parameterTopicName").text();
let message = $("#arr_parameterMessageName").text();
let fieldParam = $("#arr_parameterPayloadFieldName").text();

var feed = JSON.parse(localStorage.getItem('currentFeed'));
var feedRule = feed.rules.find(r => r.topic === topic && r.messageName === message);

var field = feedRule.payload[fieldParam];
if (fieldParam.indexOf('.') > 0)
field = getFieldRule(feedRule.payload, fieldParam)

field.rule = {
...field.rule,
count: parseInt($('#arr_dataFieldCount').val())
}

console.log(field.rule);
localStorage.setItem('changed', true);
localStorage.setItem('currentFeed', JSON.stringify(feed));

var parent = document.getElementById('payload-variable-pane');
parent.innerHTML = '';
parent.style.width = 'auto';

var node = $('#payload-tree-pane').treeview('getSelected')
if (!node || !node.length) return;

var el = document.createElement('div');
var field = feedRule.payload[node[0].path];
if (node[0].path.indexOf('.') > 0)
field = getFieldRule(feedRule.payload, node[0].path)

el.innerHTML = buildParamRuleUI('send', field.rule, feedRule.topic, 'payload', node[0]);
parent.appendChild(el);

return valid;
}

function arrayInstanceCountAssignSubmit() {
'use strict';

// Fetch all the forms we want to apply custom Bootstrap validation styles to
// const forms = document.querySelectorAll('#parameterRulesForm');
const forms = document.querySelectorAll('.needs-validation#arrayParameterCountForm');


// Loop over them and prevent submission
Array.prototype.slice.call(forms).forEach((form) => {
form.addEventListener('submit', async (event) => {
console.log('In submit', form.id, form.classList);
event.preventDefault();
if (!form.checkValidity()) {
event.stopPropagation();
}

$('#field_instance_count_form').modal('toggle');
validateInstanceCountRule();

const path = window.location.href.substring(0, window.location.href.lastIndexOf('/'));
await fetch(path + `/feedrules`, {
method: "POST",
headers: {
'Content-Type': 'application/json;charset=UTF-8'
},
body: localStorage.getItem('currentFeed')
});

toastr.success('Instance count rule updated successfully.')
form.classList.toggle('was-validated');
return false;
});
});
}
Loading

0 comments on commit 297caeb

Please sign in to comment.