diff --git a/.bowerrc b/.bowerrc
deleted file mode 100644
index 959e169..0000000
--- a/.bowerrc
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "directory": "bower_components",
- "analytics": false
-}
diff --git a/.editorconfig b/.editorconfig
deleted file mode 100644
index 219985c..0000000
--- a/.editorconfig
+++ /dev/null
@@ -1,20 +0,0 @@
-# EditorConfig helps developers define and maintain consistent
-# coding styles between different editors and IDEs
-# editorconfig.org
-
-root = true
-
-
-[*]
-end_of_line = lf
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
-indent_style = space
-indent_size = 2
-
-[*.hbs]
-insert_final_newline = false
-
-[*.{diff,md}]
-trim_trailing_whitespace = false
diff --git a/.ember-cli b/.ember-cli
deleted file mode 100644
index ee64cfe..0000000
--- a/.ember-cli
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- /**
- Ember CLI sends analytics information by default. The data is completely
- anonymous, but there are times when you might want to disable this behavior.
-
- Setting `disableAnalytics` to true will prevent any data from being sent.
- */
- "disableAnalytics": false
-}
diff --git a/.gitignore b/.gitignore
index 5ad14dd..927d17b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,17 +1,18 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.
-# compiled output
-/dist
-/tmp
-
# dependencies
/node_modules
-/bower_components
+
+# testing
+/coverage
+
+# production
+/build
# misc
-/.sass-cache
-/connect.lock
-/coverage/*
-/libpeerconnection.log
+.DS_Store
+.env
npm-debug.log*
-testem.log
+yarn-debug.log*
+yarn-error.log*
+
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index d421faa..0000000
--- a/.jshintrc
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "predef": [
- "document",
- "window",
- "-Promise"
- ],
- "browser": true,
- "boss": true,
- "curly": true,
- "debug": false,
- "devel": true,
- "eqeqeq": true,
- "evil": true,
- "forin": false,
- "immed": false,
- "laxbreak": false,
- "newcap": true,
- "noarg": true,
- "noempty": false,
- "nonew": false,
- "nomen": false,
- "onevar": false,
- "plusplus": false,
- "regexp": false,
- "undef": true,
- "sub": true,
- "strict": false,
- "white": false,
- "eqnull": true,
- "esversion": 6,
- "unused": true
-}
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index a75f20e..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-language: node_js
-node_js:
- - "4"
-
-sudo: false
-
-cache:
- directories:
- - $HOME/.npm
- - $HOME/.cache # includes bowers cache
-
-before_install:
- - npm config set spin false
- - npm install -g bower phantomjs-prebuilt
- - bower --version
- - phantomjs --version
-
-install:
- - npm install
- - bower install
-
-script:
- - npm test
diff --git a/.watchmanconfig b/.watchmanconfig
deleted file mode 100644
index e7834e3..0000000
--- a/.watchmanconfig
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "ignore_dirs": ["tmp", "dist"]
-}
diff --git a/README.md b/README.md
index 8081f80..e290b93 100644
--- a/README.md
+++ b/README.md
@@ -1,52 +1,1572 @@
-# villasweb-frontend
+This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).
-This README outlines the details of collaborating on this Ember application.
-A short introduction of this app could easily go here.
+Below you will find some information on how to perform common tasks.
+You can find the most recent version of this guide [here](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md).
-## Prerequisites
+## Table of Contents
-You will need the following things properly installed on your computer.
+- [Updating to New Releases](#updating-to-new-releases)
+- [Sending Feedback](#sending-feedback)
+- [Folder Structure](#folder-structure)
+- [Available Scripts](#available-scripts)
+ - [npm start](#npm-start)
+ - [npm test](#npm-test)
+ - [npm run build](#npm-run-build)
+ - [npm run eject](#npm-run-eject)
+- [Supported Language Features and Polyfills](#supported-language-features-and-polyfills)
+- [Syntax Highlighting in the Editor](#syntax-highlighting-in-the-editor)
+- [Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor)
+- [Debugging in the Editor](#debugging-in-the-editor)
+- [Changing the Page `
`](#changing-the-page-title)
+- [Installing a Dependency](#installing-a-dependency)
+- [Importing a Component](#importing-a-component)
+- [Adding a Stylesheet](#adding-a-stylesheet)
+- [Post-Processing CSS](#post-processing-css)
+- [Adding a CSS Preprocessor (Sass, Less etc.)](#adding-a-css-preprocessor-sass-less-etc)
+- [Adding Images and Fonts](#adding-images-and-fonts)
+- [Using the `public` Folder](#using-the-public-folder)
+ - [Changing the HTML](#changing-the-html)
+ - [Adding Assets Outside of the Module System](#adding-assets-outside-of-the-module-system)
+ - [When to Use the `public` Folder](#when-to-use-the-public-folder)
+- [Using Global Variables](#using-global-variables)
+- [Adding Bootstrap](#adding-bootstrap)
+ - [Using a Custom Theme](#using-a-custom-theme)
+- [Adding Flow](#adding-flow)
+- [Adding Custom Environment Variables](#adding-custom-environment-variables)
+ - [Referencing Environment Variables in the HTML](#referencing-environment-variables-in-the-html)
+ - [Adding Temporary Environment Variables In Your Shell](#adding-temporary-environment-variables-in-your-shell)
+ - [Adding Development Environment Variables In `.env`](#adding-development-environment-variables-in-env)
+- [Can I Use Decorators?](#can-i-use-decorators)
+- [Integrating with an API Backend](#integrating-with-an-api-backend)
+ - [Node](#node)
+ - [Ruby on Rails](#ruby-on-rails)
+- [Proxying API Requests in Development](#proxying-api-requests-in-development)
+- [Using HTTPS in Development](#using-https-in-development)
+- [Generating Dynamic ` ` Tags on the Server](#generating-dynamic-meta-tags-on-the-server)
+- [Pre-Rendering into Static HTML Files](#pre-rendering-into-static-html-files)
+- [Injecting Data from the Server into the Page](#injecting-data-from-the-server-into-the-page)
+- [Running Tests](#running-tests)
+ - [Filename Conventions](#filename-conventions)
+ - [Command Line Interface](#command-line-interface)
+ - [Version Control Integration](#version-control-integration)
+ - [Writing Tests](#writing-tests)
+ - [Testing Components](#testing-components)
+ - [Using Third Party Assertion Libraries](#using-third-party-assertion-libraries)
+ - [Initializing Test Environment](#initializing-test-environment)
+ - [Focusing and Excluding Tests](#focusing-and-excluding-tests)
+ - [Coverage Reporting](#coverage-reporting)
+ - [Continuous Integration](#continuous-integration)
+ - [Disabling jsdom](#disabling-jsdom)
+ - [Snapshot Testing](#snapshot-testing)
+ - [Editor Integration](#editor-integration)
+- [Developing Components in Isolation](#developing-components-in-isolation)
+- [Making a Progressive Web App](#making-a-progressive-web-app)
+- [Deployment](#deployment)
+ - [Serving Apps with Client-Side Routing](#serving-apps-with-client-side-routing)
+ - [Building for Relative Paths](#building-for-relative-paths)
+ - [Azure](#azure)
+ - [Firebase](#firebase)
+ - [GitHub Pages](#github-pages)
+ - [Heroku](#heroku)
+ - [Modulus](#modulus)
+ - [Netlify](#netlify)
+ - [Now](#now)
+ - [S3 and CloudFront](#s3-and-cloudfront)
+ - [Surge](#surge)
+- [Advanced Configuration](#advanced-configuration)
+- [Troubleshooting](#troubleshooting)
+ - [`npm start` doesn’t detect changes](#npm-start-doesnt-detect-changes)
+ - [`npm test` hangs on macOS Sierra](#npm-test-hangs-on-macos-sierra)
+ - [`npm run build` silently fails](#npm-run-build-silently-fails)
+ - [`npm run build` fails on Heroku](#npm-run-build-fails-on-heroku)
+- [Something Missing?](#something-missing)
-* [Git](https://git-scm.com/)
-* [Node.js](https://nodejs.org/) (with NPM)
-* [Bower](https://bower.io/)
-* [Ember CLI](https://ember-cli.com/)
-* [PhantomJS](http://phantomjs.org/)
+## Updating to New Releases
-## Installation
+Create React App is divided into two packages:
-* `git clone ` this repository
-* `cd villasweb-frontend`
-* `npm install`
-* `bower install`
+* `create-react-app` is a global command-line utility that you use to create new projects.
+* `react-scripts` is a development dependency in the generated projects (including this one).
-## Running / Development
+You almost never need to update `create-react-app` itself: it delegates all the setup to `react-scripts`.
-* `ember serve`
-* Visit your app at [http://localhost:4200](http://localhost:4200).
+When you run `create-react-app`, it always creates the project with the latest version of `react-scripts` so you’ll get all the new features and improvements in newly created apps automatically.
-### Code Generators
+To update an existing project to a new version of `react-scripts`, [open the changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md), find the version you’re currently on (check `package.json` in this folder if you’re not sure), and apply the migration instructions for the newer versions.
-Make use of the many generators for code, try `ember help generate` for more details
+In most cases bumping the `react-scripts` version in `package.json` and running `npm install` in this folder should be enough, but it’s good to consult the [changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md) for potential breaking changes.
-### Running Tests
+We commit to keeping the breaking changes minimal so you can upgrade `react-scripts` painlessly.
-* `ember test`
-* `ember test --server`
+## Sending Feedback
-### Building
+We are always open to [your feedback](https://github.com/facebookincubator/create-react-app/issues).
-* `ember build` (development)
-* `ember build --environment production` (production)
+## Folder Structure
-### Deploying
+After creation, your project should look like this:
-Specify what it takes to deploy your app.
+```
+my-app/
+ README.md
+ node_modules/
+ package.json
+ public/
+ index.html
+ favicon.ico
+ src/
+ App.css
+ App.js
+ App.test.js
+ index.css
+ index.js
+ logo.svg
+```
-## Further Reading / Useful Links
+For the project to build, **these files must exist with exact filenames**:
-* [ember.js](http://emberjs.com/)
-* [ember-cli](https://ember-cli.com/)
-* Development Browser Extensions
- * [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
- * [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)
+* `public/index.html` is the page template;
+* `src/index.js` is the JavaScript entry point.
+
+You can delete or rename the other files.
+
+You may create subdirectories inside `src`. For faster rebuilds, only files inside `src` are processed by Webpack.
+You need to **put any JS and CSS files inside `src`**, or Webpack won’t see them.
+
+Only files inside `public` can be used from `public/index.html`.
+Read instructions below for using assets from JavaScript and HTML.
+
+You can, however, create more top-level directories.
+They will not be included in the production build so you can use them for things like documentation.
+
+## Available Scripts
+
+In the project directory, you can run:
+
+### `npm start`
+
+Runs the app in the development mode.
+Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
+
+The page will reload if you make edits.
+You will also see any lint errors in the console.
+
+### `npm test`
+
+Launches the test runner in the interactive watch mode.
+See the section about [running tests](#running-tests) for more information.
+
+### `npm run build`
+
+Builds the app for production to the `build` folder.
+It correctly bundles React in production mode and optimizes the build for the best performance.
+
+The build is minified and the filenames include the hashes.
+Your app is ready to be deployed!
+
+See the section about [deployment](#deployment) for more information.
+
+### `npm run eject`
+
+**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
+
+If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
+
+Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
+
+You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
+
+## Supported Language Features and Polyfills
+
+This project supports a superset of the latest JavaScript standard.
+In addition to [ES6](https://github.com/lukehoban/es6features) syntax features, it also supports:
+
+* [Exponentiation Operator](https://github.com/rwaldron/exponentiation-operator) (ES2016).
+* [Async/await](https://github.com/tc39/ecmascript-asyncawait) (ES2017).
+* [Object Rest/Spread Properties](https://github.com/sebmarkbage/ecmascript-rest-spread) (stage 3 proposal).
+* [Class Fields and Static Properties](https://github.com/tc39/proposal-class-public-fields) (stage 2 proposal).
+* [JSX](https://facebook.github.io/react/docs/introducing-jsx.html) and [Flow](https://flowtype.org/) syntax.
+
+Learn more about [different proposal stages](https://babeljs.io/docs/plugins/#presets-stage-x-experimental-presets-).
+
+While we recommend to use experimental proposals with some caution, Facebook heavily uses these features in the product code, so we intend to provide [codemods](https://medium.com/@cpojer/effective-javascript-codemods-5a6686bb46fb) if any of these proposals change in the future.
+
+Note that **the project only includes a few ES6 [polyfills](https://en.wikipedia.org/wiki/Polyfill)**:
+
+* [`Object.assign()`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) via [`object-assign`](https://github.com/sindresorhus/object-assign).
+* [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) via [`promise`](https://github.com/then/promise).
+* [`fetch()`](https://developer.mozilla.org/en/docs/Web/API/Fetch_API) via [`whatwg-fetch`](https://github.com/github/fetch).
+
+If you use any other ES6+ features that need **runtime support** (such as `Array.from()` or `Symbol`), make sure you are including the appropriate polyfills manually, or that the browsers you are targeting already support them.
+
+## Syntax Highlighting in the Editor
+
+To configure the syntax highlighting in your favorite text editor, head to the [relevant Babel documentation page](https://babeljs.io/docs/editors) and follow the instructions. Some of the most popular editors are covered.
+
+## Displaying Lint Output in the Editor
+
+>Note: this feature is available with `react-scripts@0.2.0` and higher.
+
+Some editors, including Sublime Text, Atom, and Visual Studio Code, provide plugins for ESLint.
+
+They are not required for linting. You should see the linter output right in your terminal as well as the browser console. However, if you prefer the lint results to appear right in your editor, there are some extra steps you can do.
+
+You would need to install an ESLint plugin for your editor first.
+
+>**A note for Atom `linter-eslint` users**
+
+>If you are using the Atom `linter-eslint` plugin, make sure that **Use global ESLint installation** option is checked:
+
+>
+
+
+>**For Visual Studio Code users**
+
+>VS Code ESLint plugin automatically detects Create React App's configuration file. So you do not need to create `eslintrc.json` at the root directory, except when you want to add your own rules. In that case, you should include CRA's config by adding this line:
+
+>```js
+{
+ // ...
+ "extends": "react-app"
+}
+```
+
+Then add this block to the `package.json` file of your project:
+
+```js
+{
+ // ...
+ "eslintConfig": {
+ "extends": "react-app"
+ }
+}
+```
+
+Finally, you will need to install some packages *globally*:
+
+```sh
+npm install -g eslint-config-react-app@0.3.0 eslint@3.8.1 babel-eslint@7.0.0 eslint-plugin-react@6.4.1 eslint-plugin-import@2.0.1 eslint-plugin-jsx-a11y@2.2.3 eslint-plugin-flowtype@2.21.0
+```
+
+We recognize that this is suboptimal, but it is currently required due to the way we hide the ESLint dependency. The ESLint team is already [working on a solution to this](https://github.com/eslint/eslint/issues/3458) so this may become unnecessary in a couple of months.
+
+## Debugging in the Editor
+
+**This feature is currently only supported by [Visual Studio Code](https://code.visualstudio.com) editor.**
+
+Visual Studio Code supports live-editing and debugging out of the box with Create React App. This enables you as a developer to write and debug your React code without leaving the editor, and most importantly it enables you to have a continuous development workflow, where context switching is minimal, as you don’t have to switch between tools.
+
+You would need to have the latest version of [VS Code](https://code.visualstudio.com) and VS Code [Chrome Debugger Extension](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) installed.
+
+Then add the block below to your `launch.json` file and put it inside the `.vscode` folder in your app’s root directory.
+
+```json
+{
+ "version": "0.2.0",
+ "configurations": [{
+ "name": "Chrome",
+ "type": "chrome",
+ "request": "launch",
+ "url": "http://localhost:3000",
+ "webRoot": "${workspaceRoot}/src",
+ "userDataDir": "${workspaceRoot}/.vscode/chrome",
+ "sourceMapPathOverrides": {
+ "webpack:///src/*": "${webRoot}/*"
+ }
+ }]
+}
+```
+
+Start your app by running `npm start`, and start debugging in VS Code by pressing `F5` or by clicking the green debug icon. You can now write code, set breakpoints, make changes to the code, and debug your newly modified code—all from your editor.
+
+## Changing the Page ``
+
+You can find the source HTML file in the `public` folder of the generated project. You may edit the `` tag in it to change the title from “React App” to anything else.
+
+Note that normally you wouldn’t edit files in the `public` folder very often. For example, [adding a stylesheet](#adding-a-stylesheet) is done without touching the HTML.
+
+If you need to dynamically update the page title based on the content, you can use the browser [`document.title`](https://developer.mozilla.org/en-US/docs/Web/API/Document/title) API. For more complex scenarios when you want to change the title from React components, you can use [React Helmet](https://github.com/nfl/react-helmet), a third party library.
+
+If you use a custom server for your app in production and want to modify the title before it gets sent to the browser, you can follow advice in [this section](#generating-dynamic-meta-tags-on-the-server). Alternatively, you can pre-build each page as a static HTML file which then loads the JavaScript bundle, which is covered [here](#pre-rendering-into-static-html-files).
+
+## Installing a Dependency
+
+The generated project includes React and ReactDOM as dependencies. It also includes a set of scripts used by Create React App as a development dependency. You may install other dependencies (for example, React Router) with `npm`:
+
+```
+npm install --save
+```
+
+## Importing a Component
+
+This project setup supports ES6 modules thanks to Babel.
+While you can still use `require()` and `module.exports`, we encourage you to use [`import` and `export`](http://exploringjs.com/es6/ch_modules.html) instead.
+
+For example:
+
+### `Button.js`
+
+```js
+import React, { Component } from 'react';
+
+class Button extends Component {
+ render() {
+ // ...
+ }
+}
+
+export default Button; // Don’t forget to use export default!
+```
+
+### `DangerButton.js`
+
+
+```js
+import React, { Component } from 'react';
+import Button from './Button'; // Import a component from another file
+
+class DangerButton extends Component {
+ render() {
+ return ;
+ }
+}
+
+export default DangerButton;
+```
+
+Be aware of the [difference between default and named exports](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281). It is a common source of mistakes.
+
+We suggest that you stick to using default imports and exports when a module only exports a single thing (for example, a component). That’s what you get when you use `export default Button` and `import Button from './Button'`.
+
+Named exports are useful for utility modules that export several functions. A module may have at most one default export and as many named exports as you like.
+
+Learn more about ES6 modules:
+
+* [When to use the curly braces?](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281)
+* [Exploring ES6: Modules](http://exploringjs.com/es6/ch_modules.html)
+* [Understanding ES6: Modules](https://leanpub.com/understandinges6/read#leanpub-auto-encapsulating-code-with-modules)
+
+## Adding a Stylesheet
+
+This project setup uses [Webpack](https://webpack.github.io/) for handling all assets. Webpack offers a custom way of “extending” the concept of `import` beyond JavaScript. To express that a JavaScript file depends on a CSS file, you need to **import the CSS from the JavaScript file**:
+
+### `Button.css`
+
+```css
+.Button {
+ padding: 20px;
+}
+```
+
+### `Button.js`
+
+```js
+import React, { Component } from 'react';
+import './Button.css'; // Tell Webpack that Button.js uses these styles
+
+class Button extends Component {
+ render() {
+ // You can use them as regular CSS styles
+ return
;
+ }
+}
+```
+
+**This is not required for React** but many people find this feature convenient. You can read about the benefits of this approach [here](https://medium.com/seek-ui-engineering/block-element-modifying-your-javascript-components-d7f99fcab52b). However you should be aware that this makes your code less portable to other build tools and environments than Webpack.
+
+In development, expressing dependencies this way allows your styles to be reloaded on the fly as you edit them. In production, all CSS files will be concatenated into a single minified `.css` file in the build output.
+
+If you are concerned about using Webpack-specific semantics, you can put all your CSS right into `src/index.css`. It would still be imported from `src/index.js`, but you could always remove that import if you later migrate to a different build tool.
+
+## Post-Processing CSS
+
+This project setup minifies your CSS and adds vendor prefixes to it automatically through [Autoprefixer](https://github.com/postcss/autoprefixer) so you don’t need to worry about it.
+
+For example, this:
+
+```css
+.App {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+}
+```
+
+becomes this:
+
+```css
+.App {
+ display: -webkit-box;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-orient: horizontal;
+ -webkit-box-direction: normal;
+ -ms-flex-direction: row;
+ flex-direction: row;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+}
+```
+
+If you need to disable autoprefixing for some reason, [follow this section](https://github.com/postcss/autoprefixer#disabling).
+
+## Adding a CSS Preprocessor (Sass, Less etc.)
+
+Generally, we recommend that you don’t reuse the same CSS classes across different components. For example, instead of using a `.Button` CSS class in `` and `` components, we recommend creating a `` component with its own `.Button` styles, that both `` and `` can render (but [not inherit](https://facebook.github.io/react/docs/composition-vs-inheritance.html)).
+
+Following this rule often makes CSS preprocessors less useful, as features like mixins and nesting are replaced by component composition. You can, however, integrate a CSS preprocessor if you find it valuable. In this walkthrough, we will be using Sass, but you can also use Less, or another alternative.
+
+First, let’s install the command-line interface for Sass:
+
+```
+npm install node-sass --save-dev
+```
+
+Then in `package.json`, add the following lines to `scripts`:
+
+```diff
+ "scripts": {
++ "build-css": "node-sass src/ -o src/",
++ "watch-css": "npm run build-css && node-sass src/ -o src/ --watch",
+ "start": "react-scripts start",
+ "build": "react-scripts build",
+ "test": "react-scripts test --env=jsdom",
+```
+
+>Note: To use a different preprocessor, replace `build-css` and `watch-css` commands according to your preprocessor’s documentation.
+
+Now you can rename `src/App.css` to `src/App.scss` and run `npm run watch-css`. The watcher will find every Sass file in `src` subdirectories, and create a corresponding CSS file next to it, in our case overwriting `src/App.css`. Since `src/App.js` still imports `src/App.css`, the styles become a part of your application. You can now edit `src/App.scss`, and `src/App.css` will be regenerated.
+
+To share variables between Sass files, you can use Sass imports. For example, `src/App.scss` and other component style files could include `@import "./shared.scss";` with variable definitions.
+
+At this point you might want to remove all CSS files from the source control, and add `src/**/*.css` to your `.gitignore` file. It is generally a good practice to keep the build products outside of the source control.
+
+As a final step, you may find it convenient to run `watch-css` automatically with `npm start`, and run `build-css` as a part of `npm run build`. You can use the `&&` operator to execute two scripts sequentially. However, there is no cross-platform way to run two scripts in parallel, so we will install a package for this:
+
+```
+npm install --save-dev npm-run-all
+```
+
+Then we can change `start` and `build` scripts to include the CSS preprocessor commands:
+
+```diff
+ "scripts": {
+ "build-css": "node-sass src/ -o src/",
+ "watch-css": "npm run build-css && node-sass src/ -o src/ --watch --recursive",
+- "start": "react-scripts start",
+- "build": "react-scripts build",
++ "start-js": "react-scripts start",
++ "start": "npm-run-all -p watch-css start-js",
++ "build": "npm run build-css && react-scripts build",
+ "test": "react-scripts test --env=jsdom",
+ "eject": "react-scripts eject"
+ }
+```
+
+Now running `npm start` and `npm run build` also builds Sass files. Note that `node-sass` seems to have an [issue recognizing newly created files on some systems](https://github.com/sass/node-sass/issues/1891) so you might need to restart the watcher when you create a file until it’s resolved.
+
+## Adding Images and Fonts
+
+With Webpack, using static assets like images and fonts works similarly to CSS.
+
+You can **`import` an image right in a JavaScript module**. This tells Webpack to include that image in the bundle. Unlike CSS imports, importing an image or a font gives you a string value. This value is the final image path you can reference in your code.
+
+Here is an example:
+
+```js
+import React from 'react';
+import logo from './logo.png'; // Tell Webpack this JS file uses this image
+
+console.log(logo); // /logo.84287d09.png
+
+function Header() {
+ // Import result is the URL of your image
+ return ;
+}
+
+export default Header;
+```
+
+This ensures that when the project is built, Webpack will correctly move the images into the build folder, and provide us with correct paths.
+
+This works in CSS too:
+
+```css
+.Logo {
+ background-image: url(./logo.png);
+}
+```
+
+Webpack finds all relative module references in CSS (they start with `./`) and replaces them with the final paths from the compiled bundle. If you make a typo or accidentally delete an important file, you will see a compilation error, just like when you import a non-existent JavaScript module. The final filenames in the compiled bundle are generated by Webpack from content hashes. If the file content changes in the future, Webpack will give it a different name in production so you don’t need to worry about long-term caching of assets.
+
+Please be advised that this is also a custom feature of Webpack.
+
+**It is not required for React** but many people enjoy it (and React Native uses a similar mechanism for images).
+An alternative way of handling static assets is described in the next section.
+
+## Using the `public` Folder
+
+>Note: this feature is available with `react-scripts@0.5.0` and higher.
+
+### Changing the HTML
+
+The `public` folder contains the HTML file so you can tweak it, for example, to [set the page title](#changing-the-page-title).
+The `
+```
+
+Then, on the server, you can replace `__SERVER_DATA__` with a JSON of real data right before sending the response. The client code can then read `window.SERVER_DATA` to use it. **Make sure to [sanitize the JSON before sending it to the client](https://medium.com/node-security/the-most-common-xss-vulnerability-in-react-js-applications-2bdffbcc1fa0) as it makes your app vulnerable to XSS attacks.**
+
+## Running Tests
+
+>Note: this feature is available with `react-scripts@0.3.0` and higher.
+>[Read the migration guide to learn how to enable it in older projects!](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md#migrating-from-023-to-030)
+
+Create React App uses [Jest](https://facebook.github.io/jest/) as its test runner. To prepare for this integration, we did a [major revamp](https://facebook.github.io/jest/blog/2016/09/01/jest-15.html) of Jest so if you heard bad things about it years ago, give it another try.
+
+Jest is a Node-based runner. This means that the tests always run in a Node environment and not in a real browser. This lets us enable fast iteration speed and prevent flakiness.
+
+While Jest provides browser globals such as `window` thanks to [jsdom](https://github.com/tmpvar/jsdom), they are only approximations of the real browser behavior. Jest is intended to be used for unit tests of your logic and your components rather than the DOM quirks.
+
+We recommend that you use a separate tool for browser end-to-end tests if you need them. They are beyond the scope of Create React App.
+
+### Filename Conventions
+
+Jest will look for test files with any of the following popular naming conventions:
+
+* Files with `.js` suffix in `__tests__` folders.
+* Files with `.test.js` suffix.
+* Files with `.spec.js` suffix.
+
+The `.test.js` / `.spec.js` files (or the `__tests__` folders) can be located at any depth under the `src` top level folder.
+
+We recommend to put the test files (or `__tests__` folders) next to the code they are testing so that relative imports appear shorter. For example, if `App.test.js` and `App.js` are in the same folder, the test just needs to `import App from './App'` instead of a long relative path. Colocation also helps find tests more quickly in larger projects.
+
+### Command Line Interface
+
+When you run `npm test`, Jest will launch in the watch mode. Every time you save a file, it will re-run the tests, just like `npm start` recompiles the code.
+
+The watcher includes an interactive command-line interface with the ability to run all tests, or focus on a search pattern. It is designed this way so that you can keep it open and enjoy fast re-runs. You can learn the commands from the “Watch Usage” note that the watcher prints after every run:
+
+
+
+### Version Control Integration
+
+By default, when you run `npm test`, Jest will only run the tests related to files changed since the last commit. This is an optimization designed to make your tests runs fast regardless of how many tests you have. However it assumes that you don’t often commit the code that doesn’t pass the tests.
+
+Jest will always explicitly mention that it only ran tests related to the files changed since the last commit. You can also press `a` in the watch mode to force Jest to run all tests.
+
+Jest will always run all tests on a [continuous integration](#continuous-integration) server or if the project is not inside a Git or Mercurial repository.
+
+### Writing Tests
+
+To create tests, add `it()` (or `test()`) blocks with the name of the test and its code. You may optionally wrap them in `describe()` blocks for logical grouping but this is neither required nor recommended.
+
+Jest provides a built-in `expect()` global function for making assertions. A basic test could look like this:
+
+```js
+import sum from './sum';
+
+it('sums numbers', () => {
+ expect(sum(1, 2)).toEqual(3);
+ expect(sum(2, 2)).toEqual(4);
+});
+```
+
+All `expect()` matchers supported by Jest are [extensively documented here](http://facebook.github.io/jest/docs/expect.html).
+You can also use [`jest.fn()` and `expect(fn).toBeCalled()`](http://facebook.github.io/jest/docs/expect.html#tohavebeencalled) to create “spies” or mock functions.
+
+### Testing Components
+
+There is a broad spectrum of component testing techniques. They range from a “smoke test” verifying that a component renders without throwing, to shallow rendering and testing some of the output, to full rendering and testing component lifecycle and state changes.
+
+Different projects choose different testing tradeoffs based on how often components change, and how much logic they contain. If you haven’t decided on a testing strategy yet, we recommend that you start with creating simple smoke tests for your components:
+
+```js
+import React from 'react';
+import ReactDOM from 'react-dom';
+import App from './App';
+
+it('renders without crashing', () => {
+ const div = document.createElement('div');
+ ReactDOM.render( , div);
+});
+```
+
+This test mounts a component and makes sure that it didn’t throw during rendering. Tests like this provide a lot value with very little effort so they are great as a starting point, and this is the test you will find in `src/App.test.js`.
+
+When you encounter bugs caused by changing components, you will gain a deeper insight into which parts of them are worth testing in your application. This might be a good time to introduce more specific tests asserting specific expected output or behavior.
+
+If you’d like to test components in isolation from the child components they render, we recommend using [`shallow()` rendering API](http://airbnb.io/enzyme/docs/api/shallow.html) from [Enzyme](http://airbnb.io/enzyme/). You can write a smoke test with it too:
+
+```sh
+npm install --save-dev enzyme react-addons-test-utils
+```
+
+```js
+import React from 'react';
+import { shallow } from 'enzyme';
+import App from './App';
+
+it('renders without crashing', () => {
+ shallow( );
+});
+```
+
+Unlike the previous smoke test using `ReactDOM.render()`, this test only renders `` and doesn’t go deeper. For example, even if `` itself renders a `` that throws, this test will pass. Shallow rendering is great for isolated unit tests, but you may still want to create some full rendering tests to ensure the components integrate correctly. Enzyme supports [full rendering with `mount()`](http://airbnb.io/enzyme/docs/api/mount.html), and you can also use it for testing state changes and component lifecycle.
+
+You can read the [Enzyme documentation](http://airbnb.io/enzyme/) for more testing techniques. Enzyme documentation uses Chai and Sinon for assertions but you don’t have to use them because Jest provides built-in `expect()` and `jest.fn()` for spies.
+
+Here is an example from Enzyme documentation that asserts specific output, rewritten to use Jest matchers:
+
+```js
+import React from 'react';
+import { shallow } from 'enzyme';
+import App from './App';
+
+it('renders welcome message', () => {
+ const wrapper = shallow( );
+ const welcome = Welcome to React ;
+ // expect(wrapper.contains(welcome)).to.equal(true);
+ expect(wrapper.contains(welcome)).toEqual(true);
+});
+```
+
+All Jest matchers are [extensively documented here](http://facebook.github.io/jest/docs/expect.html).
+Nevertheless you can use a third-party assertion library like [Chai](http://chaijs.com/) if you want to, as described below.
+
+Additionally, you might find [jest-enzyme](https://github.com/blainekasten/enzyme-matchers) helpful to simplify your tests with readable matchers. The above `contains` code can be written simpler with jest-enzyme.
+
+```js
+expect(wrapper).toContainReact(welcome)
+```
+
+To setup jest-enzyme with Create React App, follow the instructions for [initializing your test environment](#initializing-test-environment) to import `jest-enzyme`.
+
+```sh
+npm install --save-dev jest-enzyme
+```
+
+```js
+// src/setupTests.js
+import 'jest-enzyme';
+```
+
+
+### Using Third Party Assertion Libraries
+
+We recommend that you use `expect()` for assertions and `jest.fn()` for spies. If you are having issues with them please [file those against Jest](https://github.com/facebook/jest/issues/new), and we’ll fix them. We intend to keep making them better for React, supporting, for example, [pretty-printing React elements as JSX](https://github.com/facebook/jest/pull/1566).
+
+However, if you are used to other libraries, such as [Chai](http://chaijs.com/) and [Sinon](http://sinonjs.org/), or if you have existing code using them that you’d like to port over, you can import them normally like this:
+
+```js
+import sinon from 'sinon';
+import { expect } from 'chai';
+```
+
+and then use them in your tests like you normally do.
+
+### Initializing Test Environment
+
+>Note: this feature is available with `react-scripts@0.4.0` and higher.
+
+If your app uses a browser API that you need to mock in your tests or if you just need a global setup before running your tests, add a `src/setupTests.js` to your project. It will be automatically executed before running your tests.
+
+For example:
+
+#### `src/setupTests.js`
+```js
+const localStorageMock = {
+ getItem: jest.fn(),
+ setItem: jest.fn(),
+ clear: jest.fn()
+};
+global.localStorage = localStorageMock
+```
+
+### Focusing and Excluding Tests
+
+You can replace `it()` with `xit()` to temporarily exclude a test from being executed.
+Similarly, `fit()` lets you focus on a specific test without running any other tests.
+
+### Coverage Reporting
+
+Jest has an integrated coverage reporter that works well with ES6 and requires no configuration.
+Run `npm test -- --coverage` (note extra `--` in the middle) to include a coverage report like this:
+
+
+
+Note that tests run much slower with coverage so it is recommended to run it separately from your normal workflow.
+
+### Continuous Integration
+
+By default `npm test` runs the watcher with interactive CLI. However, you can force it to run tests once and finish the process by setting an environment variable called `CI`.
+
+When creating a build of your application with `npm run build` linter warnings are not checked by default. Like `npm test`, you can force the build to perform a linter warning check by setting the environment variable `CI`. If any warnings are encountered then the build fails.
+
+Popular CI servers already set the environment variable `CI` by default but you can do this yourself too:
+
+### On CI servers
+#### Travis CI
+
+1. Following the [Travis Getting started](https://docs.travis-ci.com/user/getting-started/) guide for syncing your GitHub repository with Travis. You may need to initialize some settings manually in your [profile](https://travis-ci.org/profile) page.
+1. Add a `.travis.yml` file to your git repository.
+```
+language: node_js
+node_js:
+ - 4
+ - 6
+cache:
+ directories:
+ - node_modules
+script:
+ - npm test
+ - npm run build
+```
+1. Trigger your first build with a git push.
+1. [Customize your Travis CI Build](https://docs.travis-ci.com/user/customizing-the-build/) if needed.
+
+### On your own environment
+##### Windows (cmd.exe)
+
+```cmd
+set CI=true&&npm test
+```
+
+```cmd
+set CI=true&&npm run build
+```
+
+(Note: the lack of whitespace is intentional.)
+
+##### Linux, macOS (Bash)
+
+```bash
+CI=true npm test
+```
+
+```bash
+CI=true npm run build
+```
+
+The test command will force Jest to run tests once instead of launching the watcher.
+
+> If you find yourself doing this often in development, please [file an issue](https://github.com/facebookincubator/create-react-app/issues/new) to tell us about your use case because we want to make watcher the best experience and are open to changing how it works to accommodate more workflows.
+
+The build command will check for linter warnings and fail if any are found.
+
+### Disabling jsdom
+
+By default, the `package.json` of the generated project looks like this:
+
+```js
+ // ...
+ "scripts": {
+ // ...
+ "test": "react-scripts test --env=jsdom"
+ }
+```
+
+If you know that none of your tests depend on [jsdom](https://github.com/tmpvar/jsdom), you can safely remove `--env=jsdom`, and your tests will run faster.
+To help you make up your mind, here is a list of APIs that **need jsdom**:
+
+* Any browser globals like `window` and `document`
+* [`ReactDOM.render()`](https://facebook.github.io/react/docs/top-level-api.html#reactdom.render)
+* [`TestUtils.renderIntoDocument()`](https://facebook.github.io/react/docs/test-utils.html#renderintodocument) ([a shortcut](https://github.com/facebook/react/blob/34761cf9a252964abfaab6faf74d473ad95d1f21/src/test/ReactTestUtils.js#L83-L91) for the above)
+* [`mount()`](http://airbnb.io/enzyme/docs/api/mount.html) in [Enzyme](http://airbnb.io/enzyme/index.html)
+
+In contrast, **jsdom is not needed** for the following APIs:
+
+* [`TestUtils.createRenderer()`](https://facebook.github.io/react/docs/test-utils.html#shallow-rendering) (shallow rendering)
+* [`shallow()`](http://airbnb.io/enzyme/docs/api/shallow.html) in [Enzyme](http://airbnb.io/enzyme/index.html)
+
+Finally, jsdom is also not needed for [snapshot testing](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html).
+
+### Snapshot Testing
+
+Snapshot testing is a feature of Jest that automatically generates text snapshots of your components and saves them on the disk so if the UI output changes, you get notified without manually writing any assertions on the component output. [Read more about snapshot testing.](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html)
+
+### Editor Integration
+
+If you use [Visual Studio Code](https://code.visualstudio.com), there is a [Jest extension](https://github.com/orta/vscode-jest) which works with Create React App out of the box. This provides a lot of IDE-like features while using a text editor: showing the status of a test run with potential fail messages inline, starting and stopping the watcher automatically, and offering one-click snapshot updates.
+
+
+
+## Developing Components in Isolation
+
+Usually, in an app, you have a lot of UI components, and each of them has many different states.
+For an example, a simple button component could have following states:
+
+* With a text label.
+* With an emoji.
+* In the disabled mode.
+
+Usually, it’s hard to see these states without running a sample app or some examples.
+
+Create React App doesn’t include any tools for this by default, but you can easily add [React Storybook](https://github.com/kadirahq/react-storybook) to your project. **It is a third-party tool that lets you develop components and see all their states in isolation from your app**.
+
+
+
+You can also deploy your Storybook as a static app. This way, everyone in your team can view and review different states of UI components without starting a backend server or creating an account in your app.
+
+**Here’s how to setup your app with Storybook:**
+
+First, install the following npm package globally:
+
+```sh
+npm install -g getstorybook
+```
+
+Then, run the following command inside your app’s directory:
+
+```sh
+getstorybook
+```
+
+After that, follow the instructions on the screen.
+
+Learn more about React Storybook:
+
+* Screencast: [Getting Started with React Storybook](https://egghead.io/lessons/react-getting-started-with-react-storybook)
+* [GitHub Repo](https://github.com/kadirahq/react-storybook)
+* [Documentation](https://getstorybook.io/docs)
+* [Snapshot Testing](https://github.com/kadirahq/storyshots) with React Storybook
+
+## Making a Progressive Web App
+
+You can turn your React app into a [Progressive Web App](https://developers.google.com/web/progressive-web-apps/) by following the steps in [this repository](https://github.com/jeffposnick/create-react-pwa).
+
+## Deployment
+
+`npm run build` creates a `build` directory with a production build of your app. Set up your favourite HTTP server so that a visitor to your site is served `index.html`, and requests to static paths like `/static/js/main..js` are served with the contents of the `/static/js/main..js` file. For example, Python contains a built-in HTTP server that can serve static files:
+
+```sh
+cd build
+python -m SimpleHTTPServer 9000
+```
+
+If you’re using [Node](https://nodejs.org/) and [Express](http://expressjs.com/) as a server, it might look like this:
+
+```javascript
+const express = require('express');
+const path = require('path');
+const app = express();
+
+app.use(express.static('./build'));
+
+app.get('/', function (req, res) {
+ res.sendFile(path.join(__dirname, './build', 'index.html'));
+});
+
+app.listen(9000);
+```
+
+Create React App is not opinionated about your choice of web server. Any static file server will do. The `build` folder with static assets is the only output produced by Create React App.
+
+However this is not quite enough if you use client-side routing. Read the next section if you want to support URLs like `/todos/42` in your single-page app.
+
+### Serving Apps with Client-Side Routing
+
+If you use routers that use the HTML5 [`pushState` history API](https://developer.mozilla.org/en-US/docs/Web/API/History_API#Adding_and_modifying_history_entries) under the hood (for example, [React Router](https://github.com/ReactTraining/react-router) with `browserHistory`), many static file servers will fail. For example, if you used React Router with a route for `/todos/42`, the development server will respond to `localhost:3000/todos/42` properly, but an Express serving a production build as above will not.
+
+This is because when there is a fresh page load for a `/todos/42`, the server looks for the file `build/todos/42` and does not find it. The server needs to be configured to respond to a request to `/todos/42` by serving `index.html`. For example, we can amend our Express example above to serve `index.html` for any unknown paths:
+
+```diff
+ app.use(express.static('./build'));
+
+-app.get('/', function (req, res) {
++app.get('/*', function (req, res) {
+ res.sendFile(path.join(__dirname, './build', 'index.html'));
+ });
+```
+
+Now requests to `/todos/42` will be handled correctly both in development and in production.
+
+### Building for Relative Paths
+
+By default, Create React App produces a build assuming your app is hosted at the server root.
+To override this, specify the `homepage` in your `package.json`, for example:
+
+```js
+ "homepage": "http://mywebsite.com/relativepath",
+```
+
+This will let Create React App correctly infer the root path to use in the generated HTML file.
+
+#### Serving the Same Build from Different Paths
+
+>Note: this feature is available with `react-scripts@0.9.0` and higher.
+
+If you are not using the HTML5 `pushState` history API or not using client-side routing at all, it is unnecessary to specify the URL from which your app will be served. Instead, you can put this in your `package.json`:
+
+```js
+ "homepage": ".",
+```
+
+This will make sure that all the asset paths are relative to `index.html`. You will then be able to move your app from `http://mywebsite.com` to `http://mywebsite.com/relativepath` or even `http://mywebsite.com/relative/path` without having to rebuild it.
+
+### Azure
+
+See [this](https://medium.com/@to_pe/deploying-create-react-app-on-microsoft-azure-c0f6686a4321) blog post on how to deploy your React app to [Microsoft Azure](https://azure.microsoft.com/).
+
+### Firebase
+
+Install the Firebase CLI if you haven’t already by running `npm install -g firebase-tools`. Sign up for a [Firebase account](https://console.firebase.google.com/) and create a new project. Run `firebase login` and login with your previous created Firebase account.
+
+Then run the `firebase init` command from your project’s root. You need to choose the **Hosting: Configure and deploy Firebase Hosting sites** and choose the Firebase project you created in the previous step. You will need to agree with `database.rules.json` being created, choose `build` as the public directory, and also agree to **Configure as a single-page app** by replying with `y`.
+
+```sh
+ === Project Setup
+
+ First, let's associate this project directory with a Firebase project.
+ You can create multiple project aliases by running firebase use --add,
+ but for now we'll just set up a default project.
+
+ ? What Firebase project do you want to associate as default? Example app (example-app-fd690)
+
+ === Database Setup
+
+ Firebase Realtime Database Rules allow you to define how your data should be
+ structured and when your data can be read from and written to.
+
+ ? What file should be used for Database Rules? database.rules.json
+ ✔ Database Rules for example-app-fd690 have been downloaded to database.rules.json.
+ Future modifications to database.rules.json will update Database Rules when you run
+ firebase deploy.
+
+ === Hosting Setup
+
+ Your public directory is the folder (relative to your project directory) that
+ will contain Hosting assets to uploaded with firebase deploy. If you
+ have a build process for your assets, use your build's output directory.
+
+ ? What do you want to use as your public directory? build
+ ? Configure as a single-page app (rewrite all urls to /index.html)? Yes
+ ✔ Wrote build/index.html
+
+ i Writing configuration info to firebase.json...
+ i Writing project information to .firebaserc...
+
+ ✔ Firebase initialization complete!
+```
+
+Now, after you create a production build with `npm run build`, you can deploy it by running `firebase deploy`.
+
+```sh
+ === Deploying to 'example-app-fd690'...
+
+ i deploying database, hosting
+ ✔ database: rules ready to deploy.
+ i hosting: preparing build directory for upload...
+ Uploading: [============================== ] 75%✔ hosting: build folder uploaded successfully
+ ✔ hosting: 8 files uploaded successfully
+ i starting release process (may take several minutes)...
+
+ ✔ Deploy complete!
+
+ Project Console: https://console.firebase.google.com/project/example-app-fd690/overview
+ Hosting URL: https://example-app-fd690.firebaseapp.com
+```
+
+For more information see [Add Firebase to your JavaScript Project](https://firebase.google.com/docs/web/setup).
+
+### GitHub Pages
+
+>Note: this feature is available with `react-scripts@0.2.0` and higher.
+
+#### Step 1: Add `homepage` to `package.json`
+
+**The step below is important!**
+**If you skip it, your app will not deploy correctly.**
+
+Open your `package.json` and add a `homepage` field:
+
+```js
+ "homepage": "https://myusername.github.io/my-app",
+```
+
+Create React App uses the `homepage` field to determine the root URL in the built HTML file.
+
+#### Step 2: Install `gh-pages` and add `deploy` to `scripts` in `package.json`
+
+Now, whenever you run `npm run build`, you will see a cheat sheet with instructions on how to deploy to GitHub Pages.
+
+To publish it at [https://myusername.github.io/my-app](https://myusername.github.io/my-app), run:
+
+```sh
+npm install --save-dev gh-pages
+```
+
+Add the following scripts in your `package.json`:
+
+```js
+ // ...
+ "scripts": {
+ // ...
+ "predeploy": "npm run build",
+ "deploy": "gh-pages -d build"
+ }
+```
+
+The `predeploy` script will run automatically before `deploy` is run.
+
+#### Step 3: Deploy the site by running `npm run deploy`
+
+Then run:
+
+```sh
+npm run deploy
+```
+
+#### Step 4: Ensure your project’s settings use `gh-pages`
+
+Finally, make sure **GitHub Pages** option in your GitHub project settings is set to use the `gh-pages` branch:
+
+
+
+#### Step 5: Optionally, configure the domain
+
+You can configure a custom domain with GitHub Pages by adding a `CNAME` file to the `public/` folder.
+
+#### Notes on client-side routing
+
+GitHub Pages doesn’t support routers that use the HTML5 `pushState` history API under the hood (for example, React Router using `browserHistory`). This is because when there is a fresh page load for a url like `http://user.github.io/todomvc/todos/42`, where `/todos/42` is a frontend route, the GitHub Pages server returns 404 because it knows nothing of `/todos/42`. If you want to add a router to a project hosted on GitHub Pages, here are a couple of solutions:
+
+* You could switch from using HTML5 history API to routing with hashes. If you use React Router, you can switch to `hashHistory` for this effect, but the URL will be longer and more verbose (for example, `http://user.github.io/todomvc/#/todos/42?_k=yknaj`). [Read more](https://github.com/reactjs/react-router/blob/master/docs/guides/Histories.md#histories) about different history implementations in React Router.
+* Alternatively, you can use a trick to teach GitHub Pages to handle 404 by redirecting to your `index.html` page with a special redirect parameter. You would need to add a `404.html` file with the redirection code to the `build` folder before deploying your project, and you’ll need to add code handling the redirect parameter to `index.html`. You can find a detailed explanation of this technique [in this guide](https://github.com/rafrex/spa-github-pages).
+
+### Heroku
+
+Use the [Heroku Buildpack for Create React App](https://github.com/mars/create-react-app-buildpack).
+You can find instructions in [Deploying React with Zero Configuration](https://blog.heroku.com/deploying-react-with-zero-configuration).
+
+#### Resolving Heroku Deployment Errors
+
+Sometimes `npm run build` works locally but fails during deploy via Heroku. Following are the most common cases.
+
+##### "Module not found: Error: Cannot resolve 'file' or 'directory'"
+
+If you get something like this:
+
+```
+remote: Failed to create a production build. Reason:
+remote: Module not found: Error: Cannot resolve 'file' or 'directory'
+MyDirectory in /tmp/build_1234/src
+```
+
+It means you need to ensure that the lettercase of the file or directory you `import` matches the one you see on your filesystem or on GitHub.
+
+This is important because Linux (the operating system used by Heroku) is case sensitive. So `MyDirectory` and `mydirectory` are two distinct directories and thus, even though the project builds locally, the difference in case breaks the `import` statements on Heroku remotes.
+
+##### "Could not find a required file."
+
+If you exclude or ignore necessary files from the package you will see a error similar this one:
+
+```
+remote: Could not find a required file.
+remote: Name: `index.html`
+remote: Searched in: /tmp/build_a2875fc163b209225122d68916f1d4df/public
+remote:
+remote: npm ERR! Linux 3.13.0-105-generic
+remote: npm ERR! argv "/tmp/build_a2875fc163b209225122d68916f1d4df/.heroku/node/bin/node" "/tmp/build_a2875fc163b209225122d68916f1d4df/.heroku/node/bin/npm" "run" "build"
+```
+
+In this case, ensure that the file is there with the proper lettercase and that’s not ignored on your local `.gitignore` or `~/.gitignore_global`.
+
+### Modulus
+
+See the [Modulus blog post](http://blog.modulus.io/deploying-react-apps-on-modulus) on how to deploy your react app to Modulus.
+
+## Netlify
+
+**To do a manual deploy to Netlify’s CDN:**
+
+```sh
+npm install netlify-cli
+netlify deploy
+```
+
+Choose `build` as the path to deploy.
+
+**To setup continuous delivery:**
+
+With this setup Netlify will build and deploy when you push to git or open a pull request:
+
+1. [Start a new netlify project](https://app.netlify.com/signup)
+2. Pick your Git hosting service and select your repository
+3. Click `Build your site`
+
+**Support for client-side routing:**
+
+To support `pushState`, make sure to create a `public/_redirects` file with the following rewrite rules:
+
+```
+/* /index.html 200
+```
+
+When you build the project, Create React App will place the `public` folder contents into the build output.
+
+### Now
+
+See [this example](https://github.com/xkawi/create-react-app-now) for a zero-configuration single-command deployment with [now](https://zeit.co/now).
+
+### S3 and CloudFront
+
+See this [blog post](https://medium.com/@omgwtfmarc/deploying-create-react-app-to-s3-or-cloudfront-48dae4ce0af) on how to deploy your React app to Amazon Web Services [S3](https://aws.amazon.com/s3) and [CloudFront](https://aws.amazon.com/cloudfront/).
+
+### Surge
+
+Install the Surge CLI if you haven’t already by running `npm install -g surge`. Run the `surge` command and log in you or create a new account. You just need to specify the *build* folder and your custom domain, and you are done.
+
+```sh
+ email: email@domain.com
+ password: ********
+ project path: /path/to/project/build
+ size: 7 files, 1.8 MB
+ domain: create-react-app.surge.sh
+ upload: [====================] 100%, eta: 0.0s
+ propagate on CDN: [====================] 100%
+ plan: Free
+ users: email@domain.com
+ IP Address: X.X.X.X
+
+ Success! Project is published and running at create-react-app.surge.sh
+```
+
+Note that in order to support routers that use HTML5 `pushState` API, you may want to rename the `index.html` in your build folder to `200.html` before deploying to Surge. This [ensures that every URL falls back to that file](https://surge.sh/help/adding-a-200-page-for-client-side-routing).
+
+## Advanced Configuration
+
+You can adjust various development and production settings by setting environment variables in your shell or with [.env](#adding-development-environment-variables-in-env).
+
+Variable | Development | Production | Usage
+:--- | :---: | :---: | :---
+BROWSER | :white_check_mark: | :x: | By default, Create React App will open the default system browser, favoring Chrome on macOS. Specify a [browser](https://github.com/sindresorhus/opn#app) to override this behavior, or set it to `none` to disable it completely.
+HOST | :white_check_mark: | :x: | By default, the development web server binds to `localhost`. You may use this variable to specify a different host.
+PORT | :white_check_mark: | :x: | By default, the development web server will attempt to listen on port 3000 or prompt you to attempt the next available port. You may use this variable to specify a different port.
+HTTPS | :white_check_mark: | :x: | When set to `true`, Create React App will run the development server in `https` mode.
+PUBLIC_URL | :x: | :white_check_mark: | Create React App assumes your application is hosted at the serving web server's root or a subpath as specified in [`package.json` (`homepage`)](#building-for-relative-paths). Normally, Create React App ignores the hostname. You may use this variable to force assets to be referenced verbatim to the url you provide (hostname included). This may be particularly useful when using a CDN to host your application.
+CI | :large_orange_diamond: | :white_check_mark: | When set to `true`, Create React App treats warnings as failures in the build. It also makes the test runner non-watching. Most CIs set this flag by default.
+
+## Troubleshooting
+
+### `npm start` doesn’t detect changes
+
+When you save a file while `npm start` is running, the browser should refresh with the updated code.
+If this doesn’t happen, try one of the following workarounds:
+
+* If your project is in a Dropbox folder, try moving it out.
+* If the watcher doesn’t see a file called `index.js` and you’re referencing it by the folder name, you [need to restart the watcher](https://github.com/facebookincubator/create-react-app/issues/1164) due to a Webpack bug.
+* Some editors like Vim and IntelliJ have a “safe write” feature that currently breaks the watcher. You will need to disable it. Follow the instructions in [“Working with editors supporting safe write”](https://webpack.github.io/docs/webpack-dev-server.html#working-with-editors-ides-supporting-safe-write).
+* If your project path contains parentheses, try moving the project to a path without them. This is caused by a [Webpack watcher bug](https://github.com/webpack/watchpack/issues/42).
+* On Linux and macOS, you might need to [tweak system settings](https://webpack.github.io/docs/troubleshooting.html#not-enough-watchers) to allow more watchers.
+* If the project runs inside a virtual machine such as (a Vagrant provisioned) VirtualBox, run `npm install --save-dev cross-env` in its root folder and then replace `"react-scripts start"` in the `scripts` section of its `package.json` with `"cross-env CHOKIDAR_USEPOLLING=true react-scripts start"`. This ensures that the next time you run `npm start`, the watcher uses the polling mode, as necessary inside a VM.
+
+If none of these solutions help please leave a comment [in this thread](https://github.com/facebookincubator/create-react-app/issues/659).
+
+### `npm test` hangs on macOS Sierra
+
+If you run `npm test` and the console gets stuck after printing `react-scripts test --env=jsdom` to the console there might be a problem with your [Watchman](https://facebook.github.io/watchman/) installation as described in [facebookincubator/create-react-app#713](https://github.com/facebookincubator/create-react-app/issues/713).
+
+We recommend deleting `node_modules` in your project and running `npm install` (or `yarn` if you use it) first. If it doesn't help, you can try one of the numerous workarounds mentioned in these issues:
+
+* [facebook/jest#1767](https://github.com/facebook/jest/issues/1767)
+* [facebook/watchman#358](https://github.com/facebook/watchman/issues/358)
+* [ember-cli/ember-cli#6259](https://github.com/ember-cli/ember-cli/issues/6259)
+
+It is reported that installing Watchman 4.7.0 or newer fixes the issue. If you use [Homebrew](http://brew.sh/), you can run these commands to update it:
+
+```
+watchman shutdown-server
+brew update
+brew reinstall watchman
+```
+
+You can find [other installation methods](https://facebook.github.io/watchman/docs/install.html#build-install) on the Watchman documentation page.
+
+If this still doesn’t help, try running `launchctl unload -F ~/Library/LaunchAgents/com.github.facebook.watchman.plist`.
+
+There are also reports that *uninstalling* Watchman fixes the issue. So if nothing else helps, remove it from your system and try again.
+
+### `npm run build` silently fails
+
+It is reported that `npm run build` can fail on machines with no swap space, which is common in cloud environments. If [the symptoms are matching](https://github.com/facebookincubator/create-react-app/issues/1133#issuecomment-264612171), consider adding some swap space to the machine you’re building on, or build the project locally.
+
+### `npm run build` fails on Heroku
+
+This may be a problem with case sensitive filenames.
+Please refer to [this section](#resolving-heroku-deployment-errors).
+
+## Something Missing?
+
+If you have ideas for more “How To” recipes that should be on this page, [let us know](https://github.com/facebookincubator/create-react-app/issues) or [contribute some!](https://github.com/facebookincubator/create-react-app/edit/master/packages/react-scripts/template/README.md)
diff --git a/app/adapters/application.js b/app/adapters/application.js
deleted file mode 100644
index c87b180..0000000
--- a/app/adapters/application.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * File: application.js
- * Author: Markus Grigull
- * Date: 26.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import RESTAdapter from 'ember-data/adapters/rest';
-import DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin';
-import ENV from '../config/environment';
-
-export default RESTAdapter.extend(DataAdapterMixin, {
- host: 'http://' + ENV.APP.API_HOST,
- namespace: 'api/v1',
- authorizer: 'authorizer:custom',
- headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' },
-
- urlForQueryRecord(query /*, modelName */) {
- // Fix for /users/me query
- let baseUrl = this.buildURL();
- return baseUrl + '/users/' + query;
- }
-});
diff --git a/app/app.js b/app/app.js
deleted file mode 100644
index 6921924..0000000
--- a/app/app.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * File: app.js
- * Author: Markus Grigull
- * Date: 26.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import Resolver from './resolver';
-import loadInitializers from 'ember-load-initializers';
-import config from './config/environment';
-
-let App;
-
-Ember.MODEL_FACTORY_INJECTIONS = true;
-
-App = Ember.Application.extend({
- modulePrefix: config.modulePrefix,
- podModulePrefix: config.podModulePrefix,
- Resolver
-});
-
-loadInitializers(App, config.modulePrefix);
-
-export default App;
diff --git a/app/authenticators/custom.js b/app/authenticators/custom.js
deleted file mode 100644
index 017b976..0000000
--- a/app/authenticators/custom.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * File: custom.js
- * Author: Markus Grigull
- * Date: 26.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import Base from 'ember-simple-auth/authenticators/base';
-import ENV from '../config/environment';
-
-export default Base.extend({
- tokenEndpoint: 'http://' + ENV.APP.API_HOST + '/api/v1/authenticate',
-
- restore(data) {
- return new Ember.RSVP.Promise(function(resolve, reject) {
- if (!Ember.isEmpty(data.token)) {
- resolve(data);
- } else {
- reject();
- }
- });
- },
-
- authenticate(username, password) {
- return new Ember.RSVP.Promise((resolve, reject) => {
- Ember.$.ajax({
- url: this.tokenEndpoint,
- type: 'POST',
- data: JSON.stringify({
- username: username,
- password: password
- }),
- contentType: 'application/json',
- dataType: 'json'
- }).then(function(response) {
- Ember.run(function() {
- resolve({
- token: response.token
- });
- });
- }, function(xhr) {
- var response = JSON.parse(xhr.responseText);
- Ember.run(function() {
- reject(response.message);
- });
- });
- });
- },
-
- invalidate() {
- console.log('invalidate...');
- return Ember.RSVP.resolve();
- }
-});
diff --git a/app/authorizers/custom.js b/app/authorizers/custom.js
deleted file mode 100644
index 2711f0d..0000000
--- a/app/authorizers/custom.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * File: custom.js
- * Author: Markus Grigull
- * Date: 04.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import Base from 'ember-simple-auth/authorizers/base';
-
-export default Base.extend({
- session: Ember.inject.service('session'),
-
- authorize(data, block) {
- if (this.get('session.isAuthenticated') && !Ember.isEmpty(data.token)) {
- block('x-access-token', data.token);
- }
- }
-});
diff --git a/app/components/.gitkeep b/app/components/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/app/components/draggable-dropzone.js b/app/components/draggable-dropzone.js
deleted file mode 100644
index 18cdbff..0000000
--- a/app/components/draggable-dropzone.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * File: draggable-dropzone.js
- * Author: Markus Grigull
- * Date: 28.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-var { set } = Ember;
-
-export default Ember.Component.extend({
- tagName: 'div',
- classNames: [ 'draggableDropzone' ],
- classNameBindings: [ 'dragClass' ],
- dragClass: 'deactivated',
-
- dragLeave(event) {
- event.preventDefault();
- set(this, 'dragClass', 'deactivated');
- },
-
- dragOver(event) {
- event.preventDefault();
- set(this, 'dragClass', 'activated');
- },
-
- drop(event) {
- var data = event.dataTransfer.getData('text/data');
- var position = {
- x: event.originalEvent.pageX - Ember.$(event.target).offset().left - parseFloat(event.dataTransfer.getData('offset/x')),
- y: event.originalEvent.pageY - Ember.$(event.target).offset().top - parseFloat(event.dataTransfer.getData('offset/y'))
- };
-
- this.sendAction('dropped', data, position);
-
- set(this, 'dragClass', 'deactivated');
- }
-});
diff --git a/app/components/draggable-item.js b/app/components/draggable-item.js
deleted file mode 100644
index c390d26..0000000
--- a/app/components/draggable-item.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * File: draggable-item.js
- * Author: Markus Grigull
- * Date: 28.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-var { get } = Ember;
-
-export default Ember.Component.extend({
- classNames: [ 'draggableItem' ],
- attributeBindings: [ 'draggable' ],
- draggable: 'true',
-
- dragStart(event) {
- event.dataTransfer.setData('offset/x', event.originalEvent.pageX - Ember.$(event.target).offset().left);
- event.dataTransfer.setData('offset/y', event.originalEvent.pageY - Ember.$(event.target).offset().top);
-
- return event.dataTransfer.setData('text/data', get(this, 'content'));
- }
-});
diff --git a/app/components/flow-plot.js b/app/components/flow-plot.js
deleted file mode 100644
index 01700ab..0000000
--- a/app/components/flow-plot.js
+++ /dev/null
@@ -1,27 +0,0 @@
-import Ember from 'ember';
-
-export default Ember.Component.extend({
- tagName: 'div',
- classNames: [ 'flow-plot' ],
- attributeBindings: [ 'style' ],
-
- plot: null,
- data: [],
- options: {},
- height: '85%',
-
- setupPlot: Ember.on('didInsertElement', function() {
- var plot = Ember.$.plot('#' + this.get('element').id, this.get('data'), this.get('options'));
- this.set('plot', plot);
- }),
-
- updateData: Ember.observer('data.@each', function() {
- // update plot
- var plot = Ember.$.plot('#' + this.get('element').id, this.get('data'), this.get('options'));
- this.set('plot', plot);
- }),
-
- style: Ember.computed('height', function() {
- return Ember.String.htmlSafe("height: " + this.get('height') + ";");
- })
-});
diff --git a/app/components/widget-abstract.js b/app/components/widget-abstract.js
deleted file mode 100644
index 61af405..0000000
--- a/app/components/widget-abstract.js
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * File: widget-abstract.js
- * Author: Markus Grigull
- * Date: 15.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import Resizable from '../mixins/resizable';
-import Draggable from '../mixins/draggable';
-
-export default Ember.Component.extend(Resizable, Draggable, {
- tagName: 'div',
- classNames: [ 'widgetAbstract' ],
- classNameBindings: [ 'widgetEditing' ],
- attributeBindings: [ 'style' ],
-
- widget: null,
- widgetEditing: true,
- editing: false,
- grid: false,
- data: null,
-
- disabled_resize: false,
- autoHide_resize: true,
- grid_resize: [ 10, 10 ],
-
- disabled_drag: false,
- containment_drag: 'parent',
- grid_drag: [ 10, 10 ],
- scroll_drag: true,
-
- style: Ember.computed('widget', function() {
- return Ember.String.htmlSafe('width: ' + this.get('widget.width') + 'px; height: ' + this.get('widget.height') + 'px; left: ' + this.get('widget.x') + 'px; top: ' + this.get('widget.y') + 'px;');
- }),
-
- name: Ember.computed('widget', function() {
- return this.get('widget.name');
- }),
-
- stop_resize(event, ui) {
- var width = ui.size.width;
- var height = ui.size.height;
-
- this.set('widget.width', width);
- this.set('widget.height', height);
- },
-
- resize_resize(/* event, ui */) {
-
- },
-
- stop_drag(event, ui) {
- this.set('widget.x', ui.position.left);
- this.set('widget.y', ui.position.top);
- },
-
- drag_drag(/* event, ui */) {
-
- },
-
- _updateUI: Ember.on('init', Ember.observer('editing', 'grid', 'isShowingModal', function() {
- if (this.get('editing') === true) {
- this.set('disabled_resize', false);
- //this.set('autoHide_resize', false);
- this.set('disabled_drag', false);
-
- this.set('widgetEditing', true);
- } else {
- this.set('disabled_resize', true);
- //this.set('autoHide_resize', true);
- this.set('disabled_drag', true);
-
- this.set('widgetEditing', false);
- }
-
- if (this.get('grid') === true) {
- this.set('grid_resize', [ 10, 10 ]);
- this.set('grid_drag', [ 10, 10 ]);
- } else {
- this.set('grid_resize', false);
- this.set('grid_drag', false);
- }
- })),
-
- /*doubleClick() {
- if (this.get('editing')) {
- this.sendAction('showPlotDialog', this.get('plot'));
- }
- }*/
-});
diff --git a/app/components/widget-container.js b/app/components/widget-container.js
deleted file mode 100644
index c1dcdc1..0000000
--- a/app/components/widget-container.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * File: widget-container.js
- * Author: Markus Grigull
- * Date: 05.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-export default Ember.Component.extend({
- tagName: 'div',
- classNames: [ 'widgets' ],
- attributeBindings: [ 'style' ],
-
- widgets: null,
- editing: false,
- grid: false,
- data: null,
-
- style: Ember.computed('widgets.@each.height', 'widgets.@each.y', function() {
- var height = this._calculateHeight();
- if (this.get('editing') === true && height < 400) {
- height = 400;
- }
-
- return Ember.String.htmlSafe('height: ' + height + 'px;');
- }),
-
- _calculateHeight() {
- var maxHeight = 0;
- var widgets = this.get('widgets');
-
- widgets.forEach(function(widget) {
- var widgetHeight = widget.get('y') + widget.get('height');
- if (widgetHeight > maxHeight) {
- maxHeight = widgetHeight;
- }
- });
-
- // add padding to height
- maxHeight += 40;
-
- return maxHeight;
- },
-
- actions: {
- showWidgetDialog(widget) {
- this.sendAction('showWidgetDialog', widget);
- }
- }
-});
diff --git a/app/components/widget-image.js b/app/components/widget-image.js
deleted file mode 100644
index b4f15f0..0000000
--- a/app/components/widget-image.js
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * File: widget-image.js
- * Author: Markus Grigull
- * Date: 05.12.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import WidgetAbstract from './widget-abstract';
-import Ember from 'ember';
-import ENV from '../config/environment';
-import EmberUploader from 'ember-uploader';
-
-const {
- inject: { service }
-} = Ember;
-
-export default WidgetAbstract.extend({
- classNames: [ 'widgetImage' ],
-
- session: service('session'),
- sessionUser: Ember.inject.service('session-user'),
- store: service(),
-
- url: 'http://' + ENV.APP.API_HOST,
- namespace: 'api/v1',
-
- doubleClick() {
- if (this.get('editing') === true) {
- // prepare modal
- this.set('name', this.get('widget.name'));
-
- // show modal
- this.set('isShowingModal', true);
- }
- },
-
- actions: {
- submitModal() {
- // verify properties
- let properties = this.getProperties('name');
- properties.widgetData = { path: this.get('image.path') };
-
- this.get('widget').setProperties(properties);
-
- let self = this;
-
- this.get('widget').save().then(function() {
- self.set('isShowingModal', false);
- });
- },
-
- cancelModal() {
- this.set('isShowingModal', false);
- },
-
- selectImage(image) {
- // get image by path
- var self = this;
-
- this.get('widget.visualization').then((visualization) => {
- visualization.get('project').then((project) => {
- project.get('owner').then((user) => {
- user.get('files').then((files) => {
- files.forEach(function(file) {
- if (file.get('name') === image) {
- // set image
- self.set('image', file);
- }
- });
- });
- });
- });
- });
- },
-
- upload() {
- // check if any files to upload
- let files = this.get('uploadFiles');
-
- if (!Ember.isEmpty(files)) {
- var uploadURL = this.get('url') + '/' + this.get('namespace') + '/upload';
-
- const uploader = EmberUploader.Uploader.create({
- multiple: true,
- url: uploadURL,
- ajaxSettings: {
- headers: {
- 'x-access-token': this.get('session.data.authenticated.token')
- }
- }
- });
-
- var self = this;
-
- uploader.upload(files).then(function() {
- // reload user
- var user = self.get('sessionUser.user');
- self.get('store').findRecord('user', user.get('id'));
- });
- }
- }
- }
-});
diff --git a/app/components/widget-label.js b/app/components/widget-label.js
deleted file mode 100644
index 5fd22fe..0000000
--- a/app/components/widget-label.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * File: widget-label.js
- * Author: Markus Grigull
- * Date: 03.11.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import WidgetAbstract from './widget-abstract';
-
-export default WidgetAbstract.extend({
- classNames: [ 'widgetLabel' ],
-
- minWidth_resize: 50,
- minHeight_resize: 20,
-
- doubleClick() {
- if (this.get('editing') === true) {
- // prepare modal
- this.set('name', this.get('widget.name'));
- this.set('errorMessage', null);
-
- // show modal
- this.set('isShowingModal', true);
- }
- },
-
- actions: {
- submitModal() {
- // verify properties
- let properties = this.getProperties('name');
-
- if (properties['name'] === null || properties['name'] === "") {
- this.set('errorMessage', 'Widget name is missing');
- return;
- }
-
- // save properties
- this.get('widget').setProperties(properties);
-
- let self = this;
-
- this.get('widget').save().then(function() {
- self.set('isShowingModal', false);
- });
- },
-
- cancelModal() {
- this.set('isShowingModal', false);
- },
-
- deleteModal() {
- // delete widget
- this.get('widget').destroyRecord();
-
- this.set('isShowingModal', false);
- },
- }
-});
diff --git a/app/components/widget-plot.js b/app/components/widget-plot.js
deleted file mode 100644
index 7574de0..0000000
--- a/app/components/widget-plot.js
+++ /dev/null
@@ -1,292 +0,0 @@
-/**
- * File: widget-value.js
- * Author: Markus Grigull
- * Date: 08.12.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import WidgetAbstract from './widget-abstract';
-
-export default WidgetAbstract.extend({
- classNames: [ 'widgetPlot' ],
-
- plotData: Ember.A([]),
-
- plotOptions: {
- series: {
- lines: {
- show: true,
- lineWidth: 2
- },
- shadowSize: 0
- },
- xaxis: {
- mode: 'time',
- timeformat: '%M:%S',
- axisLabel: 'time [min]',
- axisLabelUseCanvas: true
- }/*,
- yaxis: {
- tickDecimals: 1,
- axisLabel: this.data.get('type'),
- axisLabelUseCanvas: true
- }*/
- },
-
- signals: Ember.A([]),
- checkedSignals: {},
- plotType: "multiple",
- time: null,
- observeQuery: null,
- selectedSignal: null,
-
- _updateDataObserver: Ember.on('init', Ember.observer('widget.widgetData.simulator', 'widget.widgetData.type', 'widget.widgetData.signals', function() {
- // get query for observer
- let simulatorId = this.get('widget.widgetData.simulator');
- let query = 'data.' + simulatorId + '.sequence';
-
- // get plot settings
- let signals = this.get('widget.widgetData.signals');
- this.set('signals', signals);
-
- let plotType = this.get('widget.widgetData.type');
- this.set('plotType', plotType);
-
- if (plotType === 'table') {
- // set simulation model for table with signals
- var self = this;
- let simulatorid = this.get('widget.widgetData.simulator');
-
- this.get('widget.visualization').then((visualization) => {
- visualization.get('project').then((project) => {
- project.get('simulation').then((simulation) => {
- simulation.get('models').then((simulationModels) => {
- // find simulation model by simulatorid
- simulationModels.forEach(function(simulationModel) {
- simulationModel.get('simulator').then((simulator) => {
- if (simulator.get('simulatorid') === simulatorid) {
- // set simulation model
- self.set('simulationModel', simulationModel);
-
- if (self.get('selectedSignal') === null) {
- self.set('selectedSignal', simulationModel.get('mapping')[0]);
- }
- }
- });
- });
- });
- });
- });
- });
- }
-
- // update observer TODO: Only update when (query) changed
- let observeQuery = this.get('observeQuery');
- if (query !== observeQuery) {
- if (observeQuery != null) {
- this.removeObserver(observeQuery, this._updateData);
- }
-
- this.addObserver(query, this._updateData);
- this.set('observeQuery', query);
- }
- })),
-
- _updateData() {
- // get values from array
- let simulatorId = this.get('widget.widgetData.simulator');
- let values = this.get('data.' + simulatorId + '.flotValues');
- var updatedValues = Ember.A([]);
-
- // update plot options
- var plotOptions = this.get('plotOptions');
-
- // calculate diff for first and last timestamp
- var firstTimestamp = values[0][0][0];
- var lastTimestamp = values[0][values[0].length - 1][0];
-
- var diff = lastTimestamp - firstTimestamp;
- var diffValue = this.get('widget.widgetData.time') * 1000; // javascript timestamps are in milliseconds
-
- if (diff > diffValue) {
- firstTimestamp = lastTimestamp - diffValue;
- } else {
- lastTimestamp = firstTimestamp + diffValue;
- }
-
- plotOptions.xaxis.min = firstTimestamp;
- plotOptions.xaxis.max = lastTimestamp;
- this.set('plotOptions', plotOptions);
-
- // update values
- var index = 0;
-
- this.get('signals').forEach(function(signal) {
- updatedValues.replace(index, 1, Ember.A([ values[signal] ]));
- index += 1;
- });
-
- this.set('plotData', updatedValues);
- },
-
- doubleClick() {
- if (this.get('editing') === true) {
- // prepare modal
- this.set('name', this.get('widget.name'));
- this.set('plotType', this.get('widget.widgetData.type'));
- this.set('time', this.get('widget.widgetData.time'));
- this.set('errorMessage', null);
-
- // get signal mapping for simulation model
- let self = this;
- let simulatorid = this.get('widget.widgetData.simulator');
-
- this.get('widget.visualization').then((visualization) => {
- visualization.get('project').then((project) => {
- project.get('simulation').then((simulation) => {
- simulation.get('models').then((simulationModels) => {
- // find simulation model by simulatorid
- simulationModels.forEach(function(simulationModel) {
- simulationModel.get('simulator').then((simulator) => {
- if (simulator.get('simulatorid') === simulatorid) {
- // set simulation model
- self.set('simulationModel', simulationModel);
- self.set('simulationModelName', simulationModel.get('name'));
-
- // set signals
- let mapping = simulationModel.get('mapping');
- let checkedSignals = {};
-
- // uncheck all signals
- mapping.forEach(function(key) {
- checkedSignals[key] = false;
- });
-
- self.get('signals').forEach(function(signal) {
- checkedSignals[mapping[signal]] = true;
- });
-
- self.set('checkedSignals', checkedSignals);
- }
- });
- });
- });
- });
- });
- });
-
- // show modal
- this.set('isShowingModal', true);
- }
- },
-
- actions: {
- submitModal() {
- // verify properties
- let properties = this.getProperties('name');
-
- // set simulator by simulation model name
- let simulationModelName = this.get('simulationModelName');
- let self = this;
-
- this.get('widget.visualization').then((visualization) => {
- visualization.get('project').then((project) => {
- project.get('simulation').then((simulation) => {
- simulation.get('models').then((simulationModels) => {
- // find simulation model by name
- simulationModels.forEach(function(simulationModel) {
- if (simulationModel.get('name') === simulationModelName) {
- simulationModel.get('simulator').then((simulator) => {
- // set simulator
- let widgetData = {
- type: self.get('plotType')
- };
-
- widgetData.simulator = simulator.get('simulatorid');
- widgetData.time = self.get('time');
-
- // set signals
- let mapping = simulationModel.get('mapping');
- widgetData.signals = [];
-
- // uncheck all signals
- let checkedSignals = self.get('checkedSignals');
-
- for (var i = 0; i < mapping.length; i++) {
- if (checkedSignals[mapping[i]]) {
- widgetData.signals.push(i);
- }
- }
-
- // save properties
- properties['widgetData'] = widgetData;
-
- self.get('widget').setProperties(properties);
-
- self.get('widget').save().then(function() {
- self.set('isShowingModal', false);
- });
- });
- }
- });
- });
- });
- });
- });
- },
-
- cancelModal() {
- this.set('isShowingModal', false);
- },
-
- deleteModal() {
- // delete widget
- this.get('widget').destroyRecord();
-
- this.set('isShowingModal', false);
- },
-
- selectSimulationModel(simulationModelName) {
- // save simulation model
- this.set('simulationModelName', simulationModelName);
-
- // get signal mapping for simulation model
- let self = this;
-
- this.get('widget.visualization').then((visualization) => {
- visualization.get('project').then((project) => {
- project.get('simulation').then((simulation) => {
- simulation.get('models').then((simulationModels) => {
- // find simulation model by name
- simulationModels.forEach(function(simulationModel) {
- if (simulationModel.get('name') === simulationModelName) {
- self.set('simulationModel', simulationModel);
- }
- });
- });
- });
- });
- });
- },
-
- selectType(type) {
- this.set('plotType', type);
- },
-
- selectTableSignal(signal) {
- // display signal
- let mapping = this.get('simulationModel.mapping');
-
- for (var i = 0; i < mapping.length; i++) {
- if (mapping[i] === signal) {
- this.set('widget.widgetData.signals', [ i ]);
- }
- }
-
- this.set('selectedSignal', signal);
- }
- }
-});
diff --git a/app/components/widget-table.js b/app/components/widget-table.js
deleted file mode 100644
index 74c14bd..0000000
--- a/app/components/widget-table.js
+++ /dev/null
@@ -1,170 +0,0 @@
-/**
- * File: widget-table.js
- * Author: Markus Grigull
- * Date: 05.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import WidgetAbstract from './widget-abstract';
-import Ember from 'ember';
-
-export default WidgetAbstract.extend({
- classNames: [ 'widgetTable' ],
-
- minWidth_resize: 200,
- minHeight_resize: 60,
-
- signals: [],
-
- observeQuery: null,
-
- _updateDataObserver: Ember.on('init', Ember.observer('widget.widgetData.simulator', function() {
- // get query for observer
- let simulatorId = this.get('widget.widgetData.simulator');
- let query = 'data.' + simulatorId + '.sequence';
- let observeQuery = this.get('observeQuery');
- if (observeQuery != null) {
- this.removeObserver(observeQuery, this._updateData);
- }
-
- this.addObserver(query, this._updateData);
- this.set('observeQuery', query);
-
- // get signal names
- let self = this;
-
- this.get('widget.visualization').then((visualization) => {
- visualization.get('project').then((project) => {
- project.get('simulation').then((simulation) => {
- simulation.get('models').then((simulationModels) => {
- // get simulation model by simulatorId
- simulationModels.forEach((simulationModel) => {
- simulationModel.get('simulator').then((simulator) => {
- if (simulator.get('simulatorid') === simulatorId) {
- // set signal names
- let signals = [];
-
- simulationModel.get('mapping').forEach((signalName) => {
- signals.push({ name: signalName, value: null });
- });
-
- self.set('signals', signals);
- }
- });
- });
- });
- });
- });
- });
- })),
-
- _updateData() {
- // get signal names to fill data in
- let signals = this.get('signals');
- if (!signals) {
- // wait till names are loaded
- return;
- }
-
- // get values from array
- let values = this.get('data.' + this.get('widget.widgetData.simulator') + '.values');
- for (let i = 0; i < values.length; i++) {
- if (!signals[i]) {
- break;
- }
-
- Ember.set(signals[i], 'value', values[i]);
- }
- },
-
- doubleClick() {
- if (this.get('editing') === true) {
- // prepare modal
- this.set('name', this.get('widget.name'));
- this.set('errorMessage', null);
-
- // get simlator name from id
- let self = this;
- let simulatorid = this.get('widget.widgetData.simulator');
-
- this.get('widget.visualization').then((visualization) => {
- visualization.get('project').then((project) => {
- project.get('simulation').then((simulation) => {
- simulation.get('models').then((simulationModels) => {
- // find simulation model by simulatorid
- simulationModels.forEach((simulationModel) => {
- simulationModel.get('simulator').then((simulator) => {
- if (simulator.get('simulatorid') === simulatorid) {
- // set simulation model
- self.set('simulationModel', simulationModel);
- self.set('simulationModelName', simulationModel.get('name'));
- }
- });
- });
- });
- });
- });
- });
-
- // show modal
- this.set('isShowingModal', true);
- }
- },
-
- actions: {
- submitModal() {
- // verify properties
- let properties = this.getProperties('name');
-
- // set simulator by simulation model name
- let simulationModelName = this.get('simulationModelName');
- let self = this;
-
- this.get('widget.visualization').then((visualization) => {
- visualization.get('project').then((project) => {
- project.get('simulation').then((simulation) => {
- simulation.get('models').then((simulationModels) => {
- // find simulation model by name
- simulationModels.forEach(function(simulationModel) {
- if (simulationModel.get('name') === simulationModelName) {
- simulationModel.get('simulator').then((simulator) => {
- // set simulator
- let widgetData = {};
- widgetData.simulator = simulator.get('simulatorid');
-
- // save properties
- properties['widgetData'] = widgetData;
-
- self.get('widget').setProperties(properties);
-
- self.get('widget').save().then(function() {
- self.set('isShowingModal', false);
- });
- });
- }
- });
- });
- });
- });
- });
- },
-
- cancelModal() {
- this.set('isShowingModal', false);
- },
-
- deleteModal() {
- // delete widget
- this.get('widget').destroyRecord();
-
- this.set('isShowingModal', false);
- },
-
- selectSimulationModel(simulationModelName) {
- // save simulation model
- this.set('simulationModelName', simulationModelName);
- }
- }
-});
diff --git a/app/components/widget-value.js b/app/components/widget-value.js
deleted file mode 100644
index efcbfbe..0000000
--- a/app/components/widget-value.js
+++ /dev/null
@@ -1,167 +0,0 @@
-/**
- * File: widget-value.js
- * Author: Markus Grigull
- * Date: 04.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import WidgetAbstract from './widget-abstract';
-import Ember from 'ember';
-
-export default WidgetAbstract.extend({
- classNames: [ 'widgetValue' ],
-
- minWidth_resize: 50,
- minHeight_resize: 20,
-
- observeQuery: null,
-
- _updateDataObserver: Ember.on('init', Ember.observer('widget.widgetData.simulator', 'widget.widgetData.signal', function() {
- // update observer
- let query = 'data.' + this.get('widget.widgetData.simulator') + '.sequence';
- let observeQuery = this.get('observeQuery');
- if (observeQuery != null) {
- this.removeObserver(observeQuery, this._updateData);
- }
-
- this.addObserver(query, this._updateData);
- this.set('observeQuery', query);
- })),
-
- _updateData() {
- // get value from array
- let values = this.get('data.' + this.get('widget.widgetData.simulator') + '.values');
- if (values) {
- this.set('value', values[this.get('widget.widgetData.signal')]);
- } else {
- this.set('value', null);
- }
- },
-
- doubleClick() {
- if (this.get('editing') === true) {
- // prepare modal
- this.set('name', this.get('widget.name'));
- this.set('errorMessage', null);
-
- // get signal mapping for simulation model
- let self = this;
- let simulatorid = this.get('widget.widgetData.simulator');
-
- this.get('widget.visualization').then((visualization) => {
- visualization.get('project').then((project) => {
- project.get('simulation').then((simulation) => {
- simulation.get('models').then((simulationModels) => {
- // find simulation model by simulatorid
- simulationModels.forEach(function(simulationModel) {
- simulationModel.get('simulator').then((simulator) => {
- if (simulator.get('simulatorid') === simulatorid) {
- // set simulation model
- self.set('simulationModel', simulationModel);
- self.set('simulationModelName', simulationModel.get('name'));
-
- // set signal
- let mapping = simulationModel.get('mapping');
- self.set('signalName', mapping[self.get('widget.widgetData.signal')]);
- }
- });
- });
- });
- });
- });
- });
-
- // show modal
- this.set('isShowingModal', true);
- }
- },
-
- actions: {
- submitModal() {
- // verify properties
- let properties = this.getProperties('name');
-
- // set simulator by simulation model name
- let simulationModelName = this.get('simulationModelName');
- let self = this;
-
- this.get('widget.visualization').then((visualization) => {
- visualization.get('project').then((project) => {
- project.get('simulation').then((simulation) => {
- simulation.get('models').then((simulationModels) => {
- // find simulation model by name
- simulationModels.forEach(function(simulationModel) {
- if (simulationModel.get('name') === simulationModelName) {
- simulationModel.get('simulator').then((simulator) => {
- // set simulator
- let widgetData = {};
- widgetData.simulator = simulator.get('simulatorid');
-
- // set signal by name
- let mapping = simulationModel.get('mapping');
- let signalName = self.get('signalName');
-
- for (let i = 0; i < mapping.length; i++) {
- if (mapping[i] === signalName) {
- widgetData.signal = i;
- }
- }
-
- // save properties
- properties['widgetData'] = widgetData;
-
- self.get('widget').setProperties(properties);
-
- self.get('widget').save().then(function() {
- self.set('isShowingModal', false);
- });
- });
- }
- });
- });
- });
- });
- });
- },
-
- cancelModal() {
- this.set('isShowingModal', false);
- },
-
- deleteModal() {
- // delete widget
- this.get('widget').destroyRecord();
-
- this.set('isShowingModal', false);
- },
-
- selectSimulationModel(simulationModelName) {
- // save simulation model
- this.set('simulationModelName', simulationModelName);
-
- // get signal mapping for simulation model
- let self = this;
-
- this.get('widget.visualization').then((visualization) => {
- visualization.get('project').then((project) => {
- project.get('simulation').then((simulation) => {
- simulation.get('models').then((simulationModels) => {
- // find simulation model by name
- simulationModels.forEach(function(simulationModel) {
- if (simulationModel.get('name') === simulationModelName) {
- self.set('simulationModel', simulationModel);
- }
- });
- });
- });
- });
- });
- },
-
- selectSignal(signalName) {
- this.set('signalName', signalName);
- }
- }
-});
diff --git a/app/controllers/.gitkeep b/app/controllers/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/app/controllers/login.js b/app/controllers/login.js
deleted file mode 100644
index 699eaa1..0000000
--- a/app/controllers/login.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * File: login.js
- * Author: Markus Grigull
- * Date: 26.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-export default Ember.Controller.extend({
- session: Ember.inject.service('session'),
-
- actions: {
- authenticate() {
- let { username, password } = this.getProperties('username', 'password');
- this.get('session').authenticate('authenticator:custom', username, password).catch((reason) => {
- this.set('errorMessage', reason);
- });
- }
- }
-});
diff --git a/app/controllers/me.js b/app/controllers/me.js
deleted file mode 100644
index 8897e12..0000000
--- a/app/controllers/me.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * File: me.js
- * Author: Markus Grigull
- * Date: 28.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-export default Ember.Controller.extend({
- isAdmin: Ember.computed('model', function() {
- var level = this.get('model.adminLevel');
- return level >= 1;
- }),
-
- actions: {
- changeUser() {
- // save the changes
- var user = this.get('model');
- user.save();
- }
- }
-});
diff --git a/app/controllers/project/index.js b/app/controllers/project/index.js
deleted file mode 100644
index 80f931b..0000000
--- a/app/controllers/project/index.js
+++ /dev/null
@@ -1,116 +0,0 @@
-/**
- * File: index.js
- * Author: Markus Grigull
- * Date: 28.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-export default Ember.Controller.extend({
- isShowingNewModal: false,
- isShowingEditModal: false,
- isShowingDeleteModal: false,
-
- errorMessage: null,
-
- visualization: null,
-
- actions: {
- showNewModal() {
- // reset properties
- this.set('errorMessage', null);
- this.set('name', null);
-
- // show the dialog
- this.set('isShowingNewModal', true);
- },
-
- showEditModal(visualization) {
- // set properties
- this.set('errorMessage', null);
- this.set('visualization', visualization);
- this.set('name', visualization.get('name'));
-
- // show the dialog
- this.set('isShowingEditModal', true);
- },
-
- showDeleteModal(visualization) {
- // set properties
- this.set('visualization', visualization);
-
- // show the dialog
- this.set('isShowingDeleteModal', true);
- },
-
- submitNew() {
- // verify properties
- var properties = this.getProperties('name');
- if (properties['name'] == null || properties['name'] === "") {
- this.set('errorMessage', 'Visualization name is missing');
- return;
- }
-
- // set project property
- properties['project'] = this.get('model.id');
-
- // create new project
- var visualization = this.store.createRecord('visualization', properties);
- var controller = this;
-
- // this change will not be saved, but it is nessecary otherwise ember will omit the project's id in the post request
- var project = this.get('model');
- project.get('visualizations').pushObject(visualization);
-
- visualization.save().then(function() {
- controller.set('isShowingNewModal', false);
- }, function() {
- Ember.debug('Error saving new visualization');
- });
- },
-
- cancelNew() {
- this.set('isShowingNewModal', false);
- },
-
- submitEdit() {
- // verify properties
- var properties = this.getProperties('name');
- if (properties['name'] == null || properties['name'] === "") {
- this.set('errorMessage', 'Visualization name is missing');
- return;
- }
-
- // save properties
- this.get('visualization').setProperties(properties);
-
- var controller = this;
-
- this.get('visualization').save().then(function() {
- controller.set('isShowingEditModal', false);
- }, function() {
- Ember.debug('Error saving edit visualization');
- });
- },
-
- cancelEdit() {
- this.set('isShowingEditModal', false);
- },
-
- confirmDelete() {
- // delete the visualization
- var visualization = this.get('visualization');
- visualization.destroyRecord();
-
- // hide the dialog
- this.set('isShowingDeleteModal', false);
- },
-
- cancelDelete() {
- this.set('isShowingDeleteModal', false);
- }
- }
-});
diff --git a/app/controllers/projects.js b/app/controllers/projects.js
deleted file mode 100644
index 337bc46..0000000
--- a/app/controllers/projects.js
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
- * File: projects.js
- * Author: Markus Grigull
- * Date: 01.10.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-export default Ember.Controller.extend({
- sessionUser: Ember.inject.service('session-user'),
-
- isShowingNewModal: false,
- isShowingEditModal: false,
- isShowingDeleteModal: false,
-
- errorMessage: null,
-
- project: null,
- projectSimulation: null,
-
- _updateSimulations: Ember.observer('model', function() {
- if (this.get('model.simulations') != null && this.get('model.simulations.length') > 0) {
- var simulations = this.get('model.simulations');
- this.set('projectSimulation', simulations.toArray()[0]);
- }
- }),
-
- actions: {
- showNewModal() {
- // reset properties
- this.set('errorMessage', null);
- this.set('name', null);
-
- // show the dialog
- this.set('isShowingNewModal', true);
- },
-
- showEditModal(project) {
- // set properties
- this.set('errorMessage', null);
- this.set('project', project);
- this.set('name', project.get('name'));
- this.set('projectSimulation', project.get('simulation'));
-
- // show the dialog
- this.set('isShowingEditModal', true);
- },
-
- showDeleteModal(project) {
- // set properties
- this.set('project', project);
-
- // show the dialog
- this.set('isShowingDeleteModal', true);
- },
-
- submitNew() {
- // verify properties
- var properties = this.getProperties('name');
- if (properties['name'] == null || properties['name'] === "") {
- this.set('errorMessage', 'Project name is missing');
- return;
- }
-
- // set owner property
- var user = this.get('sessionUser.user');
- properties['owner'] = user;
-
- // set simulation property
- properties['simulation'] = this.get('projectSimulation.id');
-
- // create new project
- var project = this.store.createRecord('project', properties);
-
- // this change will not be saved, but it is nessecary otherwise ember will omit the simulation's id in the post request
- this.get('projectSimulation.projects').pushObject(project);
-
- var controller = this;
-
- project.save().then(function() {
- controller.set('isShowingNewModal', false);
- }, function() {
- Ember.debug('Error saving new project');
- });
- },
-
- cancelNew() {
- this.set('isShowingNewModal', false);
- },
-
- submitEdit() {
- // verify properties
- var properties = this.getProperties('name');
- if (properties['name'] == null || properties['name'] === "") {
- this.set('errorMessage', 'Project name is missing');
- return;
- }
-
- // remove from old simulation
-
-
- // save properties
- properties['simulation'] = this.get('projectSimulation.id');
-
- this.get('project').setProperties(properties);
-
- // this change will not be saved, but it is nessecary otherwise ember will omit the simulation's id in the post request
- this.get('projectSimulation.projects').pushObject(this.get('project'));
-
- var controller = this;
-
- this.get('project').save().then(function() {
- controller.set('isShowingEditModal', false);
- }, function() {
- Ember.debug('Error saving edit project');
- });
- },
-
- cancelEdit() {
- this.set('isShowingEditModal', false);
- },
-
- confirmDelete() {
- // delete the project
- var project = this.get('project');
- project.destroyRecord();
-
- // hide the dialog
- this.set('isShowingDeleteModal', false);
- },
-
- cancelDelete() {
- this.set('isShowingDeleteModal', false);
- },
-
- selectSimulation(simulationName) {
- // get simulation by name
- var simulations = this.get('model.simulations');
- var controller = this;
-
- simulations.forEach(function(simulation) {
- if (simulation.get('name') === simulationName) {
- controller.set('projectSimulation', simulation);
- }
- });
- }
- }
-});
diff --git a/app/controllers/simulation-model/index.js b/app/controllers/simulation-model/index.js
deleted file mode 100644
index 88463c1..0000000
--- a/app/controllers/simulation-model/index.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * File: index.js
- * Author: Markus Grigull
- * Date: 20.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-export default Ember.Controller.extend({
- _setSignalNames: Ember.observer('model', 'model.length', function() {
- // loop through signals
- let length = this.get('model.length');
- let mapping = this.get('model.mapping');
-
- for (let i = 0; i < length; i++) {
- this.set('name' + i, mapping[i]);
- }
- }),
-
- actions: {
- saveMapping() {
- // save all signal names
- let length = this.get('model.length');
- let mapping = this.get('model.mapping');
-
- for (let i = 0; i < length; i++) {
- mapping[i] = this.get('name' + i);
- }
-
- this.set('model.mapping', mapping);
-
- // save the changed model
- let self = this;
-
- this.get('model').save().then(function() {
- // go back to simulation
- self.get('model.simulation').then((simulation) => {
- self.transitionToRoute('/simulation/' + simulation.get('id'));
- });
- }, function() {
- Ember.debug('Unable to save simulation model');
- });
- }
- }
-});
diff --git a/app/controllers/simulation/index.js b/app/controllers/simulation/index.js
deleted file mode 100644
index 86d063a..0000000
--- a/app/controllers/simulation/index.js
+++ /dev/null
@@ -1,193 +0,0 @@
-/**
- * File: index.js
- * Author: Markus Grigull
- * Date: 30.09.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-export default Ember.Controller.extend({
- isShowingNewModal: false,
- isShowingEditModal: false,
- isShowingDeleteModal: false,
-
- errorMessage: null,
-
- simulationModel: null,
- simulatorName: null,
-
- _updateSimulators: Ember.observer('model', function() {
- if (this.get('model.simulators') != null && this.get('model.simulators.length') > 0) {
- let simulators = this.get('model.simulators');
- this.set('simulatorName', simulators.toArray()[0].get('name'));
- }
- }),
-
- actions: {
- showNewModal() {
- // reset properties
- this.set('errorMessage', null);
- this.set('name', null);
- this.set('length', 1);
-
- // show the dialog
- this.set('isShowingNewModal', true);
- },
-
- showEditModal(simulationModel) {
- // set properties
- this.set('errorMessage', null);
- this.set('simulationModel', simulationModel);
- this.set('name', simulationModel.get('name'));
- this.set('length', simulationModel.get('length'));
-
- let simulators = this.get('model.simulators');
- let simulatorId = simulationModel.get('simulator.id');
- let simulatorName = null;
-
- simulators.forEach(function(simulator) {
- if (simulator.get('id') === simulatorId) {
- simulatorName = simulator.get('name');
- }
- });
-
- this.set('simulatorName', simulatorName);
-
- // show the dialog
- this.set('isShowingEditModal', true);
- },
-
- showDeleteModal(simulationModel) {
- // set properties
- this.set('simulationModel', simulationModel);
-
- // show the dialog
- this.set('isShowingDeleteModal', true);
- },
-
- submitNew() {
- // verify properties
- let properties = this.getProperties('name', 'length');
- if (properties['name'] == null || properties['name'] === "") {
- this.set('errorMessage', 'Simulation model name is missing');
- return;
- }
-
- // set simuatlion properties
- let simulation = this.get('model.simulation');
- properties['simulation'] = simulation;
-
- // get the simulator by simulator name
- let simulators = this.get('model.simulators');
- let simulatorName = this.get('simulatorName');
-
- simulators.forEach(function(simulator) {
- if (simulator.get('name') === simulatorName) {
- properties['simulator'] = simulator;
- }
- });
-
- // create mapping
- let mapping = [];
-
- for (let i = 0; i < properties['length']; i++) {
- mapping.push('Signal ' + (i + 1));
- }
-
- properties['mapping'] = mapping;
-
- // create new model
- let simulationModel = this.store.createRecord('simulation-model', properties);
-
- // this change will not be saved, but it is nessecary otherwise ember will omit the simulation's id in the post request
- simulation.get('models').pushObject(simulationModel);
-
- let controller = this;
-
- simulationModel.save().then(function() {
- controller.set('isShowingNewModal', false);
- }, function() {
- Ember.debug('Error saving new model');
- });
- },
-
- cancelNew() {
- this.set('isShowingNewModal', false);
- },
-
- submitEdit() {
- // verify properties
- let properties = this.getProperties('name', 'length');
- if (properties['name'] == null || properties['name'] === "") {
- this.set('errorMessage', 'Simulation model name is missing');
- return;
- }
-
- // set simuatlion properties
- let simulation = this.get('model.simulation');
- properties['simulation'] = simulation;
-
- // get the simulator by simulator name
- let simulators = this.get('model.simulators');
- let simulatorName = this.get('simulatorName');
-
- simulators.forEach(function(simulator) {
- if (simulator.get('name') === simulatorName) {
- properties['simulator'] = simulator;
- }
- });
-
- // change mapping
- let mapping = this.get('simulationModel.mapping');
-
- if (mapping.length < properties['length']) {
- // add more signals
- for (let i = mapping.length; i < properties['length']; i++) {
- mapping.push('Signal ' + (i + 1));
- }
- } else if (mapping.length > properties['length']) {
- // remove signals
- mapping = mapping.slice(0, Number(properties['length']));
- }
-
- console.log(mapping);
-
- properties['mapping'] = mapping;
-
- // save properties
- let controller = this;
-
- this.get('simulationModel').setProperties(properties);
-
- this.get('simulationModel').save().then(function() {
- controller.set('isShowingEditModal', false);
- }, function() {
- Ember.debug('Error saving edit simulation model');
- });
- },
-
- cancelEdit() {
- this.set('isShowingEditModal', false);
- },
-
- confirmDelete() {
- // delete the model
- let simulationModel = this.get('simulationModel');
- simulationModel.destroyRecord();
-
- // hide the dialog
- this.set('isShowingDeleteModal', false);
- },
-
- cancelDelete() {
- this.set('isShowingDeleteModal', false);
- },
-
- selectSimulator(simulator) {
- this.set('simulatorName', simulator);
- }
- }
-});
diff --git a/app/controllers/simulations.js b/app/controllers/simulations.js
deleted file mode 100644
index 0be9ecf..0000000
--- a/app/controllers/simulations.js
+++ /dev/null
@@ -1,153 +0,0 @@
-/**
- * File: simulation.js
- * Author: Markus Grigull
- * Date: 30.09.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-export default Ember.Controller.extend({
- sessionUser: Ember.inject.service('session-user'),
-
- isShowingNewModal: false,
- isShowingEditModal: false,
- isShowingDeleteModal: false,
-
- errorMessage: null,
-
- simulation: null,
- simulationRunning: true,
-
- actions: {
- showNewModal() {
- // reset properties
- this.set('errorMessage', null);
- this.set('name', null);
-
- // show the dialog
- this.set('isShowingNewModal', true);
- },
-
- showEditModal(simulation) {
- // set properties
- this.set('errorMessage', null);
- this.set('simulation', simulation);
- this.set('name', simulation.get('name'));
-
- // show the dialog
- this.set('isShowingEditModal', true);
- },
-
- showDeleteModal(simulation) {
- // set properties
- this.set('simulation', simulation);
-
- // show the dialog
- this.set('isShowingDeleteModal', true);
- },
-
- showRunningModal(simulation) {
- // set properties
- this.set('simulation', simulation);
- this.set('simulationRunning', simulation.get('running'));
-
- // show the dialog
- this.set('isShowingRunningModal', true);
- },
-
- submitNew() {
- // verify properties
- var properties = this.getProperties('name');
- if (properties['name'] == null || properties['name'] === "") {
- this.set('errorMessage', 'Simulation name is missing');
- return;
- }
-
- // set owner properties
- var user = this.get('sessionUser.user');
- properties['owner'] = user;
-
- // create new simulation
- var simulation = this.store.createRecord('simulation', properties);
- var controller = this;
-
- simulation.save().then(function() {
- controller.set('isShowingNewModal', false);
- }, function() {
- Ember.debug('Error saving new simulation');
- });
- },
-
- cancelNew() {
- this.set('isShowingNewModal', false);
- },
-
- submitEdit() {
- // verify properties
- var properties = this.getProperties('name');
- if (properties['name'] == null || properties['name'] === "") {
- this.set('errorMessage', 'Simulation name is missing');
- return;
- }
-
- // save properties
- this.get('simulation').set('name', properties['name']);
-
- var controller = this;
-
- this.get('simulation').save().then(function() {
- controller.set('isShowingEditModal', false);
- }, function() {
- Ember.debug('Error saving edit simulation');
- });
- },
-
- cancelEdit() {
- this.set('isShowingEditModal', false);
- },
-
- confirmDelete() {
- // delete the simulation
- var simulation = this.get('simulation');
- simulation.destroyRecord();
-
- // hide the dialog
- this.set('isShowingDeleteModal', false);
- },
-
- cancelDelete() {
- this.set('isShowingDeleteModal', false);
- },
-
- confirmRunningSimulation() {
- // set the property
- var simulation = this.get('simulation');
- simulation.set('running', this.get('simulationRunning'));
-
- // save property
- var controller = this;
-
- simulation.save().then(function() {
- controller.set('isShowingRunningModal', false);
- }, function() {
- Ember.debug('Error saving running simulation');
- });
- },
-
- cancelRunningSimulation() {
- this.set('isShowingRunningModal', false);
- },
-
- selectRunning(running) {
- // NOTE: running is a string and not a boolean value
- if (running === 'true') {
- this.set('simulationRunning', true);
- } else {
- this.set('simulationRunning', false);
- }
- }
- }
-});
diff --git a/app/controllers/simulators.js b/app/controllers/simulators.js
deleted file mode 100644
index 2163e3c..0000000
--- a/app/controllers/simulators.js
+++ /dev/null
@@ -1,158 +0,0 @@
-/**
- * File: simulators.js
- * Author: Markus Grigull
- * Date: 30.09.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-export default Ember.Controller.extend({
- isShowingNewModal: false,
- isShowingDeleteModal: false,
- isShowingEditModal: false,
- isShowingRunningModal: false,
-
- simulatorid: 1,
- errorMessage: null,
- simulator: null,
- simulatorName: null,
- simulatorEdit: null,
- simulatorRunning: true,
-
- actions: {
- showNewModal() {
- // reset the properties
- this.set('errorMessage', null);
- this.set('simulatorid', 1);
- this.set('name', null);
- this.set('endpoint', null);
-
- // show the modal dialog
- this.set('isShowingNewModal', true);
- },
-
- showDeleteModal(simulator) {
- this.set('isShowingDeleteModal', true);
- this.set('simulator', simulator);
- },
-
- showEditModal(simulator) {
- // set properties
- this.set('errorMessage', null);
- this.set('simulator', simulator);
- this.set('simulatorid', simulator.get('simulatorid'));
- this.set('simulatorName', simulator.get('name'));
- this.set('simulatorEndpoint', simulator.get('endpoint'));
-
- // show the modal dialog
- this.set('isShowingEditModal', true);
- },
-
- showRunningModal(simulator) {
- // set properties
- this.set('simulator', simulator);
- this.set('simulatorRunning', simulator.get('running'));
-
- // show the dialog
- this.set('isShowingRunningModal', true);
- },
-
- newSimulator() {
- // verify properties
- var properties = this.getProperties('name', 'simulatorid', 'endpoint');
- if (properties['name'] == null) {
- this.set('errorMessage', 'Simulator name is missing');
- return;
- } else if (properties['endpoint'] == null) {
- this.set('errorMessage', 'Simulator endpoint is missing');
- return;
- }
-
- // create new simulator from properties
- var simulator = this.store.createRecord('simulator', properties);
- var controller = this;
-
- simulator.save().then(function() {
- controller.set('isShowingNewModal', false);
- }, function() {
- Ember.debug('Error saving new simulator');
- });
- },
-
- cancelNewSimulator() {
- this.set('isShowingNewModal', false);
- },
-
- cancelDeleteSimulator() {
- this.set('isShowingDeleteModal', false);
- },
-
- confirmDeleteSimulator() {
- // delete the simulator
- var simulator = this.get('simulator');
- simulator.destroyRecord();
-
- // hide the modal dialog
- this.set('isShowingDeleteModal', false);
- },
-
- editSimulator() {
- // verify new properties
- if (this.get('simulatorName') == null) {
- this.set('errorMessage', 'Simulator name is missing');
- return;
- } else if (this.get('simulatorEndpoint') == null) {
- this.set('errorMessage', 'Simulator endpoint is missing');
- return;
- }
-
- // save property changes
- this.get('simulator').set('name', this.get('simulatorName'));
- this.get('simulator').set('simulatorid', this.get('simulatorid'));
- this.get('simulator').set('endpoint', this.get('simulatorEndpoint'));
-
- var controller = this;
-
- this.get('simulator').save().then(function() {
- controller.set('isShowingEditModal', false);
- }, function() {
- Ember.debug('Error saving edit simulator');
- });
- },
-
- cancelEditSimulator() {
- this.set('isShowingEditModal', false);
- },
-
- confirmRunningSimulation() {
- // set the property
- var simulator = this.get('simulator');
- simulator.set('running', this.get('simulatorRunning'));
-
- // save property
- var controller = this;
-
- simulator.save().then(function() {
- controller.set('isShowingRunningModal', false);
- }, function() {
- Ember.debug('Error saving running simulator');
- });
- },
-
- cancelRunningSimulation() {
- this.set('isShowingRunningModal', false);
- },
-
- selectRunning(running) {
- // NOTE: running is a string and not a boolean value
- if (running === 'true') {
- this.set('simulatorRunning', true);
- } else {
- this.set('simulatorRunning', false);
- }
- }
- }
-});
diff --git a/app/controllers/user/delete.js b/app/controllers/user/delete.js
deleted file mode 100644
index 19046dc..0000000
--- a/app/controllers/user/delete.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * File: delete.js
- * Author: Markus Grigull
- * Date: 11.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-export default Ember.Controller.extend({
- sessionUser: Ember.inject.service('session-user'),
-
- actions: {
- cancelDelete() {
- this.transitionToRoute('/user/');
- },
-
- confirmDelete() {
- // delete all projects
- var user = this.get('model');
- user.destroyRecord();
-
- this.transitionToRoute('/user/');
- }
- }
-});
diff --git a/app/controllers/user/edit.js b/app/controllers/user/edit.js
deleted file mode 100644
index b44440a..0000000
--- a/app/controllers/user/edit.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * File: edit.js
- * Author: Markus Grigull
- * Date: 11.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-export default Ember.Controller.extend({
- actions: {
- saveEdit() {
- // save the changes
- var user = this.get('model');
- var controller = this;
-
- user.save().then(function() {
- controller.transitionToRoute('/user/');
- });
- },
-
- cancelEdit() {
- this.transitionToRoute('/user/');
- }
- }
-});
diff --git a/app/controllers/user/index.js b/app/controllers/user/index.js
deleted file mode 100644
index 021b80b..0000000
--- a/app/controllers/user/index.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * File: index.js
- * Author: Markus Grigull
- * Date: 11.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-export default Ember.Controller.extend({
- users: Ember.computed('model.@each', function() {
- var filteredUsers = this.get('model');
- filteredUsers.forEach(function(user) {
- // catch undefined user
- if (user) {
- if (user.get('id') === 'me') {
- filteredUsers.removeObject(user);
- }
- }
- });
-
- return filteredUsers;
- })
-});
diff --git a/app/controllers/user/new.js b/app/controllers/user/new.js
deleted file mode 100644
index 249f448..0000000
--- a/app/controllers/user/new.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * File: new.js
- * Author: Markus Grigull
- * Date: 11.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-export default Ember.Controller.extend({
- actions: {
- newUser() {
- // create new user from properties
- var properties = this.getProperties('username', 'password');
-
- var user = this.store.createRecord('user', properties);
- var controller = this;
-
- user.save().then(function() {
- controller.transitionToRoute('/user');
- });
- },
-
- cancelNewUser() {
- this.transitionToRoute('/user');
- }
- }
-});
diff --git a/app/controllers/visualization/edit.js b/app/controllers/visualization/edit.js
deleted file mode 100644
index 3478d7e..0000000
--- a/app/controllers/visualization/edit.js
+++ /dev/null
@@ -1,137 +0,0 @@
-/**
- * File: edit.js
- * Author: Markus Grigull
- * Date: 05.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import FetchLiveDataMixin from '../../mixins/fetch-live-data';
-
-export default Ember.Controller.extend(FetchLiveDataMixin, {
- isShowingWidgetValueModal: false,
-
- errorMessage: null,
-
- widget: null,
- name: null,
- simulator: null,
- simulatorName: null,
- signal: null,
-
- actions: {
- addWidget(name, position) {
- // get first simulator id
- let defaultSimulatorid = 0;
-
- this.get('model.project').then((project) => {
- project.get('simulation').then((simulation) => {
- simulation.get('models').then((simulationModels) => {
- simulationModels.toArray()[0].get('simulator').then((simulator) => {
- defaultSimulatorid = simulator.get('simulatorid');
-
- // create widget
- let widget = null;
- let properties = {
- x: position.x,
- y: position.y,
- name: 'widget',
- type: null
- };
-
- if (name === 'label') {
- properties.type = 'widget-label';
- properties.width = 100;
- properties.height = 20;
- properties.name = 'Label';
- } else if (name === 'table') {
- properties.type = 'widget-table';
- properties.name = "Table";
- properties.width = 500;
- properties.height = 200;
- properties.widgetData = { simulator: defaultSimulatorid };
- } else if (name === 'value') {
- properties.type = 'widget-value';
- properties.name = 'Value';
- properties.width = 250;
- properties.height = 20;
- properties.widgetData = { signal: 0, simulator: defaultSimulatorid };
- } else if (name === 'plot') {
- properties.type = 'widget-plot';
- properties.name = 'Plot';
- properties.width = 500;
- properties.height = 400;
- properties.widgetData = { signals: [0], simulator: defaultSimulatorid, type: 'multiple', time: 300 };
- } else if (name === 'image') {
- properties.type = 'widget-image';
- properties.name = 'Image';
- properties.width = 300;
- properties.height = 300;
- properties.widgetData = { path: null };
- } else {
- // DEBUG
- console.log('Add unknown widget ' + name);
- return;
- }
-
- if (properties.type != null) {
- // create widget
- widget = this.store.createRecord('widget', properties);
-
- // add widget to visualization
- this.get('model.widgets').pushObject(widget);
-
- // save new widget
- var visualization = this.get('model');
-
- widget.save().then(function() {
- // save the widget in the visualization
- visualization.get('widgets').pushObject(widget);
- visualization.save();
- });
- } else {
- console.error('Unknown widget type: ' + name);
- }
- });
- });
- });
- });
- },
-
- saveEdit() {
- // save changes to store
- var widgets = this.get('model.widgets');
- widgets.forEach(function(widget) {
- widget.save();
- });
-
- // go back to index
- var id = this.get('model.id');
- this.transitionToRoute('/visualization/' + id);
- },
-
- cancelEdit() {
- // TODO: revert changes
-
- let id = this.get('model.id');
- this.transitionToRoute('/visualization/' + id);
- },
-
- showWidgetDialog(widget) {
- // show dialog by widget type
- let widgetType = widget.get('type');
- if (widgetType === 'value') {
- // set properties
- this.set('widget', widget);
- /*this.set('name', plot.get('name'));
- this.set('signal', plot.get('signal'));*/
-
- //this.set('simulatorName', simulatorName);
-
- this.set('isShowingWidgetValueModal', true);
- }
- }
- }
-});
diff --git a/app/helpers/.gitkeep b/app/helpers/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/app/index.html b/app/index.html
deleted file mode 100644
index f0991a2..0000000
--- a/app/index.html
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
- VillaswebFrontend
-
-
-
- {{content-for "head"}}
-
-
-
-
- {{content-for "head-footer"}}
-
-
- {{content-for "body"}}
-
-
-
-
- {{content-for "body-footer"}}
-
-
diff --git a/app/mixins/draggable.js b/app/mixins/draggable.js
deleted file mode 100644
index 811b31e..0000000
--- a/app/mixins/draggable.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * File: draggable.js
- * Author: Markus Grigull
- * Date: 15.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-export default Ember.Mixin.create({
- uiDragOptions: [ 'disabled_drag', 'addClasses_drag', 'appendTo_drag', 'axis_drag',
- 'cancel_drag', 'connectToSortable_drag', 'containment_drag', 'cursor_drag',
- 'delay_drag', 'distance_drag', 'grid_drag', 'handle_drag','helper_drag',
- 'iframeFix_drag','opacity_drag','scope_drag', 'snap_drag', 'snapMode_drag', 'stack_drag' ],
- uiDragEvents: [ 'create_drag', 'start_drag', 'drag_drag', 'stop_drag' ],
-
- didInsertElement() {
- this._super();
-
- // get available options and events
- var options = this._gatherDragOptions();
- this._gatherDragEvents(options);
-
- // create a new jQuery UI widget
- var ui = Ember.$.ui['draggable'](options, this.get('element'));
- this.set('ui', ui);
- },
-
- willDestroyElement() {
- var ui = this.get('ui');
-
- if (ui) {
- // remove all observers for jQuery UI widget
- var observers = this._observers;
- for (var property in observers) {
- this.removeObserver(property, observers[property]);
- }
-
- ui.destroy();
- }
- },
-
- _gatherDragOptions() {
- // parse all options and add observers for them
- var uiDragOptions = this.get('uiDragOptions') || [];
- var options = {};
-
- uiDragOptions.forEach(function(key) {
- // save the drag option without the prefix
- options[key.split('_')[0]] = this.get(key);
-
- // create an observer for this option
- var observer = function() {
- var value = this.get(key);
- this.get('ui').option(key.split('_')[0], value);
- };
-
- this.addObserver(key, observer);
-
- // save observer to remove it later on
- this._observers = this._observers || {};
- this._observers[key] = observer;
- }, this);
-
- return options;
- },
-
- _gatherDragEvents(options) {
- // register callbacks for each event
- var uiDragEvents = this.get('uiDragEvents') || [];
- var _this = this;
-
- uiDragEvents.forEach(function(event) {
- var callback = _this[event];
- if (callback) {
- options[event.split('_')[0]] = function(event, ui) {
- callback.call(_this, event, ui);
- };
- }
- });
- }
-});
diff --git a/app/mixins/droppable.js b/app/mixins/droppable.js
deleted file mode 100644
index 7e557e8..0000000
--- a/app/mixins/droppable.js
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * File: droppable.js
- * Author: Markus Grigull
- * Date: 15.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-export default Ember.Mixin.create({
- uiDropOptions: [ 'accept_drop', 'addClasses_drop', 'disabled_drop', 'greedy_drop',
- 'hoverClass_drop', 'scope_drop' ],
- uiDropEvents: [ 'create_drop', 'activate_drop', 'deactivate_drop', 'over_drop',
- 'out_drop', 'drop_drop' ],
-
- didInsertElement() {
- this._super();
-
- // get available options and events
- var options = this._gatherDropOptions();
- this._gatherDropEvents(options);
-
- // create a new jQuery UI widget
- var ui = Ember.$.ui['droppable'](options, this.get('element'));
- this.set('ui', ui);
- },
-
- willDestroyElement() {
- var ui = this.get('ui');
-
- if (ui) {
- // remove all observers for jQuery UI widget
- var observers = this._observers;
- for (var property in observers) {
- this.removeObserver(property, observers[property]);
- }
-
- ui.destroy();
- }
- },
-
- _gatherDropOptions() {
- // parse all options and add observers for them
- var uiDropOptions = this.get('uiDropOptions') || [];
- var options = {};
-
- uiDropOptions.forEach(function(key) {
- // save the drop option without the postfix
- options[key.split('_')[0]] = this.get(key);
-
- // create an observer for this option
- var observer = function() {
- var value = this.get(key);
- this.get('ui').option(key.split('_')[0], value);
- };
-
- this.addObserver(key, observer);
-
- // save observer to remove it later on
- this._observers = this._observers || {};
- this._observers[key] = observer;
- }, this);
-
- return options;
- },
-
- _gatherDropEvents(options) {
- // register callbacks for each event
- var uiDropEvents = this.get('uiDropEvents') || [];
- var _this = this;
-
- uiDropEvents.forEach(function(event) {
- var callback = _this[event];
- if (callback) {
- options[event.split('_')[0]] = function(event, ui) {
- callback.call(_this, event, ui);
- };
- }
- });
- }
-});
diff --git a/app/mixins/fetch-live-data.js b/app/mixins/fetch-live-data.js
deleted file mode 100644
index a3d2b06..0000000
--- a/app/mixins/fetch-live-data.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * File: fetch-live-data.js
- * Author: Markus Grigull
- * Date: 12.10.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-export default Ember.Mixin.create({
- data: Ember.Object.create(),
-
- _getData: Ember.observer('model', function() {
- // check if simulation is running
- let self = this;
-
- this.get('model.project').then((project) => {
- project.get('simulation').then((simulation) => {
- if (simulation.get('running')) {
- // get all models to access data
- simulation.get('models').then((simulationModels) => {
- simulationModels.forEach(function(simulationModel) {
- // get simulator
- simulationModel.get('simulator').then((simulator) => {
- let simulatorID = simulator.get('simulatorid');
- if (simulatorID) {
- // add simulation data to list
- self._loadDataForSimulator(simulatorID);
- } else {
- Ember.debug('undefined simulator id');
- }
- });
- });
- });
- } else {
- // check again if simulation is running
- Ember.run.later(this, function() {
- // trigger _getData observer
- this.notifyPropertyChange('model');
- }, 1000);
- }
- });
- });
- }),
-
- _loadDataForSimulator(simulatorID) {
- // get data by simulator id
- let simulationData = this.store.peekRecord('simulation-data', simulatorID);
- if (simulationData) {
- // add data to list
- this.set('data.' + simulatorID, simulationData);
- } else {
- // try to load data later
- Ember.run.later(this, function() {
- this._loadDataForSimulator(simulatorID);
- }, 1000);
- }
- }
-});
diff --git a/app/mixins/live-data.js b/app/mixins/live-data.js
deleted file mode 100644
index 059c2a4..0000000
--- a/app/mixins/live-data.js
+++ /dev/null
@@ -1,186 +0,0 @@
-/**
- * File: live-data.js
- * Author: Markus Grigull
- * Date: 06.10.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-const { service } = Ember.inject;
-
-export default Ember.Mixin.create({
- store: service(),
- sessionUser: service('session-user'),
-
- INTERVAL: 5000,
-
- _sockets: {},
-
- init: function() {
- this._super();
-
- // fetch the simulations for the first time
- this._fetchRunningSimulations();
-
- // start the polling loop
- setInterval((function(self) {
- return function() {
- self._fetchRunningSimulations();
- };
- })(this), this.INTERVAL);
- },
-
- _fetchRunningSimulations: function() {
- // check if the user is logged in
- if (this.get('sessionUser.user') != null) {
- // get all simulations to find all running ones
- var self = this;
-
- this.get('store').findAll('simulation').then(function(simulations) {
- simulations.forEach(function(simulation) {
- // check if the simulation is running
- if (simulation.get('running')) {
- // get all models for this simulation
- simulation.get('models').then((models) => {
- models.forEach(function(simulationModel) {
- self._addSocket(simulationModel);
- });
- });
- }
- });
- });
- }
- },
-
- _addSocket(simulationModel) {
- // check if socket is already open
- simulationModel.get('simulator').then((simulator) => {
- let id = simulator.get('simulatorid');
- if (this.get('_sockets')[id] !== undefined) {
- //Ember.debug('skip ' + simulationModel.get('name'));
- return;
- }
-
- // get simulator endpoint
- simulationModel.get('simulator').then((simulator) => {
- // get simulator endpoint
- let endpoint = simulator.get('endpoint');
- if (endpoint) {
- // add new socket
- let socket = new WebSocket('ws://' + endpoint, 'live');
- socket.binaryType = 'arraybuffer';
-
- // register callbacks
- let self = this;
-
- socket.onopen = function(event) { self._onSocketOpen.apply(self, [event]); };
- socket.onclose = function(event) { self._onSocketClose.apply(self, [event]); };
- socket.onmessage = function(event) { self._onSocketMessage.apply(self, [event]); };
- socket.onerror = function(event) { self._onSocketError.apply(self, [event]); };
-
- // add socket to list of known sockets
- this.get('_sockets')[id] = socket;
-
- //Ember.debug('Socket created for ' + simulationModel.get('name') + ': ws://' + endpoint);
- } else {
- Ember.debug('Undefined endpoint for ' + simulationModel.get('name'));
- }
- });
- });
- },
-
- _removeSocket(socket) {
- // search through all sockets
- let sockets = this.get('_sockets');
-
- for (let id in sockets) {
- if (sockets[id] === socket) {
- // remove socket from list
- delete sockets[id];
- }
- }
- },
-
- _onSocketOpen(/* event */) {
- //Ember.debug('websocket opened');
- },
-
- _onSocketClose(event) {
- if (event.wasClean) {
- Ember.debug('websocket closed');
- } else {
- Ember.debug('websocket closed: ' + event.code);
- }
-
- // remove socket from array
- this._removeSocket(event.target);
- },
-
- _onSocketMessage(event) {
- // read the message into JSON
- var message = this._messageToJSON(event.data);
-
- // set simulator by socket
- if (message.simulator === 0) {
- // search for socket in list
- let sockets = this.get('_sockets');
-
- for (let id in sockets) {
- if (sockets[id] === event.target) {
- // set id as simulator
- message.simulator = id;
- break;
- }
- }
- }
-
- // create or update simulation data object
- var simulationData = this.store.peekRecord('simulation-data', message.simulator);
- if (simulationData != null) {
- simulationData.set('sequence', message.sequence);
- simulationData.set('timestamp', new Date(message.timestamp).getTime());
- simulationData.set('values', message.values);
- } else {
- this.store.createRecord('simulation-data', {
- sequence: message.sequence,
- timestamp: new Date(message.timestamp).getTime(),
- values: message.values,
- id: message.simulator
- });
- }
- },
-
- _onSocketError(/* event */) {
- Ember.debug('websocket error');
- },
-
- _messageToJSON(blob) {
- // parse incoming message into usable data
- var data = new DataView(blob);
-
- let OFFSET_ENDIAN = 1;
- let OFFSET_TYPE = 2;
- let OFFSET_VERSION = 4;
-
- var bits = data.getUint8(0);
- var simulator = data.getUint8(0x01);
- var endian = (bits >> OFFSET_ENDIAN) & 0x1 ? 0 : 1;
- var length = data.getUint16(0x02, endian);
-
- var values = new Float32Array(data.buffer, data.byteOffset + 0x10, length);
-
- return {
- endian: endian,
- version: (bits >> OFFSET_VERSION) & 0xF,
- type: (bits >> OFFSET_TYPE) & 0x3,
- length: length,
- sequence: data.getUint32(0x04, endian),
- timestamp: data.getUint32(0x08, endian) * 1e3 + data.getUint32(0x0C, endian) * 1e-6,
- values: values,
- simulator: simulator
- };
- }
-});
diff --git a/app/mixins/resizable.js b/app/mixins/resizable.js
deleted file mode 100644
index 28a1073..0000000
--- a/app/mixins/resizable.js
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * File: resizable.js
- * Author: Markus Grigull
- * Date: 12.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-export default Ember.Mixin.create({
- uiResizeOptions: [ 'disabled_resize', 'alsoResize_resize', 'animate_resize',
- 'animateDuration_resize', 'animateEasing_resize', 'aspectRatio_resize',
- 'autoHide_resize', 'cancel_resize', 'containment_resize', 'delay_resize',
- 'distance_resize', 'ghost_resize', 'grid_resize', 'handles_resize', 'helper_resize',
- 'maxHeight_resize', 'maxWidth_resize', 'minHeight_resize', 'minWidth_resize' ],
- uiResizeEvents: [ 'create_resize', 'start_resize', 'resize_resize', 'stop_resize' ],
-
- didInsertElement() {
- this._super();
-
- // get available options and events
- var options = this._gatherResizeOptions();
- this._gatherResizeEvents(options);
-
- // create a new jQuery UI widget
- var ui = Ember.$.ui['resizable'](options, this.get('element'));
- this.set('ui', ui);
- },
-
- willDestroyElement() {
- var ui = this.get('ui');
-
- if (ui) {
- // remove all observers for jQuery UI widget
- var observers = this._observers;
- for (var prop in observers) {
- if (observers.hasOwnProperty(prop)) {
- this.removeObserver(prop, observers[prop]);
- }
- }
-
- ui.destroy();
- }
- },
-
- _gatherResizeOptions() {
- // parse all options and add observers for them
- var uiResizeOptions = this.get('uiResizeOptions') || [];
- var options = {};
-
- uiResizeOptions.forEach(function(key) {
- // save the resize option without the postfix
- options[key.split('_')[0]] = this.get(key);
-
- // create an observer for this option
- var observer = function() {
- var value = this.get(key);
- //console.log(key + ': ' + value);
- this.get('ui').option(key.split('_')[0], value);
- };
-
- this.addObserver(key, observer);
-
- // save observer to remove it later on
- this._observers = this._observers || {};
- this._observers[key] = observer;
- }, this);
-
- return options;
- },
-
- _gatherResizeEvents(options) {
- // register callbacks for each event
- var uiResizeEvents = this.get('uiResizeEvents') || [];
- var _this = this;
-
- uiResizeEvents.forEach(function(event) {
- var callback = _this[event];
- if (callback) {
- options[event.split('_')[0]] = function(event, ui) {
- callback.call(_this, event, ui);
- };
- }
- });
- }
-});
diff --git a/app/mixins/sortable.js b/app/mixins/sortable.js
deleted file mode 100644
index 737367f..0000000
--- a/app/mixins/sortable.js
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * File: sortable.js
- * Author: Markus Grigull
- * Date: 15.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-export default Ember.Mixin.create({
- uiSortOptions: [ 'appendTo_sort', 'axis_sort', 'cancel_sort', 'connectWith_sort',
- 'containment_sort', 'cursor_sort', 'cursorAt_sort', 'delay_sort', 'disabled_sort',
- 'distance_sort', 'dropOnEmpty_sort', 'forceHelperSize_sort', 'forcePlaceholderSize_sort',
- 'grid_sort', 'handle_sort', 'helper_sort', 'items_sort', 'opacity_sort',
- 'placeholder_sort', 'revert_sort', 'scroll_sort', 'scrollSensitivity_sort',
- 'scrollSpeed_sort', 'tolerance_sort', 'zIndex_sort' ],
- uiSortEvents: [ 'activate_sort', 'beforeStop_sort', 'change_sort', 'create_sort',
- 'deactivate_sort', 'out_sort', 'over_sort', 'receive_sort', 'remove_sort',
- 'sort_sort', 'start_sort', 'stop_sort', 'update_sort' ],
-
- didInsertElement() {
- this._super();
-
- // get available options and events
- var options = this._gatherSortOptions();
- this._gatherSortEvents(options);
-
- // create a new jQuery UI widget
- var ui = Ember.$.ui['sortable'](options, this.get('element'));
- this.set('ui', ui);
- },
-
- willDestroyElement() {
- var ui = this.get('ui');
-
- if (ui) {
- // remove all observers for jQuery UI widget
- var observers = this._observers;
- for (var prop in observers) {
- if (observers.hasOwnProperty(prop)) {
- this.removeObserver(prop, observers[prop]);
- }
- }
-
- ui.destroy();
- }
- },
-
- _gatherSortOptions() {
- // parse all options and add observers for them
- var uiSortOptions = this.get('uiSortOptions') || [];
- var options = {};
-
- uiSortOptions.forEach(function(key) {
- // save the sort option without the postfix
- options[key.split('_')[0]] = this.get(key);
-
- // create an observer for this option
- var observer = function() {
- var value = this.get(key);
- //console.log(key + ': ' + value);
- this.get('ui').option(key.split('_')[0], value);
- };
-
- this.addObserver(key, observer);
-
- // save observer to remove it later on
- this._observers = this._observers || {};
- this._observers[key] = observer;
- }, this);
-
- return options;
- },
-
- _gatherSortEvents(options) {
- // register callbacks for each event
- var uiSortEvents = this.get('uiSortEvents') || [];
- var _this = this;
-
- uiSortEvents.forEach(function(event) {
- var callback = _this[event];
- if (callback) {
- options[event.split('_')[0]] = function(event, ui) {
- callback.call(_this, event, ui);
- };
- }
- });
- }
-});
diff --git a/app/models/.gitkeep b/app/models/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/app/models/file.js b/app/models/file.js
deleted file mode 100644
index fc7e63a..0000000
--- a/app/models/file.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * File: file.js
- * Author: Markus Grigull
- * Date: 25.01.2017
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import DS from 'ember-data';
-
-export default DS.Model.extend({
- name: DS.attr('string'),
- path: DS.attr('string'),
- type: DS.attr('string'),
- user: DS.belongsTo('user', { async: true }),
- date: DS.attr('date')
-});
diff --git a/app/models/project.js b/app/models/project.js
deleted file mode 100644
index 9e1da03..0000000
--- a/app/models/project.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * File: project.js
- * Author: Markus Grigull
- * Date: 04.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Model from 'ember-data/model';
-import attr from 'ember-data/attr';
-import { hasMany, belongsTo } from 'ember-data/relationships';
-
-export default Model.extend({
- name: attr('string'),
- owner: belongsTo('user', { async: true }),
- visualizations: hasMany('visualization', { async: true }),
- simulation: belongsTo('simulation', { async: true })
-});
diff --git a/app/models/simulation-data.js b/app/models/simulation-data.js
deleted file mode 100644
index 37744dc..0000000
--- a/app/models/simulation-data.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * File: simulation-data.js
- * Author: Markus Grigull
- * Date: 20.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import Model from 'ember-data/model';
-import attr from 'ember-data/attr';
-// import { belongsTo, hasMany } from 'ember-data/relationships';
-
-export default Model.extend({
- simulator: Ember.computed.alias('id'),
- sequence: attr('number'),
- timestamp: attr('number'),
- values: attr('array'),
-
- flotValues: Ember.computed('_flotValues', function() {
- return this._flotValues;
- }),
-
- _flotValues: [],
-
- _updateHistories: Ember.observer('values', function() {
- // update flot values
- let values = this.get('values');
-
- // add empty arrays for each value
- while (this._flotValues.length < values.length) {
- this._flotValues.push([]);
- }
-
- for (var i = 0; i < values.length; i++) {
- this._flotValues[i].push([this.get('timestamp'), values[i]]);
-
- // discard old values
- while (this._flotValues[i].length > 1200) {
- this._flotValues[i].shift();
- }
- }
- })
-});
diff --git a/app/models/simulation-model.js b/app/models/simulation-model.js
deleted file mode 100644
index 199991a..0000000
--- a/app/models/simulation-model.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * File: simulation-model.js
- * Author: Markus Grigull
- * Date: 20.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Model from 'ember-data/model';
-import attr from 'ember-data/attr';
-import { belongsTo/*, hasMany*/ } from 'ember-data/relationships';
-
-export default Model.extend({
- name: attr('string'),
- simulator: belongsTo('simulator', { async: true }),
- length: attr('number'),
- mapping: attr('array'),
- simulation: belongsTo('simulation', { async: true })
-});
diff --git a/app/models/simulation.js b/app/models/simulation.js
deleted file mode 100644
index e705768..0000000
--- a/app/models/simulation.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * File: simulation.js
- * Author: Markus Grigull
- * Date: 26.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Model from 'ember-data/model';
-import attr from 'ember-data/attr';
-import { belongsTo, hasMany } from 'ember-data/relationships';
-
-export default Model.extend({
- name: attr('string'),
- running: attr('boolean'),
- owner: belongsTo('user', { async: true }),
- models: hasMany('simulation-model', { aync: true }),
- projects: hasMany('project', { async: true })
-});
diff --git a/app/models/simulator-status.js b/app/models/simulator-status.js
deleted file mode 100644
index ca6bd1b..0000000
--- a/app/models/simulator-status.js
+++ /dev/null
@@ -1,5 +0,0 @@
-import DS from 'ember-data';
-
-export default DS.Model.extend({
-
-});
diff --git a/app/models/simulator.js b/app/models/simulator.js
deleted file mode 100644
index 5e45673..0000000
--- a/app/models/simulator.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * File: simulator.js
- * Author: Markus Grigull
- * Date: 28.09.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import DS from 'ember-data';
-import attr from 'ember-data/attr';
-
-export default DS.Model.extend({
- name: attr('string'),
- running: attr('boolean'),
- simulatorid: attr('number'),
- endpoint: attr('string')
-});
diff --git a/app/models/user.js b/app/models/user.js
deleted file mode 100644
index b2bf6d4..0000000
--- a/app/models/user.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * File: user.js
- * Author: Markus Grigull
- * Date: 26.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Model from 'ember-data/model';
-import attr from 'ember-data/attr';
-import { hasMany } from 'ember-data/relationships';
-
-export default Model.extend({
- username: attr('string'),
- password: attr('string'),
- adminLevel: attr('number'),
- projects: hasMany('project', { async: true }),
- simulations: hasMany('simulation', { async: true }),
- mail: attr('string'),
- files: hasMany('file', { async: true })
-});
diff --git a/app/models/visualization.js b/app/models/visualization.js
deleted file mode 100644
index 439d526..0000000
--- a/app/models/visualization.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * File: visualization.js
- * Author: Markus Grigull
- * Date: 28.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Model from 'ember-data/model';
-import attr from 'ember-data/attr';
-import { belongsTo, hasMany } from 'ember-data/relationships';
-
-export default Model.extend({
- name: attr('string'),
- widgets: hasMany('widget', { async: true }),
- project: belongsTo('project', { async: true })
-});
diff --git a/app/models/widget.js b/app/models/widget.js
deleted file mode 100644
index 32846f6..0000000
--- a/app/models/widget.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * File: widget.js
- * Author: Markus Grigull
- * Date: 28.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Model from 'ember-data/model';
-import attr from 'ember-data/attr';
-import { belongsTo } from 'ember-data/relationships';
-
-export default Model.extend({
- name: attr('string'),
- widgetData: attr(),
- width: attr('number', { defaultValue: 100 }),
- height: attr('number', { defaultValue: 100 }),
- type: attr('string'),
- x: attr('number', { defaultValue: 0 }),
- y: attr('number', { defaultValue: 0 }),
- visualization: belongsTo('Visualization', { async: true })
-});
diff --git a/app/resolver.js b/app/resolver.js
deleted file mode 100644
index 2fb563d..0000000
--- a/app/resolver.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import Resolver from 'ember-resolver';
-
-export default Resolver;
diff --git a/app/router.js b/app/router.js
deleted file mode 100644
index 8fbc33a..0000000
--- a/app/router.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * File: router.js
- * Author: Markus Grigull
- * Date: 26.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import config from './config/environment';
-
-const Router = Ember.Router.extend({
- location: config.locationType,
- rootURL: config.rootURL
-});
-
-Router.map(function() {
- this.route('login');
- this.route('logout');
-
- this.route('projects');
- this.route('project', function() {
- this.route('index', { path: '/:projectid' });
- });
-
- this.route('me');
-
- this.route('visualization', function() {
- this.route('index', { path: '/:visualizationid' });
- this.route('edit', { path: '/edit/:visualizationid' });
- });
-
- this.route('user', function() {
- this.route('edit', { path: '/edit/:userid' });
- this.route('new');
- this.route('delete', { path: '/delete/:userid' });
- });
-
- this.route('404', { path: '/*path' });
-
- this.route('simulation-model', function() {
- this.route('index', { path: '/:modelid' });
- });
-
- this.route('simulations');
- this.route('simulation', function() {
- this.route('index', { path: '/:simulationid' });
- });
-
- this.route('simulators');
- this.route('simulator');
-});
-
-export default Router;
diff --git a/app/routes/.gitkeep b/app/routes/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/app/routes/application.js b/app/routes/application.js
deleted file mode 100644
index e68dd55..0000000
--- a/app/routes/application.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * File: application.js
- * Author: Markus Grigull
- * Date: 26.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import ApplicationRouteMixin from 'ember-simple-auth/mixins/application-route-mixin';
-
-const { service } = Ember.inject;
-
-export default Ember.Route.extend(ApplicationRouteMixin, {
- sessionUser: service('session-user'),
-
- beforeModel() {
- return this._loadCurrentUser();
- },
-
- sessionAuthenticated() {
- this._loadCurrentUser().then(() => {
- this.transitionTo('/');
- }).catch(function(/* reason */) {
- //console.log(reason);
- this.get('session').invalidate();
- });
- },
-
- _loadCurrentUser() {
- return this.get('sessionUser').loadCurrentUser();
- }
-});
diff --git a/app/routes/dialog/plot/value.js b/app/routes/dialog/plot/value.js
deleted file mode 100644
index 26d9f31..0000000
--- a/app/routes/dialog/plot/value.js
+++ /dev/null
@@ -1,4 +0,0 @@
-import Ember from 'ember';
-
-export default Ember.Route.extend({
-});
diff --git a/app/routes/index.js b/app/routes/index.js
deleted file mode 100644
index ca13931..0000000
--- a/app/routes/index.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * File: index.js
- * Author: Markus Grigull
- * Date: 26.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
-import LiveDataMixin from '../mixins/live-data';
-
-export default Ember.Route.extend(AuthenticatedRouteMixin, LiveDataMixin, {
-});
diff --git a/app/routes/login.js b/app/routes/login.js
deleted file mode 100644
index 21647e9..0000000
--- a/app/routes/login.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/**
- * File: login.js
- * Author: Markus Grigull
- * Date: 25.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import UnauthenticatedRouteMixin from 'ember-simple-auth/mixins/unauthenticated-route-mixin';
-
-export default Ember.Route.extend(UnauthenticatedRouteMixin, {
-});
diff --git a/app/routes/logout.js b/app/routes/logout.js
deleted file mode 100644
index 2f18620..0000000
--- a/app/routes/logout.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * File: logout.js
- * Author: Markus Grigull
- * Date: 05.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
-
-export default Ember.Route.extend(AuthenticatedRouteMixin, {
- beforeModel() {
- this.get('session').invalidate();
- }
-});
diff --git a/app/routes/me.js b/app/routes/me.js
deleted file mode 100644
index d9e456c..0000000
--- a/app/routes/me.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * File: me.js
- * Author: Markus Grigull
- * Date: 27.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
-
-export default Ember.Route.extend(AuthenticatedRouteMixin, {
- model() {
- // get session user
- return this.store.findRecord('user', 'me');
- }
-});
diff --git a/app/routes/project/index.js b/app/routes/project/index.js
deleted file mode 100644
index 10bd7ed..0000000
--- a/app/routes/project/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * File: index.js
- * Author: Markus Grigull
- * Date: 26.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
-
-export default Ember.Route.extend(AuthenticatedRouteMixin, {
- model(params) {
- return this.store.findRecord('project', params.projectid);
- }
-});
diff --git a/app/routes/projects.js b/app/routes/projects.js
deleted file mode 100644
index 9c31feb..0000000
--- a/app/routes/projects.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * File: project.js
- * Author: Markus Grigull
- * Date: 26.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
-
-export default Ember.Route.extend(AuthenticatedRouteMixin, {
- sessionUser: Ember.inject.service('session-user'),
-
- model() {
- // get projects for current user, simulations are needed for the simulation picker
- var user = this.get('sessionUser.user');
-
- return Ember.RSVP.hash({
- projects: user.get('projects'),
- simulations: this.store.findAll('simulation')
- });
- }
-});
diff --git a/app/routes/simulation-model/index.js b/app/routes/simulation-model/index.js
deleted file mode 100644
index d520ee0..0000000
--- a/app/routes/simulation-model/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * File: index.js
- * Author: Markus Grigull
- * Date: 20.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
-
-export default Ember.Route.extend(AuthenticatedRouteMixin, {
- model(params) {
- return this.store.findRecord('simulation-model', params.modelid);
- }
-});
diff --git a/app/routes/simulation/index.js b/app/routes/simulation/index.js
deleted file mode 100644
index 567b7e3..0000000
--- a/app/routes/simulation/index.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * File: index.js
- * Author: Markus Grigull
- * Date: 26.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
-
-export default Ember.Route.extend(AuthenticatedRouteMixin, {
- model(params) {
- return Ember.RSVP.hash({
- simulation: this.store.findRecord('simulation', params.simulationid),
- simulators: this.store.findAll('simulator')
- });
- }
-});
diff --git a/app/routes/simulations.js b/app/routes/simulations.js
deleted file mode 100644
index ce9f752..0000000
--- a/app/routes/simulations.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * File: simulations.js
- * Author: Markus Grigull
- * Date: 26.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
-
-export default Ember.Route.extend(AuthenticatedRouteMixin, {
- sessionUser: Ember.inject.service('session-user'),
-
- model() {
- // get simulations for current user
- var user = this.get('sessionUser.user');
- return user.get('simulations');
- }
-});
diff --git a/app/routes/simulators.js b/app/routes/simulators.js
deleted file mode 100644
index 8c32bcc..0000000
--- a/app/routes/simulators.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * File: simulators.js
- * Author: Markus Grigull
- * Date: 28.09.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
-
-export default Ember.Route.extend(AuthenticatedRouteMixin, {
- model() {
- // get simulators
- return this.store.findAll('simulator');
- }
-});
diff --git a/app/routes/user/delete.js b/app/routes/user/delete.js
deleted file mode 100644
index 8ac9611..0000000
--- a/app/routes/user/delete.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * File: delete.js
- * Author: Markus Grigull
- * Date: 11.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
-
-export default Ember.Route.extend(AuthenticatedRouteMixin, {
- model(params) {
- return this.store.findRecord('user', params.userid);
- }
-});
diff --git a/app/routes/user/edit.js b/app/routes/user/edit.js
deleted file mode 100644
index 3918d6d..0000000
--- a/app/routes/user/edit.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * File: edit.js
- * Author: Markus Grigull
- * Date: 11.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
-
-export default Ember.Route.extend(AuthenticatedRouteMixin, {
- model(params) {
- return this.store.findRecord('user', params.userid);
- }
-});
diff --git a/app/routes/user/index.js b/app/routes/user/index.js
deleted file mode 100644
index 7d89a0c..0000000
--- a/app/routes/user/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * File: index.js
- * Author: Markus Grigull
- * Date: 11.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
-
-export default Ember.Route.extend(AuthenticatedRouteMixin, {
- model() {
- return this.store.findAll('user');
- }
-});
diff --git a/app/routes/user/new.js b/app/routes/user/new.js
deleted file mode 100644
index 38c73e5..0000000
--- a/app/routes/user/new.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/**
- * File: new.js
- * Author: Markus Grigull
- * Date: 11.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
-
-export default Ember.Route.extend(AuthenticatedRouteMixin, {
-});
diff --git a/app/routes/visualization/edit.js b/app/routes/visualization/edit.js
deleted file mode 100644
index e665763..0000000
--- a/app/routes/visualization/edit.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * File: edit.js
- * Author: Markus Grigull
- * Date: 28.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
-
-export default Ember.Route.extend(AuthenticatedRouteMixin, {
- model(params) {
- return this.store.findRecord('visualization', params.visualizationid);
- }
-});
diff --git a/app/routes/visualization/index.js b/app/routes/visualization/index.js
deleted file mode 100644
index 35a7beb..0000000
--- a/app/routes/visualization/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * File: index.js
- * Author: Markus Grigull
- * Date: 28.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
-
-export default Ember.Route.extend(AuthenticatedRouteMixin, {
- model(params) {
- return this.store.findRecord('visualization', params.visualizationid);
- }
-});
diff --git a/app/serializers/application.js b/app/serializers/application.js
deleted file mode 100644
index 913c92f..0000000
--- a/app/serializers/application.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * File: application.js
- * Author: Markus Grigull
- * Date: 26.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import RESTSerializer from 'ember-data/serializers/rest';
-import DS from 'ember-data';
-
-export default RESTSerializer.extend(DS.EmbeddedRecordsMixin, {
- primaryKey: '_id'
-});
diff --git a/app/serializers/project.js b/app/serializers/project.js
deleted file mode 100644
index f0bd705..0000000
--- a/app/serializers/project.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * File: project.js
- * Author: Markus Grigull
- * Date: 04.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import ApplicationSerializer from './application';
-
-export default ApplicationSerializer.extend({
- attrs: {
- owner: { serialize: 'ids' },
- visualizations: { serialize: 'ids' }
- }
-});
diff --git a/app/serializers/simulation-model.js b/app/serializers/simulation-model.js
deleted file mode 100644
index cb91820..0000000
--- a/app/serializers/simulation-model.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- * File: simulation-model.js
- * Author: Markus Grigull
- * Date: 20.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import ApplicationSerializer from './application';
-
-export default ApplicationSerializer.extend({
- attrs: {
- simulation: { serialize: 'ids' }
- }
-});
diff --git a/app/serializers/simulation.js b/app/serializers/simulation.js
deleted file mode 100644
index 6fe4c66..0000000
--- a/app/serializers/simulation.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * File: simulation.js
- * Author: Markus Grigull
- * Date: 26.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import ApplicationSerializer from './application';
-
-export default ApplicationSerializer.extend({
- attrs: {
- owner: { serialize: 'ids' },
- models: { serialize: 'ids' },
- projects: { serialize: 'ids' }
- }
-});
diff --git a/app/serializers/user.js b/app/serializers/user.js
deleted file mode 100644
index 677cee0..0000000
--- a/app/serializers/user.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- * File: user.js
- * Author: Markus Grigull
- * Date: 27.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import ApplicationSerializer from './application';
-
-export default ApplicationSerializer.extend({
- attrs: {
- projects: { serialize: 'ids' }
- }
-});
diff --git a/app/serializers/visualization.js b/app/serializers/visualization.js
deleted file mode 100644
index 950c341..0000000
--- a/app/serializers/visualization.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * File: visualization.js
- * Author: Markus Grigull
- * Date: 28.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import ApplicationSerializer from './application';
-
-export default ApplicationSerializer.extend({
- attrs: {
- project: { serialize: 'ids' },
- widgets: { serialize: 'ids' }
- }
-});
diff --git a/app/services/session-user.js b/app/services/session-user.js
deleted file mode 100644
index 06b94b9..0000000
--- a/app/services/session-user.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * File: session-user.js
- * Author: Markus Grigull
- * Date: 26.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-import Ember from 'ember';
-
-const {
- inject: { service },
- RSVP
-} = Ember;
-
-export default Ember.Service.extend({
- session: service('session'),
- store: service(),
-
- loadCurrentUser() {
- var _this = this;
-
- return new RSVP.Promise((resolve, reject) => {
- const token = this.get('session.data.authenticated.token');
- if (!Ember.isEmpty(token)) {
- return this.get('store').queryRecord('user', 'me').then(function(user) {
- _this.set('user', user);
- resolve();
- }, function() {
- _this.get('session').invalidate();
- reject();
- });
- } else {
- resolve();
- }
- });
- }
-});
diff --git a/app/styles/app.scss b/app/styles/app.scss
deleted file mode 100644
index e1309ef..0000000
--- a/app/styles/app.scss
+++ /dev/null
@@ -1,277 +0,0 @@
-/**
- * File: app.css
- * Author: Markus Grigull
- * Date: 26.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-@import 'widgets';
-@import 'models';
-@import 'simulations';
-@import 'projects';
-@import 'simulators';
-@import 'simulation-models';
-
-@import "ember-modal-dialog/ember-modal-structure";
-@import "ember-modal-dialog/ember-modal-appearance";
-
-* {
- margin: 0;
- padding: 0;
-}
-
-/**
- * Application skeleton
- */
-.ember-application {
- min-width: 800px;
-
- background: #ddd;
- color: #4d4d4d;
-
- font: 16px 'Helvetica Neue', Helvetica, Arial, sans-serif;
- font-weight: 300;
- font-smoothing: antialiased;
- -webkit-font-smoothing: antialiased;
- -moz-font-smoothing: antialiased;
-}
-
-header {
- width: 100%;
- height: 50px;
-
- padding: 10px 0 0 0;
-
- color: #fff;
- background-color: #151;
-}
-
-header h1 {
- width: 100%;
-
- text-align: center
-}
-
-footer {
- width: 100%;
-
- color: #666;
-
- margin-top: 20px;
-
- text-align: center;
-
- clear: both;
-}
-
-/**
- * Main layout
- */
-#main-menu {
- float: left;
-
- width: 125px;
-
- background-color: #fff;
- box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2),
- 0 9px 18px 0 rgba(0, 0, 0, 0.1);
-
- margin: 20px 0 0 20px;
- padding: 20px 20px 20px 30px;
-}
-
-#wrapper {
- min-height: 100px;
-
- background-color: #fff;
- box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2),
- 0 9px 18px 0 rgba(0, 0, 0, 0.1);
-
- margin: 20px 20px 20px 220px;
- padding: 20px;
-}
-
-/**
- * Login layout
- */
-#login-container {
- width: 320px;
- height: 180px;
-
- background-color: #fff;
- box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2),
- 0 9px 18px 0 rgba(0, 0, 0, 0.1);
-
- margin: 80px auto;
- padding: 0px;
-}
-
-#login-container h1 {
- background-color: #cdcdcd;
-
- text-align: center;
-
- font-size: 24;
-
- padding: 10px 0;
-}
-
-#login {
-
-}
-
-#login-form {
- padding: 20px 20px;
-}
-
-/**
- * Visualization
- */
-.draggableDropzone {
- display: block;
-
- min-height: 400px;
-
- border: 3px dashed #aaa;
-
- &.activated {
- border-color: #2ecc71;
- }
- &.deactivated {
- border-color: #e1e1e1;
- }
-}
-
-.draggableItem[draggable=true] {
- display: inline-block;
- background: #e1e1e1;
- cursor: move;
-
- padding: 5px 10px;
-
- border: 1px solid gray;
-
- &:hover {
- background-color: #aaa;
- }
-}
-
-/**
- * Table
- */
-.column-center {
- text-align: center;
-}
-
-/**
- * Table full width
- */
-.table-full-width {
- width: 100%;
-
- border: 0;
- border-collapse: collapse;
-
- background-color: #f6f6f6;
-}
-
-.table-full-width th, td {
- padding: 5px;
-
- text-align: left;
-
- border: none;
-}
-
-.table-full-width th {
- background-color: #151;
- color: #fff;
-}
-
-.table-full-width tr:nth-child(even) {
- background-color: #ddd;
-}
-
-/**
- * Form create record
- */
-.form-create-record {
- padding: 0;
-
- width: 400px;
-}
-
-.form-create-record table {
- border: none;
-}
-
-.form-create-record td {
- padding: 5px 10px 5px 0;
-}
-
-.form-create-record input {
- padding: 2px 4px;
-
- width: 100%;
-}
-
-.form-create-record input[type=number] {
- width: 60px;
-
- padding: 0;
-}
-
-.form-create-record button {
- background-color: #151;
- color: #fff;
-
- font-size: 14px;
-
- padding: 4px 8px;
-
- border: none;
-
- cursor: pointer;
-}
-
-.form-create-record button:hover {
- background: #373;
-}
-
-button {
- background-color: #151;
- color: #fff;
-
- font-size: 14px;
-
- margin-top: 10px;
- padding: 4px 8px;
-
- border: none;
-
- cursor: pointer;
-}
-
-button:hover {
- background: #373;
-}
-
-/**
- *
- */
-.popover {
- z-index: 1010;
-
- width: 120px;
- height: 100px;
-}
-
-.arrow {
- border-right-color: red !important;
-}
-
-.hidden {
- visibility: hidden;
-}
diff --git a/app/styles/models.scss b/app/styles/models.scss
deleted file mode 100644
index e2fe0c3..0000000
--- a/app/styles/models.scss
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * File: models.css
- * Author: Markus Grigull
- * Date: 20.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-/**
- * Route: simulation-models
- */
-.simulation-models-container {
- margin-top: 20px;
-}
-
-.simulation-models-container table {
- width: 100%;
-
- border: 0;
- border-collapse: collapse;
-}
-
-.simulation-models-container th, td {
- padding: 5px;
-
- text-align: left;
-
- border: 0;
-}
-
-.simulation-models-container th {
- background-color: #151;
- color: #fff;
-}
-
-.simulation-models-row-controls {
- float: right;
-}
-
-.simulation-models-row-controls a {
- margin-left: 10px;
-}
-
-.simulation-models-container tr:nth-child(even) {
- background-color: #ddd;
-}
-
-.simulation-models-new-container {
- margin-top: 20px;
-}
diff --git a/app/styles/projects.scss b/app/styles/projects.scss
deleted file mode 100644
index 5f4e5ec..0000000
--- a/app/styles/projects.scss
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * File: projects.css
- * Author: Markus Grigull
- * Date: 26.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-/**
- * Route: projects
- */
-.projects-container {
- margin-top: 20px;
-}
-
-.projects-row-controls {
- float: right;
-}
-
-.projects-row-controls a {
- margin-left: 10px;
-}
-
-.projects-new-container {
- margin-top: 20px;
-}
-
-/**
- * Route: project.index
- */
-.project-index-container {
- margin-top: 20px;
-}
-
-.project-index-row-controls {
- float: right;
-}
-
-.project-index-row-controls a {
- margin-left: 10px;
-}
-
-.project-index-new-visualization {
- margin-top: 20px;
-}
diff --git a/app/styles/simulation-models.scss b/app/styles/simulation-models.scss
deleted file mode 100644
index 04aea01..0000000
--- a/app/styles/simulation-models.scss
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * File: simulation-models.css
- * Author: Markus Grigull
- * Date: 12.10.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-/**
- * Route: simulation-model/index
- */
-.simulation-model-index-mapping {
- margin-top: 20px;
-}
-
-.simulation-model-index-buttons {
- margin-top: 20px;
-}
diff --git a/app/styles/simulations.scss b/app/styles/simulations.scss
deleted file mode 100644
index 0580e36..0000000
--- a/app/styles/simulations.scss
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * File: simulations.css
- * Author: Markus Grigull
- * Date: 26.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-/**
- * Route: simulations
- */
-.simulations-container {
- margin-top: 20px;
-}
-
-.simulations-row-controls {
- float: right;
-}
-
-.simulations-row-controls a {
- margin-left: 10px;
-}
-
-.simulations-new-container {
- margin-top: 20px;
-}
-
-/**
- * Route: simulation/index
- */
-.simulation-index-models-container {
- margin-top: 20px;
-}
-
-.simulation-index-row-controls {
- float: right;
-}
-
-.simulation-index-row-controls a {
- margin-left: 10px;
-}
-
-.simulation-index-new-model {
- margin-top: 20px;
-}
diff --git a/app/styles/simulators.scss b/app/styles/simulators.scss
deleted file mode 100644
index 2943dc2..0000000
--- a/app/styles/simulators.scss
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * File: simulators.css
- * Author: Markus Grigull
- * Date: 30.09.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-/**
- * Route: simulators
- */
-.simulators-container {
- margin-top: 20px;
-}
-
-.simulators-row-controls {
- float: right;
-}
-
-.simulators-row-controls a {
- margin-left: 10px;
-}
-
-.simulators-new-container {
- margin-top: 50px;
-}
diff --git a/app/styles/widgets.scss b/app/styles/widgets.scss
deleted file mode 100644
index 3d49d68..0000000
--- a/app/styles/widgets.scss
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * File: widgets.css
- * Author: Markus Grigull
- * Date: 19.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
- * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- **********************************************************************************/
-
-/**
- * Component: widget-container
- */
-.widgets {
- overflow: scroll;
-
- position: relative;
-}
-
-/**
- * Component: widget-toolbox
- */
-.widget-toolbox {
- margin: 20px 0;
-}
-
-/**
- * Component: widget-abstract
- */
-.widgetAbstract {
- position: absolute;
-}
-
-.widget-editing {
- border: 1px solid lightgray;
-
- padding: 5px 10px;
- margin: 10px;
-}
-
-/**
- * Component: widget-value
- */
-.widgetValue {
-
-}
-
-.widget-edit-container {
- width: 200px !important;
-
- background-color: #ddd;
-
- border: 1px dotted black;
-}
-
-.widget-edit-form {
-
-}
-
-/**
- * Component: widget-table
- */
-.widgetTable {
-
-}
-
-.widgetTable table {
- width: 100%;
- /*height: 100%;*/
-
- border: 1px solid gray;
- border-collapse: collapse;
-}
-
-.widgetTable td, th {
- border: 1px solid gray;
-
- padding: 2px 5px;
-}
-
-/**
- * Component: widget-plot
- */
-.widgetPlot-signal-table {
- border: 1px solid gray;
-
- padding: 2px 5px;
-}
-
-.widgetPlot-signal-table th {
- border: 0;
-}
diff --git a/app/templates/404.hbs b/app/templates/404.hbs
deleted file mode 100644
index 9a83fd7..0000000
--- a/app/templates/404.hbs
+++ /dev/null
@@ -1 +0,0 @@
-404 - Not found
diff --git a/app/templates/application.hbs b/app/templates/application.hbs
deleted file mode 100644
index 4e8c036..0000000
--- a/app/templates/application.hbs
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-{{#if session.isAuthenticated}}
-
-
Menu
-
-
- {{#link-to 'index'}}Home{{/link-to}}
- {{#link-to 'projects'}}Projects{{/link-to}}
- {{#link-to 'simulations'}}Simulations{{/link-to}}
- {{#link-to 'simulators'}}Simulators{{/link-to}}
- {{#link-to 'me'}}Account{{/link-to}}
- {{#link-to 'logout'}}Logout{{/link-to}}
-
-
-
-
-{{else}}
- {{outlet}}
-{{/if}}
-
-
diff --git a/app/templates/components/.gitkeep b/app/templates/components/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/app/templates/components/draggable-dropzone.hbs b/app/templates/components/draggable-dropzone.hbs
deleted file mode 100644
index 889d9ee..0000000
--- a/app/templates/components/draggable-dropzone.hbs
+++ /dev/null
@@ -1 +0,0 @@
-{{yield}}
diff --git a/app/templates/components/draggable-item.hbs b/app/templates/components/draggable-item.hbs
deleted file mode 100644
index 889d9ee..0000000
--- a/app/templates/components/draggable-item.hbs
+++ /dev/null
@@ -1 +0,0 @@
-{{yield}}
diff --git a/app/templates/components/file-upload.hbs b/app/templates/components/file-upload.hbs
deleted file mode 100644
index 889d9ee..0000000
--- a/app/templates/components/file-upload.hbs
+++ /dev/null
@@ -1 +0,0 @@
-{{yield}}
diff --git a/app/templates/components/flow-plot.hbs b/app/templates/components/flow-plot.hbs
deleted file mode 100644
index 889d9ee..0000000
--- a/app/templates/components/flow-plot.hbs
+++ /dev/null
@@ -1 +0,0 @@
-{{yield}}
diff --git a/app/templates/components/widget-abstract.hbs b/app/templates/components/widget-abstract.hbs
deleted file mode 100644
index 889d9ee..0000000
--- a/app/templates/components/widget-abstract.hbs
+++ /dev/null
@@ -1 +0,0 @@
-{{yield}}
diff --git a/app/templates/components/widget-chart.hbs b/app/templates/components/widget-chart.hbs
deleted file mode 100644
index 889d9ee..0000000
--- a/app/templates/components/widget-chart.hbs
+++ /dev/null
@@ -1 +0,0 @@
-{{yield}}
diff --git a/app/templates/components/widget-container.hbs b/app/templates/components/widget-container.hbs
deleted file mode 100644
index 818abe5..0000000
--- a/app/templates/components/widget-container.hbs
+++ /dev/null
@@ -1,3 +0,0 @@
-{{#each widgets as |widget|}}
- {{component widget.type widget=widget editing=editing grid=grid data=data showWidgetDialog=showWidgetDialog}}
-{{/each}}
diff --git a/app/templates/components/widget-image.hbs b/app/templates/components/widget-image.hbs
deleted file mode 100644
index b9b4f0c..0000000
--- a/app/templates/components/widget-image.hbs
+++ /dev/null
@@ -1,51 +0,0 @@
-{{#if widget.widgetData.path}}
-
-{{/if}}
-
-{{#if isShowingModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- Image
-
-
-
- {{#if errorMessage}}
- Error: {{errorMessage}}
- {{/if}}
- {{/modal-dialog}}
-{{/if}}
diff --git a/app/templates/components/widget-label.hbs b/app/templates/components/widget-label.hbs
deleted file mode 100644
index 1c0aefe..0000000
--- a/app/templates/components/widget-label.hbs
+++ /dev/null
@@ -1,27 +0,0 @@
-{{widget.name}}
-
-{{#if isShowingModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- Label
-
-
- {{/modal-dialog}}
-{{/if}}
diff --git a/app/templates/components/widget-plot.hbs b/app/templates/components/widget-plot.hbs
deleted file mode 100644
index 8e95dda..0000000
--- a/app/templates/components/widget-plot.hbs
+++ /dev/null
@@ -1,112 +0,0 @@
-{{widget.name}}
-
-{{#if (eq plotType "table")}}
-
-
-
- {{flow-plot data=plotData options=plotOptions}}
-
-{{/if}}
-
-{{#if (eq plotType "multiple")}}
- {{flow-plot data=plotData options=plotOptions}}
-{{/if}}
-
-{{#if isShowingModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- Plot
-
- {{#if errorMessage}}
-
- Error: {{errorMessage}}
-
- {{/if}}
-
-
- {{/modal-dialog}}
-{{/if}}
diff --git a/app/templates/components/widget-table.hbs b/app/templates/components/widget-table.hbs
deleted file mode 100644
index bb84841..0000000
--- a/app/templates/components/widget-table.hbs
+++ /dev/null
@@ -1,56 +0,0 @@
-{{widget.name}}
-
-
-
-{{#if isShowingModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- Table
-
-
- {{/modal-dialog}}
-{{/if}}
diff --git a/app/templates/components/widget-value.hbs b/app/templates/components/widget-value.hbs
deleted file mode 100644
index 00c246b..0000000
--- a/app/templates/components/widget-value.hbs
+++ /dev/null
@@ -1,55 +0,0 @@
-{{name}}{{#if name}}:{{/if}} {{value}}
-
-{{#if isShowingModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- Value
-
-
-
- {{#if errorMessage}}
- Error: {{errorMessage}}
- {{/if}}
- {{/modal-dialog}}
-{{/if}}
diff --git a/app/templates/dialog/project.hbs b/app/templates/dialog/project.hbs
deleted file mode 100644
index 5d45882..0000000
--- a/app/templates/dialog/project.hbs
+++ /dev/null
@@ -1,68 +0,0 @@
-{{#if isShowingNewModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- New visualization
-
-
-
- {{#if errorMessage}}
- Error: {{errorMessage}}
- {{/if}}
- {{/modal-dialog}}
-{{/if}}
-
-{{#if isShowingEditModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- Edit visualization
-
-
-
- {{#if errorMessage}}
- Error: {{errorMessage}}
- {{/if}}
- {{/modal-dialog}}
-{{/if}}
-
-{{#if isShowingDeleteModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- Delete visualization
-
- Are you sure you want to delete the visualization {{visualization.name}} ?
-
- Cancel
- Delete
- {{/modal-dialog}}
-{{/if}}
diff --git a/app/templates/dialog/projects.hbs b/app/templates/dialog/projects.hbs
deleted file mode 100644
index 83dae43..0000000
--- a/app/templates/dialog/projects.hbs
+++ /dev/null
@@ -1,92 +0,0 @@
-{{#if isShowingNewModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- New project
-
-
-
- {{#if errorMessage}}
- Error: {{errorMessage}}
- {{/if}}
- {{/modal-dialog}}
-{{/if}}
-
-{{#if isShowingEditModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- Edit project
-
-
-
- {{#if errorMessage}}
- Error: {{errorMessage}}
- {{/if}}
- {{/modal-dialog}}
-{{/if}}
-
-{{#if isShowingDeleteModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- Delete project
-
- Are you sure you want to delete the project {{project.name}} ?
-
- Cancel
- Delete
- {{/modal-dialog}}
-{{/if}}
diff --git a/app/templates/dialog/simulation.hbs b/app/templates/dialog/simulation.hbs
deleted file mode 100644
index 9e2bfb6..0000000
--- a/app/templates/dialog/simulation.hbs
+++ /dev/null
@@ -1,108 +0,0 @@
-{{#if isShowingNewModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- New model
-
-
-
- {{#if errorMessage}}
- Error: {{errorMessage}}
- {{/if}}
- {{/modal-dialog}}
-{{/if}}
-
-{{#if isShowingEditModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- Edit model
-
-
-
- {{#if errorMessage}}
- Error: {{errorMessage}}
- {{/if}}
- {{/modal-dialog}}
-{{/if}}
-
-{{#if isShowingDeleteModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- Delete simulation-model
-
- Are you sure you want to delete the simulation-model {{simulationModel.name}} ?
-
- Cancel
- Delete
- {{/modal-dialog}}
-{{/if}}
diff --git a/app/templates/dialog/simulations.hbs b/app/templates/dialog/simulations.hbs
deleted file mode 100644
index 96f847d..0000000
--- a/app/templates/dialog/simulations.hbs
+++ /dev/null
@@ -1,86 +0,0 @@
-{{#if isShowingNewModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- New simulation
-
-
-
- {{#if errorMessage}}
- Error: {{errorMessage}}
- {{/if}}
- {{/modal-dialog}}
-{{/if}}
-
-{{#if isShowingEditModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- Edit simulator
-
-
-
- {{#if errorMessage}}
- Error: {{errorMessage}}
- {{/if}}
- {{/modal-dialog}}
-{{/if}}
-
-{{#if isShowingDeleteModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- Delete simulation
-
- Are you sure you want to delete the simulation {{simulation.name}} ?
-
- Cancel
- Delete
- {{/modal-dialog}}
-{{/if}}
-
-{{#if isShowingRunningModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- Simulation running
-
- {{simulation.name}}:
-
-
- running
- not running
-
-
-
-
- Cancel
- Save
- {{/modal-dialog}}
-{{/if}}
diff --git a/app/templates/dialog/simulators.hbs b/app/templates/dialog/simulators.hbs
deleted file mode 100644
index ff43682..0000000
--- a/app/templates/dialog/simulators.hbs
+++ /dev/null
@@ -1,118 +0,0 @@
-{{#if isShowingNewModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- New simulator
-
-
-
- {{#if errorMessage}}
- Error: {{errorMessage}}
- {{/if}}
- {{/modal-dialog}}
-{{/if}}
-
-{{#if isShowingDeleteModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- Delete simulator
-
- Are you sure you want to delete the simulator {{simulator.name}} ?
-
- Cancel
- Delete
- {{/modal-dialog}}
-{{/if}}
-
-{{#if isShowingEditModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- New simulator
-
-
-
- {{#if errorMessage}}
- Error: {{errorMessage}}
- {{/if}}
- {{/modal-dialog}}
-{{/if}}
-
-{{#if isShowingRunningModal}}
- {{#modal-dialog attachment="middle center" translucentOverlay=true}}
- Simulator running
-
- {{simulator.name}}:
-
-
- running
- not running
-
-
-
-
- Cancel
- Save
- {{/modal-dialog}}
-{{/if}}
diff --git a/app/templates/index.hbs b/app/templates/index.hbs
deleted file mode 100644
index 700204b..0000000
--- a/app/templates/index.hbs
+++ /dev/null
@@ -1 +0,0 @@
-Main Content
diff --git a/app/templates/login.hbs b/app/templates/login.hbs
deleted file mode 100644
index 734af5e..0000000
--- a/app/templates/login.hbs
+++ /dev/null
@@ -1,19 +0,0 @@
-
diff --git a/app/templates/logout.hbs b/app/templates/logout.hbs
deleted file mode 100644
index c24cd68..0000000
--- a/app/templates/logout.hbs
+++ /dev/null
@@ -1 +0,0 @@
-{{outlet}}
diff --git a/app/templates/me.hbs b/app/templates/me.hbs
deleted file mode 100644
index eeb3fb9..0000000
--- a/app/templates/me.hbs
+++ /dev/null
@@ -1,20 +0,0 @@
-Preferences
-
-
-
-{{#if isAdmin}}
-
- {{#link-to 'user'}}Users{{/link-to}}
-
-{{/if}}
diff --git a/app/templates/project/index.hbs b/app/templates/project/index.hbs
deleted file mode 100644
index ce4c826..0000000
--- a/app/templates/project/index.hbs
+++ /dev/null
@@ -1,31 +0,0 @@
-{{#link-to 'projects'}}Back to projects{{/link-to}}
-
-{{model.name}}
-
-
-
-
- Name
-
-
- {{#each model.visualizations as |visualization|}}
-
-
- {{#link-to 'visualization.index' visualization.id}}{{visualization.name}}{{/link-to}}
-
-
-
-
-
- {{/each}}
-
-
-
-
- New visualization
-
-
-{{partial "dialog/project"}}
diff --git a/app/templates/projects.hbs b/app/templates/projects.hbs
deleted file mode 100644
index ff264cd..0000000
--- a/app/templates/projects.hbs
+++ /dev/null
@@ -1,33 +0,0 @@
-Projects
-
-
-
-
- Name
- Simulation
-
-
- {{#each model.projects as |project|}}
-
-
- {{#link-to "project.index" project.id}}{{project.name}}{{/link-to}}
-
-
- {{project.simulation.name}}
-
-
-
-
-
- {{/each}}
-
-
-
-
- New Project
-
-
-{{partial "dialog/projects"}}
diff --git a/app/templates/simulation-model/index.hbs b/app/templates/simulation-model/index.hbs
deleted file mode 100644
index 91872be..0000000
--- a/app/templates/simulation-model/index.hbs
+++ /dev/null
@@ -1,31 +0,0 @@
-{{#link-to 'simulation.index' model.simulation.id}}Back to {{model.simulation.name}}{{/link-to}}
-
-{{model.name}}
-
-
diff --git a/app/templates/simulation/index.hbs b/app/templates/simulation/index.hbs
deleted file mode 100644
index a938a9b..0000000
--- a/app/templates/simulation/index.hbs
+++ /dev/null
@@ -1,35 +0,0 @@
-{{#link-to 'simulations'}}Back to simulations{{/link-to}}
-
-{{model.simulation.name}}
-
-
-
-
- Name
- Simulator
-
-
- {{#each model.simulation.models as |simulationModel|}}
-
-
- {{#link-to "simulation-model.index" simulationModel.id}}{{simulationModel.name}}{{/link-to}}
-
-
- {{simulationModel.simulator.name}}
-
-
-
-
-
- {{/each}}
-
-
-
-
- New model
-
-
-{{partial "dialog/simulation"}}
diff --git a/app/templates/simulations.hbs b/app/templates/simulations.hbs
deleted file mode 100644
index 698d9a7..0000000
--- a/app/templates/simulations.hbs
+++ /dev/null
@@ -1,34 +0,0 @@
-Simulations
-
-
-
-
- Name
- Running
-
-
- {{#each model as |simulation|}}
-
-
- {{#link-to "simulation.index" simulation.id}}{{simulation.name}}{{/link-to}}
-
-
- {{simulation.running}}
-
-
-
-
-
- {{/each}}
-
-
-
-
- New Simulation
-
-
-{{partial "dialog/simulations"}}
diff --git a/app/templates/simulators.hbs b/app/templates/simulators.hbs
deleted file mode 100644
index d70e298..0000000
--- a/app/templates/simulators.hbs
+++ /dev/null
@@ -1,43 +0,0 @@
-Simulators
-
-
-
-
- Name
- ID
- Running
- Endpoint
-
-
-
- {{#each model as |simulator|}}
-
-
- {{simulator.name}}
-
-
- {{simulator.simulatorid}}
-
-
- {{simulator.running}}
-
-
- {{simulator.endpoint}}
-
-
-
-
-
- {{/each}}
-
-
-
-
- New Simulator
-
-
-{{partial "dialog/simulators"}}
diff --git a/app/templates/user/delete.hbs b/app/templates/user/delete.hbs
deleted file mode 100644
index b8173d5..0000000
--- a/app/templates/user/delete.hbs
+++ /dev/null
@@ -1,10 +0,0 @@
-Delete User
-
-
- Are you sure you want to delete the user "{{model.username}}"?
-
- This will also delete all projects belonging to this user!
-
-
-Cancel
-Delete
diff --git a/app/templates/user/edit.hbs b/app/templates/user/edit.hbs
deleted file mode 100644
index b44372f..0000000
--- a/app/templates/user/edit.hbs
+++ /dev/null
@@ -1,14 +0,0 @@
-Edit
-
-
diff --git a/app/templates/user/index.hbs b/app/templates/user/index.hbs
deleted file mode 100644
index 9a7c1cb..0000000
--- a/app/templates/user/index.hbs
+++ /dev/null
@@ -1,11 +0,0 @@
-Users
-
-{{#link-to 'user.new'}}New user{{/link-to}}
-
-
-
- {{#each users as |user|}}
- {{#link-to 'user.edit' user.id}}{{user.username}}{{/link-to}} {{#link-to 'user.delete' user.id}}X{{/link-to}}
- {{/each}}
-
-
diff --git a/app/templates/user/new.hbs b/app/templates/user/new.hbs
deleted file mode 100644
index 0e8598b..0000000
--- a/app/templates/user/new.hbs
+++ /dev/null
@@ -1,21 +0,0 @@
-New user
-
-
diff --git a/app/templates/visualization/edit.hbs b/app/templates/visualization/edit.hbs
deleted file mode 100644
index c15d593..0000000
--- a/app/templates/visualization/edit.hbs
+++ /dev/null
@@ -1,37 +0,0 @@
-{{model.name}}
-
-
-
-{{#draggable-dropzone dropped='addWidget'}}
- {{widget-container widgets=model.widgets editing=true data=data showWidgetDialog='showWidgetDialog'}}
-{{/draggable-dropzone}}
-
-
- Cancel
- Save
-
diff --git a/app/templates/visualization/index.hbs b/app/templates/visualization/index.hbs
deleted file mode 100644
index c728663..0000000
--- a/app/templates/visualization/index.hbs
+++ /dev/null
@@ -1,9 +0,0 @@
-{{#link-to 'project.index' model.project.id}}Back to {{model.project.name}}{{/link-to}}
-
-{{model.name}}
-
-{{widget-container widgets=model.widgets data=data}}
-
-
- {{#link-to "visualization.edit" model.id}}Edit layout{{/link-to}}
-
diff --git a/app/transforms/array.js b/app/transforms/array.js
deleted file mode 100644
index 7e1093f..0000000
--- a/app/transforms/array.js
+++ /dev/null
@@ -1,20 +0,0 @@
-import Ember from 'ember';
-import Transform from 'ember-data/transform';
-
-export default Transform.extend({
- deserialize(serialized) {
- if (Ember.isArray(serialized)) {
- return serialized;
- } else {
- return [];
- }
- },
-
- serialize(deserialized) {
- if (Ember.isArray(deserialized)) {
- return deserialized;
- } else {
- return [];
- }
- }
-});
diff --git a/bower.json b/bower.json
deleted file mode 100644
index adf3c54..0000000
--- a/bower.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "name": "villasweb-frontend",
- "dependencies": {
- "jquery-ui": "1.11.4",
- "bootstrap": "~3.3.5",
- "flot": "~0.8.3"
- }
-}
diff --git a/config/environment.js b/config/environment.js
deleted file mode 100644
index 0783652..0000000
--- a/config/environment.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/* jshint node: true */
-
-module.exports = function(environment) {
- var ENV = {
- modulePrefix: 'villasweb-frontend',
- environment: environment,
- rootURL: '/',
- locationType: 'auto',
- EmberENV: {
- FEATURES: {
- // Here you can enable experimental features on an ember canary build
- // e.g. 'with-controller': true
- },
- EXTEND_PROTOTYPES: {
- // Prevent Ember Data from overriding Date.parse.
- Date: false
- }
- },
-
- APP: {
- API_HOST: 'localhost:3000'
- }
- };
-
- if (environment === 'development') {
- // ENV.APP.LOG_RESOLVER = true;
- // ENV.APP.LOG_ACTIVE_GENERATION = true;
- // ENV.APP.LOG_TRANSITIONS = true;
- // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
- // ENV.APP.LOG_VIEW_LOOKUPS = true;
- }
-
- if (environment === 'test') {
- // Testem prefers this...
- ENV.locationType = 'none';
-
- // keep test console output quieter
- ENV.APP.LOG_ACTIVE_GENERATION = false;
- ENV.APP.LOG_VIEW_LOOKUPS = false;
-
- ENV.APP.rootElement = '#ember-testing';
- }
-
- if (environment === 'production') {
-
- }
-
- return ENV;
-};
diff --git a/ember-cli-build.js b/ember-cli-build.js
deleted file mode 100644
index 3418f9e..0000000
--- a/ember-cli-build.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/*jshint node:true*/
-/* global require, module */
-var EmberApp = require('ember-cli/lib/broccoli/ember-app');
-
-module.exports = function(defaults) {
- var app = new EmberApp(defaults, {
- // Add options here
- });
-
- // Use `app.import` to add additional libraries to the generated
- // output files.
- //
- // If you need to use different assets in different
- // environments, specify an object as the first parameter. That
- // object's keys should be the environment name and the values
- // should be the asset to use in that environment.
- //
- // If the library that you are including contains AMD or ES6
- // modules that you would like to import into your application
- // please specify an object with the list of modules as keys
- // along with the exports of each module as its value.
-
- app.import('bower_components/bootstrap/dist/js/bootstrap.js');
- app.import('bower_components/flot/jquery.flot.time.js');
- app.import('bower_components/jquery-ui/jquery-ui.js');
-
- app.import('bower_components/jquery-ui/themes/smoothness/jquery-ui.css');
-
- app.import('bower_components/jquery-ui/themes/smoothness/images/ui-icons_222222_256x240.png', { destDir: 'assets/images' });
-
- return app.toTree();
-};
diff --git a/package.json b/package.json
index 1a3bcb0..e8b8119 100644
--- a/package.json
+++ b/package.json
@@ -1,53 +1,29 @@
{
"name": "villasweb-frontend",
- "version": "0.0.0",
- "description": "Small description for villasweb-frontend goes here",
- "license": "MIT",
- "author": "",
- "directories": {
- "doc": "doc",
- "test": "tests"
- },
- "repository": "",
- "scripts": {
- "build": "ember build",
- "start": "ember server",
- "test": "ember test"
+ "version": "0.1.0",
+ "private": true,
+ "dependencies": {
+ "bootstrap": "^3.3.7",
+ "classnames": "^2.2.5",
+ "es6-promise": "^4.0.5",
+ "flux": "^3.1.2",
+ "immutable": "^3.8.1",
+ "react": "^15.4.2",
+ "react-bootstrap": "^0.30.7",
+ "react-d3": "^0.4.0",
+ "react-dnd": "^2.2.4",
+ "react-dnd-html5-backend": "^2.2.4",
+ "react-dom": "^15.4.2",
+ "react-router": "^3.0.2",
+ "superagent": "^3.5.0"
},
"devDependencies": {
- "broccoli-asset-rev": "^2.4.5",
- "ember-ajax": "^2.4.1",
- "ember-cli": "2.11.0",
- "ember-cli-app-version": "^2.0.0",
- "ember-cli-babel": "^5.1.7",
- "ember-cli-dependency-checker": "^1.3.0",
- "ember-cli-flot": "0.0.3",
- "ember-cli-htmlbars": "^1.1.1",
- "ember-cli-htmlbars-inline-precompile": "^0.3.3",
- "ember-cli-inject-live-reload": "^1.4.1",
- "ember-cli-jshint": "^2.0.1",
- "ember-cli-qunit": "^3.0.1",
- "ember-cli-release": "^0.2.9",
- "ember-cli-sass": "5.5.2",
- "ember-cli-shims": "^1.0.2",
- "ember-cli-sri": "^2.1.0",
- "ember-cli-test-loader": "^1.1.0",
- "ember-cli-uglify": "^1.2.0",
- "ember-data": "^2.11.0",
- "ember-export-application-global": "^1.0.5",
- "ember-load-initializers": "^0.6.0",
- "ember-modal-dialog": "^0.9.0",
- "ember-resolver": "^2.0.3",
- "ember-simple-auth": "^1.1.0",
- "ember-source": "^2.11.0",
- "ember-tether": "0.3.1",
- "ember-truth-helpers": "1.2.0",
- "ember-uploader": "1.2.3",
- "ember-welcome-page": "^2.0.2",
- "loader.js": "^4.0.10"
+ "react-scripts": "0.9.3"
},
- "engines": {
- "node": ">= 0.12.0"
- },
- "private": true
+ "scripts": {
+ "start": "react-scripts start",
+ "build": "react-scripts build",
+ "test": "react-scripts test --env=jsdom",
+ "eject": "react-scripts eject"
+ }
}
diff --git a/public/crossdomain.xml b/public/crossdomain.xml
deleted file mode 100644
index 0c16a7a..0000000
--- a/public/crossdomain.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/favicon.ico b/public/favicon.ico
new file mode 100644
index 0000000..5c125de
Binary files /dev/null and b/public/favicon.ico differ
diff --git a/public/index.html b/public/index.html
new file mode 100644
index 0000000..aab5e3b
--- /dev/null
+++ b/public/index.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+ React App
+
+
+
+
+
+
diff --git a/public/robots.txt b/public/robots.txt
deleted file mode 100644
index f591645..0000000
--- a/public/robots.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-# http://www.robotstxt.org
-User-agent: *
-Disallow:
diff --git a/src/App.test.js b/src/App.test.js
new file mode 100644
index 0000000..b84af98
--- /dev/null
+++ b/src/App.test.js
@@ -0,0 +1,8 @@
+import React from 'react';
+import ReactDOM from 'react-dom';
+import App from './App';
+
+it('renders without crashing', () => {
+ const div = document.createElement('div');
+ ReactDOM.render( , div);
+});
diff --git a/src/api/rest-api.js b/src/api/rest-api.js
new file mode 100644
index 0000000..0b3008c
--- /dev/null
+++ b/src/api/rest-api.js
@@ -0,0 +1,46 @@
+/**
+ * File: rest-api.js
+ * Author: Markus Grigull
+ * Date: 02.03.2017
+ * Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
+ * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
+ * Unauthorized copying of this file, via any medium is strictly prohibited.
+ **********************************************************************************/
+
+import request from 'superagent/lib/client';
+import Promise from 'es6-promise';
+
+const API_URL = 'http://localhost:4000/api/v1';
+
+function makeURL(part) {
+ // TODO: Add / if missing at front of part
+ return API_URL + part;
+}
+
+class RestAPI {
+ get(url) {
+ return new Promise(function (resolve, reject) {
+ request.get(makeURL(url)).end(function (error, res) {
+ if (res.status !== 200) {
+ reject();
+ } else {
+ resolve(JSON.parse(res.text));
+ }
+ });
+ });
+ }
+
+ post(url, body) {
+ return new Promise(function (resolve, reject) {
+ request.post(makeURL(url)).send(body).end(function (error, res) {
+ if (res.status !== 200) {
+ reject();
+ } else {
+ resolve(JSON.parse(res.text));
+ }
+ });
+ });
+ }
+}
+
+export default new RestAPI();
diff --git a/app/controllers/application.js b/src/app-dispatcher.js
similarity index 59%
rename from app/controllers/application.js
rename to src/app-dispatcher.js
index 37164b4..689348d 100644
--- a/app/controllers/application.js
+++ b/src/app-dispatcher.js
@@ -1,14 +1,14 @@
/**
- * File: application.js
+ * File: app-dispatcher.js
* Author: Markus Grigull
- * Date: 26.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
+ * Date: 02.03.2017
+ * Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
* This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
* Unauthorized copying of this file, via any medium is strictly prohibited.
**********************************************************************************/
-import Ember from 'ember';
+import { Dispatcher } from 'flux';
-export default Ember.Controller.extend({
- session: Ember.inject.service('session')
-});
+const dispatcher: Dispatcher = new Dispatcher();
+
+export default dispatcher;
diff --git a/app/components/file-upload.js b/src/components/footer.js
similarity index 51%
rename from app/components/file-upload.js
rename to src/components/footer.js
index 12c0dd0..cc84ea7 100644
--- a/app/components/file-upload.js
+++ b/src/components/footer.js
@@ -1,18 +1,22 @@
/**
- * File: file-upload.js
+ * File: footer.js
* Author: Markus Grigull
- * Date: 05.12.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
+ * Date: 02.03.2017
+ * Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
* This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
* Unauthorized copying of this file, via any medium is strictly prohibited.
**********************************************************************************/
-import EmberUploader from 'ember-uploader';
+import React, { Component } from 'react';
-export default EmberUploader.FileField.extend({
- files: null,
-
- filesDidChange: function(files) {
- this.set('files', files);
+class Footer extends Component {
+ render() {
+ return (
+
+ Copyright © {new Date().getFullYear()}
+
+ );
}
-});
+}
+
+export default Footer;
diff --git a/src/components/header.js b/src/components/header.js
new file mode 100644
index 0000000..b246f9d
--- /dev/null
+++ b/src/components/header.js
@@ -0,0 +1,24 @@
+/**
+ * File: header.js
+ * Author: Markus Grigull
+ * Date: 02.03.2017
+ * Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
+ * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
+ * Unauthorized copying of this file, via any medium is strictly prohibited.
+ **********************************************************************************/
+
+import React, { Component } from 'react';
+
+import '../styles/app.css';
+
+class Header extends Component {
+ render() {
+ return (
+
+ );
+ }
+}
+
+export default Header;
diff --git a/src/components/menu-sidebar.js b/src/components/menu-sidebar.js
new file mode 100644
index 0000000..c6df652
--- /dev/null
+++ b/src/components/menu-sidebar.js
@@ -0,0 +1,30 @@
+/**
+ * File: menu-sidebar.js
+ * Author: Markus Grigull
+ * Date: 02.03.2017
+ * Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
+ * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
+ * Unauthorized copying of this file, via any medium is strictly prohibited.
+ **********************************************************************************/
+
+import React, { Component } from 'react';
+import { Link } from 'react-router';
+
+class SidebarMenu extends Component {
+ render() {
+ return (
+
+
Menu
+
+
+ Home
+ Projects
+ Simulations
+ Simulators
+
+
+ );
+ }
+}
+
+export default SidebarMenu;
diff --git a/src/components/table.js b/src/components/table.js
new file mode 100644
index 0000000..fab3bfe
--- /dev/null
+++ b/src/components/table.js
@@ -0,0 +1,53 @@
+/**
+ * File: table.js
+ * Author: Markus Grigull
+ * Date: 02.03.2017
+ * Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
+ * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
+ * Unauthorized copying of this file, via any medium is strictly prohibited.
+ **********************************************************************************/
+
+import React, { Component } from 'react';
+
+class Table extends Component {
+ render() {
+ // create sorted rows
+ var rows = this.props.data.map(row => {
+ // add cells by column keys
+ var rowArray = [];
+
+ for (var i = 0; i < this.props.columns.length; i++) {
+ if (row[this.props.columns[i].key] != null) {
+ rowArray.push(row[this.props.columns[i].key].toString());
+ } else {
+ rowArray.push("");
+ }
+ }
+
+ return rowArray;
+ });
+
+ return (
+
+
+
+ {this.props.columns.map(column => (
+ {column.title}
+ ))}
+
+
+
+ {rows.map((row, index) => (
+
+ {row.map((cell, index) => (
+ {cell}
+ ))}
+
+ ))}
+
+
+ );
+ }
+}
+
+export default Table;
diff --git a/src/containers/app.js b/src/containers/app.js
new file mode 100644
index 0000000..b1b8a57
--- /dev/null
+++ b/src/containers/app.js
@@ -0,0 +1,55 @@
+/**
+ * File: app.js
+ * Author: Markus Grigull
+ * Date: 02.03.2017
+ * Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
+ * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
+ * Unauthorized copying of this file, via any medium is strictly prohibited.
+ **********************************************************************************/
+
+import React, { Component } from 'react';
+import { Container } from 'flux/utils';
+
+// import AppDispatcher from '../app-dispatcher';
+import VillasStore from '../stores/villas-store';
+
+import Header from '../components/header';
+import Footer from '../components/footer';
+import SidebarMenu from '../components/menu-sidebar';
+import Home from './home';
+import '../styles/app.css';
+
+class App extends Component {
+ static getStores() {
+ return [ VillasStore ];
+ }
+
+ static calculateState() {
+ return {
+ villas: VillasStore.getState()
+ };
+ }
+
+ render() {
+ // get children
+ var children = this.props.children;
+ if (this.props.location.pathname === "/") {
+ children =
+ }
+
+ return (
+
+
+
+
+
+ {children}
+
+
+
+
+ );
+ }
+}
+
+export default Container.create(App);
diff --git a/src/containers/home.js b/src/containers/home.js
new file mode 100644
index 0000000..81ead97
--- /dev/null
+++ b/src/containers/home.js
@@ -0,0 +1,36 @@
+/**
+ * File: home.js
+ * Author: Markus Grigull
+ * Date: 02.03.2017
+ * Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
+ * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
+ * Unauthorized copying of this file, via any medium is strictly prohibited.
+ **********************************************************************************/
+
+import React, { Component } from 'react';
+import { Container } from 'flux/utils';
+
+// import AppDispatcher from '../app-dispatcher';
+import VillasStore from '../stores/villas-store';
+
+import '../styles/home.css';
+
+class Home extends Component {
+ static getStores() {
+ return [ VillasStore ];
+ }
+
+ static calculateState() {
+ return {
+ villas: VillasStore.getState()
+ };
+ }
+
+ render() {
+ return (
+ Home
+ );
+ }
+}
+
+export default Container.create(Home);
diff --git a/src/containers/projects.js b/src/containers/projects.js
new file mode 100644
index 0000000..bf87dbc
--- /dev/null
+++ b/src/containers/projects.js
@@ -0,0 +1,39 @@
+/**
+ * File: projects.js
+ * Author: Markus Grigull
+ * Date: 02.03.2017
+ * Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
+ * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
+ * Unauthorized copying of this file, via any medium is strictly prohibited.
+ **********************************************************************************/
+
+import React, { Component } from 'react';
+import { Container } from 'flux/utils';
+
+// import AppDispatcher from '../app-dispatcher';
+import VillasStore from '../stores/villas-store';
+
+import '../styles/projects.css';
+
+class Projects extends Component {
+ static getStores() {
+ return [ VillasStore ];
+ }
+
+ static calculateState() {
+ return {
+ villas: VillasStore.getState()
+ };
+ }
+
+ render() {
+ return (
+
+
Projects
+
+
+ );
+ }
+}
+
+export default Container.create(Projects);
diff --git a/src/containers/simulators.js b/src/containers/simulators.js
new file mode 100644
index 0000000..f9687da
--- /dev/null
+++ b/src/containers/simulators.js
@@ -0,0 +1,72 @@
+/**
+ * File: simulators.js
+ * Author: Markus Grigull
+ * Date: 02.03.2017
+ * Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
+ * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
+ * Unauthorized copying of this file, via any medium is strictly prohibited.
+ **********************************************************************************/
+
+import React, { Component } from 'react';
+import { Container } from 'flux/utils';
+
+import AppDispatcher from '../app-dispatcher';
+import VillasStore from '../stores/villas-store';
+import SimulatorStore from '../stores/simulator-store';
+
+import Table from '../components/table';
+import '../styles/projects.css';
+
+class Simulators extends Component {
+ static getStores() {
+ return [ VillasStore, SimulatorStore ];
+ }
+
+ static calculateState() {
+ return {
+ villas: VillasStore.getState(),
+ simulators: SimulatorStore.getState(),
+
+ onButton
+ };
+ }
+
+ componentWillMount() {
+ AppDispatcher.dispatch({
+ type: 'simulators/start-load'
+ });
+ }
+
+ render() {
+ var columns = [
+ { title: 'Name', key: 'name' },
+ { title: 'ID', key: 'simulatorid', width: 80 },
+ { title: 'Running', key: 'running', width: 80 },
+ { title: 'Endpoint', key: 'endpoint', width: 120 }
+ ];
+
+ return (
+
+
Simulators
+
+
+
+
New Simulator
+
+ );
+ }
+}
+
+function onButton() {
+ AppDispatcher.dispatch({
+ type: 'simulators/start-add',
+ simulator: {
+ name: 'Virtual',
+ running: false,
+ simulatorid: 3,
+ endpoint: '1.1.1.1:1234'
+ }
+ });
+}
+
+export default Container.create(Simulators);
diff --git a/src/data-managers/simulators-data-manager.js b/src/data-managers/simulators-data-manager.js
new file mode 100644
index 0000000..bba01a1
--- /dev/null
+++ b/src/data-managers/simulators-data-manager.js
@@ -0,0 +1,43 @@
+/**
+ * File: simulators-data-manager.js
+ * Author: Markus Grigull
+ * Date: 02.03.2017
+ * Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
+ * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
+ * Unauthorized copying of this file, via any medium is strictly prohibited.
+ **********************************************************************************/
+
+import RestAPI from '../api/rest-api';
+import AppDispatcher from '../app-dispatcher';
+
+const SimulatorsDataManager = {
+ loadSimulators() {
+ RestAPI.get('/simulators').then(response => {
+ AppDispatcher.dispatch({
+ type: 'simulators/loaded',
+ simulators: response.simulators
+ }).catch(error => {
+ AppDispatcher.dispatch({
+ type: 'simulators/load-error',
+ error: error
+ });
+ });
+ });
+ },
+
+ addSimulator(simulator) {
+ RestAPI.post('/simulators', { simulator: simulator }).then(response => {
+ AppDispatcher.dispatch({
+ type: 'simulators/added',
+ simulator: response.simulator
+ }).catch(error => {
+ AppDispatcher.dispatch({
+ type: 'simulators/add-error',
+ error: error
+ });
+ });
+ });
+ }
+}
+
+export default SimulatorsDataManager;
diff --git a/app/controllers/visualization/index.js b/src/index.js
similarity index 56%
rename from app/controllers/visualization/index.js
rename to src/index.js
index bf51cbe..37758bb 100644
--- a/app/controllers/visualization/index.js
+++ b/src/index.js
@@ -1,15 +1,19 @@
/**
* File: index.js
* Author: Markus Grigull
- * Date: 28.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
+ * Date: 02.03.2017
+ * Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
* This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
* Unauthorized copying of this file, via any medium is strictly prohibited.
**********************************************************************************/
-import Ember from 'ember';
-import FetchLiveDataMixin from '../../mixins/fetch-live-data';
+import React from 'react';
+import ReactDOM from 'react-dom';
-export default Ember.Controller.extend(FetchLiveDataMixin, {
+import Router from './router';
+import './styles/index.css';
-});
+ReactDOM.render(
+ ,
+ document.getElementById('root')
+);
diff --git a/src/router.js b/src/router.js
new file mode 100644
index 0000000..fca3355
--- /dev/null
+++ b/src/router.js
@@ -0,0 +1,32 @@
+/**
+ * File: router.js
+ * Author: Markus Grigull
+ * Date: 02.03.2017
+ * Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
+ * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
+ * Unauthorized copying of this file, via any medium is strictly prohibited.
+ **********************************************************************************/
+
+import React, { Component } from 'react';
+import { Router, Route, hashHistory } from 'react-router';
+
+import App from './containers/app';
+import Home from './containers/home';
+import Projects from './containers/projects';
+import Simulators from './containers/simulators';
+
+class Root extends Component {
+ render() {
+ return (
+
+
+
+
+
+
+
+ );
+ }
+}
+
+export default Root;
diff --git a/src/stores/simulator-store.js b/src/stores/simulator-store.js
new file mode 100644
index 0000000..f8ff715
--- /dev/null
+++ b/src/stores/simulator-store.js
@@ -0,0 +1,60 @@
+/**
+ * File: villas-store.js
+ * Author: Markus Grigull
+ * Date: 02.03.2017
+ * Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
+ * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
+ * Unauthorized copying of this file, via any medium is strictly prohibited.
+ **********************************************************************************/
+
+import { ReduceStore } from 'flux/utils';
+
+import AppDispatcher from '../app-dispatcher';
+import SimulatorsDataManager from '../data-managers/simulators-data-manager';
+
+class SimulatorStore extends ReduceStore {
+ constructor() {
+ super(AppDispatcher);
+ }
+
+ getInitialState() {
+ return [];
+ }
+
+ reduce(state, action) {
+ console.log(action.type);
+
+ switch (action.type) {
+ case 'simulators/start-load':
+ SimulatorsDataManager.loadSimulators();
+ return state;
+
+ case 'simulators/loaded':
+ return action.simulators;
+
+ case 'simulators/load-error':
+ // TODO: Add error message
+ return state;
+
+ case 'simulators/start-add':
+ SimulatorsDataManager.addSimulator(action.simulator);
+ return state;
+
+ case 'simulators/added':
+ // state should always be immutable, thus make new copy
+ var simulators = state.slice();
+ simulators.push(action.simulator);
+
+ return simulators;
+
+ case 'simulators/add-error':
+ // TODO: Add error message
+ return state;
+
+ default:
+ return state;
+ }
+ }
+}
+
+export default new SimulatorStore();
diff --git a/src/stores/villas-store.js b/src/stores/villas-store.js
new file mode 100644
index 0000000..3fc05bf
--- /dev/null
+++ b/src/stores/villas-store.js
@@ -0,0 +1,31 @@
+/**
+ * File: villas-store.js
+ * Author: Markus Grigull
+ * Date: 02.03.2017
+ * Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
+ * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
+ * Unauthorized copying of this file, via any medium is strictly prohibited.
+ **********************************************************************************/
+
+import { ReduceStore } from 'flux/utils';
+
+import AppDispatcher from '../app-dispatcher';
+
+class VillasStore extends ReduceStore {
+ constructor() {
+ super(AppDispatcher);
+ }
+
+ getInitialState() {
+ return {};
+ }
+
+ reduce(state, action) {
+ switch (action.type) {
+ default:
+ return state;
+ }
+ }
+}
+
+export default new VillasStore();
diff --git a/src/styles/app.css b/src/styles/app.css
new file mode 100644
index 0000000..6ee6c69
--- /dev/null
+++ b/src/styles/app.css
@@ -0,0 +1,138 @@
+/**
+ * File: app.css
+ * Author: Markus Grigull
+ * Date: 02.03.2017
+ * Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
+ * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
+ * Unauthorized copying of this file, via any medium is strictly prohibited.
+ **********************************************************************************/
+
+/**
+ * Application container
+ */
+body {
+ background-color: #6EA2B0;
+}
+
+.app {
+ min-width: 800px;
+
+ color: #4d4d4d;
+
+ font: 16px 'Helvetica Neue', Helvetica, Arial, sans-serif;
+}
+
+.app header {
+ width: 100%;
+ height: 50px;
+
+ padding: 10px 0 0 0;
+
+ color: #103B7D;
+ background-color: #fff;
+}
+
+.app header h1 {
+ width: 100%;
+
+ text-align: center;
+}
+
+.app footer {
+ width: 100%;
+
+ margin-top: 20px;
+
+ text-align: center;
+
+ clear: both;
+}
+
+.app-content {
+ min-height: 200px;
+
+ margin: 20px 20px 20px 170px;
+ padding: 15px 20px;
+
+ background-color: #fff;
+ box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2),
+ 0 9px 18px 0 rgba(0, 0, 0, 0.1);
+}
+
+/**
+ * Menus
+ */
+.menu-sidebar {
+ float: left;
+
+ margin: 20px 0 0 20px;
+ padding: 20px 25px 20px 25px;
+
+ background-color: #fff;
+ box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2),
+ 0 9px 18px 0 rgba(0, 0, 0, 0.1);
+}
+
+.menu-sidebar a {
+ color: #4d4d4d;
+}
+
+.active {
+ font-weight: bold;
+}
+
+.menu-sidebar ul {
+ padding-top: 10px;
+
+ list-style: none;
+}
+
+/**
+ * Tables
+ */
+.table {
+ margin-top: 20px;
+
+ border: 0;
+ border-collapse: collapse;
+
+ background-color: #f6f6f6;
+}
+
+.table th, td {
+ padding: 5px;
+
+ text-align: left;
+
+ border: none;
+}
+
+.table th {
+ background-color: #527984;
+ color: #fff;
+}
+
+.table tr:nth-child(even) {
+ background-color: #ddd;
+}
+
+/**
+ * Buttons
+ */
+button {
+ margin-top: 10px;
+ padding: 4px 8px;
+
+ border: none;
+
+ background-color: #527984;
+ color: #fff;
+
+ font-size: 14px;
+
+ cursor: pointer;
+}
+
+button:hover {
+ background: #6EA2B0;
+}
diff --git a/app/routes/404.js b/src/styles/home.css
similarity index 66%
rename from app/routes/404.js
rename to src/styles/home.css
index b93ac29..5a74ef5 100644
--- a/app/routes/404.js
+++ b/src/styles/home.css
@@ -1,13 +1,8 @@
/**
- * File: 404.js
+ * File: home.css
* Author: Markus Grigull
- * Date: 28.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
+ * Date: 02.03.2017
+ * Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
* This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
* Unauthorized copying of this file, via any medium is strictly prohibited.
**********************************************************************************/
-
-import Ember from 'ember';
-
-export default Ember.Route.extend({
-});
diff --git a/src/styles/index.css b/src/styles/index.css
new file mode 100644
index 0000000..830576d
--- /dev/null
+++ b/src/styles/index.css
@@ -0,0 +1,4 @@
+* {
+ margin: 0;
+ padding: 0;
+}
diff --git a/app/controllers/dialog/widget/value.js b/src/styles/projects.css
similarity index 65%
rename from app/controllers/dialog/widget/value.js
rename to src/styles/projects.css
index 427431e..304b952 100644
--- a/app/controllers/dialog/widget/value.js
+++ b/src/styles/projects.css
@@ -1,13 +1,8 @@
/**
- * File: value.js
+ * File: projects.css
* Author: Markus Grigull
- * Date: 12.07.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
+ * Date: 02.03.2017
+ * Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
* This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
* Unauthorized copying of this file, via any medium is strictly prohibited.
**********************************************************************************/
-
-import Ember from 'ember';
-
-export default Ember.Controller.extend({
-});
diff --git a/app/components/widget-chart.js b/src/styles/simulators.css
similarity index 64%
rename from app/components/widget-chart.js
rename to src/styles/simulators.css
index 0e61a7e..8cc54ed 100644
--- a/app/components/widget-chart.js
+++ b/src/styles/simulators.css
@@ -1,13 +1,8 @@
/**
- * File: widget-chart.js
+ * File: simulators.css
* Author: Markus Grigull
- * Date: 28.06.2016
- * Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
+ * Date: 02.03.2017
+ * Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
* This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
* Unauthorized copying of this file, via any medium is strictly prohibited.
**********************************************************************************/
-
-import Ember from 'ember';
-
-export default Ember.Component.extend({
-});
diff --git a/testem.js b/testem.js
deleted file mode 100644
index 26044b2..0000000
--- a/testem.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/*jshint node:true*/
-module.exports = {
- "framework": "qunit",
- "test_page": "tests/index.html?hidepassed",
- "disable_watching": true,
- "launch_in_ci": [
- "PhantomJS"
- ],
- "launch_in_dev": [
- "PhantomJS",
- "Chrome"
- ]
-};
diff --git a/tests/.jshintrc b/tests/.jshintrc
deleted file mode 100644
index d2bd113..0000000
--- a/tests/.jshintrc
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "predef": [
- "document",
- "window",
- "location",
- "setTimeout",
- "$",
- "-Promise",
- "define",
- "console",
- "visit",
- "exists",
- "fillIn",
- "click",
- "keyEvent",
- "triggerEvent",
- "find",
- "findWithAssert",
- "wait",
- "DS",
- "andThen",
- "currentURL",
- "currentPath",
- "currentRouteName"
- ],
- "node": false,
- "browser": false,
- "boss": true,
- "curly": true,
- "debug": false,
- "devel": false,
- "eqeqeq": true,
- "evil": true,
- "forin": false,
- "immed": false,
- "laxbreak": false,
- "newcap": true,
- "noarg": true,
- "noempty": false,
- "nonew": false,
- "nomen": false,
- "onevar": false,
- "plusplus": false,
- "regexp": false,
- "undef": true,
- "sub": true,
- "strict": false,
- "white": false,
- "eqnull": true,
- "esversion": 6,
- "unused": true
-}
diff --git a/tests/helpers/destroy-app.js b/tests/helpers/destroy-app.js
deleted file mode 100644
index c3d4d1a..0000000
--- a/tests/helpers/destroy-app.js
+++ /dev/null
@@ -1,5 +0,0 @@
-import Ember from 'ember';
-
-export default function destroyApp(application) {
- Ember.run(application, 'destroy');
-}
diff --git a/tests/helpers/module-for-acceptance.js b/tests/helpers/module-for-acceptance.js
deleted file mode 100644
index 76996fd..0000000
--- a/tests/helpers/module-for-acceptance.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import { module } from 'qunit';
-import Ember from 'ember';
-import startApp from '../helpers/start-app';
-import destroyApp from '../helpers/destroy-app';
-
-const { RSVP: { Promise } } = Ember;
-
-export default function(name, options = {}) {
- module(name, {
- beforeEach() {
- this.application = startApp();
-
- if (options.beforeEach) {
- return options.beforeEach.apply(this, arguments);
- }
- },
-
- afterEach() {
- let afterEach = options.afterEach && options.afterEach.apply(this, arguments);
- return Promise.resolve(afterEach).then(() => destroyApp(this.application));
- }
- });
-}
diff --git a/tests/helpers/resolver.js b/tests/helpers/resolver.js
deleted file mode 100644
index b208d38..0000000
--- a/tests/helpers/resolver.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import Resolver from '../../resolver';
-import config from '../../config/environment';
-
-const resolver = Resolver.create();
-
-resolver.namespace = {
- modulePrefix: config.modulePrefix,
- podModulePrefix: config.podModulePrefix
-};
-
-export default resolver;
diff --git a/tests/helpers/start-app.js b/tests/helpers/start-app.js
deleted file mode 100644
index e098f1d..0000000
--- a/tests/helpers/start-app.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import Ember from 'ember';
-import Application from '../../app';
-import config from '../../config/environment';
-
-export default function startApp(attrs) {
- let application;
-
- let attributes = Ember.merge({}, config.APP);
- attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
-
- Ember.run(() => {
- application = Application.create(attributes);
- application.setupForTesting();
- application.injectTestHelpers();
- });
-
- return application;
-}
diff --git a/tests/index.html b/tests/index.html
deleted file mode 100644
index 4def306..0000000
--- a/tests/index.html
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
- VillaswebFrontend Tests
-
-
-
- {{content-for "head"}}
- {{content-for "test-head"}}
-
-
-
-
-
- {{content-for "head-footer"}}
- {{content-for "test-head-footer"}}
-
-
- {{content-for "body"}}
- {{content-for "test-body"}}
-
-
-
-
-
-
-
- {{content-for "body-footer"}}
- {{content-for "test-body-footer"}}
-
-
diff --git a/tests/integration/.gitkeep b/tests/integration/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/integration/components/draggable-dropzone-test.js b/tests/integration/components/draggable-dropzone-test.js
deleted file mode 100644
index 68c8c69..0000000
--- a/tests/integration/components/draggable-dropzone-test.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { moduleForComponent, test } from 'ember-qunit';
-import hbs from 'htmlbars-inline-precompile';
-
-moduleForComponent('draggable-dropzone', 'Integration | Component | draggable dropzone', {
- integration: true
-});
-
-test('it renders', function(assert) {
- // Set any properties with this.set('myProperty', 'value');
- // Handle any actions with this.on('myAction', function(val) { ... });
-
- this.render(hbs`{{draggable-dropzone}}`);
-
- assert.equal(this.$().text().trim(), '');
-
- // Template block usage:
- this.render(hbs`
- {{#draggable-dropzone}}
- template block text
- {{/draggable-dropzone}}
- `);
-
- assert.equal(this.$().text().trim(), 'template block text');
-});
diff --git a/tests/integration/components/draggable-item-test.js b/tests/integration/components/draggable-item-test.js
deleted file mode 100644
index 93830ba..0000000
--- a/tests/integration/components/draggable-item-test.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { moduleForComponent, test } from 'ember-qunit';
-import hbs from 'htmlbars-inline-precompile';
-
-moduleForComponent('draggable-item', 'Integration | Component | draggable item', {
- integration: true
-});
-
-test('it renders', function(assert) {
- // Set any properties with this.set('myProperty', 'value');
- // Handle any actions with this.on('myAction', function(val) { ... });
-
- this.render(hbs`{{draggable-item}}`);
-
- assert.equal(this.$().text().trim(), '');
-
- // Template block usage:
- this.render(hbs`
- {{#draggable-item}}
- template block text
- {{/draggable-item}}
- `);
-
- assert.equal(this.$().text().trim(), 'template block text');
-});
diff --git a/tests/integration/components/file-upload-test.js b/tests/integration/components/file-upload-test.js
deleted file mode 100644
index 3c7b795..0000000
--- a/tests/integration/components/file-upload-test.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { moduleForComponent, test } from 'ember-qunit';
-import hbs from 'htmlbars-inline-precompile';
-
-moduleForComponent('file-upload', 'Integration | Component | file upload', {
- integration: true
-});
-
-test('it renders', function(assert) {
- // Set any properties with this.set('myProperty', 'value');
- // Handle any actions with this.on('myAction', function(val) { ... });
-
- this.render(hbs`{{file-upload}}`);
-
- assert.equal(this.$().text().trim(), '');
-
- // Template block usage:
- this.render(hbs`
- {{#file-upload}}
- template block text
- {{/file-upload}}
- `);
-
- assert.equal(this.$().text().trim(), 'template block text');
-});
diff --git a/tests/integration/components/flow-plot-test.js b/tests/integration/components/flow-plot-test.js
deleted file mode 100644
index 949b9a7..0000000
--- a/tests/integration/components/flow-plot-test.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { moduleForComponent, test } from 'ember-qunit';
-import hbs from 'htmlbars-inline-precompile';
-
-moduleForComponent('flow-plot', 'Integration | Component | flow plot', {
- integration: true
-});
-
-test('it renders', function(assert) {
- // Set any properties with this.set('myProperty', 'value');
- // Handle any actions with this.on('myAction', function(val) { ... });
-
- this.render(hbs`{{flow-plot}}`);
-
- assert.equal(this.$().text().trim(), '');
-
- // Template block usage:
- this.render(hbs`
- {{#flow-plot}}
- template block text
- {{/flow-plot}}
- `);
-
- assert.equal(this.$().text().trim(), 'template block text');
-});
diff --git a/tests/integration/components/plot-abstract-test.js b/tests/integration/components/plot-abstract-test.js
deleted file mode 100644
index 392a7fb..0000000
--- a/tests/integration/components/plot-abstract-test.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { moduleForComponent, test } from 'ember-qunit';
-import hbs from 'htmlbars-inline-precompile';
-
-moduleForComponent('plot-abstract', 'Integration | Component | plot abstract', {
- integration: true
-});
-
-test('it renders', function(assert) {
- // Set any properties with this.set('myProperty', 'value');
- // Handle any actions with this.on('myAction', function(val) { ... });
-
- this.render(hbs`{{plot-abstract}}`);
-
- assert.equal(this.$().text().trim(), '');
-
- // Template block usage:
- this.render(hbs`
- {{#plot-abstract}}
- template block text
- {{/plot-abstract}}
- `);
-
- assert.equal(this.$().text().trim(), 'template block text');
-});
diff --git a/tests/integration/components/plot-chart-test.js b/tests/integration/components/plot-chart-test.js
deleted file mode 100644
index 17234e4..0000000
--- a/tests/integration/components/plot-chart-test.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { moduleForComponent, test } from 'ember-qunit';
-import hbs from 'htmlbars-inline-precompile';
-
-moduleForComponent('plot-chart', 'Integration | Component | plot chart', {
- integration: true
-});
-
-test('it renders', function(assert) {
- // Set any properties with this.set('myProperty', 'value');
- // Handle any actions with this.on('myAction', function(val) { ... });
-
- this.render(hbs`{{plot-chart}}`);
-
- assert.equal(this.$().text().trim(), '');
-
- // Template block usage:
- this.render(hbs`
- {{#plot-chart}}
- template block text
- {{/plot-chart}}
- `);
-
- assert.equal(this.$().text().trim(), 'template block text');
-});
diff --git a/tests/integration/components/plot-container-test.js b/tests/integration/components/plot-container-test.js
deleted file mode 100644
index a929846..0000000
--- a/tests/integration/components/plot-container-test.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { moduleForComponent, test } from 'ember-qunit';
-import hbs from 'htmlbars-inline-precompile';
-
-moduleForComponent('plot-container', 'Integration | Component | plot container', {
- integration: true
-});
-
-test('it renders', function(assert) {
- // Set any properties with this.set('myProperty', 'value');
- // Handle any actions with this.on('myAction', function(val) { ... });
-
- this.render(hbs`{{plot-container}}`);
-
- assert.equal(this.$().text().trim(), '');
-
- // Template block usage:
- this.render(hbs`
- {{#plot-container}}
- template block text
- {{/plot-container}}
- `);
-
- assert.equal(this.$().text().trim(), 'template block text');
-});
diff --git a/tests/integration/components/plot-table-test.js b/tests/integration/components/plot-table-test.js
deleted file mode 100644
index 927514e..0000000
--- a/tests/integration/components/plot-table-test.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { moduleForComponent, test } from 'ember-qunit';
-import hbs from 'htmlbars-inline-precompile';
-
-moduleForComponent('plot-table', 'Integration | Component | plot table', {
- integration: true
-});
-
-test('it renders', function(assert) {
- // Set any properties with this.set('myProperty', 'value');
- // Handle any actions with this.on('myAction', function(val) { ... });
-
- this.render(hbs`{{plot-table}}`);
-
- assert.equal(this.$().text().trim(), '');
-
- // Template block usage:
- this.render(hbs`
- {{#plot-table}}
- template block text
- {{/plot-table}}
- `);
-
- assert.equal(this.$().text().trim(), 'template block text');
-});
diff --git a/tests/integration/components/plot-value-test.js b/tests/integration/components/plot-value-test.js
deleted file mode 100644
index 5a65558..0000000
--- a/tests/integration/components/plot-value-test.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { moduleForComponent, test } from 'ember-qunit';
-import hbs from 'htmlbars-inline-precompile';
-
-moduleForComponent('plot-value', 'Integration | Component | plot value', {
- integration: true
-});
-
-test('it renders', function(assert) {
- // Set any properties with this.set('myProperty', 'value');
- // Handle any actions with this.on('myAction', function(val) { ... });
-
- this.render(hbs`{{plot-value}}`);
-
- assert.equal(this.$().text().trim(), '');
-
- // Template block usage:
- this.render(hbs`
- {{#plot-value}}
- template block text
- {{/plot-value}}
- `);
-
- assert.equal(this.$().text().trim(), 'template block text');
-});
diff --git a/tests/integration/components/widget-image-test.js b/tests/integration/components/widget-image-test.js
deleted file mode 100644
index 8eace27..0000000
--- a/tests/integration/components/widget-image-test.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { moduleForComponent, test } from 'ember-qunit';
-import hbs from 'htmlbars-inline-precompile';
-
-moduleForComponent('widget-image', 'Integration | Component | widget image', {
- integration: true
-});
-
-test('it renders', function(assert) {
- // Set any properties with this.set('myProperty', 'value');
- // Handle any actions with this.on('myAction', function(val) { ... });
-
- this.render(hbs`{{widget-image}}`);
-
- assert.equal(this.$().text().trim(), '');
-
- // Template block usage:
- this.render(hbs`
- {{#widget-image}}
- template block text
- {{/widget-image}}
- `);
-
- assert.equal(this.$().text().trim(), 'template block text');
-});
diff --git a/tests/integration/components/widget-label-test.js b/tests/integration/components/widget-label-test.js
deleted file mode 100644
index 7312395..0000000
--- a/tests/integration/components/widget-label-test.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { moduleForComponent, test } from 'ember-qunit';
-import hbs from 'htmlbars-inline-precompile';
-
-moduleForComponent('widget-label', 'Integration | Component | widget label', {
- integration: true
-});
-
-test('it renders', function(assert) {
- // Set any properties with this.set('myProperty', 'value');
- // Handle any actions with this.on('myAction', function(val) { ... });
-
- this.render(hbs`{{widget-label}}`);
-
- assert.equal(this.$().text().trim(), '');
-
- // Template block usage:
- this.render(hbs`
- {{#widget-label}}
- template block text
- {{/widget-label}}
- `);
-
- assert.equal(this.$().text().trim(), 'template block text');
-});
diff --git a/tests/integration/components/widget-plot-test.js b/tests/integration/components/widget-plot-test.js
deleted file mode 100644
index 1b38f7a..0000000
--- a/tests/integration/components/widget-plot-test.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { moduleForComponent, test } from 'ember-qunit';
-import hbs from 'htmlbars-inline-precompile';
-
-moduleForComponent('widget-plot', 'Integration | Component | widget plot', {
- integration: true
-});
-
-test('it renders', function(assert) {
- // Set any properties with this.set('myProperty', 'value');
- // Handle any actions with this.on('myAction', function(val) { ... });
-
- this.render(hbs`{{widget-plot}}`);
-
- assert.equal(this.$().text().trim(), '');
-
- // Template block usage:
- this.render(hbs`
- {{#widget-plot}}
- template block text
- {{/widget-plot}}
- `);
-
- assert.equal(this.$().text().trim(), 'template block text');
-});
diff --git a/tests/test-helper.js b/tests/test-helper.js
deleted file mode 100644
index e6cfb70..0000000
--- a/tests/test-helper.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import resolver from './helpers/resolver';
-import {
- setResolver
-} from 'ember-qunit';
-
-setResolver(resolver);
diff --git a/tests/unit/.gitkeep b/tests/unit/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/unit/adapters/application-test.js b/tests/unit/adapters/application-test.js
deleted file mode 100644
index f0a2101..0000000
--- a/tests/unit/adapters/application-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('adapter:application', 'Unit | Adapter | application', {
- // Specify the other units that are required for this test.
- // needs: ['serializer:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
- let adapter = this.subject();
- assert.ok(adapter);
-});
diff --git a/tests/unit/controllers/application-test.js b/tests/unit/controllers/application-test.js
deleted file mode 100644
index b71b4a5..0000000
--- a/tests/unit/controllers/application-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('controller:application', 'Unit | Controller | application', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
- let controller = this.subject();
- assert.ok(controller);
-});
diff --git a/tests/unit/controllers/dialog/plot/value-test.js b/tests/unit/controllers/dialog/plot/value-test.js
deleted file mode 100644
index 7b1555b..0000000
--- a/tests/unit/controllers/dialog/plot/value-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('controller:dialog/plot/value', 'Unit | Controller | dialog/plot/value', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
- let controller = this.subject();
- assert.ok(controller);
-});
diff --git a/tests/unit/controllers/login-test.js b/tests/unit/controllers/login-test.js
deleted file mode 100644
index b68f797..0000000
--- a/tests/unit/controllers/login-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('controller:login', 'Unit | Controller | login', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
- let controller = this.subject();
- assert.ok(controller);
-});
diff --git a/tests/unit/controllers/project/index-test.js b/tests/unit/controllers/project/index-test.js
deleted file mode 100644
index b72dc07..0000000
--- a/tests/unit/controllers/project/index-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('controller:project/index', 'Unit | Controller | project/index', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
- let controller = this.subject();
- assert.ok(controller);
-});
diff --git a/tests/unit/controllers/projects-test.js b/tests/unit/controllers/projects-test.js
deleted file mode 100644
index 174083b..0000000
--- a/tests/unit/controllers/projects-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('controller:projects', 'Unit | Controller | projects', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
- let controller = this.subject();
- assert.ok(controller);
-});
diff --git a/tests/unit/controllers/projects/new-test.js b/tests/unit/controllers/projects/new-test.js
deleted file mode 100644
index 1a5e3ea..0000000
--- a/tests/unit/controllers/projects/new-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('controller:projects/new', 'Unit | Controller | projects/new', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
- let controller = this.subject();
- assert.ok(controller);
-});
diff --git a/tests/unit/controllers/simulation-model/index-test.js b/tests/unit/controllers/simulation-model/index-test.js
deleted file mode 100644
index 023e3c5..0000000
--- a/tests/unit/controllers/simulation-model/index-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('controller:simulation-model/index', 'Unit | Controller | simulation-model/index', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
- let controller = this.subject();
- assert.ok(controller);
-});
diff --git a/tests/unit/controllers/simulation/index-test.js b/tests/unit/controllers/simulation/index-test.js
deleted file mode 100644
index c060398..0000000
--- a/tests/unit/controllers/simulation/index-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('controller:simulation/index', 'Unit | Controller | simulation/index', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
- let controller = this.subject();
- assert.ok(controller);
-});
diff --git a/tests/unit/controllers/simulations-test.js b/tests/unit/controllers/simulations-test.js
deleted file mode 100644
index 9b64642..0000000
--- a/tests/unit/controllers/simulations-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('controller:simulations', 'Unit | Controller | simulations', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
- let controller = this.subject();
- assert.ok(controller);
-});
diff --git a/tests/unit/controllers/simulators-test.js b/tests/unit/controllers/simulators-test.js
deleted file mode 100644
index 285361d..0000000
--- a/tests/unit/controllers/simulators-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('controller:simulators', 'Unit | Controller | simulators', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
- let controller = this.subject();
- assert.ok(controller);
-});
diff --git a/tests/unit/controllers/user/edit-test.js b/tests/unit/controllers/user/edit-test.js
deleted file mode 100644
index f06d390..0000000
--- a/tests/unit/controllers/user/edit-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('controller:user/edit', 'Unit | Controller | user/edit', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
- let controller = this.subject();
- assert.ok(controller);
-});
diff --git a/tests/unit/controllers/users/delete-test.js b/tests/unit/controllers/users/delete-test.js
deleted file mode 100644
index 68f802f..0000000
--- a/tests/unit/controllers/users/delete-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('controller:users/delete', 'Unit | Controller | users/delete', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
- let controller = this.subject();
- assert.ok(controller);
-});
diff --git a/tests/unit/controllers/users/edit-test.js b/tests/unit/controllers/users/edit-test.js
deleted file mode 100644
index debcf46..0000000
--- a/tests/unit/controllers/users/edit-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('controller:users/edit', 'Unit | Controller | users/edit', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
- let controller = this.subject();
- assert.ok(controller);
-});
diff --git a/tests/unit/controllers/users/index-test.js b/tests/unit/controllers/users/index-test.js
deleted file mode 100644
index 2395bc6..0000000
--- a/tests/unit/controllers/users/index-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('controller:users/index', 'Unit | Controller | users/index', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
- let controller = this.subject();
- assert.ok(controller);
-});
diff --git a/tests/unit/controllers/users/new-test.js b/tests/unit/controllers/users/new-test.js
deleted file mode 100644
index 113f11e..0000000
--- a/tests/unit/controllers/users/new-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('controller:users/new', 'Unit | Controller | users/new', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
- let controller = this.subject();
- assert.ok(controller);
-});
diff --git a/tests/unit/controllers/visualization/edit-test.js b/tests/unit/controllers/visualization/edit-test.js
deleted file mode 100644
index e0a5451..0000000
--- a/tests/unit/controllers/visualization/edit-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('controller:visualization/edit', 'Unit | Controller | visualization/edit', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
- let controller = this.subject();
- assert.ok(controller);
-});
diff --git a/tests/unit/controllers/visualization/index-test.js b/tests/unit/controllers/visualization/index-test.js
deleted file mode 100644
index d2ee03f..0000000
--- a/tests/unit/controllers/visualization/index-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('controller:visualization/index', 'Unit | Controller | visualization/index', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
- let controller = this.subject();
- assert.ok(controller);
-});
diff --git a/tests/unit/mixins/draggable-test.js b/tests/unit/mixins/draggable-test.js
deleted file mode 100644
index e13c254..0000000
--- a/tests/unit/mixins/draggable-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import Ember from 'ember';
-import DraggableMixin from 'villasweb-frontend/mixins/draggable';
-import { module, test } from 'qunit';
-
-module('Unit | Mixin | draggable');
-
-// Replace this with your real tests.
-test('it works', function(assert) {
- let DraggableObject = Ember.Object.extend(DraggableMixin);
- let subject = DraggableObject.create();
- assert.ok(subject);
-});
diff --git a/tests/unit/mixins/droppable-test.js b/tests/unit/mixins/droppable-test.js
deleted file mode 100644
index 41976f3..0000000
--- a/tests/unit/mixins/droppable-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import Ember from 'ember';
-import DroppableMixin from 'villasweb-frontend/mixins/droppable';
-import { module, test } from 'qunit';
-
-module('Unit | Mixin | droppable');
-
-// Replace this with your real tests.
-test('it works', function(assert) {
- let DroppableObject = Ember.Object.extend(DroppableMixin);
- let subject = DroppableObject.create();
- assert.ok(subject);
-});
diff --git a/tests/unit/mixins/fetch-live-data-test.js b/tests/unit/mixins/fetch-live-data-test.js
deleted file mode 100644
index de5b41e..0000000
--- a/tests/unit/mixins/fetch-live-data-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import Ember from 'ember';
-import FetchLiveDataMixin from 'villasweb-frontend/mixins/fetch-live-data';
-import { module, test } from 'qunit';
-
-module('Unit | Mixin | fetch live data');
-
-// Replace this with your real tests.
-test('it works', function(assert) {
- let FetchLiveDataObject = Ember.Object.extend(FetchLiveDataMixin);
- let subject = FetchLiveDataObject.create();
- assert.ok(subject);
-});
diff --git a/tests/unit/mixins/live-data-test.js b/tests/unit/mixins/live-data-test.js
deleted file mode 100644
index 804897f..0000000
--- a/tests/unit/mixins/live-data-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import Ember from 'ember';
-import LiveDataMixin from 'villasweb-frontend/mixins/live-data';
-import { module, test } from 'qunit';
-
-module('Unit | Mixin | live data');
-
-// Replace this with your real tests.
-test('it works', function(assert) {
- let LiveDataObject = Ember.Object.extend(LiveDataMixin);
- let subject = LiveDataObject.create();
- assert.ok(subject);
-});
diff --git a/tests/unit/mixins/resizable-test.js b/tests/unit/mixins/resizable-test.js
deleted file mode 100644
index eaec854..0000000
--- a/tests/unit/mixins/resizable-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import Ember from 'ember';
-import ResizableMixin from 'villasweb-frontend/mixins/resizable';
-import { module, test } from 'qunit';
-
-module('Unit | Mixin | resizable');
-
-// Replace this with your real tests.
-test('it works', function(assert) {
- let ResizableObject = Ember.Object.extend(ResizableMixin);
- let subject = ResizableObject.create();
- assert.ok(subject);
-});
diff --git a/tests/unit/mixins/sortable-test.js b/tests/unit/mixins/sortable-test.js
deleted file mode 100644
index 2efc2c2..0000000
--- a/tests/unit/mixins/sortable-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import Ember from 'ember';
-import SortableMixin from 'villasweb-frontend/mixins/sortable';
-import { module, test } from 'qunit';
-
-module('Unit | Mixin | sortable');
-
-// Replace this with your real tests.
-test('it works', function(assert) {
- let SortableObject = Ember.Object.extend(SortableMixin);
- let subject = SortableObject.create();
- assert.ok(subject);
-});
diff --git a/tests/unit/models/file-test.js b/tests/unit/models/file-test.js
deleted file mode 100644
index 225d072..0000000
--- a/tests/unit/models/file-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('file', 'Unit | Model | file', {
- // Specify the other units that are required for this test.
- needs: []
-});
-
-test('it exists', function(assert) {
- let model = this.subject();
- // let store = this.store();
- assert.ok(!!model);
-});
diff --git a/tests/unit/models/plot-test.js b/tests/unit/models/plot-test.js
deleted file mode 100644
index 50a2df7..0000000
--- a/tests/unit/models/plot-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('plot', 'Unit | Model | plot', {
- // Specify the other units that are required for this test.
- needs: []
-});
-
-test('it exists', function(assert) {
- let model = this.subject();
- // let store = this.store();
- assert.ok(!!model);
-});
diff --git a/tests/unit/models/project-test.js b/tests/unit/models/project-test.js
deleted file mode 100644
index 2dddcd6..0000000
--- a/tests/unit/models/project-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('project', 'Unit | Model | project', {
- // Specify the other units that are required for this test.
- needs: []
-});
-
-test('it exists', function(assert) {
- let model = this.subject();
- // let store = this.store();
- assert.ok(!!model);
-});
diff --git a/tests/unit/models/simulation-data-test.js b/tests/unit/models/simulation-data-test.js
deleted file mode 100644
index 8faab14..0000000
--- a/tests/unit/models/simulation-data-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('simulation-data', 'Unit | Model | simulation data', {
- // Specify the other units that are required for this test.
- needs: []
-});
-
-test('it exists', function(assert) {
- let model = this.subject();
- // let store = this.store();
- assert.ok(!!model);
-});
diff --git a/tests/unit/models/simulation-model-test.js b/tests/unit/models/simulation-model-test.js
deleted file mode 100644
index 01f173b..0000000
--- a/tests/unit/models/simulation-model-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('simulation-model', 'Unit | Model | simulation-model', {
- // Specify the other units that are required for this test.
- needs: []
-});
-
-test('it exists', function(assert) {
- let model = this.subject();
- // let store = this.store();
- assert.ok(!!model);
-});
diff --git a/tests/unit/models/simulation-test.js b/tests/unit/models/simulation-test.js
deleted file mode 100644
index fa6a585..0000000
--- a/tests/unit/models/simulation-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('simulation', 'Unit | Model | simulation', {
- // Specify the other units that are required for this test.
- needs: []
-});
-
-test('it exists', function(assert) {
- let model = this.subject();
- // let store = this.store();
- assert.ok(!!model);
-});
diff --git a/tests/unit/models/simulator-status-test.js b/tests/unit/models/simulator-status-test.js
deleted file mode 100644
index 48c8a99..0000000
--- a/tests/unit/models/simulator-status-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('simulator-status', 'Unit | Model | simulator status', {
- // Specify the other units that are required for this test.
- needs: []
-});
-
-test('it exists', function(assert) {
- let model = this.subject();
- // let store = this.store();
- assert.ok(!!model);
-});
diff --git a/tests/unit/models/simulator-test.js b/tests/unit/models/simulator-test.js
deleted file mode 100644
index 8a6206a..0000000
--- a/tests/unit/models/simulator-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('simulator', 'Unit | Model | simulator', {
- // Specify the other units that are required for this test.
- needs: []
-});
-
-test('it exists', function(assert) {
- let model = this.subject();
- // let store = this.store();
- assert.ok(!!model);
-});
diff --git a/tests/unit/models/user-test.js b/tests/unit/models/user-test.js
deleted file mode 100644
index ba21110..0000000
--- a/tests/unit/models/user-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('user', 'Unit | Model | user', {
- // Specify the other units that are required for this test.
- needs: []
-});
-
-test('it exists', function(assert) {
- let model = this.subject();
- // let store = this.store();
- assert.ok(!!model);
-});
diff --git a/tests/unit/models/visualization-test.js b/tests/unit/models/visualization-test.js
deleted file mode 100644
index f84f9bc..0000000
--- a/tests/unit/models/visualization-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('visualization', 'Unit | Model | visualization', {
- // Specify the other units that are required for this test.
- needs: []
-});
-
-test('it exists', function(assert) {
- let model = this.subject();
- // let store = this.store();
- assert.ok(!!model);
-});
diff --git a/tests/unit/routes/404-test.js b/tests/unit/routes/404-test.js
deleted file mode 100644
index 260a5bc..0000000
--- a/tests/unit/routes/404-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:404', 'Unit | Route | 404', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/application-test.js b/tests/unit/routes/application-test.js
deleted file mode 100644
index 9808c43..0000000
--- a/tests/unit/routes/application-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:application', 'Unit | Route | application', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/dialog/plot/value-test.js b/tests/unit/routes/dialog/plot/value-test.js
deleted file mode 100644
index 259de45..0000000
--- a/tests/unit/routes/dialog/plot/value-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:dialog/plot/value', 'Unit | Route | dialog/plot/value', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/index-test.js b/tests/unit/routes/index-test.js
deleted file mode 100644
index 5d0f50d..0000000
--- a/tests/unit/routes/index-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:index', 'Unit | Route | index', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/login-test.js b/tests/unit/routes/login-test.js
deleted file mode 100644
index e78ebad..0000000
--- a/tests/unit/routes/login-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:login', 'Unit | Route | login', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/logout-test.js b/tests/unit/routes/logout-test.js
deleted file mode 100644
index 64613a0..0000000
--- a/tests/unit/routes/logout-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:logout', 'Unit | Route | logout', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/me-test.js b/tests/unit/routes/me-test.js
deleted file mode 100644
index 9719ac5..0000000
--- a/tests/unit/routes/me-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:me', 'Unit | Route | me', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/models-test.js b/tests/unit/routes/models-test.js
deleted file mode 100644
index a6182e6..0000000
--- a/tests/unit/routes/models-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:models', 'Unit | Route | models', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/projects-test.js b/tests/unit/routes/projects-test.js
deleted file mode 100644
index e5dfb65..0000000
--- a/tests/unit/routes/projects-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:projects', 'Unit | Route | projects', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/projects/delete-test.js b/tests/unit/routes/projects/delete-test.js
deleted file mode 100644
index 7ce43e6..0000000
--- a/tests/unit/routes/projects/delete-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:projects/delete', 'Unit | Route | projects/delete', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/projects/edit-test.js b/tests/unit/routes/projects/edit-test.js
deleted file mode 100644
index 545616f..0000000
--- a/tests/unit/routes/projects/edit-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:projects/edit', 'Unit | Route | projects/edit', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/projects/index-test.js b/tests/unit/routes/projects/index-test.js
deleted file mode 100644
index c232f73..0000000
--- a/tests/unit/routes/projects/index-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:projects/index', 'Unit | Route | projects/index', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/projects/new-test.js b/tests/unit/routes/projects/new-test.js
deleted file mode 100644
index 0bb6b03..0000000
--- a/tests/unit/routes/projects/new-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:projects/new', 'Unit | Route | projects/new', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/projects/project-test.js b/tests/unit/routes/projects/project-test.js
deleted file mode 100644
index fa2d3fe..0000000
--- a/tests/unit/routes/projects/project-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:projects/project', 'Unit | Route | projects/project', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/simulation-model/index-test.js b/tests/unit/routes/simulation-model/index-test.js
deleted file mode 100644
index ae828d2..0000000
--- a/tests/unit/routes/simulation-model/index-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:simulation-model/index', 'Unit | Route | simulation-model/index', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/simulation/index-test.js b/tests/unit/routes/simulation/index-test.js
deleted file mode 100644
index ba31a78..0000000
--- a/tests/unit/routes/simulation/index-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:simulation/index', 'Unit | Route | simulation/index', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/simulations-test.js b/tests/unit/routes/simulations-test.js
deleted file mode 100644
index b72a094..0000000
--- a/tests/unit/routes/simulations-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:simulations', 'Unit | Route | simulations', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/simulators-test.js b/tests/unit/routes/simulators-test.js
deleted file mode 100644
index 8dbfe46..0000000
--- a/tests/unit/routes/simulators-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:simulators', 'Unit | Route | simulators', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/simulators/delete-test.js b/tests/unit/routes/simulators/delete-test.js
deleted file mode 100644
index 98ca109..0000000
--- a/tests/unit/routes/simulators/delete-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:simulators/delete', 'Unit | Route | simulators/delete', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/simulators/edit-test.js b/tests/unit/routes/simulators/edit-test.js
deleted file mode 100644
index be49ba0..0000000
--- a/tests/unit/routes/simulators/edit-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:simulators/edit', 'Unit | Route | simulators/edit', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/simulators/index-test.js b/tests/unit/routes/simulators/index-test.js
deleted file mode 100644
index dfccfba..0000000
--- a/tests/unit/routes/simulators/index-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:simulators/index', 'Unit | Route | simulators/index', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/user/delete-test.js b/tests/unit/routes/user/delete-test.js
deleted file mode 100644
index 4be7323..0000000
--- a/tests/unit/routes/user/delete-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:user/delete', 'Unit | Route | user/delete', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/user/edit-test.js b/tests/unit/routes/user/edit-test.js
deleted file mode 100644
index 754cb31..0000000
--- a/tests/unit/routes/user/edit-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:user/edit', 'Unit | Route | user/edit', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/user/index-test.js b/tests/unit/routes/user/index-test.js
deleted file mode 100644
index fe27105..0000000
--- a/tests/unit/routes/user/index-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:user/index', 'Unit | Route | user/index', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/user/new-test.js b/tests/unit/routes/user/new-test.js
deleted file mode 100644
index 5032fa8..0000000
--- a/tests/unit/routes/user/new-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:user/new', 'Unit | Route | user/new', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/visualization/edit-test.js b/tests/unit/routes/visualization/edit-test.js
deleted file mode 100644
index d04fad6..0000000
--- a/tests/unit/routes/visualization/edit-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:visualization/edit', 'Unit | Route | visualization/edit', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/routes/visualization/index-test.js b/tests/unit/routes/visualization/index-test.js
deleted file mode 100644
index 8dae607..0000000
--- a/tests/unit/routes/visualization/index-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:visualization/index', 'Unit | Route | visualization/index', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
- let route = this.subject();
- assert.ok(route);
-});
diff --git a/tests/unit/serializers/application-test.js b/tests/unit/serializers/application-test.js
deleted file mode 100644
index 705e9ec..0000000
--- a/tests/unit/serializers/application-test.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('application', 'Unit | Serializer | application', {
- // Specify the other units that are required for this test.
- needs: ['serializer:application']
-});
-
-// Replace this with your real tests.
-test('it serializes records', function(assert) {
- let record = this.subject();
-
- let serializedRecord = record.serialize();
-
- assert.ok(serializedRecord);
-});
diff --git a/tests/unit/serializers/project-test.js b/tests/unit/serializers/project-test.js
deleted file mode 100644
index f0131a1..0000000
--- a/tests/unit/serializers/project-test.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('project', 'Unit | Serializer | project', {
- // Specify the other units that are required for this test.
- needs: ['serializer:project']
-});
-
-// Replace this with your real tests.
-test('it serializes records', function(assert) {
- let record = this.subject();
-
- let serializedRecord = record.serialize();
-
- assert.ok(serializedRecord);
-});
diff --git a/tests/unit/serializers/simulation-model-test.js b/tests/unit/serializers/simulation-model-test.js
deleted file mode 100644
index 32b3e21..0000000
--- a/tests/unit/serializers/simulation-model-test.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('simulation-model', 'Unit | Serializer | simulation-model', {
- // Specify the other units that are required for this test.
- needs: ['serializer:simulation-model']
-});
-
-// Replace this with your real tests.
-test('it serializes records', function(assert) {
- let record = this.subject();
-
- let serializedRecord = record.serialize();
-
- assert.ok(serializedRecord);
-});
diff --git a/tests/unit/serializers/simulation-test.js b/tests/unit/serializers/simulation-test.js
deleted file mode 100644
index 40a61cd..0000000
--- a/tests/unit/serializers/simulation-test.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('simulation', 'Unit | Serializer | simulation', {
- // Specify the other units that are required for this test.
- needs: ['serializer:simulation']
-});
-
-// Replace this with your real tests.
-test('it serializes records', function(assert) {
- let record = this.subject();
-
- let serializedRecord = record.serialize();
-
- assert.ok(serializedRecord);
-});
diff --git a/tests/unit/serializers/user-test.js b/tests/unit/serializers/user-test.js
deleted file mode 100644
index 19e4a38..0000000
--- a/tests/unit/serializers/user-test.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('user', 'Unit | Serializer | user', {
- // Specify the other units that are required for this test.
- needs: ['serializer:user']
-});
-
-// Replace this with your real tests.
-test('it serializes records', function(assert) {
- let record = this.subject();
-
- let serializedRecord = record.serialize();
-
- assert.ok(serializedRecord);
-});
diff --git a/tests/unit/serializers/visualization-test.js b/tests/unit/serializers/visualization-test.js
deleted file mode 100644
index f31eeec..0000000
--- a/tests/unit/serializers/visualization-test.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('visualization', 'Unit | Serializer | visualization', {
- // Specify the other units that are required for this test.
- needs: ['serializer:visualization']
-});
-
-// Replace this with your real tests.
-test('it serializes records', function(assert) {
- let record = this.subject();
-
- let serializedRecord = record.serialize();
-
- assert.ok(serializedRecord);
-});
diff --git a/tests/unit/services/session-user-test.js b/tests/unit/services/session-user-test.js
deleted file mode 100644
index 230acec..0000000
--- a/tests/unit/services/session-user-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('service:session-user', 'Unit | Service | session user', {
- // Specify the other units that are required for this test.
- // needs: ['service:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
- let service = this.subject();
- assert.ok(service);
-});
diff --git a/tests/unit/transforms/array-test.js b/tests/unit/transforms/array-test.js
deleted file mode 100644
index 372f9af..0000000
--- a/tests/unit/transforms/array-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('transform:array', 'Unit | Transform | array', {
- // Specify the other units that are required for this test.
- // needs: ['serializer:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
- let transform = this.subject();
- assert.ok(transform);
-});
diff --git a/todo.md b/todo.md
deleted file mode 100644
index aca9507..0000000
--- a/todo.md
+++ /dev/null
@@ -1,89 +0,0 @@
-# To-Do
- - Change password
- - Go into edit mode if visualization is empty
- - Auto-detect if simulators are running
- - Remove running socket if it's not in the updated list
-
-websocketserverip/config.json
-{
- "affinity": 1,
- "debug": 5,
- "stats": 3,
- "name": "villas-acs",
- "http": {
- "htdocs": "/villas/web/socket",
- "port": 80
- },
- "plugins": [
- "simple_circuit.so",
- "example_hook.so"
- ],
- "nodes": {
- "ws": {
- "type": "websocket",
- "unit": "MVa",
- "units": [
- "V",
- "A",
- "Var"
- ],
- "description": "Demo Channel",
- "source": {
- "simulator": "OP5600",
- "location": "ACS lab"
- },
- "series": [
- {
- "label": "Random walk"
- },
- {
- "label": "Sine"
- },
- {
- "label": "Rect"
- }
- ]
- }
- },
- "paths": [
- {
- "in": "ws",
- "out": "ws"
- }
- ]
-}
-
-
-websocketserverip/nodes.json:
-[
- {
- "name": "ws",
- "connections": 1,
- "state": 3,
- "vectorize": 1,
- "affinity": 1,
- "type": "websocket",
- "unit": "MVa",
- "units": [
- "V",
- "A",
- "Var"
- ],
- "description": "Demo Channel",
- "source": {
- "simulator": "OP5600",
- "location": "ACS lab"
- },
- "series": [
- {
- "label": "Random walk"
- },
- {
- "label": "Sine"
- },
- {
- "label": "Rect"
- }
- ]
- }
-]
diff --git a/vendor/.gitkeep b/vendor/.gitkeep
deleted file mode 100644
index e69de29..0000000