Skip to content

Commit

Permalink
Saga diagram initial message displaying wrong icon
Browse files Browse the repository at this point in the history
Event messages were being shown as Commands.
  • Loading branch information
John Simons committed Jun 2, 2015
1 parent f82d96f commit a0abb10
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
12 changes: 12 additions & 0 deletions src/ServiceInsight/Saga/SagaMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ public class SagaMessage : PropertyChangedBase

public bool IsPublished { get; set; }

public MessageIntent Intent { get; set; }

public bool IsEventMessage
{
get { return Intent == MessageIntent.Publish; }
}

public bool IsCommandMessage
{
get { return !IsEventMessage && !IsTimeout; }
}

public virtual bool IsTimeout
{
get
Expand Down
20 changes: 14 additions & 6 deletions src/ServiceInsight/Saga/SagaUpdateControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,18 +212,26 @@
VerticalAlignment="Top"
Style="{StaticResource FailedMessageMarker}" />

<ContentControl x:Name="MessageTypeIcon"
Grid.Column="0"
<ContentControl Grid.Column="0"
Width="20"
Margin="0,4,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Template="{StaticResource CommandIcon}"
ToolTip="Command"
Visibility="{Binding IsTimeout,
Converter={StaticResource BoolToVisibilityConverterInverted}}" />
<ContentControl x:Name="TimeoutIcon"
Grid.Column="0"
Visibility="{Binding IsCommandMessage,
Converter={StaticResource BoolToVisibilityConverter}}" />
<ContentControl Grid.Column="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="0,4,0,0"
Template="{StaticResource EventIcon}"
ToolTip="Event"
Width="22"
Visibility="{Binding IsEventMessage,
Converter={StaticResource BoolToVisibilityConverter}}">
</ContentControl>
<ContentControl Grid.Column="0"
Width="24"
Margin="0,8,0,0"
HorizontalAlignment="Center"
Expand Down

0 comments on commit a0abb10

Please sign in to comment.