Commit Graph

148 Commits

Author SHA1 Message Date
DDDHuang 03ca53d9b3 fix: monitor api query string param latest: legal & default value infinity 2022-03-10 16:40:40 +08:00
DDDHuang 103df6f06b fix: dashboard monitor bpapi 2022-02-25 18:38:10 +08:00
DDDHuang 00b83121a4 fix(test): add api test SUITE & bug fix 2022-02-25 17:36:07 +08:00
DDDHuang 8c1c87a8d6 fix(test): add monitor SUITE, TODO: API Test SUITE 2022-02-25 17:36:07 +08:00
DDDHuang fedfa6c653 feat: monitor api, TODO: test suite 2022-02-25 17:36:07 +08:00
Zhongwen Deng db584f79d6 feat: upgrade hocon to 0.25.0 to replace nullable with required. 2022-02-24 22:39:03 +08:00
Zhongwen Deng 334d315838 feat: gen hot conf schema.json. 2022-02-24 15:46:51 +08:00
DDDHuang 90ee450a84 feat: support http error code & error code api 2022-02-22 17:14:35 +08:00
JimMoen 2a1fba97da test(auth): resource use connector provided default port 2022-02-15 10:41:26 +08:00
zhongwencool 47b1dde7fd
Merge pull request #6949 from zhongwencool/add-qos-type
feat(schema): support qos type.
2022-02-09 16:13:11 +08:00
zhongwencool 36cf00108c feat(schema): support qos type. 2022-02-09 15:16:43 +08:00
Chris d0b0b05aa4 fix: decouple suite tests 2022-02-08 14:53:01 +01:00
JianBo He af2868e598 chore(dashboard): change root name emqx_dashboard > dashboard 2022-01-12 13:51:34 +08:00
Zaiming (Stone) Shi 63167cea70 chore: update copyright 2022-01-05 20:55:00 +01:00
Thales Macedo Garitezi 95de2d3467
fix(monitor): fix return value on badrpc
If the rpc in `emqx_dashboard_monitor_api:get_collect/1` fails, an
empty map is return.  But the current function expects a 4-tuple,
which results in a 500 error returned on such occasions.

