From da89e2f82e59ff295acb8d1b685a228a0a98e64c Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Wed, 29 Jun 2022 20:42:12 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20unable=20to=20filter=20fo?= =?UTF-8?q?r=20terminated=20sessions=20(#1169)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 🐛 unable to filter for terminated sessions * fix: 🐛 reenable sessions mocks --- .../templates/scopes/scope/sessions/index.hbs | 102 ++++----- .../scopes/scope/projects/sessions/index.hbs | 201 +++++++++--------- 2 files changed, 143 insertions(+), 160 deletions(-) diff --git a/ui/admin/app/templates/scopes/scope/sessions/index.hbs b/ui/admin/app/templates/scopes/scope/sessions/index.hbs index d16f8c035..0e948fad7 100644 --- a/ui/admin/app/templates/scopes/scope/sessions/index.hbs +++ b/ui/admin/app/templates/scopes/scope/sessions/index.hbs @@ -14,65 +14,57 @@ {{#if (feature-flag 'filter')}} - {{#if - (or - @model - (has-resource-filter-selections 'scopes.scope.sessions' 'status') - ) - }} - - - - {{#with - (resource-filter 'scopes.scope.sessions' 'status') - as |filter| - }} - + + + {{#with + (resource-filter 'scopes.scope.sessions' 'status') + as |filter| + }} + + - - - - - - - {{/with}} + + + + + + {{/with}} - {{#if - (has-resource-filter-selections - 'scopes.scope.sessions' 'status' - ) - }} - {{t 'actions.clear-all-filters'}} - - {{/if}} - - + {{#if + (has-resource-filter-selections 'scopes.scope.sessions' 'status') + }} + {{t 'actions.clear-all-filters'}} + + {{/if}} + + - - - + + + + + - - {{/if}} {{/if}} {{#if @model}} diff --git a/ui/desktop/app/templates/scopes/scope/projects/sessions/index.hbs b/ui/desktop/app/templates/scopes/scope/projects/sessions/index.hbs index caeb0c36f..9b63dd557 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/sessions/index.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/sessions/index.hbs @@ -10,116 +10,107 @@ {{#if (feature-flag 'filter')}} - {{#if - (or - @model - (has-resource-filter-selections - 'scopes.scope.projects.sessions' 'status' 'project' - ) - ) - }} - - - - {{#with - (resource-filter 'scopes.scope.projects.sessions' 'status') - as |filter| - }} - + + + {{#with + (resource-filter 'scopes.scope.projects.sessions' 'status') + as |filter| + }} + + - - - - - - - {{/with}} + + + + + + {{/with}} - {{#with - (resource-filter 'scopes.scope.projects.sessions' 'project') - as |filter| - }} - -
    - {{#with - (group-by filter.allowedValues 'scopeModel') - as |groups| - }} - {{#each groups as |groupedItems|}} -
  • - - - {{groupedItems.key.displayName}} - -
      - -
    • - - - -
    • -
      -
    -
  • - {{/each}} - {{/with}} -
-
- {{/with}} + {{#with + (resource-filter 'scopes.scope.projects.sessions' 'project') + as |filter| + }} + +
    + {{#with + (group-by filter.allowedValues 'scopeModel') + as |groups| + }} + {{#each groups as |groupedItems|}} +
  • + + + {{groupedItems.key.displayName}} + +
      + +
    • + + + +
    • +
      +
    +
  • + {{/each}} + {{/with}} +
+
+ {{/with}} - {{#if - (has-resource-filter-selections - 'scopes.scope.projects.sessions' 'status' 'project' - ) - }} - {{t 'actions.clear-all-filters'}} - - {{/if}} -
-
+ {{#if + (has-resource-filter-selections + 'scopes.scope.projects.sessions' 'status' 'project' + ) + }} + {{t 'actions.clear-all-filters'}} + + {{/if}} + + - - - + + + -
- {{/if}} + {{/if}} {{#if this.sorted}}