From 7d3c2b72431a18aab8af4370d0c2d6531ab0d566 Mon Sep 17 00:00:00 2001 From: Sarah Hale Date: Tue, 23 Jun 2015 14:47:21 -0700 Subject: [PATCH] [Events] Style compliance Made some small changes to keep up with the style standards. #18. --- example/eventGenerator/src/EventTelemetry.js | 11 +-- .../features/events/src/EventMsgColumn.js | 65 ------------------ .../features/events/src/SeverityColumn.js | 67 ------------------- 3 files changed, 7 insertions(+), 136 deletions(-) delete mode 100644 platform/features/events/src/EventMsgColumn.js delete mode 100644 platform/features/events/src/SeverityColumn.js diff --git a/example/eventGenerator/src/EventTelemetry.js b/example/eventGenerator/src/EventTelemetry.js index de8d6c2adb..9e52c62443 100644 --- a/example/eventGenerator/src/EventTelemetry.js +++ b/example/eventGenerator/src/EventTelemetry.js @@ -22,7 +22,9 @@ /*global define,Promise*/ /** - * Module defining EventTelemetry. Created by chacskaylo on 06/18/2015. + * Module defining EventTelemetry. + * Created by chacskaylo on 06/18/2015. + * Modified by slhale on 06/23/2015. */ define( [], @@ -79,11 +81,12 @@ define( return i * interval + (domain !== 'delta' ? firstObservedTime : 0); }; - + generatorData.getRangeValue = function (i, range) { - var domainDelta = this.getDomainValue(i) - firstObservedTime; - var ind = i%messages.length; + var domainDelta = this.getDomainValue(i) - firstObservedTime, + ind = i % messages.length; return "TEMP " + i.toString() + "-" + messages[ind][0] + "[" + domainDelta.toString() + "]"; + // TODO: Unsure why we are prepeding 'TEMP' }; return generatorData; diff --git a/platform/features/events/src/EventMsgColumn.js b/platform/features/events/src/EventMsgColumn.js deleted file mode 100644 index ab24cd9f29..0000000000 --- a/platform/features/events/src/EventMsgColumn.js +++ /dev/null @@ -1,65 +0,0 @@ -/***************************************************************************** - * Open MCT Web, Copyright (c) 2014-2015, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT Web 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 Web 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. - *****************************************************************************/ -/*global define,Promise*/ - -/** - * Module defining EventMsgColumn. Created by chacskaylo on 06/18/2015. - */ -define( - [], - function () { - "use strict"; - - /** - * A column which will report telemetry event messages. - * (typically, measurements.) Used by the EventListController. - * - * @constructor - * @param rangeMetadata an object with the machine- and human- - * readable names for this range (in `key` and `name` - * fields, respectively.) - * @param {TelemetryFormatter} telemetryFormatter the telemetry - * formatting service, for making values human-readable. - */ - function EventMsgColumn(eventMsgMetadata, telemetryFormatter) { - return { - /** - * Get the title to display in this column's header. - * @returns {string} the title to display - */ - getTitle: function () { - return eventMsgMetadata.name; - }, - /** - * Get the text to display inside a row under this - * column. - * @returns {string} the text to display - */ - getValue: function (domainObject, data, index) { - return data.getRangeValue(index, eventMsgMetadata.key); - } - }; - } - - return EventMsgColumn; - } -); \ No newline at end of file diff --git a/platform/features/events/src/SeverityColumn.js b/platform/features/events/src/SeverityColumn.js deleted file mode 100644 index 29f452bcb9..0000000000 --- a/platform/features/events/src/SeverityColumn.js +++ /dev/null @@ -1,67 +0,0 @@ -/***************************************************************************** - * Open MCT Web, Copyright (c) 2014-2015, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT Web 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 Web 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. - *****************************************************************************/ -/*global define,Promise*/ - -/** - * Module defining DomainColumn. Created by vwoeltje on 11/18/14. - */ -define( - [], - function () { - "use strict"; - - /** - * A column which will report telemetry range values - * (typically, measurements.) Used by the ScrollingListController. - * - * @constructor - * @param rangeMetadata an object with the machine- and human- - * readable names for this range (in `key` and `name` - * fields, respectively.) - * @param {TelemetryFormatter} telemetryFormatter the telemetry - * formatting service, for making values human-readable. - */ - function SeverityColumn(rangeMetadata, telemetryFormatter) { - return { - /** - * Get the title to display in this column's header. - * @returns {string} the title to display - */ - getTitle: function () { - return rangeMetadata.name; - }, - /** - * Get the text to display inside a row under this - * column. - * @returns {string} the text to display - */ - getValue: function (domainObject, data, index) { - return telemetryFormatter.formatRangeValue( - data.getSeverityValue(index, rangeMetadata.key) - ); - } - }; - } - - return SeverityColumn; - } -); \ No newline at end of file