Giter Club home page Giter Club logo

webacs's Introduction

WebACS

The WebACS is a platform-independent re-implementation of the AsTeRICS Configuration Suite using HTML5 and Javascript. For more information on AsTeRICS, please refer to AsTeRICS on Github or the AsTeRICS website http://www.asterics.eu.

Clone

To clone the repo ensure to also clone its submodules by

git clone --recurse-submodules https://github.com/asterics/WebACS.git

Run

As the WebACS is based an Javascript totally, index.html can be opened as local file in Firefox (35.0.1 or higher).

It is recommended that the WebACS is hosted on a webserver and started via an http-URL, e.g.

http://localhost:8081/webapps/WebACS/index.html

In this case also Chrome and other browsers are supported.

WebACS query string options

When starting the WebACS certain parameters can be specified in the query string of the URL:

  • openFile: string containing the relative path to the model (must be the same webserver as the one which provides the WebACS) file that shall be opened directly on startup
  • autoConnect: boolean – if true: automatically connects to the ARE upon startup: default is false
  • autoDownloadModel: boolean – if true: automatically downloads the current model from the ARE; will only work if autoConnect is true and no openFile is specified; default is false
  • areBaseURI: string that specifies the URI for the ARE; if not specified, but the WebACS is hosted by an ARE-webservice, the hosting ARE will be used, else localhost will be assumed
  • helpUrlPath: Sets the URL to the online help which shall be used if no ARE connection is active. Example: helpUrlPath=http://localhost:8081/help/

Examples

Docs

For further documentation please refer to documentation subfolder.

Licence

Unless mentioned otherwise, the WebACS is licensed under the Apache License, Version 2.0. You may obtain a copy of the license at

http://www.apache.org/licenses/LICENSE-2.0

This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

Acknowledgement

This project has received funding from the European Union’s Seventh Framework Programme for research, technological development and demonstration under grant agreement no 610510. Visit developerspace.gpii.net to find more useful resources.

webacs's People

Contributors

deinhofer avatar eldufdo avatar klues avatar sabicalija avatar steppoel avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webacs's Issues

Save Model as file encoded as UTF-8 without ByteOrderMark (BOM)

When a model is saved as file it is encoded as UTF-8 with a ByteOrderMark (BOM). In Java UTF-8 file is expected to not have a BOM.

Although the ARE is now capable of dealing with both variants, it would be better to use the identical encoding in all locations of AsTeRICS (ARE, ACS, WebACS).

Default Component Collection

It would be desireable to use the currently installed components of the ARE as the default Component Collection if the WebACS is hosted from the ARE webserver - so that updating the collection becomes obsolete in this case.

WebACS generates invalid model

While testing for asterics/AsTeRICS#269 I noticed that WebACS sometimes seems to generate an invalid model.

My testing model consists of instances of AutostartEvent and and ApplicationLauncher. The property "execution mode" is set to OPEN_URL.

Problem

Building the same model and saving (or uploading it to ARE) results in the ApplicationLauncher instance to have the following property:

ACS:
<property name="executionMode" value="OPEN_URL" />

WebACS
<property name="executionMode" value="1" />

The WebACS model causes an IllegalArgumentException in ARE:
https://github.com/asterics/AsTeRICS/blob/master/ARE/components/actuator.applicationlauncher/src/main/java/eu/asterics/component/actuator/applicationlauncher/ApplicationLauncherInstance.java#L311

Expected Behavior

The model generated by WebACS should correclty generate the model an contain:
<property name="executionMode" value="OPEN_URL" />

Testmodels generated by ACS and WebACS
testmodels.zip

WebACS - repeated warning window if no model is loaded

