Commit Graph
112 Commits
Author SHA1 Message Date
Vickey cf2ffb0194 docs: update thing-model design with Phase 1 implementation plan 2026-05-23 08:20:48 +08:00
Vickey c6b70c1665 docs: update point-command.md status to reflect P0-P3 implementation
Correct stale [TODO] markers in §0, §1.3, §3, §4.1, §4.5, §4.7
to [DONE] matching the actual code delivered.
2026-05-22 23:49:10 +08:00
Vickey c556c6a0b8 feat: complete point command P0-P2 rebuild — DTO, lock, validation, API
P0: Replace content JSON-string with sealed PointCommandPayload + record DTOs.
P0: Accept write() boolean return, suppress echo on failure.
P1: Return commandId from POST endpoints, add RESTful GET /{commandId}.
P1: Add driver-online check via EntityStateMapper, PointCommandValidator.
P2: Add DeviceLockManager for per-device serialized command execution.
P3: Add POST /list API with pagination, commandId idempotency support.
2026-05-22 23:36:38 +08:00
Vickey 47760888bd feat: unify DeviceStatusEnum and DriverStatusEnum into EntityStatusEnum
- Replace two duplicate enums with single EntityStatusEnum (same index/code)
- Rename DB columns: state_flag→entity_state_flag, state_ext→entity_state_ext
- Add stateDescription field to DeviceStateDTO/DriverStateDTO for diagnostics
- Add description field to DeviceHealthState/DriverHealthState
- UPSERT SQL now writes stateDescription into entity_state_ext on heartbeat
- Remove EntityStateStatus interface (no longer needed with single enum)
- Update MQ layer, heartbeat services, status queries, gRPC, and all tests
2026-05-22 22:35:02 +08:00
pnoker 436b3b01bb feat: refine device and driver health state handling 2026-05-22 18:29:24 +08:00
pnoker 0471bd904e feat: add device health timeout state handling 2026-05-22 16:44:58 +08:00
pnoker 2e75061c70 style: clean up RabbitConstant, fix imports and update docs formatting 2026-05-22 09:16:27 +08:00
pnoker 9007cbc22c style: apply consistent code formatting across all modules and docs 2026-05-22 00:24:22 +08:00
Vickey 04d0d5342f feat(data): add persistent state lease table for driver/device status
Replace local Caffeine cache as the source of truth for driver and
device online status with dc3_entity_state, a persistent state lease
table backed by PostgreSQL.

- Add EntityStateDO/Mapper/Manager persistence stack.
- Add EntityStateExpiryScanner that scans expire_time every 15 seconds
  with lease_version recheck to avoid stale alarm writes.
- Dual-write heartbeat path: DriverStateServiceImpl and
  DeviceStateServiceImpl now write dc3_entity_state first, then local
  cache.
- All status queries (controllers, gRPC server, local facade,
  SystemHealthServiceImpl) read from dc3_entity_state. Rows missing or
  past expire_time return offline.
- OfflineExpiryListener gains a DB dedup check to skip expiry events
  already handled by the scanner.
- Add @EnableScheduling to DataApplication.
- Add design doc docs/design/entity-state.md with full DDL.

This resolves restart state loss, multi-instance inconsistency, and
races between expiry checks and fresh heartbeats.
2026-05-21 23:57:45 +08:00
Vickey a0b392c3aa feat: rule alarm optimization 2026-05-21 21:39:13 +08:00
pnoker cc75f8ad00 docs(todo): update javadoc-cleanup plan with completion status 2026-05-21 01:06:57 +08:00
pnoker c69b453af6 refactor: rename notify record to history 2026-05-20 21:20:52 +08:00
pnoker 4367f03603 refactor: remove Redis dependency, update docs and workspace config 2026-05-20 20:46:00 +08:00
Vickey 14faabedc7 style: apply consistent formatting across GitHub workflows, docs and common modules 2026-05-19 00:15:07 +08:00
Vickey 48f5d2f0e9 docs(site): import legacy operation manual from dc3-docs
The dc3-docs VuePress 1.x source repository has the original
Markdown for the operation manual. Migrate four pages whose
content survives unchanged in the current product flow:
driver / template / device / data, plus a hand-written
operation/index.md as the section landing page. Add the
corresponding Web UI screenshots under docs/public/images/legacy/
(the full assets/images tree from the old site, ~169 files).

