Giter VIP home page Giter VIP logo

gadget-cq-basic's Introduction

Basic ClearQuest gadget Build Status Coverage Status

A basic OpenSocial Gadget that uses ClearQuest (CQ) OSLC API

Intro

This is a project meant to be used as a starting point for creating an opensocial gadget that can interact with ClearQuest using OSLC API.

This project was bootstrapped with Web app generator.

Before following the below steps, please refer to Getting started with OpenSocial gadget development to make sure you are ready to follow the below steps.

Steps

First install Node

Then fork and clone this repository on your machine

Then open a command prompt to switch to the directory containing the repository that you cloned in the previous step.

Now install Node dependencies, this may take a few minutes.

npm install

Then install frontend dependencies

bower install

Run gulp serve to preview and watch for changes

gulp serve

You can now access the gadget from http://localhost:9000.

Run gulp serve:test to run the tests in the browser

gulp serve:test

Run gulp to build your webapp for production

gulp

Run gulp serve:dist to preview the production build

gulp serve:dist

To add this gadget to the dashboards

  • Goto the Add Gadget section and specify the URL to the gadget.xml file served by this application, e.g. http://localhost:9000/gadget.xml
  • Create an OAuth friend in the dashboards Administration section to establish friendship between ClearQuest and Dashboards as this gadget uses OAuth as the authentication mechanism while communicating with ClearQuest.
  • Add the gadget on a page in your dashboard
  • For more details on how to follow the above steps, refer to the Devops Dashboards doucmentation
  • If you change the host/port, make sure you edit the gadget.xml and App.js file accordingly.

It contains the bolierplate code that you are most likely going to need to write any gadget for ClearQuest. Whenever a user accesses any CQ gadget for the first time, he will need to login to CQ and then select the CQ user db that he wants to work with. Also since it involves sending requests to CQ over network and then waiting for the response, we also need to show a loading message to indicate that the gadget is waiting for loading something. This gadget provides these basic functionalities out of the box so that you can directly start writing the core functionality. Below is the description about these out of the box functionalities provided by this gadget:

  1. OAuth based authentication with CQ: This gadget contains the necessary code that is required to let you login to CQ using OAuth. However, before you can login to CQ, you need to establish OAuth friendship of the DevOps Dashboards with CQ and to do that you need to add an OAuth friend entry for your CQ deployment in the Administration section of the DevOps Dashboards. Refer to section 7. OAuth Friends in DevOps Dashboards regarding the details on how to add an OAuth friend. The code that handles the login part is present in
  • gadget-cq-basic\app\scripts\cqutil.js: makeRequest method
  • gadget-cq-basic\app\index.html: loginMessage div
  1. UI for selecting CQ user db: Renders a list of the available CQ servers (schema repositories) that have OAuth friendship with Dashboards as well as the list of user dbs for the selected schema repository. The code that handles it is located in:
  • gadget-cq-basic\app\index.html: servers-container and databases-container div elements
  • gadget-cq-basic\app\scripts\cqutil.js: fetchOAuthFriends, loadDatabases, handleLoadDatabases, handleOAuthFromServer methods

Refer to cq-utils API documentation for a set of utility methods that help consume the ClearQuest OSLC API

References

gadget-cq-basic's People

Contributors

navngoyahcl avatar nandeeshs avatar

Watchers

James Cloos 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.