mirror of
https://github.com/nasa/openmct.git
synced 2025-06-06 01:11:41 +00:00
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:
parent
cf5edf2db0
commit
824a597825
@ -157,5 +157,9 @@ test.describe('Sine Wave Generator', () => {
|
|||||||
y: 28
|
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');
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -35,8 +35,8 @@ define([
|
|||||||
phase: 0
|
phase: 0
|
||||||
};
|
};
|
||||||
|
|
||||||
function GeneratorProvider() {
|
function GeneratorProvider(openmct) {
|
||||||
this.workerInterface = new WorkerInterface();
|
this.workerInterface = new WorkerInterface(openmct);
|
||||||
}
|
}
|
||||||
|
|
||||||
GeneratorProvider.prototype.canProvideTelemetry = function (domainObject) {
|
GeneratorProvider.prototype.canProvideTelemetry = function (domainObject) {
|
||||||
|
@ -21,20 +21,13 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
'raw-loader!./generatorWorker.js',
|
|
||||||
'uuid'
|
'uuid'
|
||||||
], function (
|
], function (
|
||||||
workerText,
|
|
||||||
uuid
|
uuid
|
||||||
) {
|
) {
|
||||||
|
function WorkerInterface(openmct) {
|
||||||
var workerBlob = new Blob(
|
// eslint-disable-next-line no-undef
|
||||||
[workerText],
|
const workerUrl = `${openmct.getAssetPath()}${__OPENMCT_ROOT_RELATIVE__}generatorWorker.js`;
|
||||||
{type: 'application/javascript'}
|
|
||||||
);
|
|
||||||
var workerUrl = URL.createObjectURL(workerBlob);
|
|
||||||
|
|
||||||
function WorkerInterface() {
|
|
||||||
this.worker = new Worker(workerUrl);
|
this.worker = new Worker(workerUrl);
|
||||||
this.worker.onmessage = this.onMessage.bind(this);
|
this.worker.onmessage = this.onMessage.bind(this);
|
||||||
this.callbacks = {};
|
this.callbacks = {};
|
||||||
|
@ -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 GeneratorMetadataProvider());
|
||||||
openmct.telemetry.addProvider(new SinewaveLimitProvider());
|
openmct.telemetry.addProvider(new SinewaveLimitProvider());
|
||||||
};
|
};
|
||||||
|
@ -38,6 +38,10 @@ module.exports = (config) => {
|
|||||||
{
|
{
|
||||||
pattern: 'dist/inMemorySearchWorker.js*',
|
pattern: 'dist/inMemorySearchWorker.js*',
|
||||||
included: false
|
included: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
pattern: 'dist/generatorWorker.js*',
|
||||||
|
included: false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
port: 9876,
|
port: 9876,
|
||||||
|
@ -57,7 +57,6 @@
|
|||||||
"plotly.js-basic-dist": "2.5.0",
|
"plotly.js-basic-dist": "2.5.0",
|
||||||
"plotly.js-gl2d-dist": "2.5.0",
|
"plotly.js-gl2d-dist": "2.5.0",
|
||||||
"printj": "1.3.1",
|
"printj": "1.3.1",
|
||||||
"raw-loader": "4.0.2",
|
|
||||||
"request": "2.88.2",
|
"request": "2.88.2",
|
||||||
"resolve-url-loader": "4.0.0",
|
"resolve-url-loader": "4.0.0",
|
||||||
"sass": "1.49.0",
|
"sass": "1.49.0",
|
||||||
|
@ -18,6 +18,7 @@ const gitBranch = require('child_process')
|
|||||||
const config = {
|
const config = {
|
||||||
entry: {
|
entry: {
|
||||||
openmct: './openmct.js',
|
openmct: './openmct.js',
|
||||||
|
generatorWorker: './example/generator/generatorWorker.js',
|
||||||
couchDBChangesFeed: './src/plugins/persistence/couch/CouchChangesFeed.js',
|
couchDBChangesFeed: './src/plugins/persistence/couch/CouchChangesFeed.js',
|
||||||
inMemorySearchWorker: './src/api/objects/InMemorySearchWorker.js',
|
inMemorySearchWorker: './src/api/objects/InMemorySearchWorker.js',
|
||||||
espressoTheme: './src/plugins/themes/espresso-theme.scss',
|
espressoTheme: './src/plugins/themes/espresso-theme.scss',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user