If there is no model loaded (especially in an error case, see asterics/AsTeRICS#153 ) in the ARE, the WebACS repeats to show:

"No model available for download"

It is not very usable afterwards, because this window shows every ~10s for 5 times at once.

No further error is shown by the ARE console.

Platform: Debian Testing, x64

Add queryString to WebACS URL to auto download component collection from ARE

If the WebACS is hosted by the ARE and loaded from that it would be handy, if the user could specify a URL to automatically download the component collection from the ARE when connecting to the ARE.

This way, the ARE GUI could provide a feature to open and autoconnect the WebACS by a gui button and shortcut.

e.g. http://localhost:8081/webapps/WebACS/?autoConnect=true&autoDownloadComponentCollection=true

if the option is not specified, default should be true.

Properties not displayed for components that are placed per Copy&Paste.

Properties of elements that are created via CTRL+C, CTRL+V are not displayed correctly.

To reproduce this issue, perform following steps:

  1. Select a component already placed inside ACS (Model Designer).
  2. Enter CTRL+C, CTRL+V
  3. Select the newly created element.
  4. Properties are not displayed

Workaround: Don't use CTRL+C, CTRL+V for components creation/placement.

Arduino Events not displayed in EventVisualizer.

Tested ArduinoDigitalOutput on my Ubuntu 16.04.3 (virtualbox 5.2.6 r120293, VBoxGuestAdditions_5.2.7-120528).

When connecting event output of Arduino Microcontroller, no events are displayed in the EventVisualizer.

image

The events from ButtonGrid are displayed correctly, and the connected LED on Digital Output 2 is lighting (-> Pin2 is set, and reset correctly).

image

I've tried also to connect only events from Arduino and removed the connection with the ButtonGrid.

But still, the LED is lighting/not lighting as desired, but no output in the EventVisualizer.

image

File Chooser dialog for model save

when a model is saved, the standard downlaod dialog for files appears.
if would be great if a file chooser would allow to store the model to a desired local directory (defaulting to the model folder)

Add queryString to the WebACS URL to auto download the currently deployed model

If the WebACS is hosted by the ARE and loaded from that it would be handy, if the user could specify a URL to automatically download the model from the ARE when connecting to the ARE. This is related to #12 and #13 . #12 must and #13 should be done before.

This way, the ARE GUI could provide a feature to automatically open the currently deployed model in the WebACS by a gui button and shortcut.

e.g. http://localhost:8081/webapps/WebACS/?autoConnect=true&autoDownloadComponentCollection=true&autoDownloadModel=true

if the option is not specified, default should be false.

Add direct shortcut for plugin search field

When creating/editing a model it's very annoying that you need several steps for inserting a new plugin (Click on components tab, click into search field, Press Enter, Press Enter).

Why not adding a direct short cut for inserting a plugin via search?
e.g. Ctrl+I opens a popup window with a searchfield already focused, ESC cancels the search and Enter confirms it.
Alternatively the shortcut should at least focus the current search field.

Download Component Collection not working

When downloading the Component Collection from the connected ARE, it seems that the new component descriptions are not fully applied. For example there is still a mismatch detected in the Cellboard plugin when the default (autostart) model is loaded from the ARE right after the Component Collection has been updated.

(however the other components like the LipMouse plugin show updates correctly)

It would be desireable to use the currently installed components of the ARE as the default Component Collection if the WebACS is hosted from the ARE webserver - so that updating the collection becomes obsolete in this case.

Testing environment:
platform: RaspberryPi 3
OS: Ubuntu Mate 16.04
browser: Mozilla Firefox 52.02

Zoom level not functional.

Zoom level not adjustable

Changing the position of zoom level slide (see screenshot) has no effect on percent value (100%) or actual zoom level of WebACS.

Low zoom level High zoom level
image image

Improve snapping of graphical elements

When creating an event connection, the user must click onto the event trigger icon and the event listener icon.
Unfortunately the elements can't be clicked easily. The same problem exists for port icons.
image

Solution

Add mouse snapping functionality if the mouse click is within a range of x pixels.

Logo proposal for WebACS

Hi @asterics
I want to create my portfolio and therefore I am contributing with open source repositories.
I can Present a logo that represents your project.
Thanks for your time
Cheers!

Properties of Components not shown in WebACS/ No reaction of Property Editor.

Description

Just tried the asterics-camerainput-cameramouse and asterics-microcontroller-arduino demo.

When I open use Edit Model -> Open in WebACS the model is opened successfully.
Even connection and interaction with (locally) running ARE works fine.

But when I select one of the components in the model in the WebACS, there is no reaction of the property editor. I've tried it several times, both with FireFox and Chrome. And I'm able to reproduce this behavior.

How to reproduce

  1. Start the any demo by opening index.html of the respective demo repository
  2. Click on Open in WebACS
  3. Select any component
  4. No reaction of the property editor. Configuration is not possible.

image

I've tried those examples on a Ubuntu 16.4.3 inside a virtualbox (v: 5.2.8 r121009 (Qt5.6.1)).

Workaround

The only way I was able to force the property editor to react was when performing following steps:

  1. Select a component of the model.
  2. Click on Download Model

image

A new tab is opened with the model, currently running in the ARE.
When switching back to the previous tab, the properties of the component selected (at step 1) are now displayed in the property editor.

I'll test different setup/scenarios in future an report it here, so that problem can be localized and removed in future.

Name property not in sync in Model/GUI Designer.

Name (property) is not synchronized between Model and GUI Designer.

This issues has a "funny" side effect, where the GUI Designer has two element with the same name property. -> No reliable configuration is possible anymore.

Following steps are necessary to reproduce it:

  1. Place any component, e.g. a ButtonGrid.
  2. Change the default name ButtonGrid.1 to any different name, e.g. Button 1.
  3. Place a second component of the same type, i.e. ButtonGrid.
  4. Because ButtonGrid.1 is not reserved anymore (due to renaming), the second ButtonGrid gets ButtonGrid.1 assigned.

If you switch to GUI Designer again, two element will be visible, with the same name ButtonGrid.1.
There is no straightforward way to figure out, which of them belongs to the first or second, except for trail-and-error approaches.

Add copy/paste functionality between model tabs

The WebACS supports editing several model files in seperate tabs (see pic). It would be very handy to if model contents could be copied from one model to another with typical shortcuts and mouse actions.

grafik

Tab switch between models fires many events and is slow

If you have several models opened in the WebACS and click on another model tab within the webacs to switch to the other model, many javascript events are fired, see:

Switching tab
image

Web console with Javascript events

Selection_090

This also leads to many requests to the ARE, as can be seen in the debugging output of the ARE:

image

This slows down the switching tremendously!!

Maybe this is also the reason why the webacs is very slow on low-powered PCs?

Model plugins not visible in WebACS canvas.

When opening a model within plugins layouted at high coordinates (x >= 3000) in the WebACS the respective plugins are not visible any more.

image

Opening the model file in a text editor shows coordinates for the Comparator.1.2 plugin of

<layout>
        <posX>3169</posX>
        <posY>0</posY>
      </layout>

joystick_simple_ungrouped.txt

The canvas size of the WebACS is 3000x2000, the canvas size of the ACS is 4000x2000

Possible solutions:

  • increase (align) WebACS canvas to the same size as ACS
  • sanity check plugin positions and boundaries
  • sanitize plugin positions

provide correct filename for store/save dialogs

if a model is downloaded from the ARE (in order to make changes using the webACS)
it should be possible to store the changes to the same model file on the ARE.
When "Store Model on ARE" is clicked, a default model filename is suggested "e.g. newFile.acs" - the user has no option to overwrite/update the original file.

It would be good to provide the original path/filename of the downloaded model in order to allow updates of this model via the "store model on ARE" dialog or use the original model name for the "save model" dialog.

Memory Leak when closing a model/tab ?

When opening a new model tab in the WebACS, about 100 MB of RAM are allocated,
but when closing the tab only a small portion is released. On the RaspberriPi this leads to severe problems and sstem hangs after 4 or 5 tabs have been created/closed.
Apart from finding this leak, it would be desireable reduce RAM requirements for smaller platforms.

Testing environment:
platform: RaspberryPi 3
OS: Ubuntu Mate 16.04 LTS
browser: Mozilla Firefox 52.02

Layout / rendering problems

The layout of the menu bar and the captions for the icon-groups look broken on Mozilla / RaspberryPi. (The icons partly occlude the captions). The Icon-bar, designer window and property editor do not respond well to the changes of the window size.

Testing environment:
platform: RaspberryPi 3
OS: Ubuntu Mate 16.04
browser: Mozilla Firefox 52.02

Grouping of sensor, processors and actuators should be more intuitive and user friendly.

I'm new in the AsTeRICS world. I guess I'm not all too used to the concept behind asterics.

However, every time I look for new components, I have to look through nearly every group to discover new items but also to find components I used before.

Would be great if we could wrap the currently static group assignment into a more intuitive and flatter hierarchy.

We could add more groups to the components "ribbon", like sensors, user input, visual output, word processing, string processing, etc. and make more use of the great empty space..

image

GUI designer does not sanitize plugin GUI coordinates if the are outside of visible area

If you open a model containing ARE-GUI widgets with coordiniates in a non-visible area the GUI-designer does not sanitize the coordinates. This way it can happen, that the widget is not visible in the ARE GUI windows.

image

Solution

  • Do sanity check, if the coordinates are within the GUI boundaries.
  • Additionally the ARE should also check if the widgets are within the screen dimensions.

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.