Skip to content

Commit

Permalink
[Discover] Deangularize context.html (#81442)
Browse files Browse the repository at this point in the history
* [Discover] Deangularize context.html

* Removing snapshot testing

* Applying PR comments

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
Maja Grubic and kibanamachine authored Oct 27, 2020
1 parent b3af2e9 commit 3228f71
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 783 deletions.
39 changes: 9 additions & 30 deletions src/plugins/discover/public/application/angular/context_app.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
>
</kbn-top-nav>


<!-- Error feedback -->
<context-error-message
status="contextApp.state.loadingStatus.anchor.status"
Expand All @@ -21,43 +20,23 @@
class="kuiViewContent kuiViewContentItem"
ng-if="contextApp.state.loadingStatus.anchor.status !== contextApp.constants.LOADING_STATUS.FAILED"
>
<!-- Controls -->
<context-action-bar
default-step-size="contextApp.state.queryParameters.defaultStepSize"
doc-count="contextApp.state.queryParameters.predecessorCount"
doc-count-available="contextApp.state.rows.predecessors.length"
is-disabled="contextApp.state.loadingStatus.anchor.status !== contextApp.constants.LOADING_STATUS.LOADED"
is-loading="![
contextApp.constants.LOADING_STATUS.LOADED,
contextApp.constants.LOADING_STATUS.FAILED,
].includes(contextApp.state.loadingStatus.predecessors.status)"
on-change-count="contextApp.actions.fetchGivenPredecessorRows"
type="'predecessors'"
></context-action-bar>

<!-- Table -->
<context-app-legacy
filter="contextApp.actions.addFilter"
hits="contextApp.state.rows.all"
index-pattern="contextApp.indexPattern"
sorting="contextApp.state.queryParameters.sort"
columns="contextApp.state.queryParameters.columns"
infinite-scroll="true"
minimum-visible-rows="contextApp.state.rows.all.length"
status="contextApp.state.loadingStatus.anchor.status"
></context-app-legacy>

<!-- Controls -->
<context-action-bar
default-step-size="contextApp.state.queryParameters.defaultStepSize"
doc-count="contextApp.state.queryParameters.successorCount"
doc-count-available="contextApp.state.rows.successors.length"
is-disabled="contextApp.state.loadingStatus.anchor.status !== contextApp.constants.LOADING_STATUS.LOADED"
is-loading="![
contextApp.constants.LOADING_STATUS.LOADED,
contextApp.constants.LOADING_STATUS.FAILED,
].includes(contextApp.state.loadingStatus.successors.status)"
on-change-count="contextApp.actions.fetchGivenSuccessorRows"
type="'successors'"
></context-action-bar>
predecessor-count="contextApp.state.queryParameters.predecessorCount"
predecessor-available="contextApp.state.rows.predecessors.length"
predecessor-status="contextApp.state.loadingStatus.predecessors.status"
on-change-predecessor-count="contextApp.actions.fetchGivenPredecessorRows"
successor-count="contextApp.state.queryParameters.successorCount"
successor-available="contextApp.state.rows.successors.length"
successor-status="contextApp.state.loadingStatus.successors.status"
on-change-successor-count="contextApp.actions.fetchGivenSuccessorRows"
></context-app-legacy>
</main>
Loading

0 comments on commit 3228f71

Please sign in to comment.