Commit Graph

341 Commits

Author SHA1 Message Date
Zaiming Shi dd771c5568 fix(emqx_mgmt_cli): idempontent kick. now it always returns ok 2021-11-15 22:26:46 +01:00
JimMoen dcc5ae0642 test: API return code section 2021-11-15 16:30:44 +08:00
JimMoen b3f9220d02 style: make elvis happy 2021-11-15 16:30:44 +08:00
JimMoen 106aa559e0 fix(api): DELETE success wrongly returned code 200 2021-11-15 16:30:44 +08:00
JimMoen 9b17757ae8 style: make elvis happy 2021-11-12 09:29:26 +08:00
JimMoen 37cdd429b2 fix(api): remove sessionID from client information 2021-11-12 09:29:26 +08:00
zhongwencool 7a5da76197
Mgmt http api banned (#5998)
* fix(swagger): don't transform [log,publish] to a list.pwd

* chore: replace banned-api by hocon schema

* fix(api): code style warning
2021-11-11 16:35:29 +08:00
JimMoen ac23214447
fix(api): config api on sepcific node (#6100)
* fix(api): config api on sepcific node

* chore(style):  code style for elvis checking
2021-11-10 09:38:45 +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
JimMoen 4a07d5e1f3 refactor(paginate): use exported fun call `{M,F}` 2021-10-26 16:16:37 +08:00
JianBo He b36865e970 fix(api): escape the searching string 2021-10-26 10:34:03 +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 8e58699ff5
Merge pull request #5937 from k32/mria
feat(mria): Replace ekka_mnesia with mria
2021-10-20 13:15:23 +02:00
JimMoen a8bb2a60b0 fix(gateway_api): client ip and port as two fields when clients query 2021-10-19 15:36:02 +08:00
JimMoen 6fb1d22e0c fix(mgmt_api): client ip and port as two fields when clients query 2021-10-19 15:36:02 +08:00
k32 d14b8e7da9 chore(mria): ekka_rlog -> mria_rlog 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 ff48322e0c chore(mria): ekka_mnesia:running_nodes -> mria:running_nodes 2021-10-18 22:04:05 +02:00
Tobias Lindahl aa19c2a908 chore: Remove emqx_ct_helpers as dependency 2021-10-15 10:40:57 +02:00
JimMoen 40ab0064ae fix(api): invalid params HTTP Code 400 2021-10-14 18:57:33 +08:00
JimMoen cc36c7e48d fix(mgmt_api): add page limit check. 2021-10-14 18:57:33 +08:00
William Yang dcca1d7544
Merge pull request #5867 from qzhuyan/dev/william/olp
feat(olp): first PR for overload protection
2021-10-14 10:00:01 +02:00
William Yang 23fc8afc50 feat(olp): rename olp mgmt API
on -> enable
off -> disable
2021-10-13 10:18: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
lafirest 3524942766 fix: change all ~s in io format to ~ts
we should use unicode to replace latin1
2021-10-12 15:09:24 +08:00
JimMoen 19456d84a5 style: code format fix 2021-10-12 10:37:45 +08:00
JimMoen 321d941eaf fix(mgmt_api): rows too big fixing. 2021-10-11 21:11:34 +08:00
JimMoen 3960204ce3 refactor(mgmt_api): `select_table_with_count`. 2021-10-11 21:11:34 +08:00
JimMoen ea7aa5bc41 refactor(mgmt_api): use `select_table` congruously. 2021-10-11 21:11:34 +08:00
JimMoen b65c9908a1 refactor(mgmt_api): Clearer variable name. 2021-10-11 21:11:34 +08:00
JimMoen 77516d3854 refactor(mgmt_api): `node_query`. 2021-10-11 21:11:34 +08:00
JimMoen e26804b9ac refactor(mgmt_api): `cluster_query`. 2021-10-11 21:11:34 +08:00
JimMoen 705ed0ce7b refactor(mgmt_api): Fuzzy filter using `select_table`. 2021-10-11 21:11:34 +08:00
JimMoen 5daef544a0 refactor(mgmt_api): `select_table`. 2021-10-11 21:11:34 +08:00
JimMoen b4433f77c8 refactor(mgmt_api): Add `page_start`. 2021-10-11 21:11:34 +08:00
JimMoen 9657d7e628 refactor(mgmt_api): Use Continuation with ets selecting. 2021-10-11 21:11:34 +08:00
William Yang 67267acb70 feat(olp): management API 2021-10-04 14:36:30 +02:00
zhanghongtong 9b3917e0d3 chore(authz mnesia api): get method supports paging
Signed-off-by: zhanghongtong <rory-z@outlook.com>
2021-09-26 16:19:47 +08:00
JimMoen e737f18548 fix(mgmt_api): Friendly HTTP Status Code for Listeners. 2021-09-24 14:28:52 +08:00
JimMoen 54b3dd8718 fix(mgmt_api): update listener on specific node. 2021-09-24 14:28:52 +08:00
JimMoen 2e088c0ae8 fix(mgmt_api): return 404 when node not found. 2021-09-24 14:28:52 +08:00
JimMoen deac54c847 chore(for editor): Add comments for Emacs major mode. 2021-09-16 15:43:30 +08:00
Jim Moen 294c1a5f69 fix(emqx_mgmt): clients api query params supports epoch(milliseconds). 2021-09-16 13:54:11 +08:00
Jim Moen 8cbec2ec6e chore(emqx_mgmt): test suite for clients api times using rfc3339. 2021-09-16 13:54:11 +08:00
Jim Moen 834a688062 fix(emqx_mgmt): clients api times using rfc3339. 2021-09-16 13:54:11 +08:00
lafirest 9ad9f619c1
Merge pull request #5676 from lafirest/feat/coap_api
feat(emqx_coap): add emqx_coap_api
2021-09-08 22:23:22 +08:00
DDDHuang e2d9d9bfcb
fix: banned api rfc time & login hidden error type (#5681) 2021-09-08 17:53:52 +08:00
lafirest 89f48f89eb feat(emqx_coap): add emqx_coap_api
1. add a request api for emqx_coap
2. fix some emqx_coap logic error
2021-09-07 19:20:52 +08:00
DDDHuang 8b2488e099
fix: routes api add params (#5675)
* fix: routes api add topic query params

* fix: routes api add node query params
2021-09-07 18:31:40 +08:00
DDDHuang b1023d9733
fix: clients ip address params trans (#5657)
* fix: clients ip address params trans
2021-09-06 13:32:29 +08:00
Zaiming (Stone) Shi 7a4fdd7620
Merge pull request #5647 from zmstone/feat-generate-config-doc-from-schema
refactor(schema): prepare for hocon schema doc generation
2021-09-03 17:54:01 +02:00
Zaiming Shi ec13463f4a refactor(schema): prepare for hocon schema doc generation 2021-09-03 11:02:31 +02:00
DDDHuang 07821b9574
fix: cli error & routes api doc (#5639) 2021-09-03 16:07:34 +08:00
DDDHuang be0fd6fddd
fix: add sub api doc & test suite (#5634)
* fix: add sub api doc & test suite
2021-09-03 10:57:54 +08:00
JianBo He fd12a7ac9c chore(gw): improve the gateway api swagger codes 2021-09-03 09:50:07 +08:00
JianBo He 0a7a14f4cd chore(mgmt): callback query function with table name param 2021-09-03 09:50:07 +08:00
DDDHuang 3bc92e5845
fix: mgmt listener cli (#5632)
* fix: mgmt cli linteners
2021-09-02 17:16:13 +08:00
DDDHuang 516f2fd06e
fix: listener api doc (#5627) 2021-09-02 15:30:53 +08:00
DDDHuang 8d2b72c278
fix: alarms api return time (#5612) 2021-08-31 19:12:27 +08:00
DDDHuang 00d469976f
fix: subscriptions api share param name (#5610) 2021-08-31 19:04:52 +08:00
Shawn 0af39e88a4 feat(listeners): add DELETE APIs for removing the listeners 2021-08-31 19:01:11 +08:00
Shawn 4da413c453 fix(APIs): clarify the error message when update listener failed 2021-08-31 19:01:11 +08:00
Shawn 7390d2bb36 fix(listeners): test case emqx_mgmt_listeners_api_SUITE failed 2021-08-31 19:01:11 +08:00
Shawn 8c36b7879f feat(listeners): APIs for updating the listener 2021-08-31 19:01:11 +08:00
Shawn ca327b7c55 refactor(listener): GET /listeners API returns full config of listeners 2021-08-31 19:01:11 +08:00
DDDHuang 5b75fdd120
fix: some API code format & api doc code format (#5601) 2021-08-30 16:41:00 +08:00
Zaiming Shi 5165fd6b30 refactor(schema): implement new hocon_schema callbacks 2021-08-30 09:56:03 +08:00
Shawn a4717d2209 fix(config): move config_reset under tags 'configs' 2021-08-27 19:32:44 +08:00
Shawn e6ee8ec140 refactor(listener): rewrite the code for managing listeners 2021-08-27 19:32:44 +08:00
DDDHuang 9893c0263a
refactor: banned api (#5578) 2021-08-27 18:21:49 +08:00
DDDHuang 86231f795d
refactor: close managment http 8081 (#5564) 2021-08-27 13:46:39 +08:00
Shawn 436dba83b8 feat(logger): update configs for logger at runtime 2021-08-26 18:31:44 +08:00
Shawn 7b63f7f18b refactor(emqx_mangement): update emqx_mangement for new listener,zone configs 2021-08-26 09:11:30 +08:00
Shawn cc56c74964 refactor(emqx): update the tests for the new zone,listener config 2021-08-26 09:11:30 +08:00
Shawn c5f0091b5d refactor(config): rework - config struct for zones and listeners
```
listeners.tcp.default {
  bind = "0.0.0.0:1883"
  acceptors = 16
  max_connections = 1024000
  access_rules = [
    "allow all"
  ]
  proxy_protocol = false
  proxy_protocol_timeout = 3s
  mountpoint = ""
  tcp.backlog = 1024
  tcp.buffer = 4KB
}
listeners.ssl.default {
  bind = "0.0.0.0:8883"
  acceptors = 16
  max_connections = 512000
  access_rules = [
    "allow all"
  ]
  proxy_protocol = false
  proxy_protocol_timeout = 3s
  mountpoint = ""
  ssl.versions = ["tlsv1.3", "tlsv1.2", "tlsv1.1", "tlsv1"]
  ssl.keyfile = "etc/certs/key.pem"
  ssl.certfile = "etc/certs/cert.pem"
  ssl.cacertfile = "etc/certs/cacert.pem"
  tcp.backlog = 1024
  tcp.buffer = 4KB
}
listeners.quic.default {
  bind = "0.0.0.0:14567"
  acceptors = 16
  max_connections = 1024000
  keyfile = "etc/certs/key.pem"
  certfile = "etc/certs/cert.pem"
  mountpoint = ""
}
listeners.ws.default {
  bind = "0.0.0.0:8083"
  acceptors = 16
  max_connections = 1024000
  access_rules = [
    "allow all"
  ]
  proxy_protocol = false
  proxy_protocol_timeout = 3s
  mountpoint = ""
  tcp.backlog = 1024
  tcp.buffer = 4KB
  websocket.idle_timeout = 86400s
}
listeners.wss.default {
  bind = "0.0.0.0:8084"
  acceptors = 16
  max_connections = 512000
  access_rules = [
    "allow all"
  ]
  proxy_protocol = false
  proxy_protocol_timeout = 3s
  mountpoint = ""
  ssl.keyfile = "etc/certs/key.pem"
  ssl.certfile = "etc/certs/cert.pem"
  ssl.cacertfile = "etc/certs/cacert.pem"
  tcp.backlog = 1024
  tcp.buffer = 4KB
  websocket.idle_timeout = 86400s
}
```

```
zones.default {

}
```
2021-08-26 09:11:30 +08:00
DDDHuang 78cf115a90 fix: swagger doc 2021-08-25 11:58:28 +08:00
DDDHuang f184cd3d0e fix: node parameters 2021-08-25 11:57:51 +08:00
Turtle 87881621bb fix: fix typo 2021-08-25 10:13:21 +08:00
Turtle 675d23111c chore(swagger-schema): Delete the schema that is not reused 2021-08-24 23:01:51 +08:00
Turtle bc325e55fc fix(authn-authz-api): fix authn/authz test cases fail 2021-08-24 18:19:21 +08:00
Turtle e0c05242a7 refactor(minirest-callback): refactor minirest callback function 2021-08-24 18:19:21 +08:00
Turtle ffc9846744 Merge branch 'refactor-mgmt-schema-util' of https://github.com/turtleDeng/emqx into refactor-mgmt-schema-util 2021-08-24 11:10:34 +08:00
DDDHuang f1ba482ed6 fix: alarms api page & limit parameters 2021-08-24 11:04:39 +08:00
Turtle 47378e0e96 refactor(schema-utils): refactor mgmt swagger schema utils 2021-08-24 10:53:06 +08:00
DDDHuang 32a84b3aba fix: clients api node params 2021-08-24 10:51:01 +08:00
DDDHuang e88823fd36
Merge pull request #5540 from DDDHuang/fix_clients_api
fix: clients subscribe api
2021-08-24 09:57:17 +08:00
Turtle 5c93c35559 refactor(schema-utils): refactor mgmt swagger schema utils 2021-08-24 00:32:51 +08:00
k32 397a04ec7c
Merge pull request #5509 from k32/rlog-fixes
Minor fixes to improve compatibility with RLOG feature
2021-08-23 16:10:33 +02:00
DDDHuang 25bae9e397 fix: clients subscribe api 2021-08-23 10:31:24 +08:00
Turtle d4d4ba9ea4 refactor(prometheus): refactor prometheus swagger schema 2021-08-23 09:41:46 +08:00
k32 9c74fa42a5 chore(rlog): Use the new method of creating shards 2021-08-21 17:47:53 +02:00
Shawn f3efc89192
refactor(config): replace all ':' with '=' in the *.conf (#5531) 2021-08-19 19:57:42 +08:00
DDDHuang 65563e9f8c
Merge pull request #5511 from DDDHuang/delayed_api
feat: add delayed api
2021-08-19 17:59:29 +08:00
DDDHuang c07fadc336
Merge pull request #5526 from DDDHuang/fix_node_stats_api
fix: node stats api
2021-08-19 17:59:05 +08:00
DDDHuang 11ea506af6
Merge branch 'master' into delayed_api 2021-08-19 17:24:16 +08:00
DDDHuang 2088fe17cf fix: node stats api 2021-08-19 16:45:38 +08:00
Shawn ef59309ed0 fix(config): check config failed when updating 2021-08-19 15:53:45 +08:00
DDDHuang 5520326ce3 feat: add delayed api 2021-08-19 10:48:12 +08:00
lafirest adc6226eae refactor(emqx_retainer): emqx_retainer_api use openapi model 2021-08-19 10:12:08 +08:00
Shawn 213b7c2501 fix(config_api): improve the schema for config update APIs 2021-08-19 09:38:33 +08:00