Commit Graph

173 Commits

Author SHA1 Message Date
JianBo He 53eb8d7f1b test: fix flaky tests introduced by https://github.com/emqx/emqx/pull/10948 2023-06-09 15:48:23 +08:00
JianBo He d5ebf5650f test: improve the test 2023-06-08 11:24:07 +08:00
JianBo He fcef456174 feat: add `live_connections` field for some HTTP APIs
i.e:
- `/monitor_current`, `/monitor_current/nodes/{node}`
- `/monitor/nodes/{node}`, `/monitor`
- `/node/{node}`, `/nodes`
2023-06-08 11:24:06 +08:00
Thales Macedo Garitezi 46393343e2 chore: use `timeout_duration` types for timer fields
Fixes https://emqx.atlassian.net/browse/EMQX-10020
2023-06-05 11:46:38 -03:00
Thales Macedo Garitezi 7d3ce14835 test: rm unused var warning 2023-06-01 14:00:43 -03:00
Andrew Mayorov f90ce9bbfe
test(dashboard): fix inter-suite test flakiness 2023-05-31 19:09:37 +03:00
Zhongwen Deng 5690469896 fix: flaky test when stopping dashboard listener 2023-05-31 07:53:10 +08:00
Zaiming (Stone) Shi 08c1d5e5ae test: stop testing i18n.conf 2023-05-29 14:22:23 +02:00
Zaiming (Stone) Shi 732a7be187 Merge remote-tracking branch 'origin/release-50' 2023-05-22 17:46:54 +02:00
Zhongwen Deng cb5a596c57 fix: make sure swagger.json is fully generated 2023-05-22 16:58:13 +08:00
某文 7c2aac64bc fix: bad cert file path in dashboard https listener 2023-05-21 07:41:46 +08:00
Zaiming (Stone) Shi 9b9731b943
Merge pull request #10473 from zmstone/0421-refactor-delete-unused-schema-field
0421 refactor delete unused schema field
2023-05-16 22:22:03 +02:00
Zaiming (Stone) Shi 7566c25199 refactor: delete unused connector field 'base_url' 2023-05-11 09:04:55 +02:00
Ilya Averyanov 8d9b785bd7 Merge branch 'release-50' into file-transfer
* release-50:
  chore(rebalance): fix app metadata
  chore(rebalance): move apps from lib-ee, add READMEs
  docs: refine zh tr
  docs: delete APL header from ee file
  docs: delete zh changelog
  chore(rebalance): review fixes
  chore(rebalance): rebase and review fixes
  feat(rebalance): port apps from 4.x
2023-05-10 11:55:23 +05:00
Ilya Averyanov 7fa166f034 Merge branch 'release-50' into file-transfer
* release-50: (73 commits)
  feat: add RabbitMQ bridge
  docs: improve rule engine labels and descriptions
  chore: bump version && update changes
  refactor(rocketmq): move rocketmq bridge into its own app
  test: dashboard_listener_test crash
  chore: bump chart versions
  chore: bump ee version to e5.0.4-alpha.1
  test: fix inter-suite flakiness
  build: compatibility to make 4.4+
  feat: add IotDB bridge
  ci: ensure git safe dir in build_packages
  ci: ensure git safe dir
  test: check_oom's max_mailbox_size
  feat: rename max_message_queue_len to max_mailbox_size
  fix(buffer_worker): fix inflight count when updating inflight item
  chore: prepare for v5.0.25-rc.1 release
  docs: add change log entry
  fix: non_neg_integer() translated to minimum = 1 in bridge-api-en.json
  chore: `MQTT X` -> `MQTTX`
  chore: make sure brod_gssapi app is included in relese package
  ...
2023-05-09 23:30:22 +05:00
Ilya Averyanov 609f7bd8fd feat(rebalance): port apps from 4.x 2023-05-09 20:51:22 +05:00
Zhongwen Deng ac6c8d840f test: dashboard_listener_test crash 2023-05-09 12:16:45 +08:00
Ilya Averyanov dd3471bc22 Merge branch 'master' into file-transfer
* master: (194 commits)
  fix(limiter): update change && fix deprecated version
  chore: update changes
  perf(limiter): simplify the memory represent of limiter configuration
  ci(perf test): update tf variable name and set job timeout
  ci: fix artifact name in scheduled packages workflow
  fix: build_packages_cron.yaml workflow
  ci: move scheduled builds to a separate workflow
  build: check mnesia compatibility when generating mria config
  docs: fix a typo in api doc description
  feat(./dev): use command style and added 'ctl' command
  test: fix delayed-pubish test case flakyness
  refactor: remove raw_with_default config load option
  chore: add changelog for trace timestrap
  feat: increase the time precision of trace logs to microseconds
  chore: make sure topic_metrics/rewrite's default is []
  docs: Update changes/ce/perf-10417.en.md
  chore: bump `snabbkaffe` to 1.0.8
  ci: run static checks in separate jobs
  chore(schema): mark deprecated quic listener fields ?IMPORTANCE_HIDDEN
  chore: remove unused mqtt cap 'subscription_identifiers'
  ...
