Compare commits
57 Commits
vue-table-
...
0.14.0
Author | SHA1 | Date | |
---|---|---|---|
76fc0b01fa | |||
419285c396 | |||
3f6f893e29 | |||
14e8c7a401 | |||
3dee6db5e2 | |||
98c8e19d93 | |||
a8ba3b3fdb | |||
1b31a472a5 | |||
e5fe8fd975 | |||
b36d1ca2bc | |||
e9730ced9e | |||
ff2f79b087 | |||
76e163473a | |||
6fdc24ab21 | |||
cb93124ee1 | |||
4bda4080d2 | |||
e710cafb2c | |||
e9643ad07f | |||
ca16892237 | |||
a2b0d350d8 | |||
534bdbae50 | |||
831873e7de | |||
622d246fdd | |||
4a1ca9f299 | |||
4e1de2678c | |||
33a4792531 | |||
37dd4856a6 | |||
6a9cf3389d | |||
9582fb2b06 | |||
3c075b7ff2 | |||
081edfbd70 | |||
04cc8f7aa2 | |||
2da2395473 | |||
a1d206bfc3 | |||
00ecd27bb3 | |||
0fa4486dcf | |||
ef9c6d5fed | |||
15a75ac134 | |||
cde3994979 | |||
1a10c966e0 | |||
9288880e47 | |||
d2c5476cdd | |||
8d21d420ae | |||
cc22fd4e9d | |||
4a046b3eea | |||
b0702ceff5 | |||
5af14cd3b9 | |||
d7eb4c17ca | |||
8c9fe2d36b | |||
3246480f82 | |||
8055e050b6 | |||
b0f73fff0d | |||
755cf21d3f | |||
95457a1981 | |||
da0ed95662 | |||
c8919708bb | |||
cc5bfda730 |
40
.circleci/config.yml
Normal file
@ -0,0 +1,40 @@
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: circleci/node:8-browsers
|
||||
environment:
|
||||
CHROME_BIN: "/usr/bin/google-chrome"
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Update npm
|
||||
command: 'sudo npm install -g npm@latest'
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ checksum "package.json" }}-{{ checksum "bower.json" }}
|
||||
- run:
|
||||
name: Installing dependencies (npm install)
|
||||
command: npm install
|
||||
- save_cache:
|
||||
key: dependency-cache-{{ checksum "package.json" }}-{{ checksum "bower.json" }}
|
||||
paths:
|
||||
- node_modules
|
||||
- bower_components
|
||||
- run:
|
||||
name: npm run test
|
||||
command: npm run test
|
||||
- run:
|
||||
name: npm run lint
|
||||
command: npm run lint
|
||||
- run:
|
||||
name: npm run checkstyle
|
||||
command: npm run checkstyle
|
||||
- store_artifacts:
|
||||
path: dist
|
||||
prefix: dist
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
test:
|
||||
jobs:
|
||||
- build
|
121
API.md
@ -48,7 +48,10 @@
|
||||
- [The Time Conductor](#the-time-conductor)
|
||||
- [Time Conductor Configuration](#time-conductor-configuration)
|
||||
- [Example conductor configuration](#example-conductor-configuration)
|
||||
- [Included Plugins](#included-plugins)
|
||||
- [Indicators](#indicators)
|
||||
- [The URL Status Indicator](#the-url-status-indicator)
|
||||
- [Creating a Simple Indicator](#creating-a-simple-indicator)
|
||||
- [Custom Indicators](#custom-indicators)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
@ -425,7 +428,7 @@ attribute | type | flags | notes
|
||||
|
||||
###### Value Hints
|
||||
|
||||
Each telemetry value description has an object defining hints. Keys in this this object represent the hint itself, and the value represents the weight of that hint. A lower weight means the hint has a higher priority. For example, multiple values could be hinted for use as the y axis of a plot (raw, engineering), but the highest priority would be the default choice. Likewise, a table will use hints to determine the default order of columns.
|
||||
Each telemetry value description has an object defining hints. Keys in this this object represent the hint itself, and the value represents the weight of that hint. A lower weight means the hint has a higher priority. For example, multiple values could be hinted for use as the y-axis of a plot (raw, engineering), but the highest priority would be the default choice. Likewise, a table will use hints to determine the default order of columns.
|
||||
|
||||
Known hints:
|
||||
|
||||
@ -507,7 +510,7 @@ example:
|
||||
}
|
||||
```
|
||||
|
||||
This strategy says "I want the lastest data point in this time range". A provider which recognizes this request should return only one value-- the latest-- in the requested time range. Depending on your back-end implementation, performing these queries in bulk can be a large performance increase. These are generally issued by views that are only capable of displaying a single value and only need to show the latest value.
|
||||
This strategy says "I want the latest data point in this time range". A provider which recognizes this request should return only one value-- the latest-- in the requested time range. Depending on your back-end implementation, performing these queries in bulk can be a large performance increase. These are generally issued by views that are only capable of displaying a single value and only need to show the latest value.
|
||||
|
||||
##### `minmax` request strategy
|
||||
|
||||
@ -602,7 +605,7 @@ evaluator, take a look at `examples/generator/SinewaveLimitProvider.js`.
|
||||
|
||||
### Telemetry Consumer APIs **draft**
|
||||
|
||||
The APIs for requesting telemetry from Open MCT -- e.g. for use in custom views -- are currently in draft state and are being revised. If you'd like to experiement with them before they are finalized, please contact the team via the contact-us link on our website.
|
||||
The APIs for requesting telemetry from Open MCT -- e.g. for use in custom views -- are currently in draft state and are being revised. If you'd like to experiment with them before they are finalized, please contact the team via the contact-us link on our website.
|
||||
|
||||
|
||||
## Time API
|
||||
@ -688,7 +691,7 @@ openmct.time.timeSystem(utcTimeSystem, bounds);
|
||||
Setting the active time system will trigger a [`'timeSystem'`](#time-events)
|
||||
event. If you supplied bounds, a [`'bounds'`](#time-events) event will be triggered afterwards with your newly supplied bounds.
|
||||
|
||||
### Time Bounds
|
||||
#### Time Bounds
|
||||
|
||||
The TimeAPI provides a getter/setter for querying and setting time bounds. Time
|
||||
bounds are simply an object with a `start` and an end `end` attribute.
|
||||
@ -977,58 +980,68 @@ openmct.install(openmct.plugins.Conductor({
|
||||
}));
|
||||
```
|
||||
|
||||
## Included Plugins
|
||||
## Indicators
|
||||
|
||||
Open MCT is packaged along with a few general-purpose plugins:
|
||||
Indicators are small widgets that reside at the bottom of the screen and are visible from
|
||||
every screen in Open MCT. They can be used to convey system state using an icon and text.
|
||||
Typically an indicator will display an icon (customizable with a CSS class) that will
|
||||
reveal additional information when the mouse cursor is hovered over it.
|
||||
|
||||
* `openmct.plugins.Conductor` provides a user interface for working with time
|
||||
within the application. If activated, configuration must be provided. This is
|
||||
detailed in the section on [Time Conductor Configuration](#time-conductor-configuration).
|
||||
* `openmct.plugins.CouchDB` is an adapter for using CouchDB for persistence
|
||||
of user-created objects. This is a constructor that takes the URL for the
|
||||
CouchDB database as a parameter, e.g.
|
||||
```javascript
|
||||
openmct.install(openmct.plugins.CouchDB('http://localhost:5984/openmct'))
|
||||
```
|
||||
* `openmct.plugins.Elasticsearch` is an adapter for using Elasticsearch for
|
||||
persistence of user-created objects. This is a
|
||||
constructor that takes the URL for the Elasticsearch instance as a
|
||||
parameter. eg.
|
||||
```javascript
|
||||
openmct.install(openmct.plugins.CouchDB('http://localhost:9200'))
|
||||
```
|
||||
* `openmct.plugins.Espresso` and `openmct.plugins.Snow` are two different
|
||||
themes (dark and light) available for Open MCT. Note that at least one
|
||||
of these themes must be installed for Open MCT to appear correctly.
|
||||
* `openmct.plugins.URLIndicatorPlugin` adds an indicator which shows the
|
||||
availability of a URL with the following options:
|
||||
- `url` : URL to indicate the status of
|
||||
- `cssClass`: Icon to show in the status bar, defaults to `icon-database`, [list of all icons](https://nasa.github.io/openmct/style-guide/#/browse/styleguide:home?view=items)
|
||||
- `interval`: Interval between checking the connection, defaults to `10000`
|
||||
- `label` Name showing up as text in the status bar, defaults to url
|
||||
```javascript
|
||||
openmct.install(openmct.plugins.URLIndicatorPlugin({
|
||||
url: 'http://google.com',
|
||||
cssClass: 'check',
|
||||
interval: 10000,
|
||||
label: 'Google'
|
||||
})
|
||||
);
|
||||
```
|
||||
* `openmct.plugins.LocalStorage` provides persistence of user-created
|
||||
objects in browser-local storage. This is particularly useful in
|
||||
development environments.
|
||||
* `openmct.plugins.MyItems` adds a top-level folder named "My Items"
|
||||
when the application is first started, providing a place for a
|
||||
user to store created items.
|
||||
* `openmct.plugins.UTCTimeSystem` provides a default time system for Open MCT.
|
||||
### The URL Status Indicator
|
||||
|
||||
Generally, you will want to either install these plugins, or install
|
||||
different plugins that provide persistence and an initial folder
|
||||
hierarchy.
|
||||
A common use case for indicators is to convey the state of some external system such as a
|
||||
persistence backend or HTTP server. So long as this system is accessible via HTTP request,
|
||||
Open MCT provides a general purpose indicator to show whether the server is available and
|
||||
returing a 2xx status code. The URL Status Indicator is made available as a default plugin. See
|
||||
the [documentation](./src/plugins/URLIndicatorPlugin) for details on how to install and configure the
|
||||
URL Status Indicator.
|
||||
|
||||
### Creating a Simple Indicator
|
||||
|
||||
A simple indicator with an icon and some text can be created and added with minimal code. An indicator
|
||||
of this type exposes functions for customizing the text, icon, and style of the indicator.
|
||||
|
||||
eg.
|
||||
```javascript
|
||||
openmct.install(openmct.plugins.LocalStorage());
|
||||
openmct.install(openmct.plugins.MyItems());
|
||||
``` javascript
|
||||
var myIndicator = openmct.indicators.simpleIndicator();
|
||||
myIndicator.text("Hello World!");
|
||||
openmct.indicators.add(myIndicator);
|
||||
```
|
||||
|
||||
This will create a new indicator and add it to the bottom of the screen in Open MCT.
|
||||
By default, the indicator will appear as an information icon. Hovering over the icon will
|
||||
reveal the text set via the call to `.text()`. The Indicator object returned by the API
|
||||
call exposes a number of functions for customizing the content and appearance of the indicator:
|
||||
|
||||
* `.text([text])`: Gets or sets the text shown when the user hovers over the indicator.
|
||||
Accepts an __optional__ `string` argument that, if provided, will be used to set the text.
|
||||
Hovering over the indicator will expand it to its full size, revealing this text alongside
|
||||
the icon. Returns the currently set text as a `string`.
|
||||
* `.description([description])`: Gets or sets the indicator's description. Accepts an
|
||||
__optional__ `string` argument that, if provided, will be used to set the text. The description
|
||||
allows for more detail to be provided in a tooltip when the user hovers over the indicator.
|
||||
Returns the currently set text as a `string`.
|
||||
* `.iconClass([className])`: Gets or sets the CSS class used to define the icon. Accepts an __optional__
|
||||
`string` parameter to be used to set the class applied to the indicator. Any of
|
||||
[the built-in glyphs](https://nasa.github.io/openmct/style-guide/#/browse/styleguide:home/glyphs?view=styleguide.glyphs)
|
||||
may be used here, or a custom CSS class can be provided. Returns the currently defined CSS
|
||||
class as a `string`.
|
||||
* `.statusClass([className])`: Gets or sets the CSS class used to determine status. Accepts an __optional __
|
||||
`string` parameter to be used to set a status class applied to the indicator. May be used to apply
|
||||
different colors to indicate status.
|
||||
|
||||
### Custom Indicators
|
||||
|
||||
A completely custom indicator can be added by simply providing a DOM element to place alongside other indicators.
|
||||
|
||||
``` javascript
|
||||
var domNode = document.createElement('div');
|
||||
domNode.innerText = new Date().toString();
|
||||
setInterval(function () {
|
||||
domNode.innerText = new Date().toString();
|
||||
}, 1000);
|
||||
|
||||
openmct.indicators.add({
|
||||
element: domNode
|
||||
});
|
||||
```
|
||||
|
7
LICENSE.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Open MCT License
|
||||
|
||||
Open MCT, Copyright (c) 2014-2019, 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.
|
691
LICENSES.md
@ -1,691 +0,0 @@
|
||||
# Open MCT Licenses
|
||||
|
||||
Open MCT, Copyright (c) 2014-2017, 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 as follows.
|
||||
|
||||
## Software Components Licenses
|
||||
|
||||
This software includes components released under the following licenses:
|
||||
|
||||
---
|
||||
|
||||
### SuperSocket
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: https://supersocket.codeplex.com/
|
||||
|
||||
* Version: 0.9.0.2
|
||||
|
||||
* Author: Kerry Jiang
|
||||
|
||||
* Description: Supports SuperWebSocket
|
||||
|
||||
#### License
|
||||
|
||||
Copyright 2012 Kerry Jiang (kerry-jiang@hotmail.com)
|
||||
|
||||
SuperSocket 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.
|
||||
|
||||
---
|
||||
|
||||
### SuperWebSocket
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: https://superswebocket.codeplex.com/
|
||||
|
||||
* Version: 0.9.0.2
|
||||
|
||||
* Author: Kerry Jiang
|
||||
|
||||
* Description: WebSocket implementation for client-server communication
|
||||
|
||||
#### License
|
||||
|
||||
Copyright 2010-2013 Kerry Jiang (kerry-jiang@hotmail.com)
|
||||
|
||||
SuperWebSocket 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.
|
||||
|
||||
|
||||
---
|
||||
|
||||
### log4net
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://logging.apache.org/log4net/
|
||||
|
||||
* Version: 1.2.13
|
||||
|
||||
* Author: Apache Software Foundation
|
||||
|
||||
* Description: Logging.
|
||||
|
||||
#### License
|
||||
|
||||
Copyright © 2004-2015 Apache Software Foundation.
|
||||
|
||||
log4net 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.
|
||||
|
||||
---
|
||||
|
||||
### Blanket.js
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://blanketjs.org/
|
||||
|
||||
* Version: 1.1.5
|
||||
|
||||
* Author: Alex Seville
|
||||
|
||||
* Description: Code coverage measurement and reporting
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2013 Alex Seville
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### Jasmine
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://jasmine.github.io/
|
||||
|
||||
* Version: 1.3.1
|
||||
|
||||
* Author: Pivotal Labs
|
||||
|
||||
* Description: Unit testing
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2008-2011 Pivotal Labs
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### RequireJS
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://requirejs.org/
|
||||
|
||||
* Version: 2.1.22
|
||||
|
||||
* Author: The Dojo Foundation
|
||||
|
||||
* Description: Script loader
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2010-2015, The Dojo Foundation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### requirejs-text
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: https://github.com/requirejs/text
|
||||
|
||||
* Version: 2.0.14
|
||||
|
||||
* Author: The Dojo Foundation
|
||||
|
||||
* Description: Text loading plugin for RequireJS
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2010-2014, The Dojo Foundation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### AngularJS
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://angularjs.org/
|
||||
|
||||
* Version: 1.4.4
|
||||
|
||||
* Author: Google
|
||||
|
||||
* Description: Client-side web application framework
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### Angular-Route
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://angularjs.org/
|
||||
|
||||
* Version: 1.4.4
|
||||
|
||||
* Author: Google
|
||||
|
||||
* Description: Client-side view routing
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### ES6-Promise
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: https://github.com/jakearchibald/es6-promise
|
||||
|
||||
* Version: 3.0.2
|
||||
|
||||
* Authors: Yehuda Katz, Tom Dale, Stefan Penner and contributors
|
||||
|
||||
* Description: Promise polyfill for pre-ECMAScript 6 browsers
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### screenfull.js
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: https://github.com/sindresorhus/screenfull.js/
|
||||
|
||||
* Version: 3.0.0
|
||||
|
||||
* Author: Sindre Sorhus
|
||||
|
||||
* Description: Wrapper for cross-browser usage of fullscreen API
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### Math.uuid.js
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: https://github.com/broofa/node-uuid
|
||||
|
||||
* Version: 1.4.7
|
||||
|
||||
* Author: Robert Kieffer
|
||||
|
||||
* Description: Unique identifer generation.
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2010-2012 Robert Kieffer
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### Normalize.css
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: https://github.com/necolas/normalize.css
|
||||
|
||||
* Version: 1.1.2
|
||||
|
||||
* Authors: Nicolas Gallagher, Jonathan Neal
|
||||
|
||||
* Description: Browser style normalization
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) Nicolas Gallagher and Jonathan Neal
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### Moment.js
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://momentjs.com
|
||||
|
||||
* Version: 2.11.1
|
||||
|
||||
* Authors: Tim Wood, Iskren Chernev, Moment.js contributors
|
||||
|
||||
* Description: Time/date parsing/formatting
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2011-2014 Tim Wood, Iskren Chernev, Moment.js contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### moment-duration-format
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: https://github.com/jsmreese/moment-duration-format
|
||||
|
||||
* Version: 1.3.0
|
||||
|
||||
* Authors: John Madhavan-Reese
|
||||
|
||||
* Description: Duration parsing/formatting
|
||||
|
||||
#### License
|
||||
|
||||
Copyright 2014 John Madhavan-Reese
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### CSV.js
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: https://github.com/knrz/CSV.js
|
||||
|
||||
* Version: 3.6.4
|
||||
|
||||
* Authors: Kash Nouroozi
|
||||
|
||||
* Description: Encoder for CSV (comma separated values) export
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2014 Kash Nouroozi
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### FileSaver.js
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: https://github.com/eligrey/FileSaver.js/
|
||||
|
||||
* Version: 0.0.2
|
||||
|
||||
* Authors: Eli Grey
|
||||
|
||||
* Description: File download initiator (for file exports)
|
||||
|
||||
#### License
|
||||
|
||||
Copyright © 2015 Eli Grey.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### Zepto
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://zeptojs.com/
|
||||
|
||||
* Version: 1.1.6
|
||||
|
||||
* Authors: Thomas Fuchs
|
||||
|
||||
* Description: DOM manipulation
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2010-2016 Thomas Fuchs
|
||||
http://zeptojs.com/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### Json.NET
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://www.newtonsoft.com/json
|
||||
|
||||
* Version: 6.0.8
|
||||
|
||||
* Author: Newtonsoft
|
||||
|
||||
* Description: JSON serialization/deserialization
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2007 James Newton-King
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### Nancy
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://nancyfx.org
|
||||
|
||||
* Version: 0.23.2
|
||||
|
||||
* Author: Andreas Håkansson, Steven Robbins and contributors
|
||||
|
||||
* Description: Embedded web server
|
||||
|
||||
#### License
|
||||
|
||||
Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### Nancy.Hosting.Self
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://nancyfx.org
|
||||
|
||||
* Version: 0.23.2
|
||||
|
||||
* Author: Andreas Håkansson, Steven Robbins and contributors
|
||||
|
||||
* Description: Embedded web server
|
||||
|
||||
#### License
|
||||
|
||||
Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### Almond
|
||||
|
||||
* Link: https://github.com/requirejs/almond
|
||||
|
||||
* Version: 0.3.3
|
||||
|
||||
* Author: jQuery Foundation
|
||||
|
||||
* Description: Lightweight RequireJS replacement for builds
|
||||
|
||||
#### License
|
||||
|
||||
Copyright jQuery Foundation and other contributors, https://jquery.org/
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/requirejs/almond
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
====
|
||||
|
||||
Copyright and related rights for sample code are waived via CC0. Sample
|
||||
code is defined as all source code displayed within the prose of the
|
||||
documentation.
|
||||
|
||||
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
====
|
||||
|
||||
Files located in the node_modules directory, and certain utilities used
|
||||
to build or test the software in the test and dist directories, are
|
||||
externally maintained libraries used by this software which have their own
|
||||
licenses; we recommend you read them, as their terms may differ from the
|
||||
terms above.
|
||||
|
||||
|
||||
### Lodash
|
||||
|
||||
* Link: https://lodash.com
|
||||
|
||||
* Version: 3.10.1
|
||||
|
||||
* Author: Dojo Foundation
|
||||
|
||||
* Description: Utility functions
|
||||
|
||||
#### License
|
||||
|
||||
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
### EventEmitter3
|
||||
|
||||
* Link: https://github.com/primus/eventemitter3
|
||||
|
||||
* Version: 1.2.0
|
||||
|
||||
* Author: Arnout Kazemier
|
||||
|
||||
* Description: Event-driven programming support
|
||||
|
||||
#### License
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Arnout Kazemier
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
39
README.md
@ -9,26 +9,6 @@ Please visit our [Official Site](https://nasa.github.io/openmct/) and [Getting S
|
||||
Try Open MCT now with our [live demo](https://openmct-demo.herokuapp.com/).
|
||||

|
||||
|
||||
## New API
|
||||
|
||||
A simpler, [easier-to-use API](https://nasa.github.io/openmct/docs/api/)
|
||||
has been added to Open MCT. Changes in this
|
||||
API include a move away from a declarative system of JSON configuration files
|
||||
towards an imperative system based on function calls. Developers will be able
|
||||
to extend and build on Open MCT by making direct function calls to a public
|
||||
API. Open MCT is also being refactored to minimize the dependencies that using
|
||||
Open MCT imposes on developers, such as the current requirement to use
|
||||
AngularJS.
|
||||
|
||||
This new API has not yet been heavily used and is likely to contain defects.
|
||||
You can help by trying it out, and reporting any issues you encounter
|
||||
using our GitHub issue tracker. Such issues may include bugs, suggestions,
|
||||
missing documentation, or even just requests for help if you're having
|
||||
trouble.
|
||||
|
||||
We want Open MCT to be as easy to use, install, run, and develop for as
|
||||
possible, and your feedback will help us get there!
|
||||
|
||||
## Building and Running Open MCT Locally
|
||||
|
||||
Building and running Open MCT in your local dev environment is very easy. Be sure you have [Git](https://git-scm.com/downloads) and [Node.js](https://nodejs.org/) installed, then follow the directions below. Need additional information? Check out the [Getting Started](https://nasa.github.io/openmct/getting-started/) page on our website.
|
||||
@ -58,28 +38,13 @@ The clearest examples for developing Open MCT plugins are in the
|
||||
[tutorials](https://github.com/nasa/openmct-tutorial) provided in
|
||||
our documentation.
|
||||
|
||||
For a practical example of a telemetry adapter, see David Hudson's
|
||||
[Kerbal Space Program plugin](https://github.com/hudsonfoo/kerbal-openmct),
|
||||
which allows [Kerbal Space Program](https://kerbalspaceprogram.com) players
|
||||
to build and use displays for their own missions in Open MCT.
|
||||
|
||||
Additional examples are available in the `examples` hierarchy of this
|
||||
repository; however, be aware that these examples are
|
||||
[not fully-documented](https://github.com/nasa/openmct/issues/846), so
|
||||
the tutorials will likely serve as a better starting point.
|
||||
|
||||
### Building the Open MCT Documentation Locally
|
||||
Open MCT's documentation is generated by an
|
||||
[npm](https://www.npmjs.com/)-based build. It has additional dependencies that
|
||||
may not be available on every platform and thus is not covered in the standard
|
||||
npm install. Ensure your system has [libcairo](http://cairographics.org/)
|
||||
installed and then run the following commands:
|
||||
|
||||
* `npm install`
|
||||
* `npm install canvas nomnoml`
|
||||
* `npm run docs`
|
||||
|
||||
Documentation will be generated in `target/docs`.
|
||||
We want Open MCT to be as easy to use, install, run, and develop for as
|
||||
possible, and your feedback will help us get there! Feedback can be provided via [GitHub issues](https://github.com/nasa/openmct/issues), or by emailing us at [arc-dl-openmct@mail.nasa.gov](mailto:arc-dl-openmct@mail.nasa.gov).
|
||||
|
||||
## Deploying Open MCT
|
||||
|
||||
|
3
app.js
@ -19,7 +19,7 @@
|
||||
|
||||
// Defaults
|
||||
options.port = options.port || options.p || 8080;
|
||||
options.host = options.host || options.h || 'localhost'
|
||||
options.host = options.host || 'localhost'
|
||||
options.directory = options.directory || options.D || '.';
|
||||
['include', 'exclude', 'i', 'x'].forEach(function (opt) {
|
||||
options[opt] = options[opt] || [];
|
||||
@ -36,6 +36,7 @@
|
||||
console.log("Options:");
|
||||
console.log(" --help, -h Show this message.");
|
||||
console.log(" --port, -p <number> Specify port.");
|
||||
console.log(" --host <host> Specify host to listen on.");
|
||||
console.log(" --include, -i <bundle> Include the specified bundle.");
|
||||
console.log(" --exclude, -x <bundle> Exclude the specified bundle.");
|
||||
console.log(" --directory, -D <bundle> Serve files from specified directory.");
|
||||
|
27
circle.yml
@ -1,27 +0,0 @@
|
||||
machine:
|
||||
node:
|
||||
version: 8.11.0
|
||||
|
||||
dependencies:
|
||||
pre:
|
||||
- npm install -g npm@latest
|
||||
|
||||
deployment:
|
||||
production:
|
||||
branch: master
|
||||
commands:
|
||||
- npm install canvas nomnoml
|
||||
- ./build-docs.sh
|
||||
openmctweb-staging-deux:
|
||||
branch: mobile
|
||||
heroku:
|
||||
appname: openmctweb-staging-deux
|
||||
test:
|
||||
post:
|
||||
- gulp lint
|
||||
- gulp checkstyle
|
||||
|
||||
general:
|
||||
branches:
|
||||
ignore:
|
||||
- gh-pages
|
@ -33,5 +33,5 @@ As we transition to a new API, the following documentation for the old API
|
||||
* The [Developer's Guide](guide/) goes into more detail about how to use the
|
||||
platform and the functionality that it provides.
|
||||
|
||||
* The [Tutorials](tutorials/) give examples of extending the platform to add
|
||||
* The [Tutorials](https://github.com/nasa/openmct-tutorial) give examples of extending the platform to add
|
||||
functionality, and integrate with data sources.
|
||||
|
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 140 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 43 KiB |
@ -60,8 +60,8 @@ define([
|
||||
"source": "eventGenerator",
|
||||
"domains": [
|
||||
{
|
||||
"key": "time",
|
||||
"name": "Time",
|
||||
"key": "utc",
|
||||
"name": "Timestamp",
|
||||
"format": "utc"
|
||||
}
|
||||
],
|
||||
|
@ -72,7 +72,7 @@ define([
|
||||
var data = [];
|
||||
while (start <= end && data.length < 5000) {
|
||||
data.push(pointForTimestamp(start, duration, domainObject.name));
|
||||
start += 5000;
|
||||
start += duration;
|
||||
}
|
||||
return Promise.resolve(data);
|
||||
};
|
||||
|
@ -38,7 +38,8 @@ define([
|
||||
"provides": "identityService",
|
||||
"type": "provider",
|
||||
"depends": [
|
||||
"dialogService"
|
||||
"dialogService",
|
||||
"$q"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -55,21 +55,37 @@ define(
|
||||
* @implements {IdentityService}
|
||||
* @memberof platform/identity
|
||||
*/
|
||||
function ExampleIdentityProvider(dialogService) {
|
||||
// Handle rejected dialog messages by treating the
|
||||
// current user as undefined.
|
||||
function echo(v) { return v; }
|
||||
function giveUndefined() { return undefined; }
|
||||
function ExampleIdentityProvider(dialogService, $q) {
|
||||
this.dialogService = dialogService;
|
||||
this.$q = $q;
|
||||
|
||||
this.userPromise =
|
||||
dialogService.getUserInput(DIALOG_STRUCTURE, DEFAULT_IDENTITY)
|
||||
.then(echo, giveUndefined);
|
||||
this.returnUser = this.returnUser.bind(this);
|
||||
this.returnUndefined = this.returnUndefined.bind(this);
|
||||
}
|
||||
|
||||
ExampleIdentityProvider.prototype.getUser = function () {
|
||||
return this.userPromise;
|
||||
if (this.user) {
|
||||
return this.$q.when(this.user);
|
||||
} else {
|
||||
return this.dialogService.getUserInput(DIALOG_STRUCTURE, DEFAULT_IDENTITY)
|
||||
.then(this.returnUser, this.returnUndefined);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
ExampleIdentityProvider.prototype.returnUser = function (user) {
|
||||
return this.user = user;
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
ExampleIdentityProvider.prototype.returnUndefined = function () {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return ExampleIdentityProvider;
|
||||
}
|
||||
);
|
||||
|
@ -1,9 +1,9 @@
|
||||
<span class="status block" ng-controller="DialogLaunchController">
|
||||
<span class="h-indicator" ng-controller="DialogLaunchController">
|
||||
<!-- DO NOT ADD SPACES BETWEEN THE SPANS - IT ADDS WHITE SPACE!! -->
|
||||
<span class="status-indicator icon-box-with-arrow"></span><span class="label">
|
||||
<a ng-click="launchProgress(true)">Known</a> |
|
||||
<a ng-click="launchProgress(false)">Unknown</a> |
|
||||
<a ng-click="launchError()">Error</a> |
|
||||
<div class="ls-indicator icon-box-with-arrow s-status-available"><span class="label">
|
||||
<a ng-click="launchProgress(true)">Known</a>
|
||||
<a ng-click="launchProgress(false)">Unknown</a>
|
||||
<a ng-click="launchError()">Error</a>
|
||||
<a ng-click="launchInfo()">Info</a>
|
||||
</span><span class="count"></span>
|
||||
</span></div>
|
||||
</span>
|
||||
|
@ -1,9 +1,9 @@
|
||||
<span class="status block" ng-controller="NotificationLaunchController">
|
||||
<span class="h-indicator" ng-controller="NotificationLaunchController">
|
||||
<!-- DO NOT ADD SPACES BETWEEN THE SPANS - IT ADDS WHITE SPACE!! -->
|
||||
<span class="status-indicator icon-bell"></span><span class="label">
|
||||
<a ng-click="newInfo()">Success</a> |
|
||||
<a ng-click="newError()">Error</a> |
|
||||
<a ng-click="newAlert()">Alert</a> |
|
||||
<div class="ls-indicator icon-bell s-status-available"><span class="label">
|
||||
<a ng-click="newInfo()">Success</a>
|
||||
<a ng-click="newError()">Error</a>
|
||||
<a ng-click="newAlert()">Alert</a>
|
||||
<a ng-click="newProgress()">Progress</a>
|
||||
</span><span class="count"></span>
|
||||
</span></div>
|
||||
</span>
|
||||
|
@ -58,7 +58,10 @@
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.w-mct-example > div { margin-bottom: $interiorMarginLg; }
|
||||
.w-mct-example {
|
||||
color: #ccc;
|
||||
> div { margin-bottom: $interiorMarginLg; }
|
||||
}
|
||||
|
||||
code,
|
||||
pre {
|
||||
|
@ -20,12 +20,12 @@
|
||||
at runtime from the About dialog for additional information.
|
||||
-->
|
||||
<style>
|
||||
.w-mct-example div[class*="s-limit"],
|
||||
.w-mct-example div[class*="s-status"],
|
||||
.w-mct-example div[class*="s-unsynced"],
|
||||
.w-mct-example span[class*="s-status"],
|
||||
.w-mct-example div[class*="s-limit"],
|
||||
.w-mct-example span[class*="s-limit"] {
|
||||
border-radius: 4px;
|
||||
padding: 3px 7px;
|
||||
border-radius: 3px;
|
||||
padding: 2px 5px;
|
||||
}
|
||||
.w-mct-example table {
|
||||
width: 100%;
|
||||
@ -36,65 +36,12 @@
|
||||
<h1>Status Indication</h1>
|
||||
|
||||
<div class="l-section">
|
||||
<h2>Overview</h2>
|
||||
<p>Many elements in Open MCT need to articulate a dynamic status; Open MCT provides the following styles and conventions to handle this:</p>
|
||||
<ul>
|
||||
<li><strong>Limits</strong>: when telemetry values exceed minimum or maximum values, they can be violating limits. Limit styles include both color and iconography; color is used to indicate severity while icons are used to indicate direction, upper or lower.</li>
|
||||
<li><strong>Status</strong>: Open MCT also provides a number or built-in Status styles allowing telemetry or other displayed information to be visually classified by type. Common uses for these classes are to visually denote event records.</li>
|
||||
<li><strong>Synchronization</strong>: When the system is displaying real-time data, it is very important that displays clearly indicate when they are not doing so, such as when a plot if frozen while panning or zooming. Open MCT provides a style for this.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="l-section">
|
||||
<h2>Limits</h2>
|
||||
<h2>Status Classes</h2>
|
||||
<div class="cols cols1-1">
|
||||
<div class="col">
|
||||
<p>Limit CSS classes can be applied to any block or inline element. Open MCT limit classes set color and optionally an icon, but don't effect other properties. Yellow and red limit classes can be used as is, or allow the application of any custom icon available in Open MCT's glyphs library. "Level" limit classes - upper and lower - always use an icon in addition to a color; Open MCT doesn't support level limits without color.</p>
|
||||
<ul>
|
||||
<li>Color only</li>
|
||||
<ul>
|
||||
<li><code>s-limit-yellow</code>: A yellow limit.</li>
|
||||
<li><code>s-limit-red</code>: A red limit.</li>
|
||||
</ul>
|
||||
<li>Color and icon</li>
|
||||
<ul>
|
||||
<li><code>s-limit-yellow-icon</code>: A yellow limit with icon.</li>
|
||||
<li><code>s-limit-red-icon</code>: A red limit with icon.</li>
|
||||
</ul>
|
||||
<li>Upper and lower limit indicators. Must be used with a color limit class to be visible.</li>
|
||||
<ul>
|
||||
<li><code>s-limit-upr</code>: Upper limit.
|
||||
</li>
|
||||
<li><code>s-limit-lwr</code>: Lower limit.
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
<mct-example><div class="s-limit-yellow">Yellow limit</div>
|
||||
<div class="s-limit-red">Red limit</div>
|
||||
<div class="s-limit-yellow-icon">Yellow limit with icon</div>
|
||||
<div class="s-limit-red-icon">Red limit with icon</div>
|
||||
<div class="s-limit-yellow s-limit-lwr">Lower yellow limit</div>
|
||||
<div class="s-limit-red s-limit-upr">Upper red limit</div>
|
||||
<div class="s-limit-red icon-bell">Red Limit with a custom icon</div>
|
||||
<div>Some text with an <span class="s-limit-yellow-icon">inline element</span> showing a yellow limit.</div>
|
||||
|
||||
<!-- Limits applied in a table -->
|
||||
<table>
|
||||
<tr class='header'><td>Name</td><td>Value 1</td><td>Value 2</td></tr>
|
||||
<tr><td>ENG_PWR 4991</td><td>7.023</td><td class="s-limit-yellow s-limit-upr">70.23</td></tr>
|
||||
<tr><td>ENG_PWR 4992</td><td>49.784</td><td class="s-limit-red s-limit-lwr">-121.22</td></tr>
|
||||
<tr><td>ENG_PWR 4993</td><td class="s-limit-yellow icon-bell">0.451</td><td>1.007</td></tr>
|
||||
</table>
|
||||
</mct-example>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="l-section">
|
||||
<h2>Status</h2>
|
||||
<div class="cols cols1-1">
|
||||
<div class="col">
|
||||
<p>Classes here can be applied to elements as needed.</p>
|
||||
<p>Status classes allow any block or inline-block element to be decorated in order to articulate a
|
||||
status. Provided classes include color-only and color plus icon; custom icons can easily be
|
||||
employed by using a color-only status class in combination with an <a class="link" href="#/browse/styleguide:home/glyphs?tc.mode=local&tc.timeSystem=utc&tc.startDelta=1800000&tc.endDelta=0&view=styleguide.glyphs">glyph</a>.</p>
|
||||
<ul>
|
||||
<li>Color only</li>
|
||||
<ul>
|
||||
@ -106,36 +53,174 @@
|
||||
</ul>
|
||||
<li>Color and icon</li>
|
||||
<ul>
|
||||
<li><code>s-status-warning-hi-icon</code></li>
|
||||
<li><code>s-status-warning-lo-icon</code></li>
|
||||
<li><code>s-status-diagnostic-icon</code></li>
|
||||
<li><code>s-status-info-icon</code></li>
|
||||
<li><code>s-status-ok-icon</code></li>
|
||||
<li><code>s-status-icon-warning-hi</code></li>
|
||||
<li><code>s-status-icon-warning-lo</code></li>
|
||||
<li><code>s-status-icon-diagnostic</code></li>
|
||||
<li><code>s-status-icon-info</code></li>
|
||||
<li><code>s-status-icon-ok</code></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
<mct-example><div class="s-status-warning-hi">WARNING HI</div>
|
||||
<mct-example><!-- Color alone examples -->
|
||||
<div class="s-status-warning-hi">WARNING HI</div>
|
||||
<div class="s-status-warning-lo">WARNING LOW</div>
|
||||
<div class="s-status-diagnostic">DIAGNOSTIC</div>
|
||||
<div class="s-status-info">INFO</div>
|
||||
<div class="s-status-ok">OK</div>
|
||||
<div class="s-status-warning-hi-icon">WARNING HI with icon</div>
|
||||
<div class="s-status-warning-lo-icon">WARNING LOW with icon</div>
|
||||
<div class="s-status-diagnostic-icon">DIAGNOSTIC with icon</div>
|
||||
<div class="s-status-info-icon">INFO with icon</div>
|
||||
<div class="s-status-ok-icon">OK with icon</div>
|
||||
<div class="s-status-warning-hi icon-gear">WARNING HI with custom icon</div>
|
||||
|
||||
<!-- Color and icon examples -->
|
||||
<div class="s-status-icon-warning-hi">WARNING HI with icon</div>
|
||||
<div class="s-status-icon-warning-lo">WARNING LOW with icon</div>
|
||||
<div class="s-status-icon-diagnostic">DIAGNOSTIC with icon</div>
|
||||
<div class="s-status-icon-info">INFO with icon</div>
|
||||
<div class="s-status-icon-ok">OK with icon</div>
|
||||
<div class="s-status-warning-hi icon-alert-triangle">WARNING HI with custom icon</div>
|
||||
<div>Some text with an <span class="s-status-icon-diagnostic">inline element</span> showing a Diagnostic status.</div>
|
||||
</mct-example>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="l-section">
|
||||
<h2>Synchronization</h2>
|
||||
<h2>Limit Classes</h2>
|
||||
<div class="cols cols1-1">
|
||||
<div class="col">
|
||||
<p>When the system is operating in real-time streaming mode, it is important for views that display real-time data to clearly articulate when they are not, such as when a user zooms or pans a plot view, freezing that view. In that case, the CSS class <code>s-unsynced</code> should be applied to that view.</p>
|
||||
<p>Limit classes are a specialized form of status, specifically meant to be applied to telemetry
|
||||
displays to indicate that a limit threshold has been violated. Open MCT provides both severity
|
||||
and direction classes; severity (yellow and red) can be used alone or in combination
|
||||
with direction (upper or lower). Direction classes cannot be used on their own.</p>
|
||||
<p>Like Status classes, Limits can be used as color-only, or color plus icon. Custom icons can
|
||||
be applied in the same fashion as described above.</p>
|
||||
<ul>
|
||||
<li>Severity color alone</li>
|
||||
<ul>
|
||||
<li><code>s-limit-yellow</code>: A yellow limit.</li>
|
||||
<li><code>s-limit-red</code>: A red limit.</li>
|
||||
</ul>
|
||||
<li>Severity color and icon</li>
|
||||
<ul>
|
||||
<li><code>s-limit-icon-yellow</code>: A yellow limit with icon.</li>
|
||||
<li><code>s-limit-icon-red</code>: A red limit with icon.</li>
|
||||
</ul>
|
||||
<li>Direction indicators. MUST be used with a "color alone" limit class. See
|
||||
examples for more.</li>
|
||||
<ul>
|
||||
<li><code>s-limit-upr</code>: Upper limit.</li>
|
||||
<li><code>s-limit-lwr</code>: Lower limit.</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
<mct-example><div class="s-unsynced">This element is unsynced</div>
|
||||
<mct-example><!-- Color alone examples -->
|
||||
<div class="s-limit-yellow">Yellow limit</div>
|
||||
<div class="s-limit-red">Red limit</div>
|
||||
|
||||
<!-- Color and icon examples -->
|
||||
<div class="s-limit-icon-yellow">Yellow limit with icon</div>
|
||||
<div class="s-limit-icon-red">Red limit with icon</div>
|
||||
<div class="s-limit-red icon-alert-rect">Red Limit with a custom icon</div>
|
||||
<div>Some text with an <span class="s-limit-icon-yellow">inline element</span> showing a yellow limit.</div>
|
||||
|
||||
<!-- Severity and direction examples -->
|
||||
<div class="s-limit-yellow s-limit-lwr">Lower yellow limit</div>
|
||||
<div class="s-limit-red s-limit-upr">Upper red limit</div>
|
||||
|
||||
<!-- Limits applied in a table -->
|
||||
<table>
|
||||
<tr class='header'><td>Name</td><td>Value 1</td><td>Value 2</td></tr>
|
||||
<tr><td>ENG_PWR 4991</td><td>7.023</td><td class="s-limit-yellow s-limit-upr">70.23</td></tr>
|
||||
<tr><td>ENG_PWR 4992</td><td>49.784</td><td class="s-limit-red s-limit-lwr">-121.22</td></tr>
|
||||
<tr><td>ENG_PWR 4993</td><td class="s-limit-yellow icon-alert-triangle">0.451</td><td>1.007</td></tr>
|
||||
</table>
|
||||
</mct-example>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="l-section">
|
||||
<h2>Status Bar Indicators</h2>
|
||||
<div class="cols cols1-1">
|
||||
<div class="col">
|
||||
<p>Indicators are small iconic notification elements that appear in the Status Bar area of
|
||||
the application at the window's bottom. Indicators should be used to articulate the state of a
|
||||
system and optionally provide gestures related to that system. They use a combination of icon and
|
||||
color to identify themselves and articulate a state respectively.</p>
|
||||
<h3>Recommendations</h3>
|
||||
<ul>
|
||||
<li><strong>Keep the icon consistent</strong>. The icon is the principal identifier of the system and is a valuable
|
||||
recall aid for the user. Don't change the icon as a system's state changes, use color and
|
||||
text for that purpose.</li>
|
||||
<li><strong>Don't use the same icon more than once</strong>. Select meaningful and distinct icons so the user
|
||||
will be able to quickly identify what they're looking for.</li>
|
||||
</ul>
|
||||
|
||||
<h3>States</h3>
|
||||
<ul>
|
||||
<li><strong>Disabled</strong>: The system is not available to the user.</li>
|
||||
<li><strong>Off / Available</strong>: The system is accessible to the user but is not currently
|
||||
"On" or has not been configured. If the Indicator directly provides gestures
|
||||
related to the system, such as opening a configuration dialog box, then use
|
||||
"Available"; if the user must act elsewhere or the system isn't user-controllable,
|
||||
use "Off".</li>
|
||||
<li><strong>On</strong>: The system is enabled or configured; it is having an effect on the larger application.</li>
|
||||
<li><strong>Alert / Error</strong>: There has been a problem with the system. Generally, "Alert"
|
||||
should be used to call attention to an issue that isn't critical, while "Error"
|
||||
should be used to call attention to a problem that the user should really be aware of or do
|
||||
something about.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Structure</h3>
|
||||
<p>Indicators consist of a <code>.ls-indicator</code>
|
||||
wrapper element with <code>.icon-*</code> classes for the type of thing they represent and
|
||||
<code>.s-status-*</code> classes to articulate the current state. Title attributes should be used
|
||||
to provide more verbose information about the thing and/or its status.</p>
|
||||
<p>The wrapper encloses a <code>.label</code> element that is displayed on hover. This element should
|
||||
include a brief statement of the current status, and can also include clickable elements
|
||||
as <code><a></code> tags. An optional <code>.count</code> element can be included to display
|
||||
information such as a number of messages.</p>
|
||||
<p>Icon classes are as defined on the
|
||||
<a class="link" href="#/browse/styleguide:home/glyphs?tc.mode=local&tc.timeSystem=utc&tc.startDelta=1800000&tc.endDelta=0&view=styleguide.glyphs">
|
||||
Glyphs page</a>. Status classes applicable to Indicators are as follows:</p>
|
||||
<ul>
|
||||
<li><code>s-status-disabled</code></li>
|
||||
<li><code>s-status-off</code></li>
|
||||
<li><code>s-status-available</code></li>
|
||||
<li><code>s-status-on</code></li>
|
||||
<li><code>s-status-alert</code></li>
|
||||
<li><code>s-status-error</code></li>
|
||||
</ul>
|
||||
</div>
|
||||
<mct-example><div class="s-ue-bottom-bar status-holder s-status-bar">
|
||||
<span class="ls-indicator icon-database s-status-disabled" title="The system is currently disabled.">
|
||||
<span class="label">System not enabled.</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="s-ue-bottom-bar status-holder s-status-bar">
|
||||
<span class="ls-indicator icon-database s-status-available" title="Configure data connection.">
|
||||
<span class="label">Data connection available
|
||||
<a class="icon-gear">Configure</a>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="s-ue-bottom-bar status-holder s-status-bar">
|
||||
<span class="ls-indicator icon-database s-status-on" title="Data connected.">
|
||||
<span class="label">Connected to Skynet
|
||||
<a class="icon-gear">Change</a>
|
||||
<a>Disconnect</a>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="s-ue-bottom-bar status-holder s-status-bar">
|
||||
<span class="ls-indicator icon-database s-status-alert" title="System is self-aware.">
|
||||
<span class="label">Skynet at Turing Level 5</span>
|
||||
</span>
|
||||
<span class="ls-indicator icon-bell s-status-error" title="You have alerts.">
|
||||
<span class="label">
|
||||
<a class="icon-alert-triangle">View Alerts</a>
|
||||
</span>
|
||||
<span class="count">495</span>
|
||||
</span>
|
||||
</div>
|
||||
</mct-example>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -54,7 +54,7 @@ define(
|
||||
return "icon-object-unknown";
|
||||
},
|
||||
getText: function () {
|
||||
return latest;
|
||||
return "" + latest;
|
||||
},
|
||||
getDescription: function () {
|
||||
return "";
|
||||
|
@ -31,7 +31,6 @@ var gulp = require('gulp'),
|
||||
git = require('git-rev-sync'),
|
||||
moment = require('moment'),
|
||||
project = require('./package.json'),
|
||||
_ = require('lodash'),
|
||||
paths = {
|
||||
main: 'openmct.js',
|
||||
dist: 'dist',
|
||||
@ -140,7 +139,7 @@ gulp.task('checkstyle', function () {
|
||||
var mkdirp = require('mkdirp');
|
||||
var reportName = 'jscs-html-report.html';
|
||||
var reportPath = path.resolve(paths.reports, 'checkstyle', reportName);
|
||||
var moveReport = fs.rename.bind(fs, reportName, reportPath, _.noop);
|
||||
var moveReport = fs.rename.bind(fs, reportName, reportPath, function () {});
|
||||
|
||||
mkdirp.sync(path.resolve(paths.reports, 'checkstyle'));
|
||||
|
||||
|
@ -73,6 +73,7 @@
|
||||
openmct.time.clock('local', {start: -THIRTY_MINUTES, end: 0});
|
||||
openmct.time.timeSystem('utc');
|
||||
openmct.start();
|
||||
window.openmct = openmct;
|
||||
});
|
||||
</script>
|
||||
<link rel="stylesheet" href="platform/commonUI/general/res/css/startup-base.css">
|
||||
|
10
openmct.js
@ -41,14 +41,14 @@ requirejs.config({
|
||||
"lodash": "bower_components/lodash/lodash",
|
||||
"d3-selection": "node_modules/d3-selection/dist/d3-selection.min",
|
||||
"d3-scale": "node_modules/d3-scale/build/d3-scale.min",
|
||||
"d3-axis": "node_modules/d3-axis/build/d3-axis.min",
|
||||
"d3-array": "node_modules/d3-array/build/d3-array.min",
|
||||
"d3-collection": "node_modules/d3-collection/build/d3-collection.min",
|
||||
"d3-axis": "node_modules/d3-axis/dist/d3-axis.min",
|
||||
"d3-array": "node_modules/d3-array/dist/d3-array.min",
|
||||
"d3-collection": "node_modules/d3-collection/dist/d3-collection.min",
|
||||
"d3-color": "node_modules/d3-color/build/d3-color.min",
|
||||
"d3-format": "node_modules/d3-format/build/d3-format.min",
|
||||
"d3-interpolate": "node_modules/d3-interpolate/build/d3-interpolate.min",
|
||||
"d3-time": "node_modules/d3-time/build/d3-time.min",
|
||||
"d3-time-format": "node_modules/d3-time-format/build/d3-time-format.min",
|
||||
"d3-time": "node_modules/d3-time/dist/d3-time.min",
|
||||
"d3-time-format": "node_modules/d3-time-format/dist/d3-time-format.min",
|
||||
"html2canvas": "node_modules/html2canvas/dist/html2canvas.min",
|
||||
"painterro": "node_modules/painterro/build/painterro.min",
|
||||
"printj": "node_modules/printj/dist/printj.min"
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "openmct",
|
||||
"version": "0.14.0-SNAPSHOT",
|
||||
"description": "The Open MCT core platform",
|
||||
"version": "0.14.0",
|
||||
"description": "The Open MCT core platform.",
|
||||
"dependencies": {
|
||||
"d3-array": "1.2.x",
|
||||
"d3-axis": "1.0.x",
|
||||
@ -15,7 +15,7 @@
|
||||
"d3-time-format": "2.1.x",
|
||||
"express": "^4.13.1",
|
||||
"minimist": "^1.1.1",
|
||||
"painterro": "^0.2.65",
|
||||
"painterro": "0.2.65",
|
||||
"request": "^2.69.0",
|
||||
"vue": "^2.5.6"
|
||||
},
|
||||
@ -43,7 +43,6 @@
|
||||
"karma-html-reporter": "^0.2.7",
|
||||
"karma-jasmine": "^1.1.2",
|
||||
"karma-requirejs": "^1.1.0",
|
||||
"lodash": "^3.10.1",
|
||||
"markdown-toc": "^0.11.7",
|
||||
"marked": "^0.3.5",
|
||||
"merge-stream": "^1.0.0",
|
||||
@ -59,6 +58,8 @@
|
||||
"start": "node app.js",
|
||||
"test": "karma start --single-run",
|
||||
"jshint": "jshint platform example",
|
||||
"lint": "./node_modules/gulp/bin/gulp.js lint",
|
||||
"checkstyle": "./node_modules/gulp/bin/gulp.js checkstyle",
|
||||
"watch": "karma start",
|
||||
"jsdoc": "jsdoc -c jsdoc.json -R API.md -r -d dist/docs/api",
|
||||
"otherdoc": "node docs/gendocs.js --in docs/src --out dist/docs --suppress-toc 'docs/src/index.md|docs/src/process/index.md'",
|
||||
|
@ -188,6 +188,7 @@ define([
|
||||
"name": "Remove",
|
||||
"description": "Remove this object from its containing object.",
|
||||
"depends": [
|
||||
"dialogService",
|
||||
"navigationService"
|
||||
]
|
||||
},
|
||||
|
@ -23,9 +23,11 @@
|
||||
/**
|
||||
* Module defining RemoveAction. Created by vwoeltje on 11/17/14.
|
||||
*/
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
define([
|
||||
'./RemoveDialog'
|
||||
], function (
|
||||
RemoveDialog
|
||||
) {
|
||||
|
||||
/**
|
||||
* Construct an action which will remove the provided object manifestation.
|
||||
@ -33,25 +35,27 @@ define(
|
||||
* is looked up via the "context" capability (so this will be the
|
||||
* immediate ancestor by which this specific object was reached.)
|
||||
*
|
||||
* @param {DomainObject} object the object to be removed
|
||||
* @param {DialogService} dialogService a service which will show the dialog
|
||||
* @param {NavigationService} navigationService a service that maintains the current navigation state
|
||||
* @param {ActionContext} context the context in which this action is performed
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
* @implements {Action}
|
||||
*/
|
||||
function RemoveAction(navigationService, context) {
|
||||
function RemoveAction(dialogService, navigationService, context) {
|
||||
this.domainObject = (context || {}).domainObject;
|
||||
this.dialogService = dialogService;
|
||||
this.navigationService = navigationService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform this action.
|
||||
* @return {Promise} a promise which will be
|
||||
* fulfilled when the action has completed.
|
||||
*/
|
||||
RemoveAction.prototype.perform = function () {
|
||||
var navigationService = this.navigationService,
|
||||
domainObject = this.domainObject;
|
||||
RemoveAction.prototype.perform = function (skipWarning) {
|
||||
var dialog,
|
||||
dialogService = this.dialogService,
|
||||
domainObject = this.domainObject,
|
||||
navigationService = this.navigationService;
|
||||
/*
|
||||
* Check whether an object ID matches the ID of the object being
|
||||
* removed (used to filter a parent's composition to handle the
|
||||
@ -111,7 +115,18 @@ define(
|
||||
return parent.useCapability('mutation', doMutate);
|
||||
}
|
||||
|
||||
return removeFromContext(domainObject);
|
||||
if (skipWarning) {
|
||||
|
||||
removeFromContext(domainObject);
|
||||
|
||||
} else {
|
||||
/*
|
||||
* Pass in the function to remove the domain object so it can be
|
||||
* associated with an 'OK' button press
|
||||
*/
|
||||
dialog = new RemoveDialog(dialogService, domainObject, removeFromContext);
|
||||
dialog.show();
|
||||
}
|
||||
};
|
||||
|
||||
// Object needs to have a parent for Remove to be applicable
|
||||
@ -129,5 +144,4 @@ define(
|
||||
};
|
||||
|
||||
return RemoveAction;
|
||||
}
|
||||
);
|
||||
});
|
||||
|
77
platform/commonUI/edit/src/actions/RemoveDialog.js
Normal file
@ -0,0 +1,77 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, 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.
|
||||
*****************************************************************************/
|
||||
|
||||
define([], function () {
|
||||
|
||||
/**
|
||||
* @callback removeCallback
|
||||
* @param {DomainObject} domainObject the domain object to be removed
|
||||
*/
|
||||
|
||||
/**
|
||||
* Construct a new Remove dialog.
|
||||
*
|
||||
* @param {DialogService} dialogService the service that shows the dialog
|
||||
* @param {DomainObject} domainObject the domain object to be removed
|
||||
* @param {removeCallback} removeCallback callback that handles removal of the domain object
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function RemoveDialog(dialogService, domainObject, removeCallback) {
|
||||
this.dialogService = dialogService;
|
||||
this.domainObject = domainObject;
|
||||
this.removeCallback = removeCallback;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a dialog to confirm the removal of a domain object.
|
||||
*/
|
||||
RemoveDialog.prototype.show = function () {
|
||||
var dialog,
|
||||
domainObject = this.domainObject,
|
||||
removeCallback = this.removeCallback,
|
||||
model = {
|
||||
title: 'Remove ' + domainObject.getModel().name,
|
||||
actionText: 'Warning! This action will permanently remove this object. Are you sure you want to continue?',
|
||||
severity: 'alert',
|
||||
primaryOption: {
|
||||
label: 'OK',
|
||||
callback: function () {
|
||||
removeCallback(domainObject);
|
||||
dialog.dismiss();
|
||||
}
|
||||
},
|
||||
options: [
|
||||
{
|
||||
label: 'Cancel',
|
||||
callback: function () {
|
||||
dialog.dismiss();
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
dialog = this.dialogService.showBlockingMessage(model);
|
||||
};
|
||||
|
||||
return RemoveDialog;
|
||||
});
|
@ -77,14 +77,19 @@ define([], function () {
|
||||
return promiseFn().then(nextFn);
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Clear any existing persistence calls for object with given ID. This ensures only the most recent persistence
|
||||
* call is executed. This should prevent stale objects being persisted and overwriting fresh ones.
|
||||
*/
|
||||
if (this.isScheduled(id)) {
|
||||
this.clearTransactionsFor(id);
|
||||
}
|
||||
|
||||
if (!this.isScheduled(id)) {
|
||||
this.clearTransactionFns[id] =
|
||||
this.transactionService.addToTransaction(
|
||||
chain(onCommit, release),
|
||||
chain(onCancel, release)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -25,50 +25,37 @@ define(
|
||||
function (RemoveAction) {
|
||||
|
||||
describe("The Remove action", function () {
|
||||
var mockQ,
|
||||
mockNavigationService,
|
||||
mockDomainObject,
|
||||
mockParent,
|
||||
mockChildObject,
|
||||
mockGrandchildObject,
|
||||
mockRootObject,
|
||||
mockContext,
|
||||
mockChildContext,
|
||||
mockGrandchildContext,
|
||||
mockRootContext,
|
||||
mockMutation,
|
||||
mockType,
|
||||
var action,
|
||||
actionContext,
|
||||
model,
|
||||
capabilities,
|
||||
action;
|
||||
|
||||
function mockPromise(value) {
|
||||
return {
|
||||
then: function (callback) {
|
||||
return mockPromise(callback(value));
|
||||
}
|
||||
};
|
||||
}
|
||||
mockContext,
|
||||
mockDialogService,
|
||||
mockDomainObject,
|
||||
mockMutation,
|
||||
mockNavigationService,
|
||||
mockParent,
|
||||
mockType,
|
||||
model;
|
||||
|
||||
beforeEach(function () {
|
||||
mockDomainObject = jasmine.createSpyObj(
|
||||
"domainObject",
|
||||
["getId", "getCapability"]
|
||||
["getId", "getCapability", "getModel"]
|
||||
);
|
||||
mockChildObject = jasmine.createSpyObj(
|
||||
"domainObject",
|
||||
["getId", "getCapability"]
|
||||
);
|
||||
mockGrandchildObject = jasmine.createSpyObj(
|
||||
"domainObject",
|
||||
["getId", "getCapability"]
|
||||
);
|
||||
mockRootObject = jasmine.createSpyObj(
|
||||
"domainObject",
|
||||
["getId", "getCapability"]
|
||||
);
|
||||
mockQ = { when: mockPromise };
|
||||
|
||||
mockMutation = jasmine.createSpyObj("mutation", ["invoke"]);
|
||||
mockType = jasmine.createSpyObj("type", ["hasFeature"]);
|
||||
mockType.hasFeature.and.returnValue(true);
|
||||
|
||||
capabilities = {
|
||||
mutation: mockMutation,
|
||||
type: mockType
|
||||
};
|
||||
|
||||
model = {
|
||||
composition: ["a", "test", "b"]
|
||||
};
|
||||
|
||||
mockParent = {
|
||||
getModel: function () {
|
||||
return model;
|
||||
@ -80,12 +67,12 @@ define(
|
||||
return capabilities[k].invoke(v);
|
||||
}
|
||||
};
|
||||
mockContext = jasmine.createSpyObj("context", ["getParent"]);
|
||||
mockChildContext = jasmine.createSpyObj("context", ["getParent"]);
|
||||
mockGrandchildContext = jasmine.createSpyObj("context", ["getParent"]);
|
||||
mockRootContext = jasmine.createSpyObj("context", ["getParent"]);
|
||||
mockMutation = jasmine.createSpyObj("mutation", ["invoke"]);
|
||||
mockType = jasmine.createSpyObj("type", ["hasFeature"]);
|
||||
|
||||
mockDialogService = jasmine.createSpyObj(
|
||||
"dialogService",
|
||||
["showBlockingMessage"]
|
||||
);
|
||||
|
||||
mockNavigationService = jasmine.createSpyObj(
|
||||
"navigationService",
|
||||
[
|
||||
@ -97,23 +84,19 @@ define(
|
||||
);
|
||||
mockNavigationService.getNavigation.and.returnValue(mockDomainObject);
|
||||
|
||||
mockContext = jasmine.createSpyObj("context", ["getParent"]);
|
||||
mockContext.getParent.and.returnValue(mockParent);
|
||||
|
||||
mockDomainObject.getId.and.returnValue("test");
|
||||
mockDomainObject.getCapability.and.returnValue(mockContext);
|
||||
mockDomainObject.getModel.and.returnValue({name: 'test object'});
|
||||
|
||||
mockContext.getParent.and.returnValue(mockParent);
|
||||
mockType.hasFeature.and.returnValue(true);
|
||||
|
||||
capabilities = {
|
||||
mutation: mockMutation,
|
||||
type: mockType
|
||||
};
|
||||
model = {
|
||||
composition: ["a", "test", "b"]
|
||||
};
|
||||
|
||||
actionContext = { domainObject: mockDomainObject };
|
||||
|
||||
action = new RemoveAction(mockNavigationService, actionContext);
|
||||
action = new RemoveAction(mockDialogService, mockNavigationService, actionContext);
|
||||
});
|
||||
|
||||
it("only applies to objects with parents", function () {
|
||||
@ -127,15 +110,84 @@ define(
|
||||
expect(mockType.hasFeature).toHaveBeenCalledWith('creation');
|
||||
});
|
||||
|
||||
it("shows a blocking message dialog", function () {
|
||||
mockParent = jasmine.createSpyObj(
|
||||
"parent",
|
||||
["getModel", "getCapability", "useCapability"]
|
||||
);
|
||||
|
||||
action.perform();
|
||||
|
||||
expect(mockDialogService.showBlockingMessage).toHaveBeenCalled();
|
||||
|
||||
// Also check that no mutation happens at this point
|
||||
expect(mockParent.useCapability).not.toHaveBeenCalledWith("mutation", jasmine.any(Function));
|
||||
});
|
||||
|
||||
it("does not show a blocking message dialog when true is passed to perform", function () {
|
||||
mockParent = jasmine.createSpyObj(
|
||||
"parent",
|
||||
["getModel", "getCapability", "useCapability"]
|
||||
);
|
||||
|
||||
action.perform(true);
|
||||
|
||||
expect(mockDialogService.showBlockingMessage).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
describe("after the remove callback is triggered", function () {
|
||||
var mockChildContext,
|
||||
mockChildObject,
|
||||
mockDialogHandle,
|
||||
mockGrandchildContext,
|
||||
mockGrandchildObject,
|
||||
mockRootContext,
|
||||
mockRootObject;
|
||||
|
||||
beforeEach(function () {
|
||||
mockChildObject = jasmine.createSpyObj(
|
||||
"domainObject",
|
||||
["getId", "getCapability"]
|
||||
);
|
||||
|
||||
mockDialogHandle = jasmine.createSpyObj(
|
||||
"dialogHandle",
|
||||
["dismiss"]
|
||||
);
|
||||
|
||||
mockGrandchildObject = jasmine.createSpyObj(
|
||||
"domainObject",
|
||||
["getId", "getCapability"]
|
||||
);
|
||||
|
||||
mockRootObject = jasmine.createSpyObj(
|
||||
"domainObject",
|
||||
["getId", "getCapability"]
|
||||
);
|
||||
|
||||
mockChildContext = jasmine.createSpyObj("context", ["getParent"]);
|
||||
mockGrandchildContext = jasmine.createSpyObj("context", ["getParent"]);
|
||||
mockRootContext = jasmine.createSpyObj("context", ["getParent"]);
|
||||
|
||||
mockDialogService.showBlockingMessage.and.returnValue(mockDialogHandle);
|
||||
});
|
||||
|
||||
it("mutates the parent when performed", function () {
|
||||
action.perform();
|
||||
mockDialogService.showBlockingMessage.calls.mostRecent().args[0]
|
||||
.primaryOption.callback();
|
||||
|
||||
expect(mockMutation.invoke)
|
||||
.toHaveBeenCalledWith(jasmine.any(Function));
|
||||
});
|
||||
|
||||
it("changes composition from its mutation function", function () {
|
||||
var mutator, result;
|
||||
|
||||
action.perform();
|
||||
mockDialogService.showBlockingMessage.calls.mostRecent().args[0]
|
||||
.primaryOption.callback();
|
||||
|
||||
mutator = mockMutation.invoke.calls.mostRecent().args[0];
|
||||
result = mutator(model);
|
||||
|
||||
@ -171,6 +223,8 @@ define(
|
||||
mockType.hasFeature.and.returnValue(true);
|
||||
|
||||
action.perform();
|
||||
mockDialogService.showBlockingMessage.calls.mostRecent().args[0]
|
||||
.primaryOption.callback();
|
||||
|
||||
// Expects navigation to parent of domainObject (removed object)
|
||||
expect(mockNavigationService.setNavigation).toHaveBeenCalledWith(mockParent);
|
||||
@ -199,11 +253,14 @@ define(
|
||||
mockType.hasFeature.and.returnValue(true);
|
||||
|
||||
action.perform();
|
||||
mockDialogService.showBlockingMessage.calls.mostRecent().args[0]
|
||||
.primaryOption.callback();
|
||||
|
||||
// Expects no navigation to occur
|
||||
expect(mockNavigationService.setNavigation).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
|
@ -93,24 +93,33 @@ define(
|
||||
expect(mockOnCancel).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("ignores subsequent calls for the same object", function () {
|
||||
describe("Adds callbacks to transaction", function () {
|
||||
beforeEach(function () {
|
||||
spyOn(manager, 'clearTransactionsFor');
|
||||
manager.clearTransactionsFor.and.callThrough();
|
||||
});
|
||||
|
||||
it("and clears pending calls if same object", function () {
|
||||
manager.addToTransaction(
|
||||
testId,
|
||||
jasmine.createSpy(),
|
||||
jasmine.createSpy()
|
||||
);
|
||||
expect(mockTransactionService.addToTransaction.calls.count())
|
||||
.toEqual(1);
|
||||
expect(manager.clearTransactionsFor).toHaveBeenCalledWith(testId);
|
||||
});
|
||||
|
||||
it("accepts subsequent calls for other objects", function () {
|
||||
it("and does not clear pending calls if different object", function () {
|
||||
manager.addToTransaction(
|
||||
'other-id',
|
||||
jasmine.createSpy(),
|
||||
jasmine.createSpy()
|
||||
);
|
||||
expect(mockTransactionService.addToTransaction.calls.count())
|
||||
.toEqual(2);
|
||||
expect(manager.clearTransactionsFor).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
expect(mockTransactionService.addToTransaction.calls.count()).toEqual(2);
|
||||
});
|
||||
});
|
||||
|
||||
it("does not remove callbacks from the transaction", function () {
|
||||
|
@ -34,7 +34,6 @@ define([
|
||||
"./src/controllers/ContextMenuController",
|
||||
"./src/controllers/ClickAwayController",
|
||||
"./src/controllers/ViewSwitcherController",
|
||||
"./src/controllers/BottomBarController",
|
||||
"./src/controllers/GetterSetterController",
|
||||
"./src/controllers/SelectorController",
|
||||
"./src/controllers/ObjectInspectorController",
|
||||
@ -49,13 +48,14 @@ define([
|
||||
"./src/directives/MCTSplitPane",
|
||||
"./src/directives/MCTSplitter",
|
||||
"./src/directives/MCTTree",
|
||||
"./src/directives/MCTIndicators",
|
||||
"./src/directives/MCTPreview",
|
||||
"./src/actions/MCTPreviewAction",
|
||||
"./src/filters/ReverseFilter",
|
||||
"text!./res/templates/bottombar.html",
|
||||
"text!./res/templates/controls/action-button.html",
|
||||
"text!./res/templates/controls/input-filter.html",
|
||||
"text!./res/templates/indicator.html",
|
||||
"text!./res/templates/angular-indicator.html",
|
||||
"text!./res/templates/message-banner.html",
|
||||
"text!./res/templates/progress-bar.html",
|
||||
"text!./res/templates/controls/time-controller.html",
|
||||
@ -87,7 +87,6 @@ define([
|
||||
ContextMenuController,
|
||||
ClickAwayController,
|
||||
ViewSwitcherController,
|
||||
BottomBarController,
|
||||
GetterSetterController,
|
||||
SelectorController,
|
||||
ObjectInspectorController,
|
||||
@ -102,6 +101,7 @@ define([
|
||||
MCTSplitPane,
|
||||
MCTSplitter,
|
||||
MCTTree,
|
||||
MCTIndicators,
|
||||
MCTPreview,
|
||||
MCTPreviewAction,
|
||||
ReverseFilter,
|
||||
@ -281,13 +281,6 @@ define([
|
||||
"$timeout"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "BottomBarController",
|
||||
"implementation": BottomBarController,
|
||||
"depends": [
|
||||
"indicators[]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "GetterSetterController",
|
||||
"implementation": GetterSetterController,
|
||||
@ -403,6 +396,11 @@ define([
|
||||
"implementation": MCTTree,
|
||||
"depends": ['gestureService', 'openmct']
|
||||
},
|
||||
{
|
||||
"key": "mctIndicators",
|
||||
"implementation": MCTIndicators,
|
||||
"depends": ['openmct']
|
||||
},
|
||||
{
|
||||
"key": "mctPreview",
|
||||
"implementation": MCTPreview,
|
||||
|
@ -42,6 +42,7 @@
|
||||
@import "controls/lists";
|
||||
@import "controls/menus";
|
||||
@import "controls/messages";
|
||||
@import "controls/indicators";
|
||||
@import "mobile/controls/menus";
|
||||
|
||||
/********************************* FORMS */
|
||||
|
@ -20,66 +20,120 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*************************************************** MIXINS */
|
||||
@mixin formulateStatusColors($c) {
|
||||
@mixin elementStatusColors($c) {
|
||||
// Sets bg and icon colors for elements
|
||||
background: rgba($c, 0.4) !important;
|
||||
&:before { color: $c !important; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************************** GENERAL */
|
||||
.s-limit-yellow,
|
||||
.s-limit-red,
|
||||
.s-limit-yellow-icon,
|
||||
.s-limit-red-icon,
|
||||
.s-status-warning-lo,
|
||||
.s-status-warning-hi,
|
||||
.s-status-diagnostic,
|
||||
.s-status-command,
|
||||
.s-status-info,
|
||||
.s-status-ok,
|
||||
.s-status-warning-lo-icon,
|
||||
.s-status-warning-hi-icon,
|
||||
.s-status-diagnostic-icon,
|
||||
.s-status-command-icon,
|
||||
.s-status-info-icon,
|
||||
.s-status-ok-icon {
|
||||
@include trans-prop-nice($props: background, $dur: 500ms);
|
||||
background: rgba($c, 0.5) !important;
|
||||
&:before {
|
||||
content:'';
|
||||
font-family: symbolsfont;
|
||||
font-size: 0.8em;
|
||||
margin-right: $interiorMarginSm;
|
||||
color: $c !important;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin indicatorStatusColors($c) {
|
||||
&:before, .count {
|
||||
color: $c;
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************** GENERAL */
|
||||
.s-limit-upr,
|
||||
.s-limit-lwr,
|
||||
[class*='s-limit-icon'],
|
||||
[class*='s-status-icon'] {
|
||||
&:before {
|
||||
content:'';
|
||||
display: inline-block;
|
||||
font-family: symbolsfont;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************** LIMITS */
|
||||
.s-limit-yellow, .s-limit-yellow-icon {
|
||||
@include formulateStatusColors($colorWarningLo);
|
||||
[class*='s-limit'] {
|
||||
&[class*='icon-'] {
|
||||
&:before {
|
||||
margin-right: $interiorMargin;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.s-limit-red, .s-limit-red-icon {
|
||||
@include formulateStatusColors($colorWarningHi);
|
||||
.s-limit-yellow, .s-limit-icon-yellow {
|
||||
@include elementStatusColors($colorWarningLo);
|
||||
}
|
||||
|
||||
.s-limit-upr:before { content: $glyph-icon-arrow-double-up; }
|
||||
.s-limit-lwr:before { content: $glyph-icon-arrow-double-down; }
|
||||
.s-limit-yellow-icon:before,
|
||||
.s-limit-red-icon:before { content: $glyph-icon-alert-triangle; }
|
||||
.s-limit-red, .s-limit-icon-red {
|
||||
@include elementStatusColors($colorWarningHi);
|
||||
}
|
||||
|
||||
.s-limit {
|
||||
&-upr,
|
||||
&-lwr {
|
||||
&:before {
|
||||
margin-right: $interiorMargin;
|
||||
}
|
||||
}
|
||||
|
||||
&-upr:before { content: $glyph-icon-arrow-double-up; }
|
||||
&-lwr:before { content: $glyph-icon-arrow-double-down; }
|
||||
|
||||
&-icon-yellow,
|
||||
&-icon-red {
|
||||
&:before {
|
||||
content: $glyph-icon-alert-triangle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************** STATUS */
|
||||
.s-status-warning-hi, .s-status-warning-hi-icon { @include formulateStatusColors($colorWarningHi); }
|
||||
.s-status-warning-lo, .s-status-warning-lo-icon { @include formulateStatusColors($colorWarningLo); }
|
||||
.s-status-diagnostic, .s-status-diagnostic-icon { @include formulateStatusColors($colorDiagnostic); }
|
||||
.s-status-info, .s-status-info-icon { @include formulateStatusColors($colorInfo); }
|
||||
.s-status-ok, .s-status-ok-icon { @include formulateStatusColors($colorOk); }
|
||||
[class*='s-status'] {
|
||||
&[class*='icon-'] {
|
||||
&:before {
|
||||
margin-right: $interiorMargin;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.s-status-warning-hi-icon:before { content: $glyph-icon-alert-triangle; }
|
||||
.s-status-warning-lo-icon:before { content: $glyph-icon-alert-rect; }
|
||||
.s-status-diagnostic-icon:before { content: $glyph-icon-eye-open; }
|
||||
.s-status-info-icon:before { content: $glyph-icon-info; }
|
||||
.s-status-ok-icon:before { content: $glyph-icon-check; }
|
||||
.s-status-warning-hi, .s-status-icon-warning-hi { @include elementStatusColors($colorWarningHi); }
|
||||
.s-status-warning-lo, .s-status-icon-warning-lo { @include elementStatusColors($colorWarningLo); }
|
||||
.s-status-diagnostic, .s-status-icon-diagnostic { @include elementStatusColors($colorDiagnostic); }
|
||||
.s-status-info, .s-status-icon-info { @include elementStatusColors($colorInfo); }
|
||||
.s-status-ok, .s-status-icon-ok { @include elementStatusColors($colorOk); }
|
||||
|
||||
.s-status-icon-warning-hi:before { content: $glyph-icon-alert-triangle; }
|
||||
.s-status-icon-warning-lo:before { content: $glyph-icon-alert-rect; }
|
||||
.s-status-icon-diagnostic:before { content: $glyph-icon-eye-open; }
|
||||
.s-status-icon-info:before { content: $glyph-icon-info; }
|
||||
.s-status-icon-ok:before { content: $glyph-icon-check; }
|
||||
|
||||
/*************************************************** INDICATOR COLORING */
|
||||
.ls-indicator {
|
||||
&.s-status-info {
|
||||
@include indicatorStatusColors($colorInfo);
|
||||
}
|
||||
|
||||
&.s-status-disabled {
|
||||
@include indicatorStatusColors($colorIndicatorDisabled);
|
||||
}
|
||||
|
||||
&.s-status-available {
|
||||
@include indicatorStatusColors($colorIndicatorAvailable);
|
||||
}
|
||||
|
||||
&.s-status-on,
|
||||
&.s-status-enabled {
|
||||
@include indicatorStatusColors($colorIndicatorOn);
|
||||
}
|
||||
|
||||
&.s-status-off {
|
||||
@include indicatorStatusColors($colorIndicatorOff);
|
||||
}
|
||||
|
||||
&.s-status-caution,
|
||||
&.s-status-warning,
|
||||
&.s-status-alert {
|
||||
@include indicatorStatusColors($colorStatusAlert);
|
||||
}
|
||||
|
||||
&.s-status-error {
|
||||
@include indicatorStatusColors($colorStatusError);
|
||||
}
|
||||
}
|
||||
|
@ -133,19 +133,11 @@
|
||||
/******************************************************** LOCAL CONTROLS */
|
||||
// Controls placed in proximity to or overlaid on components and views
|
||||
|
||||
.local-controls-persist {
|
||||
|
||||
}
|
||||
|
||||
.local-controls-hidden {
|
||||
// Used within .has-local-controls, hidden by default
|
||||
|
||||
}
|
||||
|
||||
.local-controls-flyout {
|
||||
|
||||
}
|
||||
|
||||
body.desktop .has-local-controls {
|
||||
// Helper class, provides hover ability to show local controls
|
||||
|
||||
@ -156,7 +148,7 @@ body.desktop .has-local-controls {
|
||||
}
|
||||
|
||||
.local-controls-hidden {
|
||||
@include trans-prop-nice($props: opacity, $dur: 1000ms);
|
||||
@include trans-prop-nice($props: opacity, $dur: 500ms);
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
@ -211,6 +203,7 @@ body.desktop .has-local-controls {
|
||||
cursor: pointer;
|
||||
height: 1em; width: 1em;
|
||||
line-height: inherit;
|
||||
position: relative;
|
||||
&:before {
|
||||
position: absolute;
|
||||
@include trans-prop-nice(transform, 100ms);
|
||||
|
157
platform/commonUI/general/res/sass/controls/_indicators.scss
Normal file
@ -0,0 +1,157 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, 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.
|
||||
*****************************************************************************/
|
||||
|
||||
/* Indicators are generally only displayed in the ue-bottom-bar element of the main interface */
|
||||
|
||||
.h-indicator,
|
||||
mct-indicators mct-include {
|
||||
display: inline; // Fallback for display: contents
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.ls-indicator {
|
||||
$bg: rgba(white, 0.2) !important;
|
||||
$hbg: $colorStatusBarBg;
|
||||
$hshdw: rgba(white, 0.4) 0 0 3px;
|
||||
$br: $controlCr;
|
||||
$hoverYOffset: -35px;
|
||||
background: transparent !important;
|
||||
border-radius: $br;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
padding: 1px $interiorMarginSm; // Use padding instead of margin to keep hover chatter to a minimum
|
||||
|
||||
&:before {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.label {
|
||||
display: inline-block;
|
||||
a,
|
||||
button,
|
||||
.s-button {
|
||||
// Make <a> in label look like buttons
|
||||
@include trans-prop-nice($props: all, $dur: 100ms);
|
||||
background: transparent;
|
||||
border: 1px solid rgba($colorStatusBarFg, 0.5);
|
||||
border-radius: $br;
|
||||
box-sizing: border-box;
|
||||
color: inherit;
|
||||
font-size: inherit;
|
||||
height: auto;
|
||||
line-height: normal;
|
||||
padding: 0 2px;
|
||||
&:hover {
|
||||
background: $bg;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
[class*='icon-'] {
|
||||
// If any elements within label include the class 'icon-*' then deal with their :before's
|
||||
&:before {
|
||||
font-size: 0.8em;
|
||||
margin-right: $interiorMarginSm;
|
||||
}
|
||||
}
|
||||
|
||||
button { text-transform: uppercase !important; }
|
||||
}
|
||||
|
||||
&.no-collapse {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
align-items: center;
|
||||
|
||||
> *,
|
||||
&:before {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
&:before {
|
||||
margin-right: $interiorMarginSm;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.no-collapse) {
|
||||
z-index: 0;
|
||||
|
||||
&:before {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
|
||||
.label {
|
||||
transition: all 250ms ease-in 100ms;
|
||||
background: $hbg;
|
||||
border-radius: $br;
|
||||
font-size: .6rem;
|
||||
left: 0;
|
||||
bottom: 140%;
|
||||
opacity: 0;
|
||||
padding: $interiorMarginSm $interiorMargin;
|
||||
position: absolute;
|
||||
transform-origin: 10px 100%;
|
||||
transform: scale(0.0);
|
||||
white-space: nowrap;
|
||||
&:before {
|
||||
// Infobubble-style arrow element
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
@include triangle('down', $size: 4px, $ratio: 1, $color: $hbg);
|
||||
}
|
||||
|
||||
&:after {
|
||||
// Hit area
|
||||
$p: -7px;
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: $p; right: $p; bottom: $p; left: $p;
|
||||
z-index: -1;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: $bg;
|
||||
z-index: 1;
|
||||
.label {
|
||||
opacity: 1;
|
||||
transform: scale(1.0);
|
||||
transition: all 100ms ease-out 0s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.float-right {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
/* Mobile */
|
||||
// Hide the clock indicator when we're phone portrait
|
||||
body.phone.portrait {
|
||||
.ls-indicator.t-indicator-clock {
|
||||
display: none;
|
||||
}
|
||||
}
|
@ -19,9 +19,9 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/******************************************************************* STATUS BLOCK ELEMS */
|
||||
|
||||
@mixin statusBannerColors($bg, $fg: $colorStatusFg) {
|
||||
$bgPb: 30%;
|
||||
$bgPb: 10%;
|
||||
$bgPbD: 10%;
|
||||
background-color: darken($bg, $bgPb);
|
||||
color: $fg;
|
||||
@ -36,110 +36,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Status coloring
|
||||
.ok, .info {
|
||||
.status-indicator {
|
||||
color: $colorInfo;
|
||||
}
|
||||
}
|
||||
|
||||
.alert, .caution, .warning {
|
||||
.status-indicator, .count {
|
||||
color: $colorStatusAlert;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.error, .err {
|
||||
.status-indicator, .count {
|
||||
color: $colorStatusError;
|
||||
}
|
||||
}
|
||||
|
||||
.available {
|
||||
.status-indicator, .count {
|
||||
color: $colorStatusAvailable;
|
||||
}
|
||||
}
|
||||
|
||||
.subdued {
|
||||
.status-indicator {
|
||||
color: pullForward($colorStatusBarBg, 40%);
|
||||
}
|
||||
}
|
||||
|
||||
.status-block-holder {
|
||||
// Applied to mct-include element
|
||||
// Contains status.block elements
|
||||
$transDelay: 1.5s;
|
||||
$transSpeed: .25s;
|
||||
display: inline-block;
|
||||
&.clickable { cursor: pointer; }
|
||||
&:not(.clickable) { cursor: default; }
|
||||
&.no-icon .status.block {
|
||||
.status-indicator {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
&.float-right {
|
||||
float: right;
|
||||
}
|
||||
&:not(.no-collapse) .status.block {
|
||||
.label {
|
||||
// Max-width silliness is necessary for width transition
|
||||
@include trans-prop-nice(max-width, $transSpeed, $transDelay);
|
||||
overflow: hidden;
|
||||
max-width: 0px;
|
||||
}
|
||||
&:hover {
|
||||
.label {
|
||||
@include trans-prop-nice(max-width, $transSpeed, 0s);
|
||||
max-width: 600px;
|
||||
width: auto;
|
||||
}
|
||||
.count {
|
||||
@include trans-prop-nice(max-width, $transSpeed, 0s);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.status.block {
|
||||
$transDelay: 1.5s;
|
||||
$transSpeed: .25s;
|
||||
color: $colorStatusDefault;
|
||||
display: inline-block;
|
||||
margin-right: $interiorMargin;
|
||||
.status-indicator,
|
||||
.label,
|
||||
.count {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.status-indicator {
|
||||
background: none !important;
|
||||
margin-right: $interiorMarginSm;
|
||||
&[class*='s-status']:before {
|
||||
font-size: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
.count {
|
||||
@include trans-prop-nice(opacity, $transSpeed, $transDelay);
|
||||
font-weight: bold;
|
||||
opacity: 1;
|
||||
}
|
||||
.s-button {
|
||||
background: $colorStatusBtnBg;
|
||||
padding: 0 $interiorMargin;
|
||||
height: auto;
|
||||
line-height: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************* MESSAGE BANNERS */
|
||||
.message {
|
||||
&.block {
|
||||
@ -289,7 +185,6 @@
|
||||
|
||||
> div,
|
||||
> span {
|
||||
//@include test(red);
|
||||
margin-bottom: $interiorMargin;
|
||||
}
|
||||
|
||||
|
@ -51,11 +51,8 @@
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.gl-plot {
|
||||
color: $colorPlotFg;
|
||||
display: flex;
|
||||
@ -74,7 +71,8 @@
|
||||
position: absolute;
|
||||
display: block;
|
||||
font-size: 1.5em;
|
||||
top: $interiorMarginSm; left: $interiorMarginSm;
|
||||
top: $interiorMarginSm;
|
||||
left: $interiorMarginSm;
|
||||
}
|
||||
}
|
||||
|
||||
@ -192,13 +190,13 @@
|
||||
|
||||
.gl-plot-hash {
|
||||
position: absolute;
|
||||
border: 0 $colorPlotHash $stylePlotHash;
|
||||
opacity: $opacityPlotHash;
|
||||
&.hash-v {
|
||||
border-right-width: 1px;
|
||||
border-right: 1px $colorPlotHash $stylePlotHash;
|
||||
height: 100%;
|
||||
}
|
||||
&.hash-h {
|
||||
border-bottom-width: 1px;
|
||||
border-bottom: 1px $colorPlotHash $stylePlotHash;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@ -221,8 +219,12 @@
|
||||
|
||||
height: auto;
|
||||
z-index: 0;
|
||||
&.s-limit-yellow { @include limitBg($colorLimitYellowBg); }
|
||||
&.s-limit-red { @include limitBg($colorLimitRedBg); }
|
||||
&.s-limit-yellow {
|
||||
@include limitBg($colorLimitYellowBg);
|
||||
}
|
||||
&.s-limit-red {
|
||||
@include limitBg($colorLimitRedBg);
|
||||
}
|
||||
}
|
||||
|
||||
.l-oob-data {
|
||||
@ -246,10 +248,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.gl-plot-display-area,
|
||||
.plot-display-area {
|
||||
@if $colorPlotBg != none { background-color: $colorPlotBg; }
|
||||
@if $colorPlotBg != none {
|
||||
background-color: $colorPlotBg;
|
||||
}
|
||||
cursor: crosshair;
|
||||
border: 1px solid $colorPlotAreaBorder;
|
||||
}
|
||||
@ -265,7 +268,6 @@
|
||||
|
||||
.gl-plot-tick,
|
||||
.tick-label {
|
||||
@include reverseEllipsis();
|
||||
font-size: 0.7rem;
|
||||
position: absolute;
|
||||
&.gl-plot-x-tick-label,
|
||||
@ -303,6 +305,74 @@
|
||||
top: 0;
|
||||
}
|
||||
&.tick-label-y {
|
||||
right: 0; left: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.export-plot {
|
||||
$bg: white;
|
||||
$fg: black;
|
||||
$gry: #999;
|
||||
|
||||
background: $bg !important;
|
||||
z-index: -10;
|
||||
|
||||
.l-view-section {
|
||||
$m: $interiorMargin;
|
||||
top: $m !important;
|
||||
right: $m;
|
||||
bottom: $m;
|
||||
left: $m;
|
||||
|
||||
.s-status-timeconductor-unsynced .holder-plot {
|
||||
.t-object-alert.t-alert-unsynced {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.gl-plot-display-area {
|
||||
background: none !important;
|
||||
border-color: $gry !important;
|
||||
|
||||
.gl-plot-local-controls,
|
||||
.h-local-controls {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.gl-plot {
|
||||
color: $fg;
|
||||
|
||||
.gl-plot-hash {
|
||||
opacity: 0.1;
|
||||
border-color: $fg;
|
||||
}
|
||||
}
|
||||
|
||||
table {
|
||||
thead {
|
||||
border-bottom: none;
|
||||
|
||||
th {
|
||||
background: #eee;
|
||||
border-left-color: $bg;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
tr {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
tbody {
|
||||
tr {
|
||||
border-top: 1px solid #ccc;
|
||||
}
|
||||
|
||||
td {
|
||||
color: $fg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -97,6 +97,7 @@ input.c-search__search-input {
|
||||
box-shadow: none !important; // !important needed to override default for [input]
|
||||
flex: 1 1 99%;
|
||||
min-width: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.c-search__search-menu-holder {
|
||||
@ -109,6 +110,10 @@ input.c-search__search-input {
|
||||
.holder-search {
|
||||
$iconWidth: 20px;
|
||||
|
||||
.c-search-btn-wrapper {
|
||||
margin-right: $interiorMarginLg; // Fend off rights side from pane splitter control
|
||||
}
|
||||
|
||||
.results-msg {
|
||||
font-size: 0.8rem;
|
||||
opacity: 0.6;
|
||||
|
@ -47,6 +47,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.status-holder {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.s-ue-bottom-bar {
|
||||
background: $colorStatusBarBg;
|
||||
color: $colorStatusBarFg;
|
||||
cursor: default;
|
||||
font-size: .7rem;
|
||||
}
|
||||
|
||||
.user-environ {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
@ -81,21 +93,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
.ue-bottom-bar {
|
||||
@include absPosDefault(0);// New status bar design
|
||||
.l-ue-bottom-bar {
|
||||
$m: $interiorMarginSm;
|
||||
@include absPosDefault(0, $overflow: visible);// New status bar design
|
||||
top: auto;
|
||||
height: $ueFooterH;
|
||||
line-height: $ueFooterH - ($interiorMargin * 2);
|
||||
background: $colorStatusBarBg;
|
||||
color: lighten($colorBodyBg, 30%);
|
||||
font-size: .7rem;
|
||||
line-height: $ueFooterH - ($m * 2);
|
||||
.status-holder {
|
||||
box-sizing: border-box;
|
||||
@include absPosDefault($interiorMargin);
|
||||
@include ellipsize();
|
||||
@include absPosDefault($m, $overflow: visible);
|
||||
right: 120px;
|
||||
text-transform: uppercase;
|
||||
z-index: 1;
|
||||
z-index: 10;
|
||||
}
|
||||
.app-logo {
|
||||
background-position: right center;
|
||||
|
@ -20,14 +20,8 @@
|
||||
at runtime from the About dialog for additional information.
|
||||
-->
|
||||
<!-- DO NOT ADD SPACES BETWEEN THE SPANS - IT ADDS WHITE SPACE!! -->
|
||||
<div class='status block'
|
||||
<div class="ls-indicator {{ngModel.getCssClass()}}"
|
||||
title="{{ngModel.getDescription()}}"
|
||||
ng-click='ngModel.configure()'
|
||||
ng-show="ngModel.getText().length > 0">
|
||||
<span class="status-indicator {{ngModel.getCssClass()}}"></span><span class="label"
|
||||
ng-class='ngModel.getTextClass()'>
|
||||
{{ngModel.getText()}}
|
||||
<a class="s-button icon-gear" ng-if="ngModel.configure"></a>
|
||||
</span><span class="count">
|
||||
</span>
|
||||
<span class="label">{{ngModel.getText()}}</span>
|
||||
</div>
|
@ -19,14 +19,9 @@
|
||||
this source code distribution or the Licensing information page available
|
||||
at runtime from the About dialog for additional information.
|
||||
-->
|
||||
<div class='abs bottom-bar ue-bottom-bar mobile-disable-select' ng-controller="BottomBarController as bar">
|
||||
<div class='abs bottom-bar l-ue-bottom-bar s-ue-bottom-bar mobile-disable-select'>
|
||||
<div id='status' class='status-holder'>
|
||||
<mct-include ng-repeat="indicator in bar.getIndicators()"
|
||||
ng-model="indicator.ngModel"
|
||||
key="indicator.template"
|
||||
class="status-block-holder"
|
||||
ng-class='indicator.ngModel.getGlyphClass()'>
|
||||
</mct-include>
|
||||
<mct-indicators></mct-indicators>
|
||||
</div>
|
||||
<mct-include key="'message-banner'"></mct-include>
|
||||
<mct-include key="'about-logo'"></mct-include>
|
||||
|
@ -1,59 +0,0 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, 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.
|
||||
*****************************************************************************/
|
||||
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
|
||||
/**
|
||||
* Controller for the bottombar template. Exposes
|
||||
* available indicators (of extension category "indicators")
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*/
|
||||
function BottomBarController(indicators) {
|
||||
// Utility function used to make indicators presentable
|
||||
// for display.
|
||||
function present(Indicator) {
|
||||
return {
|
||||
template: Indicator.template || "indicator",
|
||||
ngModel: typeof Indicator === 'function' ?
|
||||
new Indicator() : Indicator
|
||||
};
|
||||
}
|
||||
|
||||
this.indicators = indicators.map(present);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all indicators to display.
|
||||
* @returns {Indicator[]} all indicators
|
||||
* to display in the bottom bar.
|
||||
* @memberof platform/commonUI/general.BottomBarController#
|
||||
*/
|
||||
BottomBarController.prototype.getIndicators = function () {
|
||||
return this.indicators;
|
||||
};
|
||||
|
||||
return BottomBarController;
|
||||
}
|
||||
);
|
@ -19,16 +19,22 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define([
|
||||
<%= implPaths %>
|
||||
'legacyRegistry'
|
||||
], function (
|
||||
<%= implNames %>
|
||||
legacyRegistry
|
||||
) {
|
||||
"use strict";
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
function MCTIndicators(openmct) {
|
||||
return {
|
||||
restrict: "E",
|
||||
link: function link(scope, element) {
|
||||
openmct.indicators.indicatorElements
|
||||
.forEach(function (indicatorElement) {
|
||||
element.append(indicatorElement);
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
legacyRegistry.register("<%= bundleName %>", <%= bundleContents %>);
|
||||
});
|
||||
return MCTIndicators;
|
||||
}
|
||||
);
|
@ -1,76 +0,0 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, 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.
|
||||
*****************************************************************************/
|
||||
|
||||
define(
|
||||
["../../src/controllers/BottomBarController"],
|
||||
function (BottomBarController) {
|
||||
|
||||
describe("The bottom bar controller", function () {
|
||||
var testIndicators,
|
||||
testIndicatorA,
|
||||
testIndicatorB,
|
||||
testIndicatorC,
|
||||
mockIndicator,
|
||||
controller;
|
||||
|
||||
beforeEach(function () {
|
||||
mockIndicator = jasmine.createSpyObj(
|
||||
"indicator",
|
||||
["getGlyph", "getCssClass", "getText"]
|
||||
);
|
||||
|
||||
testIndicatorA = {};
|
||||
testIndicatorB = function () {
|
||||
return mockIndicator;
|
||||
};
|
||||
testIndicatorC = { template: "someTemplate" };
|
||||
|
||||
testIndicators = [
|
||||
testIndicatorA,
|
||||
testIndicatorB,
|
||||
testIndicatorC
|
||||
];
|
||||
|
||||
controller = new BottomBarController(testIndicators);
|
||||
});
|
||||
|
||||
it("exposes one indicator description per extension", function () {
|
||||
expect(controller.getIndicators().length)
|
||||
.toEqual(testIndicators.length);
|
||||
});
|
||||
|
||||
it("uses template field provided, or its own default", function () {
|
||||
// "indicator" is the default;
|
||||
// only testIndicatorC overrides this.
|
||||
var indicators = controller.getIndicators();
|
||||
expect(indicators[0].template).toEqual("indicator");
|
||||
expect(indicators[1].template).toEqual("indicator");
|
||||
expect(indicators[2].template).toEqual("someTemplate");
|
||||
});
|
||||
|
||||
it("instantiates indicators given as constructors", function () {
|
||||
// testIndicatorB constructs to mockIndicator
|
||||
expect(controller.getIndicators()[1].ngModel).toBe(mockIndicator);
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
@ -1,9 +1,8 @@
|
||||
<!-- DO NOT ADD SPACES BETWEEN THE SPANS - IT ADDS WHITE SPACE!! -->
|
||||
<a ng-click="showNotificationsList()" ng-show="notifications.length > 0" class="status block"
|
||||
ng-class="highest.severity"
|
||||
<div ng-show="notifications.length > 0" class="ls-indicator s-status-{{highest.severity}} icon-bell"
|
||||
ng-controller="NotificationIndicatorController">
|
||||
<span class="status-indicator icon-bell"></span><span class="label">
|
||||
{{notifications.length}} Notifications
|
||||
<span class="label">
|
||||
<a ng-click="showNotificationsList()">
|
||||
{{notifications.length}} Notification<span ng-show="notifications.length > 1">s</span></a>
|
||||
</span><span class="count">{{notifications.length}}</span>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
|
7
platform/commonUI/themes/espresso/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Espresso Theme
|
||||
Dark theme for the Open MCT user interface.
|
||||
|
||||
## Installation
|
||||
```js
|
||||
openmct.install(openmct.plugins.Espresso());
|
||||
```
|
@ -3,6 +3,8 @@ $colorBodyBg: #333;
|
||||
$colorBodyFg: #999;
|
||||
$colorGenBg: #222;
|
||||
$colorStatusBarBg: #000;
|
||||
$colorStatusBarFg: #999;
|
||||
$colorStatusBarFgHov: #aaa;
|
||||
$colorKey: #0099cc;
|
||||
$colorKeySelectedBg: #005177;
|
||||
$colorKeyFg: #fff;
|
||||
@ -55,7 +57,7 @@ $colorTransLucBg: #666; // Used as a visual blocking element over variable backg
|
||||
|
||||
// Foundation Colors
|
||||
$colorAlt1: #ffc700;
|
||||
$colorAlert: #ff3c00;
|
||||
$colorAlert: #ff9900;
|
||||
$colorWarningHi: #cc0000;
|
||||
$colorWarningLo: #ff9900;
|
||||
$colorDiagnostic: #a4b442;
|
||||
@ -72,7 +74,6 @@ $colorObjHdrTxt: $colorBodyFg;
|
||||
$colorObjHdrIc: lighten($colorObjHdrTxt, 20%);
|
||||
$colorTick: rgba(white, 0.2);
|
||||
$colorSelectableSelectedPrimary: $colorKey;
|
||||
//$colorSelectableSelectedSecondary: pushBack($colorSelectableSelectedPrimary, 20%);
|
||||
$colorSelectableHov: rgba($colorBodyFg, 0.3);
|
||||
|
||||
// Menu colors
|
||||
@ -114,11 +115,10 @@ $colorInspectorSectionHeaderFg: pullForward($colorInspectorBg, 40%);
|
||||
|
||||
// Status colors, mainly used for messaging and item ancillary symbols
|
||||
$colorStatusFg: #ccc;
|
||||
$colorStatusDefault: #ccc;
|
||||
$colorStatusDefault: #999;
|
||||
$colorStatusInfo: $colorInfo;
|
||||
$colorStatusAlert: $colorAlert;
|
||||
$colorStatusError: #d4585c;
|
||||
$colorStatusAvailable: $colorKey;
|
||||
$colorStatusError: #da0004;
|
||||
$colorStatusBtnBg: $colorBtnBg;
|
||||
$colorProgressBarOuter: rgba(#000, 0.1);
|
||||
$colorProgressBarAmt: $colorKey;
|
||||
@ -127,6 +127,12 @@ $progressBarStripeW: 20px;
|
||||
$shdwStatusIc: rgba(black, 0.4) 0 1px 2px;
|
||||
$animPausedPulseDur: 500ms;
|
||||
|
||||
// Indicator colors
|
||||
$colorIndicatorAvailable: $colorKey;
|
||||
$colorIndicatorDisabled: #444;
|
||||
$colorIndicatorOn: $colorOk;
|
||||
$colorIndicatorOff: #666;
|
||||
|
||||
// Selects
|
||||
$colorSelectBg: $colorBtnBg;
|
||||
$colorSelectFg: $colorBtnFg;
|
||||
@ -177,7 +183,8 @@ $colorTabHeaderBorder: $colorBodyBg;
|
||||
// Plot
|
||||
$colorPlotBg: rgba(black, 0.1);
|
||||
$colorPlotFg: $colorBodyFg;
|
||||
$colorPlotHash: $colorTick;
|
||||
$colorPlotHash: white;
|
||||
$opacityPlotHash: 0.2;
|
||||
$stylePlotHash: dashed;
|
||||
$colorPlotAreaBorder: $colorInteriorBorder;
|
||||
$colorPlotLabelFg: pushBack($colorPlotFg, 20%);
|
||||
|
7
platform/commonUI/themes/snow/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Espresso Theme
|
||||
A light colored theme for the Open MCT user interface.
|
||||
|
||||
## Installation
|
||||
```js
|
||||
openmct.install(openmct.plugins.Snow());
|
||||
```
|
@ -3,6 +3,8 @@ $colorBodyBg: #fcfcfc;
|
||||
$colorBodyFg: #666;
|
||||
$colorGenBg: #fff;
|
||||
$colorStatusBarBg: #000;
|
||||
$colorStatusBarFg: #999;
|
||||
$colorStatusBarFgHov: #aaa;
|
||||
$colorKey: #0099cc;
|
||||
$colorKeySelectedBg: $colorKey;
|
||||
$colorKeyFg: #fff;
|
||||
@ -72,7 +74,6 @@ $colorObjHdrTxt: $colorBodyFg;
|
||||
$colorObjHdrIc: lighten($colorObjHdrTxt, 30%);
|
||||
$colorTick: rgba(black, 0.2);
|
||||
$colorSelectableSelectedPrimary: $colorKey;
|
||||
//$colorSelectableSelectedSecondary: pushBack($colorSelectableSelectedPrimary, 20%);
|
||||
$colorSelectableHov: rgba($colorBodyFg, 0.4);
|
||||
|
||||
// Menu colors
|
||||
@ -117,8 +118,7 @@ $colorStatusFg: #999;
|
||||
$colorStatusDefault: #ccc;
|
||||
$colorStatusInfo: #60ba7b;
|
||||
$colorStatusAlert: #ffb66c;
|
||||
$colorStatusError: #c96b68;
|
||||
$colorStatusAvailable: $colorKey;
|
||||
$colorStatusError: #da0004;
|
||||
$colorStatusBtnBg: #666;
|
||||
$colorProgressBarOuter: rgba(#000, 0.1);
|
||||
$colorProgressBarAmt: #0a0;
|
||||
@ -127,6 +127,12 @@ $progressBarStripeW: 20px;
|
||||
$shdwStatusIc: rgba(white, 0.8) 0 0px 5px;
|
||||
$animPausedPulseDur: 1s;
|
||||
|
||||
// Indicator colors
|
||||
$colorIndicatorAvailable: $colorKey;
|
||||
$colorIndicatorDisabled: #444;
|
||||
$colorIndicatorOn: $colorOk;
|
||||
$colorIndicatorOff: #666;
|
||||
|
||||
// Selects
|
||||
$colorSelectBg: $colorBtnBg;
|
||||
$colorSelectFg: $colorBtnFg;
|
||||
@ -177,7 +183,8 @@ $colorTabHeaderBorder: $colorBodyBg;
|
||||
// Plot
|
||||
$colorPlotBg: rgba(black, 0.05);
|
||||
$colorPlotFg: $colorBodyFg;
|
||||
$colorPlotHash: $colorTick;
|
||||
$colorPlotHash: black;
|
||||
$opacityPlotHash: 0.2;
|
||||
$stylePlotHash: dashed;
|
||||
$colorPlotAreaBorder: $colorInteriorBorder;
|
||||
$colorPlotLabelFg: pushBack($colorPlotFg, 20%);
|
||||
|
@ -102,14 +102,14 @@ define(
|
||||
* @returns {Action[]} an array of matching actions
|
||||
* @memberof platform/core.ActionCapability#
|
||||
*/
|
||||
ActionCapability.prototype.perform = function (context) {
|
||||
ActionCapability.prototype.perform = function (context, flag) {
|
||||
// Alias to getActions(context)[0].perform, with a
|
||||
// check for empty arrays.
|
||||
var actions = this.getActions(context);
|
||||
|
||||
return this.$q.when(
|
||||
(actions && actions.length > 0) ?
|
||||
actions[0].perform() :
|
||||
actions[0].perform(flag) :
|
||||
undefined
|
||||
);
|
||||
};
|
||||
|
@ -43,23 +43,10 @@ define([], function () {
|
||||
var mutationTopic = topic('mutation');
|
||||
mutationTopic.listen(function (domainObject) {
|
||||
var persistence = domainObject.getCapability('persistence');
|
||||
var wasActive = transactionService.isActive();
|
||||
cacheService.put(domainObject.getId(), domainObject.getModel());
|
||||
|
||||
if (hasChanged(domainObject)) {
|
||||
|
||||
if (!wasActive) {
|
||||
transactionService.startTransaction();
|
||||
}
|
||||
|
||||
transactionService.addToTransaction(
|
||||
persistence.persist.bind(persistence),
|
||||
persistence.refresh.bind(persistence)
|
||||
);
|
||||
|
||||
if (!wasActive) {
|
||||
transactionService.commit();
|
||||
}
|
||||
persistence.persist();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -24,22 +24,27 @@ define(
|
||||
["../../src/runs/TransactingMutationListener"],
|
||||
function (TransactingMutationListener) {
|
||||
|
||||
xdescribe("TransactingMutationListener", function () {
|
||||
describe("TransactingMutationListener", function () {
|
||||
var mockTopic,
|
||||
mockMutationTopic,
|
||||
mockCacheService,
|
||||
mockTransactionService,
|
||||
mockDomainObject,
|
||||
mockModel,
|
||||
mockPersistence;
|
||||
|
||||
beforeEach(function () {
|
||||
mockTopic = jasmine.createSpy('topic');
|
||||
mockMutationTopic =
|
||||
jasmine.createSpyObj('mutation', ['listen']);
|
||||
mockCacheService =
|
||||
jasmine.createSpyObj('cacheService', [
|
||||
'put'
|
||||
]);
|
||||
mockTransactionService =
|
||||
jasmine.createSpyObj('transactionService', [
|
||||
'isActive',
|
||||
'startTransaction',
|
||||
'addToTransaction',
|
||||
'commit'
|
||||
]);
|
||||
mockDomainObject = jasmine.createSpyObj(
|
||||
@ -52,18 +57,24 @@ define(
|
||||
);
|
||||
|
||||
mockTopic.and.callFake(function (t) {
|
||||
return (t === 'mutation') && mockMutationTopic;
|
||||
expect(t).toBe('mutation');
|
||||
return mockMutationTopic;
|
||||
});
|
||||
|
||||
mockDomainObject.getId.and.returnValue('mockId');
|
||||
mockDomainObject.getCapability.and.callFake(function (c) {
|
||||
return (c === 'persistence') && mockPersistence;
|
||||
expect(c).toBe('persistence');
|
||||
return mockPersistence;
|
||||
});
|
||||
mockModel = {};
|
||||
mockDomainObject.getModel.and.returnValue(mockModel);
|
||||
|
||||
mockPersistence.persisted.and.returnValue(true);
|
||||
|
||||
return new TransactingMutationListener(
|
||||
mockTopic,
|
||||
mockTransactionService
|
||||
mockTransactionService,
|
||||
mockCacheService
|
||||
);
|
||||
});
|
||||
|
||||
@ -72,48 +83,27 @@ define(
|
||||
.toHaveBeenCalledWith(jasmine.any(Function));
|
||||
});
|
||||
|
||||
[false, true].forEach(function (isActive) {
|
||||
var verb = isActive ? "is" : "isn't";
|
||||
it("calls persist if the model has changed", function () {
|
||||
mockModel.persisted = Date.now();
|
||||
|
||||
function onlyWhenInactive(expectation) {
|
||||
return isActive ? expectation.not : expectation;
|
||||
}
|
||||
//Mark the model dirty by setting the mutated date later than the last persisted date.
|
||||
mockModel.modified = mockModel.persisted + 1;
|
||||
|
||||
describe("when a transaction " + verb + " active", function () {
|
||||
var innerVerb = isActive ? "does" : "doesn't";
|
||||
|
||||
beforeEach(function () {
|
||||
mockTransactionService.isActive.and.returnValue(isActive);
|
||||
});
|
||||
|
||||
describe("and mutation occurs", function () {
|
||||
beforeEach(function () {
|
||||
mockMutationTopic.listen.calls.mostRecent()
|
||||
.args[0](mockDomainObject);
|
||||
|
||||
expect(mockPersistence.persist).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("does not call persist if the model has not changed", function () {
|
||||
mockModel.persisted = Date.now();
|
||||
|
||||
it(innerVerb + " start a new transaction", function () {
|
||||
onlyWhenInactive(
|
||||
expect(mockTransactionService.startTransaction)
|
||||
).toHaveBeenCalled();
|
||||
});
|
||||
mockModel.modified = mockModel.persisted;
|
||||
|
||||
it("adds to the active transaction", function () {
|
||||
expect(mockTransactionService.addToTransaction)
|
||||
.toHaveBeenCalledWith(
|
||||
jasmine.any(Function),
|
||||
jasmine.any(Function)
|
||||
);
|
||||
});
|
||||
mockMutationTopic.listen.calls.mostRecent()
|
||||
.args[0](mockDomainObject);
|
||||
|
||||
it(innerVerb + " immediately commit", function () {
|
||||
onlyWhenInactive(
|
||||
expect(mockTransactionService.commit)
|
||||
).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
});
|
||||
expect(mockPersistence.persist).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ define(
|
||||
.then(function () {
|
||||
return object
|
||||
.getCapability('action')
|
||||
.perform('remove');
|
||||
.perform('remove', true);
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -224,10 +224,11 @@ define(
|
||||
locationPromise.resolve();
|
||||
});
|
||||
|
||||
it("removes object from parent", function () {
|
||||
it("removes object from parent without user warning dialog", function () {
|
||||
expect(actionCapability.perform)
|
||||
.toHaveBeenCalledWith('remove');
|
||||
.toHaveBeenCalledWith('remove', true);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
@ -244,9 +245,9 @@ define(
|
||||
.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("removes object from parent", function () {
|
||||
it("removes object from parent without user warning dialog", function () {
|
||||
expect(actionCapability.perform)
|
||||
.toHaveBeenCalledWith('remove');
|
||||
.toHaveBeenCalledWith('remove', true);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -55,7 +55,6 @@ define([
|
||||
timerTemplate,
|
||||
legacyRegistry
|
||||
) {
|
||||
|
||||
legacyRegistry.register("platform/features/clock", {
|
||||
"name": "Clocks/Timers",
|
||||
"descriptions": "Domain objects for displaying current & relative times.",
|
||||
@ -86,11 +85,6 @@ define([
|
||||
"CLOCK_INDICATOR_FORMAT"
|
||||
],
|
||||
"priority": "preferred"
|
||||
},
|
||||
{
|
||||
"implementation": FollowIndicator,
|
||||
"depends": ["timerService"],
|
||||
"priority": "fallback"
|
||||
}
|
||||
],
|
||||
"services": [
|
||||
@ -305,6 +299,10 @@ define([
|
||||
}
|
||||
}
|
||||
],
|
||||
"runs": [{
|
||||
"implementation": FollowIndicator,
|
||||
"depends": ["openmct", "timerService"]
|
||||
}],
|
||||
"licenses": [
|
||||
{
|
||||
"name": "moment-duration-format",
|
||||
|
@ -45,11 +45,11 @@ define(
|
||||
}
|
||||
|
||||
ClockIndicator.prototype.getGlyphClass = function () {
|
||||
return "no-collapse float-right subdued";
|
||||
return "";
|
||||
};
|
||||
|
||||
ClockIndicator.prototype.getCssClass = function () {
|
||||
return "icon-clock";
|
||||
return "t-indicator-clock icon-clock no-collapse float-right";
|
||||
};
|
||||
|
||||
ClockIndicator.prototype.getText = function () {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2009-2016, United States Government
|
||||
* Open MCT, Copyright (c) 2009-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -20,38 +20,32 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
define(
|
||||
['moment'],
|
||||
function (moment) {
|
||||
var NO_TIMER = "No timer being followed";
|
||||
define([], function () {
|
||||
|
||||
/**
|
||||
* Indicator that displays the active timer, as well as its
|
||||
* current state.
|
||||
* @implements {Indicator}
|
||||
* @memberof platform/features/clock
|
||||
*/
|
||||
function FollowIndicator(timerService) {
|
||||
this.timerService = timerService;
|
||||
return function installFollowIndicator(openmct, timerService) {
|
||||
var indicator = openmct.indicators.simpleIndicator();
|
||||
var timer = timerService.getTimer();
|
||||
setIndicatorStatus(timer);
|
||||
|
||||
function setIndicatorStatus(newTimer) {
|
||||
if (newTimer !== undefined) {
|
||||
indicator.iconClass('icon-timer');
|
||||
indicator.statusClass('s-status-on');
|
||||
indicator.text('Following timer ' + newTimer.name);
|
||||
} else {
|
||||
indicator.iconClass('icon-timer');
|
||||
indicator.statusClass('s-status-disabled');
|
||||
indicator.text('No timer being followed');
|
||||
}
|
||||
}
|
||||
|
||||
FollowIndicator.prototype.getGlyphClass = function () {
|
||||
return "";
|
||||
};
|
||||
timerService.on('change', setIndicatorStatus);
|
||||
|
||||
FollowIndicator.prototype.getCssClass = function () {
|
||||
return (this.timerService.getTimer()) ? "icon-timer s-status-ok" : "icon-timer";
|
||||
openmct.indicators.add(indicator);
|
||||
};
|
||||
|
||||
FollowIndicator.prototype.getText = function () {
|
||||
var timer = this.timerService.getTimer();
|
||||
return timer ? ('Following timer ' + timer.name) : NO_TIMER;
|
||||
};
|
||||
|
||||
FollowIndicator.prototype.getDescription = function () {
|
||||
return "";
|
||||
};
|
||||
|
||||
return FollowIndicator;
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -44,7 +44,7 @@ define(['EventEmitter'], function (EventEmitter) {
|
||||
*/
|
||||
TimerService.prototype.setTimer = function (timer) {
|
||||
this.timer = timer;
|
||||
this.emit('change');
|
||||
this.emit('change', timer);
|
||||
|
||||
if (this.stopObserving) {
|
||||
this.stopObserving();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2009-2016, United States Government
|
||||
* Open MCT, Copyright (c) 2009-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -20,39 +20,77 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
define(["../../src/indicators/FollowIndicator"], function (FollowIndicator) {
|
||||
var TIMER_SERVICE_METHODS =
|
||||
['setTimer', 'getTimer', 'clearTimer', 'on', 'off'];
|
||||
|
||||
define([
|
||||
"../../src/indicators/FollowIndicator",
|
||||
"../../src/services/TimerService",
|
||||
"../../../../../src/MCT",
|
||||
'zepto'
|
||||
], function (
|
||||
FollowIndicator,
|
||||
TimerService,
|
||||
MCT,
|
||||
$
|
||||
) {
|
||||
describe("The timer-following indicator", function () {
|
||||
var mockTimerService;
|
||||
var indicator;
|
||||
var timerService;
|
||||
var openmct;
|
||||
|
||||
beforeEach(function () {
|
||||
mockTimerService =
|
||||
jasmine.createSpyObj('timerService', TIMER_SERVICE_METHODS);
|
||||
indicator = new FollowIndicator(mockTimerService);
|
||||
openmct = new MCT();
|
||||
timerService = new TimerService(openmct);
|
||||
spyOn(openmct.indicators, "add");
|
||||
});
|
||||
|
||||
it("implements the Indicator interface", function () {
|
||||
expect(indicator.getGlyphClass()).toEqual(jasmine.any(String));
|
||||
expect(indicator.getCssClass()).toEqual(jasmine.any(String));
|
||||
expect(indicator.getText()).toEqual(jasmine.any(String));
|
||||
expect(indicator.getDescription()).toEqual(jasmine.any(String));
|
||||
it("adds an indicator when installed", function () {
|
||||
FollowIndicator(openmct, timerService);
|
||||
expect(openmct.indicators.add).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("indicates that no timer is being followed", function () {
|
||||
FollowIndicator(openmct, timerService);
|
||||
var simpleIndicator = openmct.indicators.add.calls.mostRecent().args[0];
|
||||
var element = simpleIndicator.element;
|
||||
var text = $('.indicator-text', element).text().trim();
|
||||
expect(text).toEqual('No timer being followed');
|
||||
});
|
||||
|
||||
describe("when a timer is set", function () {
|
||||
var testObject;
|
||||
var simpleIndicator;
|
||||
|
||||
beforeEach(function () {
|
||||
testObject = { name: "some timer!" };
|
||||
mockTimerService.getTimer.and.returnValue(testObject);
|
||||
testObject = {
|
||||
identifier: {
|
||||
namespace: 'namespace',
|
||||
key: 'key'
|
||||
},
|
||||
name: "some timer!"
|
||||
};
|
||||
timerService.setTimer(testObject);
|
||||
FollowIndicator(openmct, timerService);
|
||||
simpleIndicator = openmct.indicators.add.calls.mostRecent().args[0];
|
||||
});
|
||||
|
||||
it("displays the timer's name", function () {
|
||||
expect(indicator.getText().indexOf(testObject.name))
|
||||
.not.toEqual(-1);
|
||||
var element = simpleIndicator.element;
|
||||
var text = $('.indicator-text', element).text().trim();
|
||||
expect(text).toEqual('Following timer ' + testObject.name);
|
||||
});
|
||||
|
||||
it("displays the timer's name when it changes", function () {
|
||||
var secondTimer = {
|
||||
identifier: {
|
||||
namespace: 'namespace',
|
||||
key: 'key2'
|
||||
},
|
||||
name: "Some other timer"
|
||||
};
|
||||
var element = simpleIndicator.element;
|
||||
timerService.setTimer(secondTimer);
|
||||
var text = $('.indicator-text', element).text().trim();
|
||||
expect(text).toEqual('Following timer ' + secondTimer.name);
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -45,7 +45,6 @@ define([
|
||||
"key": "url",
|
||||
"name": "URL",
|
||||
"control": "textfield",
|
||||
"pattern": "^(ftp|https?)\\:\\/\\/",
|
||||
"required": true,
|
||||
"cssClass": "l-input-lg"
|
||||
},
|
||||
|
@ -87,7 +87,8 @@ define(
|
||||
'setDisplayedValue',
|
||||
'subscribeToObject',
|
||||
'unsubscribe',
|
||||
'updateView'
|
||||
'updateView',
|
||||
'setSelection'
|
||||
].forEach(function (name) {
|
||||
self[name] = self[name].bind(self);
|
||||
});
|
||||
@ -224,7 +225,7 @@ define(
|
||||
// Respond to external bounds changes
|
||||
this.openmct.time.on("bounds", updateDisplayBounds);
|
||||
|
||||
this.openmct.selection.on('change', this.setSelection.bind(this));
|
||||
this.openmct.selection.on('change', this.setSelection);
|
||||
this.$element.on('click', this.bypassSelection.bind(this));
|
||||
this.unlisten = this.openmct.objects.observe(this.newDomainObject, '*', function (obj) {
|
||||
this.newDomainObject = JSON.parse(JSON.stringify(obj));
|
||||
@ -233,6 +234,9 @@ define(
|
||||
|
||||
this.updateElementPositions(this.newDomainObject.layoutGrid);
|
||||
refreshElements();
|
||||
|
||||
//force a click, to initialize Fixed Position Controller on SelectionAPI
|
||||
$element[0].click();
|
||||
}
|
||||
|
||||
FixedController.prototype.updateElementPositions = function (layoutGrid) {
|
||||
|
8
platform/features/my-items/README.md
Normal file
@ -0,0 +1,8 @@
|
||||
# My Items plugin
|
||||
Defines top-level folder named "My Items" to store user-created items. Enabled by default, this can be disabled in a
|
||||
read-only deployment with no user-editable objects.
|
||||
|
||||
## Installation
|
||||
```js
|
||||
openmct.install(openmct.plugins.MyItems());
|
||||
```
|
@ -58,7 +58,8 @@ define([
|
||||
"model": {
|
||||
"entries": [],
|
||||
"composition": [],
|
||||
"entryTypes": []
|
||||
"entryTypes": [],
|
||||
"defaultSort": "-createdOn"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
@ -236,7 +237,6 @@ define([
|
||||
"cssClass": "icon-notebook labeled",
|
||||
"description": "Add a new Notebook entry",
|
||||
"category": [
|
||||
"contextual",
|
||||
"view-control"
|
||||
],
|
||||
"depends": [
|
||||
@ -252,13 +252,13 @@ define([
|
||||
"licenses": [
|
||||
{
|
||||
"name": "painterro",
|
||||
"version": "4.1.0",
|
||||
"author": "Mike Bostock",
|
||||
"description": "D3 (or D3.js) is a JavaScript library for visualizing data using web standards. D3 helps you bring data to life using SVG, Canvas and HTML. D3 combines powerful visualization and interaction techniques with a data-driven approach to DOM manipulation, giving you the full capabilities of modern browsers and the freedom to design the right visual interface for your data.",
|
||||
"website": "https://d3js.org/",
|
||||
"copyright": "Copyright 2010-2016 Mike Bostock",
|
||||
"license": "BSD-3-Clause",
|
||||
"link": "https://github.com/d3/d3/blob/master/LICENSE"
|
||||
"version": "0.2.65",
|
||||
"author": "Ivan Borshchov",
|
||||
"description": "Painterro is JavaScript paint widget which allows editing images directly in a browser.",
|
||||
"website": "https://github.com/ivictbor/painterro",
|
||||
"copyright": "Copyright 2017 Ivan Borshchov",
|
||||
"license": "MIT",
|
||||
"link": "https://github.com/ivictbor/painterro/blob/master/LICENSE"
|
||||
}
|
||||
],
|
||||
"capabilities": [
|
||||
|
@ -144,6 +144,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
.s-status-taking-snapshot,
|
||||
.overlay.snapshot {
|
||||
// Handle overflow-y issues with tables and html2canvas
|
||||
.l-sticky-headers .l-tabular-body { overflow: auto; }
|
||||
}
|
||||
|
||||
|
||||
/********************************************* MOBILE */
|
||||
body.mobile {
|
||||
// Hide the start entry area, and disable ability to edit or delete an entry in mobile context
|
||||
@ -285,24 +292,3 @@ body.phone.portrait {
|
||||
.overlay.l-dialog .abs.editor {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
.overlay.l-dialog .outer-holder.annotation-dialog{
|
||||
width: 90%;
|
||||
height: 90%;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
.snap-annotation-wrapper{
|
||||
padding-top: 40px;
|
||||
}
|
||||
|
||||
|
||||
.t-console {
|
||||
// Temp console-like reporting element
|
||||
max-height: 200px;
|
||||
box-sizing: border-box;
|
||||
padding: 5px;
|
||||
}
|
||||
*/
|
||||
|
@ -34,10 +34,12 @@
|
||||
}
|
||||
|
||||
.s-notebook-entry {
|
||||
transition: background-color 500ms ease-out;
|
||||
background-color: rgba($colorBodyFg, 0.1);
|
||||
border-radius: $basicCr;
|
||||
|
||||
&:hover {
|
||||
transition: background-color 50ms ease-in;
|
||||
background-color: rgba($colorBodyFg, 0.2);
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- delete entry -->
|
||||
<div class="holder flex-elem local-control notebook-entry-delete">
|
||||
<div class="holder flex-elem local-control local-controls-hidden notebook-entry-delete">
|
||||
<a class="s-icon-button icon-trash" id={{entry.id}} title="Delete Entry" ng-click="deleteEntry($event)"></a>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -185,7 +185,18 @@ define(
|
||||
|
||||
NewEntryContextual.appliesTo = function (context) {
|
||||
var domainObject = context.domainObject;
|
||||
return !!(domainObject && domainObject.getModel().type !== 'notebook');
|
||||
|
||||
if (domainObject) {
|
||||
if (domainObject.getModel().type === 'Notebook') {
|
||||
// do not allow in context of a notebook
|
||||
return false;
|
||||
} else if (domainObject.getModel().type.includes('imagery')) {
|
||||
// do not allow in the context of an object with imagery
|
||||
// (because of cross domain issue with snapshot)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
return NewEntryContextual;
|
||||
|
@ -42,7 +42,7 @@ define(
|
||||
) {
|
||||
|
||||
$scope.entriesEl = $(document.body).find('.t-entries-list');
|
||||
$scope.sortEntries = $scope.domainObject.getModel().defaultSort || "-createdOn";
|
||||
$scope.sortEntries = $scope.domainObject.getModel().defaultSort;
|
||||
$scope.showTime = "0";
|
||||
$scope.editEntry = false;
|
||||
$scope.entrySearch = '';
|
||||
@ -354,6 +354,11 @@ define(
|
||||
|
||||
$scope.$watchCollection("composition", refreshComp);
|
||||
|
||||
$scope.$watch('domainObject.getModel().defaultSort', function (newDefaultSort, oldDefaultSort) {
|
||||
if (newDefaultSort !== oldDefaultSort) {
|
||||
$scope.sortEntries = newDefaultSort;
|
||||
}
|
||||
});
|
||||
|
||||
$scope.$on('$destroy', function () {});
|
||||
|
||||
|
@ -25,7 +25,7 @@ define(['zepto'], function ($) {
|
||||
var document = $document[0];
|
||||
|
||||
function link($scope, $element, $attrs) {
|
||||
var objectElement = $(document.body).find('.overlay')[0] || $(document.body).find("[key='representation.selected.key']")[0],
|
||||
var objectElement = $(document.body).find(".overlay .object-holder")[0] || $(document.body).find("[key='representation.selected.key']")[0],
|
||||
takeSnapshot,
|
||||
makeImg,
|
||||
saveImg;
|
||||
|
@ -35,28 +35,30 @@ mct-table {
|
||||
}
|
||||
|
||||
.mct-table {
|
||||
tr {
|
||||
display: flex; // flex-flow defaults to row nowrap (which is what we want) so no need to define
|
||||
height: 18px; // Needed when a row has empty values in its cells
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
td, th {
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
flex: 1 0 auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
thead {
|
||||
display: block;
|
||||
tr {
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
th {
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tbody {
|
||||
tr {
|
||||
position: absolute;
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
}
|
||||
|
||||
td {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -65,3 +67,10 @@ mct-table {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.mct-table-scroll-forcer {
|
||||
// Force horz scroll when needed; width set via JS
|
||||
font-size: 0;
|
||||
height: 1px; // Height 0 won't force scroll properly
|
||||
position: relative;
|
||||
}
|
||||
|
@ -59,6 +59,10 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="l-tabular-body t-scrolling vscroll--persist" mct-resize="resize()" mct-scroll-x="scroll.x">
|
||||
<div class="mct-table-scroll-forcer"
|
||||
ng-style="{
|
||||
width: totalWidth
|
||||
}"></div>
|
||||
<table class="mct-table"
|
||||
ng-style="{
|
||||
height: totalHeight + 'px',
|
||||
|
@ -3,7 +3,7 @@
|
||||
<mct-table
|
||||
headers="headers"
|
||||
rows="rows"
|
||||
time-columns="tableController.timeColumns"
|
||||
time-columns="[tableController.table.timeSystemColumnTitle]"
|
||||
format-cell="formatCell"
|
||||
enableFilter="true"
|
||||
enableSort="true"
|
||||
|
67
platform/features/table/src/TableColumn.js
Normal file
@ -0,0 +1,67 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, 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.
|
||||
*****************************************************************************/
|
||||
define(function () {
|
||||
function TableColumn(openmct, telemetryObject, metadatum) {
|
||||
this.openmct = openmct;
|
||||
this.telemetryObject = telemetryObject;
|
||||
this.metadatum = metadatum;
|
||||
this.formatter = openmct.telemetry.getValueFormatter(metadatum);
|
||||
|
||||
this.titleValue = this.metadatum.name;
|
||||
}
|
||||
|
||||
TableColumn.prototype.title = function (title) {
|
||||
if (arguments.length > 0) {
|
||||
this.titleValue = title;
|
||||
}
|
||||
return this.titleValue;
|
||||
};
|
||||
|
||||
TableColumn.prototype.isCurrentTimeSystem = function () {
|
||||
var isCurrentTimeSystem = this.metadatum.hints.hasOwnProperty('domain') &&
|
||||
this.metadatum.key === this.openmct.time.timeSystem().key;
|
||||
|
||||
return isCurrentTimeSystem;
|
||||
};
|
||||
|
||||
TableColumn.prototype.hasValue = function (telemetryObject, telemetryDatum) {
|
||||
var keyStringForDatum = this.openmct.objects.makeKeyString(telemetryObject.identifier);
|
||||
var keyStringForColumn = this.openmct.objects.makeKeyString(this.telemetryObject.identifier);
|
||||
return keyStringForDatum === keyStringForColumn && telemetryDatum.hasOwnProperty(this.metadatum.source);
|
||||
};
|
||||
|
||||
TableColumn.prototype.getValue = function (telemetryDatum, limitEvaluator) {
|
||||
var alarm = limitEvaluator &&
|
||||
limitEvaluator.evaluate(telemetryDatum, this.metadatum);
|
||||
var value = {
|
||||
text: this.formatter.format(telemetryDatum),
|
||||
value: this.formatter.parse(telemetryDatum)
|
||||
};
|
||||
|
||||
if (alarm) {
|
||||
value.cssClass = alarm.cssClass;
|
||||
}
|
||||
return value;
|
||||
};
|
||||
|
||||
return TableColumn;
|
||||
});
|
@ -19,10 +19,10 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/* global Set */
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
['./TableColumn'],
|
||||
function (TableColumn) {
|
||||
|
||||
/**
|
||||
* Class that manages table metadata, state, and contents.
|
||||
@ -32,62 +32,31 @@ define(
|
||||
*/
|
||||
function TableConfiguration(domainObject, openmct) {
|
||||
this.domainObject = domainObject;
|
||||
this.columns = [];
|
||||
this.openmct = openmct;
|
||||
this.timeSystemColumn = undefined;
|
||||
this.columns = [];
|
||||
this.headers = new Set();
|
||||
this.timeSystemColumnTitle = undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build column definitions based on supplied telemetry metadata
|
||||
* Build column definition based on supplied telemetry metadata
|
||||
* @param telemetryObject the telemetry producing object associated with this column
|
||||
* @param metadata Metadata describing the domains and ranges available
|
||||
* @returns {TableConfiguration} This object
|
||||
*/
|
||||
TableConfiguration.prototype.populateColumns = function (metadata) {
|
||||
var self = this;
|
||||
var telemetryApi = this.openmct.telemetry;
|
||||
TableConfiguration.prototype.addColumn = function (telemetryObject, metadatum) {
|
||||
var column = new TableColumn(this.openmct, telemetryObject, metadatum);
|
||||
|
||||
this.columns = [];
|
||||
|
||||
if (metadata) {
|
||||
|
||||
metadata.forEach(function (metadatum) {
|
||||
var formatter = telemetryApi.getValueFormatter(metadatum);
|
||||
|
||||
self.columns.push({
|
||||
getKey: function () {
|
||||
return metadatum.key;
|
||||
},
|
||||
getTitle: function () {
|
||||
return metadatum.name;
|
||||
},
|
||||
getValue: function (telemetryDatum, limitEvaluator) {
|
||||
var isValueColumn = !!(metadatum.hints.y || metadatum.hints.range);
|
||||
var alarm = isValueColumn &&
|
||||
limitEvaluator &&
|
||||
limitEvaluator.evaluate(telemetryDatum, metadatum);
|
||||
var value = {
|
||||
text: formatter.format(telemetryDatum),
|
||||
value: formatter.parse(telemetryDatum)
|
||||
};
|
||||
|
||||
if (alarm) {
|
||||
value.cssClass = alarm.cssClass;
|
||||
if (column.isCurrentTimeSystem()) {
|
||||
if (!this.timeSystemColumnTitle) {
|
||||
this.timeSystemColumnTitle = column.title();
|
||||
}
|
||||
return value;
|
||||
column.title(this.timeSystemColumnTitle);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get a simple list of column titles
|
||||
* @returns {Array} The titles of the columns
|
||||
*/
|
||||
TableConfiguration.prototype.getHeaders = function () {
|
||||
return this.columns.map(function (column, i) {
|
||||
return column.getTitle() || 'Column ' + (i + 1);
|
||||
});
|
||||
this.columns.push(column);
|
||||
this.headers.add(column.title());
|
||||
};
|
||||
|
||||
/**
|
||||
@ -98,22 +67,32 @@ define(
|
||||
* @returns {Object} Key value pairs where the key is the column
|
||||
* title, and the value is the formatted value from the provided datum.
|
||||
*/
|
||||
TableConfiguration.prototype.getRowValues = function (limitEvaluator, datum) {
|
||||
return this.columns.reduce(function (rowObject, column, i) {
|
||||
var columnTitle = column.getTitle() || 'Column ' + (i + 1),
|
||||
TableConfiguration.prototype.getRowValues = function (telemetryObject, limitEvaluator, datum) {
|
||||
return this.columns.reduce(function (rowObject, column) {
|
||||
var columnTitle = column.title();
|
||||
var columnValue = {
|
||||
text: '',
|
||||
value: undefined
|
||||
};
|
||||
if (rowObject[columnTitle] === undefined) {
|
||||
rowObject[columnTitle] = columnValue;
|
||||
}
|
||||
|
||||
if (column.hasValue(telemetryObject, datum)) {
|
||||
columnValue = column.getValue(datum, limitEvaluator);
|
||||
|
||||
if (columnValue !== undefined && columnValue.text === undefined) {
|
||||
if (columnValue.text === undefined) {
|
||||
columnValue.text = '';
|
||||
}
|
||||
// Don't replace something with nothing.
|
||||
// This occurs when there are multiple columns with the same
|
||||
// column title
|
||||
if (rowObject[columnTitle] === undefined ||
|
||||
rowObject[columnTitle].text === undefined ||
|
||||
if (rowObject[columnTitle].text === undefined ||
|
||||
rowObject[columnTitle].text.length === 0) {
|
||||
rowObject[columnTitle] = columnValue;
|
||||
}
|
||||
}
|
||||
|
||||
return rowObject;
|
||||
}, {});
|
||||
};
|
||||
@ -164,7 +143,7 @@ define(
|
||||
* specifying whether the column is visible or not. Default to
|
||||
* existing (persisted) configuration if available
|
||||
*/
|
||||
this.getHeaders().forEach(function (columnTitle) {
|
||||
this.headers.forEach(function (columnTitle) {
|
||||
configuration[columnTitle] =
|
||||
typeof defaultConfig[columnTitle] === 'undefined' ? true :
|
||||
defaultConfig[columnTitle];
|
||||
|
@ -93,7 +93,9 @@ define(
|
||||
// Calculate the new index of the last item in bounds
|
||||
endIndex = _.sortedLastIndex(this.highBuffer, testValue, this.sortField);
|
||||
added = this.highBuffer.splice(0, endIndex);
|
||||
this.telemetry = this.telemetry.concat(added);
|
||||
added.forEach(function (datum) {
|
||||
this.telemetry.push(datum);
|
||||
}.bind(this));
|
||||
}
|
||||
|
||||
if (discarded && discarded.length > 0) {
|
||||
@ -132,6 +134,7 @@ define(
|
||||
// bounds events, so no bounds checking necessary
|
||||
if (this.sortField === undefined) {
|
||||
this.telemetry.push(item);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -153,7 +156,6 @@ define(
|
||||
|
||||
// If out of bounds low, disregard data
|
||||
if (!boundsLow) {
|
||||
|
||||
// Going to check for duplicates. Bound the search problem to
|
||||
// items around the given time. Use sortedIndex because it
|
||||
// employs a binary search which is O(log n). Can use binary search
|
||||
|
@ -262,19 +262,26 @@ define(
|
||||
* @private
|
||||
*/
|
||||
MCTTableController.prototype.onScroll = function (event) {
|
||||
this.scrollWindow = {
|
||||
top: this.scrollable[0].scrollTop,
|
||||
bottom: this.scrollable[0].scrollTop + this.scrollable[0].offsetHeight,
|
||||
offsetHeight: this.scrollable[0].offsetHeight,
|
||||
height: this.scrollable[0].scrollHeight
|
||||
};
|
||||
this.$window.requestAnimationFrame(function () {
|
||||
this.setVisibleRows();
|
||||
this.digest();
|
||||
|
||||
// If user scrolls away from bottom, disable auto-scroll.
|
||||
// Auto-scroll will be re-enabled if user scrolls to bottom again.
|
||||
if (this.scrollable[0].scrollTop <
|
||||
(this.scrollable[0].scrollHeight - this.scrollable[0].offsetHeight) - 20) {
|
||||
if (this.scrollWindow.top <
|
||||
(this.scrollWindow.height - this.scrollWindow.offsetHeight) - 20) {
|
||||
this.$scope.autoScroll = false;
|
||||
} else {
|
||||
this.$scope.autoScroll = true;
|
||||
}
|
||||
this.scrolling = false;
|
||||
delete this.scrollWindow;
|
||||
}.bind(this));
|
||||
};
|
||||
|
||||
@ -283,15 +290,14 @@ define(
|
||||
* @private
|
||||
*/
|
||||
MCTTableController.prototype.firstVisible = function () {
|
||||
var target = this.scrollable[0],
|
||||
topScroll = target.scrollTop,
|
||||
firstVisible;
|
||||
var topScroll = this.scrollWindow ?
|
||||
this.scrollWindow.top :
|
||||
this.scrollable[0].scrollTop;
|
||||
|
||||
firstVisible = Math.floor(
|
||||
return Math.floor(
|
||||
(topScroll) / this.$scope.rowHeight
|
||||
);
|
||||
|
||||
return firstVisible;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -299,16 +305,14 @@ define(
|
||||
* @private
|
||||
*/
|
||||
MCTTableController.prototype.lastVisible = function () {
|
||||
var target = this.scrollable[0],
|
||||
topScroll = target.scrollTop,
|
||||
bottomScroll = topScroll + target.offsetHeight,
|
||||
lastVisible;
|
||||
var bottomScroll = this.scrollWindow ?
|
||||
this.scrollWindow.bottom :
|
||||
this.scrollable[0].scrollTop + this.scrollable[0].offsetHeight;
|
||||
|
||||
lastVisible = Math.ceil(
|
||||
return Math.ceil(
|
||||
(bottomScroll) /
|
||||
this.$scope.rowHeight
|
||||
);
|
||||
return lastVisible;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -118,23 +118,18 @@ define(
|
||||
* to sort by. By default will just match on key.
|
||||
*
|
||||
* @private
|
||||
* @param {TimeSystem} timeSystem
|
||||
*/
|
||||
TelemetryTableController.prototype.sortByTimeSystem = function (timeSystem) {
|
||||
TelemetryTableController.prototype.sortByTimeSystem = function () {
|
||||
var scope = this.$scope;
|
||||
var sortColumn;
|
||||
scope.defaultSort = undefined;
|
||||
|
||||
if (timeSystem !== undefined) {
|
||||
this.table.columns.forEach(function (column) {
|
||||
if (column.getKey() === timeSystem.key) {
|
||||
sortColumn = column;
|
||||
}
|
||||
});
|
||||
sortColumn = this.table.columns.filter(function (column) {
|
||||
return column.isCurrentTimeSystem();
|
||||
})[0];
|
||||
if (sortColumn) {
|
||||
scope.defaultSort = sortColumn.getTitle();
|
||||
this.telemetry.sort(sortColumn.getTitle() + '.value');
|
||||
}
|
||||
scope.defaultSort = sortColumn.title();
|
||||
this.telemetry.sort(sortColumn.title() + '.value');
|
||||
}
|
||||
};
|
||||
|
||||
@ -172,9 +167,6 @@ define(
|
||||
* @param rows
|
||||
*/
|
||||
TelemetryTableController.prototype.addRowsToTable = function (rows) {
|
||||
rows.forEach(function (row) {
|
||||
this.$scope.rows.push(row);
|
||||
}, this);
|
||||
this.$scope.$broadcast('add:rows', rows);
|
||||
};
|
||||
|
||||
@ -237,35 +229,21 @@ define(
|
||||
TelemetryTableController.prototype.loadColumns = function (objects) {
|
||||
var telemetryApi = this.openmct.telemetry;
|
||||
|
||||
this.table = new TableConfiguration(this.$scope.domainObject,
|
||||
this.openmct);
|
||||
|
||||
this.$scope.headers = [];
|
||||
|
||||
if (objects.length > 0) {
|
||||
var allMetadata = objects.map(telemetryApi.getMetadata.bind(telemetryApi));
|
||||
var allValueMetadata = _.flatten(allMetadata.map(
|
||||
function getMetadataValues(metadata) {
|
||||
return metadata.values();
|
||||
}
|
||||
));
|
||||
|
||||
this.table.populateColumns(allValueMetadata);
|
||||
|
||||
var domainColumns = telemetryApi.commonValuesForHints(allMetadata, ['domain']);
|
||||
this.timeColumns = domainColumns.map(function (metadatum) {
|
||||
return metadatum.name;
|
||||
});
|
||||
objects.forEach(function (object) {
|
||||
var metadataValues = telemetryApi.getMetadata(object).values();
|
||||
metadataValues.forEach(function (metadatum) {
|
||||
this.table.addColumn(object, metadatum);
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
|
||||
this.filterColumns();
|
||||
|
||||
// Default to no sort on underlying telemetry collection. Sorting
|
||||
// is necessary to do bounds filtering, but this is only possible
|
||||
// if data matches selected time system
|
||||
this.telemetry.sort(undefined);
|
||||
|
||||
var timeSystem = this.openmct.time.timeSystem();
|
||||
if (timeSystem !== undefined) {
|
||||
this.sortByTimeSystem(timeSystem);
|
||||
}
|
||||
|
||||
this.sortByTimeSystem();
|
||||
}
|
||||
|
||||
return objects;
|
||||
@ -302,7 +280,7 @@ define(
|
||||
/*
|
||||
* Process a batch of historical data
|
||||
*/
|
||||
function processData(historicalData, index, limitEvaluator) {
|
||||
function processData(object, historicalData, index, limitEvaluator) {
|
||||
if (index >= historicalData.length) {
|
||||
processedObjects++;
|
||||
|
||||
@ -311,14 +289,13 @@ define(
|
||||
}
|
||||
} else {
|
||||
rowData = rowData.concat(historicalData.slice(index, index + self.batchSize)
|
||||
.map(self.table.getRowValues.bind(self.table, limitEvaluator)));
|
||||
|
||||
.map(self.table.getRowValues.bind(self.table, object, limitEvaluator)));
|
||||
/*
|
||||
Use timeout to yield process to other UI activities. On
|
||||
return, process next batch
|
||||
*/
|
||||
self.timeoutHandle = self.$timeout(function () {
|
||||
processData(historicalData, index + self.batchSize, limitEvaluator);
|
||||
processData(object, historicalData, index + self.batchSize, limitEvaluator);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -327,7 +304,7 @@ define(
|
||||
// Only process the most recent request
|
||||
if (requestTime === self.lastRequestTime) {
|
||||
var limitEvaluator = openmct.telemetry.limitEvaluator(object);
|
||||
processData(historicalData, 0, limitEvaluator);
|
||||
processData(object, historicalData, 0, limitEvaluator);
|
||||
} else {
|
||||
resolve(rowData);
|
||||
}
|
||||
@ -367,7 +344,6 @@ define(
|
||||
var telemetryCollection = this.telemetry;
|
||||
//Set table max length to avoid unbounded growth.
|
||||
var limitEvaluator;
|
||||
var added = false;
|
||||
var table = this.table;
|
||||
|
||||
this.subscriptions.forEach(function (subscription) {
|
||||
@ -377,7 +353,7 @@ define(
|
||||
|
||||
function newData(domainObject, datum) {
|
||||
limitEvaluator = telemetryApi.limitEvaluator(domainObject);
|
||||
added = telemetryCollection.add([table.getRowValues(limitEvaluator, datum)]);
|
||||
telemetryCollection.add([table.getRowValues(domainObject, limitEvaluator, datum)]);
|
||||
}
|
||||
|
||||
objects.forEach(function (object) {
|
||||
|
@ -27,31 +27,52 @@ define(
|
||||
function (Table) {
|
||||
|
||||
describe("A table", function () {
|
||||
var mockDomainObject,
|
||||
var mockTableObject,
|
||||
mockTelemetryObject,
|
||||
mockAPI,
|
||||
mockTelemetryAPI,
|
||||
table,
|
||||
mockTimeAPI,
|
||||
mockObjectsAPI,
|
||||
mockModel;
|
||||
|
||||
beforeEach(function () {
|
||||
mockDomainObject = jasmine.createSpyObj('domainObject',
|
||||
mockTableObject = jasmine.createSpyObj('domainObject',
|
||||
['getModel', 'useCapability', 'getCapability', 'hasCapability']
|
||||
);
|
||||
mockModel = {};
|
||||
mockDomainObject.getModel.and.returnValue(mockModel);
|
||||
mockDomainObject.getCapability.and.callFake(function (name) {
|
||||
mockTableObject.getModel.and.returnValue(mockModel);
|
||||
mockTableObject.getCapability.and.callFake(function (name) {
|
||||
return name === 'editor' && {
|
||||
isEditContextRoot: function () {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
});
|
||||
mockTelemetryObject = {
|
||||
identifier: {
|
||||
namespace: 'mock',
|
||||
key: 'domainObject'
|
||||
}
|
||||
};
|
||||
|
||||
mockTelemetryAPI = jasmine.createSpyObj('telemetryAPI', [
|
||||
'getValueFormatter'
|
||||
]);
|
||||
mockTimeAPI = jasmine.createSpyObj('timeAPI', [
|
||||
'timeSystem'
|
||||
]);
|
||||
mockObjectsAPI = jasmine.createSpyObj('objectsAPI', [
|
||||
'makeKeyString'
|
||||
]);
|
||||
mockObjectsAPI.makeKeyString.and.callFake(function (identifier) {
|
||||
return [identifier.namespace, identifier.key].join(':');
|
||||
});
|
||||
|
||||
mockAPI = {
|
||||
telemetry: mockTelemetryAPI
|
||||
telemetry: mockTelemetryAPI,
|
||||
time: mockTimeAPI,
|
||||
objects: mockObjectsAPI
|
||||
};
|
||||
mockTelemetryAPI.getValueFormatter.and.callFake(function (metadata) {
|
||||
var formatter = jasmine.createSpyObj(
|
||||
@ -69,7 +90,7 @@ define(
|
||||
return formatter;
|
||||
});
|
||||
|
||||
table = new Table(mockDomainObject, mockAPI);
|
||||
table = new Table(mockTableObject, mockAPI);
|
||||
});
|
||||
|
||||
describe("Building columns from telemetry metadata", function () {
|
||||
@ -77,51 +98,57 @@ define(
|
||||
{
|
||||
name: 'Range 1',
|
||||
key: 'range1',
|
||||
source: 'range1',
|
||||
hints: {
|
||||
y: 1
|
||||
range: 1
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'Range 2',
|
||||
key: 'range2',
|
||||
source: 'range2',
|
||||
hints: {
|
||||
y: 2
|
||||
range: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'Domain 1',
|
||||
key: 'domain1',
|
||||
source: 'domain1',
|
||||
format: 'utc',
|
||||
hints: {
|
||||
x: 1
|
||||
domain: 1
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'Domain 2',
|
||||
key: 'domain2',
|
||||
source: 'domain2',
|
||||
format: 'utc',
|
||||
hints: {
|
||||
x: 2
|
||||
domain: 2
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
beforeEach(function () {
|
||||
table.populateColumns(metadata);
|
||||
mockTimeAPI.timeSystem.and.returnValue({
|
||||
key: 'domain1'
|
||||
});
|
||||
metadata.forEach(function (metadatum) {
|
||||
table.addColumn(mockTelemetryObject, metadatum);
|
||||
});
|
||||
});
|
||||
|
||||
it("populates columns", function () {
|
||||
expect(table.columns.length).toBe(4);
|
||||
});
|
||||
|
||||
it("Produces headers for each column based on title", function () {
|
||||
var headers,
|
||||
firstColumn = table.columns[0];
|
||||
|
||||
spyOn(firstColumn, 'getTitle');
|
||||
headers = table.getHeaders();
|
||||
expect(headers.length).toBe(4);
|
||||
expect(firstColumn.getTitle).toHaveBeenCalled();
|
||||
it("Produces headers for each column based on metadata name", function () {
|
||||
expect(table.headers.size).toBe(4);
|
||||
Array.from(table.headers.values).forEach(function (header, i) {
|
||||
expect(header).toEqual(metadata[i].name);
|
||||
});
|
||||
});
|
||||
|
||||
it("Provides a default configuration with all columns" +
|
||||
@ -169,11 +196,10 @@ define(
|
||||
};
|
||||
}
|
||||
};
|
||||
rowValues = table.getRowValues(limitEvaluator, datum);
|
||||
rowValues = table.getRowValues(mockTelemetryObject, limitEvaluator, datum);
|
||||
});
|
||||
|
||||
it("Returns a value for every column", function () {
|
||||
expect(rowValues['Range 1'].text).toBeDefined();
|
||||
expect(rowValues['Range 1'].text).toEqual(10);
|
||||
});
|
||||
|
||||
|
@ -78,7 +78,8 @@ define(
|
||||
]);
|
||||
|
||||
mockObjectAPI = jasmine.createSpyObj("objectAPI", [
|
||||
"observe"
|
||||
"observe",
|
||||
"makeKeyString"
|
||||
]);
|
||||
unobserve = jasmine.createSpy("unobserve");
|
||||
mockObjectAPI.observe.and.returnValue(unobserve);
|
||||
@ -184,8 +185,7 @@ define(
|
||||
var mockComposition,
|
||||
mockTelemetryObject,
|
||||
mockChildren,
|
||||
unsubscribe,
|
||||
done;
|
||||
unsubscribe;
|
||||
|
||||
beforeEach(function () {
|
||||
mockComposition = jasmine.createSpyObj("composition", [
|
||||
@ -207,8 +207,6 @@ define(
|
||||
mockTelemetryAPI.isTelemetryObject.and.callFake(function (obj) {
|
||||
return obj.identifier.key === mockTelemetryObject.identifier.key;
|
||||
});
|
||||
|
||||
done = false;
|
||||
});
|
||||
|
||||
it('fetches historical data for the time period specified by the conductor bounds', function () {
|
||||
@ -292,40 +290,37 @@ define(
|
||||
});
|
||||
|
||||
describe('populates table columns', function () {
|
||||
var domainMetadata;
|
||||
var allMetadata;
|
||||
var mockTimeSystem;
|
||||
var mockTimeSystem1;
|
||||
var mockTimeSystem2;
|
||||
|
||||
beforeEach(function () {
|
||||
domainMetadata = [{
|
||||
key: "column1",
|
||||
name: "Column 1",
|
||||
hints: {}
|
||||
}];
|
||||
|
||||
allMetadata = [{
|
||||
key: "column1",
|
||||
name: "Column 1",
|
||||
hints: {}
|
||||
hints: {
|
||||
domain: 1
|
||||
}
|
||||
}, {
|
||||
key: "column2",
|
||||
name: "Column 2",
|
||||
hints: {}
|
||||
hints: {
|
||||
domain: 2
|
||||
}
|
||||
}, {
|
||||
key: "column3",
|
||||
name: "Column 3",
|
||||
hints: {}
|
||||
}];
|
||||
|
||||
mockTimeSystem = {
|
||||
mockTimeSystem1 = {
|
||||
key: "column1"
|
||||
};
|
||||
mockTimeSystem2 = {
|
||||
key: "column2"
|
||||
};
|
||||
|
||||
mockTelemetryAPI.commonValuesForHints.and.callFake(function (metadata, hints) {
|
||||
if (_.eq(hints, ["domain"])) {
|
||||
return domainMetadata;
|
||||
}
|
||||
});
|
||||
mockConductor.timeSystem.and.returnValue(mockTimeSystem1);
|
||||
|
||||
mockTelemetryAPI.getMetadata.and.returnValue({
|
||||
values: function () {
|
||||
@ -345,9 +340,12 @@ define(
|
||||
});
|
||||
|
||||
it('and sorts by column matching time system', function () {
|
||||
expect(mockScope.defaultSort).not.toEqual("Column 1");
|
||||
controller.sortByTimeSystem(mockTimeSystem);
|
||||
expect(mockScope.defaultSort).toEqual("Column 1");
|
||||
|
||||
mockConductor.timeSystem.and.returnValue(mockTimeSystem2);
|
||||
controller.sortByTimeSystem();
|
||||
|
||||
expect(mockScope.defaultSort).toEqual("Column 2");
|
||||
});
|
||||
|
||||
it('batches processing of rows for performance when receiving historical telemetry', function () {
|
||||
@ -403,25 +401,16 @@ define(
|
||||
|
||||
describe('when telemetry is added', function () {
|
||||
var testRows;
|
||||
var expectedRows;
|
||||
|
||||
beforeEach(function () {
|
||||
testRows = [{ a: 0 }, { a: 1 }, { a: 2 }];
|
||||
mockScope.rows = [{ a: -1 }];
|
||||
expectedRows = mockScope.rows.concat(testRows);
|
||||
|
||||
spyOn(controller.telemetry, "on").and.callThrough();
|
||||
controller.registerChangeListeners();
|
||||
|
||||
controller.telemetry.on.calls.all().forEach(function (call) {
|
||||
if (call.args[0] === 'added') {
|
||||
call.args[1](testRows);
|
||||
}
|
||||
});
|
||||
controller.telemetry.add(testRows);
|
||||
});
|
||||
|
||||
it("adds it to rows in scope", function () {
|
||||
expect(mockScope.rows).toEqual(expectedRows);
|
||||
it("Adds the rows to the MCTTable directive", function () {
|
||||
expect(mockScope.$broadcast).toHaveBeenCalledWith("add:rows", testRows);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -21,597 +21,29 @@
|
||||
*****************************************************************************/
|
||||
|
||||
define([
|
||||
"./src/actions/ExportTimelineAsCSVAction",
|
||||
"./src/controllers/TimelineController",
|
||||
"./src/controllers/TimelineGraphController",
|
||||
"./src/controllers/TimelineDateTimeController",
|
||||
"./src/controllers/TimelineZoomController",
|
||||
"./src/controllers/TimelineTickController",
|
||||
"./src/controllers/TimelineTableController",
|
||||
"./src/controllers/TimelineGanttController",
|
||||
"./src/controllers/TimelineTOIController",
|
||||
"./src/controllers/ActivityModeValuesController",
|
||||
"./src/capabilities/ActivityTimespanCapability",
|
||||
"./src/capabilities/TimelineTimespanCapability",
|
||||
"./src/capabilities/UtilizationCapability",
|
||||
"./src/capabilities/GraphCapability",
|
||||
"./src/capabilities/CostCapability",
|
||||
"./src/directives/MCTSwimlaneDrop",
|
||||
"./src/directives/MCTSwimlaneDrag",
|
||||
"./src/directives/MCTResourceGraphDrop",
|
||||
"./src/services/ObjectLoader",
|
||||
"./src/chart/MCTTimelineChart",
|
||||
"text!./res/templates/values.html",
|
||||
"text!./res/templates/timeline.html",
|
||||
"text!./res/templates/activity-gantt.html",
|
||||
"text!./res/templates/tabular-swimlane-cols-tree.html",
|
||||
"text!./res/templates/tabular-swimlane-cols-data.html",
|
||||
"text!./res/templates/resource-graphs.html",
|
||||
"text!./res/templates/resource-graph-labels.html",
|
||||
"text!./res/templates/legend-item.html",
|
||||
"text!./res/templates/ticks.html",
|
||||
"text!./res/templates/controls/datetime.html",
|
||||
"text!./res/templates/deprecated-timeline-message.html",
|
||||
'legacyRegistry'
|
||||
], function (
|
||||
ExportTimelineAsCSVAction,
|
||||
TimelineController,
|
||||
TimelineGraphController,
|
||||
TimelineDateTimeController,
|
||||
TimelineZoomController,
|
||||
TimelineTickController,
|
||||
TimelineTableController,
|
||||
TimelineGanttController,
|
||||
TimelineTOIController,
|
||||
ActivityModeValuesController,
|
||||
ActivityTimespanCapability,
|
||||
TimelineTimespanCapability,
|
||||
UtilizationCapability,
|
||||
GraphCapability,
|
||||
CostCapability,
|
||||
MCTSwimlaneDrop,
|
||||
MCTSwimlaneDrag,
|
||||
MCTResourceGraphDrop,
|
||||
ObjectLoader,
|
||||
MCTTimelineChart,
|
||||
valuesTemplate,
|
||||
timelineTemplate,
|
||||
activityGanttTemplate,
|
||||
tabularSwimlaneColsTreeTemplate,
|
||||
tabularSwimlaneColsDataTemplate,
|
||||
resourceGraphsTemplate,
|
||||
resourceGraphLabelsTemplate,
|
||||
legendItemTemplate,
|
||||
ticksTemplate,
|
||||
datetimeTemplate,
|
||||
deprecatedTimelineMessage,
|
||||
legacyRegistry
|
||||
) {
|
||||
|
||||
legacyRegistry.register("platform/features/timeline", {
|
||||
"name": "Timelines",
|
||||
"description": "Resources, templates, CSS, and code for Timelines.",
|
||||
"resources": "res",
|
||||
"extensions": {
|
||||
"actions": [
|
||||
legacyRegistry.register('platform/features/timeline', {
|
||||
extensions: {
|
||||
types: [
|
||||
{
|
||||
"key": "timeline.export",
|
||||
"name": "Export Timeline as CSV",
|
||||
"category": "contextual",
|
||||
"implementation": ExportTimelineAsCSVAction,
|
||||
"depends": [
|
||||
"$log",
|
||||
"exportService",
|
||||
"notificationService",
|
||||
"resources[]"
|
||||
]
|
||||
key: "timeline",
|
||||
name: "Timeline",
|
||||
description: "Timeline, Activity and Activity Mode objects have been deprecated and will no longer be supported. (07/18/2018)",
|
||||
priority: 502
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
views: [
|
||||
{
|
||||
"key": "TIMELINE_MINIMUM_DURATION",
|
||||
"description": "The minimum duration to display in a timeline view (one hour.)",
|
||||
"value": 3600000
|
||||
},
|
||||
{
|
||||
"key": "TIMELINE_MAXIMUM_OFFSCREEN",
|
||||
"description": "Maximum amount, in pixels, of a Gantt bar which may go off screen.",
|
||||
"value": 1000
|
||||
},
|
||||
{
|
||||
"key": "TIMELINE_ZOOM_CONFIGURATION",
|
||||
"description": "Describes major tick sizes in milliseconds, and width in pixels.",
|
||||
"value": {
|
||||
"levels": [
|
||||
1000,
|
||||
2000,
|
||||
5000,
|
||||
10000,
|
||||
20000,
|
||||
30000,
|
||||
60000,
|
||||
120000,
|
||||
300000,
|
||||
600000,
|
||||
1200000,
|
||||
1800000,
|
||||
3600000,
|
||||
7200000,
|
||||
14400000,
|
||||
28800000,
|
||||
43200000,
|
||||
86400000,
|
||||
86400000 * 2,
|
||||
86400000 * 5,
|
||||
86400000 * 10,
|
||||
86400000 * 20,
|
||||
86400000 * 30,
|
||||
86400000 * 60,
|
||||
86400000 * 120,
|
||||
86400000 * 240,
|
||||
86400000 * 365
|
||||
],
|
||||
"width": 200
|
||||
}
|
||||
}
|
||||
],
|
||||
"types": [
|
||||
{
|
||||
"key": "timeline",
|
||||
"name": "Timeline",
|
||||
"cssClass": "icon-timeline",
|
||||
"description": "A time-oriented container that lets you enclose and organize other Timelines and Activities. The Timeline view provides both tabular and Gantt views as well as resource utilization graphing of Activities.",
|
||||
"priority": 502,
|
||||
"features": [
|
||||
"creation"
|
||||
],
|
||||
"contains": [
|
||||
"timeline",
|
||||
"activity"
|
||||
],
|
||||
"properties": [
|
||||
{
|
||||
"name": "Start date/time",
|
||||
"control": "timeline-datetime",
|
||||
"required": true,
|
||||
"property": [
|
||||
"start"
|
||||
],
|
||||
"options": [
|
||||
"SET"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Battery capacity (Watt-hours)",
|
||||
"control": "textfield",
|
||||
"required": false,
|
||||
"conversion": "number",
|
||||
"property": [
|
||||
"capacity"
|
||||
],
|
||||
"pattern": "^-?\\d+(\\.\\d*)?$"
|
||||
},
|
||||
{
|
||||
"name": "Battery starting SOC (%)",
|
||||
"control": "textfield",
|
||||
"required": false,
|
||||
"conversion": "number",
|
||||
"property": [
|
||||
"startingSOC"
|
||||
],
|
||||
"pattern": "^([0-9](\\.\\d*)?|[1-9][0-9](\\.\\d*)?|100)%?$"
|
||||
}
|
||||
],
|
||||
"model": {
|
||||
"composition": [],
|
||||
"start": {
|
||||
"timestamp": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "activity",
|
||||
"name": "Activity",
|
||||
"cssClass": "icon-activity",
|
||||
"features": [
|
||||
"creation"
|
||||
],
|
||||
"contains": [
|
||||
"activity"
|
||||
],
|
||||
"description": "An event or process that starts and ends at a discrete datetime. Activities can be nested in other Activities, and can be added to Timelines. Activity Modes can be added to an Activity to define its resource utilization over time.",
|
||||
"priority": 501,
|
||||
"properties": [
|
||||
{
|
||||
"name": "Start date/time",
|
||||
"control": "timeline-datetime",
|
||||
"required": true,
|
||||
"property": [
|
||||
"start"
|
||||
],
|
||||
"options": [
|
||||
"SET"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Duration",
|
||||
"control": "duration",
|
||||
"required": true,
|
||||
"property": [
|
||||
"duration"
|
||||
]
|
||||
}
|
||||
],
|
||||
"model": {
|
||||
"composition": [],
|
||||
"relationships": {
|
||||
"modes": []
|
||||
},
|
||||
"start": {
|
||||
"timestamp": 0
|
||||
},
|
||||
"duration": {
|
||||
"timestamp": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "mode",
|
||||
"name": "Activity Mode",
|
||||
"cssClass": "icon-activity-mode",
|
||||
"features": [
|
||||
"creation"
|
||||
],
|
||||
"description": "When a sub-system utilizes Power or Communications resources over time, you can define those values in an Activity Mode. Activity Modes can then be linked to Activities to allow resource utilization graphing and estimating in a Timeline.",
|
||||
"priority": 500,
|
||||
"model": {
|
||||
"resources": {
|
||||
"comms": 0,
|
||||
"power": 0
|
||||
}
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"name": "Comms (Kbps)",
|
||||
"control": "textfield",
|
||||
"conversion": "number",
|
||||
"pattern": "^-?\\d+(\\.\\d*)?$",
|
||||
"property": [
|
||||
"resources",
|
||||
"comms"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Power (watts)",
|
||||
"control": "textfield",
|
||||
"conversion": "number",
|
||||
"pattern": "^-?\\d+(\\.\\d*)?$",
|
||||
"property": [
|
||||
"resources",
|
||||
"power"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"views": [
|
||||
{
|
||||
"key": "values",
|
||||
"name": "Values",
|
||||
"cssClass": "icon-activity-mode",
|
||||
"template": valuesTemplate,
|
||||
"type": "mode",
|
||||
"uses": [
|
||||
"cost"
|
||||
],
|
||||
"editable": false
|
||||
},
|
||||
{
|
||||
"key": "timeline",
|
||||
"name": "Timeline",
|
||||
"cssClass": "icon-timeline",
|
||||
"type": "timeline",
|
||||
"description": "A time-oriented container that lets you enclose and organize other Timelines and Activities. The Timeline view provides both tabular and Gantt views as well as resource utilization graphing of Activities.",
|
||||
"template": timelineTemplate,
|
||||
"editable": true,
|
||||
"toolbar": {
|
||||
"sections": [
|
||||
{
|
||||
"items": [
|
||||
{
|
||||
"method": "add",
|
||||
"control": "menu-button",
|
||||
"text": "Add",
|
||||
"options": [
|
||||
{
|
||||
"name": "Timeline",
|
||||
"cssClass": "icon-timeline",
|
||||
"key": "timeline"
|
||||
},
|
||||
{
|
||||
"name": "Activity",
|
||||
"cssClass": "icon-activity",
|
||||
"key": "activity"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
{
|
||||
"cssClass": "icon-plot-resource",
|
||||
"description": "Graph Resource Utilization",
|
||||
"control": "button",
|
||||
"method": "toggleGraph"
|
||||
},
|
||||
{
|
||||
"cssClass": "icon-activity-mode",
|
||||
"control": "dialog-button",
|
||||
"description": "Apply Activity Modes...",
|
||||
"title": "Apply Activity Modes",
|
||||
"dialog": {
|
||||
"control": "selector",
|
||||
"name": "Modes",
|
||||
"type": "mode",
|
||||
"layout": "controls-under"
|
||||
},
|
||||
"property": "modes"
|
||||
},
|
||||
{
|
||||
"cssClass": "icon-chain-links",
|
||||
"description": "Edit Activity Link",
|
||||
"title": "Activity Link",
|
||||
"control": "dialog-button",
|
||||
"dialog": {
|
||||
"control": "textfield",
|
||||
"name": "Link",
|
||||
"pattern": "^(ftp|https?)\\:\\/\\/\\w+(\\.\\w+)*(\\:\\d+)?(\\/\\S*)*$",
|
||||
"cssClass": "l-input-lg"
|
||||
},
|
||||
"property": "link"
|
||||
},
|
||||
{
|
||||
"cssClass": "icon-gear",
|
||||
"description": "Edit Properties...",
|
||||
"control": "button",
|
||||
"method": "properties"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
{
|
||||
"method": "remove",
|
||||
"description": "Remove Item",
|
||||
"control": "button",
|
||||
"cssClass": "icon-trash"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"stylesheets": [
|
||||
{
|
||||
"stylesheetUrl": "css/timeline.css"
|
||||
},
|
||||
{
|
||||
"stylesheetUrl": "css/timeline-espresso.css",
|
||||
"theme": "espresso"
|
||||
},
|
||||
{
|
||||
"stylesheetUrl": "css/timeline-snow.css",
|
||||
"theme": "snow"
|
||||
}
|
||||
],
|
||||
"representations": [
|
||||
{
|
||||
"key": "gantt",
|
||||
"template": activityGanttTemplate,
|
||||
"uses": [
|
||||
"timespan",
|
||||
"type"
|
||||
]
|
||||
}
|
||||
],
|
||||
"templates": [
|
||||
{
|
||||
"key": "timeline-tabular-swimlane-cols-tree",
|
||||
"priority": "mandatory",
|
||||
"template": tabularSwimlaneColsTreeTemplate
|
||||
},
|
||||
{
|
||||
"key": "timeline-tabular-swimlane-cols-data",
|
||||
"priority": "mandatory",
|
||||
"template": tabularSwimlaneColsDataTemplate
|
||||
},
|
||||
{
|
||||
"key": "timeline-resource-graphs",
|
||||
"priority": "mandatory",
|
||||
"template": resourceGraphsTemplate
|
||||
},
|
||||
{
|
||||
"key": "timeline-resource-graph-labels",
|
||||
"priority": "mandatory",
|
||||
"template": resourceGraphLabelsTemplate
|
||||
},
|
||||
{
|
||||
"key": "timeline-legend-item",
|
||||
"priority": "mandatory",
|
||||
"template": legendItemTemplate
|
||||
},
|
||||
{
|
||||
"key": "timeline-ticks",
|
||||
"priority": "mandatory",
|
||||
"template": ticksTemplate
|
||||
}
|
||||
],
|
||||
"controls": [
|
||||
{
|
||||
"key": "timeline-datetime",
|
||||
"template": datetimeTemplate
|
||||
},
|
||||
{
|
||||
"key": "duration",
|
||||
"template": datetimeTemplate
|
||||
}
|
||||
],
|
||||
"controllers": [
|
||||
{
|
||||
"key": "TimelineController",
|
||||
"implementation": TimelineController,
|
||||
"depends": [
|
||||
"$scope",
|
||||
"$q",
|
||||
"objectLoader",
|
||||
"TIMELINE_MINIMUM_DURATION"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "TimelineGraphController",
|
||||
"implementation": TimelineGraphController,
|
||||
"depends": [
|
||||
"$scope",
|
||||
"resources[]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "TimelineDateTimeController",
|
||||
"implementation": TimelineDateTimeController,
|
||||
"depends": [
|
||||
"$scope"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "TimelineZoomController",
|
||||
"implementation": TimelineZoomController,
|
||||
"depends": [
|
||||
"$scope",
|
||||
"$window",
|
||||
"TIMELINE_ZOOM_CONFIGURATION"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "TimelineTickController",
|
||||
"implementation": TimelineTickController
|
||||
},
|
||||
{
|
||||
"key": "TimelineTableController",
|
||||
"implementation": TimelineTableController
|
||||
},
|
||||
{
|
||||
"key": "TimelineGanttController",
|
||||
"implementation": TimelineGanttController,
|
||||
"depends": [
|
||||
"TIMELINE_MAXIMUM_OFFSCREEN"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "TimelineTOIController",
|
||||
"implementation": TimelineTOIController,
|
||||
"depends": [
|
||||
"openmct",
|
||||
"timerService",
|
||||
"$scope"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "ActivityModeValuesController",
|
||||
"implementation": ActivityModeValuesController,
|
||||
"depends": [
|
||||
"resources[]"
|
||||
]
|
||||
}
|
||||
],
|
||||
"capabilities": [
|
||||
{
|
||||
"key": "timespan",
|
||||
"implementation": ActivityTimespanCapability,
|
||||
"depends": [
|
||||
"$q"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "timespan",
|
||||
"implementation": TimelineTimespanCapability,
|
||||
"depends": [
|
||||
"$q"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "utilization",
|
||||
"implementation": UtilizationCapability,
|
||||
"depends": [
|
||||
"$q"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "graph",
|
||||
"implementation": GraphCapability,
|
||||
"depends": [
|
||||
"$q"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "cost",
|
||||
"implementation": CostCapability
|
||||
}
|
||||
],
|
||||
"directives": [
|
||||
{
|
||||
"key": "mctSwimlaneDrop",
|
||||
"implementation": MCTSwimlaneDrop,
|
||||
"depends": [
|
||||
"dndService"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "mctSwimlaneDrag",
|
||||
"implementation": MCTSwimlaneDrag,
|
||||
"depends": [
|
||||
"dndService"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "mctTimelineChart",
|
||||
"implementation": MCTTimelineChart,
|
||||
"depends": [
|
||||
"$interval",
|
||||
"$log"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "mctResourceGraphDrop",
|
||||
"implementation": MCTResourceGraphDrop,
|
||||
"depends": [
|
||||
"dndService"
|
||||
]
|
||||
}
|
||||
],
|
||||
"services": [
|
||||
{
|
||||
"key": "objectLoader",
|
||||
"implementation": ObjectLoader,
|
||||
"depends": [
|
||||
"$q"
|
||||
]
|
||||
}
|
||||
],
|
||||
"resources": [
|
||||
{
|
||||
"key": "power",
|
||||
"name": "Power",
|
||||
"units": "watts"
|
||||
},
|
||||
{
|
||||
"key": "comms",
|
||||
"name": "Comms",
|
||||
"units": "Kbps"
|
||||
},
|
||||
{
|
||||
"key": "battery",
|
||||
"name": "Battery State-of-Charge",
|
||||
"units": "%"
|
||||
key: "timeline",
|
||||
name: "Timeline",
|
||||
type: "timeline",
|
||||
description: "Timeline, Activity and Activity Mode objects have been deprecated and will no longer be supported. (07/18/2018)",
|
||||
template: deprecatedTimelineMessage
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,77 +0,0 @@
|
||||
.l-timeline-gantt {
|
||||
min-width: 2px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
top: $timelineSwimlaneGanttVM; bottom: $timelineSwimlaneGanttVM;
|
||||
|
||||
.bar {
|
||||
@include ellipsize();
|
||||
height: $activityBarH;
|
||||
line-height: $activityBarH;
|
||||
padding: 0 $interiorMargin;
|
||||
|
||||
span {
|
||||
$iconW: 20px;
|
||||
@include absPosDefault();
|
||||
display: block;
|
||||
&.s-activity-type {
|
||||
right: auto; width: $iconW;
|
||||
text-align: center;
|
||||
&.timeline {
|
||||
&:before {
|
||||
content:"S";
|
||||
}
|
||||
}
|
||||
&.activity {
|
||||
&:before {
|
||||
content:"A";
|
||||
}
|
||||
}
|
||||
}
|
||||
&.s-title {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
left: $iconW;
|
||||
}
|
||||
&.duration {
|
||||
left: auto;
|
||||
opacity: 0.75;
|
||||
right: 0;
|
||||
text-align: right;
|
||||
width: 60px;
|
||||
}
|
||||
&.handle {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
height: auto;
|
||||
width: 15px;
|
||||
&.left {
|
||||
right: auto;
|
||||
}
|
||||
&.middle {
|
||||
right: 15px;
|
||||
left: 15px;
|
||||
width: auto;
|
||||
}
|
||||
&.right {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&.sm .bar span {
|
||||
// Hide icon and label if width is too small
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.edit-mode .s-timeline-gantt,
|
||||
.s-status-editing .s-timeline-gantt {
|
||||
.handle {
|
||||
cursor: col-resize;
|
||||
&.mid {
|
||||
cursor: ew-resize;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, 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.
|
||||
*****************************************************************************/
|
||||
|
||||
// General
|
||||
$timelineHeaderColorBg: pullForward($colorBodyBg, 5%);
|
||||
$timelineColorAlt1: pullForward($timelineHeaderColorBg, 10%);
|
||||
$colorGanttBarBg: #5555aa;
|
||||
$colorGanttBarFg: #fff;
|
||||
$colorGanttBarSelectedBg: #ccc;
|
||||
$colorGanttBarSelectedFg: #333;
|
||||
$colorGanttBarTabularFgIcon: #8594ff;
|
||||
|
||||
// Swimlane colors
|
||||
$colorDropTarg: rgba($colorGanttBarBg, 0.4);
|
||||
$colorSwimlaneSelectedBg: #222;
|
||||
$colorSwimlaneSelectedFg: #ccc;
|
||||
$colorGanttToggle: $colorKey;
|
||||
$shdwGanttBar: rgba(black, 0.4) 0 1px 3px;
|
||||
|
||||
// Resource graphs
|
||||
$timelineResourceGraphBg: rgba(black, 0.2);
|
||||
$timelineResourceGraphFg: $colorBodyFg;
|
||||
$timelineResourceGraphLegendFg: $colorBodyFg;
|
@ -1,42 +0,0 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, 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.
|
||||
*****************************************************************************/
|
||||
|
||||
// General
|
||||
$timelineHeaderColorBg: pullForward($colorBodyBg, 5%);
|
||||
$timelineColorAlt1: pullForward($timelineHeaderColorBg, 10%);
|
||||
$colorGanttBarBg: #5555aa;
|
||||
$colorGanttBarFg: #fff;
|
||||
$colorGanttBarSelectedBg: $colorGanttBarBg;
|
||||
$colorGanttBarSelectedFg: $colorGanttBarFg;
|
||||
$colorGanttBarTabularFgIcon: #8594ff;
|
||||
|
||||
// Swimlane colors
|
||||
$colorDropTarg: rgba($colorGanttBarBg, 0.4);
|
||||
$colorSwimlaneSelectedBg: rgba($colorGanttBarBg, 0.25);
|
||||
$colorSwimlaneSelectedFg: pullForward($colorBodyFg, 10%);
|
||||
$colorGanttToggle: $colorKey;
|
||||
$shdwGanttBar: rgba(black, 0.1) 0 1px 3px;
|
||||
|
||||
// Resource graphs
|
||||
$timelineResourceGraphBg: $colorPlotBg;
|
||||
$timelineResourceGraphFg: $colorBodyFg;
|
||||
$timelineResourceGraphLegendFg: $colorBodyFg;
|
@ -1,63 +0,0 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, 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.
|
||||
*****************************************************************************/
|
||||
@mixin activityBg($bg, $gamma: 10) {
|
||||
@include background-image(linear-gradient(lighten($bg, $gamma), $bg));
|
||||
}
|
||||
|
||||
// Timeline constants
|
||||
$activityBarH: 17px;
|
||||
$timelinePaneLeftW: 30%;
|
||||
$timelinePaneBtmH: 30%;
|
||||
$timelineResourceGraphYLabelsMargin: 70px;
|
||||
$timelineTopPaneHeaderH: 30px;
|
||||
|
||||
$timelineSwimlaneGanttVM: 2px; // The vertical space above and below the gantt bars
|
||||
$timelineSwimlaneH: $activityBarH + ($timelineSwimlaneGanttVM * 2);
|
||||
$timelineTopPaneHeaderElemMargin: $interiorMargin;
|
||||
|
||||
// Timeline Tabular constants
|
||||
$timelineColIconW: 16px;
|
||||
$timelineColResourcePlotW: $timelineColIconW;
|
||||
$timelineColTitleW: 250px;
|
||||
$timelineColDatetimeW: 110px;
|
||||
$timelineColDurationW: 70px;
|
||||
$timelineColActivityModesW: $timelineColTitleW;
|
||||
$timelineColPadR: 50px;
|
||||
$timelineTabularTitleW: $timelineColResourcePlotW + $timelineColTitleW;
|
||||
$timelineTabularDataW: ($timelineColDatetimeW * 2) + $timelineColDurationW + $timelineColActivityModesW + $timelineColPadR;
|
||||
|
||||
|
||||
// // Ported from legacy timelines SASS
|
||||
$activitiesHolderM: 30px;
|
||||
$scenarioTopPad: 25px;
|
||||
$swimlaneVM: 2px;
|
||||
$timelineVM: 10px;
|
||||
$timelineBPad: $interiorMargin * 2;
|
||||
$graphResourceSummaryH: 200px;
|
||||
$graphResourceSummaryLegendH: 20px;
|
||||
$scenarioTimelineSummaryH: 20px;
|
||||
$scenarioTimelineSummaryHExpanded: $graphResourceSummaryH + 30px;
|
||||
$scenarioPanZoomSliderH: 16px;
|
||||
$scenarioTicksH: 7px;
|
||||
$scenarioTickLabelsH: 10px;
|
||||
|
||||
|
@ -1,185 +0,0 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, 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.
|
||||
*****************************************************************************/
|
||||
.l-timeline-holder {
|
||||
.l-timeline-pane {
|
||||
&.t-pane-h {
|
||||
&.l-timeline-resource-legend {
|
||||
.l-legend-items {
|
||||
color: $timelineResourceGraphLegendFg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Follow Line
|
||||
.l-follow-line {
|
||||
// TODO: move before and after into l-timeline-gantt so those only render in that pane
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
top: 0; bottom: 0;
|
||||
width: 1px;
|
||||
z-index: 9; // Just below .l-hover-btns-holder
|
||||
}
|
||||
}
|
||||
|
||||
.l-timeline-gantt {
|
||||
.l-follow-line {
|
||||
$d: 0.8rem;
|
||||
top: $interiorMargin;
|
||||
&:before,
|
||||
&:after {
|
||||
content: '';
|
||||
display: block;
|
||||
height: $d;
|
||||
width: $d;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
&:before {
|
||||
// Icon blocker
|
||||
width: 2 * $d;
|
||||
}
|
||||
&:after {
|
||||
// Icon
|
||||
font-size: $d;
|
||||
line-height: $d;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.s-timeline-gantt {
|
||||
.bar {
|
||||
color: $colorGanttBarFg;
|
||||
@include activityBg($colorGanttBarBg);
|
||||
box-shadow: $shdwGanttBar;
|
||||
.s-toggle {
|
||||
color: $colorGanttToggle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.s-timeline-tabular {
|
||||
.l-header .l-cols {
|
||||
.l-col {
|
||||
border-left: 1px solid pullForward($timelineHeaderColorBg, 15%);
|
||||
}
|
||||
}
|
||||
|
||||
.l-pane-l {
|
||||
// Left pane of the tabular area
|
||||
.l-cols {
|
||||
.t-object-label .t-item-icon {
|
||||
color: pullForward($colorGanttBarBg, 10%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.edit-mode .s-timeline-gantt,
|
||||
.s-status-editing .s-timeline-gantt {
|
||||
.bar {
|
||||
&:hover {
|
||||
@include background-image(linear-gradient(lighten($colorGanttBarBg, 20), lighten($colorGanttBarBg, 10)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************** STYLING
|
||||
.s-timeline {
|
||||
font-size: 0.75rem;
|
||||
.s-header {
|
||||
background-color: $timelineHeaderColorBg;
|
||||
}
|
||||
.s-swimlane {
|
||||
border-bottom: 1px solid pullForward($colorBodyBg, 10%);
|
||||
line-height: $activityBarH + 2 + 1;
|
||||
&.exceeded {
|
||||
@include bgDiagonalStripes(#fff, 0.05, $timelineSwimlaneH + 1);
|
||||
}
|
||||
|
||||
&.selected {
|
||||
background-color: $colorSwimlaneSelectedBg;
|
||||
color: $colorSwimlaneSelectedFg;
|
||||
|
||||
.s-timeline-gantt .bar {
|
||||
@include activityBg($colorGanttBarSelectedBg, 10);
|
||||
color: $colorGanttBarSelectedFg;
|
||||
}
|
||||
}
|
||||
|
||||
&.drop-into {
|
||||
background-color: rgba($colorDropTarg, 0.7);
|
||||
.s-timeline-gantt {
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
&.drop-after {
|
||||
background-color: rgba(#000, 0.2);
|
||||
border-bottom-color: rgba($colorDropTarg, 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
.s-ticks {
|
||||
@include bgTicks( $timelineColorAlt1);
|
||||
}
|
||||
.s-hover-btns-holder {
|
||||
$bg: $timelineHeaderColorBg;
|
||||
$l: 5%;
|
||||
@include user-select(none);
|
||||
@include background-image(linear-gradient(-90deg, rgba($bg, 1), rgba($bg, 1) 75%, rgba($bg, 0) 100%));
|
||||
}
|
||||
|
||||
.l-timeline-resource-graph {
|
||||
.l-graph {
|
||||
background: $timelineResourceGraphBg;
|
||||
}
|
||||
.l-title {
|
||||
color: $timelineResourceGraphFg;
|
||||
}
|
||||
}
|
||||
|
||||
.s-follow-line {
|
||||
background: rgba($timeControllerToiLineColor, 0.5);
|
||||
}
|
||||
|
||||
.s-timeline-gantt {
|
||||
.s-follow-line {
|
||||
&:after {
|
||||
// Icon
|
||||
color: $timeControllerToiLineColor;
|
||||
content: $glyph-icon-timer;
|
||||
font-family: symbolsfont;
|
||||
text-shadow: $shdwItemText;
|
||||
}
|
||||
&:before {
|
||||
// Blocker
|
||||
$bg: $timelineHeaderColorBg;
|
||||
$l: 30%;
|
||||
@include background-image(linear-gradient(90deg, rgba($bg, 0), rgba($bg, 1) $l, rgba($bg, 1) 100% - $l, rgba($bg, 0)));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,333 +0,0 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, 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.
|
||||
*****************************************************************************/
|
||||
//*************************************************************** LAYOUT
|
||||
.l-timeline-holder {
|
||||
@include absPosDefault();
|
||||
|
||||
&.split-layout {
|
||||
>.splitter {
|
||||
// Top of splitter within Timelines should be 0
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.l-header {
|
||||
@include user-select(none);
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.l-timeline-pane {
|
||||
@include absPosDefault();
|
||||
|
||||
&.drop-over {
|
||||
background-color: lighten($colorEditAreaBg, 5%);
|
||||
}
|
||||
|
||||
.l-width-control {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.l-swimlanes-holder {
|
||||
@include absPosDefault();
|
||||
top: $timelineTopPaneHeaderH + 1;
|
||||
.l-col.l-plot-resource {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
// Overall layout
|
||||
&.t-pane-h {
|
||||
&.s-timeline-tabular .t-pane-v {
|
||||
// Vertical panes within tabular area
|
||||
@include absPosDefault();
|
||||
&.l-tabular-l {
|
||||
// Tree area with item title
|
||||
right: auto; // Set this to auto and uncomment width below when additional tabular columns are added
|
||||
width: $timelineTabularTitleW;
|
||||
.l-swimlanes-holder {
|
||||
bottom: $scrollbarTrackSize;
|
||||
}
|
||||
}
|
||||
&.l-tabular-r {
|
||||
// Start, end, duration, activity modes columns
|
||||
@include scrollH(scroll);
|
||||
left: $timelineTabularTitleW;
|
||||
.l-width {
|
||||
@include absPosDefault(0, visible);
|
||||
min-width: $timelineTabularDataW;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.l-timeline-gantt {
|
||||
.abs.l-timeline-gantt-header-w {
|
||||
overflow: hidden;
|
||||
height: $timelineTopPaneHeaderH;
|
||||
}
|
||||
.l-swimlanes-holder {
|
||||
@include scrollV(scroll);
|
||||
bottom: $scrollbarTrackSize;
|
||||
}
|
||||
}
|
||||
&.l-timeline-resource-legend {
|
||||
box-sizing: border-box;
|
||||
padding: $interiorMargin 0;
|
||||
white-space: nowrap;
|
||||
|
||||
.l-legend-items {
|
||||
@include absPosDefault();
|
||||
@include scrollV();
|
||||
top: 25px;
|
||||
}
|
||||
.legend-item {
|
||||
// Inherits from /platform/commonUI/general/res/sass/plots/_plots-main.scss
|
||||
display: block;
|
||||
margin-bottom: $interiorMarginSm;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
.color-swatch {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
.title-label {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.l-timeline-resource-graph {
|
||||
$m: $interiorMargin;
|
||||
|
||||
.l-graphs-holder {
|
||||
@include absPosDefault();
|
||||
bottom: $scrollbarTrackSize;
|
||||
|
||||
.l-graphs {
|
||||
@include absPosDefault();
|
||||
@include scrollV(scroll);
|
||||
}
|
||||
|
||||
.l-graph-labels-holder {
|
||||
@include absPosDefault();
|
||||
overflow: hidden;
|
||||
right: auto;
|
||||
width: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
.l-scroll-control {
|
||||
@include absPosDefault();
|
||||
overflow-x: scroll;
|
||||
overflow-y: hidden;
|
||||
top: auto; right: $scrollbarTrackSize;
|
||||
height: $scrollbarTrackSize;
|
||||
.l-width-control {
|
||||
height: 10px; // Need to add height to force scrollbar to appear
|
||||
}
|
||||
}
|
||||
|
||||
.l-graph,
|
||||
.l-graph-labels {
|
||||
height: 80px;
|
||||
margin-bottom: $interiorMarginSm;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.l-title {
|
||||
@include ellipsize();
|
||||
top: $m; left: $m;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.l-graph {
|
||||
width: 100%;
|
||||
.l-graph-area {
|
||||
canvas {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.l-graph-labels {
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.l-graph-area {
|
||||
@include absPosDefault();
|
||||
top: 20px; bottom: 5px;
|
||||
.l-labels-holder {
|
||||
@include absPosDefault();
|
||||
justify-content: space-between;
|
||||
left: $m;
|
||||
.t-resource-graph-tick-label {
|
||||
font-size: 0.9em;
|
||||
&.tick-label-y {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.l-pane-l {
|
||||
right: auto;
|
||||
min-width: 50px;
|
||||
max-width: 90%;
|
||||
width: $timelinePaneLeftW;
|
||||
}
|
||||
|
||||
&.l-pane-r {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
&.l-pane-top {
|
||||
bottom: $timelinePaneBtmH;
|
||||
}
|
||||
&.l-pane-btm {
|
||||
top: auto;
|
||||
min-height: 20px;
|
||||
max-height: 80%;
|
||||
height: $timelinePaneBtmH;
|
||||
}
|
||||
}
|
||||
|
||||
.l-swimlane {
|
||||
height: $timelineSwimlaneH;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
// Header
|
||||
.s-timeline-tabular .l-header,
|
||||
.s-timeline-gantt .l-header {
|
||||
@include absPosDefault(0, visible);
|
||||
bottom: auto; height: $timelineTopPaneHeaderH;
|
||||
|
||||
.l-header-elem {
|
||||
@include absPosDefault($timelineTopPaneHeaderElemMargin, visible);
|
||||
display: block;
|
||||
&.l-labels {
|
||||
.l-label {
|
||||
position: absolute;
|
||||
width: 140px;
|
||||
margin-left: -70px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.l-hover-btns-holder {
|
||||
@include absPosDefault();
|
||||
box-sizing: border-box;
|
||||
height: $timelineTopPaneHeaderH;
|
||||
left: auto;
|
||||
padding: $interiorMargin $interiorMargin $interiorMargin $interiorMargin * 10;
|
||||
text-align: right;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
// Tabular Columns
|
||||
.l-cols {
|
||||
@include absPosDefault(0, visible);
|
||||
text-wrap: none;
|
||||
white-space: nowrap;
|
||||
.l-col {
|
||||
box-sizing: border-box;
|
||||
@include ellipsize();
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
padding: 0 $interiorMargin;
|
||||
position: relative;
|
||||
text-wrap: none;
|
||||
white-space: nowrap;
|
||||
|
||||
&.l-col-icon {
|
||||
width: $timelineColIconW;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&.l-plot-resource {
|
||||
border-left: none !important;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
&.l-title {
|
||||
width: $timelineColTitleW;
|
||||
.rep-object-label {
|
||||
border-radius: $basicCr;
|
||||
display: inline-block;
|
||||
padding: 0 $interiorMargin;
|
||||
}
|
||||
}
|
||||
|
||||
&.l-start,
|
||||
&.l-end,
|
||||
&.l-duration {
|
||||
width: $timelineColDatetimeW;
|
||||
}
|
||||
|
||||
&.l-activity-modes {
|
||||
display: none; // Temp, until modes can be displayed
|
||||
width: $timelineColActivityModesW;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.s-timeline-tabular {
|
||||
.l-header .l-cols {
|
||||
top: $timelineTopPaneHeaderElemMargin; bottom: $timelineTopPaneHeaderElemMargin;
|
||||
}
|
||||
|
||||
.l-pane-l {
|
||||
// Left pane of the tabular area
|
||||
.l-cols {
|
||||
left: $timelineTopPaneHeaderElemMargin;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Ticks
|
||||
.l-ticks,
|
||||
.l-subticks {
|
||||
@include absPosDefault();
|
||||
top: auto; bottom: $interiorMarginSm;
|
||||
}
|
||||
|
||||
.l-ticks {
|
||||
height: 10px
|
||||
}
|
||||
|
||||
.l-subticks {
|
||||
height: 5px
|
||||
}
|
||||
}
|
||||
|
||||
.s-status-editing .l-title .rep-object-label[draggable="true"] {
|
||||
@include transition(background-color, 0.25s);
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
background-color: $colorItemTreeHoverBg;
|
||||
}
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, 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.
|
||||
*****************************************************************************/
|
||||
$output-bourbon-deprecation-warnings: false;
|
||||
@import "bourbon";
|
||||
|
||||
@import "../../../../commonUI/general/res/sass/constants";
|
||||
@import "../../../../commonUI/general/res/sass/mixins";
|
||||
@import "../../../../commonUI/general/res/sass/glyphs";
|
||||
@import "../../../../commonUI/themes/espresso/res/sass/constants";
|
||||
@import "../../../../commonUI/themes/espresso/res/sass/mixins";
|
||||
@import "constants";
|
||||
@import "constants-espresso";
|
||||
@import "timeline-thematic";
|
||||
|