remove raw-loader as a dependency (#4998)

* remove raw-loader as a dependency

* move clock to correct dir and response to canvas clicking
This commit is contained in:
Scott Bell 2022-03-25 17:13:10 +01:00 committed by GitHub
parent cf5edf2db0
commit 824a597825
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 15 additions and 14 deletions

View File

@ -157,5 +157,9 @@ test.describe('Sine Wave Generator', () => {
y: 28
}
});
// Verify that where we click on canvas shows the number we clicked on
await expect(page.locator('.value-to-display-nearestValue')).toContainText('0.00');
});
});

View File

@ -35,8 +35,8 @@ define([
phase: 0
};
function GeneratorProvider() {
this.workerInterface = new WorkerInterface();
function GeneratorProvider(openmct) {
this.workerInterface = new WorkerInterface(openmct);
}
GeneratorProvider.prototype.canProvideTelemetry = function (domainObject) {

View File

@ -21,20 +21,13 @@
*****************************************************************************/
define([
'raw-loader!./generatorWorker.js',
'uuid'
], function (
workerText,
uuid
) {
var workerBlob = new Blob(
[workerText],
{type: 'application/javascript'}
);
var workerUrl = URL.createObjectURL(workerBlob);
function WorkerInterface() {
function WorkerInterface(openmct) {
// eslint-disable-next-line no-undef
const workerUrl = `${openmct.getAssetPath()}${__OPENMCT_ROOT_RELATIVE__}generatorWorker.js`;
this.worker = new Worker(workerUrl);
this.worker.onmessage = this.onMessage.bind(this);
this.callbacks = {};

View File

@ -146,7 +146,7 @@ define([
}
});
openmct.telemetry.addProvider(new GeneratorProvider());
openmct.telemetry.addProvider(new GeneratorProvider(openmct));
openmct.telemetry.addProvider(new GeneratorMetadataProvider());
openmct.telemetry.addProvider(new SinewaveLimitProvider());
};

View File

@ -38,6 +38,10 @@ module.exports = (config) => {
{
pattern: 'dist/inMemorySearchWorker.js*',
included: false
},
{
pattern: 'dist/generatorWorker.js*',
included: false
}
],
port: 9876,

View File

@ -57,7 +57,6 @@
"plotly.js-basic-dist": "2.5.0",
"plotly.js-gl2d-dist": "2.5.0",
"printj": "1.3.1",
"raw-loader": "4.0.2",
"request": "2.88.2",
"resolve-url-loader": "4.0.0",
"sass": "1.49.0",

View File

@ -18,6 +18,7 @@ const gitBranch = require('child_process')
const config = {
entry: {
openmct: './openmct.js',
generatorWorker: './example/generator/generatorWorker.js',
couchDBChangesFeed: './src/plugins/persistence/couch/CouchChangesFeed.js',
inMemorySearchWorker: './src/api/objects/InMemorySearchWorker.js',
espressoTheme: './src/plugins/themes/espresso-theme.scss',