2023-05-05 16:50:18 +03:00
Zaiming (Stone) Shi d5f5f35787 Merge remote-tracking branch 'origin/release-50' into 0502-merge-release-50-back-to-master 2023-05-02 18:08:04 +02:00
Zaiming (Stone) Shi 475dee32ee test(emqx_dashboard): refine spec error 2023-04-30 17:28:41 +02:00
Zaiming (Stone) Shi 9260b5ec6c test(emqx_dashboard): add test case for api/v5/schemas API 2023-04-26 14:41:33 +02:00
Ilya Averyanov 0211bcf030 Merge branch 'master' into file-transfer
* master: (279 commits)
  chore: shorten ct/run.sh script
  chore: rename cassandra_impl to cassandra_connector
  chore: fix mix.exs checking
  refactor(cassandra): move cassandra bridge into its own app
  chore: apply review suggestions
  chore: update changes/ce/fix-10449.en.md
  test: add a test for authn {}
  chore: add changlog for authn_http validation
  fix: always check authn_http's header and ssl_option
  chore: apply suggestions from code review
  fix(emqx_bridge): validate Webhook bad URL and return 'BAD_REQUEST' if it's invalid
  fix(emqx_alarm): add safe call API to activate/deactivate alarms and use it in resource_manager
  perf(emqx_alarm): use dirty Mnesia operations to activate an alarm
  ci: simplify find-apps.sh for ee apps
  perf(emqx_resource): don't reactivate alarms on reoccurring errors
  ci: check if Elixir files are formatted in pre-commit hook
  fix(dynamo): fix field name errors
  chore: remove *_collector for prometheus api's example
  chore: make plugins config to low level
  chore: re-split dynamo i18n file
  ...
