|
15 | 15 | <Row> |
16 | 16 | <Column ColumnSize="ColumnSize.Is12"> |
17 | 17 | <Row Class="mb-3" @key="_filtersResetKey"> |
18 | | - <Column ColumnSize="ColumnSize.Is1"> |
19 | | - <Field> |
20 | | - <FieldLabel>Status</FieldLabel> |
21 | | - <Autocomplete TItem="string" |
22 | | - TValue="string" |
23 | | - Data="@_statusOptions" |
24 | | - TextField="@(item => item)" |
25 | | - ValueField="@(item => item)" |
26 | | - @bind-SelectedValue="@_statusFilterValue" |
27 | | - @bind-SelectedValue:after="OnFiltersChanged" |
28 | | - Placeholder="All" |
29 | | - FreeTyping="false" |
30 | | - MinLength="0" |
31 | | - Filter="AutocompleteFilter.Contains" /> |
32 | | - </Field> |
33 | | - </Column> |
34 | 18 | <Column ColumnSize="ColumnSize.Is2"> |
35 | 19 | <Field> |
36 | 20 | <FieldLabel>Source Node</FieldLabel> |
|
63 | 47 | Filter="AutocompleteFilter.Contains" /> |
64 | 48 | </Field> |
65 | 49 | </Column> |
66 | | - <Column ColumnSize="ColumnSize.Is2"> |
| 50 | + <Column ColumnSize="ColumnSize.Is1"> |
67 | 51 | <Field> |
68 | | - <FieldLabel>Wallet</FieldLabel> |
69 | | - <Autocomplete TItem="Wallet" |
70 | | - TValue="int?" |
71 | | - Data="@_wallets" |
72 | | - TextField="@(item => item.Name)" |
73 | | - ValueField="@(item => item.Id)" |
74 | | - @bind-SelectedValue="@_walletIdFilterValue" |
| 52 | + <FieldLabel>Status</FieldLabel> |
| 53 | + <Autocomplete TItem="string" |
| 54 | + TValue="string" |
| 55 | + Data="@_statusOptions" |
| 56 | + TextField="@(item => item)" |
| 57 | + ValueField="@(item => item)" |
| 58 | + @bind-SelectedValue="@_statusFilterValue" |
75 | 59 | @bind-SelectedValue:after="OnFiltersChanged" |
76 | 60 | Placeholder="All" |
77 | 61 | FreeTyping="false" |
78 | 62 | MinLength="0" |
79 | 63 | Filter="AutocompleteFilter.Contains" /> |
80 | 64 | </Field> |
81 | 65 | </Column> |
| 66 | + <Column ColumnSize="ColumnSize.Is2"> |
| 67 | + <Field> |
| 68 | + <FieldLabel>Channel Id</FieldLabel> |
| 69 | + <TextEdit @bind-Text="@_channelIdFilterValue" |
| 70 | + @bind-Text:after="OnFiltersChanged" |
| 71 | + Placeholder="All" /> |
| 72 | + </Field> |
| 73 | + </Column> |
82 | 74 | <Column ColumnSize="ColumnSize.Is1"> |
83 | 75 | <Field> |
84 | 76 | <FieldLabel>Availability</FieldLabel> |
|
193 | 185 | </Button> |
194 | 186 | </DisplayTemplate> |
195 | 187 | </DataGridColumn> |
| 188 | + <DataGridColumn TItem="Channel" Field="@nameof(Channel.ChanId)" Caption="Channel Id" Sortable="false" Displayable="@IsColumnVisible(ChannelsColumnName.CHANNEL_ID)"> |
| 189 | + <DisplayTemplate> |
| 190 | + <a href="@(Constants.AMBOSS_ENDPOINT + "/edge/" + context.ChanId)" target="_blank"> |
| 191 | + @context.ChanId |
| 192 | + </a> |
| 193 | + </DisplayTemplate> |
| 194 | + </DataGridColumn> |
196 | 195 | <DataGridNumericColumn TItem="Channel" Field="@nameof(Channel.SatsAmount)" Caption="Capacity (BTC)" Filterable="false" Sortable="true" Displayable="@IsColumnVisible(ChannelsColumnName.CAPACITY)"> |
197 | 196 | <DisplayTemplate> |
198 | 197 | @{ |
|
246 | 245 | </DataGridColumn> |
247 | 246 | <DataGridColumn TItem="Channel" Field="@nameof(Channel.CreationDatetime)" Caption="@nameof(Channel.CreationDatetime).Humanize(LetterCasing.Sentence)" Sortable="true" Displayable="@IsColumnVisible(ChannelsColumnName.CREATION_DATE)"/> |
248 | 247 | <DataGridColumn TItem="Channel" Field="@nameof(Channel.UpdateDatetime)" Caption="@nameof(Channel.UpdateDatetime).Humanize(LetterCasing.Sentence)" Sortable="true" Displayable="@IsColumnVisible(ChannelsColumnName.UPDATE_DATE)"/> |
249 | | - <DataGridColumn TItem="Channel" Field="@nameof(Channel.ChanId)" Caption="Channel Id" Sortable="false" Displayable="@IsColumnVisible(ChannelsColumnName.CHANNEL_ID)"> |
250 | | - <DisplayTemplate> |
251 | | - <a href="@(Constants.AMBOSS_ENDPOINT + "/edge/" + context.ChanId)" target="_blank"> |
252 | | - @context.ChanId |
253 | | - </a> |
254 | | - </DisplayTemplate> |
255 | | - </DataGridColumn> |
256 | 248 | <DataGridColumn TItem="Channel" Displayable="true"> |
257 | 249 | <FilterTemplate> |
258 | 250 | <ColumnLayout @ref="_channelsColumnLayout" Columns="@_channelsColumns" ColumnType="ChannelsColumnName" OnUpdate="@OnColumnLayoutUpdate"/> |
|
463 | 455 | private string? _statusFilterValue = "Open"; |
464 | 456 | private int? _sourceNodeIdFilterValue; |
465 | 457 | private int? _destinationNodeIdFilterValue; |
466 | | - private int? _walletIdFilterValue; |
| 458 | + private string? _channelIdFilterValue; |
467 | 459 | private DateTimeOffset? _fromDateFilter; |
468 | 460 | private DateTimeOffset? _toDateFilter; |
469 | 461 |
|
|
477 | 469 | private List<string> _availabilityOptions = new List<string> { "Active", "Inactive" }; |
478 | 470 |
|
479 | 471 | private List<Node> _nodes = new List<Node>(); |
480 | | - private List<Wallet> _wallets = new List<Wallet>(); |
481 | 472 | private int _totalItems; |
482 | 473 |
|
483 | 474 | [CascadingParameter] |
|
521 | 512 | if (LoggedUser != null) |
522 | 513 | { |
523 | 514 | _nodes = await NodeRepository.GetAll(); |
524 | | - _wallets = await WalletRepository.GetAll(); |
525 | 515 | _availableWallets = await WalletRepository.GetAvailableWallets(true); |
526 | 516 | if (ClaimsPrincipal != null && ClaimsPrincipal.IsInRole(ApplicationUserRole.NodeManager.ToString())) |
527 | 517 | { |
|
559 | 549 | statusFilter, |
560 | 550 | _sourceNodeIdFilterValue, |
561 | 551 | _destinationNodeIdFilterValue, |
562 | | - _walletIdFilterValue, |
| 552 | + _channelIdFilterValue, |
563 | 553 | fromDate, |
564 | 554 | toDate); |
565 | 555 |
|
|
595 | 585 | _statusFilterValue = null; |
596 | 586 | _sourceNodeIdFilterValue = null; |
597 | 587 | _destinationNodeIdFilterValue = null; |
598 | | - _walletIdFilterValue = null; |
| 588 | + _channelIdFilterValue = null; |
599 | 589 | _availabilityFilterValue = null; |
600 | 590 | _fromDateFilter = null; |
601 | 591 | _toDateFilter = null; |
|
0 commit comments