Compare commits
	
		
			3 Commits
		
	
	
		
			release/2.
			...
			filters-ap
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | b0b160d71e | ||
|   | 9c4553dd90 | ||
|   | 86e6885fb9 | 
| @@ -33,7 +33,13 @@ define([ | ||||
|                     formatString: '%0.2f', | ||||
|                     hints: { | ||||
|                         range: 1 | ||||
|                     } | ||||
|                     }, | ||||
|                     filters: ['equals'] | ||||
|                     /* | ||||
|                     filters: [{ | ||||
|                         comparator: 'equals', | ||||
|                         possibleValues: [1,2,3,4] | ||||
|                     }]*/ | ||||
|                 }, | ||||
|                 { | ||||
|                     key: "cos", | ||||
|   | ||||
| @@ -124,6 +124,10 @@ define([ | ||||
|         return sortedMetadata; | ||||
|     }; | ||||
|  | ||||
|     TelemetryMetadataManager.prototype.getFilterableValues = function () { | ||||
|         return this.valueMetadatas.filter(metadatum => metadatum.filters && metadatum.filters.length > 0); | ||||
|     } | ||||
|  | ||||
|     TelemetryMetadataManager.prototype.getDefaultDisplayValue = function () { | ||||
|         let valueMetadata = this.valuesForHints(['range'])[0]; | ||||
|  | ||||
|   | ||||
| @@ -46,7 +46,7 @@ define([ | ||||
|             view: function (selection) { | ||||
|                 let component; | ||||
|                 let domainObject = selection[0].context.item; | ||||
|                 const tableConfiguration = new TelemetryTableConfiguration(domainObject, openmct); | ||||
|                 let tableConfiguration = new TelemetryTableConfiguration(domainObject, openmct); | ||||
|                 return { | ||||
|                     show: function (element) { | ||||
|                         component = new Vue({ | ||||
| @@ -64,6 +64,7 @@ define([ | ||||
|                     destroy: function () { | ||||
|                         component.$destroy(); | ||||
|                         component = undefined; | ||||
|                         tableConfiguration = undefined; | ||||
|                     } | ||||
|                 } | ||||
|             }, | ||||
|   | ||||
| @@ -1,19 +1,21 @@ | ||||
| <template> | ||||
| <div class="c-properties" v-if="isEditing"> | ||||
|     <div class="c-properties__header">Table Column Size</div> | ||||
|     <ul class="c-properties__section"> | ||||
|         <li class="c-properties__row"> | ||||
|             <div class="c-properties__label" title="Show or Hide Column"><label for="AutoSizeControl">Auto-size</label></div> | ||||
|             <div class="c-properties__value"><input type="checkbox" id="AutoSizeControl" :checked="configuration.autosize !== false" @change="toggleAutosize()"></div>             | ||||
|         </li> | ||||
|     </ul> | ||||
|     <div class="c-properties__header">Table Column Visibility</div> | ||||
|     <ul class="c-properties__section"> | ||||
|         <li class="c-properties__row" v-for="(title, key) in headers"> | ||||
|             <div class="c-properties__label" title="Show or Hide Column"><label :for="key + 'ColumnControl'">{{title}}</label></div> | ||||
|             <div class="c-properties__value"><input type="checkbox" :id="key + 'ColumnControl'" :checked="configuration.hiddenColumns[key] !== true" @change="toggleColumn(key)"></div> | ||||
|         </li> | ||||
|     </ul> | ||||
| <div class="c-properties"> | ||||
|     <template v-if="isEditing"> | ||||
|         <div class="c-properties__header">Table Column Size</div> | ||||
|         <ul class="c-properties__section"> | ||||
|             <li class="c-properties__row"> | ||||
|                 <div class="c-properties__label" title="Show or Hide Column"><label for="AutoSizeControl">Auto-size</label></div> | ||||
|                 <div class="c-properties__value"><input type="checkbox" id="AutoSizeControl" :checked="configuration.autosize !== false" @change="toggleAutosize()"></div>             | ||||
|             </li> | ||||
|         </ul> | ||||
|         <div class="c-properties__header">Table Column Visibility</div> | ||||
|         <ul class="c-properties__section"> | ||||
|             <li class="c-properties__row" v-for="(title, key) in headers"> | ||||
|                 <div class="c-properties__label" title="Show or Hide Column"><label :for="key + 'ColumnControl'">{{title}}</label></div> | ||||
|                 <div class="c-properties__value"><input type="checkbox" :id="key + 'ColumnControl'" :checked="configuration.hiddenColumns[key] !== true" @change="toggleColumn(key)"></div> | ||||
|             </li> | ||||
|         </ul> | ||||
|     </template> | ||||
| </div> | ||||
| </template> | ||||
|  | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|         <pane class="c-inspector__properties"> | ||||
|             <properties></properties> | ||||
|             <location></location> | ||||
|             <inspector-view></inspector-view> | ||||
|             <inspector-views></inspector-views> | ||||
|         </pane> | ||||
|         <pane class="c-inspector__elements" | ||||
|               handle="before" | ||||
| @@ -210,7 +210,7 @@ | ||||
|     import Elements from './Elements.vue'; | ||||
|     import Location from './Location.vue'; | ||||
|     import Properties from './Properties.vue'; | ||||
|     import InspectorView from './InspectorView.vue'; | ||||
|     import InspectorViews from './InspectorViews.vue'; | ||||
|  | ||||
|     export default { | ||||
|         inject: ['openmct'], | ||||
| @@ -223,7 +223,7 @@ | ||||
|             Elements, | ||||
|             Properties, | ||||
|             Location, | ||||
|             InspectorView | ||||
|             InspectorViews | ||||
|         }, | ||||
|         data() { | ||||
|             return { | ||||
|   | ||||
| @@ -1,37 +0,0 @@ | ||||
| <template> | ||||
|     <div> | ||||
|     </div> | ||||
| </template> | ||||
|  | ||||
| <style> | ||||
| </style> | ||||
|  | ||||
| <script> | ||||
|     export default { | ||||
|         inject: ['openmct'], | ||||
|         mounted() { | ||||
|             this.openmct.selection.on('change', this.updateSelection); | ||||
|             this.updateSelection(); | ||||
|         }, | ||||
|         destroyed() { | ||||
|             this.openmct.selection.off('change', this.updateSelection); | ||||
|         }, | ||||
|         methods: { | ||||
|             updateSelection() { | ||||
|                 let selection = this.openmct.selection.get(); | ||||
|                 if (this.selectedView && this.selectedView.destroy) { | ||||
|                     this.selectedView.destroy(); | ||||
|                     delete this.viewContainer; | ||||
|                     this.$el.innerHTML = ''; | ||||
|                 } | ||||
|                 this.selectedView = this.openmct.inspectorViews.get(selection); | ||||
|                 if (!this.selectedView) { | ||||
|                     return; | ||||
|                 } | ||||
|                 this.viewContainer = document.createElement('div'); | ||||
|                 this.$el.append(this.viewContainer) | ||||
|                 this.selectedView.show(this.viewContainer); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| </script> | ||||
							
								
								
									
										40
									
								
								src/ui/inspector/InspectorViews.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								src/ui/inspector/InspectorViews.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,40 @@ | ||||
| <template> | ||||
|     <div> | ||||
|     </div> | ||||
| </template> | ||||
|  | ||||
| <style> | ||||
| </style> | ||||
|  | ||||
| <script> | ||||
|     export default { | ||||
|         inject: ['openmct'], | ||||
|         mounted() { | ||||
|             this.openmct.selection.on('change', this.updateSelection); | ||||
|             this.updateSelection(); | ||||
|         }, | ||||
|         destroyed() { | ||||
|             this.openmct.selection.off('change', this.updateSelection); | ||||
|         }, | ||||
|         methods: { | ||||
|             updateSelection() { | ||||
|                 let selection = this.openmct.selection.get(); | ||||
|                 if (this.selectedViews) { | ||||
|                     this.selectedViews.forEach(selectedView => { | ||||
|                         selectedView.destroy(); | ||||
|                     }); | ||||
|                     this.$el.innerHTML = ''; | ||||
|                 } | ||||
|                 this.viewContainers = []; | ||||
|                 this.selectedViews = this.openmct.inspectorViews.get(selection); | ||||
|                 this.selectedViews.forEach(selectedView => { | ||||
|                     let viewContainer = document.createElement('div'); | ||||
|                     this.viewContainers.push(viewContainer); | ||||
|  | ||||
|                     this.$el.append(viewContainer) | ||||
|                     selectedView.show(viewContainer); | ||||
|                 }); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| </script> | ||||
| @@ -42,13 +42,9 @@ define([], function () { | ||||
|      * @private for platform-internal use | ||||
|      */ | ||||
|     InspectorViewRegistry.prototype.get = function (selection) { | ||||
|         var providers = this.getAllProviders().filter(function (provider) { | ||||
|         return this.getAllProviders().filter(function (provider) { | ||||
|             return provider.canView(selection); | ||||
|         }); | ||||
|  | ||||
|         if (providers && providers.length > 0) { | ||||
|             return providers[0].view(selection); | ||||
|         } | ||||
|         }).map(provider => provider.view(selection)); | ||||
|     }; | ||||
|  | ||||
|     /** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user