Giter Site home page Giter Site logo

lukaszstefanowski97 / cloudux-service-crud-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from avid-technology/cloudux-service-crud-example

0.0 1.0 0.0 466 KB

This service shows how to execute CRUD operations from avid.acs.attributes

JavaScript 100.00%

cloudux-service-crud-example's Introduction

CloudUX Service CRUD Example

Welcome to CloudUX Service CRUD Example!

Getting started

To use this application you will need following tools:

  1. running MediaCentral | Cloud UX 2018.6 machine
  2. node.js and npm
  3. proxy ball for more information check FAQ

This project has been generated by cloudux-starter-kit-service.

Before you will lunch your application you may need to change proxy Setup and change hostIp to point your machine with working MediaCentral | Cloud UX 2018.6

In project's root directory you can find project.config.json file, where you can change your project settings.

To connect with the ACS Monitor you need a proxy bal. (link is above) You will also need application id and application secret. Please paste them into project.config.json file. They are defined as you can see below:

After installing proxy ball and implementing app id and app secret please use npm install to build an environment. Type path to proxy-bal.tar file as an argument. When finished type npm start.

To make function visible in ACS Monitor you need to define it in config/service.ops.config.json file. With every change in that file you need to increment service version. You can do it in project.config.json. Otherwise the changes will not be loaded.

Here is the example of a proper function definition in service.ops.config.json. Please remember to specify HTTP method you want to use.

This service is an example which will help newcomers to understand how to communicate between services. After running the project please check if it is visible in ACS Monitor (http://yourMediacentralIP:30800/acs.html) on you machine. If everything went fine you would see the cloudux-service-crud example and all available service operations.

The picture below depicts the responsibilities of each object property defined in service.ops.config.json file.

All of the functions are defined in src/service.js file. At the beginning we need to create service instance with bal access.

Now we need to implement functions, which will allow us to communicate with attributes service. At the beginning of the each of them we define how our message will look like. They are similar in all of the functions. Delete method is an exception, we define there the array of names to be able delete more than one object at once. We also define attributes function we want to use. In case of our getDataFromAttributes it's 'fetch'. After calling a function we return an error or result.

Our postDataToAttributes function calls 'store' from attributes service. All the mechanism has not changed.

In deleteDataFromAttributes we call 'delete' function from attributes.

Attributes service does not contain update function. We implemented it by using 'fetch' (the same function that we used in getDataFromAttributes) calling post if we did not receive an error message.

We implemented connection mechanism in index.js file.

cloudux-service-crud-example's People

Contributors

lukaszstefanowski97 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.