Revert "Historical imagery "
This commit is contained in:
@@ -30,14 +30,10 @@
|
|||||||
<script>
|
<script>
|
||||||
var THIRTY_MINUTES = 30 * 60 * 1000;
|
var THIRTY_MINUTES = 30 * 60 * 1000;
|
||||||
|
|
||||||
require([
|
require(['openmct'], function (openmct) {
|
||||||
'openmct',
|
|
||||||
'platform/features/imagery-timeline/bundle'
|
|
||||||
], function (openmct) {
|
|
||||||
[
|
[
|
||||||
'example/eventGenerator',
|
'example/eventGenerator',
|
||||||
'example/styleguide',
|
'example/styleguide'
|
||||||
'platform/features/imagery-timeline'
|
|
||||||
].forEach(
|
].forEach(
|
||||||
openmct.legacyRegistry.enable.bind(openmct.legacyRegistry)
|
openmct.legacyRegistry.enable.bind(openmct.legacyRegistry)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
|
|
||||||
.l-image-thumbs-wrapper {
|
.l-image-thumbs-wrapper {
|
||||||
//@include test(green);
|
//@include test(green);
|
||||||
//direction: rtl;
|
direction: rtl;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
padding-bottom: $interiorMargin;
|
padding-bottom: $interiorMargin;
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
width: $imageThumbsD + $imageThumbPad*2;
|
width: $imageThumbsD + $imageThumbPad*2;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
&:hover {
|
&:hover {
|
||||||
background: $colorThumbHoverBg;
|
background: rgba(#fff, 0.2);
|
||||||
.l-date,
|
.l-date,
|
||||||
.l-time {
|
.l-time {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|||||||
@@ -191,9 +191,6 @@ $colorItemTreeVCHover: pullForward($colorItemTreeVC, 20%);
|
|||||||
$colorItemTreeSelectedVC: $colorItemTreeVC;
|
$colorItemTreeSelectedVC: $colorItemTreeVC;
|
||||||
$shdwItemTreeIcon: 0.6;
|
$shdwItemTreeIcon: 0.6;
|
||||||
|
|
||||||
// Images
|
|
||||||
$colorThumbHoverBg: $colorItemTreeHoverBg;
|
|
||||||
|
|
||||||
// Scrollbar
|
// Scrollbar
|
||||||
$scrollbarTrackSize: 10px;
|
$scrollbarTrackSize: 10px;
|
||||||
$scrollbarTrackShdw: rgba(#000, 0.7) 0 1px 5px;
|
$scrollbarTrackShdw: rgba(#000, 0.7) 0 1px 5px;
|
||||||
|
|||||||
@@ -191,9 +191,6 @@ $colorItemTreeVCHover: $colorKey;
|
|||||||
$colorItemTreeSelectedVC: $colorBodyBg;
|
$colorItemTreeSelectedVC: $colorBodyBg;
|
||||||
$shdwItemTreeIcon: none;
|
$shdwItemTreeIcon: none;
|
||||||
|
|
||||||
// Images
|
|
||||||
$colorThumbHoverBg: $colorItemTreeHoverBg;
|
|
||||||
|
|
||||||
// Scrollbar
|
// Scrollbar
|
||||||
$scrollbarTrackSize: 10px;
|
$scrollbarTrackSize: 10px;
|
||||||
$scrollbarTrackShdw: rgba(#000, 0.2) 0 1px 2px;
|
$scrollbarTrackShdw: rgba(#000, 0.2) 0 1px 2px;
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
define([
|
|
||||||
'openmct',
|
|
||||||
'./src/controllers/ImageryTimelineController',
|
|
||||||
|
|
||||||
], function (
|
|
||||||
openmct,
|
|
||||||
ImageryTimelineController
|
|
||||||
) {
|
|
||||||
openmct.legacyRegistry.register("platform/features/imagery-timeline", {
|
|
||||||
"name" : "Imagery Timeline",
|
|
||||||
"description": "Provides a timeline view of imagery telemetry.",
|
|
||||||
"extensions": {
|
|
||||||
"views": [
|
|
||||||
{
|
|
||||||
"name": "Imagery Timeline",
|
|
||||||
"key": "imagery.timeline",
|
|
||||||
"cssClass": "icon-image",
|
|
||||||
"templateUrl": "templates/timeline.html",
|
|
||||||
"needs": [ "telemetry" ],
|
|
||||||
"delegation": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"stylesheets": [
|
|
||||||
{
|
|
||||||
"stylesheetUrl": "css/timeline.css"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"controllers": [
|
|
||||||
{
|
|
||||||
"key": "ImageryTimelineController",
|
|
||||||
"implementation": ImageryTimelineController,
|
|
||||||
"depends": ["$scope", "openmct"]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
});
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
.timeline-container {
|
|
||||||
}
|
|
||||||
|
|
||||||
.imagery-timeline {
|
|
||||||
height: auto;
|
|
||||||
background-color: #333;
|
|
||||||
overflow-x: scroll;
|
|
||||||
white-space: nowrap;
|
|
||||||
padding-bottom:10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.timeline-img {
|
|
||||||
height: 125px;
|
|
||||||
/* display: inline;*/
|
|
||||||
}
|
|
||||||
|
|
||||||
.timeline-entry {
|
|
||||||
display: inline-block;
|
|
||||||
background-color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.timeline-entry:hover {
|
|
||||||
background-color:#0099cc;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.timeline-entry p {
|
|
||||||
font-size: 12px;
|
|
||||||
padding: 0px;
|
|
||||||
padding-left: 5px;
|
|
||||||
margin: 0px;
|
|
||||||
color: #fff;
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
|
|
||||||
.timstamp {
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
|
|
||||||
<div class="l-image-thumbs-wrapper"ng-controller="ImageryTimelineController">
|
|
||||||
<div class="l-image-thumb-item" ng-repeat="image in images">
|
|
||||||
<img class="l-thumb"
|
|
||||||
src={{image['url']}}>
|
|
||||||
<div class="l-date">{{image['utc']}}</div>
|
|
||||||
<!-- <div class="l-time">16:03:0{{$index}}</div> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
// To do:
|
|
||||||
// use moment to format timestamp
|
|
||||||
// seperate functions for loading history and realtime imagery
|
|
||||||
// wait to display images until after load
|
|
||||||
|
|
||||||
define(
|
|
||||||
['moment'],
|
|
||||||
function (moment) {
|
|
||||||
|
|
||||||
function ImageryTimelineController($scope, openmct) {
|
|
||||||
$scope.images = [];
|
|
||||||
this.$scope = $scope;
|
|
||||||
this.openmct = openmct;
|
|
||||||
this.date = "";
|
|
||||||
this.time = "";
|
|
||||||
this.zone = "";
|
|
||||||
this.imageUrl = "";
|
|
||||||
this.history = {};
|
|
||||||
|
|
||||||
this.subscribe = this.subscribe.bind(this);
|
|
||||||
this.updateValues = this.updateValues.bind(this);
|
|
||||||
|
|
||||||
// Subscribes to telemetry when domain objec is available
|
|
||||||
this.subscribe(this.$scope.domainObject);
|
|
||||||
this.$scope.$on("$destroy", this.stopListening);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
ImageryTimelineController.prototype.subscribe = function (domainObject) {
|
|
||||||
this.date = "";
|
|
||||||
this.imageUrl = "";
|
|
||||||
this.openmct.objects.get(domainObject.getId())
|
|
||||||
.then(function (object) {
|
|
||||||
this.domainObject = object;
|
|
||||||
var metadata = this.openmct
|
|
||||||
.telemetry
|
|
||||||
.getMetadata(this.domainObject);
|
|
||||||
var timeKey = this.openmct.time.timeSystem().key;
|
|
||||||
this.timeFormat = this.openmct
|
|
||||||
.telemetry
|
|
||||||
.getValueFormatter(metadata.value(timeKey));
|
|
||||||
this.imageFormat = this.openmct
|
|
||||||
.telemetry
|
|
||||||
.getValueFormatter(metadata.valuesForHints(['image'])[0]);
|
|
||||||
this.unsubscribe = this.openmct.telemetry
|
|
||||||
.subscribe(this.domainObject, this.updateValues);
|
|
||||||
this.openmct.telemetry
|
|
||||||
.request(this.domainObject, {
|
|
||||||
strategy: 'all',
|
|
||||||
start: Date.now(),
|
|
||||||
end: Date.now() + 90000 // for testing purposes, gets full image
|
|
||||||
// set (17 images, 5000ms between each)
|
|
||||||
})
|
|
||||||
.then(function (values) {
|
|
||||||
values.forEach(function(datum) {
|
|
||||||
this.updateValues(datum);
|
|
||||||
}.bind(this));
|
|
||||||
}.bind(this));
|
|
||||||
}.bind(this));
|
|
||||||
};
|
|
||||||
|
|
||||||
ImageryTimelineController.prototype.updateValues = function (datum) {
|
|
||||||
if (this.isPaused) {
|
|
||||||
this.nextDatum = datum;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.$scope.images.push(datum);
|
|
||||||
this.time = this.timeFormat.format(datum);
|
|
||||||
this.imageUrl = this.imageFormat.format(datum);
|
|
||||||
};
|
|
||||||
|
|
||||||
ImageryTimelineController.prototype.stopListening = function () {
|
|
||||||
if (this.unsubscribe) {
|
|
||||||
this.unsubscribe();
|
|
||||||
delete this.unsubscribe;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
return ImageryTimelineController;
|
|
||||||
});
|
|
||||||
Reference in New Issue
Block a user