mirror of
https://github.com/nasa/openmct.git
synced 2024-12-19 21:27:52 +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
|
||||
}
|
||||
});
|
||||
|
||||
// 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
|
||||
};
|
||||
|
||||
function GeneratorProvider() {
|
||||
this.workerInterface = new WorkerInterface();
|
||||
function GeneratorProvider(openmct) {
|
||||
this.workerInterface = new WorkerInterface(openmct);
|
||||
}
|
||||
|
||||
GeneratorProvider.prototype.canProvideTelemetry = function (domainObject) {
|
||||
|
@ -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 = {};
|
||||
|
@ -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());
|
||||
};
|
||||
|
@ -38,6 +38,10 @@ module.exports = (config) => {
|
||||
{
|
||||
pattern: 'dist/inMemorySearchWorker.js*',
|
||||
included: false
|
||||
},
|
||||
{
|
||||
pattern: 'dist/generatorWorker.js*',
|
||||
included: false
|
||||
}
|
||||
],
|
||||
port: 9876,
|
||||
|
@ -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",
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user