<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    I get the modification times of the files by the date command:<br>
    <br>
    <tt>CPPFLAGS += -DMTIME_ASSETS_SCRIPT_JS=$(shell date +%s -r
      $(COMPONENT_PATH)/assets/script.js.gz 2>/dev/null)</tt><br>
    <br>
    Can you please check what <br>
    <br>
    <tt>date +%s -r somefile</tt><br>
    <br>
    outputs on your machine?<br>
    <br>
    To build, replace the lines in component.mk by fixed numbers, i.e.<br>
    <br>
    <tt>CPPFLAGS += -DMTIME_ASSETS_SCRIPT_JS=1517144892</tt><tt><br>
    </tt><tt>CPPFLAGS += -DMTIME_ASSETS_STYLE_CSS=1517162015</tt><br>
    <br>
    I'll look for another method to get the file dates during build.<br>
    <br>
    Regards,<br>
    Michael<br>
    <br>
    <br>
    <div class="moz-cite-prefix">Am 28.01.2018 um 20:37 schrieb Geir
      Øyvind Vælidalo:<br>
    </div>
    <blockquote type="cite"
      cite="mid:EAB68029-6C64-4C2F-A566-5FF86E9067DE@validalo.net">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      Nice! Look forward to test this, but I get this errors:
      <div class=""><br class="">
      </div>
      <div class="">
        <div style="margin: 0px; font-stretch: normal; line-height:
          normal; font-family: Menlo; background-color: rgb(255, 255,
          255);" class=""><span style="font-variant-ligatures:
            no-common-ligatures" class=""><b class="">/Users/goev/Prosjekter/ovms3/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/ovms_webserver/src/web_framework.cpp:</b>
            In static member function '<b class="">static void
              OvmsWebServer::HandleAsset(PageEntry_t&,
              PageContext_t&)</b>':</span></div>
        <div style="margin: 0px; font-stretch: normal; line-height:
          normal; font-family: Menlo; background-color: rgb(255, 255,
          255);" class=""><span style="font-variant-ligatures:
            no-common-ligatures" class=""><b class="">/Users/goev/Prosjekter/ovms3/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/ovms_webserver/src/web_framework.cpp:359:35:</b>
          </span><span style="font-variant-ligatures:
            no-common-ligatures; color: #c33720" class=""><b class="">error:
            </b></span><span style="font-variant-ligatures:
            no-common-ligatures" class="">expected primary-expression
            before '<b class="">;</b>' token</span></div>
        <div style="margin: 0px; font-stretch: normal; line-height:
          normal; font-family: Menlo; background-color: rgb(255, 255,
          255);" class=""><span style="font-variant-ligatures:
            no-common-ligatures" class="">     mtime =
            MTIME_ASSETS_STYLE_CSS;</span></div>
        <div style="margin: 0px; font-stretch: normal; line-height:
          normal; font-family: Menlo; color: rgb(52, 188, 38);
          background-color: rgb(255, 255, 255);" class=""><span
            style="font-variant-ligatures: no-common-ligatures" class=""><b
              class="">                                   ^</b></span></div>
        <div style="margin: 0px; font-stretch: normal; line-height:
          normal; font-family: Menlo; background-color: rgb(255, 255,
          255);" class=""><span style="font-variant-ligatures:
            no-common-ligatures" class=""><b class="">/Users/goev/Prosjekter/ovms3/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/ovms_webserver/src/web_framework.cpp:365:35:</b>
          </span><span style="font-variant-ligatures:
            no-common-ligatures; color: #c33720" class=""><b class="">error:
            </b></span><span style="font-variant-ligatures:
            no-common-ligatures" class="">expected primary-expression
            before '<b class="">;</b>' token</span></div>
        <div style="margin: 0px; font-stretch: normal; line-height:
          normal; font-family: Menlo; background-color: rgb(255, 255,
          255);" class=""><span style="font-variant-ligatures:
            no-common-ligatures" class="">     mtime =
            MTIME_ASSETS_SCRIPT_JS;</span></div>
        <div style="margin: 0px; font-stretch: normal; line-height:
          normal; font-family: Menlo; background-color: rgb(255, 255,
          255);" class=""><span style="font-variant-ligatures:
            no-common-ligatures" class=""><br class="">
          </span></div>
        <div style="margin: 0px; font-stretch: normal; line-height:
          normal; font-family: Menlo; background-color: rgb(255, 255,
          255);" class=""><span style="font-variant-ligatures:
            no-common-ligatures" class="">Are they missing?</span></div>
        <div style="margin: 0px; font-stretch: normal; line-height:
          normal; font-family: Menlo; background-color: rgb(255, 255,
          255);" class=""><span style="font-variant-ligatures:
            no-common-ligatures" class=""><br class="">
          </span></div>
        <div style="margin: 0px; font-stretch: normal; line-height:
          normal; font-family: Menlo; background-color: rgb(255, 255,
          255);" class=""><span style="font-variant-ligatures:
            no-common-ligatures" class="">Best regards,</span></div>
        <div style="margin: 0px; font-stretch: normal; line-height:
          normal; font-family: Menlo; background-color: rgb(255, 255,
          255);" class=""><span style="font-variant-ligatures:
            no-common-ligatures" class="">Geir</span></div>
        <div><br class="">
          <blockquote type="cite" class="">
            <div class="">28. jan. 2018 kl. 20:10 skrev Michael Balzer
              <<a href="mailto:dexter@expeedo.de" class=""
                moz-do-not-send="true">dexter@expeedo.de</a>>:</div>
            <br class="Apple-interchange-newline">
            <div class="">
              <div class="">A first usable web frontend version is now
                in the hub.<br class="">
                <br class="">
                There are two new mongoose config options to enable
                serving from file space and list directory contents. I
                recommend enabling them, if you want to exclude<br
                  class="">
                access to the filesystem, you can do so by configuration
                params "http.server":<br class="">
                <br class="">
                   // "http.server"Instances:<br class="">
                   //    Name                Default
                                Function<br class="">
                   //    enable.files        yes
                                    Enable file serving from docroot<br
                  class="">
                   //    enable.dirlist      yes
                                    Enable directory listings<br
                  class="">
                   //    docroot             /sd
                                    File server document root<br
                  class="">
                   //    auth.domain         ovms
                                   Default auth domain (digest realm)<br
                  class="">
                   //    auth.file           .htpasswd               Per
                directory auth file (Note: no inheritance from parent
                dir!)<br class="">
                   //    auth.global         yes                     Use
                global auth for files (user "admin", module password)<br
                  class="">
                <br class="">
                <br class="">
                File access is not needed for the web frontend though,
                just an option to be able to access i.e. CAN logs. The
                docroot can be set to "/store", but I don't<br class="">
                recommend that. The config path is protected, but this
                relies on mongoose delivering correct paths -- a bug
                would open access to the config. If you want to<br
                  class="">
                serve from /store, use a sub directory like "/store/www"
                as the docroot.<br class="">
                <br class="">
                Global and web session authentication is bound to the
                module password (config set password module "…").<br
                  class="">
                <br class="">
                The frontend is AJAX based using Bootstrap & jQuery,
                with currently a very basic (functional) design. I've
                implemented a first home & status screen (just<br
                  class="">
                command outputs), a simple shell and config pages for
                the password and the basic vehicle setup (just type
                & id for now). I'll add config pages for wifi,
                modem,<br class="">
                server & ota during the next days.<br class="">
                <br class="">
                The frontend is usable on a small screen, just the shell
                could need full screen support -- I'll have a look at
                that later on.<br class="">
                <br class="">
                The framework provides a page registration and page
                context utilities to enable custom / vehicle specific
                extensions with few effort. I'll add an example /<br
                  class="">
                template for this.<br class="">
                <br class="">
                Feedback is welcome.<br class="">
                <br class="">
                Regards,<br class="">
                Michael<br class="">
                <br class="">
                -- <br class="">
                Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal<br
                  class="">
                Fon 02333 / 833 5735 * Handy 0176 / 206 989 26<br
                  class="">
                <br class="">
                <br class="">
                _______________________________________________<br
                  class="">
                OvmsDev mailing list<br class="">
                <a href="mailto:OvmsDev@lists.teslaclub.hk" class=""
                  moz-do-not-send="true">OvmsDev@lists.teslaclub.hk</a><br
                  class="">
                <a class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br
                  class="">
              </div>
            </div>
          </blockquote>
        </div>
        <br class="">
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a>
<a class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="160">-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
</pre>
  </body>
</html>