- Replace the Ant Design Vue <a-alert> component in data.md with
  a VitePress ::: tip container.
- Rewrite /assets/images/ to /images/legacy/ so paths resolve
  under VitePress's public/ static-asset convention with the
  /iot-dc3/ base.
- Add a "操作手册" entry to the top nav and a per-section sidebar
  in .vitepress/config.mts.

Skipped from dc3-docs:
- operation/0-index.md - "待开发中" placeholder.
- function/{api,driver}.md - "🚧施工中🚧" placeholders.
- function/0-directory.md - obsolete (refers to dc3-common as a
  separate repo and lists mongo/redis/mysql common modules that
  no longer exist).
- function/storage.md - lists mongodb/influxdb/opentsdb as
  supported storage; the project ships PostgreSQL only.

Verification: pnpm docs:build passes (5.26s). The five operation
pages render; image src attributes resolve to
/iot-dc3/images/legacy/operation/<page>/<uuid>.png and the files
exist in dist/.
2026-05-18 20:50:56 +08:00
Vickey 9e9c1dc2e8 docs(site): switch documentation framework from MkDocs Material to VitePress
The MkDocs Material site felt visually dated. Switch to VitePress to
get a fresher default theme (the same one Vue, Vite, Pinia and
Element Plus use) and align the docs toolchain with the project's
Node ecosystem.

- Replace mkdocs.yml/requirements-docs.txt with package.json
  (pnpm scripts), pinned vitepress 1.5+, and pnpm-lock.yaml.
- Add docs/.vitepress/config.mts: zh-CN, /iot-dc3/ base, cleanUrls,
  per-section sidebars, local search with Chinese UI strings, edit
  link, light/dark theme labels in Chinese.
- Rewrite docs/index.md as layout: home with hero, six feature
  cards, and platform/architecture/license blocks underneath.
- docs/assets/ -> docs/public/ rename (VitePress static-asset
  convention). This rename was already absorbed by an unrelated
  upstream commit; only the architecture page reference is updated
  to /images/architecture-cn.png.
- Convert MkDocs snippets to VitePress <!--@include:-->:
  - community/{contributing,code-of-conduct,security} pull repo-root
    governance files,
  - development/changelog and guide/usage pull the docker-ci-
    referenced dc3/doc/{CHANGE,USAGE}.md.
- Wrap R<T> in inline code in architecture/modules.md so the Vue
  parser does not treat it as an unclosed HTML tag.
- Rewrite .github/workflows/docs.yml: pnpm/action-setup@v4 +
  setup-node@v4 (pnpm cache) + pnpm install --frozen-lockfile +
  pnpm docs:build + upload-pages-artifact (docs/.vitepress/dist)
  + deploy-pages. Trigger paths include docs/, package.json,
  pnpm-lock.yaml, governance files, and the two dc3/doc/ files
  referenced via include.
- Update .gitignore: drop /site/ and the Python-only venv entries,
  add docs/.vitepress/{cache,dist}/ and a Node/pnpm section.
- Adjust dc3/doc/README.md wording to mention VitePress include
  syntax instead of MkDocs snippets.

Verification: pnpm install + pnpm docs:build pass locally (5.44s);
the include-based pages (community/contributing, development/
changelog, guide/usage) render content from their source files; all
per-section sidebars resolve.
2026-05-18 19:53:58 +08:00
Vickey 476799e513 refactor(api): rename gRPC SelectBy* RPCs to GetBy*/ListBy*
Apply the new naming convention to .proto contracts so the verb on
each RPC reflects the cardinality of its result:

  - get*  for single-record returns (RPCs returning a single DTO)
  - list* for multi-record returns (RPCs returning a Page or List DTO)

