Compare commits
	
		
			1 Commits
		
	
	
		
			v2.9.0-RC2
			...
			release/v2
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					85c7a34af5 | 
@@ -1,10 +1,4 @@
 | 
			
		||||
/src/assets
 | 
			
		||||
/build
 | 
			
		||||
/node_modules
 | 
			
		||||
/dist
 | 
			
		||||
/icons
 | 
			
		||||
helm
 | 
			
		||||
docker-entrypoint.d
 | 
			
		||||
.dockerignore
 | 
			
		||||
DockerFile
 | 
			
		||||
.github
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										86
									
								
								.eslintrc
									
									
									
									
									
								
							
							
						
						@@ -1,80 +1,22 @@
 | 
			
		||||
{
 | 
			
		||||
  "extends": ["airbnb", "prettier"],
 | 
			
		||||
  "plugins": ["prettier"],
 | 
			
		||||
  "env": {
 | 
			
		||||
      "browser": true,
 | 
			
		||||
    "es2021": true
 | 
			
		||||
      "jest": true
 | 
			
		||||
  },
 | 
			
		||||
  "parser": "@typescript-eslint/parser",
 | 
			
		||||
  "parserOptions": {
 | 
			
		||||
    "ecmaFeatures": {
 | 
			
		||||
      "jsx": true
 | 
			
		||||
    },
 | 
			
		||||
    "ecmaVersion": 12,
 | 
			
		||||
    "sourceType": "module",
 | 
			
		||||
    "allowImportExportEverywhere": false,
 | 
			
		||||
    "codeFrame": false,
 | 
			
		||||
    "project": "./tsconfig.json"
 | 
			
		||||
  },
 | 
			
		||||
  "ignorePatterns": ["build/", "dist/"],
 | 
			
		||||
  "extends": [
 | 
			
		||||
    "plugin:react/recommended",
 | 
			
		||||
    "plugin:@typescript-eslint/eslint-recommended",
 | 
			
		||||
    "plugin:@typescript-eslint/recommended",
 | 
			
		||||
    "airbnb",
 | 
			
		||||
    "airbnb-typescript",
 | 
			
		||||
    "prettier",
 | 
			
		||||
    "plugin:import/errors",
 | 
			
		||||
    "plugin:import/warnings",
 | 
			
		||||
    "plugin:import/typescript"
 | 
			
		||||
  ],
 | 
			
		||||
  "plugins": ["import", "react", "@typescript-eslint", "prettier"],
 | 
			
		||||
  "rules": {
 | 
			
		||||
    "import/extensions": [
 | 
			
		||||
      "error",
 | 
			
		||||
      "ignorePackages",
 | 
			
		||||
      {
 | 
			
		||||
        "js": "never",
 | 
			
		||||
        "jsx": "never",
 | 
			
		||||
        "ts": "never",
 | 
			
		||||
        "tsx": "never"
 | 
			
		||||
      }
 | 
			
		||||
    ],
 | 
			
		||||
    "@typescript-eslint/naming-convention": [
 | 
			
		||||
      "error",
 | 
			
		||||
      {
 | 
			
		||||
        "selector": "function",
 | 
			
		||||
        "format": ["PascalCase", "camelCase"],
 | 
			
		||||
        "leadingUnderscore": "allowSingleOrDouble"
 | 
			
		||||
      }
 | 
			
		||||
    ],
 | 
			
		||||
    "no-restricted-syntax": ["error", "ForInStatement", "LabeledStatement", "WithStatement"],
 | 
			
		||||
    "react/function-component-definition": [2, { "namedComponents": "arrow-function" }],
 | 
			
		||||
    "import/order": [
 | 
			
		||||
      "error",
 | 
			
		||||
      {
 | 
			
		||||
        "alphabetize": {
 | 
			
		||||
          "order": "asc",
 | 
			
		||||
          "caseInsensitive": true
 | 
			
		||||
        },
 | 
			
		||||
        "newlines-between": "never",
 | 
			
		||||
        "groups": ["builtin", "external", "parent", "sibling", "index"],
 | 
			
		||||
        "pathGroups": [
 | 
			
		||||
          {
 | 
			
		||||
            "pattern": "react",
 | 
			
		||||
            "group": "external",
 | 
			
		||||
            "position": "before"
 | 
			
		||||
          }
 | 
			
		||||
        ],
 | 
			
		||||
        "pathGroupsExcludedImportTypes": ["builtin"]
 | 
			
		||||
      }
 | 
			
		||||
    ],
 | 
			
		||||
    "max-len": ["error", {"code": 150}],
 | 
			
		||||
    "@typescript-eslint/ban-ts-comment": ["off"],
 | 
			
		||||
    "import/prefer-default-export": ["off"],
 | 
			
		||||
    "prefer-promise-reject-errors": ["off"],
 | 
			
		||||
    "react/jsx-filename-extension": ["off"],
 | 
			
		||||
    "react/prop-types": ["warn"],
 | 
			
		||||
    "react/require-default-props": "off",
 | 
			
		||||
    "no-return-assign": ["off"],
 | 
			
		||||
    "react/jsx-props-no-spreading": ["off"],
 | 
			
		||||
    "react/jsx-curly-newline": "off",
 | 
			
		||||
    "no-underscore-dangle": "off"
 | 
			
		||||
    "react/destructuring-assignment": ["off"],
 | 
			
		||||
    "no-restricted-syntax": ["error", "ForInStatement", "LabeledStatement", "WithStatement"],
 | 
			
		||||
    "react/jsx-one-expression-per-line": "off",
 | 
			
		||||
    "react/jsx-wrap-multilines": "off",
 | 
			
		||||
    "react/jsx-curly-newline": "off"
 | 
			
		||||
  },
 | 
			
		||||
  "settings": {
 | 
			
		||||
    "import/resolver": {
 | 
			
		||||
@@ -82,5 +24,11 @@
 | 
			
		||||
        "paths": ["src"]
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
    "parser": "babel-eslint",
 | 
			
		||||
    "parserOptions": {
 | 
			
		||||
      "sourceType": "module",
 | 
			
		||||
      "allowImportExportEverywhere": false,
 | 
			
		||||
      "codeFrame": false
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										78
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						@@ -12,7 +12,6 @@ on:
 | 
			
		||||
  pull_request:
 | 
			
		||||
    branches:
 | 
			
		||||
      - main
 | 
			
		||||
      - 'release/*'
 | 
			
		||||
 | 
			
		||||
defaults:
 | 
			
		||||
  run:
 | 
			
		||||
@@ -25,48 +24,45 @@ jobs:
 | 
			
		||||
      DOCKER_REGISTRY_URL: tip-tip-wlan-cloud-ucentral.jfrog.io
 | 
			
		||||
      DOCKER_REGISTRY_USERNAME: ucentral
 | 
			
		||||
    steps:
 | 
			
		||||
    - name: Checkout actions repo
 | 
			
		||||
      uses: actions/checkout@v3
 | 
			
		||||
      with:
 | 
			
		||||
        repository: Telecominfraproject/.github
 | 
			
		||||
        path: github
 | 
			
		||||
    - uses: actions/checkout@v2
 | 
			
		||||
 | 
			
		||||
    - name: Build and push Docker image
 | 
			
		||||
      uses: ./github/composite-actions/docker-image-build
 | 
			
		||||
      with:
 | 
			
		||||
        image_name: owgw-ui
 | 
			
		||||
        registry: tip-tip-wlan-cloud-ucentral.jfrog.io
 | 
			
		||||
        registry_user: ucentral
 | 
			
		||||
        registry_password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
 | 
			
		||||
    - name: Build Docker image
 | 
			
		||||
      run: docker build -t wlan-cloud-ucentralgw-ui:${{ github.sha }} .
 | 
			
		||||
 | 
			
		||||
    - name: Notify on failure via Slack
 | 
			
		||||
      if: failure() && github.ref == 'refs/heads/main'
 | 
			
		||||
      uses: rtCamp/action-slack-notify@v2
 | 
			
		||||
      env:
 | 
			
		||||
        SLACK_USERNAME: GitHub Actions failure notifier
 | 
			
		||||
        SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
 | 
			
		||||
        SLACK_COLOR: "${{ job.status }}"
 | 
			
		||||
        SLACK_ICON: https://raw.githubusercontent.com/quintessence/slack-icons/master/images/github-logo-slack-icon.png
 | 
			
		||||
        SLACK_TITLE: Docker build failed for OWGW-UI service
 | 
			
		||||
    - name: Tag Docker image
 | 
			
		||||
      run: |
 | 
			
		||||
        TAGS="${{ github.sha }}"
 | 
			
		||||
 | 
			
		||||
  trigger-deploy-to-dev:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    if: github.ref == 'refs/heads/main'
 | 
			
		||||
    needs:
 | 
			
		||||
      - docker
 | 
			
		||||
    steps:
 | 
			
		||||
    - name: Checkout actions repo
 | 
			
		||||
      uses: actions/checkout@v3
 | 
			
		||||
      with:
 | 
			
		||||
        repository: Telecominfraproject/.github
 | 
			
		||||
        path: github
 | 
			
		||||
        if [[ ${GITHUB_REF} == "refs/heads/"* ]]
 | 
			
		||||
        then
 | 
			
		||||
          CURRENT_TAG=$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-')
 | 
			
		||||
          TAGS="$TAGS $CURRENT_TAG"
 | 
			
		||||
        else
 | 
			
		||||
          if [[ ${GITHUB_REF} == "refs/tags/"* ]]
 | 
			
		||||
          then
 | 
			
		||||
            CURRENT_TAG=$(echo ${GITHUB_REF#refs/tags/} | tr '/' '-')
 | 
			
		||||
            TAGS="$TAGS $CURRENT_TAG"
 | 
			
		||||
          else # PR build
 | 
			
		||||
            CURRENT_TAG=$(echo ${GITHUB_HEAD_REF#refs/heads/} | tr '/' '-')
 | 
			
		||||
            TAGS="$TAGS $CURRENT_TAG"
 | 
			
		||||
          fi
 | 
			
		||||
        fi
 | 
			
		||||
 | 
			
		||||
    - name: Trigger deployment of the latest version to dev instance and wait for result
 | 
			
		||||
      uses: ./github/composite-actions/trigger-workflow-and-wait
 | 
			
		||||
        echo "Result tags: $TAGS"
 | 
			
		||||
 | 
			
		||||
        for tag in $TAGS; do
 | 
			
		||||
          docker tag wlan-cloud-ucentralgw-ui:${{ github.sha }} ${{ env.DOCKER_REGISTRY_URL }}/ucentralgw-ui:$tag
 | 
			
		||||
        done
 | 
			
		||||
 | 
			
		||||
    - name: Log into Docker registry
 | 
			
		||||
      if: startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/pull/') || github.ref == 'refs/heads/main'
 | 
			
		||||
      uses: docker/login-action@v1
 | 
			
		||||
      with:
 | 
			
		||||
        owner: Telecominfraproject
 | 
			
		||||
        repo: wlan-testing
 | 
			
		||||
        workflow: ucentralgw-dev-deployment.yaml
 | 
			
		||||
        token: ${{ secrets.WLAN_TESTING_PAT }}
 | 
			
		||||
        ref: master
 | 
			
		||||
        inputs: '{"force_latest": "true"}'
 | 
			
		||||
        registry: ${{ env.DOCKER_REGISTRY_URL }}
 | 
			
		||||
        username: ${{ env.DOCKER_REGISTRY_USERNAME }}
 | 
			
		||||
        password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
 | 
			
		||||
 | 
			
		||||
    - name: Push Docker images
 | 
			
		||||
      if: startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/pull/') || github.ref == 'refs/heads/main'
 | 
			
		||||
      run: |
 | 
			
		||||
        docker images | grep ${{ env.DOCKER_REGISTRY_URL }}/ucentralgw-ui | awk -F ' ' '{print $1":"$2}' | xargs -I {} docker push {}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										9
									
								
								.github/workflows/cleanup.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						@@ -4,7 +4,6 @@ on:
 | 
			
		||||
  pull_request:
 | 
			
		||||
    branches:
 | 
			
		||||
      - main
 | 
			
		||||
      - 'release/*'
 | 
			
		||||
    types: [ closed ]
 | 
			
		||||
 | 
			
		||||
defaults:
 | 
			
		||||
@@ -17,10 +16,4 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      - run: |
 | 
			
		||||
          export PR_BRANCH_TAG=$(echo ${GITHUB_HEAD_REF#refs/heads/} | tr '/' '-')
 | 
			
		||||
 | 
			
		||||
          if [[ ! $PR_BRANCH_TAG =~ (main|master|release-*) ]]; then
 | 
			
		||||
            echo "PR branch is $PR_BRANCH_TAG, deleting Docker image"
 | 
			
		||||
            curl -s -uucentral:${{ secrets.DOCKER_REGISTRY_PASSWORD }} -X DELETE "https://tip.jfrog.io/artifactory/tip-wlan-cloud-ucentral/owgw-ui/$PR_BRANCH_TAG"
 | 
			
		||||
          else
 | 
			
		||||
            echo "PR branch is $PR_BRANCH_TAG, not deleting Docker image"
 | 
			
		||||
          fi
 | 
			
		||||
          curl -uucentral:${{ secrets.DOCKER_REGISTRY_PASSWORD }} -X DELETE "https://tip.jfrog.io/artifactory/tip-wlan-cloud-ucentral/ucentralgw-ui/$PR_BRANCH_TAG"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										24
									
								
								.github/workflows/enforce-jira-issue-key.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						@@ -1,24 +0,0 @@
 | 
			
		||||
name: Ensure Jira issue is linked
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  pull_request:
 | 
			
		||||
    types: [opened, edited, reopened, synchronize]
 | 
			
		||||
    branches:
 | 
			
		||||
      - 'release/*'
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  check_for_issue_key:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout actions repo
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
        with:
 | 
			
		||||
          repository: Telecominfraproject/.github
 | 
			
		||||
          path: github
 | 
			
		||||
 | 
			
		||||
      - name: Run JIRA check
 | 
			
		||||
        uses: ./github/composite-actions/enforce-jira-issue-key
 | 
			
		||||
        with:
 | 
			
		||||
          jira_base_url: ${{ secrets.TIP_JIRA_URL }}
 | 
			
		||||
          jira_user_email: ${{ secrets.TIP_JIRA_USER_EMAIL }}
 | 
			
		||||
          jira_api_token: ${{ secrets.TIP_JIRA_API_TOKEN }}
 | 
			
		||||
							
								
								
									
										46
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						@@ -1,46 +0,0 @@
 | 
			
		||||
name: Release chart package
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    tags:
 | 
			
		||||
      - 'v*'
 | 
			
		||||
 | 
			
		||||
defaults:
 | 
			
		||||
  run:
 | 
			
		||||
    shell: bash
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  helm-package:
 | 
			
		||||
    runs-on: ubuntu-20.04
 | 
			
		||||
    env:
 | 
			
		||||
      HELM_REPO_URL: https://tip.jfrog.io/artifactory/tip-wlan-cloud-ucentral-helm/
 | 
			
		||||
      HELM_REPO_USERNAME: ucentral
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout uCentral assembly chart repo
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
        with:
 | 
			
		||||
          path: wlan-cloud-ucentralgw-ui
 | 
			
		||||
 | 
			
		||||
      - name: Build package
 | 
			
		||||
        working-directory: wlan-cloud-ucentralgw-ui/helm
 | 
			
		||||
        run: |
 | 
			
		||||
          helm plugin install https://github.com/aslafy-z/helm-git --version 0.10.0
 | 
			
		||||
          helm repo add bitnami https://charts.bitnami.com/bitnami
 | 
			
		||||
          helm repo update
 | 
			
		||||
          helm dependency update
 | 
			
		||||
          mkdir dist
 | 
			
		||||
          helm package . -d dist
 | 
			
		||||
 | 
			
		||||
      - name: Generate GitHub release body
 | 
			
		||||
        working-directory: wlan-cloud-ucentralgw-ui/helm
 | 
			
		||||
        run: |
 | 
			
		||||
          pip3 install yq -q
 | 
			
		||||
          echo "Docker image - tip-tip-wlan-cloud-ucentral.jfrog.io/owgw-ui:$GITHUB_REF_NAME" > release.txt
 | 
			
		||||
          echo "Helm charted may be attached to this release" >> release.txt
 | 
			
		||||
          echo "Deployment artifacts may be found in https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/tree/$GITHUB_REF_NAME" >> release.txt
 | 
			
		||||
 | 
			
		||||
      - name: Create GitHub release
 | 
			
		||||
        uses: softprops/action-gh-release@v1
 | 
			
		||||
        with:
 | 
			
		||||
          body_path: wlan-cloud-ucentralgw-ui/helm/release.txt
 | 
			
		||||
          files: wlan-cloud-ucentralgw-ui/helm/dist/*
 | 
			
		||||
							
								
								
									
										5
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						@@ -1,8 +1,9 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# dependencies
 | 
			
		||||
/node_modules
 | 
			
		||||
/.pnp
 | 
			
		||||
.pnp.js
 | 
			
		||||
/dev-dist
 | 
			
		||||
 | 
			
		||||
# testing
 | 
			
		||||
/coverage
 | 
			
		||||
@@ -18,3 +19,5 @@
 | 
			
		||||
.env.production.local
 | 
			
		||||
 | 
			
		||||
npm-debug.log*
 | 
			
		||||
yarn-debug.log*
 | 
			
		||||
yarn-error.log*
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,4 @@
 | 
			
		||||
/src/assets
 | 
			
		||||
build
 | 
			
		||||
dist
 | 
			
		||||
node_modules
 | 
			
		||||
.github
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
{ 
 | 
			
		||||
  "printWidth": 120,
 | 
			
		||||
    "printWidth": 100,
 | 
			
		||||
    "trailingComma": "all",
 | 
			
		||||
    "tabWidth": 2, 
 | 
			
		||||
    "semi": true, 
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										12
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						@@ -1,8 +1,6 @@
 | 
			
		||||
FROM node:18.7.0-alpine3.15 AS build
 | 
			
		||||
FROM node:14-alpine3.11 AS build
 | 
			
		||||
 | 
			
		||||
WORKDIR /app
 | 
			
		||||
 | 
			
		||||
COPY package.json package-lock.json /app/
 | 
			
		||||
COPY package.json package-lock.json /
 | 
			
		||||
 | 
			
		||||
RUN npm install
 | 
			
		||||
 | 
			
		||||
@@ -10,8 +8,8 @@ COPY . .
 | 
			
		||||
 | 
			
		||||
RUN npm run build
 | 
			
		||||
 | 
			
		||||
FROM nginx:1.22.0-alpine AS runtime
 | 
			
		||||
FROM nginx:1.20.1-alpine AS runtime
 | 
			
		||||
 | 
			
		||||
COPY --from=build /app/build/ /usr/share/nginx/html/
 | 
			
		||||
COPY --from=build /build/ /usr/share/nginx/html/
 | 
			
		||||
 | 
			
		||||
COPY --from=build /app/docker-entrypoint.d/40-generate-config.sh /docker-entrypoint.d/40-generate-config.sh
 | 
			
		||||
COPY --from=build docker-entrypoint.d/40-generate-config.sh /docker-entrypoint.d/40-generate-config.sh
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										25
									
								
								README.md
									
									
									
									
									
								
							
							
						
						@@ -1,7 +1,6 @@
 | 
			
		||||
# uCentralGW UI
 | 
			
		||||
 | 
			
		||||
## What is this?
 | 
			
		||||
 | 
			
		||||
The uCentralGW Client is a user interface that lets you monitor and manage devices connected to the [uCentral gateway](https://github.com/Telecominfraproject/wlan-cloud-ucentralgw). To use the interface,
 | 
			
		||||
you either need to run it on your machine for [development](#development) or build it for [production](#production).
 | 
			
		||||
 | 
			
		||||
@@ -10,34 +9,40 @@ NOTE: This UI will be evolving as micro services are added to the uCentral progr
 | 
			
		||||
## Running the solution
 | 
			
		||||
 | 
			
		||||
### Development
 | 
			
		||||
 | 
			
		||||
You need to run these commands in the root folder of the project and also have npm installed on your machine.
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
git clone https://github.com/Telecominfraproject/wlan-cloud-ucentralgw-ui
 | 
			
		||||
cd wlan-cloud-ucentralgw-ui
 | 
			
		||||
npm install
 | 
			
		||||
npm run dev
 | 
			
		||||
npm start
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Run these commands if you want to run the solution on your machine while also doing development on the [uCentral UI Library](https://github.com/Telecominfraproject/wlan-cloud-ucentral-ui-libs).
 | 
			
		||||
```
 | 
			
		||||
git clone https://github.com/Telecominfraproject/wlan-cloud-ucentralgw-ui
 | 
			
		||||
git clone https://github.com/Telecominfraproject/wlan-cloud-ucentral-ui-libs
 | 
			
		||||
cd wlan-cloud-ucentralgw-ui
 | 
			
		||||
npm link ../wlan-cloud-ucentral-ui-libs // Add sudo at the start of this command if it fails because of permissions
 | 
			
		||||
npm start
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Production
 | 
			
		||||
 | 
			
		||||
You need to run this in the root folder of the project and also have npm installed on your machine.
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
git clone https://github.com/Telecominfraproject/wlan-cloud-ucentralgw-ui
 | 
			
		||||
cd wlan-cloud-ucentralgw-ui
 | 
			
		||||
npm install
 | 
			
		||||
npm run build
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Once the build is done, you can move the `build` folder on your server.
 | 
			
		||||
 | 
			
		||||
### Configuration
 | 
			
		||||
You must change the `config.json` file in `public` directory to point to your uCentral Security Service URL (uCentralSec). You may also limit the ability for users to change the default uCentralSec. If you do not allow a uCentralSec change, the uCentralSec URL will not appear on the login screen. 
 | 
			
		||||
 | 
			
		||||
You can control the uCentral Security Service URL (uCentralSec) by modifying the ENV variable "VITE_UCENTRALSEC_URL". There is an example .env file located at the root of this repository.
 | 
			
		||||
Here are the current default values: 
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
VITE_UCENTRALSEC_URL="https://ucentral.dpaas.arilia.com:16001"
 | 
			
		||||
{
 | 
			
		||||
  "DEFAULT_UCENTRALSEC_URL": "https://ucentral.dpaas.arilia.com:16001",
 | 
			
		||||
  "ALLOW_UCENTRALSEC_CHANGE": false
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										7
									
								
								babel.config.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,7 @@
 | 
			
		||||
{
 | 
			
		||||
  "presets": [
 | 
			
		||||
    "@babel/preset-env",
 | 
			
		||||
    "@babel/preset-react"
 | 
			
		||||
  ],
 | 
			
		||||
  "plugins": ["@babel/plugin-proposal-class-properties"]
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										12
									
								
								config/paths.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,12 @@
 | 
			
		||||
const path = require('path');
 | 
			
		||||
 | 
			
		||||
module.exports = {
 | 
			
		||||
  // Source files
 | 
			
		||||
  src: path.resolve(__dirname, '../src'),
 | 
			
		||||
 | 
			
		||||
  // Production build files
 | 
			
		||||
  build: path.resolve(__dirname, '../build'),
 | 
			
		||||
 | 
			
		||||
  // Static files that get copied to build folder
 | 
			
		||||
  public: path.resolve(__dirname, '../public'),
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										76
									
								
								config/webpack.common.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,76 @@
 | 
			
		||||
/* eslint-disable import/no-extraneous-dependencies */
 | 
			
		||||
/* eslint-disable prefer-template */
 | 
			
		||||
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
 | 
			
		||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
 | 
			
		||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
 | 
			
		||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
 | 
			
		||||
const path = require('path');
 | 
			
		||||
const paths = require('./paths');
 | 
			
		||||
 | 
			
		||||
module.exports = {
 | 
			
		||||
  entry: [paths.src + '/index.js'],
 | 
			
		||||
  output: {
 | 
			
		||||
    path: paths.build,
 | 
			
		||||
    filename: '[name].bundle.js',
 | 
			
		||||
    publicPath: '/',
 | 
			
		||||
  },
 | 
			
		||||
  resolve: {
 | 
			
		||||
    modules: [path.resolve('./node_modules'), path.resolve('./src')],
 | 
			
		||||
    preferRelative: true,
 | 
			
		||||
  },
 | 
			
		||||
  plugins: [
 | 
			
		||||
    new CleanWebpackPlugin(),
 | 
			
		||||
 | 
			
		||||
    new MiniCssExtractPlugin({
 | 
			
		||||
      filename: 'styles/[name].[contenthash].css',
 | 
			
		||||
      chunkFilename: '[id].[contenthash].css',
 | 
			
		||||
    }),
 | 
			
		||||
    new CopyWebpackPlugin({
 | 
			
		||||
      patterns: [
 | 
			
		||||
        {
 | 
			
		||||
          from: paths.src + '/assets',
 | 
			
		||||
          to: 'assets',
 | 
			
		||||
          globOptions: {
 | 
			
		||||
            ignore: ['*.DS_Store'],
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          from: paths.public + '/locales',
 | 
			
		||||
          to: 'locales',
 | 
			
		||||
          globOptions: {
 | 
			
		||||
            ignore: ['*.DS_Store'],
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          from: paths.public + '/config.json',
 | 
			
		||||
          to: 'config.json',
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
    }),
 | 
			
		||||
    new HtmlWebpackPlugin({
 | 
			
		||||
      title: 'uCentralGW',
 | 
			
		||||
      favicon: paths.public + '/favicon.ico',
 | 
			
		||||
      template: paths.public + '/index.html',
 | 
			
		||||
      filename: 'index.html',
 | 
			
		||||
    }),
 | 
			
		||||
  ],
 | 
			
		||||
 | 
			
		||||
  module: {
 | 
			
		||||
    rules: [
 | 
			
		||||
      {
 | 
			
		||||
        test: /\.(js|jsx)$/,
 | 
			
		||||
        exclude: /node_modules/,
 | 
			
		||||
        use: ['babel-loader'],
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        test: /\.(css|scss)$/,
 | 
			
		||||
        use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader'],
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        test: /\.svg$/,
 | 
			
		||||
        use: ['@svgr/webpack'],
 | 
			
		||||
      },
 | 
			
		||||
      { test: /\.(?:ico|gif|png|jpg|jpeg)$/i, type: 'asset/resource' },
 | 
			
		||||
    ],
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										53
									
								
								config/webpack.dev.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,53 @@
 | 
			
		||||
/* eslint-disable import/no-extraneous-dependencies */
 | 
			
		||||
/* eslint-disable prefer-template */
 | 
			
		||||
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
 | 
			
		||||
const { merge } = require('webpack-merge');
 | 
			
		||||
const path = require('path');
 | 
			
		||||
const paths = require('./paths');
 | 
			
		||||
const common = require('./webpack.common');
 | 
			
		||||
 | 
			
		||||
module.exports = merge(common, {
 | 
			
		||||
  mode: 'development',
 | 
			
		||||
 | 
			
		||||
  target: 'web',
 | 
			
		||||
 | 
			
		||||
  devtool: 'inline-source-map',
 | 
			
		||||
 | 
			
		||||
  devServer: {
 | 
			
		||||
    historyApiFallback: true,
 | 
			
		||||
    contentBase: paths.build,
 | 
			
		||||
    open: true,
 | 
			
		||||
    compress: false,
 | 
			
		||||
    hot: true,
 | 
			
		||||
    port: 3000,
 | 
			
		||||
  },
 | 
			
		||||
  module: {
 | 
			
		||||
    rules: [
 | 
			
		||||
      {
 | 
			
		||||
        test: /\.[js]sx?$/,
 | 
			
		||||
        exclude: /node_modules/,
 | 
			
		||||
        use: [
 | 
			
		||||
          {
 | 
			
		||||
            loader: require.resolve('babel-loader'),
 | 
			
		||||
            options: {
 | 
			
		||||
              plugins: [require.resolve('react-refresh/babel')],
 | 
			
		||||
            },
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
      },
 | 
			
		||||
    ],
 | 
			
		||||
  },
 | 
			
		||||
  resolve: {
 | 
			
		||||
    modules: [
 | 
			
		||||
      'node_modules',
 | 
			
		||||
      'src',
 | 
			
		||||
      path.resolve(__dirname, '../', 'node_modules', 'ucentral-libs', 'src'),
 | 
			
		||||
    ],
 | 
			
		||||
    alias: {
 | 
			
		||||
      react: path.resolve(__dirname, '../', 'node_modules', 'react'),
 | 
			
		||||
      'react-router-dom': path.resolve('./node_modules/react-router-dom'),
 | 
			
		||||
      'ucentral-libs': path.resolve(__dirname, '../', 'node_modules', 'ucentral-libs', 'src'),
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  plugins: [new ReactRefreshWebpackPlugin()],
 | 
			
		||||
});
 | 
			
		||||
							
								
								
									
										36
									
								
								config/webpack.prod.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,36 @@
 | 
			
		||||
/* eslint-disable import/no-extraneous-dependencies */
 | 
			
		||||
/* eslint-disable prefer-template */
 | 
			
		||||
const { merge } = require('webpack-merge');
 | 
			
		||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
 | 
			
		||||
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
 | 
			
		||||
const TerserPlugin = require('terser-webpack-plugin');
 | 
			
		||||
const paths = require('./paths');
 | 
			
		||||
const common = require('./webpack.common');
 | 
			
		||||
 | 
			
		||||
module.exports = merge(common, {
 | 
			
		||||
  mode: 'production',
 | 
			
		||||
  devtool: false,
 | 
			
		||||
  output: {
 | 
			
		||||
    path: paths.build,
 | 
			
		||||
    publicPath: '/',
 | 
			
		||||
    filename: 'js/[name].[contenthash].bundle.js',
 | 
			
		||||
  },
 | 
			
		||||
  plugins: [
 | 
			
		||||
    new MiniCssExtractPlugin({
 | 
			
		||||
      filename: 'styles/[name].[contenthash].css',
 | 
			
		||||
      chunkFilename: '[contenthash].css',
 | 
			
		||||
    }),
 | 
			
		||||
  ],
 | 
			
		||||
  module: {
 | 
			
		||||
    rules: [],
 | 
			
		||||
  },
 | 
			
		||||
  optimization: {
 | 
			
		||||
    minimize: true,
 | 
			
		||||
    minimizer: [`...`, new TerserPlugin(), new CssMinimizerPlugin()],
 | 
			
		||||
  },
 | 
			
		||||
  performance: {
 | 
			
		||||
    hints: false,
 | 
			
		||||
    maxEntrypointSize: 512000,
 | 
			
		||||
    maxAssetSize: 512000,
 | 
			
		||||
  },
 | 
			
		||||
});
 | 
			
		||||
@@ -1,32 +1,6 @@
 | 
			
		||||
#!/bin/ash
 | 
			
		||||
# Check if variables are set
 | 
			
		||||
export DEFAULT_UCENTRALSEC_URL="${DEFAULT_UCENTRALSEC_URL:-https://ucentral.dpaas.arilia.com:16001}"
 | 
			
		||||
export ALLOW_UCENTRALSEC_CHANGE="${ALLOW_UCENTRALSEC_CHANGE:-false}"
 | 
			
		||||
 | 
			
		||||
ENV_CONFIG_PATH=/usr/share/nginx/html/env-config.js
 | 
			
		||||
 | 
			
		||||
# Recreate config file
 | 
			
		||||
rm -rf $ENV_CONFIG_PATH
 | 
			
		||||
touch $ENV_CONFIG_PATH
 | 
			
		||||
 | 
			
		||||
# Add assignment
 | 
			
		||||
echo "window._env_ = {" >> $ENV_CONFIG_PATH
 | 
			
		||||
 | 
			
		||||
# Read each line in .env file
 | 
			
		||||
# Each line represents key=value pairs
 | 
			
		||||
env | grep REACT_ | while read -r line || [[ -n "$line" ]];
 | 
			
		||||
do
 | 
			
		||||
  echo $line
 | 
			
		||||
  # Split env variables by character `=`
 | 
			
		||||
  if printf '%s\n' "$line" | grep -q -e '='; then
 | 
			
		||||
    varname=$(printf '%s\n' "$line" | sed -e 's/=.*//')
 | 
			
		||||
    varvalue=$(printf '%s\n' "$line" | sed -e 's/^[^=]*=//')
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Read value of current variable if exists as Environment variable
 | 
			
		||||
  value=$(printf '%s\n' "${!varname}")
 | 
			
		||||
  # Otherwise use value from .env file
 | 
			
		||||
  [[ -z $value ]] && value=${varvalue}
 | 
			
		||||
 | 
			
		||||
  # Append configuration property to JS file
 | 
			
		||||
  echo "  $varname: \"$value\"," >> $ENV_CONFIG_PATH
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
echo "}" >> $ENV_CONFIG_PATH
 | 
			
		||||
echo '{"DEFAULT_UCENTRALSEC_URL": "'$DEFAULT_UCENTRALSEC_URL'","ALLOW_UCENTRALSEC_CHANGE": '$ALLOW_UCENTRALSEC_CHANGE'}' > /usr/share/nginx/html/config.json
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
apiVersion: v1
 | 
			
		||||
appVersion: "1.0"
 | 
			
		||||
description: A Helm chart for Kubernetes
 | 
			
		||||
name: owgwui
 | 
			
		||||
name: ucentralgwui
 | 
			
		||||
version: 0.1.0
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
# owgwui
 | 
			
		||||
# ucentralgwui
 | 
			
		||||
 | 
			
		||||
This Helm chart helps to deploy OpenWIFI Web UI (further on refered as __Web UI__) to the Kubernetes clusters. It is mainly used in [assembly chart](https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/tree/main/chart) as Web UI requires other services as dependencies that are considered in that Helm chart. This chart is purposed to define deployment logic close to the application code itself and define default values that could be overriden during deployment.
 | 
			
		||||
This Helm chart helps to deploy uCentralGW-UI to the Kubernetes clusters. It is mainly used in [assembly chart](https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/tree/main/chart) as uCentralGW-UI requires other services as dependencies that are considered in that Helm chart. This chart is purposed to define deployment logic close to the application code itself and define default values that could be overriden during deployment.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## TL;DR;
 | 
			
		||||
@@ -11,7 +11,7 @@ $ helm install .
 | 
			
		||||
 | 
			
		||||
## Introduction
 | 
			
		||||
 | 
			
		||||
This chart bootstraps the Web UI on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
 | 
			
		||||
This chart bootstraps an ucentralgwui on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
 | 
			
		||||
 | 
			
		||||
## Installing the Chart
 | 
			
		||||
 | 
			
		||||
@@ -20,10 +20,10 @@ Currently this chart is not assembled in charts archives, so [helm-git](https://
 | 
			
		||||
To install the chart with the release name `my-release`:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ helm install --name my-release git+https://github.com/Telecominfraproject/wlan-cloud-ucentralgw-ui@helm/owgwui-0.1.0.tgz?ref=main
 | 
			
		||||
$ helm install --name my-release git+https://github.com/Telecominfraproject/wlan-cloud-ucentralgw-ui@helm?ref=main
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
The command deploys the Web UI on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
 | 
			
		||||
The command deploys ucentralgwui on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
 | 
			
		||||
 | 
			
		||||
> **Tip**: List all releases using `helm list`
 | 
			
		||||
 | 
			
		||||
@@ -46,21 +46,21 @@ The following table lists the configurable parameters of the chart and their def
 | 
			
		||||
| replicaCount | number | Amount of replicas to be deployed | `1` |
 | 
			
		||||
| nameOverride | string | Override to be used for application deployment |  |
 | 
			
		||||
| fullnameOverride | string | Override to be used for application deployment (has priority over nameOverride) |  |
 | 
			
		||||
| images.owgwui.repository | string | Docker image repository |  |
 | 
			
		||||
| images.owgwui.tag | string | Docker image tag | `'master'` |
 | 
			
		||||
| images.owgwui.pullPolicy | string | Docker image pull policy | `'Always'` |
 | 
			
		||||
| services.owgwui.type | string | OpenWIFI Web UI service type | `'ClusterIP'` |
 | 
			
		||||
| services.owgwui.ports.http.servicePort | number | Websocket endpoint port to be exposed on service | `80` |
 | 
			
		||||
| services.owgwui.ports.http.targetPort | number | Websocket endpoint port to be targeted by service | `80` |
 | 
			
		||||
| services.owgwui.ports.http.protocol | string | Websocket endpoint protocol | `'TCP'` |
 | 
			
		||||
| checks.owgwui.liveness.httpGet.path | string | Liveness check path to be used | `'/'` |
 | 
			
		||||
| checks.owgwui.liveness.httpGet.port | number | Liveness check port to be used (should be pointint to ALB endpoint) | `http` |
 | 
			
		||||
| checks.owgwui.readiness.httpGet.path | string | Readiness check path to be used | `'/'` |
 | 
			
		||||
| checks.owgwui.readiness.httpGet.port | number | Readiness check port to be used | `http` |
 | 
			
		||||
| ingresses.default.enabled | boolean | Defines if the Web UI should be exposed via Ingress controller | `False` |
 | 
			
		||||
| ingresses.default.hosts | array | List of hosts for the exposed Web UI |  |
 | 
			
		||||
| ingresses.default.paths | array | List of paths to be exposed for the Web UI |  |
 | 
			
		||||
| public_env_variables | hash | Defines list of environment variables to be passed to the Web UI (required for application configuration) | |
 | 
			
		||||
| images.ucentralgwui.repository | string | Docker image repository |  |
 | 
			
		||||
| images.ucentralgwui.tag | string | Docker image tag | `'master'` |
 | 
			
		||||
| images.ucentralgwui.pullPolicy | string | Docker image pull policy | `'Always'` |
 | 
			
		||||
| services.ucentralgwui.type | string | uCentralGW-UI service type | `'ClusterIP'` |
 | 
			
		||||
| services.ucentralgwui.ports.http.servicePort | number | Websocket endpoint port to be exposed on service | `80` |
 | 
			
		||||
| services.ucentralgwui.ports.http.targetPort | number | Websocket endpoint port to be targeted by service | `80` |
 | 
			
		||||
| services.ucentralgwui.ports.http.protocol | string | Websocket endpoint protocol | `'TCP'` |
 | 
			
		||||
| checks.ucentralgwui.liveness.httpGet.path | string | Liveness check path to be used | `'/'` |
 | 
			
		||||
| checks.ucentralgwui.liveness.httpGet.port | number | Liveness check port to be used (should be pointint to ALB endpoint) | `http` |
 | 
			
		||||
| checks.ucentralgwui.readiness.httpGet.path | string | Readiness check path to be used | `'/'` |
 | 
			
		||||
| checks.ucentralgwui.readiness.httpGet.port | number | Readiness check port to be used | `http` |
 | 
			
		||||
| ingresses.default.enabled | boolean | Defines if uCentralGW-UI should be exposed via Ingress controller | `False` |
 | 
			
		||||
| ingresses.default.hosts | array | List of hosts for exposed uCentralGW-UI |  |
 | 
			
		||||
| ingresses.default.paths | array | List of paths to be exposed for uCentralGW-UI |  |
 | 
			
		||||
| public_env_variables | hash | Defines list of environment variables to be passed to uCentralGW-UI (required for application configuration) | |
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
{{/*
 | 
			
		||||
Expand the name of the chart.
 | 
			
		||||
*/}}
 | 
			
		||||
{{- define "owgwui.name" -}}
 | 
			
		||||
{{- define "ucentralgwui.name" -}}
 | 
			
		||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
 | 
			
		||||
{{- end -}}
 | 
			
		||||
 | 
			
		||||
@@ -11,7 +11,7 @@ Create a default fully qualified app name.
 | 
			
		||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
 | 
			
		||||
If release name contains chart name it will be used as a full name.
 | 
			
		||||
*/}}
 | 
			
		||||
{{- define "owgwui.fullname" -}}
 | 
			
		||||
{{- define "ucentralgwui.fullname" -}}
 | 
			
		||||
{{- if .Values.fullnameOverride -}}
 | 
			
		||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
 | 
			
		||||
{{- else -}}
 | 
			
		||||
@@ -27,16 +27,6 @@ If release name contains chart name it will be used as a full name.
 | 
			
		||||
{{/*
 | 
			
		||||
Create chart name and version as used by the chart label.
 | 
			
		||||
*/}}
 | 
			
		||||
{{- define "owgwui.chart" -}}
 | 
			
		||||
{{- define "ucentralgwui.chart" -}}
 | 
			
		||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
 | 
			
		||||
{{- end -}}
 | 
			
		||||
 | 
			
		||||
{{- define "owgwui.ingress.apiVersion" -}}
 | 
			
		||||
  {{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" -}}
 | 
			
		||||
      {{- print "networking.k8s.io/v1" -}}
 | 
			
		||||
  {{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}}
 | 
			
		||||
    {{- print "networking.k8s.io/v1beta1" -}}
 | 
			
		||||
  {{- else -}}
 | 
			
		||||
    {{- print "extensions/v1beta1" -}}
 | 
			
		||||
  {{- end -}}
 | 
			
		||||
{{- end -}}
 | 
			
		||||
 
 | 
			
		||||
@@ -3,43 +3,36 @@
 | 
			
		||||
apiVersion: apps/v1
 | 
			
		||||
kind: Deployment
 | 
			
		||||
metadata:
 | 
			
		||||
  name: {{ include "owgwui.fullname" . }}
 | 
			
		||||
  name: {{ include "ucentralgwui.fullname" . }}
 | 
			
		||||
  labels:
 | 
			
		||||
    app.kubernetes.io/name: {{ include "owgwui.name" . }}
 | 
			
		||||
    helm.sh/chart: {{ include "owgwui.chart" . }}
 | 
			
		||||
    app.kubernetes.io/name: {{ include "ucentralgwui.name" . }}
 | 
			
		||||
    helm.sh/chart: {{ include "ucentralgwui.chart" . }}
 | 
			
		||||
    app.kubernetes.io/instance: {{ .Release.Name }}
 | 
			
		||||
    app.kubernetes.io/managed-by: {{ .Release.Service }}
 | 
			
		||||
spec:
 | 
			
		||||
  replicas: {{ .Values.replicaCount }}
 | 
			
		||||
  revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
 | 
			
		||||
  selector:
 | 
			
		||||
    matchLabels:
 | 
			
		||||
      app.kubernetes.io/name: {{ include "owgwui.name" . }}
 | 
			
		||||
      app.kubernetes.io/name: {{ include "ucentralgwui.name" . }}
 | 
			
		||||
      app.kubernetes.io/instance: {{ .Release.Name }}
 | 
			
		||||
      {{- with .Values.services.owgwui.labels }}
 | 
			
		||||
      {{- with .Values.services.ucentralgwui.labels }}
 | 
			
		||||
      {{- toYaml . | nindent 6 }}
 | 
			
		||||
      {{- end }}
 | 
			
		||||
  template:
 | 
			
		||||
    metadata:
 | 
			
		||||
      labels:
 | 
			
		||||
        app.kubernetes.io/name: {{ include "owgwui.name" . }}
 | 
			
		||||
        app.kubernetes.io/name: {{ include "ucentralgwui.name" . }}
 | 
			
		||||
        app.kubernetes.io/instance: {{ .Release.Name }}
 | 
			
		||||
        {{- with .Values.services.owgwui.labels }}
 | 
			
		||||
        {{- with .Values.services.ucentralgwui.labels }}
 | 
			
		||||
        {{- toYaml . | nindent 8 }}
 | 
			
		||||
        {{- end }}
 | 
			
		||||
      {{- if .Values.podAnnotations }}
 | 
			
		||||
      annotations:
 | 
			
		||||
        {{- with .Values.podAnnotations }}
 | 
			
		||||
        {{- toYaml . | nindent 8 }}
 | 
			
		||||
        {{- end }}
 | 
			
		||||
      {{- end }}
 | 
			
		||||
    spec:
 | 
			
		||||
 | 
			
		||||
      containers:
 | 
			
		||||
 | 
			
		||||
        - name: owgwui
 | 
			
		||||
          image: "{{ .Values.images.owgwui.repository }}:{{ .Values.images.owgwui.tag }}"
 | 
			
		||||
          imagePullPolicy: {{ .Values.images.owgwui.pullPolicy }}
 | 
			
		||||
        - name: ucentralgwui
 | 
			
		||||
          image: "{{ .Values.images.ucentralgwui.repository }}:{{ .Values.images.ucentralgwui.tag }}"
 | 
			
		||||
          imagePullPolicy: {{ .Values.images.ucentralgwui.pullPolicy }}
 | 
			
		||||
 | 
			
		||||
          env:
 | 
			
		||||
            - name: KUBERNETES_DEPLOYED
 | 
			
		||||
@@ -50,19 +43,19 @@ spec:
 | 
			
		||||
          {{- end }}
 | 
			
		||||
 | 
			
		||||
          ports:
 | 
			
		||||
          {{- range $key, $value := .Values.services.owgwui.ports }}
 | 
			
		||||
          {{- range $key, $value := .Values.services.ucentralgwui.ports }}
 | 
			
		||||
            - name: {{ $key }}
 | 
			
		||||
              containerPort: {{ $value.targetPort }}
 | 
			
		||||
              protocol: {{ $value.protocol }}
 | 
			
		||||
          {{- end }}
 | 
			
		||||
 | 
			
		||||
          {{- if .Values.checks.owgwui.liveness }}
 | 
			
		||||
          {{- if .Values.checks.ucentralgwui.liveness }}
 | 
			
		||||
          livenessProbe:
 | 
			
		||||
            {{- toYaml .Values.checks.owgwui.liveness | nindent 12 }}
 | 
			
		||||
            {{- toYaml .Values.checks.ucentralgwui.liveness | nindent 12 }}
 | 
			
		||||
          {{- end }}
 | 
			
		||||
          {{- if .Values.checks.owgwui.readiness }}
 | 
			
		||||
          {{- if .Values.checks.ucentralgwui.readiness }}
 | 
			
		||||
          readinessProbe:
 | 
			
		||||
            {{- toYaml .Values.checks.owgwui.readiness | nindent 12 }}
 | 
			
		||||
            {{- toYaml .Values.checks.ucentralgwui.readiness | nindent 12 }}
 | 
			
		||||
          {{- end }}
 | 
			
		||||
 | 
			
		||||
          {{- with .Values.resources }}
 | 
			
		||||
@@ -73,7 +66,7 @@ spec:
 | 
			
		||||
      imagePullSecrets:
 | 
			
		||||
      {{- range $image, $imageValue := .Values.images }}
 | 
			
		||||
        {{- if $imageValue.regcred }}
 | 
			
		||||
      - name: {{ include "owgwui.fullname" $root }}-{{ $image }}-regcred
 | 
			
		||||
      - name: {{ include "ucentralgwui.fullname" $root }}-{{ $image }}-regcred
 | 
			
		||||
        {{- end }}
 | 
			
		||||
      {{- end }}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -2,13 +2,13 @@
 | 
			
		||||
{{- range $ingress, $ingressValue := .Values.ingresses }}
 | 
			
		||||
{{- if $ingressValue.enabled }}
 | 
			
		||||
---
 | 
			
		||||
apiVersion: {{ include "owgwui.ingress.apiVersion" $root }}
 | 
			
		||||
apiVersion: extensions/v1beta1
 | 
			
		||||
kind: Ingress
 | 
			
		||||
metadata:
 | 
			
		||||
  name: {{ include "owgwui.fullname" $root }}-{{ $ingress }}
 | 
			
		||||
  name: {{ include "ucentralgwui.fullname" $root }}-{{ $ingress }}
 | 
			
		||||
  labels:
 | 
			
		||||
    app.kubernetes.io/name: {{ include "owgwui.name" $root }}
 | 
			
		||||
    helm.sh/chart: {{ include "owgwui.chart" $root }}
 | 
			
		||||
    app.kubernetes.io/name: {{ include "ucentralgwui.name" $root }}
 | 
			
		||||
    helm.sh/chart: {{ include "ucentralgwui.chart" $root }}
 | 
			
		||||
    app.kubernetes.io/instance: {{ $root.Release.Name }}
 | 
			
		||||
    app.kubernetes.io/managed-by: {{ $root.Release.Service }}
 | 
			
		||||
  {{- with $ingressValue.annotations }}
 | 
			
		||||
@@ -36,25 +36,11 @@ spec:
 | 
			
		||||
      paths:
 | 
			
		||||
      {{- range $ingressValue.paths }}
 | 
			
		||||
        - path: {{ .path }}
 | 
			
		||||
          {{- if $root.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
 | 
			
		||||
          pathType: {{ .pathType | default "ImplementationSpecific" }}
 | 
			
		||||
          {{- end }}
 | 
			
		||||
          backend:
 | 
			
		||||
            {{- if $root.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
 | 
			
		||||
            service:
 | 
			
		||||
              name: {{ include "owgwui.fullname" $root }}-{{ .serviceName }}
 | 
			
		||||
              port:
 | 
			
		||||
              {{- if kindIs "string" .servicePort }}
 | 
			
		||||
                name: {{ .servicePort }}
 | 
			
		||||
              {{- else }}
 | 
			
		||||
                number: {{ .servicePort }}
 | 
			
		||||
              {{- end }}
 | 
			
		||||
            {{- else }}
 | 
			
		||||
            serviceName: {{ include "owgwui.fullname" $root }}-{{ .serviceName }}
 | 
			
		||||
            serviceName: {{ include "ucentralgwui.fullname" $root }}-{{ .serviceName }}
 | 
			
		||||
            servicePort: {{ .servicePort }}
 | 
			
		||||
      {{- end }}
 | 
			
		||||
  {{- end }}
 | 
			
		||||
  {{- end }}
 | 
			
		||||
 | 
			
		||||
{{- end }}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -10,11 +10,11 @@ kind: Secret
 | 
			
		||||
type: kubernetes.io/dockerconfigjson
 | 
			
		||||
metadata:
 | 
			
		||||
  labels:
 | 
			
		||||
    app.kuberentes.io/name: {{ include "owgwui.name" $root }}
 | 
			
		||||
    helm.sh/chart: {{ include "owgwui.chart" $root }}
 | 
			
		||||
    app.kuberentes.io/name: {{ include "ucentralgwui.name" $root }}
 | 
			
		||||
    helm.sh/chart: {{ include "ucentralgwui.chart" $root }}
 | 
			
		||||
    app.kubernetes.io/instance: {{ $root.Release.Name }}
 | 
			
		||||
    app.kubernetes.io/managed-by: {{ $root.Release.Service }}
 | 
			
		||||
  name: {{ include "owgwui.fullname" $root }}-{{ $image }}-regcred
 | 
			
		||||
  name: {{ include "ucentralgwui.fullname" $root }}-{{ $image }}-regcred
 | 
			
		||||
data:
 | 
			
		||||
  .dockerconfigjson: {{ template "imagePullSecret" $imageValue.regcred }}
 | 
			
		||||
{{- end }}
 | 
			
		||||
 
 | 
			
		||||
@@ -4,14 +4,14 @@
 | 
			
		||||
apiVersion: v1
 | 
			
		||||
kind: Service
 | 
			
		||||
metadata:
 | 
			
		||||
  name: {{ include "owgwui.fullname" $root }}-{{ $service }}
 | 
			
		||||
  name: {{ include "ucentralgwui.fullname" $root }}-{{ $service }}
 | 
			
		||||
  {{- with $serviceValue.annotations }}
 | 
			
		||||
  annotations:
 | 
			
		||||
    {{- toYaml . | nindent 4 }}
 | 
			
		||||
  {{- end }}
 | 
			
		||||
  labels:
 | 
			
		||||
    app.kubernetes.io/name: {{ include "owgwui.name" $root }}
 | 
			
		||||
    helm.sh/chart: {{ include "owgwui.chart" $root }}
 | 
			
		||||
    app.kubernetes.io/name: {{ include "ucentralgwui.name" $root }}
 | 
			
		||||
    helm.sh/chart: {{ include "ucentralgwui.chart" $root }}
 | 
			
		||||
    app.kubernetes.io/instance: {{ $root.Release.Name }}
 | 
			
		||||
    app.kubernetes.io/managed-by: {{ $root.Release.Service }}
 | 
			
		||||
 | 
			
		||||
@@ -39,7 +39,7 @@ spec:
 | 
			
		||||
      {{- end }}
 | 
			
		||||
  {{- end }}
 | 
			
		||||
  selector:
 | 
			
		||||
    app.kubernetes.io/name: {{ include "owgwui.name" $root }}
 | 
			
		||||
    app.kubernetes.io/name: {{ include "ucentralgwui.name" $root }}
 | 
			
		||||
    app.kubernetes.io/instance: {{ $root.Release.Name }}
 | 
			
		||||
    {{- with $serviceValue.labels }}
 | 
			
		||||
    {{- toYaml . | nindent 4 }}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,18 +1,17 @@
 | 
			
		||||
# System
 | 
			
		||||
replicaCount: 1
 | 
			
		||||
revisionHistoryLimit: 2
 | 
			
		||||
 | 
			
		||||
nameOverride: ""
 | 
			
		||||
fullnameOverride: ""
 | 
			
		||||
 | 
			
		||||
images:
 | 
			
		||||
  owgwui:
 | 
			
		||||
    repository: tip-tip-wlan-cloud-ucentral.jfrog.io/owgw-ui
 | 
			
		||||
    tag: v2.9.0-RC2
 | 
			
		||||
  ucentralgwui:
 | 
			
		||||
    repository: tip-tip-wlan-cloud-ucentral.jfrog.io/ucentralgw-ui
 | 
			
		||||
    tag: v2.0.0-RC1
 | 
			
		||||
    pullPolicy: Always
 | 
			
		||||
 | 
			
		||||
services:
 | 
			
		||||
  owgwui:
 | 
			
		||||
  ucentralgwui:
 | 
			
		||||
    type: ClusterIP
 | 
			
		||||
    ports:
 | 
			
		||||
      http:
 | 
			
		||||
@@ -21,7 +20,7 @@ services:
 | 
			
		||||
        protocol: TCP
 | 
			
		||||
 | 
			
		||||
checks:
 | 
			
		||||
  owgwui:
 | 
			
		||||
  ucentralgwui:
 | 
			
		||||
    liveness:
 | 
			
		||||
      httpGet:
 | 
			
		||||
        path: /
 | 
			
		||||
@@ -38,7 +37,7 @@ ingresses:
 | 
			
		||||
      # kubernetes.io/ingress.class: nginx
 | 
			
		||||
      # kubernetes.io/tls-acme: "true"
 | 
			
		||||
    # tls:
 | 
			
		||||
    # - secretName: '{{ include "owgwui.fullname" . }}-default-tls' # template may be used
 | 
			
		||||
    # - secretName: '{{ include "ucentralgwui.fullname" . }}-default-tls' # template may be used
 | 
			
		||||
    #   cert: |
 | 
			
		||||
    #     CERT_HERE_IN_PEM
 | 
			
		||||
    #   key: |
 | 
			
		||||
@@ -49,8 +48,7 @@ ingresses:
 | 
			
		||||
    - chart-example.local
 | 
			
		||||
    paths:
 | 
			
		||||
    - path: /
 | 
			
		||||
      pathType: ImplementationSpecific
 | 
			
		||||
      serviceName: owgwui
 | 
			
		||||
      serviceName: ucentralgwui
 | 
			
		||||
      servicePort: http
 | 
			
		||||
 | 
			
		||||
resources: {}
 | 
			
		||||
@@ -71,8 +69,7 @@ tolerations: []
 | 
			
		||||
 | 
			
		||||
affinity: {}
 | 
			
		||||
 | 
			
		||||
podAnnotations: {}
 | 
			
		||||
 | 
			
		||||
# Application
 | 
			
		||||
public_env_variables:
 | 
			
		||||
  REACT_APP_UCENTRALSEC_URL: https://ucentral.dpaas.arilia.com:16001
 | 
			
		||||
  DEFAULT_UCENTRALSEC_URL: https://ucentral.dpaas.arilia.com:16001
 | 
			
		||||
  ALLOW_UCENTRALSEC_CHANGE: false
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										21
									
								
								index.html
									
									
									
									
									
								
							
							
						
						@@ -1,21 +0,0 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html lang="en">
 | 
			
		||||
  <head>
 | 
			
		||||
    <meta charset="utf-8" />
 | 
			
		||||
    <meta name="viewport" content="width=device-width, initial-scale=1" />
 | 
			
		||||
    <title>Controller</title>
 | 
			
		||||
    <meta name="description" content="OpenWiFi Controller App" />
 | 
			
		||||
    <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
 | 
			
		||||
    <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
 | 
			
		||||
    <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
 | 
			
		||||
    <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" />
 | 
			
		||||
    <meta name="msapplication-TileColor" content="#da532c" />
 | 
			
		||||
    <script src="/env-config.js"></script>
 | 
			
		||||
    <meta name="theme-color" content="#000000" />
 | 
			
		||||
  </head>
 | 
			
		||||
  <body>
 | 
			
		||||
    <noscript>You need to enable JavaScript to run this app.</noscript>
 | 
			
		||||
    <div id="root"></div>
 | 
			
		||||
    <script type="module" src="./src/index.tsx"></script>
 | 
			
		||||
  </body>
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										9
									
								
								jsconfig.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,9 @@
 | 
			
		||||
{
 | 
			
		||||
  "compilerOptions": {
 | 
			
		||||
    "baseUrl": "src",
 | 
			
		||||
    "paths": {
 | 
			
		||||
      "*": ["*"]
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "include": ["src"]
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										31161
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
							
								
								
									
										168
									
								
								package.json
									
									
									
									
									
								
							
							
						
						@@ -1,96 +1,92 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "ucentral-client",
 | 
			
		||||
  "version": "2.9.0(23)",
 | 
			
		||||
  "description": "",
 | 
			
		||||
  "private": true,
 | 
			
		||||
  "main": "index.tsx",
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "dev": "vite",
 | 
			
		||||
    "build": "vite build",
 | 
			
		||||
    "format": "prettier --write \"src/**/*x.{ts,tsx,js,jsx}\"",
 | 
			
		||||
    "analyze": "source-map-explorer 'build/static/js/*.js'",
 | 
			
		||||
    "lint": "TIMING=1 eslint \"src/**/*.{ts,tsx,js,jsx}\" --fix",
 | 
			
		||||
    "clean": "rm -rf node_modules && rm -rf build"
 | 
			
		||||
  },
 | 
			
		||||
  "author": "",
 | 
			
		||||
  "license": "ISC",
 | 
			
		||||
  "version": "0.9.14",
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@chakra-ui/icons": "^2.0.11",
 | 
			
		||||
    "@chakra-ui/react": "^2.3.6",
 | 
			
		||||
    "@chakra-ui/theme-tools": "^2.0.12",
 | 
			
		||||
    "@chakra-ui/utils": "^2.0.11",
 | 
			
		||||
    "@emotion/react": "^11.10.4",
 | 
			
		||||
    "@emotion/styled": "^11.10.4",
 | 
			
		||||
    "@fontsource/inter": "^4.5.14",
 | 
			
		||||
    "@googlemaps/react-wrapper": "^1.1.35",
 | 
			
		||||
    "@googlemaps/typescript-guards": "^2.0.3",
 | 
			
		||||
    "@react-spring/web": "^9.5.5",
 | 
			
		||||
    "axios": "^1.1.3",
 | 
			
		||||
    "buffer": "^6.0.3",
 | 
			
		||||
    "chakra-react-select": "^4.3.0",
 | 
			
		||||
    "dagre": "^0.8.5",
 | 
			
		||||
    "formik": "^2.2.9",
 | 
			
		||||
    "fast-equals": "^4.0.3",
 | 
			
		||||
    "framer-motion": "^7.6.1",
 | 
			
		||||
    "i18next": "^22.0.0",
 | 
			
		||||
    "i18next-browser-languagedetector": "^6.1.8",
 | 
			
		||||
    "i18next-http-backend": "^1.4.4",
 | 
			
		||||
    "libphonenumber-js": "^1.10.14",
 | 
			
		||||
    "phosphor-react": "^1.4.1",
 | 
			
		||||
    "prop-types": "^15.8.1",
 | 
			
		||||
    "react": "^18.2.0",
 | 
			
		||||
    "react-app-polyfill": "^3.0.0",
 | 
			
		||||
    "react-chartjs-2": "^4.3.1",
 | 
			
		||||
    "chart.js": "^3.9.1",
 | 
			
		||||
    "react-country-flag": "^3.0.2",
 | 
			
		||||
    "react-csv": "^2.2.2",
 | 
			
		||||
    "react-datepicker": "^4.8.0",
 | 
			
		||||
    "react-dom": "^18.2.0",
 | 
			
		||||
    "@textea/json-viewer": "^2.10.0",
 | 
			
		||||
    "react-fast-compare": "^3.2.0",
 | 
			
		||||
    "react-i18next": "^11.18.6",
 | 
			
		||||
    "react-masonry-css": "^1.0.16",
 | 
			
		||||
    "@tanstack/react-query": "^4.12.0",
 | 
			
		||||
    "react-router-dom": "^6.4.2",
 | 
			
		||||
    "react-table": "^7.8.0",
 | 
			
		||||
    "react-virtualized-auto-sizer": "^1.0.7",
 | 
			
		||||
    "react-window": "^1.8.8",
 | 
			
		||||
    "source-map-explorer": "^2.5.3",
 | 
			
		||||
    "vite": "^3.1.8",
 | 
			
		||||
    "typescript": "^4.8.4",
 | 
			
		||||
    "uuid": "^9.0.0",
 | 
			
		||||
    "yup": "^0.32.11",
 | 
			
		||||
    "zustand": "^4.1.2"
 | 
			
		||||
    "@coreui/coreui": "^3.4.0",
 | 
			
		||||
    "@coreui/icons": "^2.0.1",
 | 
			
		||||
    "@coreui/icons-react": "^1.1.0",
 | 
			
		||||
    "@coreui/react": "^3.4.6",
 | 
			
		||||
    "apexcharts": "^3.27.1",
 | 
			
		||||
    "axios": "^0.21.1",
 | 
			
		||||
    "axios-retry": "^3.1.9",
 | 
			
		||||
    "i18next": "^20.3.1",
 | 
			
		||||
    "i18next-browser-languagedetector": "^6.1.2",
 | 
			
		||||
    "i18next-http-backend": "^1.2.6",
 | 
			
		||||
    "prop-types": "^15.7.2",
 | 
			
		||||
    "react": "^17.0.2",
 | 
			
		||||
    "react-apexcharts": "^1.3.9",
 | 
			
		||||
    "react-dom": "^17.0.2",
 | 
			
		||||
    "react-i18next": "^11.11.0",
 | 
			
		||||
    "react-paginate": "^7.1.3",
 | 
			
		||||
    "react-router-dom": "^5.2.0",
 | 
			
		||||
    "react-widgets": "^5.1.1",
 | 
			
		||||
    "sass": "^1.35.1",
 | 
			
		||||
    "ucentral-libs": "^0.8.7",
 | 
			
		||||
    "uuid": "^8.3.2"
 | 
			
		||||
  },
 | 
			
		||||
  "main": "index.js",
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "start": "webpack serve --config config/webpack.dev.js",
 | 
			
		||||
    "build": "webpack --config config/webpack.prod.js",
 | 
			
		||||
    "format": "prettier --write 'src/**/*.js'",
 | 
			
		||||
    "eslint-fix": "eslint --fix 'src/**/*.js'"
 | 
			
		||||
  },
 | 
			
		||||
  "eslintConfig": {
 | 
			
		||||
    "extends": "react-app"
 | 
			
		||||
  },
 | 
			
		||||
  "husky": {
 | 
			
		||||
    "hooks": {
 | 
			
		||||
      "pre-commit": "lint-staged"
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "lint-staged": {
 | 
			
		||||
    "*.{js,jsx}": [
 | 
			
		||||
      "eslint",
 | 
			
		||||
      "prettier --write"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "@types/google.maps": "^3.51.0",
 | 
			
		||||
    "@types/node": "^18.11.2",
 | 
			
		||||
    "@types/react": "^18.0.21",
 | 
			
		||||
    "@types/react-csv": "^1.1.3",
 | 
			
		||||
    "@types/react-dom": "^18.0.6",
 | 
			
		||||
    "@types/react-table": "^7.7.12",
 | 
			
		||||
    "@types/react-datepicker": "4.8.0",
 | 
			
		||||
    "@types/uuid": "^8.3.4",
 | 
			
		||||
    "@types/react-virtualized-auto-sizer": "^1.0.1",
 | 
			
		||||
    "@types/react-window": "^1.8.5",
 | 
			
		||||
    "eslint": "8.25.0",
 | 
			
		||||
    "vite-tsconfig-paths": "^3.5.1",
 | 
			
		||||
    "lint-staged": "^13.0.3",
 | 
			
		||||
    "@vitejs/plugin-react": "^2.1.0",
 | 
			
		||||
    "vite-plugin-pwa": "^0.13.1",
 | 
			
		||||
    "prettier": "^2.7.1",
 | 
			
		||||
    "eslint-config-airbnb": "^19.0.4",
 | 
			
		||||
    "eslint-config-airbnb-typescript": "^17.0.0",
 | 
			
		||||
    "eslint-config-airbnb-typescript-prettier": "^5.0.0",
 | 
			
		||||
    "eslint-config-prettier": "^8.5.0",
 | 
			
		||||
    "@babel/core": "^7.14.6",
 | 
			
		||||
    "@babel/plugin-proposal-class-properties": "^7.14.5",
 | 
			
		||||
    "@babel/plugin-transform-runtime": "^7.14.5",
 | 
			
		||||
    "@babel/polyfill": "^7.12.1",
 | 
			
		||||
    "@babel/preset-env": "^7.14.7",
 | 
			
		||||
    "@babel/preset-react": "^7.14.5",
 | 
			
		||||
    "@pmmmwh/react-refresh-webpack-plugin": "^0.4.3",
 | 
			
		||||
    "@svgr/webpack": "^5.5.0",
 | 
			
		||||
    "autoprefixer": "^10.2.6",
 | 
			
		||||
    "babel-eslint": "^10.1.0",
 | 
			
		||||
    "babel-loader": "^8.2.2",
 | 
			
		||||
    "clean-webpack-plugin": "^3.0.0",
 | 
			
		||||
    "copy-webpack-plugin": "^7.0.0",
 | 
			
		||||
    "css-loader": "^5.2.6",
 | 
			
		||||
    "css-minimizer-webpack-plugin": "^2.0.0",
 | 
			
		||||
    "dotenv-webpack": "^6.0.4",
 | 
			
		||||
    "eslint": "^7.29.0",
 | 
			
		||||
    "eslint-config-airbnb": "^18.2.1",
 | 
			
		||||
    "eslint-config-prettier": "^7.2.0",
 | 
			
		||||
    "eslint-import-resolver-alias": "^1.1.2",
 | 
			
		||||
    "eslint-loader": "^4.0.2",
 | 
			
		||||
    "eslint-plugin-babel": "^5.3.1",
 | 
			
		||||
    "eslint-plugin-import": "^2.26.0",
 | 
			
		||||
    "eslint-plugin-jsx-a11y": "^6.6.1",
 | 
			
		||||
    "eslint-plugin-no-inline-styles": "^1.0.5",
 | 
			
		||||
    "eslint-plugin-prettier": "^4.2.1",
 | 
			
		||||
    "eslint-plugin-react": "^7.31.10",
 | 
			
		||||
    "eslint-plugin-react-hooks": "^4.6.0"
 | 
			
		||||
    "eslint-plugin-import": "^2.23.4",
 | 
			
		||||
    "eslint-plugin-prettier": "^3.4.0",
 | 
			
		||||
    "eslint-plugin-react": "^7.24.0",
 | 
			
		||||
    "eslint-plugin-react-hooks": "^4.2.0",
 | 
			
		||||
    "html-webpack-plugin": "^5.3.2",
 | 
			
		||||
    "husky": "^4.3.8",
 | 
			
		||||
    "lint-staged": "^11.0.0",
 | 
			
		||||
    "mini-css-extract-plugin": "^1.6.1",
 | 
			
		||||
    "node-sass": "^5.0.0",
 | 
			
		||||
    "path": "^0.12.7",
 | 
			
		||||
    "prettier": "^2.3.2",
 | 
			
		||||
    "react-refresh": "^0.9.0",
 | 
			
		||||
    "sass-loader": "^11.1.1",
 | 
			
		||||
    "style-loader": "^2.0.0",
 | 
			
		||||
    "terser-webpack-plugin": "^5.1.4",
 | 
			
		||||
    "webpack": "^5.40.0",
 | 
			
		||||
    "webpack-cli": "^4.7.2",
 | 
			
		||||
    "webpack-dev-server": "^3.11.2",
 | 
			
		||||
    "webpack-merge": "^5.8.0"
 | 
			
		||||
  },
 | 
			
		||||
  "browserslist": {
 | 
			
		||||
    "production": [
 | 
			
		||||
 
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 12 KiB  | 
| 
		 Before Width: | Height: | Size: 29 KiB  | 
| 
		 Before Width: | Height: | Size: 36 KiB  | 
| 
		 Before Width: | Height: | Size: 11 KiB  | 
@@ -1,9 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<browserconfig>
 | 
			
		||||
    <msapplication>
 | 
			
		||||
        <tile>
 | 
			
		||||
            <square150x150logo src="/mstile-150x150.png"/>
 | 
			
		||||
            <TileColor>#414141</TileColor>
 | 
			
		||||
        </tile>
 | 
			
		||||
    </msapplication>
 | 
			
		||||
</browserconfig>
 | 
			
		||||
							
								
								
									
										4
									
								
								public/config.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,4 @@
 | 
			
		||||
{
 | 
			
		||||
  "DEFAULT_UCENTRALSEC_URL": "https://ucentral.dpaas.arilia.com:16001",
 | 
			
		||||
  "ALLOW_UCENTRALSEC_CHANGE": false
 | 
			
		||||
}
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 104 KiB  | 
| 
		 Before Width: | Height: | Size: 80 KiB  | 
| 
		 Before Width: | Height: | Size: 80 KiB  | 
| 
		 Before Width: | Height: | Size: 75 KiB  | 
| 
		 Before Width: | Height: | Size: 75 KiB  | 
| 
		 Before Width: | Height: | Size: 218 KiB  | 
| 
		 Before Width: | Height: | Size: 158 KiB  | 
| 
		 Before Width: | Height: | Size: 140 KiB  | 
| 
		 Before Width: | Height: | Size: 121 KiB  | 
| 
		 Before Width: | Height: | Size: 44 KiB  | 
| 
		 Before Width: | Height: | Size: 192 KiB  | 
| 
		 Before Width: | Height: | Size: 197 KiB  | 
| 
		 Before Width: | Height: | Size: 50 KiB  | 
| 
		 Before Width: | Height: | Size: 59 KiB  | 
| 
		 Before Width: | Height: | Size: 59 KiB  | 
| 
		 Before Width: | Height: | Size: 51 KiB  | 
| 
		 Before Width: | Height: | Size: 72 KiB  | 
| 
		 Before Width: | Height: | Size: 72 KiB  | 
| 
		 Before Width: | Height: | Size: 34 KiB  | 
| 
		 Before Width: | Height: | Size: 98 KiB  | 
| 
		 Before Width: | Height: | Size: 89 KiB  | 
| 
		 Before Width: | Height: | Size: 89 KiB  | 
| 
		 Before Width: | Height: | Size: 204 KiB  | 
| 
		 Before Width: | Height: | Size: 159 KiB  | 
| 
		 Before Width: | Height: | Size: 159 KiB  | 
| 
		 Before Width: | Height: | Size: 103 KiB  | 
| 
		 Before Width: | Height: | Size: 103 KiB  | 
| 
		 Before Width: | Height: | Size: 103 KiB  | 
| 
		 Before Width: | Height: | Size: 59 KiB  | 
| 
		 Before Width: | Height: | Size: 80 KiB  | 
| 
		 Before Width: | Height: | Size: 80 KiB  | 
| 
		 Before Width: | Height: | Size: 32 KiB  | 
| 
		 Before Width: | Height: | Size: 38 KiB  | 
| 
		 Before Width: | Height: | Size: 47 KiB  | 
| 
		 Before Width: | Height: | Size: 1021 B  | 
| 
		 Before Width: | Height: | Size: 1.9 KiB  | 
| 
		 Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 202 KiB  | 
							
								
								
									
										165
									
								
								public/favicon.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,165 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<!-- Generator: Adobe Illustrator 24.2.3, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
 | 
			
		||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
 | 
			
		||||
	 viewBox="0 0 141.5 185.6" style="enable-background:new 0 0 141.5 185.6;" xml:space="preserve">
 | 
			
		||||
<style type="text/css">
 | 
			
		||||
	.st0{fill:#414141;}
 | 
			
		||||
	.st1{fill:#FFFFFF;}
 | 
			
		||||
	.st2{fill:#FED206;}
 | 
			
		||||
	.st3{fill:#EB6F53;}
 | 
			
		||||
	.st4{fill:#3BA9B6;}
 | 
			
		||||
</style>
 | 
			
		||||
<g>
 | 
			
		||||
	<g>
 | 
			
		||||
		<path class="st0" d="M120.7,183.9H21.5c-10.8,0-19.5-8.7-19.5-19.5V20.5c0-10.8,8.7-19.5,19.5-19.5h99.2
 | 
			
		||||
			c10.8,0,19.5,8.7,19.5,19.5v143.9C140.2,175.2,131.5,183.9,120.7,183.9z"/>
 | 
			
		||||
		<g>
 | 
			
		||||
			<g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M46.3,166.2v-3.4h-1.2v-0.6h3.1v0.6H47v3.4H46.3z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M49,166.2v-4h2.7v0.6h-2v1h2v0.6h-2v1.1h2v0.6H49z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M52.6,166.2v-4h0.7v3.4h1.8v0.6H52.6z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M55.7,166.2v-4h2.7v0.6h-2v1h2v0.6h-2v1.1h2v0.6H55.7z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M59.1,164.2c0-1.2,0.9-2.1,2.1-2.1c0.8,0,1.3,0.4,1.6,0.9l-0.6,0.3c-0.2-0.3-0.6-0.6-1-0.6
 | 
			
		||||
						c-0.8,0-1.4,0.6-1.4,1.4c0,0.8,0.6,1.4,1.4,1.4c0.4,0,0.8-0.3,1-0.6l0.6,0.3c-0.3,0.5-0.8,0.9-1.6,0.9
 | 
			
		||||
						C60,166.3,59.1,165.5,59.1,164.2z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M63.2,164.2c0-1.2,0.8-2.1,2-2.1c1.2,0,2,0.9,2,2.1c0,1.2-0.8,2.1-2,2.1C64,166.3,63.2,165.4,63.2,164.2z
 | 
			
		||||
						 M66.5,164.2c0-0.8-0.5-1.4-1.3-1.4c-0.8,0-1.3,0.6-1.3,1.4c0,0.8,0.5,1.4,1.3,1.4C66,165.7,66.5,165,66.5,164.2z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M71.3,166.2v-3.1l-1.2,3.1h-0.3l-1.2-3.1v3.1h-0.7v-4h1l1.1,2.7l1.1-2.7h1v4H71.3z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M75.7,166.2v-4h0.7v4H75.7z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M80.4,166.2l-2.1-2.8v2.8h-0.7v-4h0.7l2,2.8v-2.8h0.7v4H80.4z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M82.3,166.2v-4H85v0.6h-2v1h2v0.6h-2v1.7H82.3z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M87.9,166.2l-0.9-1.5h-0.7v1.5h-0.7v-4h1.7c0.8,0,1.3,0.5,1.3,1.2c0,0.7-0.5,1.1-0.9,1.2l1,1.6H87.9z
 | 
			
		||||
						 M88,163.5c0-0.4-0.3-0.6-0.7-0.6h-1v1.3h1C87.7,164.1,88,163.9,88,163.5z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M92.4,166.2l-0.3-0.8h-1.8l-0.3,0.8h-0.8l1.6-4h0.9l1.6,4H92.4z M91.2,162.9l-0.7,1.9h1.4L91.2,162.9z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M95.8,166.2v-4h1.5c0.8,0,1.2,0.5,1.2,1.2c0,0.6-0.4,1.2-1.2,1.2h-1.2v1.7H95.8z M98.2,163.4
 | 
			
		||||
						c0-0.5-0.3-0.9-0.9-0.9h-1.1v1.7h1.1C97.8,164.3,98.2,163.9,98.2,163.4z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M101.5,166.2l-1.1-1.6h-0.9v1.6h-0.3v-4h1.5c0.7,0,1.2,0.4,1.2,1.2c0,0.7-0.5,1.1-1.1,1.1l1.2,1.7H101.5z
 | 
			
		||||
						 M101.6,163.4c0-0.5-0.4-0.9-0.9-0.9h-1.1v1.7h1.1C101.2,164.3,101.6,163.9,101.6,163.4z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M102.8,164.2c0-1.2,0.8-2.1,1.9-2.1c1.2,0,1.9,0.9,1.9,2.1c0,1.2-0.8,2.1-1.9,2.1
 | 
			
		||||
						C103.6,166.3,102.8,165.4,102.8,164.2z M106.3,164.2c0-1-0.6-1.7-1.6-1.7c-1,0-1.6,0.7-1.6,1.7c0,1,0.6,1.7,1.6,1.7
 | 
			
		||||
						C105.7,166,106.3,165.2,106.3,164.2z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M106.9,165.8l0.2-0.3c0.2,0.2,0.4,0.4,0.8,0.4c0.5,0,0.9-0.4,0.9-0.9v-2.8h0.3v2.8c0,0.8-0.5,1.2-1.2,1.2
 | 
			
		||||
						C107.5,166.3,107.2,166.1,106.9,165.8z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M110.4,166.2v-4h2.5v0.3h-2.2v1.5h2.1v0.3h-2.1v1.6h2.2v0.3H110.4z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M113.5,164.2c0-1.2,0.9-2.1,2-2.1c0.6,0,1.1,0.3,1.5,0.7l-0.3,0.2c-0.3-0.3-0.7-0.6-1.2-0.6
 | 
			
		||||
						c-0.9,0-1.7,0.7-1.7,1.7c0,1,0.7,1.7,1.7,1.7c0.5,0,0.9-0.2,1.2-0.6l0.3,0.2c-0.4,0.4-0.8,0.7-1.5,0.7
 | 
			
		||||
						C114.4,166.3,113.5,165.5,113.5,164.2z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M118.7,166.2v-3.7h-1.3v-0.3h2.9v0.3H119v3.7H118.7z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
			</g>
 | 
			
		||||
			<g>
 | 
			
		||||
				<polygon class="st1" points="26.3,163.8 31.6,158.5 36.9,163.8 37.7,163.8 31.6,157.6 25.5,163.8 				"/>
 | 
			
		||||
				<polygon class="st1" points="36.9,164.7 31.6,170 26.3,164.7 25.5,164.7 31.6,170.8 37.7,164.7 				"/>
 | 
			
		||||
				<polygon class="st1" points="31,163.8 36.3,158.5 41.6,163.8 42.5,163.8 36.3,157.6 30.2,163.8 				"/>
 | 
			
		||||
				<polygon class="st1" points="41.6,164.7 36.3,170 31,164.7 30.2,164.7 36.3,170.8 42.5,164.7 				"/>
 | 
			
		||||
			</g>
 | 
			
		||||
		</g>
 | 
			
		||||
		<g>
 | 
			
		||||
			<path class="st1" d="M33.2,100.7c-4.6,0-8.3,3.7-8.3,8.3s3.7,8.3,8.3,8.3s8.3-3.7,8.3-8.3S37.8,100.7,33.2,100.7z"/>
 | 
			
		||||
		</g>
 | 
			
		||||
		<g>
 | 
			
		||||
			<g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st2" d="M33.2,35.2c40.7,0,73.8,33.1,73.8,73.8c0,0.7,0,1.4,0,2.1c0,1.7,0.6,3.3,1.7,4.6c1.2,1.2,2.8,1.9,4.5,2
 | 
			
		||||
						l0.2,0c3.5,0,6.3-2.7,6.4-6.2c0-0.8,0-1.7,0-2.5c0-47.7-38.8-86.6-86.6-86.6c-0.8,0-1.7,0-2.5,0c-1.7,0-3.3,0.8-4.5,2
 | 
			
		||||
						c-1.2,1.2-1.8,2.9-1.7,4.6c0.1,3.5,3,6.3,6.6,6.2C31.8,35.2,32.5,35.2,33.2,35.2z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
			</g>
 | 
			
		||||
		</g>
 | 
			
		||||
		<g>
 | 
			
		||||
			<g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st3" d="M33.2,60.5c26.7,0,48.5,21.7,48.5,48.5c0,0.6,0,1.3,0,2c-0.1,1.7,0.5,3.3,1.7,4.6c1.2,1.3,2.7,2,4.4,2.1
 | 
			
		||||
						c1.7,0.1,3.3-0.5,4.6-1.7c1.2-1.2,2-2.7,2-4.4c0-0.9,0.1-1.8,0.1-2.6c0-33.8-27.5-61.2-61.2-61.2c-0.8,0-1.6,0-2.6,0.1
 | 
			
		||||
						c-1.7,0.1-3.3,0.8-4.4,2.1c-1.2,1.3-1.8,2.9-1.7,4.6s0.8,3.3,2.1,4.4c1.3,1.2,2.9,1.8,4.6,1.7C31.9,60.5,32.6,60.5,33.2,60.5z"
 | 
			
		||||
						/>
 | 
			
		||||
				</g>
 | 
			
		||||
			</g>
 | 
			
		||||
		</g>
 | 
			
		||||
		<g>
 | 
			
		||||
			<g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st4" d="M33.2,86.7c12.3,0,22.3,10,22.3,22.3c0,0.5,0,1.1-0.1,1.8c-0.3,3.5,2.3,6.6,5.8,6.9
 | 
			
		||||
						c3.5,0.3,6.6-2.3,6.9-5.8c0.1-1,0.1-1.9,0.1-2.8c0-19.3-15.7-35.1-35.1-35.1c-0.9,0-1.8,0-2.8,0.1c-1.7,0.1-3.2,0.9-4.3,2.2
 | 
			
		||||
						c-1.1,1.3-1.6,2.9-1.5,4.6c0.1,1.7,0.9,3.2,2.2,4.3c1.3,1.1,2.9,1.6,4.6,1.5C32.1,86.7,32.7,86.7,33.2,86.7z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
			</g>
 | 
			
		||||
		</g>
 | 
			
		||||
	</g>
 | 
			
		||||
	<g>
 | 
			
		||||
		<path class="st1" d="M35.8,130.4c1.1,0.6,2.1,1.5,2.7,2.6c0.7,1.1,1,2.3,1,3.7s-0.3,2.6-1,3.7c-0.7,1.1-1.6,2-2.7,2.6
 | 
			
		||||
			c-1.1,0.6-2.4,1-3.8,1s-2.7-0.3-3.8-1c-1.1-0.6-2.1-1.5-2.7-2.6c-0.7-1.1-1-2.3-1-3.7c0-1.3,0.3-2.6,1-3.7c0.7-1.1,1.6-2,2.7-2.6
 | 
			
		||||
			c1.1-0.6,2.4-0.9,3.8-0.9C33.4,129.5,34.7,129.8,35.8,130.4z M29.9,132.9c-0.7,0.4-1.2,0.9-1.6,1.6s-0.6,1.4-0.6,2.2
 | 
			
		||||
			c0,0.8,0.2,1.6,0.6,2.3c0.4,0.7,0.9,1.2,1.6,1.6c0.7,0.4,1.4,0.6,2.1,0.6c0.8,0,1.5-0.2,2.1-0.6c0.6-0.4,1.2-0.9,1.5-1.6
 | 
			
		||||
			c0.4-0.7,0.6-1.4,0.6-2.3c0-0.8-0.2-1.6-0.6-2.2s-0.9-1.2-1.5-1.6c-0.6-0.4-1.4-0.6-2.1-0.6C31.3,132.3,30.6,132.5,29.9,132.9z"/>
 | 
			
		||||
		<path class="st1" d="M50.6,133.6c0.8,0.5,1.4,1.1,1.8,2c0.4,0.8,0.6,1.8,0.6,2.9c0,1.1-0.2,2-0.6,2.8c-0.4,0.8-1,1.5-1.8,1.9
 | 
			
		||||
			c-0.8,0.5-1.6,0.7-2.6,0.7c-0.7,0-1.4-0.1-2-0.4s-1.1-0.7-1.5-1.2v5.4h-3.1V133h3.1v1.6c0.4-0.5,0.9-1,1.4-1.2s1.2-0.4,2-0.4
 | 
			
		||||
			C48.9,132.9,49.8,133.1,50.6,133.6z M49.1,140.5c0.5-0.6,0.7-1.3,0.7-2.2c0-0.9-0.2-1.6-0.7-2.1c-0.5-0.6-1.1-0.8-1.9-0.8
 | 
			
		||||
			s-1.4,0.3-1.9,0.8c-0.5,0.6-0.8,1.3-0.8,2.1c0,0.9,0.2,1.6,0.8,2.2s1.1,0.8,1.9,0.8S48.6,141,49.1,140.5z"/>
 | 
			
		||||
		<path class="st1" d="M63.4,134.4c0.9,1,1.4,2.4,1.4,4.2c0,0.3,0,0.6,0,0.7H57c0.2,0.7,0.5,1.2,1,1.6c0.5,0.4,1.1,0.6,1.8,0.6
 | 
			
		||||
			c0.5,0,1-0.1,1.5-0.3s0.9-0.5,1.3-0.9l1.6,1.6c-0.5,0.6-1.2,1.1-2,1.4c-0.8,0.3-1.6,0.5-2.6,0.5c-1.1,0-2.1-0.2-3-0.7
 | 
			
		||||
			s-1.5-1.1-2-1.9c-0.5-0.8-0.7-1.8-0.7-2.9c0-1.1,0.2-2.1,0.7-2.9s1.1-1.5,2-1.9c0.8-0.5,1.8-0.7,2.9-0.7
 | 
			
		||||
			C61.2,132.9,62.5,133.4,63.4,134.4z M61.8,137.5c0-0.7-0.3-1.3-0.7-1.7s-1-0.6-1.7-0.6c-0.7,0-1.2,0.2-1.7,0.6
 | 
			
		||||
			c-0.4,0.4-0.7,1-0.9,1.7H61.8z"/>
 | 
			
		||||
		<path class="st1" d="M76.2,134c0.7,0.7,1.1,1.7,1.1,3v6.8h-3.1v-5.9c0-0.7-0.2-1.2-0.6-1.6s-0.9-0.6-1.5-0.6
 | 
			
		||||
			c-0.8,0-1.4,0.3-1.8,0.8c-0.4,0.5-0.7,1.2-0.7,2v5.3h-3.1V133h3.1v1.9c0.7-1.3,2-2,3.7-2C74.6,132.8,75.5,133.2,76.2,134z"/>
 | 
			
		||||
		<path class="st1" d="M96,129.7h3.3l-4.7,14h-3.3l-2.9-10.1l-3,10.1h-3.2l-4.7-14h3.4l3,10.7l3-10.7H90l3.1,10.7L96,129.7z"/>
 | 
			
		||||
		<path class="st1" d="M103.3,128.7c0.3,0.3,0.5,0.7,0.5,1.2s-0.2,0.9-0.5,1.2c-0.3,0.3-0.7,0.5-1.2,0.5c-0.5,0-0.9-0.2-1.2-0.5
 | 
			
		||||
			c-0.3-0.3-0.5-0.7-0.5-1.2c0-0.5,0.2-0.9,0.5-1.2c0.3-0.3,0.7-0.5,1.2-0.5C102.6,128.2,103,128.3,103.3,128.7z M100.6,133h3.1
 | 
			
		||||
			v10.8h-3.1V133z"/>
 | 
			
		||||
		<path class="st1" d="M106.5,129.7h10.1l0,2.6h-6.9v3.4h6.3v2.6h-6.3v5.3h-3.2V129.7z"/>
 | 
			
		||||
		<path class="st1" d="M120.9,128.7c0.3,0.3,0.5,0.7,0.5,1.2s-0.2,0.9-0.5,1.2c-0.3,0.3-0.7,0.5-1.2,0.5c-0.5,0-0.9-0.2-1.2-0.5
 | 
			
		||||
			c-0.3-0.3-0.5-0.7-0.5-1.2c0-0.5,0.2-0.9,0.5-1.2c0.3-0.3,0.7-0.5,1.2-0.5C120.1,128.2,120.5,128.3,120.9,128.7z M118.1,133h3.1
 | 
			
		||||
			v10.8h-3.1V133z"/>
 | 
			
		||||
	</g>
 | 
			
		||||
</g>
 | 
			
		||||
<g>
 | 
			
		||||
</g>
 | 
			
		||||
<g>
 | 
			
		||||
</g>
 | 
			
		||||
<g>
 | 
			
		||||
</g>
 | 
			
		||||
<g>
 | 
			
		||||
</g>
 | 
			
		||||
<g>
 | 
			
		||||
</g>
 | 
			
		||||
<g>
 | 
			
		||||
</g>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 8.0 KiB  | 
							
								
								
									
										14
									
								
								public/index.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,14 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html lang="en">
 | 
			
		||||
  <head>
 | 
			
		||||
    <meta charset="utf-8" />
 | 
			
		||||
    <link rel="icon" href="favicon.ico" />
 | 
			
		||||
    <meta name="viewport" content="width=device-width, initial-scale=1" />
 | 
			
		||||
    <meta name="theme-color" content="#000000" />
 | 
			
		||||
    <title>uCentralGW</title>
 | 
			
		||||
  </head>
 | 
			
		||||
  <body>
 | 
			
		||||
    <noscript>You need to enable JavaScript to run this app.</noscript>
 | 
			
		||||
    <div id="root"></div>
 | 
			
		||||
  </body>
 | 
			
		||||
</html>
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 9.9 KiB  | 
@@ -1,38 +0,0 @@
 | 
			
		||||
<?xml version="1.0" standalone="no"?>
 | 
			
		||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
 | 
			
		||||
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 | 
			
		||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
 | 
			
		||||
 width="744.000000pt" height="744.000000pt" viewBox="0 0 744.000000 744.000000"
 | 
			
		||||
 preserveAspectRatio="xMidYMid meet">
 | 
			
		||||
<metadata>
 | 
			
		||||
Created by potrace 1.14, written by Peter Selinger 2001-2017
 | 
			
		||||
</metadata>
 | 
			
		||||
<g transform="translate(0.000000,744.000000) scale(0.100000,-0.100000)"
 | 
			
		||||
fill="#000000" stroke="none">
 | 
			
		||||
<path d="M1827 7404 c-2 -2 -50 -6 -108 -8 -57 -3 -120 -10 -139 -15 -19 -6
 | 
			
		||||
-56 -16 -82 -22 -27 -7 -48 -16 -48 -20 0 -4 -14 -10 -30 -14 -17 -4 -36 -12
 | 
			
		||||
-43 -18 -7 -7 -28 -21 -46 -31 -115 -64 -247 -224 -304 -366 -59 -150 -55 65
 | 
			
		||||
-56 -3180 0 -3270 -5 -3017 60 -3178 92 -232 303 -410 546 -463 32 -7 65 -14
 | 
			
		||||
73 -16 22 -5 4127 -3 4180 2 77 7 279 77 300 104 3 3 25 19 50 35 56 37 135
 | 
			
		||||
116 180 181 19 28 38 52 43 53 4 2 5 7 2 12 -3 4 2 13 10 20 8 7 15 21 15 31
 | 
			
		||||
0 10 4 20 9 23 8 6 39 91 47 131 2 11 7 31 11 45 4 14 8 1364 9 3000 2 3142 3
 | 
			
		||||
3032 -42 3165 -43 130 -131 255 -245 350 -33 28 -123 90 -127 87 -1 -1 -16 5
 | 
			
		||||
-34 14 -35 18 -128 50 -173 59 -30 6 -187 18 -215 16 -57 -3 -122 -1 -129 4
 | 
			
		||||
-5 3 -11 1 -13 -4 -1 -5 -23 -6 -48 -2 -25 4 -58 4 -75 1 -16 -3 -49 -3 -72 1
 | 
			
		||||
-23 3 -44 2 -45 -2 -2 -4 -23 -4 -48 0 -25 4 -58 4 -75 1 -16 -3 -49 -3 -72 1
 | 
			
		||||
-23 3 -44 2 -45 -2 -2 -4 -23 -4 -48 0 -25 4 -58 4 -75 1 -16 -3 -49 -3 -72 1
 | 
			
		||||
-23 3 -44 2 -45 -2 -2 -4 -23 -4 -48 0 -25 4 -58 4 -75 1 -16 -3 -49 -3 -72 1
 | 
			
		||||
-23 3 -44 2 -45 -2 -2 -4 -23 -4 -48 0 -25 4 -58 4 -75 1 -16 -3 -49 -3 -72 1
 | 
			
		||||
-23 3 -44 2 -45 -2 -2 -4 -23 -4 -48 0 -25 4 -58 4 -75 1 -16 -3 -49 -3 -72 1
 | 
			
		||||
-23 3 -44 2 -45 -2 -2 -4 -23 -4 -48 0 -25 4 -58 4 -75 1 -16 -3 -49 -3 -72 1
 | 
			
		||||
-23 3 -44 2 -45 -2 -2 -4 -23 -4 -48 0 -25 4 -58 4 -75 1 -16 -3 -49 -3 -72 1
 | 
			
		||||
-23 3 -44 2 -45 -2 -2 -4 -23 -4 -48 0 -25 4 -58 4 -75 1 -16 -3 -49 -3 -72 1
 | 
			
		||||
-23 3 -44 2 -45 -2 -2 -4 -23 -4 -48 0 -25 4 -58 4 -75 1 -16 -3 -49 -3 -72 1
 | 
			
		||||
-23 3 -44 2 -45 -2 -2 -4 -23 -4 -48 0 -25 4 -58 4 -75 1 -16 -3 -49 -3 -72 1
 | 
			
		||||
-23 3 -44 2 -45 -2 -2 -4 -23 -4 -48 0 -25 4 -58 4 -75 1 -16 -3 -49 -3 -72 1
 | 
			
		||||
-23 3 -44 2 -45 -2 -2 -4 -23 -4 -48 0 -25 4 -58 4 -75 1 -16 -3 -49 -3 -72 1
 | 
			
		||||
-23 3 -44 2 -45 -2 -2 -4 -23 -4 -48 0 -25 4 -58 4 -75 1 -16 -3 -49 -3 -72 1
 | 
			
		||||
-23 3 -44 2 -45 -2 -2 -4 -23 -4 -48 0 -25 4 -58 4 -75 1 -16 -3 -49 -3 -72 1
 | 
			
		||||
-23 3 -44 2 -45 -2 -2 -4 -24 -4 -50 0 -27 5 -49 6 -51 5z"/>
 | 
			
		||||
</g>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 2.3 KiB  | 
							
								
								
									
										33
									
								
								src/App.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,33 @@
 | 
			
		||||
import React from 'react';
 | 
			
		||||
import { HashRouter, Switch } from 'react-router-dom';
 | 
			
		||||
import 'scss/style.scss';
 | 
			
		||||
import Router from 'router';
 | 
			
		||||
import { AuthProvider } from 'contexts/AuthProvider';
 | 
			
		||||
import { checkIfJson } from 'utils/helper';
 | 
			
		||||
 | 
			
		||||
const loading = (
 | 
			
		||||
  <div className="pt-3 text-center">
 | 
			
		||||
    <div className="sk-spinner sk-spinner-pulse" />
 | 
			
		||||
  </div>
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
const App = () => {
 | 
			
		||||
  const storageToken = sessionStorage.getItem('access_token');
 | 
			
		||||
  const apiEndpoints = checkIfJson(sessionStorage.getItem('gateway_endpoints'))
 | 
			
		||||
    ? JSON.parse(sessionStorage.getItem('gateway_endpoints'))
 | 
			
		||||
    : {};
 | 
			
		||||
 | 
			
		||||
  return (
 | 
			
		||||
    <AuthProvider token={storageToken ?? ''} apiEndpoints={apiEndpoints}>
 | 
			
		||||
      <HashRouter>
 | 
			
		||||
        <React.Suspense fallback={loading}>
 | 
			
		||||
          <Switch>
 | 
			
		||||
            <Router />
 | 
			
		||||
          </Switch>
 | 
			
		||||
        </React.Suspense>
 | 
			
		||||
      </HashRouter>
 | 
			
		||||
    </AuthProvider>
 | 
			
		||||
  );
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export default App;
 | 
			
		||||
							
								
								
									
										45
									
								
								src/App.tsx
									
									
									
									
									
								
							
							
						
						@@ -1,45 +0,0 @@
 | 
			
		||||
import React, { Suspense } from 'react';
 | 
			
		||||
import { Spinner } from '@chakra-ui/react';
 | 
			
		||||
import { QueryClientProvider, QueryClient } from '@tanstack/react-query';
 | 
			
		||||
import { HashRouter } from 'react-router-dom';
 | 
			
		||||
import { AuthProvider } from 'contexts/AuthProvider';
 | 
			
		||||
import { ControllerSocketProvider } from 'contexts/ControllerSocketProvider';
 | 
			
		||||
import { FirmwareSocketProvider } from 'contexts/FirmwareSocketProvider';
 | 
			
		||||
import { ProvisioningSocketProvider } from 'contexts/ProvisioningSocketProvider';
 | 
			
		||||
import { SecuritySocketProvider } from 'contexts/SecuritySocketProvider';
 | 
			
		||||
import Router from 'router';
 | 
			
		||||
 | 
			
		||||
const queryClient = new QueryClient({
 | 
			
		||||
  defaultOptions: {
 | 
			
		||||
    queries: {
 | 
			
		||||
      retry: 0,
 | 
			
		||||
      refetchOnWindowFocus: false,
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
const App = () => {
 | 
			
		||||
  const storageToken = localStorage.getItem('access_token') ?? sessionStorage.getItem('access_token');
 | 
			
		||||
 | 
			
		||||
  return (
 | 
			
		||||
    <QueryClientProvider client={queryClient}>
 | 
			
		||||
      <HashRouter>
 | 
			
		||||
        <Suspense fallback={<Spinner />}>
 | 
			
		||||
          <AuthProvider token={storageToken !== null ? storageToken : undefined}>
 | 
			
		||||
            <SecuritySocketProvider>
 | 
			
		||||
              <FirmwareSocketProvider>
 | 
			
		||||
                <ProvisioningSocketProvider>
 | 
			
		||||
                  <ControllerSocketProvider>
 | 
			
		||||
                    <Router />
 | 
			
		||||
                  </ControllerSocketProvider>
 | 
			
		||||
                </ProvisioningSocketProvider>
 | 
			
		||||
              </FirmwareSocketProvider>
 | 
			
		||||
            </SecuritySocketProvider>
 | 
			
		||||
          </AuthProvider>
 | 
			
		||||
        </Suspense>
 | 
			
		||||
      </HashRouter>
 | 
			
		||||
    </QueryClientProvider>
 | 
			
		||||
  );
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export default App;
 | 
			
		||||
							
								
								
									
										165
									
								
								src/assets/OpenWiFi_BadgeLogo_DarkGrey.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,165 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<!-- Generator: Adobe Illustrator 24.2.3, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
 | 
			
		||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
 | 
			
		||||
	 viewBox="0 0 141.5 185.6" style="enable-background:new 0 0 141.5 185.6;" xml:space="preserve">
 | 
			
		||||
<style type="text/css">
 | 
			
		||||
	.st0{fill:#414141;}
 | 
			
		||||
	.st1{fill:#FFFFFF;}
 | 
			
		||||
	.st2{fill:#FED206;}
 | 
			
		||||
	.st3{fill:#EB6F53;}
 | 
			
		||||
	.st4{fill:#3BA9B6;}
 | 
			
		||||
</style>
 | 
			
		||||
<g>
 | 
			
		||||
	<g>
 | 
			
		||||
		<path class="st0" d="M120.7,183.9H21.5c-10.8,0-19.5-8.7-19.5-19.5V20.5c0-10.8,8.7-19.5,19.5-19.5h99.2
 | 
			
		||||
			c10.8,0,19.5,8.7,19.5,19.5v143.9C140.2,175.2,131.5,183.9,120.7,183.9z"/>
 | 
			
		||||
		<g>
 | 
			
		||||
			<g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M46.3,166.2v-3.4h-1.2v-0.6h3.1v0.6H47v3.4H46.3z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M49,166.2v-4h2.7v0.6h-2v1h2v0.6h-2v1.1h2v0.6H49z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M52.6,166.2v-4h0.7v3.4h1.8v0.6H52.6z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M55.7,166.2v-4h2.7v0.6h-2v1h2v0.6h-2v1.1h2v0.6H55.7z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M59.1,164.2c0-1.2,0.9-2.1,2.1-2.1c0.8,0,1.3,0.4,1.6,0.9l-0.6,0.3c-0.2-0.3-0.6-0.6-1-0.6
 | 
			
		||||
						c-0.8,0-1.4,0.6-1.4,1.4c0,0.8,0.6,1.4,1.4,1.4c0.4,0,0.8-0.3,1-0.6l0.6,0.3c-0.3,0.5-0.8,0.9-1.6,0.9
 | 
			
		||||
						C60,166.3,59.1,165.5,59.1,164.2z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M63.2,164.2c0-1.2,0.8-2.1,2-2.1c1.2,0,2,0.9,2,2.1c0,1.2-0.8,2.1-2,2.1C64,166.3,63.2,165.4,63.2,164.2z
 | 
			
		||||
						 M66.5,164.2c0-0.8-0.5-1.4-1.3-1.4c-0.8,0-1.3,0.6-1.3,1.4c0,0.8,0.5,1.4,1.3,1.4C66,165.7,66.5,165,66.5,164.2z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M71.3,166.2v-3.1l-1.2,3.1h-0.3l-1.2-3.1v3.1h-0.7v-4h1l1.1,2.7l1.1-2.7h1v4H71.3z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M75.7,166.2v-4h0.7v4H75.7z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M80.4,166.2l-2.1-2.8v2.8h-0.7v-4h0.7l2,2.8v-2.8h0.7v4H80.4z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M82.3,166.2v-4H85v0.6h-2v1h2v0.6h-2v1.7H82.3z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M87.9,166.2l-0.9-1.5h-0.7v1.5h-0.7v-4h1.7c0.8,0,1.3,0.5,1.3,1.2c0,0.7-0.5,1.1-0.9,1.2l1,1.6H87.9z
 | 
			
		||||
						 M88,163.5c0-0.4-0.3-0.6-0.7-0.6h-1v1.3h1C87.7,164.1,88,163.9,88,163.5z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M92.4,166.2l-0.3-0.8h-1.8l-0.3,0.8h-0.8l1.6-4h0.9l1.6,4H92.4z M91.2,162.9l-0.7,1.9h1.4L91.2,162.9z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M95.8,166.2v-4h1.5c0.8,0,1.2,0.5,1.2,1.2c0,0.6-0.4,1.2-1.2,1.2h-1.2v1.7H95.8z M98.2,163.4
 | 
			
		||||
						c0-0.5-0.3-0.9-0.9-0.9h-1.1v1.7h1.1C97.8,164.3,98.2,163.9,98.2,163.4z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M101.5,166.2l-1.1-1.6h-0.9v1.6h-0.3v-4h1.5c0.7,0,1.2,0.4,1.2,1.2c0,0.7-0.5,1.1-1.1,1.1l1.2,1.7H101.5z
 | 
			
		||||
						 M101.6,163.4c0-0.5-0.4-0.9-0.9-0.9h-1.1v1.7h1.1C101.2,164.3,101.6,163.9,101.6,163.4z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M102.8,164.2c0-1.2,0.8-2.1,1.9-2.1c1.2,0,1.9,0.9,1.9,2.1c0,1.2-0.8,2.1-1.9,2.1
 | 
			
		||||
						C103.6,166.3,102.8,165.4,102.8,164.2z M106.3,164.2c0-1-0.6-1.7-1.6-1.7c-1,0-1.6,0.7-1.6,1.7c0,1,0.6,1.7,1.6,1.7
 | 
			
		||||
						C105.7,166,106.3,165.2,106.3,164.2z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M106.9,165.8l0.2-0.3c0.2,0.2,0.4,0.4,0.8,0.4c0.5,0,0.9-0.4,0.9-0.9v-2.8h0.3v2.8c0,0.8-0.5,1.2-1.2,1.2
 | 
			
		||||
						C107.5,166.3,107.2,166.1,106.9,165.8z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M110.4,166.2v-4h2.5v0.3h-2.2v1.5h2.1v0.3h-2.1v1.6h2.2v0.3H110.4z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M113.5,164.2c0-1.2,0.9-2.1,2-2.1c0.6,0,1.1,0.3,1.5,0.7l-0.3,0.2c-0.3-0.3-0.7-0.6-1.2-0.6
 | 
			
		||||
						c-0.9,0-1.7,0.7-1.7,1.7c0,1,0.7,1.7,1.7,1.7c0.5,0,0.9-0.2,1.2-0.6l0.3,0.2c-0.4,0.4-0.8,0.7-1.5,0.7
 | 
			
		||||
						C114.4,166.3,113.5,165.5,113.5,164.2z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st1" d="M118.7,166.2v-3.7h-1.3v-0.3h2.9v0.3H119v3.7H118.7z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
			</g>
 | 
			
		||||
			<g>
 | 
			
		||||
				<polygon class="st1" points="26.3,163.8 31.6,158.5 36.9,163.8 37.7,163.8 31.6,157.6 25.5,163.8 				"/>
 | 
			
		||||
				<polygon class="st1" points="36.9,164.7 31.6,170 26.3,164.7 25.5,164.7 31.6,170.8 37.7,164.7 				"/>
 | 
			
		||||
				<polygon class="st1" points="31,163.8 36.3,158.5 41.6,163.8 42.5,163.8 36.3,157.6 30.2,163.8 				"/>
 | 
			
		||||
				<polygon class="st1" points="41.6,164.7 36.3,170 31,164.7 30.2,164.7 36.3,170.8 42.5,164.7 				"/>
 | 
			
		||||
			</g>
 | 
			
		||||
		</g>
 | 
			
		||||
		<g>
 | 
			
		||||
			<path class="st1" d="M33.2,100.7c-4.6,0-8.3,3.7-8.3,8.3s3.7,8.3,8.3,8.3s8.3-3.7,8.3-8.3S37.8,100.7,33.2,100.7z"/>
 | 
			
		||||
		</g>
 | 
			
		||||
		<g>
 | 
			
		||||
			<g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st2" d="M33.2,35.2c40.7,0,73.8,33.1,73.8,73.8c0,0.7,0,1.4,0,2.1c0,1.7,0.6,3.3,1.7,4.6c1.2,1.2,2.8,1.9,4.5,2
 | 
			
		||||
						l0.2,0c3.5,0,6.3-2.7,6.4-6.2c0-0.8,0-1.7,0-2.5c0-47.7-38.8-86.6-86.6-86.6c-0.8,0-1.7,0-2.5,0c-1.7,0-3.3,0.8-4.5,2
 | 
			
		||||
						c-1.2,1.2-1.8,2.9-1.7,4.6c0.1,3.5,3,6.3,6.6,6.2C31.8,35.2,32.5,35.2,33.2,35.2z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
			</g>
 | 
			
		||||
		</g>
 | 
			
		||||
		<g>
 | 
			
		||||
			<g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st3" d="M33.2,60.5c26.7,0,48.5,21.7,48.5,48.5c0,0.6,0,1.3,0,2c-0.1,1.7,0.5,3.3,1.7,4.6c1.2,1.3,2.7,2,4.4,2.1
 | 
			
		||||
						c1.7,0.1,3.3-0.5,4.6-1.7c1.2-1.2,2-2.7,2-4.4c0-0.9,0.1-1.8,0.1-2.6c0-33.8-27.5-61.2-61.2-61.2c-0.8,0-1.6,0-2.6,0.1
 | 
			
		||||
						c-1.7,0.1-3.3,0.8-4.4,2.1c-1.2,1.3-1.8,2.9-1.7,4.6s0.8,3.3,2.1,4.4c1.3,1.2,2.9,1.8,4.6,1.7C31.9,60.5,32.6,60.5,33.2,60.5z"
 | 
			
		||||
						/>
 | 
			
		||||
				</g>
 | 
			
		||||
			</g>
 | 
			
		||||
		</g>
 | 
			
		||||
		<g>
 | 
			
		||||
			<g>
 | 
			
		||||
				<g>
 | 
			
		||||
					<path class="st4" d="M33.2,86.7c12.3,0,22.3,10,22.3,22.3c0,0.5,0,1.1-0.1,1.8c-0.3,3.5,2.3,6.6,5.8,6.9
 | 
			
		||||
						c3.5,0.3,6.6-2.3,6.9-5.8c0.1-1,0.1-1.9,0.1-2.8c0-19.3-15.7-35.1-35.1-35.1c-0.9,0-1.8,0-2.8,0.1c-1.7,0.1-3.2,0.9-4.3,2.2
 | 
			
		||||
						c-1.1,1.3-1.6,2.9-1.5,4.6c0.1,1.7,0.9,3.2,2.2,4.3c1.3,1.1,2.9,1.6,4.6,1.5C32.1,86.7,32.7,86.7,33.2,86.7z"/>
 | 
			
		||||
				</g>
 | 
			
		||||
			</g>
 | 
			
		||||
		</g>
 | 
			
		||||
	</g>
 | 
			
		||||
	<g>
 | 
			
		||||
		<path class="st1" d="M35.8,130.4c1.1,0.6,2.1,1.5,2.7,2.6c0.7,1.1,1,2.3,1,3.7s-0.3,2.6-1,3.7c-0.7,1.1-1.6,2-2.7,2.6
 | 
			
		||||
			c-1.1,0.6-2.4,1-3.8,1s-2.7-0.3-3.8-1c-1.1-0.6-2.1-1.5-2.7-2.6c-0.7-1.1-1-2.3-1-3.7c0-1.3,0.3-2.6,1-3.7c0.7-1.1,1.6-2,2.7-2.6
 | 
			
		||||
			c1.1-0.6,2.4-0.9,3.8-0.9C33.4,129.5,34.7,129.8,35.8,130.4z M29.9,132.9c-0.7,0.4-1.2,0.9-1.6,1.6s-0.6,1.4-0.6,2.2
 | 
			
		||||
			c0,0.8,0.2,1.6,0.6,2.3c0.4,0.7,0.9,1.2,1.6,1.6c0.7,0.4,1.4,0.6,2.1,0.6c0.8,0,1.5-0.2,2.1-0.6c0.6-0.4,1.2-0.9,1.5-1.6
 | 
			
		||||
			c0.4-0.7,0.6-1.4,0.6-2.3c0-0.8-0.2-1.6-0.6-2.2s-0.9-1.2-1.5-1.6c-0.6-0.4-1.4-0.6-2.1-0.6C31.3,132.3,30.6,132.5,29.9,132.9z"/>
 | 
			
		||||
		<path class="st1" d="M50.6,133.6c0.8,0.5,1.4,1.1,1.8,2c0.4,0.8,0.6,1.8,0.6,2.9c0,1.1-0.2,2-0.6,2.8c-0.4,0.8-1,1.5-1.8,1.9
 | 
			
		||||
			c-0.8,0.5-1.6,0.7-2.6,0.7c-0.7,0-1.4-0.1-2-0.4s-1.1-0.7-1.5-1.2v5.4h-3.1V133h3.1v1.6c0.4-0.5,0.9-1,1.4-1.2s1.2-0.4,2-0.4
 | 
			
		||||
			C48.9,132.9,49.8,133.1,50.6,133.6z M49.1,140.5c0.5-0.6,0.7-1.3,0.7-2.2c0-0.9-0.2-1.6-0.7-2.1c-0.5-0.6-1.1-0.8-1.9-0.8
 | 
			
		||||
			s-1.4,0.3-1.9,0.8c-0.5,0.6-0.8,1.3-0.8,2.1c0,0.9,0.2,1.6,0.8,2.2s1.1,0.8,1.9,0.8S48.6,141,49.1,140.5z"/>
 | 
			
		||||
		<path class="st1" d="M63.4,134.4c0.9,1,1.4,2.4,1.4,4.2c0,0.3,0,0.6,0,0.7H57c0.2,0.7,0.5,1.2,1,1.6c0.5,0.4,1.1,0.6,1.8,0.6
 | 
			
		||||
			c0.5,0,1-0.1,1.5-0.3s0.9-0.5,1.3-0.9l1.6,1.6c-0.5,0.6-1.2,1.1-2,1.4c-0.8,0.3-1.6,0.5-2.6,0.5c-1.1,0-2.1-0.2-3-0.7
 | 
			
		||||
			s-1.5-1.1-2-1.9c-0.5-0.8-0.7-1.8-0.7-2.9c0-1.1,0.2-2.1,0.7-2.9s1.1-1.5,2-1.9c0.8-0.5,1.8-0.7,2.9-0.7
 | 
			
		||||
			C61.2,132.9,62.5,133.4,63.4,134.4z M61.8,137.5c0-0.7-0.3-1.3-0.7-1.7s-1-0.6-1.7-0.6c-0.7,0-1.2,0.2-1.7,0.6
 | 
			
		||||
			c-0.4,0.4-0.7,1-0.9,1.7H61.8z"/>
 | 
			
		||||
		<path class="st1" d="M76.2,134c0.7,0.7,1.1,1.7,1.1,3v6.8h-3.1v-5.9c0-0.7-0.2-1.2-0.6-1.6s-0.9-0.6-1.5-0.6
 | 
			
		||||
			c-0.8,0-1.4,0.3-1.8,0.8c-0.4,0.5-0.7,1.2-0.7,2v5.3h-3.1V133h3.1v1.9c0.7-1.3,2-2,3.7-2C74.6,132.8,75.5,133.2,76.2,134z"/>
 | 
			
		||||
		<path class="st1" d="M96,129.7h3.3l-4.7,14h-3.3l-2.9-10.1l-3,10.1h-3.2l-4.7-14h3.4l3,10.7l3-10.7H90l3.1,10.7L96,129.7z"/>
 | 
			
		||||
		<path class="st1" d="M103.3,128.7c0.3,0.3,0.5,0.7,0.5,1.2s-0.2,0.9-0.5,1.2c-0.3,0.3-0.7,0.5-1.2,0.5c-0.5,0-0.9-0.2-1.2-0.5
 | 
			
		||||
			c-0.3-0.3-0.5-0.7-0.5-1.2c0-0.5,0.2-0.9,0.5-1.2c0.3-0.3,0.7-0.5,1.2-0.5C102.6,128.2,103,128.3,103.3,128.7z M100.6,133h3.1
 | 
			
		||||
			v10.8h-3.1V133z"/>
 | 
			
		||||
		<path class="st1" d="M106.5,129.7h10.1l0,2.6h-6.9v3.4h6.3v2.6h-6.3v5.3h-3.2V129.7z"/>
 | 
			
		||||
		<path class="st1" d="M120.9,128.7c0.3,0.3,0.5,0.7,0.5,1.2s-0.2,0.9-0.5,1.2c-0.3,0.3-0.7,0.5-1.2,0.5c-0.5,0-0.9-0.2-1.2-0.5
 | 
			
		||||
			c-0.3-0.3-0.5-0.7-0.5-1.2c0-0.5,0.2-0.9,0.5-1.2c0.3-0.3,0.7-0.5,1.2-0.5C120.1,128.2,120.5,128.3,120.9,128.7z M118.1,133h3.1
 | 
			
		||||
			v10.8h-3.1V133z"/>
 | 
			
		||||
	</g>
 | 
			
		||||
</g>
 | 
			
		||||
<g>
 | 
			
		||||
</g>
 | 
			
		||||
<g>
 | 
			
		||||
</g>
 | 
			
		||||
<g>
 | 
			
		||||
</g>
 | 
			
		||||
<g>
 | 
			
		||||
</g>
 | 
			
		||||
<g>
 | 
			
		||||
</g>
 | 
			
		||||
<g>
 | 
			
		||||
</g>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 8.0 KiB  | 
| 
		 Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB  | 
| 
		 Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB  | 
| 
		 Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB  | 
							
								
								
									
										32
									
								
								src/assets/icons/CoreuiLogo.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,32 @@
 | 
			
		||||
export const logo = [
 | 
			
		||||
  '608 134',
 | 
			
		||||
  `
 | 
			
		||||
  <title>coreui react pro</title>
 | 
			
		||||
  <g>
 | 
			
		||||
    <g style="fill:#00a1ff">
 | 
			
		||||
      <path d="M362.0177,90.1512,353.25,69.4149a.2507.2507,0,0,0-.2559-.1914H343.01a.2263.2263,0,0,0-.2559.2559V90.0233a.5657.5657,0,0,1-.64.64h-1.2163a.5652.5652,0,0,1-.64-.64V46.5028a.5655.5655,0,0,1,.64-.64H353.442a9.9792,9.9792,0,0,1,7.7437,3.2324A12.2,12.2,0,0,1,364.13,57.64a12.4389,12.4389,0,0,1-2.24,7.584,9.37,9.37,0,0,1-6.08,3.7441c-.1709.086-.2139.1915-.128.3194l8.7041,20.6084.064.2558q0,.5127-.5757.5118h-1.1523A.703.703,0,0,1,362.0177,90.1512ZM342.754,48.3593v18.496a.2259.2259,0,0,0,.2559.2559h10.3037a7.6713,7.6713,0,0,0,6.0166-2.5918,9.8807,9.8807,0,0,0,2.3037-6.8164,10.2875,10.2875,0,0,0-2.272-6.9756,7.6033,7.6033,0,0,0-6.0483-2.624H343.01A.2263.2263,0,0,0,342.754,48.3593Z"/>
 | 
			
		||||
      <path d="M401.3263,48.1034H381.2945a.2262.2262,0,0,0-.2558.2559v18.496a.2259.2259,0,0,0,.2558.2559h13.8238a.5664.5664,0,0,1,.6406.64v.96a.5663.5663,0,0,1-.6406.6406H381.2945a.2263.2263,0,0,0-.2558.2559v18.56a.2258.2258,0,0,0,.2558.2558h20.0318a.5671.5671,0,0,1,.6406.6407v.96a.566.566,0,0,1-.6406.64H379.1827a.5653.5653,0,0,1-.64-.64V46.5028a.5656.5656,0,0,1,.64-.64h22.1436a.5664.5664,0,0,1,.6406.64v.96A.5663.5663,0,0,1,401.3263,48.1034Z"/>
 | 
			
		||||
      <path d="M439.047,90.1512l-2.4317-8.832a.2971.2971,0,0,0-.32-.1924H419.5274a.2957.2957,0,0,0-.32.1924l-2.3681,8.7676a.6577.6577,0,0,1-.7036.5762H414.919a.5385.5385,0,0,1-.5756-.7041l12.0317-43.584a.6436.6436,0,0,1,.7041-.5117h1.6a.6442.6442,0,0,1,.7041.5117l12.16,43.584.0644.1923q0,.5127-.64.5118h-1.2163A.6428.6428,0,0,1,439.047,90.1512ZM419.9435,78.9188a.3031.3031,0,0,0,.2236.0967h15.4883a.3048.3048,0,0,0,.2236-.0967c.0645-.0635.0742-.1162.0322-.1592l-7.872-28.9287c-.043-.0849-.086-.1279-.128-.1279s-.0859.043-.1279.1279L419.9112,78.76C419.8683,78.8026,419.879,78.8553,419.9435,78.9188Z"/>
 | 
			
		||||
      <path d="M456.6017,87.911a11.6372,11.6372,0,0,1-3.3277-8.7041V57.1913a11.4158,11.4158,0,0,1,3.36-8.5762,12.0941,12.0941,0,0,1,8.8-3.2637,12.2566,12.2566,0,0,1,8.8643,3.2315,11.3927,11.3927,0,0,1,3.36,8.6084v.64a.5663.5663,0,0,1-.6406.6407l-1.28.0634q-.6408,0-.64-.5761v-.8321a9.289,9.289,0,0,0-2.6558-6.9121,10.6734,10.6734,0,0,0-14.0161,0,9.2854,9.2854,0,0,0-2.6563,6.9121V79.3993a9.2808,9.2808,0,0,0,2.6563,6.9121,10.67,10.67,0,0,0,14.0161,0,9.2843,9.2843,0,0,0,2.6558-6.9121v-.7686q0-.5757.64-.5752l1.28.0635a.5667.5667,0,0,1,.6406.6406v.5118a11.4952,11.4952,0,0,1-3.36,8.64,13.6227,13.6227,0,0,1-17.6963,0Z"/>
 | 
			
		||||
      <path d="M514.4376,46.5028v.96a.5658.5658,0,0,1-.64.6406H503.046a.2263.2263,0,0,0-.2559.2559v41.664a.566.566,0,0,1-.6406.64h-1.2158a.5652.5652,0,0,1-.64-.64V48.3593a.2266.2266,0,0,0-.2558-.2559H489.8619a.5656.5656,0,0,1-.64-.6406v-.96a.5656.5656,0,0,1,.64-.64H513.798A.5658.5658,0,0,1,514.4376,46.5028Z"/>
 | 
			
		||||
      <path d="M522.0665,89.5116a2.8385,2.8385,0,0,1-.8-2.0488,2.9194,2.9194,0,0,1,.8-2.1114,2.7544,2.7544,0,0,1,2.08-.832,2.8465,2.8465,0,0,1,2.9438,2.9434,2.7541,2.7541,0,0,1-.832,2.08,2.9221,2.9221,0,0,1-2.1118.8008A2.754,2.754,0,0,1,522.0665,89.5116Z"/>
 | 
			
		||||
      <path d="M542.4054,88.0077a11.3123,11.3123,0,0,1-3.2-8.416v-5.44a.5656.5656,0,0,1,.64-.64h1.2158a.5661.5661,0,0,1,.64.64v5.5039a9.1424,9.1424,0,0,0,2.5283,6.72,8.9745,8.9745,0,0,0,6.6875,2.5605,8.7908,8.7908,0,0,0,9.28-9.28V46.5028a.5655.5655,0,0,1,.64-.64h1.2163a.566.566,0,0,1,.64.64V79.5917a11.2545,11.2545,0,0,1-3.2325,8.416,13.0618,13.0618,0,0,1-17.0556,0Z"/>
 | 
			
		||||
      <path d="M580.35,88.1034a10.4859,10.4859,0,0,1-3.36-8.1279v-1.792a.5663.5663,0,0,1,.64-.6407h1.0884a.5668.5668,0,0,1,.64.6407v1.6a8.5459,8.5459,0,0,0,2.752,6.6562,10.5353,10.5353,0,0,0,7.36,2.4961,9.8719,9.8719,0,0,0,6.9761-2.3681,8.2161,8.2161,0,0,0,2.56-6.336,8.4,8.4,0,0,0-1.12-4.416,11.3812,11.3812,0,0,0-3.3281-3.3926,71.6714,71.6714,0,0,0-6.1763-3.7119,71.0479,71.0479,0,0,1-6.24-3.84,12.1711,12.1711,0,0,1-3.4238-3.68,10.2614,10.2614,0,0,1-1.28-5.3438,9.8579,9.8579,0,0,1,3.0718-7.7441,12.0122,12.0122,0,0,1,8.32-2.752q5.6954,0,8.96,3.1036a10.8251,10.8251,0,0,1,3.2642,8.2246v1.6a.5658.5658,0,0,1-.64.64h-1.1519a.5652.5652,0,0,1-.64-.64V56.8075a8.8647,8.8647,0,0,0-2.624-6.6885,9.9933,9.9933,0,0,0-7.232-2.5273,9.37,9.37,0,0,0-6.5278,2.1435,7.8224,7.8224,0,0,0-2.3682,6.1123,7.8006,7.8006,0,0,0,1.0244,4.16,10.387,10.387,0,0,0,3.0078,3.0391,62.8714,62.8714,0,0,0,5.9522,3.4882,71.0575,71.0575,0,0,1,6.72,4.2559,13.4674,13.4674,0,0,1,3.648,3.9365,10.049,10.049,0,0,1,1.28,5.1836,10.7177,10.7177,0,0,1-3.2637,8.1924q-3.2637,3.0717-8.832,3.0723Q583.71,91.1757,580.35,88.1034Z"/>
 | 
			
		||||
    </g>
 | 
			
		||||
    <g style="fill:#3c4b64">
 | 
			
		||||
      <g>
 | 
			
		||||
        <path d="M99.835,36.0577l-39-22.5167a12,12,0,0,0-12,0l-39,22.5166a12.0339,12.0339,0,0,0-6,10.3924V91.4833a12.0333,12.0333,0,0,0,6,10.3923l39,22.5167a12,12,0,0,0,12,0l39-22.5167a12.0331,12.0331,0,0,0,6-10.3923V46.45A12.0334,12.0334,0,0,0,99.835,36.0577Zm-2,55.4256a4,4,0,0,1-2,3.4641l-39,22.5167a4.0006,4.0006,0,0,1-4,0l-39-22.5167a4,4,0,0,1-2-3.4641V46.45a4,4,0,0,1,2-3.4642l39-22.5166a4,4,0,0,1,4,0l39,22.5166a4,4,0,0,1,2,3.4642Z"/>
 | 
			
		||||
        <path d="M77.8567,82.0046h-2.866a4,4,0,0,0-1.9247.4934L55.7852,91.9833,35.835,80.4648V57.4872l19.95-11.5185,17.2893,9.4549a3.9993,3.9993,0,0,0,1.9192.4906h2.8632a2,2,0,0,0,2-2V51.2024a2,2,0,0,0-1.04-1.7547L59.628,38.9521a8.0391,8.0391,0,0,0-7.8428.09L31.8346,50.56a8.0246,8.0246,0,0,0-4,6.9287v22.976a8,8,0,0,0,4,6.9283l19.95,11.5186a8.0429,8.0429,0,0,0,7.8433.0879l19.19-10.5312a2,2,0,0,0,1.0378-1.7533v-2.71A2,2,0,0,0,77.8567,82.0046Z"/>
 | 
			
		||||
      </g>
 | 
			
		||||
      <g>
 | 
			
		||||
        <path d="M172.58,45.3618a15.0166,15.0166,0,0,0-15,14.9995V77.6387a15,15,0,0,0,30,0V60.3613A15.0166,15.0166,0,0,0,172.58,45.3618Zm7,32.2769a7,7,0,0,1-14,0V60.3613a7,7,0,0,1,14,0Z"/>
 | 
			
		||||
        <path d="M135.9138,53.4211a7.01,7.01,0,0,1,7.8681,6.0752.9894.9894,0,0,0,.9843.865h6.03a1.0108,1.0108,0,0,0,.9987-1.0971,15.0182,15.0182,0,0,0-15.7162-13.8837,15.2881,15.2881,0,0,0-14.2441,15.4163V77.2037A15.288,15.288,0,0,0,136.0792,92.62a15.0183,15.0183,0,0,0,15.7162-13.8842,1.0107,1.0107,0,0,0-.9987-1.0971h-6.03a.9894.9894,0,0,0-.9843.865,7.01,7.01,0,0,1-7.8679,6.0757,7.1642,7.1642,0,0,1-6.0789-7.1849V60.6057A7.1638,7.1638,0,0,1,135.9138,53.4211Z"/>
 | 
			
		||||
        <path d="M218.7572,72.9277a12.1585,12.1585,0,0,0,7.1843-11.0771V58.1494A12.1494,12.1494,0,0,0,213.7921,46H196.835a1,1,0,0,0-1,1V91a1,1,0,0,0,1,1h6a1,1,0,0,0,1-1V74h6.6216l7.9154,17.4138a1,1,0,0,0,.91.5862h6.5911a1,1,0,0,0,.91-1.4138Zm-.8157-11.0771A4.1538,4.1538,0,0,1,213.7926,66h-9.8511V54h9.8511a4.1538,4.1538,0,0,1,4.1489,4.1494Z"/>
 | 
			
		||||
        <path d="M260.835,46h-26a1,1,0,0,0-1,1V91a1,1,0,0,0,1,1h26a1,1,0,0,0,1-1V85a1,1,0,0,0-1-1h-19V72h13a1,1,0,0,0,1-1V65a1,1,0,0,0-1-1h-13V54h19a1,1,0,0,0,1-1V47A1,1,0,0,0,260.835,46Z"/>
 | 
			
		||||
        <path d="M298.835,46h-6a1,1,0,0,0-1,1V69.6475a7.0066,7.0066,0,1,1-14,0V47a1,1,0,0,0-1-1h-6a1,1,0,0,0-1,1V69.6475a15.0031,15.0031,0,1,0,30,0V47A1,1,0,0,0,298.835,46Z"/>
 | 
			
		||||
        <rect x="307.835" y="46" width="8" height="38" rx="1"/>
 | 
			
		||||
      </g>
 | 
			
		||||
    </g>
 | 
			
		||||
  </g>
 | 
			
		||||
`,
 | 
			
		||||
];
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB  | 
| 
		 Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB  | 
| 
		 Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB  | 
							
								
								
									
										252
									
								
								src/assets/icons/index.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,252 @@
 | 
			
		||||
import {
 | 
			
		||||
  cibSkype,
 | 
			
		||||
  cibFacebook,
 | 
			
		||||
  cibTwitter,
 | 
			
		||||
  cibLinkedin,
 | 
			
		||||
  cibFlickr,
 | 
			
		||||
  cibTumblr,
 | 
			
		||||
  cibXing,
 | 
			
		||||
  cibGithub,
 | 
			
		||||
  cibStackoverflow,
 | 
			
		||||
  cibYoutube,
 | 
			
		||||
  cibDribbble,
 | 
			
		||||
  cibInstagram,
 | 
			
		||||
  cibPinterest,
 | 
			
		||||
  cibVk,
 | 
			
		||||
  cibYahoo,
 | 
			
		||||
  cibBehance,
 | 
			
		||||
  cibReddit,
 | 
			
		||||
  cibVimeo,
 | 
			
		||||
  cibCcMastercard,
 | 
			
		||||
  cibCcVisa,
 | 
			
		||||
  cibStripe,
 | 
			
		||||
  cibPaypal,
 | 
			
		||||
  cibGooglePay,
 | 
			
		||||
  cibCcAmex,
 | 
			
		||||
  cifUs,
 | 
			
		||||
  cifBr,
 | 
			
		||||
  cifIn,
 | 
			
		||||
  cifFr,
 | 
			
		||||
  cifEs,
 | 
			
		||||
  cifPl,
 | 
			
		||||
  cilAlignCenter,
 | 
			
		||||
  cilAlignLeft,
 | 
			
		||||
  cilAlignRight,
 | 
			
		||||
  cilApplicationsSettings,
 | 
			
		||||
  cilArrowRight,
 | 
			
		||||
  cilArrowTop,
 | 
			
		||||
  cilAsterisk,
 | 
			
		||||
  cilBan,
 | 
			
		||||
  cilBasket,
 | 
			
		||||
  cilBell,
 | 
			
		||||
  cilBold,
 | 
			
		||||
  cilBookmark,
 | 
			
		||||
  cilCalculator,
 | 
			
		||||
  cilCalendar,
 | 
			
		||||
  cilCloudDownload,
 | 
			
		||||
  cilChartPie,
 | 
			
		||||
  cilCheck,
 | 
			
		||||
  cilChevronBottom,
 | 
			
		||||
  cilChevronLeft,
 | 
			
		||||
  cilChevronRight,
 | 
			
		||||
  cilChevronTop,
 | 
			
		||||
  cilCircle,
 | 
			
		||||
  cilCheckCircle,
 | 
			
		||||
  cilCode,
 | 
			
		||||
  cilCommentSquare,
 | 
			
		||||
  cilCreditCard,
 | 
			
		||||
  cilCursor,
 | 
			
		||||
  cilCursorMove,
 | 
			
		||||
  cilDrop,
 | 
			
		||||
  cilDollar,
 | 
			
		||||
  cilEnvelopeClosed,
 | 
			
		||||
  cilEnvelopeLetter,
 | 
			
		||||
  cilEnvelopeOpen,
 | 
			
		||||
  cilEuro,
 | 
			
		||||
  cilGlobeAlt,
 | 
			
		||||
  cilGrid,
 | 
			
		||||
  cilFile,
 | 
			
		||||
  cilFullscreen,
 | 
			
		||||
  cilFullscreenExit,
 | 
			
		||||
  cilGraph,
 | 
			
		||||
  cilHome,
 | 
			
		||||
  cilInbox,
 | 
			
		||||
  cilIndentDecrease,
 | 
			
		||||
  cilIndentIncrease,
 | 
			
		||||
  cilInputPower,
 | 
			
		||||
  cilItalic,
 | 
			
		||||
  cilJustifyCenter,
 | 
			
		||||
  cilJustifyLeft,
 | 
			
		||||
  cilLaptop,
 | 
			
		||||
  cilLayers,
 | 
			
		||||
  cilLightbulb,
 | 
			
		||||
  cilList,
 | 
			
		||||
  cilListNumbered,
 | 
			
		||||
  cilListRich,
 | 
			
		||||
  cilLocationPin,
 | 
			
		||||
  cilLockLocked,
 | 
			
		||||
  cilMagnifyingGlass,
 | 
			
		||||
  cilMap,
 | 
			
		||||
  cilMoon,
 | 
			
		||||
  cilNotes,
 | 
			
		||||
  cilOptions,
 | 
			
		||||
  cilPaperclip,
 | 
			
		||||
  cilPaperPlane,
 | 
			
		||||
  cilPencil,
 | 
			
		||||
  cilPeople,
 | 
			
		||||
  cilPhone,
 | 
			
		||||
  cilPrint,
 | 
			
		||||
  cilPuzzle,
 | 
			
		||||
  cilRouter,
 | 
			
		||||
  cilSave,
 | 
			
		||||
  cilScrubber,
 | 
			
		||||
  cilSettings,
 | 
			
		||||
  cilShare,
 | 
			
		||||
  cilShareAll,
 | 
			
		||||
  cilShareBoxed,
 | 
			
		||||
  cilShieldAlt,
 | 
			
		||||
  cilSpeech,
 | 
			
		||||
  cilSpeedometer,
 | 
			
		||||
  cilSpreadsheet,
 | 
			
		||||
  cilStar,
 | 
			
		||||
  cilSun,
 | 
			
		||||
  cilTags,
 | 
			
		||||
  cilTask,
 | 
			
		||||
  cilTrash,
 | 
			
		||||
  cilUnderline,
 | 
			
		||||
  cilUser,
 | 
			
		||||
  cilUserFemale,
 | 
			
		||||
  cilUserFollow,
 | 
			
		||||
  cilUserUnfollow,
 | 
			
		||||
  cilX,
 | 
			
		||||
  cilXCircle,
 | 
			
		||||
  cilWarning,
 | 
			
		||||
} from '@coreui/icons';
 | 
			
		||||
 | 
			
		||||
import { logo } from './CoreuiLogo';
 | 
			
		||||
 | 
			
		||||
export const icons = {
 | 
			
		||||
  logo,
 | 
			
		||||
  cilAlignCenter,
 | 
			
		||||
  cilAlignLeft,
 | 
			
		||||
  cilAlignRight,
 | 
			
		||||
  cilApplicationsSettings,
 | 
			
		||||
  cilArrowRight,
 | 
			
		||||
  cilArrowTop,
 | 
			
		||||
  cilAsterisk,
 | 
			
		||||
  cilBan,
 | 
			
		||||
  cilBasket,
 | 
			
		||||
  cilBell,
 | 
			
		||||
  cilBold,
 | 
			
		||||
  cilBookmark,
 | 
			
		||||
  cilCalculator,
 | 
			
		||||
  cilCalendar,
 | 
			
		||||
  cilCloudDownload,
 | 
			
		||||
  cilChartPie,
 | 
			
		||||
  cilCheck,
 | 
			
		||||
  cilChevronBottom,
 | 
			
		||||
  cilChevronLeft,
 | 
			
		||||
  cilChevronRight,
 | 
			
		||||
  cilChevronTop,
 | 
			
		||||
  cilCircle,
 | 
			
		||||
  cilCheckCircle,
 | 
			
		||||
  cilCode,
 | 
			
		||||
  cilCommentSquare,
 | 
			
		||||
  cilCreditCard,
 | 
			
		||||
  cilCursor,
 | 
			
		||||
  cilCursorMove,
 | 
			
		||||
  cilDrop,
 | 
			
		||||
  cilDollar,
 | 
			
		||||
  cilEnvelopeClosed,
 | 
			
		||||
  cilEnvelopeLetter,
 | 
			
		||||
  cilEnvelopeOpen,
 | 
			
		||||
  cilEuro,
 | 
			
		||||
  cilGlobeAlt,
 | 
			
		||||
  cilGrid,
 | 
			
		||||
  cilFile,
 | 
			
		||||
  cilFullscreen,
 | 
			
		||||
  cilFullscreenExit,
 | 
			
		||||
  cilGraph,
 | 
			
		||||
  cilHome,
 | 
			
		||||
  cilInbox,
 | 
			
		||||
  cilIndentDecrease,
 | 
			
		||||
  cilIndentIncrease,
 | 
			
		||||
  cilInputPower,
 | 
			
		||||
  cilItalic,
 | 
			
		||||
  cilJustifyCenter,
 | 
			
		||||
  cilJustifyLeft,
 | 
			
		||||
  cilLaptop,
 | 
			
		||||
  cilLayers,
 | 
			
		||||
  cilLightbulb,
 | 
			
		||||
  cilList,
 | 
			
		||||
  cilListNumbered,
 | 
			
		||||
  cilListRich,
 | 
			
		||||
  cilLocationPin,
 | 
			
		||||
  cilLockLocked,
 | 
			
		||||
  cilMagnifyingGlass,
 | 
			
		||||
  cilMap,
 | 
			
		||||
  cilMoon,
 | 
			
		||||
  cilNotes,
 | 
			
		||||
  cilOptions,
 | 
			
		||||
  cilPaperclip,
 | 
			
		||||
  cilPaperPlane,
 | 
			
		||||
  cilPencil,
 | 
			
		||||
  cilPeople,
 | 
			
		||||
  cilPhone,
 | 
			
		||||
  cilPrint,
 | 
			
		||||
  cilPuzzle,
 | 
			
		||||
  cilRouter,
 | 
			
		||||
  cilSave,
 | 
			
		||||
  cilScrubber,
 | 
			
		||||
  cilSettings,
 | 
			
		||||
  cilShare,
 | 
			
		||||
  cilShareAll,
 | 
			
		||||
  cilShareBoxed,
 | 
			
		||||
  cilShieldAlt,
 | 
			
		||||
  cilSpeech,
 | 
			
		||||
  cilSpeedometer,
 | 
			
		||||
  cilSpreadsheet,
 | 
			
		||||
  cilStar,
 | 
			
		||||
  cilSun,
 | 
			
		||||
  cilTags,
 | 
			
		||||
  cilTask,
 | 
			
		||||
  cilTrash,
 | 
			
		||||
  cilUnderline,
 | 
			
		||||
  cilUser,
 | 
			
		||||
  cilUserFemale,
 | 
			
		||||
  cilUserFollow,
 | 
			
		||||
  cilUserUnfollow,
 | 
			
		||||
  cilX,
 | 
			
		||||
  cilXCircle,
 | 
			
		||||
  cilWarning,
 | 
			
		||||
  cifUs,
 | 
			
		||||
  cifBr,
 | 
			
		||||
  cifIn,
 | 
			
		||||
  cifFr,
 | 
			
		||||
  cifEs,
 | 
			
		||||
  cifPl,
 | 
			
		||||
  cibSkype,
 | 
			
		||||
  cibFacebook,
 | 
			
		||||
  cibTwitter,
 | 
			
		||||
  cibLinkedin,
 | 
			
		||||
  cibFlickr,
 | 
			
		||||
  cibTumblr,
 | 
			
		||||
  cibXing,
 | 
			
		||||
  cibGithub,
 | 
			
		||||
  cibStackoverflow,
 | 
			
		||||
  cibYoutube,
 | 
			
		||||
  cibDribbble,
 | 
			
		||||
  cibInstagram,
 | 
			
		||||
  cibPinterest,
 | 
			
		||||
  cibVk,
 | 
			
		||||
  cibYahoo,
 | 
			
		||||
  cibBehance,
 | 
			
		||||
  cibReddit,
 | 
			
		||||
  cibVimeo,
 | 
			
		||||
  cibCcMastercard,
 | 
			
		||||
  cibCcVisa,
 | 
			
		||||
  cibStripe,
 | 
			
		||||
  cibPaypal,
 | 
			
		||||
  cibGooglePay,
 | 
			
		||||
  cibCcAmex,
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										202
									
								
								src/components/BlinkModal/index.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,202 @@
 | 
			
		||||
import {
 | 
			
		||||
  CButton,
 | 
			
		||||
  CModal,
 | 
			
		||||
  CModalHeader,
 | 
			
		||||
  CModalTitle,
 | 
			
		||||
  CModalBody,
 | 
			
		||||
  CModalFooter,
 | 
			
		||||
  CSwitch,
 | 
			
		||||
  CCol,
 | 
			
		||||
  CRow,
 | 
			
		||||
  CFormGroup,
 | 
			
		||||
  CInputRadio,
 | 
			
		||||
  CLabel,
 | 
			
		||||
} from '@coreui/react';
 | 
			
		||||
import React, { useState, useEffect } from 'react';
 | 
			
		||||
import { useTranslation } from 'react-i18next';
 | 
			
		||||
import DatePicker from 'react-widgets/DatePicker';
 | 
			
		||||
import PropTypes from 'prop-types';
 | 
			
		||||
import { dateToUnix } from 'utils/helper';
 | 
			
		||||
import 'react-widgets/styles.css';
 | 
			
		||||
import { useAuth } from 'contexts/AuthProvider';
 | 
			
		||||
import { useDevice } from 'contexts/DeviceProvider';
 | 
			
		||||
import axiosInstance from 'utils/axiosInstance';
 | 
			
		||||
import eventBus from 'utils/eventBus';
 | 
			
		||||
import SuccessfulActionModalBody from 'components/SuccessfulActionModalBody';
 | 
			
		||||
import LoadingButton from 'components/LoadingButton';
 | 
			
		||||
 | 
			
		||||
import styles from './index.module.scss';
 | 
			
		||||
 | 
			
		||||
const BlinkModal = ({ show, toggleModal }) => {
 | 
			
		||||
  const { t } = useTranslation();
 | 
			
		||||
  const { currentToken, endpoints } = useAuth();
 | 
			
		||||
  const { deviceSerialNumber } = useDevice();
 | 
			
		||||
  const [isNow, setIsNow] = useState(false);
 | 
			
		||||
  const [waiting, setWaiting] = useState(false);
 | 
			
		||||
  const [chosenDate, setChosenDate] = useState(new Date().toString());
 | 
			
		||||
  const [chosenPattern, setPattern] = useState('on');
 | 
			
		||||
  const [result, setResult] = useState(null);
 | 
			
		||||
 | 
			
		||||
  const toggleNow = () => {
 | 
			
		||||
    setIsNow(!isNow);
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  const setDate = (date) => {
 | 
			
		||||
    if (date) {
 | 
			
		||||
      setChosenDate(date.toString());
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  useEffect(() => {
 | 
			
		||||
    if (show) {
 | 
			
		||||
      setWaiting(false);
 | 
			
		||||
      setChosenDate(new Date().toString());
 | 
			
		||||
      setPattern('on');
 | 
			
		||||
      setResult(null);
 | 
			
		||||
    }
 | 
			
		||||
  }, [show]);
 | 
			
		||||
 | 
			
		||||
  const doAction = () => {
 | 
			
		||||
    setWaiting(true);
 | 
			
		||||
    const utcDate = new Date(chosenDate);
 | 
			
		||||
 | 
			
		||||
    const parameters = {
 | 
			
		||||
      serialNumber: deviceSerialNumber,
 | 
			
		||||
      when: isNow ? 0 : dateToUnix(utcDate),
 | 
			
		||||
      pattern: chosenPattern,
 | 
			
		||||
      duration: 30,
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    const headers = {
 | 
			
		||||
      Accept: 'application/json',
 | 
			
		||||
      Authorization: `Bearer ${currentToken}`,
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    axiosInstance
 | 
			
		||||
      .post(
 | 
			
		||||
        `${endpoints.ucentralgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}/leds`,
 | 
			
		||||
        parameters,
 | 
			
		||||
        { headers },
 | 
			
		||||
      )
 | 
			
		||||
      .then(() => {
 | 
			
		||||
        setResult('success');
 | 
			
		||||
      })
 | 
			
		||||
      .catch(() => {
 | 
			
		||||
        setResult('error');
 | 
			
		||||
      })
 | 
			
		||||
      .finally(() => {
 | 
			
		||||
        setWaiting(false);
 | 
			
		||||
        eventBus.dispatch('actionCompleted', { message: 'An action has been completed' });
 | 
			
		||||
      });
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  return (
 | 
			
		||||
    <CModal show={show} onClose={toggleModal}>
 | 
			
		||||
      <CModalHeader closeButton>
 | 
			
		||||
        <CModalTitle>{t('blink.device_leds')}</CModalTitle>
 | 
			
		||||
      </CModalHeader>
 | 
			
		||||
      {result === 'success' ? (
 | 
			
		||||
        <SuccessfulActionModalBody toggleModal={toggleModal} />
 | 
			
		||||
      ) : (
 | 
			
		||||
        <div>
 | 
			
		||||
          <CModalBody>
 | 
			
		||||
            <CFormGroup row>
 | 
			
		||||
              <CCol md="3">
 | 
			
		||||
                <CLabel>{t('blink.pattern')}</CLabel>
 | 
			
		||||
              </CCol>
 | 
			
		||||
              <CCol>
 | 
			
		||||
                <CFormGroup variant="custom-radio" onClick={() => setPattern('on')} inline>
 | 
			
		||||
                  <CInputRadio
 | 
			
		||||
                    custom
 | 
			
		||||
                    defaultChecked={chosenPattern === 'on'}
 | 
			
		||||
                    id="radio1"
 | 
			
		||||
                    name="radios"
 | 
			
		||||
                    value="option1"
 | 
			
		||||
                  />
 | 
			
		||||
                  <CLabel variant="custom-checkbox" htmlFor="radio1">
 | 
			
		||||
                    {t('common.on')}
 | 
			
		||||
                  </CLabel>
 | 
			
		||||
                </CFormGroup>
 | 
			
		||||
                <CFormGroup variant="custom-radio" onClick={() => setPattern('off')} inline>
 | 
			
		||||
                  <CInputRadio
 | 
			
		||||
                    custom
 | 
			
		||||
                    defaultChecked={chosenPattern === 'off'}
 | 
			
		||||
                    id="radio2"
 | 
			
		||||
                    name="radios"
 | 
			
		||||
                    value="option2"
 | 
			
		||||
                  />
 | 
			
		||||
                  <CLabel variant="custom-checkbox" htmlFor="radio2">
 | 
			
		||||
                    {t('common.off')}
 | 
			
		||||
                  </CLabel>
 | 
			
		||||
                </CFormGroup>
 | 
			
		||||
                <CFormGroup variant="custom-radio" onClick={() => setPattern('blink')} inline>
 | 
			
		||||
                  <CInputRadio
 | 
			
		||||
                    custom
 | 
			
		||||
                    defaultChecked={chosenPattern === 'blink'}
 | 
			
		||||
                    id="radio3"
 | 
			
		||||
                    name="radios"
 | 
			
		||||
                    value="option3"
 | 
			
		||||
                  />
 | 
			
		||||
                  <CLabel variant="custom-checkbox" htmlFor="radio3">
 | 
			
		||||
                    {t('blink.blink')}
 | 
			
		||||
                  </CLabel>
 | 
			
		||||
                </CFormGroup>
 | 
			
		||||
              </CCol>
 | 
			
		||||
            </CFormGroup>
 | 
			
		||||
            <CRow className={styles.spacedRow}>
 | 
			
		||||
              <CCol md="8">
 | 
			
		||||
                <p className={styles.spacedText}>{t('blink.execute_now')}</p>
 | 
			
		||||
              </CCol>
 | 
			
		||||
              <CCol>
 | 
			
		||||
                <CSwitch
 | 
			
		||||
                  disabled={waiting}
 | 
			
		||||
                  color="primary"
 | 
			
		||||
                  defaultChecked={isNow}
 | 
			
		||||
                  onClick={toggleNow}
 | 
			
		||||
                  labelOn={t('common.yes')}
 | 
			
		||||
                  labelOff={t('common.no')}
 | 
			
		||||
                />
 | 
			
		||||
              </CCol>
 | 
			
		||||
            </CRow>
 | 
			
		||||
            <CRow hidden={isNow} className={styles.spacedRow}>
 | 
			
		||||
              <CCol md="4" className={styles.spacedDate}>
 | 
			
		||||
                <p>{t('common.custom_date')}</p>
 | 
			
		||||
              </CCol>
 | 
			
		||||
              <CCol xs="12" md="8">
 | 
			
		||||
                <DatePicker
 | 
			
		||||
                  selected={new Date(chosenDate)}
 | 
			
		||||
                  includeTime
 | 
			
		||||
                  value={new Date(chosenDate)}
 | 
			
		||||
                  placeholder="Select custom date"
 | 
			
		||||
                  disabled={waiting}
 | 
			
		||||
                  onChange={(date) => setDate(date)}
 | 
			
		||||
                  min={new Date()}
 | 
			
		||||
                />
 | 
			
		||||
              </CCol>
 | 
			
		||||
            </CRow>
 | 
			
		||||
          </CModalBody>
 | 
			
		||||
          <CModalFooter>
 | 
			
		||||
            <LoadingButton
 | 
			
		||||
              label={isNow ? t('blink.set_leds') : t('common.schedule')}
 | 
			
		||||
              isLoadingLabel={t('common.loading_ellipsis')}
 | 
			
		||||
              isLoading={waiting}
 | 
			
		||||
              action={doAction}
 | 
			
		||||
              block={false}
 | 
			
		||||
              disabled={waiting}
 | 
			
		||||
            />
 | 
			
		||||
            <CButton color="secondary" onClick={toggleModal}>
 | 
			
		||||
              {t('common.cancel')}
 | 
			
		||||
            </CButton>
 | 
			
		||||
          </CModalFooter>
 | 
			
		||||
        </div>
 | 
			
		||||
      )}
 | 
			
		||||
    </CModal>
 | 
			
		||||
  );
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
BlinkModal.propTypes = {
 | 
			
		||||
  show: PropTypes.bool.isRequired,
 | 
			
		||||
  toggleModal: PropTypes.func.isRequired,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export default BlinkModal;
 | 
			
		||||
							
								
								
									
										7
									
								
								src/components/BlinkModal/index.module.scss
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,7 @@
 | 
			
		||||
.spacedRow {
 | 
			
		||||
  margin-top: 20px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.spacedDate {
 | 
			
		||||
  margin-top: 7px;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,57 +0,0 @@
 | 
			
		||||
import React from 'react';
 | 
			
		||||
import { Button, IconButton, Tooltip, useBreakpoint } from '@chakra-ui/react';
 | 
			
		||||
import { Warning } from 'phosphor-react';
 | 
			
		||||
import { useTranslation } from 'react-i18next';
 | 
			
		||||
import { ThemeProps } from 'models/Theme';
 | 
			
		||||
 | 
			
		||||
export interface AlertButtonProps extends ThemeProps {
 | 
			
		||||
  onClick: () => void;
 | 
			
		||||
  isDisabled?: boolean;
 | 
			
		||||
  isLoading?: boolean;
 | 
			
		||||
  isCompact?: boolean;
 | 
			
		||||
  label?: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const _AlertButton: React.FC<AlertButtonProps> = ({
 | 
			
		||||
  onClick,
 | 
			
		||||
  isDisabled,
 | 
			
		||||
  isLoading,
 | 
			
		||||
  isCompact = true,
 | 
			
		||||
  label,
 | 
			
		||||
  ...props
 | 
			
		||||
}) => {
 | 
			
		||||
  const { t } = useTranslation();
 | 
			
		||||
  const breakpoint = useBreakpoint();
 | 
			
		||||
 | 
			
		||||
  if (!isCompact && breakpoint !== 'base' && breakpoint !== 'sm') {
 | 
			
		||||
    return (
 | 
			
		||||
      <Button
 | 
			
		||||
        colorScheme="red"
 | 
			
		||||
        type="button"
 | 
			
		||||
        onClick={onClick}
 | 
			
		||||
        rightIcon={<Warning size={20} />}
 | 
			
		||||
        isLoading={isLoading}
 | 
			
		||||
        isDisabled={isDisabled}
 | 
			
		||||
        {...props}
 | 
			
		||||
      >
 | 
			
		||||
        {label ?? t('common.alert')}
 | 
			
		||||
      </Button>
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
  return (
 | 
			
		||||
    <Tooltip label={label ?? t('common.alert')}>
 | 
			
		||||
      <IconButton
 | 
			
		||||
        aria-label="alert-button"
 | 
			
		||||
        colorScheme="red"
 | 
			
		||||
        type="button"
 | 
			
		||||
        onClick={onClick}
 | 
			
		||||
        icon={<Warning size={20} />}
 | 
			
		||||
        isLoading={isLoading}
 | 
			
		||||
        isDisabled={isDisabled}
 | 
			
		||||
        {...props}
 | 
			
		||||
      />
 | 
			
		||||
    </Tooltip>
 | 
			
		||||
  );
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export const AlertButton = React.memo(_AlertButton);
 | 
			
		||||
@@ -1,28 +0,0 @@
 | 
			
		||||
import React from 'react';
 | 
			
		||||
import { IconButton, SpaceProps } from '@chakra-ui/react';
 | 
			
		||||
import { X } from 'phosphor-react';
 | 
			
		||||
import { useTranslation } from 'react-i18next';
 | 
			
		||||
 | 
			
		||||
export interface CloseButtonProps extends SpaceProps {
 | 
			
		||||
  onClick: () => void;
 | 
			
		||||
  isDisabled?: boolean;
 | 
			
		||||
  isLoading?: boolean;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const _CloseButton: React.FC<CloseButtonProps> = ({ onClick, isDisabled, isLoading, ...props }) => {
 | 
			
		||||
  const { t } = useTranslation();
 | 
			
		||||
 | 
			
		||||
  return (
 | 
			
		||||
    <IconButton
 | 
			
		||||
      aria-label={t('common.close')}
 | 
			
		||||
      colorScheme="gray"
 | 
			
		||||
      onClick={onClick}
 | 
			
		||||
      icon={<X size={20} />}
 | 
			
		||||
      isLoading={isLoading}
 | 
			
		||||
      isDisabled={isDisabled}
 | 
			
		||||
      {...props}
 | 
			
		||||
    />
 | 
			
		||||
  );
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export const CloseButton = React.memo(_CloseButton);
 | 
			
		||||
@@ -1,56 +0,0 @@
 | 
			
		||||
import React from 'react';
 | 
			
		||||
import { Button, IconButton, Tooltip, useBreakpoint, SpaceProps } from '@chakra-ui/react';
 | 
			
		||||
import { Plus } from 'phosphor-react';
 | 
			
		||||
import { useTranslation } from 'react-i18next';
 | 
			
		||||
 | 
			
		||||
export interface CreateButtonProps extends SpaceProps {
 | 
			
		||||
  onClick?: () => void;
 | 
			
		||||
  isDisabled?: boolean;
 | 
			
		||||
  isLoading?: boolean;
 | 
			
		||||
  isCompact?: boolean;
 | 
			
		||||
  label?: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const _CreateButton: React.FC<CreateButtonProps> = ({
 | 
			
		||||
  onClick,
 | 
			
		||||
  isDisabled,
 | 
			
		||||
  isLoading,
 | 
			
		||||
  isCompact = true,
 | 
			
		||||
  label,
 | 
			
		||||
  ...props
 | 
			
		||||
}) => {
 | 
			
		||||
  const { t } = useTranslation();
 | 
			
		||||
  const breakpoint = useBreakpoint();
 | 
			
		||||
 | 
			
		||||
  if (!isCompact && breakpoint !== 'base' && breakpoint !== 'sm') {
 | 
			
		||||
    return (
 | 
			
		||||
      <Button
 | 
			
		||||
        colorScheme="blue"
 | 
			
		||||
        type="button"
 | 
			
		||||
        onClick={onClick}
 | 
			
		||||
        rightIcon={<Plus size={20} />}
 | 
			
		||||
        isLoading={isLoading}
 | 
			
		||||
        isDisabled={isDisabled}
 | 
			
		||||
        {...props}
 | 
			
		||||
      >
 | 
			
		||||
        {label ?? t('common.create')}
 | 
			
		||||
      </Button>
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
  return (
 | 
			
		||||
    <Tooltip label={label ?? t('common.create')}>
 | 
			
		||||
      <IconButton
 | 
			
		||||
        aria-label="Create"
 | 
			
		||||
        colorScheme="blue"
 | 
			
		||||
        type="button"
 | 
			
		||||
        onClick={onClick}
 | 
			
		||||
        icon={<Plus size={20} />}
 | 
			
		||||
        isLoading={isLoading}
 | 
			
		||||
        isDisabled={isDisabled}
 | 
			
		||||
        {...props}
 | 
			
		||||
      />
 | 
			
		||||
    </Tooltip>
 | 
			
		||||
  );
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export const CreateButton = React.memo(_CreateButton);
 | 
			
		||||
@@ -1,61 +0,0 @@
 | 
			
		||||
import React from 'react';
 | 
			
		||||
import { Button, IconButton, Tooltip, useBreakpoint } from '@chakra-ui/react';
 | 
			
		||||
import { Trash } from 'phosphor-react';
 | 
			
		||||
import { useTranslation } from 'react-i18next';
 | 
			
		||||
 | 
			
		||||
export interface DeleteButtonProps {
 | 
			
		||||
  onClick: () => void;
 | 
			
		||||
  isDisabled?: boolean;
 | 
			
		||||
  isLoading?: boolean;
 | 
			
		||||
  isCompact?: boolean;
 | 
			
		||||
  label?: string;
 | 
			
		||||
  ml?: string | number;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const _DeleteButton: React.FC<DeleteButtonProps> = ({
 | 
			
		||||
  onClick,
 | 
			
		||||
  isDisabled,
 | 
			
		||||
  isLoading,
 | 
			
		||||
  isCompact = true,
 | 
			
		||||
  label,
 | 
			
		||||
  ml,
 | 
			
		||||
  ...props
 | 
			
		||||
}) => {
 | 
			
		||||
  const { t } = useTranslation();
 | 
			
		||||
  const breakpoint = useBreakpoint();
 | 
			
		||||
 | 
			
		||||
  if (!isCompact && breakpoint !== 'base' && breakpoint !== 'sm') {
 | 
			
		||||
    return (
 | 
			
		||||
      <Button
 | 
			
		||||
        type="button"
 | 
			
		||||
        colorScheme="red"
 | 
			
		||||
        onClick={onClick}
 | 
			
		||||
        rightIcon={<Trash size={20} />}
 | 
			
		||||
        isLoading={isLoading}
 | 
			
		||||
        isDisabled={isDisabled}
 | 
			
		||||
        ml={ml}
 | 
			
		||||
        {...props}
 | 
			
		||||
      >
 | 
			
		||||
        {label ?? t('crud.delete')}
 | 
			
		||||
      </Button>
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return (
 | 
			
		||||
    <Tooltip label={label ?? t('crud.delete')}>
 | 
			
		||||
      <IconButton
 | 
			
		||||
        colorScheme="red"
 | 
			
		||||
        aria-label="delete"
 | 
			
		||||
        type="button"
 | 
			
		||||
        onClick={onClick}
 | 
			
		||||
        icon={<Trash size={20} />}
 | 
			
		||||
        isLoading={isLoading}
 | 
			
		||||
        isDisabled={isDisabled}
 | 
			
		||||
        ml={ml}
 | 
			
		||||
        {...props}
 | 
			
		||||
      />
 | 
			
		||||
    </Tooltip>
 | 
			
		||||
  );
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export const DeleteButton = React.memo(_DeleteButton);
 | 
			
		||||
@@ -1,211 +0,0 @@
 | 
			
		||||
import React from 'react';
 | 
			
		||||
import {
 | 
			
		||||
  Button,
 | 
			
		||||
  IconButton,
 | 
			
		||||
  Menu,
 | 
			
		||||
  MenuButton,
 | 
			
		||||
  MenuItem,
 | 
			
		||||
  MenuList,
 | 
			
		||||
  Portal,
 | 
			
		||||
  Spinner,
 | 
			
		||||
  Tooltip,
 | 
			
		||||
  useToast,
 | 
			
		||||
} from '@chakra-ui/react';
 | 
			
		||||
import axios from 'axios';
 | 
			
		||||
import { Wrench } from 'phosphor-react';
 | 
			
		||||
import { useTranslation } from 'react-i18next';
 | 
			
		||||
import { useControllerStore } from 'contexts/ControllerSocketProvider/useStore';
 | 
			
		||||
import { useBlinkDevice, useGetDeviceRtty } from 'hooks/Network/Devices';
 | 
			
		||||
import { useUpdateDeviceToLatest } from 'hooks/Network/Firmware';
 | 
			
		||||
import { useMutationResult } from 'hooks/useMutationResult';
 | 
			
		||||
import { GatewayDevice } from 'models/Device';
 | 
			
		||||
 | 
			
		||||
interface Props {
 | 
			
		||||
  device: GatewayDevice;
 | 
			
		||||
  refresh: () => void;
 | 
			
		||||
  isDisabled?: boolean;
 | 
			
		||||
  onOpenScan: (serialNumber: string) => void;
 | 
			
		||||
  onOpenFactoryReset: (serialNumber: string) => void;
 | 
			
		||||
  onOpenUpgradeModal: (serialNumber: string) => void;
 | 
			
		||||
  onOpenTrace: (serialNumber: string) => void;
 | 
			
		||||
  onOpenEventQueue: (serialNumber: string) => void;
 | 
			
		||||
  onOpenConfigureModal: (serialNumber: string) => void;
 | 
			
		||||
  onOpenTelemetryModal: (serialNumber: string) => void;
 | 
			
		||||
  onOpenScriptModal: (device: GatewayDevice) => void;
 | 
			
		||||
  onOpenRebootModal: (serialNumber: string) => void;
 | 
			
		||||
  size?: 'sm' | 'md' | 'lg';
 | 
			
		||||
  isCompact?: boolean;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const DeviceActionDropdown = ({
 | 
			
		||||
  device,
 | 
			
		||||
  refresh,
 | 
			
		||||
  isDisabled,
 | 
			
		||||
  onOpenScan,
 | 
			
		||||
  onOpenFactoryReset,
 | 
			
		||||
  onOpenTrace,
 | 
			
		||||
  onOpenUpgradeModal,
 | 
			
		||||
  onOpenEventQueue,
 | 
			
		||||
  onOpenTelemetryModal,
 | 
			
		||||
  onOpenConfigureModal,
 | 
			
		||||
  onOpenScriptModal,
 | 
			
		||||
  onOpenRebootModal,
 | 
			
		||||
  size,
 | 
			
		||||
  isCompact = true,
 | 
			
		||||
}: Props) => {
 | 
			
		||||
  const { t } = useTranslation();
 | 
			
		||||
  const toast = useToast();
 | 
			
		||||
  const addEventListeners = useControllerStore((state) => state.addEventListeners);
 | 
			
		||||
  const { refetch: getRtty, isInitialLoading: isRtty } = useGetDeviceRtty({
 | 
			
		||||
    serialNumber: device.serialNumber,
 | 
			
		||||
    extraId: 'inventory-modal',
 | 
			
		||||
  });
 | 
			
		||||
  const { mutateAsync: blink } = useBlinkDevice({ serialNumber: device.serialNumber });
 | 
			
		||||
  const { onSuccess: onBlinkSuccess, onError: onBlinkError } = useMutationResult({
 | 
			
		||||
    objName: t('devices.one'),
 | 
			
		||||
    operationType: 'blink',
 | 
			
		||||
    refresh,
 | 
			
		||||
  });
 | 
			
		||||
  const updateToLatest = useUpdateDeviceToLatest({ serialNumber: device.serialNumber, compatible: device.compatible });
 | 
			
		||||
 | 
			
		||||
  const handleBlinkClick = () => {
 | 
			
		||||
    blink(undefined, {
 | 
			
		||||
      onError: (e) => {
 | 
			
		||||
        if (axios.isAxiosError(e)) onBlinkError(e);
 | 
			
		||||
      },
 | 
			
		||||
    });
 | 
			
		||||
    onBlinkSuccess();
 | 
			
		||||
  };
 | 
			
		||||
  const handleOpenScan = () => onOpenScan(device.serialNumber);
 | 
			
		||||
  const handleOpenFactoryReset = () => onOpenFactoryReset(device.serialNumber);
 | 
			
		||||
  const handleOpenUpgrade = () => onOpenUpgradeModal(device.serialNumber);
 | 
			
		||||
  const handleOpenTrace = () => onOpenTrace(device.serialNumber);
 | 
			
		||||
  const handleOpenQueue = () => onOpenEventQueue(device.serialNumber);
 | 
			
		||||
  const handleOpenConfigure = () => onOpenConfigureModal(device.serialNumber);
 | 
			
		||||
  const handleOpenTelemetry = () => onOpenTelemetryModal(device.serialNumber);
 | 
			
		||||
  const handleOpenScript = () => onOpenScriptModal(device);
 | 
			
		||||
  const handleUpdateToLatest = () => {
 | 
			
		||||
    updateToLatest.mutate(
 | 
			
		||||
      { keepRedirector: true },
 | 
			
		||||
      {
 | 
			
		||||
        onSuccess: () => {
 | 
			
		||||
          toast({
 | 
			
		||||
            id: `upgrade-to-latest-start-${device.serialNumber}`,
 | 
			
		||||
            title: t('common.success'),
 | 
			
		||||
            description: t('controller.devices.sent_upgrade_to_latest'),
 | 
			
		||||
            status: 'success',
 | 
			
		||||
            duration: 5000,
 | 
			
		||||
            isClosable: true,
 | 
			
		||||
            position: 'top-right',
 | 
			
		||||
          });
 | 
			
		||||
          addEventListeners([
 | 
			
		||||
            {
 | 
			
		||||
              id: `device-connection-upgrade-${device.serialNumber}`,
 | 
			
		||||
              type: 'DEVICE_CONNECTION',
 | 
			
		||||
              serialNumber: device.serialNumber,
 | 
			
		||||
              callback: () => {
 | 
			
		||||
                const id = `device-connection-upgrade-notification-${device.serialNumber}`;
 | 
			
		||||
 | 
			
		||||
                if (!toast.isActive(id)) {
 | 
			
		||||
                  toast({
 | 
			
		||||
                    id,
 | 
			
		||||
                    title: t('common.success'),
 | 
			
		||||
                    description: t('controller.devices.finished_upgrade', { serialNumber: device.serialNumber }),
 | 
			
		||||
                    status: 'success',
 | 
			
		||||
                    duration: 5000,
 | 
			
		||||
                    isClosable: true,
 | 
			
		||||
                    position: 'top-right',
 | 
			
		||||
                  });
 | 
			
		||||
                }
 | 
			
		||||
              },
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
              id: `device-disconnected-upgrade-${device.serialNumber}`,
 | 
			
		||||
              type: 'DEVICE_DISCONNECTION',
 | 
			
		||||
              serialNumber: device.serialNumber,
 | 
			
		||||
              callback: () => {
 | 
			
		||||
                const id = `device-disconnection-upgrade-notification-${device.serialNumber}`;
 | 
			
		||||
 | 
			
		||||
                if (!toast.isActive(id)) {
 | 
			
		||||
                  toast({
 | 
			
		||||
                    id,
 | 
			
		||||
                    title: t('common.success'),
 | 
			
		||||
                    description: t('controller.devices.started_upgrade', { serialNumber: device.serialNumber }),
 | 
			
		||||
                    status: 'success',
 | 
			
		||||
                    duration: 5000,
 | 
			
		||||
                    isClosable: true,
 | 
			
		||||
                    position: 'top-right',
 | 
			
		||||
                  });
 | 
			
		||||
                }
 | 
			
		||||
              },
 | 
			
		||||
            },
 | 
			
		||||
          ]);
 | 
			
		||||
        },
 | 
			
		||||
        onError: (e) => {
 | 
			
		||||
          if (axios.isAxiosError(e)) {
 | 
			
		||||
            toast({
 | 
			
		||||
              id: `upgrade-to-latest-error-${device.serialNumber}`,
 | 
			
		||||
              title: t('common.error'),
 | 
			
		||||
              description: e?.response?.data?.ErrorDescription,
 | 
			
		||||
              status: 'error',
 | 
			
		||||
              duration: 5000,
 | 
			
		||||
              isClosable: true,
 | 
			
		||||
              position: 'top-right',
 | 
			
		||||
            });
 | 
			
		||||
          }
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
    );
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  const handleConnectClick = () => getRtty();
 | 
			
		||||
  const handleRebootClick = () => onOpenRebootModal(device.serialNumber);
 | 
			
		||||
 | 
			
		||||
  return (
 | 
			
		||||
    <Menu>
 | 
			
		||||
      <Tooltip label={t('common.actions')}>
 | 
			
		||||
        {size === undefined || isCompact ? (
 | 
			
		||||
          <MenuButton
 | 
			
		||||
            as={IconButton}
 | 
			
		||||
            aria-label="Commands"
 | 
			
		||||
            icon={isRtty ? <Spinner /> : <Wrench size={20} />}
 | 
			
		||||
            size={size ?? 'sm'}
 | 
			
		||||
            isDisabled={isDisabled}
 | 
			
		||||
            ml={2}
 | 
			
		||||
          />
 | 
			
		||||
        ) : (
 | 
			
		||||
          <MenuButton
 | 
			
		||||
            as={Button}
 | 
			
		||||
            aria-label="Commands"
 | 
			
		||||
            rightIcon={isRtty ? <Spinner /> : <Wrench size={20} />}
 | 
			
		||||
            size={size ?? 'sm'}
 | 
			
		||||
            isDisabled={isDisabled}
 | 
			
		||||
            ml={2}
 | 
			
		||||
          >
 | 
			
		||||
            {t('common.actions')}
 | 
			
		||||
          </MenuButton>
 | 
			
		||||
        )}
 | 
			
		||||
      </Tooltip>
 | 
			
		||||
      <Portal>
 | 
			
		||||
        <MenuList>
 | 
			
		||||
          <MenuItem onClick={handleBlinkClick}>{t('commands.blink')}</MenuItem>
 | 
			
		||||
          <MenuItem onClick={handleOpenConfigure}>{t('controller.configure.title')}</MenuItem>
 | 
			
		||||
          <MenuItem onClick={handleConnectClick}>{t('commands.connect')}</MenuItem>
 | 
			
		||||
          <MenuItem onClick={handleOpenQueue}>{t('controller.queue.title')}</MenuItem>
 | 
			
		||||
          <MenuItem onClick={handleOpenFactoryReset}>{t('commands.factory_reset')}</MenuItem>
 | 
			
		||||
          <MenuItem onClick={handleOpenUpgrade}>{t('commands.firmware_upgrade')}</MenuItem>
 | 
			
		||||
          <MenuItem onClick={handleRebootClick}>{t('commands.reboot')}</MenuItem>
 | 
			
		||||
          <MenuItem onClick={handleOpenTelemetry}>{t('controller.telemetry.title')}</MenuItem>
 | 
			
		||||
          <MenuItem onClick={handleOpenScript}>{t('script.one')}</MenuItem>
 | 
			
		||||
          <MenuItem onClick={handleOpenTrace}>{t('controller.devices.trace')}</MenuItem>
 | 
			
		||||
          <MenuItem onClick={handleUpdateToLatest} hidden>
 | 
			
		||||
            {t('premium.toolbox.upgrade_to_latest')}
 | 
			
		||||
          </MenuItem>
 | 
			
		||||
          <MenuItem onClick={handleOpenScan}>{t('commands.wifiscan')}</MenuItem>
 | 
			
		||||
        </MenuList>
 | 
			
		||||
      </Portal>
 | 
			
		||||
    </Menu>
 | 
			
		||||
  );
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export default React.memo(DeviceActionDropdown);
 | 
			
		||||