Web application as service

Updated

Define my application as a service

  1. Open Ingeweb
  2. Go to Configuration/Weblets
  3. Services section > Create a Web Service
  4. Refer to IngeWeb internal HELP for more details

Create an application as a service


app.wdService = tetra
      .waas('ingenico.webos.WebDesktop');

  app.wdService.sendIdleState = function(state){
      app.wdService.sendEvent('IdleStateEvent',{
          idle_state: state
      });
  };

  app.wdService
      .on('closeNotification',function(data){

          data = JSON.parse(data.data);

          appModel.notifications(appModel.notifications().filter(function(notification){
              return notification.tag !== data.tag;
          }));
          this.sendResponse();

          m.redraw();
      })
      .on('getLayout', function () {
          this.sendResponse({layout: JSON.stringify(app.config.SettingsHomePage.data)});
      })
      .on('getRemainingKeys', function () {
          this.sendResponse({keys: JSON.stringify(stackedKeys)});
      })
      .on('notification', function (data) {
          data = JSON.parse(data.data);
          appModel.addNotification(data);
          this.sendResponse();
          m.redraw();
      })
      .on('subscribeIdleStateNotification', function () {
          var idle_state = (m.route() === '/' && !document.hidden) ? true : false;
          this.sendResponse({
              idle_state: idle_state
          });
      })
      .start();

Workflow

  1. Code your JavaScript WaaS using TetraJS
  2. Register your weblet as a WaaS creating the service description into IngeWeb in order to be enabled the service in the terminal
  3. Package your application
  4. Install your application

0 comments

Please sign in to leave a comment.