-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: full amd -> es6 conversion * fix: move MCT to ES6 class * fix: default drop, correct imports * fix: correct all imports * fix: property typo * fix: avoid anonymous functions * fix: correct typo scarily small - can see why this e2e coverage issue is high priority * fix: use proper uuid format * style: fmt * fix: import vue correctly, get correct layout * fix: createApp without JSON fixes template issues * fix: don't use default on InspectorDataVisualization * fix: remove more .default calls * Update src/api/api.js Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com> * Update src/plugins/plugins.js Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com> * Update src/plugins/plugins.js Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com> * fix: suggestions * fix: drop unnecessary this.annotation initialization * fix: move all initialization calls to constructor * refactor: move vue dist import to webpack alias --------- Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
- Loading branch information
Showing
102 changed files
with
11,320 additions
and
11,606 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,138 +1,134 @@ | ||
define(['lodash'], function (_) { | ||
var METADATA_BY_TYPE = { | ||
generator: { | ||
values: [ | ||
{ | ||
key: 'name', | ||
name: 'Name', | ||
format: 'string' | ||
}, | ||
{ | ||
key: 'utc', | ||
name: 'Time', | ||
format: 'utc', | ||
hints: { | ||
domain: 1 | ||
} | ||
}, | ||
{ | ||
key: 'yesterday', | ||
name: 'Yesterday', | ||
format: 'utc', | ||
hints: { | ||
domain: 2 | ||
} | ||
}, | ||
{ | ||
key: 'wavelengths', | ||
name: 'Wavelength', | ||
unit: 'nm', | ||
format: 'string[]', | ||
hints: { | ||
range: 4 | ||
} | ||
}, | ||
// Need to enable "LocalTimeSystem" plugin to make use of this | ||
// { | ||
// key: "local", | ||
// name: "Time", | ||
// format: "local-format", | ||
// source: "utc", | ||
// hints: { | ||
// domain: 3 | ||
// } | ||
// }, | ||
{ | ||
key: 'sin', | ||
name: 'Sine', | ||
unit: 'Hz', | ||
formatString: '%0.2f', | ||
hints: { | ||
range: 1 | ||
} | ||
}, | ||
{ | ||
key: 'cos', | ||
name: 'Cosine', | ||
unit: 'deg', | ||
formatString: '%0.2f', | ||
hints: { | ||
range: 2 | ||
} | ||
}, | ||
{ | ||
key: 'intensities', | ||
name: 'Intensities', | ||
format: 'number[]', | ||
hints: { | ||
range: 3 | ||
} | ||
const METADATA_BY_TYPE = { | ||
generator: { | ||
values: [ | ||
{ | ||
key: 'name', | ||
name: 'Name', | ||
format: 'string' | ||
}, | ||
{ | ||
key: 'utc', | ||
name: 'Time', | ||
format: 'utc', | ||
hints: { | ||
domain: 1 | ||
} | ||
] | ||
}, | ||
'example.state-generator': { | ||
values: [ | ||
{ | ||
key: 'name', | ||
name: 'Name', | ||
format: 'string' | ||
}, | ||
{ | ||
key: 'utc', | ||
name: 'Time', | ||
format: 'utc', | ||
hints: { | ||
domain: 1 | ||
} | ||
}, | ||
{ | ||
key: 'local', | ||
name: 'Time', | ||
format: 'utc', | ||
source: 'utc', | ||
hints: { | ||
domain: 2 | ||
} | ||
}, | ||
{ | ||
key: 'state', | ||
source: 'value', | ||
name: 'State', | ||
format: 'enum', | ||
enumerations: [ | ||
{ | ||
value: 0, | ||
string: 'OFF' | ||
}, | ||
{ | ||
value: 1, | ||
string: 'ON' | ||
} | ||
], | ||
hints: { | ||
range: 1 | ||
} | ||
}, | ||
{ | ||
key: 'value', | ||
name: 'Value', | ||
hints: { | ||
range: 2 | ||
}, | ||
{ | ||
key: 'yesterday', | ||
name: 'Yesterday', | ||
format: 'utc', | ||
hints: { | ||
domain: 2 | ||
} | ||
}, | ||
{ | ||
key: 'wavelengths', | ||
name: 'Wavelength', | ||
unit: 'nm', | ||
format: 'string[]', | ||
hints: { | ||
range: 4 | ||
} | ||
}, | ||
// Need to enable "LocalTimeSystem" plugin to make use of this | ||
// { | ||
// key: "local", | ||
// name: "Time", | ||
// format: "local-format", | ||
// source: "utc", | ||
// hints: { | ||
// domain: 3 | ||
// } | ||
// }, | ||
{ | ||
key: 'sin', | ||
name: 'Sine', | ||
unit: 'Hz', | ||
formatString: '%0.2f', | ||
hints: { | ||
range: 1 | ||
} | ||
}, | ||
{ | ||
key: 'cos', | ||
name: 'Cosine', | ||
unit: 'deg', | ||
formatString: '%0.2f', | ||
hints: { | ||
range: 2 | ||
} | ||
}, | ||
{ | ||
key: 'intensities', | ||
name: 'Intensities', | ||
format: 'number[]', | ||
hints: { | ||
range: 3 | ||
} | ||
} | ||
] | ||
}, | ||
'example.state-generator': { | ||
values: [ | ||
{ | ||
key: 'name', | ||
name: 'Name', | ||
format: 'string' | ||
}, | ||
{ | ||
key: 'utc', | ||
name: 'Time', | ||
format: 'utc', | ||
hints: { | ||
domain: 1 | ||
} | ||
}, | ||
{ | ||
key: 'local', | ||
name: 'Time', | ||
format: 'utc', | ||
source: 'utc', | ||
hints: { | ||
domain: 2 | ||
} | ||
}, | ||
{ | ||
key: 'state', | ||
source: 'value', | ||
name: 'State', | ||
format: 'enum', | ||
enumerations: [ | ||
{ | ||
value: 0, | ||
string: 'OFF' | ||
}, | ||
{ | ||
value: 1, | ||
string: 'ON' | ||
} | ||
], | ||
hints: { | ||
range: 1 | ||
} | ||
] | ||
} | ||
}; | ||
|
||
function GeneratorMetadataProvider() {} | ||
}, | ||
{ | ||
key: 'value', | ||
name: 'Value', | ||
hints: { | ||
range: 2 | ||
} | ||
} | ||
] | ||
} | ||
}; | ||
|
||
GeneratorMetadataProvider.prototype.supportsMetadata = function (domainObject) { | ||
return Object.prototype.hasOwnProperty.call(METADATA_BY_TYPE, domainObject.type); | ||
}; | ||
export default function GeneratorMetadataProvider() {} | ||
|
||
GeneratorMetadataProvider.prototype.getMetadata = function (domainObject) { | ||
return Object.assign({}, domainObject.telemetry, METADATA_BY_TYPE[domainObject.type]); | ||
}; | ||
GeneratorMetadataProvider.prototype.supportsMetadata = function (domainObject) { | ||
return Object.prototype.hasOwnProperty.call(METADATA_BY_TYPE, domainObject.type); | ||
}; | ||
|
||
return GeneratorMetadataProvider; | ||
}); | ||
GeneratorMetadataProvider.prototype.getMetadata = function (domainObject) { | ||
return Object.assign({}, domainObject.telemetry, METADATA_BY_TYPE[domainObject.type]); | ||
}; |
Oops, something went wrong.