Skip to content

peteboothroyd/Dragoman

 
 

Repository files navigation

Dragoman

An open source GUI for polyglot, a universal gRPC client

Build Status

Dragoman

This is an open source project to allow easy debugging of gRPC services, and leverages polyglot. It is powered by Electron, react and redux.

Getting Started

Prerequisites

Polyglot requires java runtime 1.8. If on mac use

brew update
brew cask install java

Or download from oracle.

Installing

Download the latest version from the releases tab.

  • If you have no polyglot experience/setup consider reading through this readme.
  • Polyglot by default looks to ~/.polyglot/config.pb.json for its configuration. Define settings here or override them in the UI.
  • Note not all settings can be defined in the UI currently.
  • Logs can be viewed from View/Toggle Developer Tools/Console.
  • An example config might be (remember to insert the OAuth secret, path to refresh token, and update the proto discovery paths as appropriate):
{
    "configurations": [
        {
            "name": "production",
            "call_config": {
                "use_tls": "true",
                "oauth_config": {
                    "refresh_token_credentials": {
                        "token_endpoint_url": "https://auth.improbable.io/auth/v1/token",
                        "client": {
                            "id": "improbable_cli_client_go",
                            "secret": "{{INSERT CLIENT SECRET HERE}}"
                        },
                        "refresh_token_path": "{{INSERT PATH TO REFRESH TOKEN HERE}}"
                    }
                }
            },
            "proto_config": {
                "proto_discovery_root": "/Users/peteboothroyd/Projects/platform/proto",
                "include_paths": [
                    "/Users/peteboothroyd/Projects/platform/go/src",
                    "/Users/peteboothroyd/Projects/platform/go/src/github.com/gogo/protobuf/protobuf",
                    "/Users/peteboothroyd/Projects/platform/go/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis"
                ]
            }
        }
    ]
}

Known Issues

  • Polyglot is known to hang if authentication fails, causing the request to hang indefinitely. Cancel the request, get a new refresh token and try again.
  • Text editors do not automatically resize. Reload the page (View -> Reload).
  • No option to define whether to use TLS in UI
  • No filtering of services/methods in UI
  • Difficult to read service/method name
  • Configuration setup is awkward and error prone

Screenshot

Dragoman Demo

Development

To get start clone the repo:

git clone https://github.com/peteboothroyd/Dragoman.git your-project-name

And then install dependencies.

$ cd your-project-name && npm install

Run

Run these two commands simultaneously in different console tabs.

$ npm run hot-server
$ npm run start-hot

DevTools

Toggle Chrome DevTools

  • OS X: Cmd Alt I or F12
  • Linux: Ctrl Shift I or F12
  • Windows: Ctrl Shift I or F12

See electron-debug for more information.

DevTools extension

This boilerplate is included following DevTools extensions:

You can find the tabs on Chrome DevTools.

If you want to update extension versions, please set UPGRADE_EXTENSIONS env, just run:

# For macOS
$ UPGRADE_EXTENSIONS=1 npm run dev

# For Windows
$ set UPGRADE_EXTENSIONS=1 && npm run dev

Packaging

To package apps for the local platform:

$ npm run package

To package apps for all platforms:

First, refer to Multi Platform Build for dependencies.

Then,

$ npm run package-all

To package apps with options:

$ npm run package -- --[option]

Further commands

To run the application without packaging run

$ npm run build
$ npm start

To run End-to-End Test

$ npm run build
$ npm run test-e2e

Packages

No packages published

Languages

  • TypeScript 51.2%
  • JavaScript 46.5%
  • Protocol Buffer 1.3%
  • Other 1.0%