Giter Club home page Giter Club logo

dcl-ui's Introduction

DCL UI Web based app for managing CSA-DCL

DCL-UI is Vue.js - based web application for managing the CSA Distributed Compliance Ledger. This app provides a web interface to view and manage the data in the Ledger.

Prerequisites

You will need Node.js version 12.0 or greater installed on your system.

Project Setup

Get the code by cloning this repository using git

> git clone https://github.com/Comcast/dcl-ui.git

Once downloaded, open the terminal in the project directory, and continue with:

npm install

Compiles and hot-reloads for development

npm run dev

Compiles and minifies for production

npm run build

Customize configuration

See Configuration Reference.

Configuring DCL-UI

By default DCL UI connects to the CSA Testnet Observer Node when started in development mode. Since CORS is disabled on the CSA Observer Node (https://on.test-net.dcl.csa-iot.org) when the project is started in development mode it configures a http proxy server that takes the request for /api, /rpc and /websocket to the target CSA Observer Node. You can modify the configuration in vue.config.js file.

.env.development file contains the following environment variables (Since the default server starts on port 8080. Please update the ports is you are running the local server on different port.)

VUE_APP_DCL_API_NODE=http://localhost:8080/api
VUE_APP_DCL_RPC_NODE=http://localhost:8080/rpc
VUE_APP_DCL_WEBSOCKET_NODE=ws://localhost:8080/websocket
VUE_APP_DCL_CHAIN_ID=testnet-2.0
VUE_APP_DCL_CHAIN_NAME=DCL-Chain-Testnet
VUE_APP_DCL_ADDR_PREFIX=cosmos
VUE_APP_DCL_SDK_VERSION=Stargate
VUE_APP_DCL_TX_API=/rpc/tx?hash=0x
VUE_APP_DCL_REFRESH=500000

Deploying a minified SPA (Single Page Application)

Configure for deployment

Before the application can be deployed, please create a .env file and configure the the environment variables. You can take the .env.sample file as a reference.

Build the Application

npm run build 

This will generate the compiled package in /dist folder. This folder contains the index.html file, that can be served from any web server.

For a more detailed explanation on how this application works, check out the guide and docs for vue-loader.

dcl-ui's People

Contributors

ankur325 avatar dependabot[bot] avatar voongc avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dcl-ui's Issues

Display some information in Hex format

Enhancement:
Currently, the DCL uses decimal values for all numeric fields but it'd be good to visualize in Hex format, at least: VID, PID & Device_Type .
In order to avoid misinterpretation from actual value from DCL, it could be shown in parenthesis on the right, ie:
VID PID
12288 (0x3000) 4096 (0x1000)

Feature Request - Implement Dropdown for Selectable Page Size in Pagination

To enhance user experience and offer more flexibility in data viewing, we propose the addition of a dropdown menu within the pagination component. This dropdown will allow users to select their preferred number of items to display per page. The proposed selectable values are: 10, 25, 50, and 100.

node-sass 4.15 requires Node 14

dcl-ui won't run with Node 16 and it has the following error,
`Syntax Error: Error: Node Sass does not yet support your current environment: OS X Unsupported architecture (arm64) with Unsupported runtime (93)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.14.1

@ ./src/assets/styles/layout.scss 4:14-235 15:3-20:5 16:22-243
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://192.168.1.103:8080/&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js`

But it ran fine once I switched to node 14. Please update README to add the requirement of Node 14.

Certificate-ID displayed is not correct if it changes in Software Version. It still displays the information from the first vid/pid combination

Looks like the Certificate-ID is not populated correctly when the VID/PID is the same, but Software Version changed:

{
  "complianceInfo": {
    "vid": 4977,
    "pid": 257,
    "softwareVersion": 21,
    "certificationType": "matter",
    "softwareVersionString": "0.2.0+1",
    "cDVersionNumber": 21,
    "softwareVersionCertificationStatus": 2,
    "date": "2022-12-20T00:00:00.000Z",
    "reason": "Completed certification process",
    "owner": "cosmos1mwzp8lqmsw2fxq8w9y583xe8h5l6kxq52tl649",
    "history": [],
    "cDCertificateId": "CSA22239MAT40239-24",            <-------------------------
    "certificationRoute": "",
    "programType": "",
    "programTypeVersion": "",
    "compliantPlatformUsed": "",
    "compliantPlatformVersion": "",
    "transport": "",
    "familyId": "",
    "supportedClusters": "",
    "OSVersion": "",
    "parentChild": "",
    "certificationIdOfSoftwareComponent": ""
  }
}
{
  "complianceInfo": {
    "vid": 4977,
    "pid": 257,
    "softwareVersion": 22,
    "certificationType": "matter",
    "softwareVersionString": "1.2.0+1",
    "cDVersionNumber": 22,
    "softwareVersionCertificationStatus": 2,
    "date": "2023-02-06T00:00:00.000Z",
    "reason": "",
    "owner": "cosmos1mwzp8lqmsw2fxq8w9y583xe8h5l6kxq52tl649",
    "history": [],
    "cDCertificateId": "CSA23154MAT40667-24",            <-------------------------
    "certificationRoute": "",
    "programType": "",
    "programTypeVersion": "",
    "compliantPlatformUsed": "",
    "compliantPlatformVersion": "",
    "transport": "",
    "familyId": "",
    "supportedClusters": "",
    "OSVersion": "",
    "parentChild": "",
    "certificationIdOfSoftwareComponent": ""
  }
}

Here is how it looks

image

Set the value for CommissioningModelInitialStepsHitto to "1" by default

Copied from zigbee-alliance/distributed-compliance-ledger#522

According to the Matter Specification, section 5.7.1:

The Distributed Compliance Ledger entries for Standard Commissioning Flow devices SHALL include the CommissioningCustomFlow field set to '0 - Standard' and the CommissioningModeInitialStepsHint field set to a non-zero integer value, with bit 0 (Power Cycle) being set to 1.

The default value appears to be "0", and most of entries have this value set to 0, even while using "CommissioningCustomFlow" = 0.

Propose to set the default value to "1", instead of "0".

Suggested workaround: Set the value for CommissioningModelInitialStepsHitto to "1" by default, in the Web UI when adding a Model.

NFR: Add a link next to the Model-Version to Certify Model-Version

When a Model-Version is to be certified, it requires the Model-Version to be in the DCL and then input some data from that Model-Version to the "Certify Model-Version" form. It'd make it easier if there is a link next to each record to allow Certification Center to click on it and easily certify it, with the required fields already populated (VID, PID, SWVersion, SWVersionString), other fields will be entered by CertificationCenter account.

Allow search box to find by HEX value

Allow the search box to find a value by its HEX format, even if it's stored in dec format, if it is entered with '0x' prefix.
ie: entering '0x1000' or '4096' will display same dcl record. Appli to all schemas.

Align on cdVersionNumber field for Model-Version and Certify-Model record

By Spec, the cdVersionNumber must match in 3 places: Certification Declaration, Device Model Version and Compliance Record... and it should be defined by the CSA, but it was first input by the Model-Version and the parameter is missing when submitting a Compliance Record. So we agreed that it will be hardcoded to "1".

We have 2 options:

  1. Add cdVersionNumber field in the "Certify Model" form and make sure they are the same "1"
  2. Remove cdVersionNumber field from "Add New Model Version" and make sure it is "1" when submitted at "Model Version" and "Certify Model"

Recommended approach No. 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.