Giter VIP home page Giter VIP logo

rdm-app's Introduction

rdm-app

Build Status

This is the codebase for the rdm.openlighting.org website.

If you're intested in how PID definitions work, see https://wiki.openlighting.org/index.php/RDM_PID_Definitions

Development Setup

On the production instance, the javascript is minified using UglifyJS. Before you start changing the code, or deploy to appengine you'll need to download the javascript tools that are used for this process.

The tools are managed using nodejs's package manager npm. The packages are downloaded using npm and bower. Bower is called using grunt

If all of this seems rather complex don't despair, once everything is installed it's very easy to use.

1, Install npm.

2, Install grunt-cli globally yourself by running either

npm install -g grunt-cli

or

sudo npm install -g grunt-cli

3, Use npm to install the remaining dependencies. In the root directory of the project run:

npm install
grunt bower

This will install the node.js dependencies (grunt, bower, karma) and then run the grunt task for installing the bower packages.

Important!

The bower packages should only be installed using grunt, since grunt will place them in static/libs, where both appengine & karma expect them. Calling bower directly will install them in bower_components.

Common Tasks

Tasks are managed using Grunt. To see a list of tasks run:

grunt --help

Run the Unit Tests

The newer Angular code is unit-tested using karma. The tests are in unit-test-js/tests/rdm.js and the karma configuration in unit-test-js/karma.conf.js. The test can be run with:

grunt unit-test

It does require Firefox and the dependencies to be installed to be able to run the test.

Compress / Uglify

To minifiy the Javascript code, run

grunt compress

This will run jshint which enforces style guidelines and then if jshint passes, runs uglifyjs to compress the javascript code.

If you are continuously editing the source and testing it, you can have grunt automatically perform the compression when the source files change by running

grunt compress-watch

Debugging

If you are having trouble with debugging the minified sources you can copy the files to the static dir (without compression) by using:

grunt copy-once

Again, this will run jshint and the copy the sources over to static/js/

If you want an automatic copy when the files change, use:

grunt copy-watch

Important!

When you are finished debugging, remember to run

grunt copy-cleanup

otherwise the files won't be compressed

Changing app.js

After changing app.js, you have to build the compiled Google Closure script by using:

grunt closure-compiler

Running the App Engine locally

If you want to run the server locally for debugging, download and install the Google Cloud Tools. Then you can start the server locally using:

/path/to/google-cloud-tools/dev_appserver.py /path/to/rdm-app/

On the first run, you are asked to install some additional components for Google Cloud Tools.

You can access the local server at http://localhost:8080/. Logging in at /admin only works with one of the white-listed email addresses. Those are stored in admin.py's BaseAdminPageHandler class.

If you want to add more RDM devices / nodes / etc. for testing, add them to the respective file in the data/ directory.

Deploying to App Engine

Before deploying to App Engine run:

grunt compress

You can then run appcfg.py to deploy.

TODO(someone): Automate this using Grunt.

rdm-app's People

Contributors

bartvanstiphout avatar daveol avatar fischbas avatar floedelmann avatar fraserconnolly avatar kripton avatar msearancke avatar nightrune avatar nils-van-zuijlen avatar nomis52 avatar peternewman avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

rdm-app's Issues

Extra RDM developer tools

The following would be useful:

EUID calculator:

Enter a UID and it shows you the matching EUID

EUID Decoder

Paste in a hex dump and see the UID and if the checksum matches.

PID Lookup:

A table listing all of the PIDs, what document they are in, and with a filter search function to search by name or PID number

Packet Decoder:

Pasts in a hex-dump, and it will separate out the fields and tell you if the checksum is valid.

Make the UI based on angularjs and json api's

replace the python template engine with static html pages in combination with angularjs and json api's for faster loading times and less stress on the server, also the ability to make a html based app for mobile platforms. also a directory restructuring wouldn't hurt.

Make manufacturer names be ordered case insensitively

Currently e.g. eldoLED is at the bottom, it should be with the E's. This is down to how GAE Datastore works, so we'd need to fix it in our Python, what's the performance hit?

Likewise the device by manufacturer etc drop downs.

Add a CSS Linter

To catch issues like:

I guess this file is not preprocessed since it's in the static folder? Then you should use /* โ€ฆ */ for comments, CSS doesn't support //.

Originally posted by @FloEdelmann in #265 (comment)

bootstrap.min.css.map missing

In Chrome:

Uncaught TypeError: Cannot read property 'opener' of null jquery.min.js:3Ca jquery.min.js:3n.cssHooks.(anonymous function).set jquery.min.js:3n.extend.style jquery.min.js:3(anonymous function) jquery.min.js:4K jquery.min.js:2n.fn.(anonymous function) jquery.min.js:4(anonymous function) jquery-ui.min.js:5(anonymous function) jquery-ui.min.js:5
GET http://rdm.openlighting.org/libs/bootstrap/css/bootstrap.min.css.map 404 (Not Found) 