2023-04-21 17:37:17 +03:00
Zaiming (Stone) Shi 466a28daf2 test: fix test cases to work with new exctption 2023-04-17 13:58:14 +02:00
Zaiming (Stone) Shi 6969c2a670 refactor: not leagal -> invalid 2023-04-17 13:58:14 +02:00
Zaiming (Stone) Shi 18974a8e11 refactor: make schema dump and swagger spec work with split desc files 2023-04-17 13:58:11 +02:00
Stefan Strigler 4f80690162 fix: byebye jsx 2023-04-14 13:41:34 +02:00
Stefan Strigler f8e9e54393 refactor: move emqx_json to emqx_utils_json 2023-04-14 13:31:27 +02:00
Andrew Mayorov b6b044f429 feat(ft): move out exporter concept into dedicated modules 2023-04-07 17:25:22 +03:00
Zaiming (Stone) Shi 486352eb6f fix(swagger): do not generate scheam for hidden args 2023-03-28 14:29:24 +02:00
Andrew Mayorov 40f7fd691e
test(dashboard): reuse `emqx_mgmt_api_test_util` in testsuites
To reduce the init / teardown complexity.
2023-03-27 23:41:19 +03:00
Serge Tupchii e3541d8947 test: move dashboard specific cleanup call from emqx_common_test_helpers to the relevant test suite 2023-03-23 11:59:43 +02:00
Zhongwen Deng b529a0bce1 test: add swagger.json api test 2023-03-19 13:05:32 +08:00
Ilya Averyanov 5bfd690df6 fix(dashboard): fix swagger spec generation 2023-02-23 22:09:36 +02:00
Stefan Strigler a0589d5b95 fix: return `404` for unknown node names 2023-02-21 16:23:38 +01:00
Zaiming (Stone) Shi 9316690c29 fix(schema): binary string for default values
A lot of the string value fields had default value defined in
schema as list-string rather than binary-string.
This caused the generated schema dump (in JSON format)
to have raw_default field as an integer array.
2023-02-21 09:09:51 +01:00
Stefan Strigler 0b1483040a test: add actual test for haproxy 2023-01-30 18:07:06 +01:00
Stefan Strigler fb763ecebd feat: support HAProxy protocol for dashboard API 2023-01-18 15:49:57 +01:00
Zhongwen Deng 3dfdad9cc9 test: dashboard default password 2023-01-17 11:30:42 +08:00
Zhongwen Deng 82af854c4a test: dashbashboard new password failed 2023-01-17 11:30:42 +08:00
Zhongwen Deng a523fa2fa2 feat: add dashboard password validate 2023-01-17 11:30:42 +08:00
firest c5f557e315 fix: disable basic auth for HTTP API 2023-01-12 21:35:49 +08:00
Zhongwen Deng 52ccd0762e test: QOS ct failed 2023-01-11 10:34:09 +08:00
Zaiming (Stone) Shi dbc10c2eed chore: update copyright year 2023 2023-01-02 09:22:27 +01:00
Stefan Strigler 7bdb029745 refactor: use POST not PUT for `/users/{name}/change_pwd` 2022-12-13 11:08:54 +01:00
Zaiming (Stone) Shi 09455edae8 Merge tag 'v5.0.10' into dev/ee5.0 2022-11-16 16:20:30 +01:00
Stefan Strigler ef5687d465 fix(emqx_gateway_api): don't crash on unknown status 2022-10-27 12:35:15 +02:00
Zaiming (Stone) Shi abb941d161 docs: remove port 8081
port 8081 is the management API in 4.x
in 5.0 api port is 18083 (same as for serving the dashboard)
2022-10-05 17:15:19 +02:00
Shawn 60a90858f8 feat: check dependent actions before removing the bridges 2022-09-06 15:34:23 +08:00
Zhongwen Deng 02c0755867 fix: dashboard failed test 2022-07-25 16:55:38 +08:00
zhongwencool e0ab8e58cf
Merge pull request #8360 from zhongwencool/example-name
chore: mv i18n.conf to emqx_dashboard/priv/
2022-07-01 10:23:10 +08:00
Zhongwen Deng 92019e4d4c chore: don't copy i18n.conf 2022-07-01 09:33:35 +08:00
DDDHuang f502e09f5f fix(dashboard): add more test suite 2022-06-30 14:52:48 +08:00
Ilya Averyanov 3be617cf40 feat(authn api): add method for user file upload 2022-05-31 00:40:10 +03:00
Zaiming (Stone) Shi b17a32661e test: fix flaky test, wait for new sample data 2022-05-13 11:52:41 +02:00
Zhongwen Deng 352984efe7 fix: dashboard https without deafult pem/keyfile 2022-04-29 11:45:22 +08:00
Zhongwen Deng 3e8bedda76 fix: dashboard ct add enable options 2022-04-28 14:05:39 +08:00
DDDHuang 07444e3da5 chore: dashboard format code 2022-04-26 17:18:30 +08:00
DDDHuang 6db01bdd85 fix: add dashboard test suite & bug fix 2022-04-26 13:44:55 +08:00
Zhongwen Deng 5223c3ee61 feat: obfuscate sensitive values default_password 2022-04-24 09:41:29 +08:00
Xinyu Liu 86e8498bce
Merge pull request #7658 from terry-xiaoyu/dashboard_conf_no_array
refactor: change confs for dashboard listeners from array to map
2022-04-19 16:06:27 +08:00
Shawn b04ca3cb99 fix: udpate test cases for new dashboard configs 2022-04-19 10:49:40 +08:00
Zhongwen Deng c37f01fd3e fix: responses/error_code support ?DESC/x. 2022-04-18 21:00:01 +08:00
Zhongwen Deng df3addb217 chore: Don't display primary example, we should show default if no example. 2022-04-18 11:02:39 +08:00
DDDHuang 402d3d97ae fix: dashboard swagger SUITE 2022-04-16 16:37:10 +08:00
Zhongwen Deng f98cb972e2 fix: dashboard ct failed 2022-04-15 14:37:51 +08:00
Zhongwen Deng 164754b182 test: dashboard ct failed with lack i18n_lang 2022-04-15 12:04:01 +08:00
DDDHuang 9ef1795985 fix: add bad api test 2022-04-13 16:16:13 +08:00
Ilya Averyanov f4e4331556 chore(emqx_mangement): improve emqx_mgmt_api_nodes coverage 2022-04-04 23:39:53 +03:00
Thales Macedo Garitezi f425665449
fix(test): fix flaky test 2022-04-01 09:27:53 -03:00
Ilya Averyanov 12f6b8fab0 chore(emqx_modules): improve emqx_delayed_api coverage 2022-03-31 18:44:29 +03:00
Ilya Averyanov 0728b1e3f4 chore(emqx_modules): add emqx_topic_metrics_api tests 2022-03-30 21:18:27 +03:00
Zhongwen Deng 55f805bac0 fix: dashboard_monitor crash 2022-03-25 14:18:56 +08:00
DDDHuang e517b41a4d fix(api): desc & remove useless api 2022-03-21 15:03:37 +08:00
DDDHuang 010dbbdb26 fix: bad code style 2022-03-21 14:12:19 +08:00
DDDHuang 60f107f91f fix: generate dashboard api response code 2022-03-21 14:12:19 +08:00
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