Skip to content

future-state/myQoI

Repository files navigation

fresno-myQoI-chrome

Overview

Folder Structure

  • FRESNO-MYQOI-CHROME
    • ookla-demo

      • demo javascript sdk project from ookla
    • extension

      • Contains the chrome extension
      • src
        • contains all important pages for the app
      • dist
        • contains build output (zip for deployment)
        • example is MyQOI.zip (latest version zipped and deployed to chrome store)
    • functions

      • Contains the azure functions
      • GetQOIConfig
        • API To retrieve configurations based on email domain.
      • PostQOIData
        • API To send data from chromebook.

Service Worker

  • To access the service worker to see logs or errors generated by the extension
    • Open chrome://extensions
      • in the listed extensions, click the "service worked" link under myQoI

Architecture Flow

  1. Chrome Extension Runs at install/enabled.
  2. Extension asks Azure Function GetQOIConfig for configurations based on user email domain
  3. Azure Function GetQOIConfig asks database QoI_Config table for configurations
  4. Extension Runs speed tests and data gathering based on the intervals provided in the config
    1. Note - timings are based on timings on the device (not UTC)
  5. Extension calls Azure Function PostQOIData to send the data to the database
  6. Azure Function PostQOIData writes to QoiData table in the database
    1. Note - Timestamp is UTC when database is written to (not device time)

Extension Testing Local Dev

  • I want to preface this by saying I'm sure that there is a better way, but this is the only way I have been able to actually test.

Testing Flow (MacOS)

  1. Remove Chrome Profile
    1. System Preferences>Profiles>MCXToProfile: com.google.Chrome
    2. Select and click "-"
    3. Click Remove
  2. Open chrome://policy/ and "Reload policies"
  3. Open chrome://extensions/ and "Remove" myQoI
  4. Click "Pack extension"
    1. Extension root directory = fresno-myQoI-chrome/myQoI-Chrome-Extension
    2. After your first build it will generate a Key file that will go in the second field
  5. Open chrome://extensions/ and draw myQoI-Chrome-extension.crx into the Chrome window and click "Add extension"
  6. Open com.google.Chrome.plist.mobileconfig file
  7. Enable custom profile
    1. System Preferences>Profiles>MCXToProfile: com.google.Chrome
    2. Click "Install..." then "Install"
    3. Enter password if prompted
  8. Open chrome://policy/ and "Reload policies"
  9. Open chrome://extensions/ and reload the page
  10. Enable sync on your chrome profile by clicking on the icon for your account in the top bar.
  11. Done! The extension now executes when you click "Update" on chrome://extensions/

Testing Flow (without Enterprise API's)

  • If you don't need to use or test the enterprise API's you can load the unpacked extension
  1. Open chrome://extensions/
  2. Click "Load unpacked" and select dist folder
  3. Done! The extension now executes when you click "Update" on chrome://extensions/
  • You'll get errors, but I added some exception handling to let it keep functioning without them

Deployment

See MyQOI Deployment Guide in Root Folder

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages