Giter Club home page Giter Club logo

fabric8-planner's Introduction

Fabric8 Planner

Jenkins npm Codecov.io Semantic Release

Overview

Fabric8 Planner is a task planner and the issue tracker front-end for openshift.io. It uses the Fabric8 Work Item Tracker as the back-end.

The Planner project provides a component library which is used by other applications to provide a task planning front-end.

The Planner is available as an npm package. It can not be run by itself as it is an Angular component library. However, for development and testing purpose, a minimal runtime environment is available in the runtime directory.

You can run Planner either as a minimal Standalone component or as an Integrated component using an external webapp like the fabric8-ui. It is recommended to use the Integrated component to build and run Planner.

Quickstart

The Planner can be quickly built using the launcher script.

You can use the launcher script to build the Planner either as an Integrated component using an external webapp like the fabric8-ui or as a Standalone component.

Integrated mode

Note
The Integrated mode is the default mode for building Planner using this script.
Prerequisite
  • Ensure that Node.js (v8.3.0) and npm are installed in your system.

Procedure
  1. To build and run the Planner with an integrated environment such as fabric8-ui (or an external web app) use:

    $ scripts/run-planner.sh

    This script supports the following flags:

    • Use -r - to re-install everything

    • Use -s - to start Planner in standalone mode using the runtime

    • Use -f - to set the path to Fabric8 UI directory (This requires path argument)

    • Use -p - to set the path to the Planner directory (This requires the path argument)

    For example:

    • Use scripts/run-planner.sh -r -s to re-install planner and run it in standalone mode.

    • Use scripts/run-planner.sh -r -f /home/User/fabric8-ui if you wish to set the platform path. By default, the Fabric8 UI path is assumed to be Planner_Path/..

  2. Access the service on: http://localhost:3000

Standalone mode

The Standalone Mode uses prod-preview backend by default.

  1. To build and run a standalone, minimal runtime implementation of the Planner using the prod-preview database use:

    $ scripts/run-planner.sh --standalone

    Or

    $ scripts/run-planner.sh -s
  2. Access the service on http://localhost:8080

  3. Get an auth token:

    1. Navigate to http://api.prod-preview.openshift.io/api/login/authorize?redirect=https://api.openshift.io/api/status

    2. Log in with your OSIO user name (for example, <username>+[email protected]). The part after "?token_json" in the resulting url is the token. Copy this token.

  4. Use the token to log in as: localhost:8080/?<the token>

  5. Navigate to prod-preview and get a space ID you want to use from the url.

  6. Use that spaceId to get to a space on your local instance: http://localhost:8080/plan/list?q=(space:<spaceId>%20$AND%20typegroup.name:Scenarios)&showTree=true

Optionally, you can change the default prod-preview backend and use external web apps by setting the environment variables for the services, for example:

  • To use Fabric8 wit as the backend use the environment variable: FABRIC8_WIT_API_URL

  • To use Fabric8 Auth as the backend use the environment variable: FABRIC8_AUTH_API_URL

Documentation

The following documentation is available in the docs directory:

Contributing

All contributions are welcome, if you want to contribute to this project, ensure you follow the Contribution Guidelines.

fabric8-planner's People

Contributors

aslakknutsen avatar christianvogt avatar corinnekrych avatar debloper avatar dgutride avatar divyanshigupta avatar dlabrecq avatar fabric8cd avatar harrybabu avatar hectorj2f avatar jarifibrahim avatar jaseemabid avatar joshuawilson avatar kbsingh avatar kwk avatar ldimaggi avatar michaelkleinhenz avatar mindreeper2420 avatar naina-verma avatar nainav avatar nimishamukherjee avatar pmuir avatar pranavgore09 avatar preeticp avatar raunak1203 avatar rawlingsj avatar sahil143 avatar sanbornsen avatar smahil avatar vikram-raj avatar

Stargazers

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

Watchers

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

fabric8-planner's Issues

Mobile (Phone) First - List View

As a user, I want to be able to view the items in my list on my mobile (phone type TBD) device, so that I can see all the issues that exist, for the MVP, while away from my laptop. This view will need to progressively scale up to a tablet and then desktop device (separate stories to follow).

Reference:

https://redhat.invisionapp.com/share/KY8LXF5QV

InVision Prototype:

Use Observables instead of Promises to fetch cards

Hi,

I was trying to connect to the UI to the core using the core's REST API endpoint. That is when I stumpled over the CardService.getCards() method which returns a Promise<Card[]>. There seem to be quite some disadvantages when using a Promise compare to an Observable.

Consider these points (taken from here):

  1. Don’t hit the search endpoint on every key stroke.
    Treat the search endpoint as if you pay for it on a per-request basis. No matter if it’s your own hardware or not. We shouldn’t be hammering the search endpoint more often than needed. Basically we only want to hit it once the user has stopped typing instead of with every keystroke.
  2. Don’t hit the search endpoint with the same query params for subsequent requests.
    Consider you type foo, stop, type another o, followed by an immediate backspace and rest back at foo. That should be just one request with the term foo and not two even if we technically stopped twice after we had foo in the search box.
  3. Deal with out-of-order responses.
    When we have multiple requests in-flight at the same time we must account for cases where they come back in unexpected order. Consider we first typed computer, stop, a request goes out, we type car, stop, a request goes out. Now we have two requests in-flight. Unfortunately the request that carries the results for computer comes back after the request that carries the results for car. This may happen because they are served by different servers. If we don’t deal with such cases properly we may end up showing results for computer whereas the search box reads car.

