diff options
| author | Shulhan <ms@kilabit.info> | 2021-09-05 20:24:50 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-09-05 20:24:50 +0700 |
| commit | caf0f69ed09d01ff6053cf095b720606077e442c (patch) | |
| tree | 8f249561fb176e263674ec7a32f19565f798b7f9 /editor/example.html | |
| parent | 897d8bbdd89034d8a9bdc781de07c5492b340f1f (diff) | |
| download | pakakeh.ts-caf0f69ed09d01ff6053cf095b720606077e442c.tar.xz | |
editor: convert the example to TypeScript and loaded as module
Diffstat (limited to 'editor/example.html')
| -rw-r--r-- | editor/example.html | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/editor/example.html b/editor/example.html deleted file mode 100644 index 8763dbc..0000000 --- a/editor/example.html +++ /dev/null @@ -1,62 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="UTF-8" /> - <title>WUI - editor</title> - </head> - <body onload="main()"> - <div id="editor"></div> - - <script> - var exports = {} - let wuiEditor = null - </script> - <script src="editor.js"></script> - <script> - let nodeFile = { - name: "Test", - path: "/test", - content: btoa(`mkdir -p \${HOME}/aur/stackdriver-collectd - -git -C \${HOME}/aur/stackdriver-collectd clone \\ - ssh://aur@aur.archlinux.org/stackdriver-collectd.git . - -sh -c "cd \${HOME}/aur/stackdriver-collectd; \\ - makepkg --force --install --noconfirm" -pacman -Ql stackdriver-collectd - -sudo systemctl enable stackdriver-collectd - -#put! {{.BaseDir}}/_template/etc/collectd-influxdb.conf /opt/collectd/etc/collectd.conf - -sudo systemctl restart stackdriver-collectd -sudo systemctl status stackdriver-collectd - -##---- Connect telegraf with collectd - -{{.Val "influxdb::dir"}}/bin/influx bucket create \\ - --name stackdriver_collectd \\ - --description "stackdriver collectd" \\ - --org {{.Val "influxdb::org"}} \\ - --token {{.Val "influxdb:telegraf:token"}} \\ - --retention "3d" - -#put: {{.BaseDir}}/_template/etc/telegraf/telegraf.d/stackdriver-collectd.conf \\ - {{.Val "influxdb::dir"}}/etc/telegraf/telegraf.d/stackdriver-collectd.conf - -sudo systemctl restart telegraf -sudo systemctl status telegraf -`), - } - - function main() { - let opts = { - id: "editor", - is_editable: true, - } - wuiEditor = new WuiEditor(opts) - wuiEditor.Open(nodeFile) - } - </script> - </body> -</html> |
