summaryrefslogtreecommitdiffstats
path: root/afb-client/app/Frontend/widgets
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2015-12-16 21:38:04 +0100
committerFulup Ar Foll <fulup@iot.bzh>2015-12-16 21:38:04 +0100
commit98522d2a6ce7c7a709728872ed892970d0a1df7b (patch)
tree20b4f23bf18823676a252b2ca176862088eb36dc /afb-client/app/Frontend/widgets
parentfbdd26b4a4aa8eb3d83333fe44e93590bc174e11 (diff)
Added AFB monitoring and token auto-refresh
Diffstat (limited to 'afb-client/app/Frontend/widgets')
-rw-r--r--afb-client/app/Frontend/widgets/Notifications/Notifications.scss12
-rw-r--r--afb-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js21
2 files changed, 20 insertions, 13 deletions
diff --git a/afb-client/app/Frontend/widgets/Notifications/Notifications.scss b/afb-client/app/Frontend/widgets/Notifications/Notifications.scss
index 5a4adc1..fb740b7 100644
--- a/afb-client/app/Frontend/widgets/Notifications/Notifications.scss
+++ b/afb-client/app/Frontend/widgets/Notifications/Notifications.scss
@@ -46,10 +46,18 @@ tip-modal {
}
}
+token-refresh {
+ @include ibz-button(grey,1rem)
+ i {margin-left: .5rem;}
+ margin-right: 1rem;
+}
+
token-refresh.online {
- color: blue;
+ color: #0066cc;
+ i {color: lime;}
}
token-refresh.offline {
- color: red;
+ color: #ff00ff;
+ i {color: red;}
}
diff --git a/afb-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js b/afb-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js
index 1671748..2b1e9db 100644
--- a/afb-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js
+++ b/afb-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js
@@ -25,11 +25,10 @@
'use strict';
var template =
- '<div class="afb-monitor">'
- + '<span class="afb-refresh-token" ng-click="getping" >afb://{{hostname}}:{{httpdport}}</span>'
- + '<i class="{{icon}}"></i>'
- + '</div>'
- ;
+ '<div class="afb-monitor" ng-click="getping()">' +
+ '<span class="afb-refresh-token" >afb://{{hostname}}:{{httpdport}}</span>' +
+ '<i class="{{icon}}"></i>' +
+ '</div>';
// scope module is load statically before any route is cativated
@@ -39,7 +38,7 @@ angular.module('TokenRefresh', [])
function mymethods(scope, elem, attrs) {
- scope.status;
+ scope.status=false;
scope.online = function () {
elem.addClass ("online");
@@ -54,10 +53,10 @@ angular.module('TokenRefresh', [])
// Check Binder status
scope.getping = function() {
- var handler = $http.get(ConfigApp.api.ping+'xx?token='+ ConfigApp.session.token);
+ var handler = $http.post(ConfigApp.session.ping+'?token='+ ConfigApp.session.token);
handler.success(function(response, errcode, headers, config) {
if (!scope.status) {
- Notification.success ({message: "AFB Back to Live", delay: 3000});
+ Notification.success ({message: "AppFramework Binder Back to Live", delay: 3000});
scope.online();
}
scope.status = 1;
@@ -65,7 +64,7 @@ angular.module('TokenRefresh', [])
handler.error(function(response, errcode, headers) {
if (scope.status) {
- Notification.warning ({message: "AFB Lost", delay: 5000});
+ Notification.warning ({message: "AppFramework Binder Lost", delay: 5000});
scope.offline();
}
scope.status = 0;
@@ -77,8 +76,8 @@ angular.module('TokenRefresh', [])
// Check Binder status
scope.refresh = function() {
- var handler = $http.get(ConfigApp.api.refresh+'?token='+ ConfigApp.session.token);
- $timeout (scope.refresh, ConfigApp.session.timeout *800);
+ var handler = $http.post(ConfigApp.session.refresh+'?token='+ ConfigApp.session.token);
+ $timeout (scope.refresh, ConfigApp.session.timeout *250);
};
scope.icon = attrs.icon || "fi-lightbulb";
">require conf/include/agl_rcar-nogfx.inc # Enable AGL virtualization features MACHINE_FEATURES:append = " agl-egvirt" # Enable Gfx Pkgs MACHINE_FEATURES:append = " gsx" MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" # for Wayland/Weston PREFERRED_PROVIDER_virtual/libgles1 = "" PREFERRED_PROVIDER_virtual/libgles2 = "virtual-gles-user-module" PREFERRED_PROVIDER_virtual/egl = "virtual-gles-user-module" PREFERRED_PROVIDER_virtual/libgl = "" PREFERRED_PROVIDER_virtual/mesa = "mesa" PREFERRED_PROVIDER_libgbm = "libgbm" PREFERRED_RPROVIDER_libgbm-dev = "libgbm" PREFERRED_RPROVIDER_libomxil = "omx-user-module" PREFERRED_PROVIDER_virtual/libomxil = "omx-user-module" # Add for gstreamer plugins ugly LICENSE_FLAGS_WHITELIST = "commercial" MACHINE_FEATURES:append = " multimedia" DISTRO_FEATURES:append = " use_eva_pkg" #DISTRO_FEATURES:append = " h265dec_lib mpeg2dec_lib" DISTRO_FEATURES:append = " h264dec_lib h264enc_lib aaclcdec_lib aaclcdec_mdw" # Mask out meta-renesas-rcar-gen3's tweaks to weston-init, as they do # not seem necessary for anything in AGL, and the addition of # dbus.service and multi-user.target dependencies to the weston systemd # unit that is done is problematic with respect to potentially blocking # weston if any user units like application framework "platform" # services fail. They also likely affect boot up speed with respect to # getting weston started. There is no clear rationale expressed in the # meta-renesas-rcar-gen3 commit history for the extra dependencies, and # testing shows no issues on H3ULCB when not having them. BBMASK += "meta-rcar-gen3/recipes-graphics/wayland/weston-init.bbappend" # Add graphics and decoder drivers to packagegroup-machine-base # recommendation. MACHINE_EXTRA_RRECOMMENDS:append:rcar-gen3 = " \ kernel-module-pvrsrvkm \ kernel-module-vsp2 \ kernel-module-vspm \ kernel-module-vspm-if \ omx-user-module \ " # DISABLE LTTNG-MODULES LTTNGMODULES:forcevariable = "" LTTNGTOOLS:forcevariable = "" LTTNGUST:forcevariable = "" # broken recipe BBMASK += "meta-rcar-gen3/recipes-connectivity/linuxptp/linuxptp_2.0.bbappend"