Announcement
· Oct 2, 2020

Csvgen-UI

Introduction

This is a csvgen UI frontend in Angular 8.
The aim of this project is to easily import csv file to Iris from a web ui.

Demo

Demo

Install with ZPM

It will automatically install the dependency of csvgen and sslclient

zpm "install csvgen-ui"

This will create two new endpoints :

  • One for the Rest API for uploading files

    • /api/{namespace}/csvgen/
  • One for the UI

    • /csp/{namespace}/csvgen/index.html

Stand alone demo on docker

Run the server

docker-compose up -d

UI

The UI is per-namespcae, this mean it will be available only for the namespace where csvgen-ui is install.
For example :

http://localhost:52773/csp/{namespace}/csvgen/index.html

Misc

Visual Studio Directory Structure

.
├── front
│   ├── e2e
│   │   └── src
│   └── src
│       ├── app
│       │   └── file-upload
│       ├── assets
│       └── environments
└── src
    └── CSVGEN
        └── API

Where front is the angular UI and src is the backend source code for IRIS.

How it works

Simple REST Api on post web using form-data.

  • file is the binary file

    • It's retrieve in ObjectScript with this line :
set stream = %request.GetMimeData("file")
  • body is the json information to integrated csv in IRIS

    • It's retrieve in ObjectScript with this line :
set body = %request.Get("body")

Give it a try, and let me know any bug on OpenExchange or github.

Discussion (2)1
Log in or sign up to continue