Giter Site home page Giter Site logo

mcompastie / automation-dashboard Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ow2-proactive/automation-dashboard

0.0 2.0 0.0 17 MB

Proactive dashboard for ProActive Workflows & Scheduling

Home Page: http://proactive.activeeon.com/

JavaScript 19.92% CSS 71.82% HTML 8.26%

automation-dashboard's Introduction

ProActive Dashboard Portal

Requirements

You need npm installed, then run the following commands from the root of the repository to install the required tools and dependencies:

npm install -g grunt-cli
npm install -g bower
npm install
bower install

The dashboard subviews are private bitbucket projects that need to be automatically retrieved from Nexus repository by using the following command:

gradlew clean build

Building

To build the ProActive Dashboard, just use the following command to generate the enterprise version of the dashboard:

grunt clean build --target=enterprise

Or use this command instead to build the community version:

grunt clean build --target=community

If no target is specified, grunt will build the enterprise version by default. Then, copy the dist/ folder in scheduling/dist/war/ and rename it "automation-dashboard".

Once scheduling/bin/proactive-server is started, the dashboard is available at:

localhost:8080/automation-dashboard

What does building do with subviews?

With the following tasks, grunt injects subviews in the dashboard, depending on the requested VERSION :

  • replace:
    • in app/templates_versions/VERSION/config.js, it sets, for each URL, which view should be displayed
    • in app/templates_versions/common/navigation.html, it adds item for the navigation menu (left panel)
    • in app/templates_versions/VERSION/app.js, it adds modules needed for subviews
    • in app/templates_versions/VERSION/index.html, it adds scripts needed for subviews
    • when all files are replaced accordingly to the requested version, they are copied into the app/ folder:
      • app/templates_versions/VERSION/config.js to app/scripts/config.js
      • app/templates_versions/VERSION/app.js to app/scripts/app.js
      • app/templates_versions/VERSION/index.html to app/index.html
      • app/templates_versions/common/navigation.html to app/views/common/navigation.html
  • jsbeautifier: re-indents all these files that were not well indented with generated code.
  • copy:communitySubviews: copies the community subviews html content (or the unavailable alternative pages if necessary) into the final dist/ folder.
  • copy:enterpriseSubviews: copies the enterprise subviews html content (or the unavailable alternative pages if necessary) into the final dist/ folder.

Development

The dashboard has 2 versions available:

  • community
  • enterprise

Both versions have specificies that are described in the app/templates_versions/ folder. Each of those versions is composed of the following files:

  • app.js
  • config.js
  • index.html
  • subviews.json

When building the dashboard, grunt will first copy those files (depending on the selected version) into the app/ folder before running the build process, so the 3 following files should NOT be created manually into the app/ folder:

  • app/index.html
  • app/scripts/app.js
  • app/scripts/config.js

Any modification to those files will need to be done from the app/templates_versions/VERSION folder instead. What you want to modify is between <!-- beginSubviewsScripts--> and <!-- endSubviewsScripts-->, you need to change the way it is generated in Gruntfile.js (replace task) and enterprise/community.json. Otherwise, you can modify enterprise/community sources files.

To add/remove a subview, you need to change app/templates_versions/VERSION/subviews.json. If you want a view to be in the portal but with its content not available (visible in the navigation panel but "not available" page displays when you click on it), you need to add it in theses files with the attribute isAvailable set to false. If a view shouldn't be displayed at all, just remove it from the 2 JSON files.

Views will be displayed in the navigation panel in the same order as they are given in app/templates_versions/VERSION/subviews.json. The order of jsFiles attribute values is also very important as scripts will be injected in index.html in the same order.

Images used in the view must be put in images attribute.

All attributes are mandatory, except initFunction and images, which can be omitted.

Subviews project

Each subview is defined in a bitbucket repository and then imported in this project. The idea behind for each subview project is building zip archive of subview and publishing it to Nexus repository. Every subview contains gradlew build file to build and publish the zip archive. In gradle building procedure of automation-dashboard project there are tasks to download zip archives for each subview and extract subview's sources. After building this project all subviews will be present in automation-dashboard. So it should be enough just to do gradle build for each subview and then build automation-dashboard, that will compose all subviews.

Local building and testing subviews project

In order to test subviews and automation dashboard locally, it's required not to publish the subviews archives to main repository, but to local repository of machine. Each subview project should be build with next command:

gradlew clean build install

Then automation-dashboard project can be build with all subviews from local repository with next command:

gradlew clean build -Plocal

Local building and testing of the automation-dashboard project locally

There exists another way to update the subviews locally without the need of publishing the changes to main repositories. After cloning the automation-dashboard project locally, you build it using this command:

grunt clean build

You can then make your changes and update the subviews that appear as subfolders in the automation-dashboard.

For a fast building of the automation-dashboard locally, you can use this command:

grunt clean build

This command creates a /dist folder that you need to copy under scheduling/dist/war. Rename the copied folder to automation-dashboard, and launch the scheduling server as detailed in https://github.com/ow2-proactive/scheduling

automation-dashboard's People

Contributors

chloegugli avatar carolinepacheco avatar zeineb avatar marcocast avatar mbenguig avatar paraita avatar andrewssobral avatar amouhoub avatar aminelouati avatar imenbizid avatar maelaudren avatar cdiop avatar tobwiens avatar shatalovyaroslav avatar luispinedamx avatar gparanthoen avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

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

  • D3 photo D3

    Data-Driven Documents codes.