Giter Site home page Giter Site logo

21-points-v7's Introduction

Howdy, folks! 🤠

Matt's YouTube Channel   Follow @mraible on Twitter   Matt on LinkedIn   Matt's Stack Overflow  

  • 🔭 I'm currently working on finding my next gig. See my funemployment story and resume.
  • 💬 Ask me about Java, Spring Boot, JHipster, Angular, or OAuth/OIDC.
  • 😄 Pronouns: He/him.
  • ⚡ Fun fact: I grew up without electricity or running water for 16 years.

Twitter follow @mraible   Linkedin follow @sivalabs   Blog

Languages and Tools

Matt's most used languages

My GitHub Stats

Matt's GitHub stats

21-points-v7's People

Contributors

mraible avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

atomfrede

21-points-v7's Issues

Improve UI and charts implementation

  • search box and buttons are taller than previous

  • tooltip on bp chart doesn't show both values at same time like current

  • axis labels on chart

  • enhancement: charts should be clickable

  • Get rid of error when homepage loads:

    ERROR TypeError: Cannot read properties of undefined (reading 'readings')
    

Add security to search endpoints

Before security:

@GetMapping("/_search/blood-pressures")
public ResponseEntity<List<BloodPressure>> searchBloodPressures(
    @RequestParam String query,
    @org.springdoc.api.annotations.ParameterObject Pageable pageable
) {
    log.debug("REST request to search for a page of BloodPressures for query {}", query);
    Page<BloodPressure> page = bloodPressureSearchRepository.search(query, pageable);
    HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(ServletUriComponentsBuilder.fromCurrentRequest(), page);
    return ResponseEntity.ok().headers(headers).body(page.getContent());
}

After:

@GetMapping("/_search/blood-pressures")
public ResponseEntity<List<BloodPressure>> searchBloodPressures(
    @RequestParam String query,
    @org.springdoc.api.annotations.ParameterObject Pageable pageable
) {
    log.debug("REST request to search for a page of BloodPressures for query {}", query);
    BoolQueryBuilder queryBuilder = QueryBuilders.boolQuery().must(queryStringQuery(query));
    if (SecurityUtils.isAuthenticated() && !SecurityUtils.hasCurrentUserThisAuthority(AuthoritiesConstants.ADMIN)) {
        queryBuilder = queryBuilder.filter(matchQuery("user.login", SecurityUtils.getCurrentUserLogin().orElse("")));
    }
    // todo: figure out how to use queryBuilder in search()
    // SearchSourceBuilder sourceBuilder = new SearchSourceBuilder();
    // sourceBuilder.query(queryBuilder);
    Page<BloodPressure> page = bloodPressureSearchRepository.search(query, pageable);
    HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(ServletUriComponentsBuilder.fromCurrentRequest(), page);
    return ResponseEntity.ok().headers(headers).body(page.getContent());
}

In JHipster 5, it was possible to pass the queryBuilder directly into the search() method.

https://github.com/mraible/21-points/blob/main/src/main/java/org/jhipster/health/web/rest/BloodPressureResource.java#L225-L235

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.