This 7 minute video gives a nice overview of why wants to use Observables over Promises: https://egghead.io/lessons/rxjs-rxjs-observables-vs-promises

I understand that his requires some changes to how card objects get filtered and passed around.

Use of nodejs 6 when rhel/centos only have nodejs4

how do we handle that nodejs is not available on rhel in the version we use ?

This issue is just to track what we know about the situation - not to say we have use nodejs4, we got options.

@kbsingh did you have some context/info on what exactly is available ?

@joshuawilson is nodejs 6 a hard requirement ?

Unfiy the developer and production configs

There should'nt be a seperate config set for development v/s production configs and machine setup - most of the content needed in developer only stages should be abstracted out into either a run time config or collected from defaults at build time.

site specific content should be stripped out in a way that the CI infra, the pre-prod infra, the prod infra and the developer environ can influence them opportunisitically.

URL is part of UX

There is no consistency in the URL design in the router. These are the URL end points in the code: login, work-item-list, board, quick-add/:id, detail/:id

For some inspiration of URL design, look at Github issue tracker where this issue is reported.

Can not update work item state from the list twice or more without refreshing.

What -

  • Open the work item list.
  • Open developer console to see the network requests.
  • Click on the work item state.
  • Change it to another.
  • Goes through.
  • Now again click on the state of the same work item.
  • Try changing it to something else.
  • It fails with a 500.

Fix -

  • On the first change we are not updating the version of the work item.
  • Therefore the failure response returns a version conflict error.

Support for HTML5 (History API) pushState in the backend

