ember-cli-onedata-common is an EmberJS in-repo addon that contains components, services, styles and other EmberJS application resources as well as static resources (images, fonts) for building Onedata web applications:
op-gui-default
oz-gui-default
oz-gui-homepage
Use this repo as a subtree in Ember application lib
directory, which in case of Onedata apps is placed in: src/lib/
.
If you want to modify this addon from specific Onedata project, do from project's root:
- add a remote:
git remote add ember-cli-onedata-common ssh://git@git.plgrid.pl:7999/vfs/ember-cli-onedata-common.git
- pull recent changes:
git subtree pull --squash --prefix=src/lib/ember-cli-onedata-common ember-cli-onedata-common develop
(you can use other branch name thandevelop
) - make changes in
src/lib/ember-cli-onedata-common
and commit them - push changes to project's repo:
git push
- push changes to addon repo:
git subtree push --squash --prefix=src/lib/ember-cli-onedata-common ember-cli-onedata-common <branch_name>
The project has structure of standard Ember CLI in-repo addon. See: https://ember-cli.com/extending/#addon-project-structure
The addon provides common Onedata web application components, helpers, services, etc. Visit their standard addon directories to see their documentation.
One of the important parts of the addon is integration with GUI backend, which can be presented as a chain of dependent modules:
authenticator:basic
-> service:session
-> service:session-core
-> service:server
-> adapter:onedata-socket
These modules and other interesting parts of the addon are described in more details below.
Onedata front-end appliactions communicate with Onedata GUI backend via WebSockets using JSON messages.
The adapter:onedata-websocket
provides:
- Ember adapter implementation (model handling),
- RPC calls (specific to Onedata, see
RPC
method andservice:server
'sprivateRPC
andpublicRPC
).
Currently adapter:onedata-websocket
performs all "low-level" communication using WebSocket object.
Currently is an facade for backend (WebSocket and RPC) and for "low-level" WebSocket operations uses adapter:onedata-websocket
.
A session implementation for ember-simple-auth
. It consists of two modules:
service:session-core
- implements most ofember-simple-auth
's session and stores main information about session; usesservice:server
service:session
- handles session events like connection started or connection lost; informs user about WS connection issues
All Onedata Ember web applications use ember-simple-auth (https://github.com/simplabs/ember-simple-auth).
This addon provides authenticator:basic
which uses session state (see: service:session
) to resolve or reject session.
The oneicon
font provides a set of icons used in Onedata front-end.
It is generated using Icomoon web application (https://icomoon.io). Source files are in SVG format, with size 128x128px, using only black color.
They are currently not published in any repository.
To use icons, you can import a onedata-common
(all common onedata styles) SCSS file to your main SCSS or oneicons
for only icons.
Settings of Icomoon for generating icons are:
- Font name:
oneicons
- Class prefix:
icon-
- Support IE8
- Generate stylesheet variables for: Sass
- CSS Selector: Use attribute selector
- Em square height: 1024
- Baseline height: 0
- Whitespace width: 0
Package generated with Icomoon is placed in public/assets/fonts/oneicon
directory.
The directory contains also demo.html
file for browsing icons.
Icons can be used with one-icon
component (included in gui) or icon
helper (only in op-gui-default
).
They can be also used in pure HTML:
<span class="oneicon oneicon-(icon-name)"></span>
Tests are in test-support
directory - they are merged with tests tree of the project that uses this addon.
Start specific project tests to start tests.