23 RPCs renamed across 9 .proto files. Returns-single -> Get*:
  user.proto                 SelectById        -> GetById
  user_login.proto           SelectByName      -> GetByName
  tenant.proto               SelectByCode      -> GetByCode
  driver_device.proto        SelectById        -> GetById
  driver_point.proto         SelectById        -> GetById
  manager_point.proto        SelectById        -> GetById
  manager_device.proto       SelectByDeviceId  -> GetByDeviceId
  manager_driver.proto       SelectByDriverId  -> GetByDriverId
  manager_driver.proto       SelectByDeviceId  -> GetByDeviceId
  manager_profile.proto      SelectByProfileId -> GetByProfileId

Returns-multi -> List*:
  driver_device.proto        SelectByPage         -> ListByPage
  driver_point.proto         SelectByPage         -> ListByPage
  manager_device.proto       SelectByPage         -> ListByPage
  manager_device.proto       SelectByDriverId     -> ListByDriverId
  manager_device.proto       SelectByProfileId    -> ListByProfileId
  manager_device.proto       SelectByDeviceIds    -> ListByDeviceIds
  manager_driver.proto       SelectByPage         -> ListByPage
  manager_driver.proto       SelectByDriverIds    -> ListByDriverIds
  manager_point.proto        SelectByPage         -> ListByPage
  manager_point.proto        SelectByIds          -> ListByIds
  manager_profile.proto      SelectByPage         -> ListByPage
  manager_profile.proto      SelectByProfileIds   -> ListByProfileIds
  manager_profile.proto      SelectByDeviceId     -> ListByDeviceId

This is a wire-level breaking change: gRPC clients and servers must
upgrade in lockstep. Server impls, facade clients, and Java callers
are aligned in subsequent commits.
2026-05-18 19:19:40 +08:00
pnoker bca6d7aedc docs(site): scaffold MkDocs Material documentation site with GitHub Pages CI
Set up an end-to-end documentation site so contributors and users have
a unified, searchable, and publishable entry point for project docs.

- Add mkdocs.yml: Chinese-first language, light/dark palette, tabbed
  navigation, indexed sections, glightbox for diagrams, and
  pymdownx.snippets so community pages can pull from root governance
  files (CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md) without
  duplicating content.
- Add requirements-docs.txt pinning mkdocs-material and
  mkdocs-glightbox.
- Build the docs/ skeleton: index, quickstart, guide, architecture,
  development, modules, community. Migrate the seven generic manuals
  from dc3/doc/ (QUICKSTART, ENVIRONMENT, LOGGING, TROUBLESHOOTING,
  MODULES, DRIVER-AUTHORING, TESTING) and rewire their cross-doc
  links. CHANGE.md, TITLE.md, and USAGE.md stay in dc3/doc/ because
  docker-ci.yml depends on them; the docs site references them via
  mkdocs snippets to keep a single source of truth.
- Add .github/workflows/docs.yml that builds with --strict on push to
  release and deploys via actions/deploy-pages.
- Rewrite dc3/doc/README.md as a migration pointer to the new site
  and to the three retained release-flow files.

