Giter VIP home page Giter VIP logo

ng-postgrest's Introduction

Angular Postgrest

The goal of this project is to build a simple Angular UI client (CRUD) for Postgrest (Postgrest is a REST wrapper for PostgresSQL. See https://postgrest.com).

Logo

Development

To install the node dependencies the project run npm i from within the root directory.

Run ng serve --open for a dev server. Navigate to http://localhost:4200/.

The app will automatically reload if you change any of the source files.

Build

Run ./build.sh to build the project

or

Run ng build --prod --aot=false .

Features

Completed

  • Managing Postgrest endpoints
  • Table selection
  • Table pagination
  • Table pagination size
  • Update row (currently testing for non-text fields)
  • Delete row (with confirmation)

Next to be implemented

  • Insert new row
  • Simple queries (AND only)

Planned

  • Complex queries (Support for AND, OR)
  • Security headers
  • Persisting defaults
  • Saving & loading settings (Google drive)
  • Host latest release on Github pages
  • Docker image (Alpine, Nginx)
  • Heroku button
  • Clear exception communication

Stack

  • Angular 4
  • Bootstrap 4
  • Sweet Alert 2
  • Karma
  • Postgrest

ng-postgrest's People

Contributors

just1689 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ng-postgrest's Issues

SaveEdit is filtering by "id" is hard codded

  public saveEdit(): void {
    this._postgrestService.doPatch(this.currentUrl + this.table + "?id=eq." + this.tableRowToEdit['id'], this.tableRowToEdit)
      .catch(error => console.log(error))
      .then(res => this.cancelEdit())

  }

Also the delete function

  public deleteRow(row: any) {
    var t = this;
    this._postgrestService.doDelete(this.currentUrl + this.table + "?id=eq." + row['id'])
      .catch(error => console.log(error))
      .then(v => t.refreshTable()
      )

  }

This function can be changed to filter the edit by the primary key of the table.
I can make a PR, just tell me if you can merge it?

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.