dashboard

command module
v0.0.0-...-6339223 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

README

dashboard

Prerequisites

Develop

Prerequisite software

The following software programs need to be installed:

  1. git
  2. make
  3. docker
Clone repository
  1. Set these environment variable values:

    export GIT_ACCOUNT=docktermj
    export GIT_REPOSITORY=dashboard
    export GIT_ACCOUNT_DIR=~/${GIT_ACCOUNT}.git
    export GIT_REPOSITORY_DIR="${GIT_ACCOUNT_DIR}/${GIT_REPOSITORY}"
    
    
  2. Follow steps in clone-repository to install the Git repository.

Local development
  1. Run code. Example:

    cd ${GIT_REPOSITORY_DIR}
    make run
    
    
Local web development
  1. To view the user interface, with no underlying enablement. Example:

    docker run \
        --publish 8259:80 \
        --rm \
        --volume ${GIT_REPOSITORY_DIR}/dashboard/static:/usr/share/nginx/html:ro \
        nginx
    
    

    Visit localhost:8259

Build binary
  1. Build binary. Example:

    cd ${GIT_REPOSITORY_DIR}
    make build
    
    
  2. Run binary. Example:

    ${GIT_REPOSITORY_DIR}/target/linux/dashboard --help
    
    
  3. Run service. Example:

    cd ${GIT_REPOSITORY_DIR}
    ./target/linux/dashboard
    
    

    Visit localhost:8259

Package
Package RPM and DEB files
  1. Use make target to run a docker images that builds RPM and DEB files. Example:

    cd ${GIT_REPOSITORY_DIR}
    make package
    
    
  2. The results will be in the ${GIT_REPOSITORY_DIR}/target directory. Example:

    tree ${GIT_REPOSITORY_DIR}/target
    
    
Test DEB package on Ubuntu
  1. Determine if dashboard is installed. Example:

    apt list --installed | grep dashboard
    
    
  2. ✏ Install dashboard. Example:

    cd ${GIT_REPOSITORY_DIR}/target
    sudo apt install ./dashboard-0.0.0.deb
    
    
  3. Run command. Example:

    export LD_LIBRARY_PATH=/opt/senzing/g2/lib/
    dashboard
    
    

    Visit localhost:8259

  4. Remove dashboard from system. Example:

    sudo apt-get remove dashboard
    
    
Test RPM package on Centos
  1. Determine if dashboard is installed. Example:

    yum list installed | grep dashboard
    
    
  2. ✏ Install dashboard. Example:

    cd ${GIT_REPOSITORY_DIR}/target
    sudo yum install ./dashboard-0.0.0.rpm
    
    
  3. Run command. Example:

    export LD_LIBRARY_PATH=/opt/senzing/g2/lib/
    dashboard
    
    
  4. Remove dashboard from system. Example:

    sudo yum remove dashboard
    
    
Make documents

Make documents visible at hub.senzing.com/dashboard.

  1. Identify repository. Example:

    export GIT_ACCOUNT=senzing
    export GIT_REPOSITORY=dashboard
    export GIT_ACCOUNT_DIR=~/${GIT_ACCOUNT}.git
    export GIT_REPOSITORY_DIR="${GIT_ACCOUNT_DIR}/${GIT_REPOSITORY}"
    
    
  2. Make documents. Example:

    export LD_LIBRARY_PATH=/opt/senzing/g2/lib/
    dashboard docs --dir ${GIT_REPOSITORY_DIR}/docs
    
    
How to update static files
  1. Set these environment variable values:

    export GIT_ACCOUNT=docktermj
    export GIT_REPOSITORY=dashboard
    export GIT_ACCOUNT_DIR=~/${GIT_ACCOUNT}.git
    export GIT_REPOSITORY_DIR="${GIT_ACCOUNT_DIR}/${GIT_REPOSITORY}"
    
    
  2. Bootstrap (with Popper). Example:

    wget \
        --output-document ${GIT_REPOSITORY_DIR}/dashboard/static/css/bootstrap.min.css \
        https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css
    
    wget \
        --output-document ${GIT_REPOSITORY_DIR}/dashboard/static/css/bootstrap.min.css.map \
        https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css.map
    
    wget \
        --output-document ${GIT_REPOSITORY_DIR}/dashboard/static/js/bootstrap.bundle.min.js \
        https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js
    
    
  3. JQuery. Example:

    wget \
        --output-document ${GIT_REPOSITORY_DIR}/dashboard/static/js/jquery.min.js \
        https://code.jquery.com/jquery-3.6.3.min.js
    
    wget \
        --output-document ${GIT_REPOSITORY_DIR}/dashboard/static/css/jquery.dataTables.min.css \
        https://cdn.datatables.net/1.13.1/css/jquery.dataTables.min.css
    
    wget \
        --output-document ${GIT_REPOSITORY_DIR}/dashboard/static/js/jquery.dataTables.min.js \
        https://cdn.datatables.net/1.13.1/js/jquery.dataTables.min.js
    
    
  4. Dashboard. Example:

        export BOOTSTRAP_VERSION=5.2.3
    
        wget \
        --output-document /tmp/bootstrap-${BOOTSTRAP_VERSION}-examples.zip \
        https://github.com/twbs/bootstrap/releases/download/v${BOOTSTRAP_VERSION}/bootstrap-${BOOTSTRAP_VERSION}-examples.zip
    
        unzip \
            /tmp/bootstrap-${BOOTSTRAP_VERSION}-examples.zip \
            -d /tmp
    
        cp --force /tmp/bootstrap-${BOOTSTRAP_VERSION}-examples/dashboard/dashboard.css  ${GIT_REPOSITORY_DIR}/dashboard/static/css/dashboard.css
        cp --force /tmp/bootstrap-${BOOTSTRAP_VERSION}-examples/dashboard/dashboard.js   ${GIT_REPOSITORY_DIR}/dashboard/static/js/dashboard.js
    
    
  5. Feather icons. Example:

    wget \
        --output-document ${GIT_REPOSITORY_DIR}/dashboard/static/js/feather.min.js \
        https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js
    
    

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
The cmd package is used for Cobra integration.
The cmd package is used for Cobra integration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL