Skip to content

Commit

Permalink
reorganized
Browse files Browse the repository at this point in the history
  • Loading branch information
NielsGregers committed Jun 6, 2024
1 parent 669f988 commit 8ab48e2
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .koksmat/koksmat.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"version": {
"minor": 0,
"build": 1,
"patch": 1,
"build": 4,
"patch": 4,
"major": 0
},
"appname": "magic-people",
Expand Down
21 changes: 21 additions & 0 deletions .koksmat/web/app/koksmat/streams/upgradekoksmat/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"use client";
import { useEffect, useState } from "react";
import { streamProcess } from "@/app/koksmat/server/streamprocess";

export default function UpgradeKoksmat() {
const [processOutput, setProcessOutput] = useState<any>(null);
useEffect(() => {
const load = async () => {
const ui = await streamProcess(
"go",
["install", "github.com/koksmat-com/koksmat@v2.1.5.19"],
2,
{}
);
setProcessOutput(ui);
};
load();
}, []);

return <div>{processOutput}</div>;
}
4 changes: 2 additions & 2 deletions .koksmat/web/app/koksmat/test/2way/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";
import Ping from "@/app/magic/components/streams/ping";
import { StreamSpawnProcess } from "@/app/magic/components/streams/spawn";
import Ping from "@/app/koksmat/streams/ping";
import { StreamSpawnProcess } from "@/app/koksmat/streams/spawn";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { useState } from "react";
Expand Down
39 changes: 5 additions & 34 deletions .koksmat/web/app/koksmat/test/ping/page.tsx
Original file line number Diff line number Diff line change
@@ -1,41 +1,12 @@
import Ping from "@/app/magic/components/streams/ping";
import { StreamSpawnProcess } from "@/app/magic/components/streams/spawn";
import Ping from "@/app/koksmat/streams/ping";
import { StreamSpawnProcess } from "@/app/koksmat/streams/spawn";

export default function Page() {
return (
<div className="flex">
{/* <Ping domain="nexigroup.com" count={4} />
<Ping domain="google.com" count={3} /> */}
<StreamSpawnProcess
cmd={"pwsh"}
args={[
"-Command",
`
$PSStyle.OutputRendering = [System.Management.Automation.OutputRendering]::PlainText
function Generate-RandomDelay {
$minDelay = 500
$maxDelay = 2000
$random = Get-Random -Minimum $minDelay -Maximum $maxDelay
Start-Sleep -Milliseconds $random
}
try {
for ($i = 1; $i -le 5; $i++) {
Write-Output "Output $i"
Generate-RandomDelay
}
throw "An intentional error occurred."
}
catch {
Write-Error $_.Exception.Message
}
`,
]}
timeout={10}
/>
<Ping domain="nexigroup.com" count={4} />
<Ping domain="google.com" count={3} />
<StreamSpawnProcess cmd={"ping"} args={["google.com"]} timeout={10} />
</div>
);
}
1 change: 1 addition & 0 deletions .koksmat/web/app/magic/.koksmatignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
services/**/*

0 comments on commit 8ab48e2

Please sign in to comment.