Changeset - 06bf6dae8e64
[Not reviewed]
bin/ascoltami
Show inline comments
 
#!/bin/zsh
 
pnpm exec vite -c light9/ascoltami/vite.config.ts &
 
pdm run uvicorn light9.ascoltami.main:app --host 0.0.0.0 --port 8206 --no-access-log
 
wait
bin/rdfdb
Show inline comments
 
#!/bin/zsh
 
#pnpm exec vite -c light9/ascoltami/vite.config.ts &
 
pdm run uvicorn --port 8209 light9.rdfdb.service:app --no-access-log
 
wait
 
exec pdm run uvicorn --port 8209 light9.rdfdb.service:app --no-access-log
light9/ascoltami/vite.config.ts
Show inline comments
 
deleted file
light9/collector/web/vite.config.ts
Show inline comments
 
deleted file
light9/effect/listing/web/vite.config.ts
Show inline comments
 
deleted file
light9/fade/vite.config.ts
Show inline comments
 
deleted file
light9/homepage/write_config.py
Show inline comments
 
@@ -74,7 +74,7 @@ http {{
 
        showPath = showconfig.showUri().split('/', 3)[-1]
 
        root = showconfig.root()[:-len(showPath)].decode('ascii')
 
        print(f'''
 
  location /show {{
 
  location /show/ {{
 
    root {root};
 
  }}
 

	
light9/live/vite.config.ts
Show inline comments
 
deleted file
light9/web/RdfdbSyncedGraph.ts
Show inline comments
 
@@ -39,7 +39,7 @@ export class RdfdbSyncedGraph extends Li
 
      ["xsd", "http://www.w3.org/2001/XMLSchema#"],
 
    ]);
 
    this.graph = new SyncedGraph(
 
      this.testGraph ? "unused" : "/rdfdb/api/syncedGraph",
 
      this.testGraph ? "unused" : "/service/rdfdb/syncedGraph",
 
      prefixes,
 
      (s: string) => {
 
        this.status = s;
light9/web/ascoltami/Light9AscoltamiUi.ts
Show inline comments
 
file renamed from light9/ascoltami/Light9AscoltamiUi.ts to light9/web/ascoltami/Light9AscoltamiUi.ts
 
@@ -4,16 +4,16 @@ import { customElement, property } from 
 
import { classMap } from "lit/directives/class-map.js";
 
import { NamedNode } from "n3";
 
import Sylvester from "sylvester";
 
import { Zoom } from "../web/light9-timeline-audio";
 
import { PlainViewState } from "../web/Light9CursorCanvas";
 
import { getTopGraph } from "../web/RdfdbSyncedGraph";
 
import { SyncedGraph } from "../web/SyncedGraph";
 
import { Zoom } from "../light9-timeline-audio";
 
import { PlainViewState } from "../Light9CursorCanvas";
 
import { getTopGraph } from "../RdfdbSyncedGraph";
 
import { SyncedGraph } from "../SyncedGraph";
 
import { TimingUpdate } from "./main";
 
import { showRoot } from "../web/show_specific";
 
export { Light9TimelineAudio } from "../web/light9-timeline-audio";
 
export { Light9CursorCanvas } from "../web/Light9CursorCanvas";
 
export { RdfdbSyncedGraph } from "../web/RdfdbSyncedGraph";
 
export { ResourceDisplay } from "../web/ResourceDisplay";
 
import { showRoot } from "../show_specific";
 
export { Light9TimelineAudio } from "../light9-timeline-audio";
 
export { Light9CursorCanvas } from "../Light9CursorCanvas";
 
export { RdfdbSyncedGraph } from "../RdfdbSyncedGraph";
 
export { ResourceDisplay } from "../ResourceDisplay";
 
const $V = Sylvester.Vector.create;
 

	
 
debug.enable("*");
 
@@ -111,7 +111,7 @@ export class Light9AscoltamiUi extends L
 
  render() {
 
    return html`<rdfdb-synced-graph></rdfdb-synced-graph>
 

	
 
      <link rel="stylesheet" href="./style.css" />
 
      <link rel="stylesheet" href="../style.css" />
 

	
 
      <!-- <h1>ascoltami <a href="metrics">[metrics]</a></h1> -->
 

	
 
@@ -193,26 +193,26 @@ export class Light9AscoltamiUi extends L
 
    if (!this.selectedSong) {
 
      return;
 
    }
 
    await fetch("api/song", { method: "POST", body: this.selectedSong.value });
 
    await fetch("../service/ascoltami/song", { method: "POST", body: this.selectedSong.value });
 
  }
 

	
 
  onCmdStop(ev?: MouseEvent): void {
 
    postJson("api/time", { pause: true });
 
    postJson("../service/ascoltami/time", { pause: true });
 
  }
 
  onCmdPlay(ev?: MouseEvent): void {
 
    postJson("api/time", { resume: true });
 
    postJson("../service/ascoltami/time", { resume: true });
 
  }
 
  onCmdIntro(ev?: MouseEvent): void {
 
    postJson("api/time", { t: this.times.intro, resume: true });
 
    postJson("../service/ascoltami/time", { t: this.times.intro, resume: true });
 
  }
 
  onCmdPost(ev?: MouseEvent): void {
 
    postJson("api/time", {
 
    postJson("../service/ascoltami/time", {
 
      t: this.currentDuration - this.times.post,
 
      resume: true,
 
    });
 
  }
 
  onCmdGo(ev?: MouseEvent): void {
 
    postJson("api/go", {});
 
    postJson("../service/ascoltami/go", {});
 
  }
 

	
 
  bindKeys() {
 
@@ -244,7 +244,7 @@ export class Light9AscoltamiUi extends L
 

	
 
  async musicSetup() {
 
    // shoveled over from the vanillajs version
 
    const config = await (await fetch("api/config")).json();
 
    const config = await (await fetch("../service/ascoltami/config")).json();
 
    this.show = new NamedNode(config.show);
 
    this.times = config.times;
 
    document.title = document.title.replace("{{host}}", config.host);
light9/web/ascoltami/index.html
Show inline comments
 
file renamed from light9/ascoltami/index.html to light9/web/ascoltami/index.html
 
@@ -2,7 +2,7 @@
 
<html>
 
  <head>
 
    <title>ascoltami on {{host}}</title>
 
    <link rel="stylesheet" href="./style.css" />
 
    <link rel="stylesheet" href="../style.css" />
 
    <style>
 
      #cmd-go {
 
        min-width: 5em;
 
@@ -44,7 +44,7 @@
 
      name="viewport"
 
      content="user-scalable=no, width=device-width, initial-scale=.7"
 
    />
 
    <script type="module" src="../ascoltami/Light9AscoltamiUi"></script>
 
    <script type="module" src="./Light9AscoltamiUi"></script>
 
  </head>
 
  <body>
 
    <div id="page">
 
@@ -78,6 +78,6 @@
 
      <light9-ascoltami-ui></light9-ascoltami-ui>
 
      <p><a href="">reload</a></p>
 
    </div>
 
    <script type="module" src="../ascoltami/main.ts"></script>
 
    <script type="module" src="./main.ts"></script>
 
  </body>
 
</html>
light9/web/ascoltami/main.ts
Show inline comments
 
file renamed from light9/ascoltami/main.ts to light9/web/ascoltami/main.ts
 
@@ -18,7 +18,7 @@ export interface TimingUpdate {
 
  // let lastPlaying = false;
 

	
 
  
 
  const events = new EventSource("api/time/stream");
 
  const events = new EventSource("../service/ascoltami/time/stream");
 
  events.addEventListener("message", (m)=>{
 
    const update = JSON.parse(m.data) as TimingUpdate
 
    updateCurrent(update)
light9/web/collector/Light9CollectorDevice.ts
Show inline comments
 
file renamed from light9/collector/web/Light9CollectorDevice.ts to light9/web/collector/Light9CollectorDevice.ts
light9/web/collector/Light9CollectorUi.ts
Show inline comments
 
file renamed from light9/collector/web/Light9CollectorUi.ts to light9/web/collector/Light9CollectorUi.ts
 
@@ -4,11 +4,11 @@ import { customElement, property } from 
 
import { NamedNode } from "n3";
 
import ReconnectingWebSocket from "reconnectingwebsocket";
 
import { sortBy, uniq } from "underscore";
 
import { Patch } from "../patch";
 
import { getTopGraph } from "../RdfdbSyncedGraph";
 
import { SyncedGraph } from "../SyncedGraph";
 
import { Light9CollectorDevice } from "./Light9CollectorDevice";
 
import { Patch } from "../../web/patch";
 
import { getTopGraph } from "../../web/RdfdbSyncedGraph";
 
import { SyncedGraph } from "../../web/SyncedGraph";
 
export { RdfdbSyncedGraph } from "../../web/RdfdbSyncedGraph";
 
export { RdfdbSyncedGraph } from "../RdfdbSyncedGraph";
 
export { Light9CollectorDevice };
 

	
 
debug.enable("*");
 
@@ -34,7 +34,7 @@ export class Light9CollectorUi extends L
 
      this.graph.runHandler(this.findDevices.bind(this), "findDevices");
 
    });
 

	
 
    const ws = new ReconnectingWebSocket(location.href.replace("http", "ws") + "api/updates");
 
    const ws = new ReconnectingWebSocket(location.href.replace("http", "ws") + "../service/collector/updates");
 
    ws.addEventListener("message", (ev: any) => {
 
      const outputAttrsSet = JSON.parse(ev.data).outputAttrsSet;
 
      if (outputAttrsSet) {
light9/web/collector/index.html
Show inline comments
 
file renamed from light9/collector/web/index.html to light9/web/collector/index.html
 
@@ -4,8 +4,8 @@
 
    <title>collector</title>
 
    <meta charset="utf-8" />
 

	
 
    <link rel="stylesheet" href="./style.css" />
 
    <script type="module" src="../collector/Light9CollectorUi"></script>
 
    <link rel="stylesheet" href="../style.css" />
 
    <script type="module" src="Light9CollectorUi"></script>
 

	
 
    <style>
 
      td {
light9/web/effects/Light9EffectListing.ts
Show inline comments
 
file renamed from light9/effect/listing/web/Light9EffectListing.ts to light9/web/effects/Light9EffectListing.ts
 
@@ -3,9 +3,9 @@ import { css, html, LitElement } from "l
 
import { customElement } from "lit/decorators.js";
 
import { NamedNode } from "n3";
 
import { sortBy } from "underscore";
 
import { getTopGraph } from "../../../web/RdfdbSyncedGraph";
 
import { SyncedGraph } from "../../../web/SyncedGraph";
 
export { ResourceDisplay } from "../../../web/ResourceDisplay";
 
import { getTopGraph } from "../RdfdbSyncedGraph";
 
import { SyncedGraph } from "../SyncedGraph";
 
export { ResourceDisplay } from "../ResourceDisplay";
 

	
 
debug.enable("*");
 
const log = debug("listing");
light9/web/effects/index.html
Show inline comments
 
file renamed from light9/effect/listing/web/index.html to light9/web/effects/index.html
 
@@ -4,7 +4,7 @@
 
    <title>effect listing</title>
 
    <meta charset="utf-8" />
 
    <link rel="stylesheet" href="../style.css">    
 
    <script type="module" src="../effectListing/Light9EffectListing"></script>
 
    <script type="module" src="./Light9EffectListing"></script>
 
  </head>
 
  <body>
 
    <light9-effect-listing></light9-effect-listing>
light9/web/fade/Light9EffectFader.ts
Show inline comments
 
file renamed from light9/fade/Light9EffectFader.ts to light9/web/fade/Light9EffectFader.ts
 
@@ -2,10 +2,10 @@ import debug from "debug";
 
import { css, html, LitElement } from "lit";
 
import { customElement, property, state } from "lit/decorators.js";
 
import { NamedNode, Quad } from "n3";
 
import { getTopGraph } from "../web/RdfdbSyncedGraph";
 
import { showRoot } from "../web/show_specific";
 
import { SyncedGraph } from "../web/SyncedGraph";
 
import { Patch } from "../web/patch";
 
import { getTopGraph } from "../RdfdbSyncedGraph";
 
import { showRoot } from "../show_specific";
 
import { SyncedGraph } from "../SyncedGraph";
 
import { Patch } from "../patch";
 
import { Literal } from "n3";
 
export { Light9Fader } from "./Light9Fader";
 

	
light9/web/fade/Light9FadeUi.ts
Show inline comments
 
file renamed from light9/fade/Light9FadeUi.ts to light9/web/fade/Light9FadeUi.ts
 
@@ -3,11 +3,11 @@ import { css, html, LitElement, Template
 
import { customElement, property } from "lit/decorators.js";
 
import * as N3 from "n3";
 
import { NamedNode, Quad } from "n3";
 
import { Patch } from "../web/patch";
 
import { getTopGraph } from "../web/RdfdbSyncedGraph";
 
import { showRoot } from "../web/show_specific";
 
import { SyncedGraph } from "../web/SyncedGraph";
 
export { EditChoice } from "../web/EditChoice";
 
import { Patch } from "../patch";
 
import { getTopGraph } from "../RdfdbSyncedGraph";
 
import { showRoot } from "../show_specific";
 
import { SyncedGraph } from "../SyncedGraph";
 
export { EditChoice } from "../EditChoice";
 
export { Light9EffectFader } from "./Light9EffectFader";
 
export { Light9Fader } from "./Light9Fader";
 

	
light9/web/fade/Light9Fader.ts
Show inline comments
 
file renamed from light9/fade/Light9Fader.ts to light9/web/fade/Light9Fader.ts
 
@@ -2,7 +2,7 @@ import debug from "debug";
 
import { css, html, LitElement, PropertyValueMap } from "lit";
 
import { customElement, property, query } from "lit/decorators.js";
 

	
 
import { clamp } from "../web/floating_color_picker";
 
import { clamp } from "../floating_color_picker";
 
const log = debug("fade");
 

	
 
class Drag {
light9/web/fade/index.html
Show inline comments
 
file renamed from light9/fade/index.html to light9/web/fade/index.html
light9/web/index.html
Show inline comments
 
@@ -4,7 +4,7 @@
 
    <title>light9 home</title>
 
    <meta charset="utf-8" />
 
    <link rel="stylesheet" href="style.css" />
 
    <script type="module" src="./ServiceButtonRow.ts"></script>
 
    <script type="module" src="metrics/ServiceButtonRow.ts"></script>
 
  </head>
 
  <body>
 
    <h1>light9 home page</h1>
light9/web/live/Effect.ts
Show inline comments
 
file renamed from light9/live/Effect.ts to light9/web/live/Effect.ts
 
import debug from "debug";
 
import { Literal, NamedNode, Quad, Quad_Object, Quad_Predicate, Quad_Subject, Term } from "n3";
 
import { some } from "underscore";
 
import { Patch } from "../web/patch";
 
import { SyncedGraph } from "../web/SyncedGraph";
 
import { shortShow } from "../web/show_specific";
 
import { Patch } from "../patch";
 
import { SyncedGraph } from "../SyncedGraph";
 
import { shortShow } from "../show_specific";
 
import { SubEvent } from "sub-events";
 

	
 
// todo: Align these names with newtypes.py, which uses HexColor and VTUnion.
light9/web/live/Light9AttrControl.ts
Show inline comments
 
file renamed from light9/live/Light9AttrControl.ts to light9/web/live/Light9AttrControl.ts
 
@@ -3,12 +3,12 @@ import { css, html, LitElement, Property
 
import { customElement, property, state } from "lit/decorators.js";
 
import { Literal, NamedNode } from "n3";
 
import { SubEvent } from "sub-events";
 
import { getTopGraph } from "../web/RdfdbSyncedGraph";
 
import { SyncedGraph } from "../web/SyncedGraph";
 
import { getTopGraph } from "../RdfdbSyncedGraph";
 
import { SyncedGraph } from "../SyncedGraph";
 
import { ControlValue, Effect } from "./Effect";
 
import { DeviceAttrRow } from "./Light9DeviceControl";
 
export { Slider } from "@material/mwc-slider";
 
export { Light9ColorPicker } from "../web/light9-color-picker";
 
export { Light9ColorPicker } from "../light9-color-picker";
 
export { Light9Listbox } from "./Light9Listbox";
 
const log = debug("settings.dev.attr");
 

	
light9/web/live/Light9DeviceControl.ts
Show inline comments
 
file renamed from light9/live/Light9DeviceControl.ts to light9/web/live/Light9DeviceControl.ts
 
@@ -3,13 +3,13 @@ import { css, html, LitElement } from "l
 
import { customElement, property } from "lit/decorators.js";
 
import { NamedNode } from "n3";
 
import { unique } from "underscore";
 
import { Patch } from "../web/patch";
 
import { getTopGraph } from "../web/RdfdbSyncedGraph";
 
import { SyncedGraph } from "../web/SyncedGraph";
 
import { Patch } from "../patch";
 
import { getTopGraph } from "../RdfdbSyncedGraph";
 
import { SyncedGraph } from "../SyncedGraph";
 
import { Choice } from "./Light9Listbox";
 
import { Light9AttrControl } from "./Light9AttrControl";
 
import { Effect } from "./Effect";
 
export { ResourceDisplay } from "../web/ResourceDisplay";
 
export { ResourceDisplay } from "../ResourceDisplay";
 
export { Light9AttrControl };
 
const log = debug("settings.dev");
 

	
light9/web/live/Light9DeviceSettings.ts
Show inline comments
 
file renamed from light9/live/Light9DeviceSettings.ts to light9/web/live/Light9DeviceSettings.ts
 
@@ -3,11 +3,11 @@ import { css, html, LitElement, Property
 
import { customElement, property } from "lit/decorators.js";
 
import { NamedNode } from "n3";
 
import { sortBy, uniq } from "underscore";
 
import { Patch } from "../web/patch";
 
import { getTopGraph } from "../web/RdfdbSyncedGraph";
 
import { SyncedGraph } from "../web/SyncedGraph";
 
import { Patch } from "../patch";
 
import { getTopGraph } from "../RdfdbSyncedGraph";
 
import { SyncedGraph } from "../SyncedGraph";
 
import { Effect, newEffect } from "./Effect";
 
export { EditChoice } from "../web/EditChoice";
 
export { EditChoice } from "../EditChoice";
 
export { Light9DeviceControl as Light9LiveDeviceControl } from "./Light9DeviceControl";
 
const log = debug("settings");
 

	
light9/web/live/Light9Listbox.ts
Show inline comments
 
file renamed from light9/live/Light9Listbox.ts to light9/web/live/Light9Listbox.ts
light9/web/live/README.md
Show inline comments
 
file renamed from light9/live/README.md to light9/web/live/README.md
light9/web/live/index.html
Show inline comments
 
file renamed from light9/live/index.html to light9/web/live/index.html
light9/web/metrics/ServiceButtonRow.ts
Show inline comments
 
file renamed from light9/homepage/ServiceButtonRow.ts to light9/web/metrics/ServiceButtonRow.ts
light9/web/metrics/StatsLine.ts
Show inline comments
 
file renamed from light9/homepage/StatsLine.ts to light9/web/metrics/StatsLine.ts
 
@@ -3,7 +3,7 @@ import { customElement, property } from 
 
export { StatsProcess } from "./StatsProcess";
 
import parsePrometheusTextFormat from "parse-prometheus-text-format";
 
import debug from "debug";
 
import { clamp } from "../web/floating_color_picker";
 
import { clamp } from "../floating_color_picker";
 
const log = debug("home");
 

	
 
interface Value {
light9/web/metrics/StatsProcess.ts
Show inline comments
 
file renamed from light9/homepage/StatsProcess.ts to light9/web/metrics/StatsProcess.ts
light9/web/vite.config.ts
Show inline comments
 
import { defineConfig } from "vite";
 

	
 
const servicePort = 8200; // (not really, for homepage)
 
export default defineConfig({
 
  base: "/",
 
  root: "./light9/web",
 
  publicDir: ".",
 
  // publicDir: ".",
 
  server: {
 
    host: "0.0.0.0",
 
    strictPort: true,
 
    port: servicePort + 100,
 
    port: 8300,
 
    hmr: {
 
      port: servicePort + 200,
 
      port: 8301,
 
    },
 
  },
 
  clearScreen: false,
0 comments (0 inline, 0 general)