GithubHelp home page GithubHelp logo

samsonasik / api-tools-admin-ui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from laminas-api-tools/api-tools-admin-ui

0.0 1.0 0.0 7.89 MB

Laminas API Tools Admin UI module

Home Page: https://api-tools.getlaminas.org/documentation

License: BSD 3-Clause "New" or "Revised" License

JavaScript 71.12% PHP 0.54% HTML 26.89% CSS 1.45%

api-tools-admin-ui's Introduction

Laminas API Tools Admin UI (develop branch)

This is the source code for the new Laminas API Tools Admin User Interface. We rewrote from scratch the UI in AngularJS with performance improvement and usability.

We added some new features:

  • Doctrine support for DB connected REST service;
  • DB autodiscovering for table and fields;
  • Build package API file, ready for deployment (develop in progress, see TODO list);
  • Per-API authentication (develop in progress, see TODO list);

Note

To be able to run the new UI you need to use the develop branch of api-tools-skeleton For instance, you can install the develop branch using composer:

composer create-project laminas-api-tools/api-tools-skeleton api-tools dev-develop

This command install the api-tools-skeleton application in the api-tools local folder.

Requirements

  • npm, for installing the various development requirements, which primarily includes Grunt and Bower, and tools these to utilize.
  • Grunt must be installed globally in order to allow using it to serve a source build and run tests.
  • Bower must be installed globally in order to allow using it to install development dependencies.

Run the following command from this directory to install dependencies:

$ npm install

If you have not yet installed Grunt, please do so:

$ sudo npm install -g grunt

If you have not yet installed Bower, please do so:

$ sudo npm install -g bower

Finally, invoke Bower to install the relevant CSS and JS libraries:

$ bower install

Invoking the Admin

There are three ways to invoke the Admin UI: as part of an Laminas API Tools project, standalone via node, or via source using grunt.

Via Laminas API Tools

Add the admin as a dev requirement to your project:

$ composer require-dev "laminas-api-tools/api-tools-admin-ui:~1.0"

and add the module Laminas\ApiTools\Admin\Ui to the list of modules in config/development.config.php.dist (and potentially config/development.config.php if already in development mode.

Navigating to the URI /api-tools/ui in your Laminas API Tools application will now hit the UI.

Standalone

The standalone method fires up a webserver using node. This method requires that you have a running Laminas API Tools Admin API and know the URL, and that that server is configured to enable CORS; see the Laminas API Tools CORS documentation if you need help setting this aspect up. Make a note of the URI for your server; the API URI will be <server>/api-tools/api.

Additionally, we recommend noting the URI to your API documentation, so that the navigation item can point to it.

Fire up the admin UI using:

$ node index.js --src --api=<URI to Laminas API Tools Admin API (ends in /api-tools/api)>

(For help with options, see node index.js -h.)

By default, if you do not specify a port, the server will run on port 3000; you can specify a port with the --port=<port> option.

Source invocation via Grunt

The grunt serve command does several things:

  • Runs grunt watch, which looks for file changes and runs tasks such as jshint, unit tests, and combining partials into JS templates.
  • Runs a livereload, static HTTP server; any file change will force it to reload, and trigger any browser windows with the UI loaded to reload.

The grunt server runs in the same way as the standalone server: it accepts the same options, and has the same CORS limitations. As an example:

$ grunt serve --api=<URI to Laminas API Tools Admin API (ends in /api-tools/api)> \
> --doc=<URI to API documentation> --port=3001 --host=ag.dev

Please see our contributing guide for information on how to run tests and hack on the UI.

api-tools-admin-ui's People

Contributors

alexdennis avatar colinkelly avatar ezimuel avatar gartner avatar garygitton avatar geerteltink avatar gsomoza avatar hounddog avatar ildanno avatar intellix avatar jguittard avatar kaloyan-raev avatar leonardo-piseri avatar manchuck avatar michaelmoussa avatar michalbundyra avatar mrvralex avatar perico avatar ralphschindler avatar reduardo7 avatar robertmarsal avatar saulotoledo avatar steverhoades avatar thomasvargiu avatar tomhanderson avatar weierophinney avatar zf2timo avatar

Watchers

 avatar

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.