-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
155 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/* | ||
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). | ||
* This devtool is neither made for production nor for readable output files. | ||
* It uses "eval()" calls to create a separate source file in the browser devtools. | ||
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) | ||
* or disable the default devtool with "devtool: false". | ||
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). | ||
*/ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
if(typeof exports === 'object' && typeof module === 'object') | ||
module.exports = factory(); | ||
else if(typeof define === 'function' && define.amd) | ||
define([], factory); | ||
else if(typeof exports === 'object') | ||
exports["DynamicPlansPlugin"] = factory(); | ||
else | ||
root["DynamicPlansPlugin"] = factory(); | ||
})(self, () => { | ||
return /******/ (() => { // webpackBootstrap | ||
/******/ "use strict"; | ||
/******/ var __webpack_modules__ = ({ | ||
|
||
/***/ "./src/plugin.js": | ||
/*!***********************!*\ | ||
!*** ./src/plugin.js ***! | ||
\***********************/ | ||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | ||
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ DynamicPlansPlugin)\n/* harmony export */ });\nfunction DynamicPlansPlugin (options) {\n return function install(openmct) {\n console.log('plugin installed');\n }\n}\n\n\n//# sourceURL=webpack://DynamicPlansPlugin/./src/plugin.js?"); | ||
|
||
/***/ }) | ||
|
||
/******/ }); | ||
/************************************************************************/ | ||
/******/ // The require scope | ||
/******/ var __webpack_require__ = {}; | ||
/******/ | ||
/************************************************************************/ | ||
/******/ /* webpack/runtime/define property getters */ | ||
/******/ (() => { | ||
/******/ // define getter functions for harmony exports | ||
/******/ __webpack_require__.d = (exports, definition) => { | ||
/******/ for(var key in definition) { | ||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | ||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | ||
/******/ } | ||
/******/ } | ||
/******/ }; | ||
/******/ })(); | ||
/******/ | ||
/******/ /* webpack/runtime/hasOwnProperty shorthand */ | ||
/******/ (() => { | ||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) | ||
/******/ })(); | ||
/******/ | ||
/******/ /* webpack/runtime/make namespace object */ | ||
/******/ (() => { | ||
/******/ // define __esModule on exports | ||
/******/ __webpack_require__.r = (exports) => { | ||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | ||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
/******/ } | ||
/******/ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/******/ }; | ||
/******/ })(); | ||
/******/ | ||
/************************************************************************/ | ||
/******/ | ||
/******/ // startup | ||
/******/ // Load entry module and return exports | ||
/******/ // This entry module can't be inlined because the eval devtool is used. | ||
/******/ var __webpack_exports__ = {}; | ||
/******/ __webpack_modules__["./src/plugin.js"](0, __webpack_exports__, __webpack_require__); | ||
/******/ | ||
/******/ return __webpack_exports__; | ||
/******/ })() | ||
; | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script type="text/javascript" src="node_modules/openmct/dist/openmct.js"></script> | ||
<script type="text/javascript" src="dist/openmct-dynamic-plans.js"></script> | ||
<script> | ||
const ONE_SECOND = 1000; | ||
const THIRTY_SECONDS = 30 * ONE_SECOND; | ||
const ONE_MINUTE = 60 * ONE_SECOND; | ||
const THIRTY_MINUTES = 30 * ONE_MINUTE; | ||
|
||
openmct.setAssetPath("node_modules/openmct/dist"); | ||
|
||
openmct.install(new DynamicPlansPlugin.default()); | ||
openmct.install(openmct.plugins.DisplayLayout({ | ||
showAsView: ['summary-widget', 'example.imagery'] | ||
})); | ||
openmct.install(new openmct.plugins.LocalStorage()); | ||
openmct.install(new openmct.plugins.Espresso()); | ||
openmct.install(new openmct.plugins.MyItems()); | ||
openmct.install(openmct.plugins.UTCTimeSystem()); | ||
openmct.install(openmct.plugins.Conductor({ | ||
menuOptions: [ | ||
{ | ||
name: "Fixed", | ||
timeSystem: 'utc', | ||
bounds: { | ||
start: Date.now() - THIRTY_MINUTES, | ||
end: Date.now() | ||
} | ||
}, | ||
{ | ||
name: "Realtime", | ||
timeSystem: 'utc', | ||
clock: 'local', | ||
clockOffsets: { | ||
start: - THIRTY_MINUTES, | ||
end: THIRTY_SECONDS | ||
} | ||
} | ||
] | ||
})); | ||
|
||
document.addEventListener('DOMContentLoaded', () => openmct.start(document.body)); | ||
</script> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export default function DynamicPlansPlugin (options) { | ||
return function install(openmct) { | ||
console.log('plugin installed'); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
var path = require('path'); | ||
|
||
module.exports = { | ||
entry: { | ||
main: './src/plugin' | ||
}, | ||
mode: 'development', | ||
output: { | ||
path: path.resolve(__dirname, "dist"), | ||
filename: "openmct-dynamic-plans.js", | ||
library: "DynamicPlansPlugin", | ||
libraryTarget: "umd" | ||
} | ||
}; |