laminas-api-tools / api-tools-admin-ui
Laminas API Tools Admin UI module
Fund package maintenance!
Community Bridge
Installs: 558 353
Dependents: 2
Suggesters: 0
Security: 0
Stars: 6
Watchers: 10
Forks: 11
Open Issues: 18
Language:JavaScript
Requires
- php: ~8.0.0 || ~8.1.0 || ~8.2.0
- laminas/laminas-view: ^2.8.1
- laminas/laminas-zendframework-bridge: ^1.0
Requires (Dev)
- laminas/laminas-console: ^2.6
Suggests
- laminas-api-tools/api-tools-asset-manager: ^1.0, to expose assets under the document root, until rwoverdijk/assetmanager 1.7 is released
- rwoverdijk/assetmanager: ^1.7, to expose assets under the document root (may not yet be released)
Replaces
- zfcampus/zf-apigility-admin-ui: ^1.3.13
This package is auto-updated.
Last update: 2024-10-09 17:19:14 UTC
README
π·πΊ Π ΡΡΡΠΊΠΈΠΌ Π³ΡΠ°ΠΆΠ΄Π°Π½Π°ΠΌ
ΠΡ, ΡΡΠ°ΡΡΠ½ΠΈΠΊΠΈ Laminas, ΡΠΎΠ΄ΠΈΠ»ΠΈΡΡ ΠΈ ΠΆΠΈΠ²Π΅ΠΌ Π² ΡΠ°Π·Π½ΡΡ ΡΡΡΠ°Π½Π°Ρ . Π£ ΠΌΠ½ΠΎΠ³ΠΈΡ ΠΈΠ· Π½Π°Ρ Π΅ΡΡΡ Π΄ΡΡΠ·ΡΡ, ΡΠΎΠ΄ΡΡΠ²Π΅Π½Π½ΠΈΠΊΠΈ ΠΈ ΠΊΠΎΠ»Π»Π΅Π³ΠΈ ΠΊΠ°ΠΊ Π² Π ΠΎΡΡΠΈΠΈ, ΡΠ°ΠΊ ΠΈ Π² Π£ΠΊΡΠ°ΠΈΠ½Π΅. ΠΠ΅ΠΊΠΎΡΠΎΡΡΠ΅ ΠΈΠ· Π½Π°Ρ ΡΠΎΠ΄ΠΈΠ»ΠΈΡΡ Π² Π ΠΎΡΡΠΈΠΈ. ΠΠ΅ΠΊΠΎΡΠΎΡΡΠ΅ ΠΈΠ· Π½Π°Ρ ΠΆΠΈΠ²ΡΡ Π² Π ΠΎΡΡΠΈΠΈ. Π£ Π½Π΅ΠΊΠΎΡΠΎΡΡΡ Π±Π°Π±ΡΡΠΊΠΈ ΠΈ Π΄Π΅Π΄ΡΡΠΊΠΈ ΡΡΠ°ΠΆΠ°Π»ΠΈΡΡ Ρ ΡΠ°ΡΠΈΡΡΠ°ΠΌΠΈ Π²ΠΎ ΠΡΠΎΡΠΎΠΉ ΠΌΠΈΡΠΎΠ²ΠΎΠΉ Π²ΠΎΠΉΠ½Π΅. ΠΠ΄Π΅ΡΡ Π½ΠΈΠΊΡΠΎ Π½Π΅ ΠΏΠΎΠ΄Π΄Π΅ΡΠΆΠΈΠ²Π°Π΅Ρ ΡΠ°ΡΠΈΠ·ΠΌ.
Π£ ΠΎΠ΄Π½ΠΎΠ³ΠΎ ΠΈΠ· Π½Π°Ρ Π΅ΡΡΡ ΡΠΊΡΠ°ΠΈΠ½ΡΠΊΠ°Ρ ΡΠΎΠ΄ΡΡΠ²Π΅Π½Π½ΠΈΡΠ°, ΠΊΠΎΡΠΎΡΠ°Ρ ΡΠΏΠ°ΡΠ»Π°ΡΡ ΠΈΠ· Π΄ΠΎΠΌΠ° Π²ΠΌΠ΅ΡΡΠ΅ Ρ ΡΡΠ½ΠΎΠΌ. ΠΠΎΠ΅Π·Π΄ Π·Π°Π΄Π΅ΡΠΆΠ°Π»ΡΡ ΠΈΠ·-Π·Π° Π±ΠΎΠΌΠ±Π΅ΠΆΠΊΠΈ Π½Π° Π΄ΠΎΡΠΎΠ³Π΅ Π²ΠΏΠ΅ΡΠ΅Π΄ΠΈ. Π£ Π½Π°Ρ Π΅ΡΡΡ Π΄ΡΡΠ·ΡΡ, ΠΊΠΎΡΠΎΡΡΠ΅ ΠΏΡΡΡΡΡΡΡ Π² Π±ΠΎΠΌΠ±ΠΎΡΠ±Π΅ΠΆΠΈΡΠ°Ρ . ΠΡ Ρ ΡΡΠ΅Π²ΠΎΠ³ΠΎΠΉ ΠΆΠ΄Π΅ΠΌ Π²Π΅ΡΡΠΎΡΠΊΠΈ ΠΎΡ Π½ΠΈΡ ΠΏΠΎΡΠ»Π΅ Π²ΠΎΠ·Π΄ΡΡΠ½ΡΡ Π½Π°Π»Π΅ΡΠΎΠ², ΠΊΠΎΡΠΎΡΡΠ΅ Π±Π΅ΡΠΏΠΎΡΡΠ΄ΠΎΡΠ½ΠΎ Π½Π°Π½ΠΎΡΡΡ ΡΠ΄Π°ΡΡ ΠΈ ΠΏΠΎΠΏΠ°Π΄Π°ΡΡ ΠΏΠΎ Π±ΠΎΠ»ΡΠ½ΠΈΡΠ°ΠΌ, ΡΠΊΠΎΠ»Π°ΠΌ, Π΄Π΅ΡΡΠΊΠΈΠΌ ΡΠ°Π΄Π°ΠΌ ΠΈ Π΄ΠΎΠΌΠ°ΠΌ. ΠΡ Π½Π΅ Π±Π΅ΡΠ΅ΠΌ ΡΡΠΎ ΠΈΠ· ΠΊΠ°ΠΊΠΈΡ -Π»ΠΈΠ±ΠΎ Π‘ΠΠ. ΠΡ Π½Π°Π±Π»ΡΠ΄Π°Π΅ΠΌ ΡΡΠΎ Π½Π°ΠΏΡΡΠΌΡΡ.
ΠΡ Π΄ΠΎΠ²Π΅ΡΡΠ΅ΡΠ΅ Π½Π°ΠΌ Π΄ΠΎΡΡΠ°ΡΠΎΡΠ½ΠΎ, ΡΡΠΎΠ± ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡ Π½Π°ΡΠΈ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ, ΠΈ ΠΌΡ ΠΏΡΠΎΡΠΈΠΌ Π²Π°Ρ Π΄ΠΎΠ²Π΅ΡΠΈΡΡΡΡ Π½Π°ΠΌ Π²Π½ΠΎΠ²Ρ. ΠΡ Π½ΡΠΆΠ΄Π°Π΅ΠΌΡΡ Π² ΠΏΠΎΠΌΠΎΡΠΈ. ΠΡΡ ΠΎΠ΄ΠΈΡΠ΅ ΠΈ ΠΏΡΠΎΡΠ΅ΡΡΡΠΉΡΠ΅ ΠΏΡΠΎΡΠΈΠ² ΡΡΠΎΠΉ Π±Π΅ΡΠΏΠΎΠ»Π΅Π·Π½ΠΎΠΉ Π²ΠΎΠΉΠ½Ρ. ΠΡΡΠ°Π½ΠΎΠ²ΠΈΡΠ΅ ΠΊΡΠΎΠ²ΠΎΠΏΡΠΎΠ»ΠΈΡΠΈΠ΅. Π‘ΠΊΠ°ΠΆΠΈΡΠ΅ "ΠΠ΅Ρ Π²ΠΎΠΉΠ½Π΅!"
πΊπΈ To Citizens of Russia
We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism.
One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences.
You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!"
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;
- 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-developThis 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 asjshint
, 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.