summaryrefslogtreecommitdiffstats
path: root/afm-client/app/Frontend/etc/AppConfig.js
blob: 076cd91001ea0139348ffbff159d5a36d51efebe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
(function () {
    'use strict';

    // _all modules only reference dependencies
    angular.module('AppConfig', [])
    
            // Factory is a singleton and share its context within all instances.
            .factory('AppConfig', function (urlquery) {

                // console.log ("URL="+ $location.url() + " Query=" + location.href+ " window=" + document.referrer);

                var myConfig = {
                    
                    paths: { // Warning paths should end with /
                        image : 'images/',
                        icons : 'images/icons/',
                        avatar: 'images/avatars/',
                        audio : 'images/audio/',
                        appli : 'images/appli/'
                    },
                    
                    myapi: { // Warning paths should end with /
                       token : '/api/myplugin/xxxx'
                    },
                    
                    session: { // Those data are updated by session service
                       create  : '/api/token/create',
                       refresh : '/api/token/refresh',
                       check   : '/api/token/check',
                       reset   : '/api/token/reset',
                       ping    : '/api/token/check',
                       initial : urlquery.token || '123456789',  // typical dev initial token
                       timeout : 3600,         // timeout is updated client sessin context creation
                       pingrate: 60,           // Ping rate to check if server is still alive
                       uuid    : '',           // uuid map with cookie or long term session access key
                       token   : ''            // will be returned from authentication    
                    }
                };

                return myConfig;
            })

            // Factory is a singleton and share its context within all instances.
            .factory('AppCall', function ($http, AppConfig) {
                var myCalls = {
                    get : function(plugin, action, query, callback) {
                        query.token = AppConfig.session.token; // add token to provided query                        
                        $http.get('/api/' + plugin + '/' + action , {params: query}).then (callback, callback);
                    }

                };
                return myCalls;
            });
    
 
})();
intel" path="meta-intel" remote="yocto" revision="718bb384942675437c081f6795da7f421da1fee6" upstream="rocko"/> <!-- i.MX6 / e.g. wandboard specific things --> <!-- <project name="Freescale/meta-freescale" path="meta-freescale" remote="github" revision="06178400afbd641a6709473fd21d893dcd3cfbfa" upstream="pyro"/> <project name="Freescale/meta-freescale-3rdparty" path="meta-freescale-3rdparty" remote="github" revision="35badbde05d4f10d4faeefc30bc126b5bd228e2e" upstream="pyro"/> <project name="Freescale/meta-freescale-distro" path="meta-freescale-distro" remote="github" revision="cd5c7a2539f40004f74126e9fdf08254fd9a6390" upstream="pyro"/> --> <!-- consolidate on meta-freescale from git.yoctoproject.org --> <project name="meta-freescale" path="meta-freescale" remote="yocto" revision="a4158e3425a79720ddc4c02e76251d567bdceb51" upstream="rocko"/> <!-- Boundary devices bsp layer --> <project name="boundarydevices/meta-boundary" path="meta-boundary" remote="github" revision="f96f41b2e5beda2b51acb702d082568898b36a68" upstream="rocko"/> <!-- ti vayu / jacinto 6 / DRA7 --> <project name="meta-ti" path="meta-ti" remote="yocto" revision="ed83a43c6a76875ee5f0388b3b60a28f2a373a10" upstream="rocko"/> <!-- iotivity --> <project name="meta-oic" path="meta-oic" remote="yocto" revision="6e831e4bcdfa6ab8c26eb4fca4bdc98faf028818" upstream="1.2.1"/> <!-- rpi 2, 3 and 3 B+ --> <project name="meta-raspberrypi" path="meta-raspberrypi" remote="yocto" revision="8e4c537d84fdde8e3b4642d0dda2c0f4af76d52f" upstream="rocko"/> <!-- DragonBoard 410c specific things --> <project name="meta-qcom" path="meta-qcom" remote="yocto" revision="68d67447ec83de4784203afa016c49538165532d" upstream="rocko"/> <!-- Altera SOCFPGA platform --> <!-- pinned to version from master until branch for morty exists --> <!-- https://github.com/kraj/meta-altera --> <project name="kraj/meta-altera" path="meta-altera" remote="github" revision="2fdcab3bf66f771bea9a3877bddb825195d56e0f" upstream="rocko"/> <!-- Image Security Analysis FrameWork (isafw) --> <!-- try master or disable --> <project name="01org/meta-security-isafw" path="meta-security-isafw" remote="github" revision="489abdc65cefb566d696c8b218aa0b9b99a350ae" upstream="master"/> <!-- Security layer --> <project name="meta-security" path="meta-security" remote="yocto" revision="8f6969a775fa6afbf553e72ba83e71197780b2d8" upstream="master"/> <!-- SmartDeviceLink layer --> <project name="phongt/meta-sdl" path="meta-sdl" remote="github" revision="60c9fe8a4a9c6ca95f222685f8d6248f16236f2a" upstream="release/4.4.0"/> </manifest>