summaryrefslogtreecommitdiffstats
path: root/templates/feature/agl-html5-framework
AgeCommit message (Collapse)AuthorFilesLines
2019-12-06meta-html5-framework: rename layer and featureicefish_8.99.2icefish/8.99.28.99.2Jacobo Aragunde Pérez3-15/+0
The new name for the layer is meta-agl-profile-graphical-html5 and the feature is agl-profile-graphical-html5, which better match the other existing features like agl-profile-graphical-qt5. Usage: aglsetup.sh -m $MACHINE agl-profile-graphical-html5 Build minimal image to run HTML5 apps: bitbake agl-image-graphical-html5 Include to agl-demo-platform: IMAGE_INSTALL_append = " packagegroup-agl-appfw-html5" Change-Id: I4a4d4f85dd7fc23be51621702f842aa86a0dc3a5 Signed-off-by: Jacobo Aragunde Pérez <jaragunde@igalia.com>
2019-12-06meta-html5-framework: define html-only imageJacobo Aragunde Pérez1-0/+1
The layer now defines a standalone image agl-image-graphical-html5, containing only the minimum packages to run the web application manager (WAM). No webapps are included. It redefines packagegroups to use the more standard names agl-profile-graphical-html5 and agl-appfw-html5. It also adds a dependency on agl-profile-graphical, so we don't require users to add other features explicitly. The .bbappends for agl-demo-platform* images have been removed, so the layer doesn't depend on meta-agl-demo. We will provide image definitions for WAM + demo apps in meta-agl-demo in a later commit. To sum up, an HTML-only image can be built with: aglsetup.sh -m $MACHINE agl-html5-framework bitbake agl-image-graphical-html5 To add WAM to an agl-demo-platform image, both agl-demo and agl-html5-framework features must be enabled, and this must be added to local.conf or local.dev.inc: IMAGE_INSTALL_append = " packagegroup-agl-appfw-html5" Bug-AGL: SPEC-2322 Change-Id: I648dd9f509faf77bf0c8520c9773de073865b90e Signed-off-by: Jacobo Aragunde Pérez <jaragunde@igalia.com>
2019-07-24add markdown documentation for all machines and featuresStéphane Desneux1-0/+9
THIS IS STILL WIP - not all features/machines are described Bug-AGL: SPEC-1902 Change-Id: I1808346276628caf6ae61d5e6d7ccade39241daf Signed-off-by: Stéphane Desneux <stephane.desneux@iot.bzh>
2019-01-15Integrate Chromium and WAM recipes.Jacobo Aragunde Pérez1-0/+5
Create a new layer called meta-html5-framework. It contains the following recipes: * chromium68 to build the browser shared library and browser code. * chromium-browser-service for the browser widget. * wam for the web application manager. * wam-tinyproxy is a direct dependency of wam. Defines a new packagegroup, which is added to the agl-demo-platform image in case agl-html5-framework is configured as a feature. Bug-AGL: SPEC-1885 Change-Id: I39f01ab09e198cd139e95ff3c784af563b54329b Signed-off-by: Jacobo Aragunde Pérez <jaragunde@igalia.com> (cherry picked from commit 19e71462fc44093c6f9046e60c72adeedfca7858)
ngle */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
import Mustache from 'mustache';

var host = document.location.hostname;
var port = document.location.port;
var args = new URLSearchParams(document.location.search.substring(1));
var token = args.get("x-afb-token") || args.get("token") || "HELLO";
var afb;
var template;

function log(smgs) {
    document.getElementById('log').innerHTML += '<div>'+smgs+'</div>';
}

function getIcon(app) {
    if( app.icon.match(/^.*\.svg$/) ) {
        return '/icons/'+app.id;
    } else {
        return '/images/noicon.svg';
    }
}

function display_applications(apps) {
    var appContainer = document.getElementById('AppContainer');
    for( var i=0; i<apps.length; i++) {
        apps[i].icon = getIcon(apps[i]);
        appContainer.innerHTML += Mustache.render(template, apps[i]);
    }
}

function load_application_list() {
    var ws = new afb.ws(function() {
        var api_verb = "afm-main/runnables";
        ws.call(api_verb, {}).then(
            function(obj) {
                display_applications(obj.response);
            },
            function(obj) {
                //TODO Manage errors
                log("failure");
            }
        );
    },
    function() {
        //TODO manage errors
        log("ws aborted");
    });
}

export function launch(app) {
    var appId = app.getAttribute('app-id');
    var ws = new afb.ws(function() {
        var api_verb = "afm-main/start";
        var request = {id: appId};
        ws.call(api_verb, request).then(
            function(obj) {
                log("success: " + obj.response);
            },
            function(obj) {
                //TODO Manage errors
                log("failure");
            }
        );
    },
    function() {
        //TODO Manage errors
        log("ws aborted");
    });
}

export function init() {
    template = document.getElementById('item-template').innerHTML;
    Mustache.parse(template);

    // host: "raspberrypi3.local:31022",
    afb = new AFB({
        host: host+":"+port,
        token: token
    });
    load_application_list();
}