2.3.1 • Published 3 years ago
@ezpaarse-project/ezmesure-admin v2.3.1
ezmesure-admin
Prerequisite
- git >= 2.27.0
- NodeJS >= 14.15.0
- npm >= 6.14.8
Install
$ npm i -g @ezpaarse-project/ezmesure-adminUsage
$ ezmesure-admin --help
$ ezadmin --help
$ eza --helpGlobal options
| Name | Type | Description |
|---|---|---|
| -t, --timeout | String | Request timeout in milliseconds |
| -v, --verbose | Boolean | Make the operation more talkative |
| --version | Boolean | Print the version number |
| --help | Boolean | Show some help |
Commands
| Name | Description |
|---|---|
| cluster | Manage cluster |
| completion | Use auto completion |
| config | Manage ezmesure-admin config |
| counter4 (deprecated) | Load counter4 files in Kibana |
| counter5 | COUNTER5 commands |
| dashboard | Manage Kibana dashboards |
| indices | Manager ezMESURE/Kibana users |
| index-pattern | Manager ezMESURE/Kibana users |
| institutions | Manage ezMESURE institutions |
| login | Login user in commands |
| logout | Log out from ezMESURE |
| ping | Ping ElasticSearch and ezMESURE |
| profile | Displays the person who is connected to the command |
| reporting | Manage ezMESURE reporting |
| roles | Manage Kibana roles |
| spaces | Manage Kibana spaces |
| sushi | Manage ezMESURE sushi |
| users | Manage ezMESURE/Kibana users |
Development
$ git clone https://github.com/ezpaarse-project/ezmesure-admin.git
$ cd ezmesure-admin
$ npm installTo use the command in development mode simply use it as follows: ./ezmesure-admin <command>
Tests
Set EZMESURE_ADMIN_USERNAME and EZMESURE_ADMIN_PASSWORD envrionment variables.
You need configure
elasticandezmesureconfig before use.The user cannot be a reserved user (ex: elastic, ...). He must have
superuserrights to perform the testsIt can be the default user created at the initialization of ezMESURE using the same environment variables.
$ npm run testi18n
- In
ezmesure-adminfile, add your locale inlocalesarray. - Create your locale
JSONfile inlocalesfolder. Import i18nin your commande file- Use
i18n.t()function to translate
Example :
Command file :
const { i18n } = global;
exports.command = 'mycmd';
exports.desc = i18n.t('mycmd.description');
exports.builder = {};
exports.handler = async function handler() {
console.log(i18n.t('mycmd.helloWorld'))
};Locale file :
{
"mycmd": {
"descritpion": "This is my command",
"helloWorld": "Hello World"
}
}License
CeCILL.