Skip to content

Conversation

Leodau
Copy link
Contributor

@Leodau Leodau commented Mar 9, 2021

What does this PR do?

This PR implements the recently added index:stats (@ Kuzzle Backend v2.10.0)
So it can be used directly, instead of having to use query to access it.

Todo:

  • Implementation
  • Unit Testing
  • Doc + Code Snippet

How should this be manually tested?

  1. Launch a Kuzzle stack.
  2. Directly use sdk.index.stats()
  3. Verify that you get stats that make sense.

Closes #608

ℹ️ It seems that Codecov is not taking the latest commit? 🤦

@codecov
Copy link

codecov bot commented Mar 9, 2021

Codecov Report

Merging #613 (5f3684c) into 7-dev (fce607b) will decrease coverage by 0.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##            7-dev     #613      +/-   ##
==========================================
- Coverage   86.75%   86.73%   -0.02%     
==========================================
  Files          33       33              
  Lines        1502     1508       +6     
  Branches      262      262              
==========================================
+ Hits         1303     1308       +5     
- Misses        146      147       +1     
  Partials       53       53              
Impacted Files Coverage Δ
src/controllers/Index.ts 75.00% <66.66%> (-1.20%) ⬇️
src/core/security/User.ts 100.00% <0.00%> (ø)
src/controllers/Security.js 95.00% <0.00%> (+0.07%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fce607b...5f3684c. Read the comment docs.

@Leodau Leodau changed the title Implement the new Index:Stats Implement Index:Stats Mar 10, 2021
@Leodau Leodau marked this pull request as ready for review March 10, 2021 17:47
@Leodau Leodau linked an issue Mar 10, 2021 that may be closed by this pull request
@Leodau Leodau requested a review from Aschen March 11, 2021 12:59
@Aschen Aschen changed the title Implement Index:Stats Implement index:stats Mar 11, 2021
Copy link
Member

@alexandrebouthinon alexandrebouthinon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To fix unit tests, you need to add this line at the top of src/controllers/Index.ts:

import { JSONObject } from '../types';

@alexandrebouthinon alexandrebouthinon merged commit f1fb225 into 7-dev Mar 19, 2021
@alexandrebouthinon alexandrebouthinon deleted the feature/implement-index-stats branch March 19, 2021 14:21
@Aschen Aschen mentioned this pull request Apr 6, 2021
Aschen added a commit that referenced this pull request Apr 7, 2021
# [7.6.0](https://github.com/kuzzleio/sdk-javascript/releases/tag/7.6.0) (2021-04-06)


#### Bug fixes

- [ [#622](#622) ] Pick first route when multiple non-GET routes of the same size are available   ([scottinet](https://github.com/scottinet))

#### New features

- [ [#621](#621) ] Secure WebSocket connection with cookie authentication   ([Shiranuit](https://github.com/Shiranuit))
- [ [#613](#613) ] Implement index:stats   ([Leodau](https://github.com/Leodau))
- [ [#612](#612) ] Implement security:getUserStrategies   ([Leodau](https://github.com/Leodau))

#### Enhancements

- [ [#620](#620) ] Add kuzzleStack property to KuzzleError   ([Aschen](https://github.com/Aschen))
- [ [#617](#617) ] Add suggest to search result   ([Aschen](https://github.com/Aschen))
- [ [#614](#614) ] Print deprecation warning from Kuzzle   ([MathieuVeber](https://github.com/MathieuVeber))
- [ [#606](#606) ] Add _source property to user objects   ([Aschen](https://github.com/Aschen))
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement API action index:stats

4 participants