mirror of https://git.sr.ht/~ashkeel/strimertul
Update KV to v5, add some debug methods
This commit is contained in:
parent
d9ac560a4b
commit
7d4a2700d0
File diff suppressed because it is too large
Load Diff
|
@ -5,14 +5,14 @@
|
|||
"@billjs/event-emitter": "^1.0.3",
|
||||
"@reach/router": "^1.3.4",
|
||||
"@reduxjs/toolkit": "^1.5.1",
|
||||
"@strimertul/kilovolt-client": "^4.1.0",
|
||||
"@strimertul/kilovolt-client": "^5.0.1",
|
||||
"@types/node": "^15.0.2",
|
||||
"@types/reach__router": "^1.3.7",
|
||||
"@types/react": "^17.0.5",
|
||||
"@types/react-dom": "^17.0.4",
|
||||
"bulma": "^0.9.2",
|
||||
"i18next": "^20.6.1",
|
||||
"parcel": "^2.0.0-beta.2",
|
||||
"parcel": "^2.0.1",
|
||||
"pretty-ms": "^7.0.1",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
href="https://jenil.github.io/bulmaswatch/darkly/bulmaswatch.min.css"
|
||||
/>
|
||||
<style>
|
||||
@import url("overrides.css");
|
||||
.content {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
@ -17,6 +18,6 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="main" class="is-fullheight"></div>
|
||||
<script src="index.tsx"></script>
|
||||
<script src="index.tsx" type="module"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -8,8 +8,6 @@ import './locale/setup';
|
|||
import store from './store';
|
||||
import App from './ui/App';
|
||||
|
||||
import './overrides.css';
|
||||
|
||||
// @ts-expect-error idk
|
||||
const history = createHistory(window);
|
||||
|
||||
|
|
|
@ -32,7 +32,11 @@
|
|||
"read-btn": "Read",
|
||||
"write-key": "Write key",
|
||||
"write-btn": "Write",
|
||||
"fix-json-btn": "Fix JSON"
|
||||
"fix-json-btn": "Fix JSON",
|
||||
"console-header": "Console operations",
|
||||
"get-keys": "Get all keys",
|
||||
"get-all": "DUMP ALL",
|
||||
"friendly-greeting": "WELCOME TO HELL"
|
||||
},
|
||||
"actions": {
|
||||
"save": "Save",
|
||||
|
|
|
@ -32,12 +32,29 @@ export default function DebugPage(
|
|||
setWriteErrorMsg(e.message);
|
||||
}
|
||||
};
|
||||
const dumpKeys = async () => {
|
||||
console.log(await api.keyList());
|
||||
}
|
||||
const dumpAll = async () => {
|
||||
console.log(await api.getKeysByPrefix(""));
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<p className="title is-3" style={{ color: '#fa3' }}>
|
||||
WELCOME TO HELL
|
||||
{t('debug.friendly-greeting')}
|
||||
</p>
|
||||
<div className="columns">
|
||||
<div className="column">
|
||||
<label className="label">{t('debug.console-header')}</label>
|
||||
<button className="button" onClick={dumpKeys}>
|
||||
{t('debug.get-keys')}
|
||||
</button>
|
||||
<button className="button" onClick={dumpAll}>
|
||||
{t('debug.get-all')}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="columns">
|
||||
<div className="column">
|
||||
<label className="label">{t('debug.read-key')}</label>
|
||||
|
|
2
go.mod
2
go.mod
|
@ -17,7 +17,7 @@ require (
|
|||
github.com/nicklaw5/helix v1.25.0
|
||||
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4
|
||||
github.com/sirupsen/logrus v1.8.1
|
||||
github.com/strimertul/kilovolt/v4 v4.0.1
|
||||
github.com/strimertul/kilovolt/v5 v5.0.1
|
||||
github.com/strimertul/stulbe v0.4.3
|
||||
github.com/strimertul/stulbe-client-go v0.4.0
|
||||
)
|
||||
|
|
2
go.sum
2
go.sum
|
@ -129,6 +129,8 @@ github.com/strimertul/kilovolt-client-go/v2 v2.0.0/go.mod h1:y98V8uVMiJZhnBLtSVk
|
|||
github.com/strimertul/kilovolt/v3 v3.0.0/go.mod h1:AgfPYRp+kffN64tcqCcQUZdpL/Dm5DGHIYRDm9t3E0Y=
|
||||
github.com/strimertul/kilovolt/v4 v4.0.1 h1:81isohdSixVURO2+dZKKZBPw97HJmNN4/BXn6ADFoWM=
|
||||
github.com/strimertul/kilovolt/v4 v4.0.1/go.mod h1:AO2ZFQtSB+AcjCw0RTkXjbM6XBAjhsXsrRq10BX95kw=
|
||||
github.com/strimertul/kilovolt/v5 v5.0.1 h1:LHAVqb3SrXiew3loTpYuPdz16Nl8/aTReBYj56xwF7I=
|
||||
github.com/strimertul/kilovolt/v5 v5.0.1/go.mod h1:HxfnnlEGhY6p+Im9U7pso07HEV+cXEsJH7uFTM7c6uE=
|
||||
github.com/strimertul/strimertul v1.3.0/go.mod h1:1pSe9zVWF4BYt56ii1Hg+xTxvtfqfvT4FQ7bYffWsUA=
|
||||
github.com/strimertul/stulbe v0.2.5/go.mod h1:0AsY4OVf1dNCwOn9s7KySuAxJ85w88pXeostu1n9E7w=
|
||||
github.com/strimertul/stulbe v0.4.0/go.mod h1:Pb0UQCKdyES7UKSKm2i2g9parkgXSJAFeMH/LSOSbgQ=
|
||||
|
|
Loading…
Reference in New Issue