And indeed it's missing:
http://rdm.openlighting.org/libs/bootstrap/css/bootstrap.min.css.map

The minified version is there fine though:
http://rdm.openlighting.org/libs/bootstrap/css/bootstrap.min.css

A missing manufacturer entry confuses responder moderation

The admin homepage reports:
n Responders in the moderation queue

But when you click into it, it tells you there are no responders left to moderate.

This is because of:


{% else %}
{% if device_id %}
Unknown manufacturer {{ manufacturer_id }}
(0x{{ manufacturer_id|stringformat:"04x" }}). Check the
<a href="http://tsp.esta.org/tsp/working_groups/CP/mfctrIDs.php" target="_blank">TSP</a> page.
{% else %}
No responders in the queue. <a href="/admin">Back</a> to the admin console or
<a href="/admin?action=flush_cache">Flush the cache</a>.
{% endif %}
{% endif %}

Showing a more obvious error would be good at least, or ideally skipping onto the next fixture.

API Content-Type

The JSON and Proto API (e.g. http://rdm.openlighting.org/api/json/1/manufacturers) both return Content-Type: text/plain in their headers. However, common REST APIs (like this) use Content-Type: application/json.

A nice advantage in Firefox is that Content-Type: application/json urls are automatically JSON parsed and prettyprinted (with foldable arrays/objects).

Add more manufacturer PIDs

  • Robe - #100 (comment)
    • ROBE_PT_FEED
    • ROBE_PT_MODE
    • ROBE_MIC_SENS
    • ROBE_THEATRE_MODE
    • ROBE_C_CAL_MODE
    • ROBE_C_MIX_MODE
    • ROBE_UV_MIXING
    • ROBE_WHITE_POINT_8K
    • ROBE_OUTPUT_MODE
    • ROBE_OUTPUT_UNIFORMITY
    • ROBE_OUTPUT_CONSISTENCY
    • ROBE_CRI_SELECTION
    • ROBE_TH_EF_SIM
    • ROBE_DL_COMPATIBLE_MODE
    • ROBE_DISPLAY_INTENSITY
    • ROBE_TOUCHSCREEN_LOCK
    • ROBE_TEMPERATURE_UNIT
    • ROBE_FAN_MODE
    • ROBE_CMY_CONTROL
    • ROBE_DIMMER_CURVE
    • ROBE_BLACKOUT_DMC
    • ROBE_BLACKOUT_PTM
    • ROBE_BLACKOUT_GWM
    • ROBE_BLACKOUT_COLM
    • ROBE_BLACKOUT_TIM
    • ROBE_EXTEND_SC_FUNC
    • ROBE_STAND_ALONE
  • Soundlight - http://www.soundlight.de/techtips/dmx512/slh_rdm_commands.htm
    • All
  • MDG - http://www.mdgfog.com/c/mdg/file_db/document.file_en/M3e-User-Guide-Rev-Ac.pdf and http://www.mdgfog.com/c/mdg/file_db/document.file_en/theONE-User-Guide-Rev-Ae.pdf
    • {'default_value': 0, 'prefix': 0, 'min_value': 0, 'description': 'GENERATOR STATE', 'data_type': 2, 'max_value': 0, 'command_class': 1, 'pid': 32770, 'unit': 0}
    • {'default_value': 0, 'prefix': 0, 'min_value': 0, 'description': 'SAVER (0=30S/1=2MN/2=OFF)', 'data_type': 3, 'max_value': 2, 'command_class': 3, 'pid': 32772, 'unit': 0}
    • {'default_value': 0, 'prefix': 0, 'min_value': 0, 'description': 'AUTO/LOCAL/DMX (0..2)', 'data_type': 3, 'max_value': 3, 'command_class': 3, 'pid': 32773, 'unit': 0}
  • SGM - bartvanstiphout/ola@349f3fd#diff-6a3d17b00514ff8e00435a361b373398R6303
    • All
    • {'default_value': 1, 'prefix': 0, 'min_value': 0, 'description': 'Enable Gamma Correction', 'data_type': 1, 'max_value': 1, 'command_class': 3, 'pid': 34339, 'unit': 0}
    • {'default_value': 0, 'prefix': 0, 'min_value': 0, 'description': 'Invert Pixel Order', 'data_type': 1, 'max_value': 1, 'command_class': 3, 'pid': 34345, 'unit': 0}
    • {'default_value': 0, 'prefix': 0, 'min_value': 0, 'description': 'Dim Mode 0=Standard 1=Max Power', 'data_type': 3, 'max_value': 1, 'command_class': 3, 'pid': 34344, 'unit': 0}
    • {'default_value': 0, 'prefix': 0, 'min_value': 0, 'description': 'Serial Nr.', 'data_type': 2, 'max_value': 0, 'command_class': 1, 'pid': 32864, 'unit': 0}
  • Creative Lighting And Sound Systems e.g. http://www.creativelighting.com.au/images/documents/SLAMMO%20V4-P%206ch%20User%20Manual.pdf
    • Device Curve
  • Artistic Licence
    • DALI PIDs
  • ARRI - https://www.arri.com/?eID=registration&file_uid=19468
    • All

Responder Info to Reimport

Once the new code is live, we need to set these back to processed=false and re-run them:
5632842922983424

Should re-run others when slot info can be handled too...

When sensor description is supported, re-run:
6202727348568064

Skip as suspected manually generated:
5652104307802112
5658617961250816
5659080240660480
5669793197719552
5733560778489856
5746609660887040

Don't delete manufacturer IDs

It causes lots of knock ons if they're linked to other data like responders.

Check but I assume the manufacturer update process did this, if so maybe just report a warning and allow a manual deletion in the extremely rare case where it's actually required.

E.g.
5734388809596928
becomes
5631596510052352

Responder publishing doesn't finish

http://rdm.openlighting.org/incoming/model_data

It doesn't show the progress message or an error.

See previous report by Petr:
https://groups.google.com/forum/#!topic/open-lighting/H4NY7hDuG1U

So i will use rdm_model_collector and will publish via http://rdm.openlighting.org/incoming/model_data , although i am not sure if it works, i am getting:

TypeError: c is null jquery.min.js:3:16491
TypeError: dialog.dialog is not a function

In FIrefox and

jquery.min.js:3 Uncaught TypeError: Cannot read property 'opener' of null
model_data:175 Uncaught TypeError: dialog.dialog is not a function

in Chromium

Various UI Tweaks

These are non-blocking, I've filed another issue with the blocking bugs

Tools Page

  • Can you add a bit of vertical space between the headings and the input fields
  • Can you put the result in a frame, possibly with a grey background and rounded corners. See attached mock up.
    screen shot 2015-04-18 at 10 36 17 pm

About Page

  • Same comment here, add some vertical whitespace around the titles

Controllers

  • The responsive design causes some funny layouts, since we still fetch 16 objects per page. See attached.
    screen shot 2015-04-18 at 10 47 39 pm . This can probably wait until we move to an AJAX based page.

Devices

  • It would be good to unify the Browse page with the Search by ... , like the other categories.

Manufacturers

  • I'd split the Manufacturer ID into two columns, one for decimal and one for hex.

URL paths featuring spaces don't get correctly escaped

http://raw.githubusercontent.com/OpenLightingProject/logos/master/web fitted/OLA-Logo-Fitted-48px%402x.png

I 13:04:41.031 fetching http://raw.githubusercontent.com/OpenLightingProject/logos/master/web fitted/OLA-Logo-Fitted-48px%402x.png
I 13:04:41.068 image fetch failed. http://raw.githubusercontent.com/OpenLightingProject/logos/master/web fitted/OLA-Logo-Fitted-48px%402x.png -> 404

Compared to:
13:04:40.652
fetching http://raw.githubusercontent.com/OpenLightingProject/logos/master/web%20fitted/OLA-Logo-Fitted-48px%402x.png

UI comments

Comments / Suggestions from #10

  • I'd removed the "RDM Manufacturer Library" in the top left, since there isn't really a 'Home' page for this site.
  • In the manufacturer list, it would be good to be able to filter by id. Right now I always just Control-F to lookup the manufacturer id
  • Also on the manufacturer list, it may be worth breaking out the decimal and hex values into separate columns.
  • On the About page, the heading are rather compacted. I think a bit more whitespace would make it easier to read.
  • On the device page, some more whitespace around the devices would be good, see screenshot. The other pages (Splitters, Software etc.) have a good amount of spacing. screen shot 2015-04-05 at 9 15 21 am
  • At least on my machine, whenever there is a select list followed by a button, the two are joined, eg http://rdm.bewaar.me/model/manufacturer?manufacturer=8482 . See attached screenshot
    screen shot 2015-04-05 at 9 16 39 am
  • On the devices search by .... pages, can you make the table fill the entire width of the screen.
    screen shot 2015-04-05 at 9 18 53 am

New UI Bugs

These are the blockers, I've filed a separate bug with the nice-to-haves.

Parameters Page

Controllers

  • Searching by manufacturer results in an error. For example if I click 'Controllers', then click 'Search' I get http://rdm.bewaar.me/controller/browse?manufacturer=16708 which is a 500. The same URL loads on the main site so this may be a data issue?
  • Clicking on a picture of a controller doesn't do anything.

Software / Ethernet Nodes / Splitters

  • Same 2 bugs as Controllers

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.