mirror of
https://github.com/nasa/openmct.git
synced 2025-01-03 20:04:09 +00:00
79b4f9a0f4
Closes https://github.com/nasa/openmct/pull/1287. Squashed commit of the following: commit af9ba3095859684cb2465f1d5222a14db231fdb7 Merge:c98286d
31308b1
Author: Pete Richards <peter.l.richards@nasa.gov> Date: Fri Nov 25 14:57:32 2016 -0800 Merge branch 'open1193' into open1287-integration Resolve conflicts in glyph files as documented in pull request: https://github.com/nasa/openmct/pull/1287#issuecomment-263030180 Closes https://github.com/nasa/openmct/pull/1287 commit31308b1076
Author: Andrew Henry <andrew.k.henry@nasa.gov> Date: Tue Nov 22 17:08:10 2016 +0000 [Time Conductor] Addressed code review comments. Fixes #1287 commitdb6386e21c
Author: Henry <akhenry@gmail.com> Date: Wed Nov 9 11:52:39 2016 -0800 Removed redundant ConductorService commita9ec8db8c6
Merge:fc36674
dfa4591
Author: Henry <akhenry@gmail.com> Date: Wed Nov 9 08:23:07 2016 -0800 Merge branch 'master' into open1193 commitfc36674b5c
Author: Henry <akhenry@gmail.com> Date: Wed Nov 9 08:23:01 2016 -0800 Updated wording of docs commitd0906baccf
Author: Henry <akhenry@gmail.com> Date: Fri Nov 4 10:48:05 2016 -0700 Fixed TOI not showing commit099c56c407
Author: Henry <akhenry@gmail.com> Date: Fri Oct 28 16:46:06 2016 -0700 Fixed failing tests commit7cc008ed01
Author: Henry <akhenry@gmail.com> Date: Fri Oct 28 10:28:41 2016 -0700 Added tests for tables, TOI controller commitb0901e83cb
Author: Henry <akhenry@gmail.com> Date: Thu Oct 27 10:42:31 2016 -0700 Added tests for ConductorAxisController and TimeConductor commitdfed0a0783
Author: Henry <akhenry@gmail.com> Date: Wed Oct 26 18:07:50 2016 -0700 Added ConductorAxisController tests commitc3322e3847
Author: Henry <akhenry@gmail.com> Date: Tue Oct 25 20:54:24 2016 -0700 Added tests for MctTableController commit8e76ebb5a8
Author: Henry <akhenry@gmail.com> Date: Tue Oct 25 15:48:15 2016 -0700 Removed debugging code commit93735bc404
Author: Henry <akhenry@gmail.com> Date: Mon Oct 24 15:13:45 2016 -0700 Removed bundle definition of MctAxisController Documenting code commita942541724
Author: Henry <akhenry@gmail.com> Date: Sun Oct 23 19:54:01 2016 -0700 [Time Conductor] Fixed memory leak due to listeners not being deregistered commit49e600dcc9
Author: Henry <akhenry@gmail.com> Date: Sat Oct 22 16:47:11 2016 -0700 [Time Conductor] Fixed zoom slider behavior commitf5806613b9
Author: Henry <akhenry@gmail.com> Date: Sat Oct 22 14:46:14 2016 -0700 [Time Conductor] support TOI from real-time tables commit029d2b3058
Author: Henry <akhenry@gmail.com> Date: Thu Oct 20 14:32:34 2016 -0700 [Examples] Simplified MSL example, fixed object tree not loading by default, renamed. Fixes #1256. Fixes #1255 commit482eb4a5e8
Author: Henry <akhenry@gmail.com> Date: Sat Oct 22 13:09:05 2016 -0700 [Time Conductor] Using new API commit843c678b0b
Merge:b56ab0a
08ca765
Author: Henry <akhenry@gmail.com> Date: Fri Oct 21 10:21:22 2016 -0700 In process of merging commitb56ab0aac2
Author: Henry <akhenry@gmail.com> Date: Wed Oct 19 16:30:26 2016 -0700 [Time Conductor] Implement default sort, fix unpredictable positioning using % left, set TOI on conductor init. #1193 commitd12ae77d95
Author: Henry <akhenry@gmail.com> Date: Wed Oct 19 11:29:42 2016 -0700 Further TOI improvements commit22564473b5
Merge:9f3ec3b
86b51f6
Author: Henry <akhenry@gmail.com> Date: Tue Oct 18 16:32:12 2016 -0700 Merge branch 'open1193' of https://github.com/nasa/openmctweb into open1193 commit9f3ec3b18f
Author: Henry <akhenry@gmail.com> Date: Tue Oct 18 16:31:59 2016 -0700 Fixed issue with scrolling to row after bounds change commit86b51f6cde
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Mon Oct 17 17:19:50 2016 -0700 [Frontend] Small refactor for mct-include Fixes #933 Fixes #1193 Markup and CSS tweaked to support using mct-include as the main container for the TOI element; TC, plots and tables all updated. commitdadca62955
Author: Henry <akhenry@gmail.com> Date: Mon Oct 17 15:54:34 2016 -0700 Positioning of TOI in tables and plots commit7a09bc1339
Author: Henry <akhenry@gmail.com> Date: Mon Oct 17 10:11:59 2016 -0700 Migrated TOI functionality to common controller commit6bea6b3bc2
Merge:660757f
8f67cbd
Author: Henry <akhenry@gmail.com> Date: Fri Oct 14 14:38:57 2016 -0700 Merge branch 'open1193' of https://github.com/nasa/openmctweb into open1193 commit660757fc1c
Author: Henry <akhenry@gmail.com> Date: Fri Oct 14 14:38:46 2016 -0700 Added TimeOfInterestController commit8f67cbd717
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Fri Oct 14 11:33:35 2016 -0700 [Frontend] Fixed cursor: grab on Time Conductor Fixes #933 Fixes #1193 Moved cursor: grab into mixin; sass cleanups commit07a4e26317
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Fri Oct 14 11:03:23 2016 -0700 [Frontend] TOI finalizing Fixes #933 Fixes #1193 HTML template cleaned up; checked in snow theme, theme colors tweaked; padding finalized; now uses val-to-left instead of -to-right; commit271c788f20
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Fri Oct 14 10:22:26 2016 -0700 [Frontend] TOI in tables Fixes #933 Fixes #1193 WIP commitb7e8a1b378
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Thu Oct 13 15:55:48 2016 -0700 [Frontend] Styling for TOI element Fixes #933 Fixes #1193 WIP: Table TOI element in progress commit6042e4ad58
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Thu Oct 13 13:46:27 2016 -0700 [Frontend] Styling for TOI element Fixes #933 Fixes #1193 WIP: plots and TC done, moving on to tables; moved sass into conductor-v2; moved constants; commit1a534301c5
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Thu Oct 13 11:42:10 2016 -0700 [Frontend] Refactor TOI element Fixes #933 Fixes #1193 WIP; TOI as mct-include; layout uses flex-box; preparing to move TOI sass into conductor-v2 directory; commit42acf9255e
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Wed Oct 12 18:34:51 2016 -0700 [Frontend] Adding resync and dedicated unpin buttons Fixes #933 Fixes #1193 VERY WIP! commit3f0eb0b7cb
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Wed Oct 12 18:33:53 2016 -0700 [Frontend] New glyphs for use by TOI Fixes #933 Fixes #1193 Symbols font updated commit086307ba3a
Author: Henry <akhenry@gmail.com> Date: Tue Oct 11 17:16:51 2016 -0700 Fixed scrolling behavior with TOI commit938bf3c4df
Merge:3910437
8b2047c
Author: Henry <akhenry@gmail.com> Date: Tue Oct 11 13:26:20 2016 -0700 Merge branch 'open1182' into open1193 commit8b2047ca32
Author: Henry <akhenry@gmail.com> Date: Tue Oct 11 13:25:24 2016 -0700 Fixed issue with setting deltas commit3910437033
Merge:70c4ce2
02c543f
Author: Henry <akhenry@gmail.com> Date: Tue Oct 11 12:48:37 2016 -0700 Merged changes to zoom commit02c543fddc
Author: Henry <akhenry@gmail.com> Date: Tue Oct 11 12:45:18 2016 -0700 Fixed zoom in real-time mode commit70c4ce24e4
Author: Henry <akhenry@gmail.com> Date: Fri Oct 7 17:57:14 2016 -0700 Added support for clicking row to set TOI commitb995a8b87b
Merge:51a9557
b384e84
Author: Henry <akhenry@gmail.com> Date: Fri Oct 7 16:11:59 2016 -0700 Merged from open1182 commitb384e84872
Merge:5babf72
07140b1
Author: Henry <akhenry@gmail.com> Date: Fri Oct 7 15:02:41 2016 -0700 Merge branch 'open933' into open1182 commit07140b179f
Merge:3e9c0eb
cbd001e
Author: Henry <akhenry@gmail.com> Date: Fri Oct 7 14:54:18 2016 -0700 Merge branch 'master' into open933 commit51a95575f7
Author: Henry <akhenry@gmail.com> Date: Fri Oct 7 14:51:59 2016 -0700 [Time Conductor] Refactored time of interest as optional generic behavior of MctTable commitdfbbc3b0c5
Merge:430645b
47a0aba
Author: Henry <akhenry@gmail.com> Date: Thu Oct 6 10:23:42 2016 -0700 alt-click to select TOI from table commit3e9c0eb7a5
Merge:f1d2072
8a00181
Author: Henry <akhenry@gmail.com> Date: Wed Oct 5 12:25:04 2016 -0700 Merged from master to resolve build issues commitf1d2072bb9
Author: Henry <akhenry@gmail.com> Date: Wed Oct 5 11:17:22 2016 -0700 Added license information commit430645b1f2
Author: Henry <akhenry@gmail.com> Date: Wed Oct 5 09:04:13 2016 -0700 TOI working in time conductor commit47a0aba601
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Tue Oct 4 18:12:01 2016 -0700 [Frontend] TOI sass and markup sanding Fixes #933 Fixes #1193 Color tweaks; Cleanups, commented code removal, etc.; tightened up tabular padding and font sizes; commit0ed0a48a8c
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Tue Oct 4 15:49:18 2016 -0700 [Frontend] Styling for TOI element Fixes #933 Fixes #1193 Tabular styling for TOI; commit1650aae518
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Mon Oct 3 15:56:56 2016 -0700 [Frontend] Styling for TOI element Fixes #933 Fixes #1193 WIP: Tabular styling for TOI; TODO: make bottom border work commitd3bf6c5857
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Mon Oct 3 15:15:56 2016 -0700 [Frontend] Styling for TOI element Fixes #933 Fixes #1193 WIP: Markup and CSS for plots and TC near complete; TODO: revised styling in tabular views; commit5cd0c8a4fa
Author: Henry <akhenry@gmail.com> Date: Fri Sep 30 12:41:14 2016 -0700 [Time Conductor] merged from open1182 commit5babf7274d
Author: Henry <akhenry@gmail.com> Date: Thu Sep 29 11:21:11 2016 -0700 [Time Conductor] Tweaked the break points for zoom level indicator commit22da34870d
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Thu Sep 29 10:41:21 2016 -0700 [Frontend] Styling for TOI element Fixes #933 Fixes #1193 WIP: Markup and CSS revisions for updated UX approach; TODO: cosmetic CSS commit99253a5904
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Tue Sep 27 20:42:33 2016 -0700 [Frontend] Styling for TOI element Fixes #933 Fixes #1193 WIP: Markup and CSS revisions for updated UX approach commit2db4aa6235
Author: Henry <akhenry@gmail.com> Date: Fri Sep 23 13:06:22 2016 -0700 [Time Conductor] Added zoom level label commitbb2ae2f8d1
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Fri Sep 23 11:07:06 2016 -0700 [Frontend] Styling for TOI element Fixes #933 Fixes #1193 Finalized TOI in plots, table and TC commit0cf4c92555
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Thu Sep 22 19:15:10 2016 -0700 [Frontend] Styling for TOI element in tables Fixes #933 Fixes #1193 WIP: styling in tabular mostly done, needs more unit testing TODO: fix hide/show for pinned TOI in plots - don't show pinned TOI on hover when not .active commit3c95c095f1
Author: Henry <akhenry@gmail.com> Date: Thu Sep 22 17:22:25 2016 -0700 [Time Conductor] Refactored out use of angular event bus in favor of making TimeConductorViewService an event emitter. commitadbcc407ef
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Thu Sep 22 16:06:45 2016 -0700 [Frontend] Styling for TOI element Fixes #933 Fixes #1193 WIP: TOI in tables commit1c3bd69b66
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Thu Sep 22 16:06:16 2016 -0700 [Frontend] Styling for TOI element, some refactoring Fixes #933 Fixes #1193 Moves some TOI styling into dedicated new scss file; Enhancements to TOI in plots to bring into parity with TOI in TC approach; commit49ee5cb74b
Author: Henry <akhenry@gmail.com> Date: Thu Sep 22 15:18:48 2016 -0700 [Time Conductor] Destroy listeners in ConductorAxisController commit1a93ba2c3d
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Thu Sep 22 15:09:42 2016 -0700 [Frontend] Styling for TOI element in TC Fixes #933 Fixes #1193 Final for now; both types of TOI added to TC markup; Hover behavior; constant values in the right places; commit98122cc730
Author: Henry <akhenry@gmail.com> Date: Tue Sep 20 11:40:58 2016 -0700 [Time Conductor] Added Zoom commit7fcafb6b58
Author: Henry <akhenry@gmail.com> Date: Mon Sep 12 16:53:48 2016 -0700 [Time Conductor] Added pan to Time Conductor commitd77922d66c
Author: Pete Richards <pete@pete-richards.com> Date: Thu Sep 15 09:37:11 2016 -0700 Revert "[proxyUrl] pass URL parameters to proxied URL" commit2e81550c86
Author: Victor Woeltjen <victor.woeltjen@nasa.gov> Date: Wed Sep 14 10:16:33 2016 -0700 Revert "[Build] Check dependencies for vulnerabilities" commit8eb7585653
Author: Victor Woeltjen <victor.woeltjen@nasa.gov> Date: Mon Aug 29 10:58:02 2016 -0700 [README] Warn about root installation issues Mitigates #1151. commit904d56a089
Author: Henry <akhenry@gmail.com> Date: Thu Sep 22 13:32:43 2016 -0700 [Time Conductor] #933 Clean up time conductor listeners on scope destruction commitc0a96b3c5f
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Thu Sep 22 10:33:05 2016 -0700 [Frontend] Styling for TOI element in TC Fixes #933 Fixes #1193 WIP, tweaking TOI in TC commit27e6caf69b
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Fri Sep 16 18:51:51 2016 -0700 [Frontend] Styling for TOI element in plots Fixes #933 Fixes #1193 Relates to #1182 WIP, adding TOI to plot view; Integrated Andrew's work from #1182; Significant changes to markup and additions to plot scss; commit2c7ae95106
Merge:2c81b72
41a160f
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Fri Sep 16 15:11:25 2016 -0700 Merge branch 'open1182' into open1193 commit41a160fc4f
Merge:92a80c3
156ba83
Author: Henry <akhenry@gmail.com> Date: Fri Sep 16 14:25:49 2016 -0700 Merge branch 'master' into open1182 commit92a80c39cb
Author: Henry <akhenry@gmail.com> Date: Mon Sep 12 16:53:48 2016 -0700 [Time Conductor] Added pan to Time Conductor commit2c81b72d60
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Thu Sep 15 16:02:30 2016 -0700 [Frontend] Styling for TOI element in plots Fixes #933 Fixes #1193 WIP, adding TOI to plot view. commit9e2debf801
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Thu Sep 15 15:43:29 2016 -0700 [Frontend] Styling for TC's TOI element Fixes #933 Fixes #1193 I lied in my last commit - one more alignment tweak needed. Now I'm done. commit35872e284c
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Thu Sep 15 15:40:03 2016 -0700 [Frontend] Styling for TC's TOI element Fixes #933 Fixes #1193 TOI in TC done for now. commit98e67f8dfb
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Thu Sep 15 14:55:06 2016 -0700 [Frontend] Styling for TC's TOI element Fixes #933 Fixes #1193 WIP: adjust spacing; added pagination buttons commitf912b9e273
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Wed Sep 14 18:40:55 2016 -0700 [Frontend] Styling for TC's TOI element Fixes #933 WIP, TC v2 changes commit2df1e2b508
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Wed Sep 14 18:40:29 2016 -0700 [Frontend] Styling for TC's TOI element Fixes #933 WIP, global changes commit9e85341aaa
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Wed Sep 14 15:16:16 2016 -0700 [Frontend] Fixed color for TC clock hands Fixes #933 commit11e06039ec
Merge:a1331b7
f732387
Author: Henry <akhenry@gmail.com> Date: Tue Sep 13 13:25:37 2016 -0700 Merge branch 'master' into open933 commita1331b7bb3
Merge:d1960b2
e73bb4f
Author: Henry <akhenry@gmail.com> Date: Mon Sep 12 15:07:05 2016 -0700 Merge branch 'master' into open933 commitd1960b2f46
Author: Henry <akhenry@gmail.com> Date: Mon Sep 12 14:54:16 2016 -0700 [Time Conductor] Resolved merge conflicts commit9a06325533
Merge:e639e05
4c6ca58
Author: Henry <akhenry@gmail.com> Date: Mon Sep 12 14:39:24 2016 -0700 Merge branch 'master' into open933 commite639e056ba
Author: Henry <akhenry@gmail.com> Date: Fri Sep 9 16:39:21 2016 -0700 [Time Conductor] Fixing bugs found in smoke testing. Fixes #933 commitfbab890081
Author: Henry <akhenry@gmail.com> Date: Wed Sep 7 14:29:21 2016 -0700 [Time Conductor] Switched conductor to mct-include rather than mct-representation to avoid warnings commitd37dd52ee1
Merge:7af5875
58391de
Author: Henry <akhenry@gmail.com> Date: Tue Sep 6 16:43:17 2016 -0700 Merge branch 'master' into open933 commit7af5875dd5
Author: Henry <akhenry@gmail.com> Date: Tue Sep 6 10:04:29 2016 -0700 [Time Conductor] #933 Fixed code style errors commitc6eaa3d528
Author: Andrew Henry <andrew.k.henry@nasa.gov> Date: Wed Aug 24 15:28:19 2016 +0100 [Time Conductor] Adding tests and fixing failing ones. #933 commit4cf6126d35
Author: Henry <akhenry@gmail.com> Date: Wed Aug 10 18:22:30 2016 -0700 Refactoring based on feedback Refactoring controller Migrating functions off controller onto service class Simplified modes Adding comments Removed unnecessary validation Fixing testing issues commit4ae6da0334
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Tue Aug 9 17:47:31 2016 -0700 [Frontend] Data viz in Time Conductor smaller Fixes #933 Reduced height of data viz bar in Time Conductor v2; commitae39343b76
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Mon Aug 8 12:14:20 2016 -0700 [Frontend] Fix for bad fix Fixes #1112 Put overflow: hidden back at outer wrapper level (now on .t-object.primary-pane ) which doens't clip the Inspector expand/collapse; did better unit testing; commit62ee7e569b
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Mon Aug 8 11:21:01 2016 -0700 [Frontend] Fix for collapse Inspector button Fixes #1112 Moved min-width and overflow: hidden to TC-specific elements; removed overflow: hidden from .primary-pane commit7557a86208
Merge:46e644e
c8931f8
Author: Henry <akhenry@gmail.com> Date: Fri Aug 5 16:37:36 2016 -0700 Merge branch 'master' into open933 commit46e644e6dc
Author: Pete Richards <peter.l.richards@nasa.gov> Date: Fri Aug 5 14:44:18 2016 -0700 Use key to retrieve default commitaf7954c5a1
Author: Pete Richards <peter.l.richards@nasa.gov> Date: Fri Aug 5 11:24:51 2016 -0700 Trigger digests when bounds are set commit0e0ad64830
Author: Henry <akhenry@gmail.com> Date: Thu Aug 4 10:41:58 2016 -0700 Fixed issue with wrong deltas being applied commitf3fd386e3b
Author: Henry <akhenry@gmail.com> Date: Wed Aug 3 21:03:09 2016 -0700 Retain time system on mode change commit25b9f371e2
Author: Henry <akhenry@gmail.com> Date: Wed Aug 3 20:16:03 2016 -0700 Fixed loss of time system options on navigation commit6b482d487b
Merge:f96f78f
9a72c96
Author: Henry <akhenry@gmail.com> Date: Wed Aug 3 19:57:03 2016 -0700 Merged mode-specific defaults, with some refactoring commitf96f78ff79
Author: Henry <akhenry@gmail.com> Date: Wed Aug 3 19:34:31 2016 -0700 Select appropriate tick source based on mode commit579233ade9
Author: Henry <akhenry@gmail.com> Date: Wed Aug 3 18:30:01 2016 -0700 Fixed delta format issue on navigation commit9a72c96ea4
Author: Pete Richards <peter.l.richards@nasa.gov> Date: Wed Aug 3 18:06:39 2016 -0700 [TCv2] different defaults by mode commitf4e1879a2d
Author: Henry <akhenry@gmail.com> Date: Wed Aug 3 17:43:07 2016 -0700 stop listening to tick source on time system change commitf844495cc1
Author: Henry <akhenry@gmail.com> Date: Wed Aug 3 17:40:37 2016 -0700 Support deltaFormat on timeSystems commit900752208f
Author: Pete Richards <peter.l.richards@nasa.gov> Date: Wed Aug 3 13:05:43 2016 -0700 [TCv2] get conductor without service commit6501e2eb5f
Author: Henry <akhenry@gmail.com> Date: Wed Aug 3 12:22:13 2016 -0700 Added isUTCBased to TimeSystem interface commitb9c41107c1
Author: Henry <akhenry@gmail.com> Date: Tue Aug 2 22:18:44 2016 -0700 Time Conductor state retained on navigation commit34c62ba405
Author: Henry <akhenry@gmail.com> Date: Tue Aug 2 15:16:35 2016 -0700 Time Conductor in edit mode commit1eea5ce480
Merge:4cd579d
1173828
Author: Henry <akhenry@gmail.com> Date: Mon Aug 1 20:29:50 2016 -0700 merged from master commit4cd579d274
Author: Henry <akhenry@gmail.com> Date: Mon Aug 1 20:16:46 2016 -0700 Pass numerical value to format functions commit11738286df
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Mon Aug 1 18:56:33 2016 -0700 [Frontend] Styling for unsynced elements Fixes #933 commitca5206d4a0
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Mon Aug 1 18:55:49 2016 -0700 [Frontend] Fixing issues with theme coloring Fixes #933 commit573f1f9f99
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Mon Aug 1 18:04:17 2016 -0700 [Frontend] Hide zoom slider control Fixes #933 Temporarily hiding per request from Andrew today; commitc5c45f0a0e
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Mon Aug 1 18:01:28 2016 -0700 [Frontend] Update TC2 markup and sass Fixes #933 Update markup and sass in TC2 to be in line with updates from master from #1047 glyphs to cssclass approach; commit121ab413ff
Author: Henry <akhenry@gmail.com> Date: Mon Aug 1 17:51:15 2016 -0700 Apply formatting, filter modes by tick source availability commit753bd97c8a
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Mon Aug 1 17:12:44 2016 -0700 Merge remote-tracking branch 'origin/master' into open933-c # Conflicts: # platform/commonUI/edit/res/templates/create/create-menu.html # platform/commonUI/general/res/fonts/symbols/wtdsymbols.eot # platform/commonUI/general/res/fonts/symbols/wtdsymbols.svg # platform/commonUI/general/res/fonts/symbols/wtdsymbols.ttf # platform/commonUI/general/res/fonts/symbols/wtdsymbols.woff # platform/commonUI/general/res/sass/_archetypes.scss # platform/commonUI/general/res/sass/_constants.scss # platform/commonUI/general/res/sass/_icons.scss # platform/commonUI/general/res/sass/_main.scss # platform/commonUI/general/res/sass/_mixins.scss # platform/commonUI/general/res/sass/controls/_buttons.scss # platform/commonUI/general/res/templates/controls/time-controller.html # platform/commonUI/themes/snow/res/sass/_constants.scss commitfcd7ab93e5
Merge:a75ea67
9b58aa0
Author: Henry <akhenry@gmail.com> Date: Mon Aug 1 17:12:00 2016 -0700 Merge branch 'open933' of https://github.com/nasa/openmctweb into open933 commitc699cb8b4b
Merge:579c6b6
d1e1ba1
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Mon Aug 1 17:11:37 2016 -0700 Merge remote-tracking branch 'origin/master' into open933-c # Conflicts: # platform/commonUI/edit/res/templates/create/create-menu.html # platform/commonUI/general/res/fonts/symbols/wtdsymbols.eot # platform/commonUI/general/res/fonts/symbols/wtdsymbols.svg # platform/commonUI/general/res/fonts/symbols/wtdsymbols.ttf # platform/commonUI/general/res/fonts/symbols/wtdsymbols.woff # platform/commonUI/general/res/sass/_archetypes.scss # platform/commonUI/general/res/sass/_constants.scss # platform/commonUI/general/res/sass/_icons.scss # platform/commonUI/general/res/sass/_main.scss # platform/commonUI/general/res/sass/_mixins.scss # platform/commonUI/general/res/sass/controls/_buttons.scss # platform/commonUI/general/res/templates/controls/time-controller.html # platform/commonUI/themes/snow/res/sass/_constants.scss commita75ea67b8c
Author: Henry <akhenry@gmail.com> Date: Mon Aug 1 17:11:01 2016 -0700 Format updates when time system selected commit9b58aa0052
Author: Pete Richards <peter.l.richards@nasa.gov> Date: Mon Aug 1 17:03:00 2016 -0700 [TCv2] Add conductorService for compatibility Add conductor service for compatibility with old plugins that depend on the conductor service. commit579c6b6d24
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Mon Aug 1 16:30:51 2016 -0700 [Frontend] Styling TC unsynced elements Fixes #933 WIP: Styling for unsynced elements commit762f43fa61
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Mon Aug 1 16:26:47 2016 -0700 [Frontend] Styling TC unsynced elements Fixes #933 WIP: Styling for unsynced elements commitce5d0ef5bd
Author: Henry <akhenry@gmail.com> Date: Mon Aug 1 16:03:27 2016 -0700 Merged stylesheet changes commit142ee2f336
Merge:482fcbf
523d674
Author: Henry <akhenry@gmail.com> Date: Mon Aug 1 15:44:49 2016 -0700 Added LocalTimeSystem and merged latest styles commit482fcbf6ee
Author: Henry <akhenry@gmail.com> Date: Mon Aug 1 15:14:23 2016 -0700 Refactored bundle commit523d6743fb
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Mon Aug 1 12:00:53 2016 -0700 [Frontend] Added support for thematic styling of Time Conductor v2 Fixes #933 Added theme sass files commit7af22126d4
Author: Henry <akhenry@gmail.com> Date: Wed Jul 27 12:05:03 2016 -0400 Prevent tabbing into end bounds when not in fixed mode commit8e59072537
Author: Henry <akhenry@gmail.com> Date: Wed Jul 27 11:55:12 2016 -0400 Removed LAD and Realtime modes commitc1bbc4f01d
Author: Henry <akhenry@gmail.com> Date: Wed Jul 27 10:38:04 2016 -0400 Code cleanup commitaa4a5e56f9
Author: Henry <akhenry@gmail.com> Date: Tue Jul 26 16:55:00 2016 -0400 Improved support from plot commit5b2eb72b16
Author: Henry <akhenry@gmail.com> Date: Tue Jul 26 08:33:30 2016 -0400 [Time Conductor] Addressed documentation issues commit1b7fc57d21
Author: Henry <akhenry@gmail.com> Date: Mon Jul 25 16:55:27 2016 -0400 Added status support to plots commita4f6f6f50b
Author: Henry <akhenry@gmail.com> Date: Mon Jul 25 12:09:15 2016 -0400 Added license commit19fd63b850
Merge:c2c8e16
a10ded2
Author: Henry <akhenry@gmail.com> Date: Thu Jul 21 20:06:50 2016 -0700 Merge branch 'open933-frontend-b' into open933 commitc2c8e16453
Author: Henry <akhenry@gmail.com> Date: Thu Jul 21 20:03:40 2016 -0700 Added scale sensitive formatting to UTCTimeFormat commita10ded25b4
Merge:da7c636
e6d8944
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Wed Jul 20 18:33:58 2016 -0700 Merge remote-tracking branch 'origin/open933' into open933-frontend-b # Conflicts: # platform/features/conductor-v2/res/sass/time-conductor.scss # platform/features/conductor/res/sass/time-conductor.scss commitda7c636724
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Wed Jul 20 18:22:20 2016 -0700 [Frontend] Time Conductor v2 styling Fixes #933 Redo TC icon to use font symbol, added new symbol for brackets to font files; font anti-aliasing mod for .ui-symbol class; layout tweaks; mobile tweaks. commitb392633bc6
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Wed Jul 20 15:48:22 2016 -0700 [Frontend] Time Conductor v2 styling Fixes #933 WIP: Significant mobile and desktop style tweaks; moved constants into their own include file; commitff1678435e
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Wed Jul 20 11:43:40 2016 -0700 [Frontend] Time Conductor v2 styling Fixes #933 Changed desktop and mobile RT UI to display end datetime and hide start; WIP: mobile styling for main UI of TC; commit2124fe01e1
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Wed Jul 20 10:18:42 2016 -0700 [Frontend] Renew support for Time Conductor v1 Fixes #933 Minor fixes to TCv1 for mobile commite6d8944547
Author: Henry <akhenry@gmail.com> Date: Tue Jul 19 20:17:06 2016 -0700 Modified main.js commitea1defac28
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Tue Jul 19 18:33:24 2016 -0700 [Frontend] Renew support for Time Conductor v1 Fixes #933 Time Conductors v1 and v2 now build and load their own isolated CSS files. All previous styling for TCv1 should be re-enabled. Note that Conductor v2 mobile is not complete yet. commit2a19394334
Author: Henry <akhenry@gmail.com> Date: Tue Jul 19 19:54:52 2016 -0700 Added compatibility layer to support existing plots and historical tables commitf641edbce7
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Tue Jul 19 18:33:24 2016 -0700 [Frontend] Renew support for Time Conductor v1 Fixes #933 Time Conductors v1 and v2 now build and load their own isolated CSS files. All previous styling for TCv1 should be re-enabled. Note that Conductor v2 mobile is not complete yet. commit15a608a861
Author: Henry <akhenry@gmail.com> Date: Mon Jul 18 18:44:29 2016 -0700 Populate format in input fields commit334ca64551
Merge:0af49ef
4087b9c
Author: Henry <akhenry@gmail.com> Date: Mon Jul 18 14:25:02 2016 -0700 Merged open933-frontend commit0af49efe06
Author: Henry <akhenry@gmail.com> Date: Mon Jul 18 08:23:27 2016 -0700 Refactored out modes, time systems, etc. commit4087b9cdde
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Fri Jul 15 14:39:29 2016 -0700 [Frontend] Styling for Time Conductor v2 Fixes #933 WIP: Fixed look for Firefox commit43a804eef4
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Fri Jul 15 07:54:32 2016 -0700 [Frontend] Styling for Time Conductor v2 Fixes #933 WIP: Added zoom current range indicator; tweaks to style commitb3a4f52fe2
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Thu Jul 14 18:30:49 2016 -0700 [Frontend] Styling for Time Conductor v2 Fixes #933 WIP: Adding zoom control with HTML5 input range type; Refactored sass slightly to move display: inline-block out of mixin containerBase and into .s-btn. commit671e3016d4
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Thu Jul 14 16:40:05 2016 -0700 [Frontend] Styling for Time Conductor v2 Fixes #933 New _animations scss include, moved scss around. commit379828315f
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Thu Jul 14 16:39:27 2016 -0700 [Frontend] Styling for Time Conductor v2 Fixes #933 New _animations scss include, moved scss around. commit8c5538ec4d
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Thu Jul 14 14:58:18 2016 -0700 [Frontend] Styling for Time Conductor v2 Fixes #933 "Sticky" clock anim for LAD mode commit2f9fbfef7f
Author: Henry <akhenry@gmail.com> Date: Wed Jul 13 20:33:47 2016 -0700 More refactoring commit2baca659ca
Author: Henry <akhenry@gmail.com> Date: Wed Jul 13 19:50:58 2016 -0700 Refactoring commit8b694ef337
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Wed Jul 13 19:42:51 2016 -0700 [Frontend] Styling for Time Conductor v2 Fixes #933 In-progress: color/size tweaks, fixes for espresso theme commite193e3dfba
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Wed Jul 13 19:16:27 2016 -0700 Merge open933 latest, resolve conflicts Fixes #933 Fair amount of manual fixing in time-conductor.html commit8214c8e895
Merge:33b2225
14463d3
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Wed Jul 13 19:16:00 2016 -0700 Merge open933 latest, resolve conflicts Fixes #933 Fair amount of manual fixing in time-conductor.html commit33b2225d10
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Wed Jul 13 18:48:17 2016 -0700 [Frontend] Styling for Time Conductor v2 Fixes #933 In-progress: restructured markup to move modeModel farther out; animated icon commit14463d39a8
Author: Henry <akhenry@gmail.com> Date: Wed Jul 13 18:17:27 2016 -0700 Added end delta commitfcfda50e73
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Wed Jul 13 15:00:16 2016 -0700 [Frontend] Styling for Time Conductor v2 Fixes #933 In-progress: color tweaks, bar sizing, field widths commit06af84c161
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Wed Jul 13 13:14:32 2016 -0700 [Frontend] Styling for Time Conductor v2 Fixes #933 In-progress: fixed SVG text color, field styling for fixed vs. real-time, markup cleanup commit5238aa2731
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Wed Jul 13 08:07:59 2016 -0700 [Frontend] Styling for Time Conductor v2 Fixes #933 In-progress; fixed SVG text color commitfd29473664
Author: Henry <akhenry@gmail.com> Date: Tue Jul 12 15:02:39 2016 -0700 Support resize commit97f3fd516b
Author: Henry <akhenry@gmail.com> Date: Tue Jul 12 10:14:26 2016 -0700 Changed default duration to fifteen minutes commit088416905d
Author: Henry <akhenry@gmail.com> Date: Tue Jul 12 10:08:08 2016 -0700 Added duration commit2056d87453
Merge:585da38
64ce8a2
Author: Henry <akhenry@gmail.com> Date: Mon Jul 11 14:27:30 2016 -0700 Merge branch 'open933-frontend' into open933 commit64ce8a2b2a
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Mon Jul 11 14:03:41 2016 -0700 [Frontend] Styling for Time Conductor v2 Fixes #933 Color adjusts, mini super-menu size and font tweaks, glyphs added to selector, SVG style fixes in progress commit585da38a16
Author: Henry <akhenry@gmail.com> Date: Mon Jul 11 13:46:46 2016 -0700 Fixed some merge issues commitbf0e85a94c
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Mon Jul 11 11:35:26 2016 -0700 [Frontend] Styling for Time Conductor v2 Fixes #933 Renamed main class; removed unused <style> defs commit84b7a9dc2f
Merge:7b7b21d
11caa83
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Mon Jul 11 11:29:35 2016 -0700 Merge remote-tracking branch 'origin/open933' into open933-frontend Fixes #933 Conflicts: platform/features/conductor-v2/src/TimeConductorController.js commit11caa8396a
Author: Henry <akhenry@gmail.com> Date: Mon Jul 11 11:18:23 2016 -0700 Updated modes commit0017b77439
Merge:5cc81ba
788483e
Author: Henry <akhenry@gmail.com> Date: Mon Jul 11 11:06:22 2016 -0700 Merged markup changes commit7b7b21d748
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Mon Jul 11 11:05:47 2016 -0700 [Frontend] Styling of Time Conductor v2 Fixes #933 Tweaks to language; tweak to class name in markup commit788483ec13
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Mon Jul 11 10:37:08 2016 -0700 [Frontend] Styling of Time Conductor v2 Fixes #933 Tweaks to language commit7b19f91ce6
Merge:0a0bc55
4e7b69c
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov> Date: Mon Jul 11 10:31:14 2016 -0700 [Frontend] Merge latest from open933 Fixes #933 Resolve conflicts in mode-menu.html, mode-selector.html, time-conductor.html; apply tweaks, language, etc. commit5cc81ba12a
Author: Henry <akhenry@gmail.com> Date: Mon Jul 11 10:26:34 2016 -0700 [Time Conductor] Added mode class to time conductor commit0a0bc55f5f
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Fri Jul 8 17:11:43 2016 -0700 [Frontend] Styling for Time Conductor v2 Fixes #993 In-progress; mode menu names and descriptors modified, markup cleaned up commit4e7b69c4df
Author: Henry <akhenry@gmail.com> Date: Fri Jul 8 16:57:50 2016 -0700 Enabled fixed and real-time modes commitcf83040c4b
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Fri Jul 8 16:54:49 2016 -0700 [Frontend] Styling for Time Conductor v2 Fixes #993 In-progress; Create menu refactoring and new mini Create menu commit32f7bc86af
Author: Charles Hacskaylo <charlesh88@gmail.com> Date: Fri Jul 8 16:54:13 2016 -0700 [Frontend] Styling for Time Conductor v2 Fixes #993 In-progress; class renaming continued, cleanups in markup file, in-page styles ported to scss commite230b92946
Author: Henry <akhenry@gmail.com> Date: Fri Jul 8 15:15:12 2016 -0700 Fixed bug with date selector having to be clicked twice commit58ed500ecf
Author: Henry <akhenry@gmail.com> Date: Thu Jul 7 16:57:03 2016 -0700 Time sync via conductor commitbca5eb0fdb
Author: Henry <akhenry@gmail.com> Date: Thu Jul 7 09:47:46 2016 -0700 [Time Conductor] #933 Initial markup
548 lines
25 KiB
JavaScript
548 lines
25 KiB
JavaScript
/*****************************************************************************
|
|
* Open MCT, Copyright (c) 2014-2016, 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(
|
|
[
|
|
"zepto",
|
|
"moment",
|
|
"../../src/controllers/MCTTableController"
|
|
],
|
|
function ($, moment, MCTTableController) {
|
|
|
|
var MOCK_ELEMENT_TEMPLATE =
|
|
'<div><div class="l-view-section scrolling">' +
|
|
'<table class="sizing-table"><tbody></tbody></table>' +
|
|
'<table class="mct-table"><thead></thead></table>' +
|
|
'</div></div>';
|
|
|
|
describe('The MCTTable Controller', function () {
|
|
|
|
var controller,
|
|
mockScope,
|
|
watches,
|
|
mockTimeout,
|
|
mockElement,
|
|
mockExportService,
|
|
mockConductor,
|
|
mockFormatService,
|
|
mockFormat;
|
|
|
|
function promise(value) {
|
|
return {
|
|
then: function (callback) {
|
|
return promise(callback(value));
|
|
}
|
|
};
|
|
}
|
|
|
|
function getCallback(target, event) {
|
|
return target.calls.filter(function (call) {
|
|
return call.args[0] === event;
|
|
})[0].args[1];
|
|
}
|
|
|
|
beforeEach(function () {
|
|
watches = {};
|
|
|
|
mockScope = jasmine.createSpyObj('scope', [
|
|
'$watch',
|
|
'$on',
|
|
'$watchCollection'
|
|
]);
|
|
mockScope.$watchCollection.andCallFake(function (event, callback) {
|
|
watches[event] = callback;
|
|
});
|
|
|
|
mockElement = $(MOCK_ELEMENT_TEMPLATE);
|
|
mockExportService = jasmine.createSpyObj('exportService', [
|
|
'exportCSV'
|
|
]);
|
|
|
|
mockConductor = jasmine.createSpyObj('conductor', [
|
|
'bounds',
|
|
'timeOfInterest',
|
|
'timeSystem',
|
|
'on',
|
|
'off'
|
|
]);
|
|
|
|
mockScope.displayHeaders = true;
|
|
mockTimeout = jasmine.createSpy('$timeout');
|
|
mockTimeout.andReturn(promise(undefined));
|
|
mockFormat = jasmine.createSpyObj('formatter', [
|
|
'parse',
|
|
'format'
|
|
]);
|
|
mockFormatService = jasmine.createSpyObj('formatService', [
|
|
'getFormat'
|
|
]);
|
|
mockFormatService.getFormat.andReturn(mockFormat);
|
|
|
|
controller = new MCTTableController(
|
|
mockScope,
|
|
mockTimeout,
|
|
mockElement,
|
|
mockExportService,
|
|
mockFormatService,
|
|
{conductor: mockConductor}
|
|
);
|
|
spyOn(controller, 'setVisibleRows').andCallThrough();
|
|
});
|
|
|
|
it('Reacts to changes to filters, headers, and rows', function () {
|
|
expect(mockScope.$watchCollection).toHaveBeenCalledWith('filters', jasmine.any(Function));
|
|
expect(mockScope.$watch).toHaveBeenCalledWith('headers', jasmine.any(Function));
|
|
expect(mockScope.$watch).toHaveBeenCalledWith('rows', jasmine.any(Function));
|
|
});
|
|
|
|
it('destroys listeners on destruction', function () {
|
|
expect(mockScope.$on).toHaveBeenCalledWith('$destroy', controller.destroyConductorListeners);
|
|
getCallback(mockScope.$on, '$destroy')();
|
|
|
|
expect(mockConductor.off).toHaveBeenCalledWith('timeSystem', controller.changeTimeSystem);
|
|
expect(mockConductor.off).toHaveBeenCalledWith('timeOfInterest', controller.setTimeOfInterest);
|
|
expect(mockConductor.off).toHaveBeenCalledWith('bounds', controller.changeBounds);
|
|
});
|
|
|
|
describe('The time of interest', function () {
|
|
var rowsAsc = [];
|
|
var rowsDesc = [];
|
|
beforeEach(function () {
|
|
rowsAsc = [
|
|
{
|
|
'col1': {'text': 'row1 col1 match'},
|
|
'col2': {'text': '2012-10-31 00:00:00.000Z'},
|
|
'col3': {'text': 'row1 col3'}
|
|
},
|
|
{
|
|
'col1': {'text': 'row2 col1 match'},
|
|
'col2': {'text': '2012-11-01 00:00:00.000Z'},
|
|
'col3': {'text': 'row2 col3'}
|
|
},
|
|
{
|
|
'col1': {'text': 'row3 col1'},
|
|
'col2': {'text': '2012-11-03 00:00:00.000Z'},
|
|
'col3': {'text': 'row3 col3'}
|
|
},
|
|
{
|
|
'col1': {'text': 'row3 col1'},
|
|
'col2': {'text': '2012-11-04 00:00:00.000Z'},
|
|
'col3': {'text': 'row3 col3'}
|
|
}
|
|
];
|
|
rowsDesc = [
|
|
{
|
|
'col1': {'text': 'row1 col1 match'},
|
|
'col2': {'text': '2012-11-02 00:00:00.000Z'},
|
|
'col3': {'text': 'row1 col3'}
|
|
},
|
|
{
|
|
'col1': {'text': 'row2 col1 match'},
|
|
'col2': {'text': '2012-11-01 00:00:00.000Z'},
|
|
'col3': {'text': 'row2 col3'}
|
|
},
|
|
{
|
|
'col1': {'text': 'row3 col1'},
|
|
'col2': {'text': '2012-10-30 00:00:00.000Z'},
|
|
'col3': {'text': 'row3 col3'}
|
|
},
|
|
{
|
|
'col1': {'text': 'row3 col1'},
|
|
'col2': {'text': '2012-10-29 00:00:00.000Z'},
|
|
'col3': {'text': 'row3 col3'}
|
|
}
|
|
];
|
|
mockScope.timeColumns = ['col2'];
|
|
mockScope.sortColumn = 'col2';
|
|
controller.toiFormatter = mockFormat;
|
|
});
|
|
it("is observed for changes", function () {
|
|
//Mock setting time columns
|
|
getCallback(mockScope.$watch, 'timeColumns')(['col2']);
|
|
|
|
expect(mockConductor.on).toHaveBeenCalledWith('timeOfInterest',
|
|
jasmine.any(Function));
|
|
});
|
|
describe("causes corresponding row to be highlighted", function () {
|
|
it("when changed and rows sorted ascending", function () {
|
|
var testDate = "2012-11-02 00:00:00.000Z";
|
|
mockScope.rows = rowsAsc;
|
|
mockScope.displayRows = rowsAsc;
|
|
mockScope.sortDirection = 'asc';
|
|
|
|
var toi = moment.utc(testDate).valueOf();
|
|
mockFormat.parse.andReturn(toi);
|
|
mockFormat.format.andReturn(testDate);
|
|
|
|
//mock setting the timeColumns parameter
|
|
getCallback(mockScope.$watch, 'timeColumns')(['col2']);
|
|
|
|
var toiCallback = getCallback(mockConductor.on, 'timeOfInterest');
|
|
toiCallback(toi);
|
|
|
|
expect(mockScope.toiRowIndex).toBe(2);
|
|
});
|
|
it("when changed and rows sorted descending", function () {
|
|
var testDate = "2012-10-31 00:00:00.000Z";
|
|
mockScope.rows = rowsDesc;
|
|
mockScope.displayRows = rowsDesc;
|
|
mockScope.sortDirection = 'desc';
|
|
|
|
var toi = moment.utc(testDate).valueOf();
|
|
mockFormat.parse.andReturn(toi);
|
|
mockFormat.format.andReturn(testDate);
|
|
|
|
//mock setting the timeColumns parameter
|
|
getCallback(mockScope.$watch, 'timeColumns')(['col2']);
|
|
|
|
var toiCallback = getCallback(mockConductor.on, 'timeOfInterest');
|
|
toiCallback(toi);
|
|
|
|
expect(mockScope.toiRowIndex).toBe(2);
|
|
});
|
|
it("when rows are set and sorted ascending", function () {
|
|
var testDate = "2012-11-02 00:00:00.000Z";
|
|
mockScope.sortDirection = 'asc';
|
|
|
|
var toi = moment.utc(testDate).valueOf();
|
|
mockFormat.parse.andReturn(toi);
|
|
mockFormat.format.andReturn(testDate);
|
|
mockConductor.timeOfInterest.andReturn(toi);
|
|
|
|
//mock setting the timeColumns parameter
|
|
getCallback(mockScope.$watch, 'timeColumns')(['col2']);
|
|
|
|
//Mock setting the rows on scope
|
|
var rowsCallback = getCallback(mockScope.$watch, 'rows');
|
|
rowsCallback(rowsAsc);
|
|
|
|
expect(mockScope.toiRowIndex).toBe(2);
|
|
});
|
|
|
|
});
|
|
});
|
|
|
|
describe('rows', function () {
|
|
var testRows = [];
|
|
beforeEach(function () {
|
|
testRows = [
|
|
{
|
|
'col1': {'text': 'row1 col1 match'},
|
|
'col2': {'text': 'def'},
|
|
'col3': {'text': 'row1 col3'}
|
|
},
|
|
{
|
|
'col1': {'text': 'row2 col1 match'},
|
|
'col2': {'text': 'abc'},
|
|
'col3': {'text': 'row2 col3'}
|
|
},
|
|
{
|
|
'col1': {'text': 'row3 col1'},
|
|
'col2': {'text': 'ghi'},
|
|
'col3': {'text': 'row3 col3'}
|
|
}
|
|
];
|
|
mockScope.rows = testRows;
|
|
});
|
|
|
|
it('Filters results based on filter input', function () {
|
|
var filters = {},
|
|
filteredRows;
|
|
|
|
mockScope.filters = filters;
|
|
|
|
filteredRows = controller.filterRows(testRows);
|
|
expect(filteredRows.length).toBe(3);
|
|
filters.col1 = 'row1';
|
|
filteredRows = controller.filterRows(testRows);
|
|
expect(filteredRows.length).toBe(1);
|
|
filters.col1 = 'match';
|
|
filteredRows = controller.filterRows(testRows);
|
|
expect(filteredRows.length).toBe(2);
|
|
});
|
|
|
|
it('Sets rows on scope when rows change', function () {
|
|
controller.setRows(testRows);
|
|
expect(mockScope.displayRows.length).toBe(3);
|
|
expect(mockScope.displayRows).toEqual(testRows);
|
|
});
|
|
|
|
it('Supports adding rows individually', function () {
|
|
var addRowFunc = getCallback(mockScope.$on, 'add:row'),
|
|
row4 = {
|
|
'col1': {'text': 'row3 col1'},
|
|
'col2': {'text': 'ghi'},
|
|
'col3': {'text': 'row3 col3'}
|
|
};
|
|
controller.setRows(testRows);
|
|
expect(mockScope.displayRows.length).toBe(3);
|
|
testRows.push(row4);
|
|
addRowFunc(undefined, 3);
|
|
expect(mockScope.displayRows.length).toBe(4);
|
|
});
|
|
|
|
it('Supports removing rows individually', function () {
|
|
var removeRowFunc = getCallback(mockScope.$on, 'remove:row');
|
|
controller.setRows(testRows);
|
|
expect(mockScope.displayRows.length).toBe(3);
|
|
removeRowFunc(undefined, 2);
|
|
expect(mockScope.displayRows.length).toBe(2);
|
|
expect(controller.setVisibleRows).toHaveBeenCalled();
|
|
});
|
|
|
|
it("can be exported as CSV", function () {
|
|
controller.setRows(testRows);
|
|
controller.setHeaders(Object.keys(testRows[0]));
|
|
mockScope.exportAsCSV();
|
|
expect(mockExportService.exportCSV)
|
|
.toHaveBeenCalled();
|
|
mockExportService.exportCSV.mostRecentCall.args[0]
|
|
.forEach(function (row, i) {
|
|
Object.keys(row).forEach(function (k) {
|
|
expect(row[k]).toEqual(
|
|
mockScope.displayRows[i][k].text
|
|
);
|
|
});
|
|
});
|
|
});
|
|
|
|
describe('sorting', function () {
|
|
var sortedRows;
|
|
|
|
beforeEach(function () {
|
|
sortedRows = [];
|
|
});
|
|
|
|
it('Sorts rows ascending', function () {
|
|
mockScope.sortColumn = 'col1';
|
|
mockScope.sortDirection = 'asc';
|
|
|
|
sortedRows = controller.sortRows(testRows);
|
|
expect(sortedRows[0].col1.text).toEqual('row1 col1 match');
|
|
expect(sortedRows[1].col1.text).toEqual('row2 col1' +
|
|
' match');
|
|
expect(sortedRows[2].col1.text).toEqual('row3 col1');
|
|
|
|
});
|
|
|
|
it('Sorts rows descending', function () {
|
|
mockScope.sortColumn = 'col1';
|
|
mockScope.sortDirection = 'desc';
|
|
|
|
sortedRows = controller.sortRows(testRows);
|
|
expect(sortedRows[0].col1.text).toEqual('row3 col1');
|
|
expect(sortedRows[1].col1.text).toEqual('row2 col1 match');
|
|
expect(sortedRows[2].col1.text).toEqual('row1 col1 match');
|
|
});
|
|
it('Sorts rows descending based on selected sort column', function () {
|
|
mockScope.sortColumn = 'col2';
|
|
mockScope.sortDirection = 'desc';
|
|
|
|
sortedRows = controller.sortRows(testRows);
|
|
expect(sortedRows[0].col2.text).toEqual('ghi');
|
|
expect(sortedRows[1].col2.text).toEqual('def');
|
|
expect(sortedRows[2].col2.text).toEqual('abc');
|
|
});
|
|
|
|
it('Allows sort column to be changed externally by ' +
|
|
'setting or changing sortBy attribute', function () {
|
|
mockScope.displayRows = testRows;
|
|
var sortByCB = getCallback(mockScope.$watch, 'sortColumn');
|
|
sortByCB('col2');
|
|
|
|
expect(mockScope.sortDirection).toEqual('asc');
|
|
|
|
expect(mockScope.displayRows[0].col2.text).toEqual('abc');
|
|
expect(mockScope.displayRows[1].col2.text).toEqual('def');
|
|
expect(mockScope.displayRows[2].col2.text).toEqual('ghi');
|
|
|
|
});
|
|
|
|
// https://github.com/nasa/openmct/issues/910
|
|
it('updates visible rows in scope', function () {
|
|
var oldRows;
|
|
mockScope.rows = testRows;
|
|
controller.setRows(testRows);
|
|
oldRows = mockScope.visibleRows;
|
|
mockScope.toggleSort('col2');
|
|
expect(mockScope.visibleRows).not.toEqual(oldRows);
|
|
});
|
|
|
|
it('correctly sorts rows of differing types', function () {
|
|
mockScope.sortColumn = 'col2';
|
|
mockScope.sortDirection = 'desc';
|
|
|
|
testRows.push({
|
|
'col1': {'text': 'row4 col1'},
|
|
'col2': {'text': '123'},
|
|
'col3': {'text': 'row4 col3'}
|
|
});
|
|
testRows.push({
|
|
'col1': {'text': 'row5 col1'},
|
|
'col2': {'text': '456'},
|
|
'col3': {'text': 'row5 col3'}
|
|
});
|
|
testRows.push({
|
|
'col1': {'text': 'row5 col1'},
|
|
'col2': {'text': ''},
|
|
'col3': {'text': 'row5 col3'}
|
|
});
|
|
|
|
sortedRows = controller.sortRows(testRows);
|
|
expect(sortedRows[0].col2.text).toEqual('ghi');
|
|
expect(sortedRows[1].col2.text).toEqual('def');
|
|
expect(sortedRows[2].col2.text).toEqual('abc');
|
|
|
|
expect(sortedRows[sortedRows.length - 3].col2.text).toEqual('456');
|
|
expect(sortedRows[sortedRows.length - 2].col2.text).toEqual('123');
|
|
expect(sortedRows[sortedRows.length - 1].col2.text).toEqual('');
|
|
});
|
|
|
|
describe('The sort comparator', function () {
|
|
it('Correctly sorts different data types', function () {
|
|
var val1 = "",
|
|
val2 = "1",
|
|
val3 = "2016-04-05 18:41:30.713Z",
|
|
val4 = "1.1",
|
|
val5 = "8.945520958175627e-13";
|
|
mockScope.sortDirection = "asc";
|
|
|
|
expect(controller.sortComparator(val1, val2)).toEqual(-1);
|
|
expect(controller.sortComparator(val3, val1)).toEqual(1);
|
|
expect(controller.sortComparator(val3, val2)).toEqual(1);
|
|
expect(controller.sortComparator(val4, val2)).toEqual(1);
|
|
expect(controller.sortComparator(val2, val5)).toEqual(1);
|
|
});
|
|
});
|
|
|
|
describe('Adding new rows', function () {
|
|
var row4,
|
|
row5,
|
|
row6;
|
|
|
|
beforeEach(function () {
|
|
row4 = {
|
|
'col1': {'text': 'row5 col1'},
|
|
'col2': {'text': 'xyz'},
|
|
'col3': {'text': 'row5 col3'}
|
|
};
|
|
row5 = {
|
|
'col1': {'text': 'row6 col1'},
|
|
'col2': {'text': 'aaa'},
|
|
'col3': {'text': 'row6 col3'}
|
|
};
|
|
row6 = {
|
|
'col1': {'text': 'row6 col1'},
|
|
'col2': {'text': 'ggg'},
|
|
'col3': {'text': 'row6 col3'}
|
|
};
|
|
});
|
|
|
|
it('Adds new rows at the correct sort position when' +
|
|
' sorted ', function () {
|
|
mockScope.sortColumn = 'col2';
|
|
mockScope.sortDirection = 'desc';
|
|
|
|
mockScope.displayRows = controller.sortRows(testRows.slice(0));
|
|
|
|
mockScope.rows.push(row4);
|
|
controller.addRow(undefined, mockScope.rows.length - 1);
|
|
expect(mockScope.displayRows[0].col2.text).toEqual('xyz');
|
|
|
|
mockScope.rows.push(row5);
|
|
controller.addRow(undefined, mockScope.rows.length - 1);
|
|
expect(mockScope.displayRows[4].col2.text).toEqual('aaa');
|
|
|
|
mockScope.rows.push(row6);
|
|
controller.addRow(undefined, mockScope.rows.length - 1);
|
|
expect(mockScope.displayRows[2].col2.text).toEqual('ggg');
|
|
|
|
//Add a duplicate row
|
|
mockScope.rows.push(row6);
|
|
controller.addRow(undefined, mockScope.rows.length - 1);
|
|
expect(mockScope.displayRows[2].col2.text).toEqual('ggg');
|
|
expect(mockScope.displayRows[3].col2.text).toEqual('ggg');
|
|
});
|
|
|
|
it('Adds new rows at the correct sort position when' +
|
|
' sorted and filtered', function () {
|
|
mockScope.sortColumn = 'col2';
|
|
mockScope.sortDirection = 'desc';
|
|
mockScope.filters = {'col2': 'a'};//Include only
|
|
// rows with 'a'
|
|
|
|
mockScope.displayRows = controller.sortRows(testRows.slice(0));
|
|
mockScope.displayRows = controller.filterRows(testRows);
|
|
|
|
mockScope.rows.push(row5);
|
|
controller.addRow(undefined, mockScope.rows.length - 1);
|
|
expect(mockScope.displayRows.length).toBe(2);
|
|
expect(mockScope.displayRows[1].col2.text).toEqual('aaa');
|
|
|
|
mockScope.rows.push(row6);
|
|
controller.addRow(undefined, mockScope.rows.length - 1);
|
|
expect(mockScope.displayRows.length).toBe(2);
|
|
//Row was not added because does not match filter
|
|
});
|
|
|
|
it('Adds new rows at the correct sort position when' +
|
|
' not sorted ', function () {
|
|
mockScope.sortColumn = undefined;
|
|
mockScope.sortDirection = undefined;
|
|
mockScope.filters = {};
|
|
|
|
mockScope.displayRows = testRows.slice(0);
|
|
|
|
mockScope.rows.push(row5);
|
|
controller.addRow(undefined, mockScope.rows.length - 1);
|
|
expect(mockScope.displayRows[3].col2.text).toEqual('aaa');
|
|
|
|
mockScope.rows.push(row6);
|
|
controller.addRow(undefined, mockScope.rows.length - 1);
|
|
expect(mockScope.displayRows[4].col2.text).toEqual('ggg');
|
|
});
|
|
|
|
it('Resizes columns if length of any columns in new' +
|
|
' row exceeds corresponding existing column', function () {
|
|
var row7 = {
|
|
'col1': {'text': 'row6 col1'},
|
|
'col2': {'text': 'some longer string'},
|
|
'col3': {'text': 'row6 col3'}
|
|
};
|
|
|
|
mockScope.sortColumn = undefined;
|
|
mockScope.sortDirection = undefined;
|
|
mockScope.filters = {};
|
|
|
|
mockScope.displayRows = testRows.slice(0);
|
|
|
|
mockScope.rows.push(row7);
|
|
controller.addRow(undefined, mockScope.rows.length - 1);
|
|
expect(controller.$scope.sizingRow.col2).toEqual({text: 'some longer string'});
|
|
});
|
|
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|