Skip to content

Conversation

@deepalisingh-r
Copy link

@deepalisingh-r deepalisingh-r commented Feb 27, 2025

Tenant to Deploy to: eG Innovations Pvt Ltd

Description

Adding a new plugin for squaredup on premises application.

PR Creation Checklist:

  • PR title includes a descriptive title
  • Added a label: breaking or non-breaking
  • Added a label: bug-fix, new-plugin, internal or enhancement
  • PR description written
  • Validate script run

@deepalisingh-r
Copy link
Author

Adding a new plugin in squaredup

@shaswot77 shaswot77 changed the title Initial commit New eG Innovations Plugin Mar 3, 2025
@shaswot77 shaswot77 added new-plugin New DataSource for SquaredUp non-breaking Changes that will not break the existing functionality of a plugin labels Mar 3, 2025
Copy link

@AnEvilPenguin AnEvilPenguin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The requested changes are small ones and mostly around changes to our tooling. Otherwise there's nothing specific that concerns me!

In an advisory category:

You're importing objects but not (that I can see...) actually using them anywhere. You could drop these to simplify things (internally we don't import objects that we don't use without a good reason. If you have a good reason then please feel free to ignore me!).

You've got both axios and node-fetch as dependencies, but I don't think you're using axios at all. I'd suggest dropping that as a dependency, if only to make the bundle smaller and faster.

At the moment you're not using the report object in any capacity that I can see (just the log object). You can use report.error and report.warning to send back messages to the user in much the same way that you can use log.error to send messages to the log file. Something to think about for a future iteration maybe.

There seem to be a lot of label roles in your metadata, including on things like dates. We're normally a bit more targeted in our use of these roles so I'm not sure how this will behave (I think previously this could create excessively long tooltips on line graphs, but it's also been a long time since I last saw that issue so it may no longer be a thing).

provides: {
type: 'string',
enum: ['health', 'templateData']
enum: ['health', 'templateData','componentType']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a valid part of the schema. Can you please remove this?

Comment on lines +41 to +43
for (const app of page) {
addVertexForApp(context, app);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're not awaiting this async function. There's nothing asynchronous in it so probably the easiest option is to just remove the async keyword on the function itself.

Comment on lines +2167 to +2186
// console.log(
// '=========================== Mermaid Source ==================================================================='
// );
// console.log(source);
// console.log(
// '=========================== Copy/Paste the above into https://mermaid.live/edit =============================='
// );
// const mmUrl = `https://mermaid.ink/img/${Buffer.from(source).toString('base64')}`;
// console.log(`...or visit: ${mmUrl}`);

// const mmAnswer = await inquirer.prompt([
// {
// name: 'showMmd',
// type: 'confirm',
// message: 'visit Mermaid URL now (opens in default browser)?'
// }
// ]);
// if (mmAnswer.showMmd) {
// open(mmUrl);
// }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please put this back?

@gdorward
Copy link

gdorward commented Jan 9, 2026

A failing unit test to look into @deepalisingh-r :

`FAIL packages/@squaredup/unit-test/dataStreamDefaults.test.js
● Data Stream dataSourceConfig defaults › eginnovations-v1 configurable data stream "Historical Data" dataSourceConfig default values correct

expect(received).toBeEmpty()

Expected value to be empty received:
  ["Field timeline has default value '\"1 hour\"' but dataSourceConfig has 'undefined'"]

  100 |                     const issues = [];
  101 |                     checkFields(cod.template, issues);
> 102 |                     expect(issues).toBeEmpty();
      |                                    ^
  103 |                 });
  104 |             }
  105 |         }

  at Object.toBeEmpty (packages/@squaredup/unit-test/dataStreamDefaults.test.js:102:36)`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-plugin New DataSource for SquaredUp non-breaking Changes that will not break the existing functionality of a plugin

Development

Successfully merging this pull request may close these issues.

5 participants