```
curl -su admin:public localhost:8888/api/v5/monitor/current | jq .
{
  "code": "INTERNAL_ERROR",
  "message": "error, function_clause, [{emqx_dashboard_monitor_api,format_current_metrics,[[#{},{0,0,0,0},{0,0,0,0}],{0,0,0,0}],[{file,\"emqx_dashboard_monitor_api.erl\"},{line,179}]},{emqx_dashboard_monitor_api,current_counters,2,[{file,\"emqx_dashboard_monitor_api.erl\"},{line,167}]},{minirest_handler,apply_callback,3,[{file,\"minirest_handler.erl\"},{line,112}]},{minirest_handler,init,2,[{file,\"minirest_handler.erl\"},{line,38}]},{cowboy_handler,execute,2,[{file,\"cowboy_handler.erl\"},{line,41}]},{cowboy_stream_h,execute,3,[{file,\"cowboy_stream_h.erl\"},{line,318}]},{cowboy_stream_h,request_process,3,[{file,\"cowboy_stream_h.erl\"},{line,302}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,226}]}]"
}
```
2021-12-14 17:56:32 -03:00
zhongwencool 1f6e2e7397 chore: add test for sub fields 2021-12-01 12:01:44 +08:00
zhongwencool f697028b70
Fix ping not return pong (#6285)
* fix: ./bin/emqx ping return pong

* chore: waiting longer for logger flush log to disk

* fix: change swagger page's limit from 100 to 1000

* chore: type wrong

* fix: sync log to disk by logger_disk_log_h:filesync
2021-11-26 17:02:45 +08:00
Zaiming Shi 6ca6d60858 fix(dashboard): change hash from sha3_256 to sha256
old version os has no support for it
2021-11-20 21:21:11 +01:00
JimMoen e361cd5733
Fix dashboard APIs return (#6177)
* fix(dashboard_api): delete non-exist user wrongly return 204

* fix(dashboard): dashboard user should use `tags` not `tag`

* fix(dashboard): create/update user return 200 with full users list

* fix(dashboard): logout status code 204

* fix(dashboard): update pwd status code 204

* test: test suite for dashboard APIs

* refactor(dashboard): user info mnesia record name use description

* style: make elvis happy

* fix(api): dashboard swagger check request should not override env

* fix(dashboard): add/modify dashboard returns single record

* ci: update emqx-fvt version to new tag 1.0.2-dev1
2021-11-18 14:36:12 +08:00
zhongwencool eea789451b
feat: sha3_256 dashboard account's password (#6084) 2021-11-09 15:41:28 +08:00
Ilya Averyanov 796553b5ea fix(authn api): eliminate possible atom leak 2021-11-01 16:51:48 +03:00
Ilya Averyanov 800b4b32c7
refactor(authn api): use config schemas for request validations (#5999) 2021-11-01 17:52:03 +08:00
zhongwencool e62fde321c
Emqx alarm (#5994)
* chore(alarm): normalize_message outside emqx_alarm

* chore(alarm): don't cache config in emqx_alarm; remove dirty_write/read; add desc/example to alarm; add more test

* chore(alarm_api): alarm_api with hocon schema

* fix: activted's nullable is true

* fix(swagger): translate map to object

* fix(cluster_rpc): debug failed cluster_rpc test

* fix: Update schema description

Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>

Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2021-10-28 18:03:51 +08:00
Zaiming (Stone) Shi 4dbe3ccf71
refactor(dashboard): rename 'password' field to 'pwdhash' (#5990)
* refactor(dashboard): rename 'password' field to 'pwdhash'

rename as it is not plaintext password stored in db

* refactor(emqx_dashboard): rename records

* test(emqx_dashboard_token): add test case to cover match specs
2021-10-26 20:41:33 +08:00
zhongwencool d784e63b9f
emqx_conf (#5939)
* feat(emqx_conf): move conf manager for emqx_machine to emqx_conf

* chore(emqx_conf): change emqx:get_config/2 to emqx_conf:get/2

* fix: common test failed

* fix: badmatch by typo wrong key

* fix(emqx_conf): get the wrong core nodes

* fix(emqx_conf): get core node's tnx_id not latest tnx_id

* fix: add ro_transation when copy conf file

* fix: delete debug info

* fix: change ekka_rlog to mria_rlog

* fix: remove cluster_rpc from emqx_machine.

* fix: don't call ekka:start/0 explicitly

* fix: ekka should be start in emqx_machine
2021-10-21 18:08:51 +08:00
k32 07ea6e5689 fix(mria): Fix startup sequence 2021-10-18 22:04:05 +02:00
k32 e14a62d4d6 chore(mria): ekka_mnesia:start/stop -> mria:start/stop 2021-10-18 22:04:05 +02:00
k32 b515a45a4f chore(mria): Rename module: ekka_mnesia -> mria 2021-10-18 22:04:05 +02:00
zhongwencool c73205a589
Ct helpers migrate (#5943)
* chore: common test

* chore: delete emqx_ct_helpers deps
2021-10-18 13:45:52 +08:00
Tobias Lindahl aa19c2a908 chore: Remove emqx_ct_helpers as dependency 2021-10-15 10:40:57 +02:00
zhongwencool d80f20aca3
feat(swagger): define mgmt config_api by hocon schema (#5814)
* feat(swagger): define mgmt config_api by hocon schema

* fix: enum can't defined by integer, use union.

* fix: hocon schema union to enum
2021-10-13 14:04:43 +08:00
zhongwencool cae79a0584 feat(swagger): move public page/limit/error_code to emqx_dashboard_swagger module 2021-09-24 21:51:53 +08:00
zhongwencool 7e494afd98 fix(swagger): desc must be binary 2021-09-24 15:55:49 +08:00
zhongwencool 8c441673c2 feat(delayed_api): support hocon schema 2021-09-24 15:22:05 +08:00
zhongwencool 96fad3d225 chore(swagger): support check_schema option, default is false. 2021-09-22 13:37:08 +08:00
zhongwencool 39423665e9 chore(swagger): check hocon schema with #{override_env => false} 2021-09-22 09:07:14 +08:00
zhongwencool dab5fbf285 feat(swagger): swagger support hocon schema 2021-09-21 21:41:16 +08:00
DDDHuang 324a036aa8 fix: users api path & params name 2021-08-12 10:23:28 +08:00
DDDHuang c11a8c6db6 refactor: clients api; status api; adapter minirest v1
The serious influence:

authn:
    api
authz:
    api; api test suit
dashboard:
    all closed
lwm2m:
    api;
modules:
    api(api_topic_metrics, modules_api); test suit(emqx_modules_SUITE)
prometheus:
    api
retainer:
    api; api test suit
rule_engine:
    api: api test suit
telemetry:
    api
2021-07-09 18:09:07 +08:00
DDDHuang dc98cff27b
fix: mgmt conf & schema; prepare minirest (#5178) 2021-07-07 17:04:05 +08:00
Turtle 918a26e921 feat(conf): merge all conf to emqx.conf 2021-07-02 17:01:16 +08:00
DDDHuang 2c7fd0b547
chore: mgmt hoconf support (#5153) 2021-07-02 00:02:09 +08:00
k32 2d8ebc17cd feat(dashboard): Introduce dashboard RLOG shard 2021-06-21 18:03:51 +02:00
zhanghongtong 8a368efb95 chore: move lib-ce to apps
Signed-off-by: zhanghongtong <rory-z@outlook.com>
2021-06-15 17:31:54 +08:00
Zaiming Shi 8f477e8411 refactor(proj): Move opensource apps to lib-opensource
One step closer for better code abstraction for opensorce vs enterprise
So far this relocation is to make opensource to enterprise merges
conflict free.
2021-02-11 16:45:05 +01:00
Shawn 10dbb5bc96
Fix testcases warns (#3906) 2020-12-11 18:54:48 +08:00
Zaiming Shi 73d02beace refactor(apps): Merge emqx_libs back to emqx
And move emqx app back to root level

After realising the challenges of developing plugins in standalone
rebar projects. it is perhaps more smooth to keep using emqx as
a rebar dependency
2020-12-04 19:58:58 +01:00
terry-xiaoyu 0cd1c57a54 Migrate plugins from tag 4.2.2 2020-10-31 12:10:19 +08:00