Compare commits

...

3 Commits

Author SHA1 Message Date
Henry Hsu
975059eff1 log clock offsets 2021-07-01 13:36:19 -07:00
Henry Hsu
0158bab5de log time from tick 2021-07-01 13:21:09 -07:00
Henry Hsu
2f59df534e add imagery config provider and view 2021-06-21 12:48:51 -07:00
4 changed files with 102 additions and 0 deletions

View File

@@ -328,6 +328,8 @@ define(['EventEmitter'], function (EventEmitter) {
* using current offsets.
*/
TimeAPI.prototype.tick = function (timestamp) {
// this updates bounds at real time - henry
console.log('timestamp', timestamp);
const newBounds = {
start: timestamp + this.offsets.start,
end: timestamp + this.offsets.end
@@ -420,6 +422,7 @@ define(['EventEmitter'], function (EventEmitter) {
* @returns {ClockOffsets}
*/
TimeAPI.prototype.clockOffsets = function (offsets) {
console.log('clock offset', offsets);
if (arguments.length > 0) {
const validationResult = this.validateOffsets(offsets);
@@ -430,6 +433,8 @@ define(['EventEmitter'], function (EventEmitter) {
this.offsets = offsets;
const currentValue = this.activeClock.currentValue();
// maybe current value is missing for lmst - henry
console.log('curr value', currentValue);
const newBounds = {
start: currentValue + offsets.start,
end: currentValue + offsets.end

View File

@@ -0,0 +1,80 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
import Vue from 'vue';
import ImageryOptions from './components/ImageryOptions.vue';
export default function ImageryConfigurationViewProvider(openmct) {
return {
key: 'imagery-inspector',
name: 'Imagery Inspector View',
canView: function (selection) {
console.log('here');
// if (selection.length === 0 || selection[0].length === 0) {
// return false;
// }
// let object = selection[0][0].context.item;
return true;
// return object
// && object.type === 'telemetry.plot.overlay';
},
view: function (selection) {
let component;
let objectPath;
console.log('selec', selection);
if (selection.length) {
objectPath = selection[0].map((selectionItem) => {
return selectionItem.context.item;
});
}
return {
show: function (element) {
component = new Vue({
el: element,
components: {
ImageryOptions: ImageryOptions
},
provide: {
openmct,
domainObject: selection[0][0].context.item,
path: objectPath
},
template: '<imagery-options></imagery-options>'
});
},
destroy: function () {
if (component) {
component.$destroy();
component = undefined;
}
}
};
},
priority: function () {
return 1;
}
};
}

View File

@@ -0,0 +1,14 @@
<template>
<div>new Imagery config options</div>
</template>
<script>
export default {
data() {
},
mounted() {
console.log('imagery config');
}
};
</script>

View File

@@ -21,10 +21,13 @@
*****************************************************************************/
import ImageryViewProvider from './ImageryViewProvider';
import ImageryConfigurationViewProvider from './ImageryConfigurationViewProvider';
export default function () {
return function install(openmct) {
openmct.objectViews.addProvider(new ImageryViewProvider(openmct));
// for inspector view config
openmct.objectViews.addProvider(new ImageryConfigurationViewProvider(openmct));
};
}