Repository navigation
Expand file tree
/
Copy pathSubscriptionDocumentView.axaml
More file actions
133 lines (133 loc) · 7.96 KB
/
Copy pathSubscriptionDocumentView.axaml
File metadata and controls
133 lines (133 loc) · 7.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<!--
SPDX-FileCopyrightText: Copyright (c) 2005-2026, OPC Federation AISBL
SPDX-License-Identifier: MIT
-->
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:UaLens.ViewModels"
xmlns:v="using:UaLens.Views"
xmlns:sub="using:UaLens.Subscriptions"
x:Class="UaLens.Views.SubscriptionDocumentView"
x:DataType="vm:SubscriptionViewModel"
Background="{DynamicResource SurfaceBg}">
<Grid RowDefinitions="Auto,Auto,Auto,*,Auto">
<Border Background="{DynamicResource PanelBg}" Padding="12,8"
BorderBrush="{DynamicResource PanelBorder}" BorderThickness="0,0,0,1">
<WrapPanel Classes="toolbar" ItemHeight="36">
<TextBlock x:Name="PublishingIntervalLabel" Text="Publishing (ms)" Margin="0,0,8,0" />
<NumericUpDown x:Name="PublishingIntervalInput" Minimum="0" Maximum="3600000"
Increment="10" Width="150" FormatString="0.###"
AutomationProperties.LabeledBy="{Binding #PublishingIntervalLabel}"
AutomationProperties.Name="Publishing interval (milliseconds)"
ToolTip.Tip="Requested interval. The server's revised value appears below." />
<Button x:Name="ApplyPublishingButton" Content="Apply" Margin="6,0,12,0" />
<CheckBox x:Name="PublishingEnabledCheck" Content="Publishing" Margin="0,0,12,0"
ToolTip.Tip="Changes server publishing, not just display playback." />
<TextBlock x:Name="DocumentViewLabel" Text="View" Margin="0,0,6,0" />
<ComboBox x:Name="DocumentViewMode" MinWidth="120" Margin="0,0,12,0"
AutomationProperties.LabeledBy="{Binding #DocumentViewLabel}"
AutomationProperties.Name="Monitor view">
<ComboBoxItem Content="Values" />
<ComboBoxItem Content="Trend" />
<ComboBoxItem Content="Timing: dots" />
<ComboBoxItem Content="Timing: bars" />
<ComboBoxItem Content="Timing: lines" />
<ComboBoxItem Content="Histogram" />
<ComboBoxItem Content="Heatmap" />
</ComboBox>
<Button x:Name="SubscriptionSettingsButton" Content="Settings"
ToolTip.Tip="Keep-alive, lifetime, priority and notification limits" />
</WrapPanel>
</Border>
<Grid Grid.Row="1" ColumnDefinitions="*,Auto,Auto,Auto" Margin="12,10,12,4">
<TextBox x:Name="MonitoredNodeIdInput" PlaceholderText="Add a node by id, or use Monitor in the address space"
AutomationProperties.Name="Monitored node id"
FontFamily="Cascadia Mono, Consolas, monospace"
ToolTip.Tip="Examples: i=2258 or ns=2;s=Scalar_Simulation_UInt32" />
<Button Grid.Column="1" x:Name="AddNodeIdButton" Content="Add node" Margin="6,0,0,0" />
<Button Grid.Column="2" x:Name="ItemSettingsButton" Content="Item settings" Margin="6,0,0,0"
ToolTip.Tip="Select an item to edit sampling, mode, queue and filter." />
<Button Grid.Column="3" x:Name="RemoveSelectedItemButton" Content="Remove" Margin="6,0,0,0" />
</Grid>
<StackPanel Grid.Row="2" Margin="12,4,12,6" Spacing="3">
<TextBlock Text="Offline: settings and nodes are retained until a connection is available."
IsVisible="{CompiledBinding !IsBound}" Classes="caption" TextWrapping="Wrap" />
<TextBlock Text="{CompiledBinding ErrorText}" Foreground="{DynamicResource ErrorText}"
TextWrapping="Wrap" />
<WrapPanel x:Name="LaneStyleOptions" IsVisible="False" Classes="toolbar" ItemHeight="36">
<TextBlock x:Name="LaneItemLabel" Text="Lane item" Margin="0,0,6,0" />
<ComboBox x:Name="LaneItemSelector" MinWidth="150" MaxWidth="400" Margin="0,0,12,0"
ItemsSource="{CompiledBinding Items}" Focusable="True"
AutomationProperties.Name="Timing lane item"
AutomationProperties.LabeledBy="{Binding #LaneItemLabel}">
<ComboBox.ItemTemplate>
<DataTemplate x:DataType="sub:MonitoredItemConfig">
<TextBlock Text="{CompiledBinding DisplayName}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock x:Name="LaneStyleLabel" Text="Line style" Margin="0,0,6,0" />
<ComboBox x:Name="LaneStyleSelector" MinWidth="150" Focusable="True"
AutomationProperties.LabeledBy="{Binding #LaneStyleLabel}"
AutomationProperties.Name="Timing lane line style">
<ComboBoxItem Content="Interpolated" />
<ComboBoxItem Content="Wave" />
<ComboBoxItem Content="Zigzag" />
</ComboBox>
</WrapPanel>
<Expander x:Name="ChartOptions" Header="Chart options" IsExpanded="False" IsVisible="False">
<WrapPanel Classes="toolbar" ItemHeight="34">
<CheckBox x:Name="ChartLegendCheck" Content="Legend"
IsChecked="{CompiledBinding ShowLegend, Mode=TwoWay}" Margin="0,0,12,0" />
<CheckBox x:Name="ChartXAxisCheck" Content="X axis"
IsChecked="{CompiledBinding ShowXAxis, Mode=TwoWay}" Margin="0,0,12,0" />
<CheckBox x:Name="ChartYAxisCheck" Content="Y axis"
IsChecked="{CompiledBinding ShowYAxis, Mode=TwoWay}" Margin="0,0,12,0" />
<CheckBox Content="Resource overlay"
IsChecked="{CompiledBinding ShowResourceOverlay, Mode=TwoWay}" Margin="0,0,12,0" />
<Button x:Name="ChartZoomOutButton" Content="Zoom out" Margin="0,0,6,0" />
<Button x:Name="ChartZoomResetButton" Content="Reset zoom" Margin="0,0,6,0" />
<Button x:Name="ChartZoomInButton" Content="Zoom in" />
</WrapPanel>
</Expander>
</StackPanel>
<Grid Grid.Row="3" x:Name="DocumentDataGrid" RowDefinitions="*,0">
<Grid RowDefinitions="Auto,*">
<Grid ColumnDefinitions="160,*,120,120" Margin="12,4">
<TextBlock Text="Node" Classes="caption" />
<TextBlock Grid.Column="1" Text="Latest value" Classes="caption" />
<TextBlock Grid.Column="2" Text="Quality" Classes="caption" />
<TextBlock Grid.Column="3" Text="Source time (UTC)" Classes="caption" />
</Grid>
<ListBox Grid.Row="1" x:Name="MonitorValuesList"
AutomationProperties.Name="Monitored item values"
ItemsSource="{CompiledBinding ItemStatuses}" Background="Transparent" BorderThickness="0">
<ListBox.ItemTemplate>
<DataTemplate x:DataType="vm:MonitoredItemStatusRow">
<Grid ColumnDefinitions="160,*,120,120" Margin="4,4">
<TextBlock Text="{CompiledBinding BrowseName}" TextTrimming="CharacterEllipsis"
ToolTip.Tip="{CompiledBinding NodeId}" Margin="0,0,10,0" />
<TextBlock Grid.Column="1" Text="{CompiledBinding LastValue}" Classes="code"
TextTrimming="CharacterEllipsis" Margin="0,0,10,0" />
<TextBlock Grid.Column="2" Text="{CompiledBinding LastStatus}" TextTrimming="CharacterEllipsis"
ToolTip.Tip="{CompiledBinding LastStatus}" />
<TextBlock Grid.Column="3" Text="{CompiledBinding SourceTimestamp}" Classes="code"
ToolTip.Tip="{CompiledBinding ServerTimestamp, StringFormat='Server time (UTC): {0}'}" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
<Grid Grid.Row="1" x:Name="DocumentChart" IsVisible="False">
<v:AnimationCanvas x:Name="DocumentAnimation" />
<v:ScottPlotView x:Name="DocumentPlot" IsVisible="False" />
</Grid>
</Grid>
<Border Grid.Row="4" BorderBrush="{DynamicResource PanelBorder}" BorderThickness="0,1,0,0"
Padding="12,8">
<StackPanel Spacing="3">
<TextBlock x:Name="DocumentDeliverySummary" Classes="caption" TextWrapping="Wrap" />
</StackPanel>
</Border>
</Grid>
</UserControl>