UNPKG

@eotl/core

Version:

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

71 lines (70 loc) 2.44 kB
"use strict"; const store = require("./store.cjs"); const vue = require("vue"); const _pluginVue_exportHelper = require("./_plugin-vue_export-helper-DM9IkUGy.cjs"); const _sfc_main = { name: "Daemon", props: ["api"], data() { const store$1 = store.useEotlCore(); return { store: store$1, 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 vue.openBlock(), vue.createElementBlock("div", null, [ vue.createElementVNode("strong", null, vue.toDisplayString($data.daemon.name), 1), vue.createElementVNode("p", null, vue.toDisplayString($data.daemon.description), 1), vue.createElementVNode("ul", _hoisted_1, [ vue.createElementVNode("li", null, [ vue.createElementVNode("a", { href: $data.daemon.url }, vue.toDisplayString($data.daemon.url), 9, _hoisted_2) ]), vue.createElementVNode("li", null, [ vue.createTextVNode("Status: "), vue.createElementVNode("span", _hoisted_3, vue.toDisplayString($data.daemon.status), 1) ]), vue.createElementVNode("li", null, "Operator: " + vue.toDisplayString($data.daemon.location) + ", " + vue.toDisplayString($data.daemon.contact), 1), vue.createElementVNode("li", null, "Service: " + vue.toDisplayString($data.daemon.service), 1) ]), vue.createElementVNode("pre", _hoisted_4, vue.toDisplayString($data.daemon.version), 1) ]); } const Daemon = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render]]); exports.Daemon = Daemon; //# sourceMappingURL=Daemon-Co4jKUpP.cjs.map