The Sample WebUI provides an example of how the UI Toolkit can be implemented to leverage the Device Management Toolkit
Disclaimer: Production viable releases are tagged and listed under 'Releases'. All other check-ins should be considered 'in-development' and should not be used in production
The Sample Web UI provides a reference UI solution to help demonstrate the core APIs and features of the Device Management Toolkit. Use it to help troubleshoot or try out new release features. This project was generated with Angular CLI version 11.0.5.
For detailed documentation about Getting Started or other features of the Device Management Toolkit, see the docs.
Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
The two builds carry the session differently. The cloud build (npm start) authenticates against MPS and RPS with an Authorization: Bearer header, because Kong verifies the JWT itself and reads it only from that header. It sends no credentials, so nothing below applies to it.
The Console/enterprise build authenticates with an HttpOnly session cookie, so every API request is sent with withCredentials: true. A browser discards a credentialed response whose Access-Control-Allow-Origin is the * wildcard, which means the backend has to name the UI origin explicitly and allow credentials. There is no dev proxy, so this applies to every local setup: the UI is served from http://localhost:4200 while the backend listens on a different port.
For the Console/enterprise build (npm run enterprise, backend on :8181), set on the Console side:
HTTP_ALLOWED_ORIGINS=http://localhost:4200
HTTP_ALLOW_CREDENTIALS=true
Console defaults to AllowedOrigins: ["*"] with AllowCredentials: false, so both values are required — otherwise every API call fails CORS and the login request never stores its cookie.
Deployments that serve the UI from the same origin as the API need no CORS changes.
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.
Run ng test to execute the unit tests via Vitest. Tests run in Node against a simulated DOM (happy-dom) — no browser download is required.
If you want debug in vscode devcontainer, try to open the project with devcontainer (Make sure you install the extension of Dev Containers)
npm start;To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.
For detailed documentation and Getting Started, visit the docs site.
Looking to contribute? Find more information here about contribution guidelines and practices.
Find a bug? Or have ideas for new features? Open a new Issue.
Need additional support or want to get the latest news and events about Device Management Toolkit? Connect with the team directly through Discord.
Show "Unknown" product type for discovered devices that report no firmware SKU
https://github.com/device-management-toolkit/sample-web-ui/issues/3711
Labels: 없음
We have precise rules over how our git commit messages should be formatted. This leads to more readable messages that are easy to follow when looking through the project history.
Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
The header with type is mandatory. The scope of the header is optional as far as the automated PR checks are concerned, but be advised that PR reviewers may request you provide an applicable scope.
Any line of the commit message should no be longer 72 characters! This allows the message to be easier to read on GitHub as well as in various git tools.
The footer should contain a reference to an Azure Boards ticket (e.g. AB#[number]).
Example 1:
feat(telemetry): Add new MQTT events
Events are now emitted over various /mps topics on MQTT for success/failures
as they occur throughout the service.
Resolves: AB#2222
If the commit reverts a previous commit, it should begin with revert: , followed by the header of the reverted commit. In the body it should say: This reverts commit <hash>., where the hash is the SHA of the commit being reverted.
Must be one of the following:
Should be one of the following: Modules:
Just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes". Here is detailed guideline on how to write the body of the commit message (Reference):
More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of the commit and the rest of the text as the body. The
blank line separating the summary from the body is critical (unless
you omit the body entirely); various tools like `log`, `shortlog`
and `rebase` can get confused if you run the two together.
Explain the problem that this commit is solving. Focus on why you
are making this change as opposed to how (the code explains that).
Are there side effects or other unintuitive consequences of this
change? Here's the place to explain them.
Further paragraphs come after blank lines.
- Bullet points are okay, too
- Typically a hyphen or asterisk is used for the bullet, preceded
by a single space, with blank lines in between, but conventions
vary here
The footer should contain a reference to JIRA ticket (e.g. SL6-0000) that this commit Closes or Resolves. The footer should contain any information about Breaking Changes.
Breaking Changes should start with the word BREAKING CHANGE: with a space or two newlines.
Rebase and merge or Squash and merge) based on which option will fit the best to the git linear history.