Giter Club home page Giter Club logo

graphvizwebeditor's Introduction

GraphViz editor

Project Stage Badge: Production Ready License Badge

Introduction

A GraphViz editor.

Installation

Install instructions

To install this app yourself, you first need to clone the git repo. If you clone the git repo on Github you should substitute the repo URL with your own.

git clone https://github.com/potherca/GraphvizWebEditor.git
cd GraphvizWebEditor

Now create an Heroku App, add the Multi Buildpack and deploy the code to Heroku:

heroku apps:create my_awesome_app_name
heroku buildpack:set https://github.com/heroku/heroku-buildpack-multi
git add -u .
git push heroku master

If you run into problems with the composer.lock file, download Composer, run an update and commit the lock file:

curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
composer update
git add composer.lock

Re-deploy to Heroku

To redeploy to Heroku, this trick might be handy:

git push -f heroku master^:master
git push heroku master

It pushes the previous version and then the current version to Heroku.

Done!

This information should be good enough to get you up and running!

Buildpacks

This app used the following buildpacks for Heroku:

These buildpacks will be automatically picked up if you set the heroku-buildpack-multi (as indicated above).

Credits

Want to contribute or see the project progress? Visit the [Waffle Page]!

graphvizwebeditor's People

Contributors

codelingobot avatar potherca avatar renovate-bot avatar waffle-iron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

graphvizwebeditor's Issues

AJAX post request

Currently the submit causes a full POST, causing a delay in the rendering, this should be replaced by an AJAX call, accompanied by a visual cue to show this is going on.

To achieve this we should create an API endpoint for the interface to consume instead of just doing a postback.

Add API endpoint

We need to have an API endpoint for consumers to access directly. This would also expose the functionality to embed graph text,log and images from other sources.

This needs to be resolved before #8 can be properly implemented

Make "Show Previous Diagram" real-time

The "Show Previous Diagram" button should toggle the image immediately, not just after a postback.

For this to be omplemented, the previous diagram should always be send, regardless wheter or not it is to be displayed.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

composer
composer.json
  • league/flysystem ~2.0
  • symfony/process ~5.0
  • phptal/phptal ~1.3

  • Check this box to trigger a request for Renovate to run again on this repository

Changes to graphs not displayed when using token.

There is a bug when retrieving a graph using ?token=HASH.

When the graph text is changed and submitted, the changes get overwritten by the content of the graph related to the hash.

Either new content needs to take priority over the hash graph, or the hash needs to be stripped from the POST url.

Also, instead of using ?token it would be nicer to just use a RESTfull URL scheme, with the hash being part of the resource instead of part of the options. The hash is, after all, just another representation for the data in the POST graph.

Support yuml syntax

We all love Yuml. It would be nice if we could support the yuml syntax (since it is thought out pretty decently.

As yuml syntax is a DSL we could use something like parsec to generate a DOT file from the yuml input.

The only question I am unsure of is how to detect whether or not we are in dot or yuml mode. The user shouldn't have to state this, the application should be able to automatically detect this.

Add a license!

Looks like I forgot to add a license to this project. AGAIN!

Will I ever learn?

Anyway, to remedy this oversight a license needs to be added to the repo and mentioned in the readme file.

And maybe next time, do this before first push, yeah?

Persist Log Output along with .dot and image files.

This is a follow-up from Issue #4.
The question that remains is what to do with the errors from a previous run?

We should save the generated output in a log file and include that with any following commit of the same data, instead of just saying "file already exists"

Add link to generated graph

There should be a link to the generated image. The graph preview could be used for this, although this would have repercussions if we switch to SVG as the output type, as the generated SVG might have links itself.

Image is created dispite of errors but not displayed

Sometimes when an error is returned by dot the graph image is still created.
When the same data is submitted again the image generated by the previous submit is actually shown.

Instead of trusting Graphviz error codes it might be saner to just check if an image file was generated and base error output on that validation.

The only question that remains is what to do with the errors from the previous run?
We could save the generated output in a log file and include that with any following commit of the same data, instead of just saying "file already exists"

Auto update image from graph changes

Although there is a sound logic behind having to submit a graph before the image is updated, it can be handy at time (working on smaller or more experimental graphs) to have an auto-submit/auto-update feature. This should be optional/settable through the interface.

Use a remote File Storage system

To be able to run this on Heroku we need to move file storage away from the local file system and into some external file storage. The Amazon Web Services Simple Storage Service (AWS S3) seems a good candidate, although other candidates are also available (RackSpace, Google Cloud, etc. Or we could abuse Dropbox/Copy.com style services).

The easiest way to implement this would be to refactor the code to use the FlySystem local adapter and when this works, switch over to the AWS S3 adapter. This would also make development easier as we could make the adapter configurable. (We wouldn't want to use up our entire free quota just debugging, now would we?)

If an other service provider seems more attractive than AWS we could create an adapter for it.

Read available image types from config

Instead of hard-coding available image type, they should be read from a config file.

That way the build script can overwrite that config file with the image types that are actually supported by the dot build on the server.

Use PHPTAL for templates

Instead of the PHP ridden mess it is now, the template should been clean XML parsed by PHPTAL.

Responsive design

The current implementation of the UI does not play nice with smaller screens and (in combination with the text-area enhancement) does not work on mobile devices.

Although supporting phones might be a bit of a stretch, tablets should be no problem.

A new/better design needs to be draw, mobile first style, and the text-area enhancements might need to be left out for touch devices (at least until a better alternative has been found).

This new design needs to take the needs of several other issues into account that also will also need screen-space.

Use a wrapper around the shell command

Commit 9dea856 adds a first step towards wrapping the shell command that executes dot in a separate piece of code, this should be improved upon to make use of the symfony/process component (manual).

This is especially useful in regards to making it easier to extend the execution options later.

Update to new Heroku PHP support

This project should be updated to make use of the new Heroku PHP functionality.

This should be as easy as using the improved Heroku buildpack for PHP instead of our custom one, updating the Procfile to contain the following:

web: vendor/bin/heroku-php-apache2 web

And possibly some other trivia.

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

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

  • D3 photo D3

    Data-Driven Documents codes.