Skip to content

Commit

Permalink
added local modeler to next
Browse files Browse the repository at this point in the history
  • Loading branch information
trbKnl committed Jan 7, 2025
1 parent 191961e commit 307d09f
Show file tree
Hide file tree
Showing 17 changed files with 1,618 additions and 2 deletions.
8 changes: 7 additions & 1 deletion core/assets/js/feldspar_app.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
export const FeldsparApp = {
mounted() {
console.log("[FeldsparApp] Mounted");

console.log(this.el.dataset);

const iframe = this.getIframe();
iframe.addEventListener("load", () => {
this.onFrameLoaded();
});
iframe.setAttribute("src", this.el.dataset.src);

// send Phoenix event to Port
window.addEventListener("phx:to_feldspar_event", function(event) {
const action = event.detail.action
const data = event.detail.data
iframe.contentWindow.postMessage({ action, data })
})

window.addEventListener("message", function(event) {
if (event.data.action === "resize") {
Expand Down
4 changes: 3 additions & 1 deletion core/lib/core/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ defmodule Core.Application do
{Oban, oban_config()},
{Systems.Banking.Supervisor, [{:euro, "account-number"}]},
CoreWeb.Endpoint,
{Systems.Rate.Server, rate_config()}
{Systems.Rate.Server, rate_config()},
MutexManager,
RunTaskQueue,
]

opts = [strategy: :one_for_one, name: Core.Supervisor]
Expand Down
Loading

0 comments on commit 307d09f

Please sign in to comment.