For now I have send a pull request (#41) to disable history API and use hash based routing.

But for a better URL navigation, we need to support History API.

Ref: https://developer.mozilla.org/en-US/docs/Web/API/History_API#The_pushState()_method

The index.html should be the default target for all request in the web app. We need a custom Nginx configuration to support this.

Ref. http://stackoverflow.com/questions/13812550/configuring-nginx-for-single-page-website-with-html5-push-state-urls

BTW, if we are going to implement #44 , I think the configuration will become much saner.

Rename all the selectors in components as the class name.

  • Two component class having same selector would throw an error. To be on safe side, we should always name the selectors as the class name, that way the chances of such conflict will be minimized.
  • Also instead of using declarations at app.module.ts we can use directives in main components to include sub components. That will also help us to minimize the chances of conflict.

The error this problem produces, doesn't have any meaningful message. So, we need to be careful. This looks like a design problem of Angular2. I hope we never run across with a conflict between a selector from global module and local module. I couldn't find a proper solution yet, please post here if anyone can.

Unify what deps should be used in package.json

Right now, various dependencies and dev dependencies are specified using both exact version and using caret:

"karma-mocha": "1.0.1",
"karma-phantomjs-launcher": "^1.0.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "1.7.0",

There are two ways how to unify that:

  1. use only specific version (e.g. 1.0.1), this approach is easier but requires more commits for deps upgrading
  2. use only caret prefix (e.g. ^1.0.1), this way some deps will be auto-updated, downside is that people might use different versions during development and build is not reproducible after some time, this approach should be coupled with using shrinkwrapping (https://docs.npmjs.com/cli/shrinkwrap)

Deployment acceptance criteria should be testable

We need a base set of acceptance tests to run against the app for use in the build, release process.

These tests would run after the app is built and pushed into the relevant pod, as a way to verify that the app is now promoteable to productoin loads.

Can we add id's to a workite,'s view and delete buttons?

Having the id's added to the workitem lists (http://localhost:8088/#/work-item-list) is a big help - thx!

Can we also add id's for the individual details and delete buttons? It;s not difficult to access the buttons relative to their parent's id's:

workItemList_ViewItemDetailBtn = .//[@id='workItemList_OuterWrap_0']/div/div[1]/button[1]
workItemList_deleteListItemBtn = .//
[@id='workItemList_OuterWrap_0']/div/div[1]/button[2]

But - it would be much easier to access the buttons could be accessed directly through their id's - for example, by embedding the parent's id digit in the button id. Thx!

View Details Delete

FTBS for prod

the present codebase does not build for prod deployments.
$ git clone https://github.com/almighty/almighty-ui
$ export API_URL="http://demo.api.almighty.io/api/"
$ export PUBLIC_PATH="http://demo.almighty.io/"
$ npm install
$ npm run build:prod
is expected to produce a working app, however fails with :

npm ERR! Linux 3.10.0-327.18.2.el7.x86_64
npm ERR! argv "/usr/local/node/node-v6.3.1-linux-x64/bin/node" "/usr/local/node/node-v6.3.1-linux-x64/bin/npm" "run" "build:prod"
npm ERR! node v6.3.1
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build:prod: webpack --config config/webpack.prod.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build:prod script 'webpack --config config/webpack.prod.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the almighty-ui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack --config config/webpack.prod.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs almighty-ui
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls almighty-ui
npm ERR! There is likely additional logging output above.
npm ERR! Linux 3.10.0-327.18.2.el7.x86_64
npm ERR! argv "/usr/local/node/node-v6.3.1-linux-x64/bin/node" "/usr/local/node/node-v6.3.1-linux-x64/bin/npm" "run" "build:prod"
npm ERR! node v6.3.1
npm ERR! npm v3.10.3
npm ERR! path npm-debug.log.3697563534
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open

npm ERR! enoent ENOENT: no such file or directory, open 'npm-debug.log.3697563534'
npm ERR! enoent ENOENT: no such file or directory, open 'npm-debug.log.3697563534'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

docker-compose up fails

Looks like it's from the renaming of Dockerfile:

dropbox/dev/almighty-ui  master ✔                                                                                                                                                                                                                                            5d  
▶ docker-compose up 
Creating network "almightyui_default" with the default driver
Pulling db (centos/postgresql-95-centos7:latest)...
latest: Pulling from centos/postgresql-95-centos7
3d8673bd162a: Already exists
a3ed95caeb02: Pull complete
5c79d4aadf0c: Pull complete
69056b94959f: Pull complete
Digest: sha256:f76760462eba4e1f7f88d5868ccf9ae4ea39d201042d451063bf5848f32afbe7
Status: Downloaded newer image for centos/postgresql-95-centos7:latest
Creating almightyui_db_1
Pulling core (almightycore/almighty-core:latest)...
latest: Pulling from almightycore/almighty-core
3d8673bd162a: Already exists
219d25306236: Pull complete
1535dcaab3de: Pull complete
Digest: sha256:c8134e550dfe9872e68cb2bfc9332cb7bf4a80be4c439cc9bc013d565ae8a490
Status: Downloaded newer image for almightycore/almighty-core:latest
Creating almightyui_core_1
Building ui
ERROR: Cannot locate specified Dockerfile: Dockerfile

Seamless integration of Patternfly/js Components in UI

We have to find a way to use the Patternfly/Bootstrap JS code in UI. Many widgets we plan to use are utilizing this code (ex. also "basic stuff" like opening/closing dropdowns). At the same time, we have to make sure the code works nicely with Angular 2 and our implementation of it.

Implement unique id values for UI elements, to facilitate easier UI test automation

In building a (very) basic POC UI automation test (see: #17) I noticed that the UI elements are not defined with unique IDs. as a result, the POC test relies on brittle xPath data to locate UI elements. For example:

public SelenideElement saveButton() {
return $(byXpath("//my-app/work-item-list/div/div/work-item-detail/div/button[2]"));
}

Having unique IDs for elements would make the test automation much easier and the tests more maintainable. Thanks!

Write tests

We should test the code, ideally via unit tests at build time, and some integration tests to validate the api version matching /expected in the build, and finally deployment acceptance tests.

Rendering problems on mobile devices (iPad, Nexus 5, and iPhone5)

I noticed some odd renderings on mobile devices:

Sometimes the list view items overlap each other, sometimes space is wasted and sometimes the quick add form items are stacked vertically instead of horizontally.

I now, that we're in an early stage but I just wanted to guys let you know this.

iPad

Portrait

screenshot from 2016-09-02 13-04-08

Landscape

There is too much space wasted on the right in iPad Landscape mode:

screenshot from 2016-09-02 13-04-18

Nexus 5

Portrait

screenshot from 2016-09-02 13-04-36

Landscape

This looks rather good I think:

screenshot from 2016-09-02 13-04-49

iPhone 5

Portrait

screenshot from 2016-09-02 13-04-59

Landscape

screenshot from 2016-09-02 13-05-05

Check npm dependencies for build warnings

Currently, the build outputs some warnings that should be examined:

npm WARN deprecated [email protected]: cross-spawn no longer requires a build toolchain, use it instead!
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

Create a link between WorkItems

We need some way to visually link in a parent / child way workitems.

Experience 1603E131
A user with appropriate privileges obtains a definition file (for example via a web interface or a command line), edits the definition file which describes a work item link type between two work item types, and, associates it with the project (for example by uploading it via a web browser or using the command line). A default definition file is provided out of the box, and can be modified via this process.. Each link type must describe both the forward and reverse relationship (e.g. Parent/Child, Successor/Predecessor, Tested By/Tests, etc.) and also must also be one of four topologies: Network (undirected; circular relationships possible); Directed Network (directed; circular relationships possible); Dependency (directed; circular relationships prohibited); Tree (directed; circular relationships prohibited; one-to-many).

-- this is not end-user functionality for Pizza the Hutt.

Add i18n support

Tod said at the Bangalore meeting, that the UI should have i18n support in place, even if we only support one language (English) for the forseeable time. We need to evaluate i18n solutions, choose one and integrate it in our project.

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.