UNPKG

@eotl/core

Version:

Assortment of data structures, Vue.js components, and utilities across EOTL apps and sites.

72 lines (71 loc) 2.38 kB
import { useEotlCore } from "./store.js"; import { openBlock, createElementBlock, createElementVNode, toDisplayString, createTextVNode } from "vue"; import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js"; const _sfc_main = { name: "Daemon", props: ["api"], data() { const store = useEotlCore(); return { store, daemon: { name: "Unknown Name", description: "Placeholder for an unknown Daemon", location: "Unknown", contact: "unknown", url: "", status: "unknown", service: "daemon", version: {} } }; }, mounted() { console.log("Mounted Daemon"); this.getDaemonInfo(this.api); }, methods: { getDaemonInfo(daemon_api) { fetch(daemon_api, { method: "GET", headers: { Accept: "text/plain", "Content-Type": "application/json" } }).then((response) => { return response.json(); }).then((json) => { console.log("daemon", json); }); } } }; const _hoisted_1 = { class: "list-unstyled mt-4" }; const _hoisted_2 = ["href"]; const _hoisted_3 = { class: "" }; const _hoisted_4 = { class: "p-4" }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("div", null, [ createElementVNode("strong", null, toDisplayString($data.daemon.name), 1), createElementVNode("p", null, toDisplayString($data.daemon.description), 1), createElementVNode("ul", _hoisted_1, [ createElementVNode("li", null, [ createElementVNode("a", { href: $data.daemon.url }, toDisplayString($data.daemon.url), 9, _hoisted_2) ]), createElementVNode("li", null, [ createTextVNode("Status: "), createElementVNode("span", _hoisted_3, toDisplayString($data.daemon.status), 1) ]), createElementVNode("li", null, "Operator: " + toDisplayString($data.daemon.location) + ", " + toDisplayString($data.daemon.contact), 1), createElementVNode("li", null, "Service: " + toDisplayString($data.daemon.service), 1) ]), createElementVNode("pre", _hoisted_4, toDisplayString($data.daemon.version), 1) ]); } const Daemon = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); export { Daemon as D }; //# sourceMappingURL=Daemon-C64IN2y0.js.map