Verification: mkdocs build --strict passes locally; snippets render
correctly; GitHub Pages already enabled in workflow mode via gh api.
2026-05-18 18:36:00 +08:00
pnoker 2770eeebca docs: consolidate project documentation under dc3 2026-05-09 18:49:52 +08:00
pnoker 8c10fd6f24 docs: add driver-authoring guide
Captures the steps for adding a new dc3-driver-* module — module
layout, the dc3-common-driver base classes to extend, gRPC registration
with Manager, RabbitMQ routing-key conventions tied to the driver
service name, and the application.yml conventions the rest of the
platform expects.
2026-05-09 13:00:35 +08:00
pnoker e47299a327 chore: remove format and format-check targets from Makefile 2026-05-07 23:55:32 +08:00
pnoker 36d7a82de5 docs: add module overview, quickstart, and troubleshooting guides
- docs/MODULES.md: full module dependency map and runtime flow
- docs/QUICKSTART.md: one-stop local development setup
- docs/TROUBLESHOOTING.md: common build/runtime issues and fixes
- Add docs links to README.md, README.zh.md, README.ja.md, README.vi.md
2026-05-07 13:11:04 +08:00
pnoker 81a35a0213 refactor(manager): migrate driver service and auth service impls to DO layer 2023-04-14 02:45:14 +08:00
pnoker 5cc5e210bd feat: Optimize delete service function 2023-04-14 02:11:41 +08:00
pnoker 6985af7aaa chore(docs): update CNAME domain 2023-04-14 01:34:00 +08:00
pnoker fa65aeba18 feat: add CNAME:doc.dc3.site 2023-04-14 01:32:40 +08:00
pnoker 09c268760e feat: add CNAME:doc.dc3.site 2023-04-14 01:15:03 +08:00
pnoker 1f2860927a feat: add CNAME:doc.dc3.site 2023-04-14 01:00:21 +08:00
pnoker a69bf2e007 feat: add CNAME:doc.dc3.site 2023-04-14 01:00:08 +08:00
pnoker 39cef91aa6 feat: add CNAME:doc.dc3.site 2023-04-14 00:42:27 +08:00
pnoker 0b4972b709 feat: new docs 2023-04-14 00:38:49 +08:00
pnoker c2a15d73e9 chore: reorganize api files into idea/ subdirectory and remove obsolete bin scripts 2023-03-09 02:03:31 +08:00
pnoker 9c063dd263 docs: add architecture diagrams and logo image to docs/images 2023-03-06 17:19:06 +08:00
pnoker 587606842a docs: remove legacy docsify documentation files and images 2023-03-06 17:14:31 +08:00
pnoker 30a9a94278 build: bump version across all modules and remove unused compose and gateway configs 2023-03-03 22:51:11 +08:00
pnoker d3e982cf2c refactor(api): migrate dto and feign client annotations across all modules 2023-03-02 02:16:53 +08:00
pnoker bd9bf26a21 build: add jvm and maven config files and split application profiles into pre and pro 2023-02-16 04:36:01 +08:00
pnoker c478f7a0e7 feat: V2022.1.8 2022-12-27 20:30:13 +08:00
pnoker d113db8cb1 refactor: migrate base package from com.dc3 to io.github.pnoker 2022-11-18 21:14:54 +08:00
pnoker 206e7e7121 feat: control dev node ip via environment variables and add prod/test compose files 2022-10-23 12:32:56 +08:00
pnoker 0f567c3e59 feat: update code 2022-08-15 01:43:03 +08:00
pnoker 5be75c8dfd feat: update code 2022-08-06 00:00:03 +08:00
pnoker fb299e4ee2 refactor: restructure feign clients, add driver command client, and reorganize sdk 2022-05-23 00:09:07 +08:00
pnoker 80154c6a61 docs: add modbus4j error guide and update sidebar, quick-start, and Maven settings 2022-01-22 18:37:16 +08:00
pnoker 8ee111e7d0 chore(build): remove stale boot starter jar and bump parent version 2022-01-21 22:15:10 +08:00
pnoker b577cbd6db docs: update version badges and trim outdated quick-start section in README 2022-01-21 01:41:13 +08:00
pnoker 1e24156810 refactor(auth): rename module directory from dc3-auth to dc3-center-auth 2022-01-20 22:18:57 +08:00
pnoker 6d882be2e9 feat: 2022.1.0 2022-01-20 21:20:16 +08:00
pnoker 18b09c41d4 fix: enable thread io & disable append only file 2022-01-19 18:03:46 +08:00
pnoker 0cac6f2a27 fix(redis): update cluster node redis.conf files and docs 2022-01-19 17:25:04 +08:00