@kong-ui-public/entities-data-plane-nodes 1.6.2 → 1.6.3-pr.3942.72fef96ff.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-data-plane-nodes",
3
- "version": "1.6.2",
3
+ "version": "1.6.3-pr.3942.72fef96ff.0",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-data-plane-nodes.umd.js",
6
6
  "module": "./dist/entities-data-plane-nodes.es.js",
@@ -21,7 +21,7 @@
21
21
  "access": "public"
22
22
  },
23
23
  "peerDependencies": {
24
- "@kong-ui-public/entities-shared": "^3.71.2",
24
+ "@kong-ui-public/entities-shared": "^3.71.3-pr.3942.72fef96ff.0",
25
25
  "@kong-ui-public/i18n": "^2.5.1",
26
26
  "@kong/icons": "^1.58.0",
27
27
  "@kong/kongponents": "^9.64.0",
@@ -30,7 +30,7 @@
30
30
  "vue-router": "^4.6.4 || ^5.0.6"
31
31
  },
32
32
  "devDependencies": {
33
- "@kong-ui-public/entities-shared": "^3.71.2",
33
+ "@kong-ui-public/entities-shared": "^3.71.3-pr.3942.72fef96ff.0",
34
34
  "@kong-ui-public/i18n": "^2.5.1",
35
35
  "@kong/design-tokens": "3.4.4",
36
36
  "@kong/icons": "^1.64.0",
@@ -1,304 +0,0 @@
1
- import { defineComponent as Ee, useModel as Ne, ref as r, computed as u, watch as ye, onBeforeUnmount as Te, resolveComponent as m, openBlock as f, createBlock as w, unref as i, withCtx as g, createElementBlock as P, createElementVNode as _, toDisplayString as d, createVNode as c, createTextVNode as I, normalizeClass as Ce, createCommentVNode as Se, resolveDynamicComponent as Ae, Fragment as ke, mergeModels as W } from "vue";
2
- import { useAxios as we, useErrors as Le } from "@kong-ui-public/entities-shared";
3
- import { WarningIcon as Ue, DangerCircleIcon as Me, InfoIcon as D, CheckCircleIcon as Ve, ProgressIcon as Ke } from "@kong/icons";
4
- import { createI18n as Oe, i18nTComponent as Re } from "@kong-ui-public/i18n";
5
- const Pe = "20px", De = { title: "Change log level temporarily", description: "Choose how much information Kong Gateway writes to its logs. Changes automatically revert when the TTL expires.", log_level_label: "Log level", log_level_help: "Selecting a log level captures logs at the selected level and all lower-severity levels.", learn_more: "Learn more", expiration: { label: "Expiration", tooltip: "The duration before the log level automatically reverts to its default value.", help: { seconds: "Enter a value between 10 seconds and 3600 seconds.", mins: "Enter a value between 1 minute and 60 minutes." }, unit: { seconds: "secs", mins: "mins" } }, warning: "Higher log levels can significantly increase log volume and disk usage. Use them only while troubleshooting.", save: "Save", cancel: "Cancel", done: "Done", status_title: "Change log level status", node_host: "Node host", status: "Status", status_note: "Updates typically reach all data plane nodes in about 5 seconds. Monitor progress here while the update is in progress." }, Be = { debug: "Debug", info: "Info", notice: "Notice", warn: "Warn", error: "Error", crit: "Critical" }, $e = { in_progress: "In progress", applied: "Applied", reverted: "Reverted", superseded: "Superseded", failed: "Failed", unsupported: "Unsupported" }, Xe = {
6
- modal: De,
7
- log_level: Be,
8
- operation_status: $e
9
- };
10
- function Fe() {
11
- const a = Oe("en-us", Xe);
12
- return {
13
- i18n: a,
14
- i18nT: Re(a)
15
- // Translation component <i18n-t>
16
- };
17
- }
18
- const ze = {
19
- useI18n: Fe
20
- }, H = "/v2/control-planes/{controlPlaneId}", q = "/debug/cluster", Z = {
21
- logLevel: {
22
- konnect: {
23
- update: `${H}/nodes/log-level-operations`,
24
- results: `${H}/nodes/log-level-operations/{operationId}/results`
25
- },
26
- kongManager: {
27
- update: `${q}/data-planes/log-level-operations`,
28
- results: `${q}/data-planes/log-level-operations/{operationId}/results?size=1000`
29
- }
30
- }
31
- };
32
- var ee = /* @__PURE__ */ ((a) => (a.Debug = "debug", a.Info = "info", a.Notice = "notice", a.Warn = "warn", a.Error = "error", a.Critical = "crit", a))(ee || {});
33
- const Ge = [
34
- "debug",
35
- "info",
36
- "notice",
37
- "warn",
38
- "error",
39
- "crit"
40
- /* Critical */
41
- ], We = {
42
- key: 0,
43
- class: "change-log-level-modal-content"
44
- }, He = { class: "description" }, qe = { class: "log-level-field" }, Ze = { class: "field-help" }, je = { class: "expiration-field" }, Je = { class: "expiration-inputs" }, Qe = {
45
- key: 1,
46
- class: "change-log-level-status"
47
- }, Ye = { class: "status-note" }, j = 1, J = "mins", Q = 10, Y = 3600, et = 1, tt = 60, ot = 2e3, at = "https://developer.konghq.com/gateway/logs/", lt = /* @__PURE__ */ Ee({
48
- name: "ChangeLogLevelModal",
49
- __name: "ChangeLogLevelModal",
50
- props: /* @__PURE__ */ W({
51
- config: {},
52
- nodes: {},
53
- getNodeDetailRoute: { type: Function }
54
- }, {
55
- visible: { type: Boolean },
56
- visibleModifiers: {}
57
- }),
58
- emits: /* @__PURE__ */ W(["success", "close", "node-error"], ["update:visible"]),
59
- setup(a, { emit: L }) {
60
- const n = a, x = L, T = Ne(a, "visible"), { i18n: o } = ze.useI18n(), { axiosInstance: B } = we(n.config.axiosRequestConfig), { getMessageFromError: te } = Le(), $ = ee.Notice, oe = {
61
- in_progress: "info",
62
- applied: "success",
63
- reverted: "neutral",
64
- superseded: "neutral",
65
- failed: "danger",
66
- unsupported: "warning"
67
- }, ae = {
68
- in_progress: Ke,
69
- applied: Ve,
70
- reverted: D,
71
- superseded: D,
72
- failed: Me,
73
- unsupported: Ue
74
- }, le = {
75
- failed: 0,
76
- unsupported: 1,
77
- reverted: 2,
78
- superseded: 3,
79
- applied: 4,
80
- in_progress: 5
81
- }, p = r("edit"), C = r($), b = r(j), h = r(J), E = r(!1), N = r(""), U = r(""), S = r({}), A = r(null), y = r(null), M = r(!1), V = /* @__PURE__ */ new Set(), se = u(() => Ge.map((t) => ({
82
- label: o.t(`log_level.${t}`),
83
- value: t
84
- }))), ne = u(() => [
85
- { label: o.t("modal.expiration.unit.mins"), value: "mins" },
86
- { label: o.t("modal.expiration.unit.seconds"), value: "seconds" }
87
- ]), K = u(() => h.value === "mins" ? b.value * 60 : b.value), ie = u(() => o.t(`modal.expiration.help.${h.value}`)), O = u(() => Number.isInteger(b.value) && K.value >= Q && K.value <= Y), re = u(() => p.value === "status" ? o.t("modal.status_title") : o.t("modal.title")), ue = u(() => p.value === "status" ? o.t("modal.done") : o.t("modal.save")), de = u(() => [
88
- { key: "host", label: o.t("modal.node_host") },
89
- { key: "status", label: o.t("modal.status"), sortable: !0 }
90
- ]), X = u(() => n.nodes.map((t) => ({
91
- id: t.id,
92
- hostname: t.hostname,
93
- status: S.value[t.id] ?? "in_progress"
94
- }))), ce = u(() => {
95
- if (!A.value)
96
- return X.value;
97
- const t = A.value === "asc" ? 1 : -1, l = (e) => le[e] ?? Number.MAX_SAFE_INTEGER;
98
- return [...X.value].sort(
99
- (e, v) => (l(e.status) - l(v.status)) * t
100
- );
101
- }), F = (t, l) => {
102
- let e = `${n.config.apiBaseUrl}${t}`;
103
- return n.config.app === "konnect" && (e = e.replace(/{controlPlaneId}/gi, n.config.controlPlaneId)), e.replace(/{operationId}/gi, l ?? "");
104
- }, R = () => {
105
- M.value = !1, y.value && (clearTimeout(y.value), y.value = null);
106
- }, z = async () => {
107
- try {
108
- const t = F(Z.logLevel[n.config.app].results, U.value), { data: l } = await B.get(t);
109
- for (const e of l.data)
110
- if (S.value[e.node_id] = e.status, (e.status === "failed" || e.status === "unsupported") && !V.has(e.node_id)) {
111
- V.add(e.node_id);
112
- const v = n.nodes.find((k) => k.id === e.node_id)?.hostname ?? "";
113
- x("node-error", { id: e.node_id, hostname: v, status: e.status });
114
- }
115
- if (l.data.length > 0 && l.data.every((e) => e.status !== "in_progress")) {
116
- R();
117
- return;
118
- }
119
- } catch {
120
- }
121
- M.value && (y.value = setTimeout(() => {
122
- y.value = null, z();
123
- }, ot));
124
- }, pe = () => {
125
- S.value = {}, M.value = !0, z();
126
- }, ve = async () => {
127
- N.value = "", E.value = !0;
128
- try {
129
- const t = F(Z.logLevel[n.config.app].update), l = {
130
- log_level: C.value,
131
- ttl: K.value,
132
- targets: { node_ids: n.nodes.map((v) => v.id) }
133
- }, { data: e } = await B.post(t, l);
134
- U.value = e.id, x("success"), p.value = "status", pe();
135
- } catch (t) {
136
- N.value = te(t);
137
- } finally {
138
- E.value = !1;
139
- }
140
- }, me = () => {
141
- p.value === "status" ? G() : ve();
142
- }, G = () => {
143
- x("close");
144
- }, ge = (t) => {
145
- A.value = t.sortColumnKey === "status" ? t.sortColumnOrder : null;
146
- }, _e = () => {
147
- R(), p.value = "edit", C.value = $, b.value = j, h.value = J, N.value = "", U.value = "", S.value = {}, A.value = null, V.clear();
148
- };
149
- return ye(T, (t) => {
150
- t && _e();
151
- }), Te(R), (t, l) => {
152
- const e = m("KAlert"), v = m("KSelect"), k = m("KExternalLink"), he = m("KLabel"), fe = m("KInput"), be = m("KBadge"), Ie = m("KTableView"), xe = m("KModal");
153
- return f(), w(xe, {
154
- "action-button-disabled": p.value === "edit" && (E.value || !O.value || n.nodes.length === 0),
155
- "action-button-text": ue.value,
156
- "cancel-button-disabled": E.value,
157
- "cancel-button-text": i(o).t("modal.cancel"),
158
- "data-testid": "change-log-level-modal",
159
- "hide-cancel-button": p.value === "status",
160
- "hide-close-icon": E.value,
161
- "max-width": "640px",
162
- title: re.value,
163
- visible: T.value,
164
- onCancel: G,
165
- onProceed: me
166
- }, {
167
- default: g(() => [
168
- p.value === "edit" ? (f(), P("div", We, [
169
- _("p", He, d(i(o).t("modal.description")), 1),
170
- c(e, {
171
- appearance: "warning",
172
- "data-testid": "log-level-warning",
173
- message: i(o).t("modal.warning"),
174
- "show-icon": ""
175
- }, null, 8, ["message"]),
176
- _("div", qe, [
177
- c(v, {
178
- modelValue: C.value,
179
- "onUpdate:modelValue": l[0] || (l[0] = (s) => C.value = s),
180
- "data-testid": "log-level-select",
181
- items: se.value,
182
- "kpop-attributes": { "data-testid": "log-level-select-popover" },
183
- label: i(o).t("modal.log_level_label")
184
- }, null, 8, ["modelValue", "items", "label"]),
185
- _("p", Ze, [
186
- I(d(i(o).t("modal.log_level_help")) + " ", 1),
187
- c(k, {
188
- "data-testid": "log-level-learn-more",
189
- "hide-icon": "",
190
- href: at
191
- }, {
192
- default: g(() => [
193
- I(d(i(o).t("modal.learn_more")), 1)
194
- ]),
195
- _: 1
196
- })
197
- ])
198
- ]),
199
- _("div", je, [
200
- c(he, {
201
- class: "expiration-label",
202
- info: i(o).t("modal.expiration.tooltip"),
203
- "tooltip-attributes": { maxWidth: "340px" }
204
- }, {
205
- default: g(() => [
206
- I(d(i(o).t("modal.expiration.label")), 1)
207
- ]),
208
- _: 1
209
- }, 8, ["info"]),
210
- _("div", Je, [
211
- c(fe, {
212
- modelValue: b.value,
213
- "onUpdate:modelValue": l[1] || (l[1] = (s) => b.value = s),
214
- modelModifiers: { number: !0 },
215
- class: "expiration-value",
216
- "data-testid": "expiration-input",
217
- error: !O.value,
218
- max: h.value === "mins" ? tt : Y,
219
- min: h.value === "mins" ? et : Q,
220
- type: "number"
221
- }, null, 8, ["modelValue", "error", "max", "min"]),
222
- c(v, {
223
- modelValue: h.value,
224
- "onUpdate:modelValue": l[2] || (l[2] = (s) => h.value = s),
225
- "data-testid": "expiration-unit-select",
226
- items: ne.value,
227
- "kpop-attributes": { "data-testid": "expiration-unit-select-popover" },
228
- width: "140"
229
- }, null, 8, ["modelValue", "items"])
230
- ]),
231
- _("p", {
232
- class: Ce(["field-help", { "field-help-error": !O.value }])
233
- }, d(ie.value), 3)
234
- ]),
235
- N.value ? (f(), w(e, {
236
- key: 0,
237
- appearance: "danger",
238
- "data-testid": "log-level-error",
239
- message: N.value
240
- }, null, 8, ["message"])) : Se("", !0)
241
- ])) : (f(), P("div", Qe, [
242
- c(Ie, {
243
- class: "change-log-level-status-table",
244
- data: ce.value,
245
- "data-testid": "log-level-status-table",
246
- headers: de.value,
247
- "hide-pagination": "",
248
- "row-key": "id",
249
- onSort: ge
250
- }, {
251
- host: g(({ row: s }) => [
252
- a.getNodeDetailRoute ? (f(), w(k, {
253
- key: 0,
254
- "hide-icon": "",
255
- href: a.getNodeDetailRoute(s.id)
256
- }, {
257
- default: g(() => [
258
- I(d(s.hostname), 1)
259
- ]),
260
- _: 2
261
- }, 1032, ["href"])) : (f(), P(ke, { key: 1 }, [
262
- I(d(s.hostname), 1)
263
- ], 64))
264
- ]),
265
- status: g(({ row: s }) => [
266
- c(be, {
267
- appearance: oe[s.status],
268
- "data-testid": `log-level-status-${s.status}`
269
- }, {
270
- icon: g(() => [
271
- (f(), w(Ae(ae[s.status])))
272
- ]),
273
- default: g(() => [
274
- I(" " + d(i(o).t(`operation_status.${s.status}`)), 1)
275
- ]),
276
- _: 2
277
- }, 1032, ["appearance", "data-testid"])
278
- ]),
279
- _: 1
280
- }, 8, ["data", "headers"]),
281
- _("p", Ye, [
282
- c(i(D), {
283
- size: `var(--kui-icon-size-40, ${i(Pe)})`
284
- }, null, 8, ["size"]),
285
- _("span", null, d(i(o).t("modal.status_note")), 1)
286
- ])
287
- ]))
288
- ]),
289
- _: 1
290
- }, 8, ["action-button-disabled", "action-button-text", "cancel-button-disabled", "cancel-button-text", "hide-cancel-button", "hide-close-icon", "title", "visible"]);
291
- };
292
- }
293
- }), st = (a, L) => {
294
- const n = a.__vccOpts || a;
295
- for (const [x, T] of L)
296
- n[x] = T;
297
- return n;
298
- }, dt = /* @__PURE__ */ st(lt, [["__scopeId", "data-v-d89842b4"]]);
299
- export {
300
- dt as ChangeLogLevelModal,
301
- Ge as LOG_LEVELS,
302
- ee as LogLevel,
303
- ze as composables
304
- };
@@ -1 +0,0 @@
1
- (function(i,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong-ui-public/entities-shared"),require("@kong/icons"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/entities-shared","@kong/icons","@kong-ui-public/i18n"],e):(i=typeof globalThis<"u"?globalThis:i||self,e(i["kong-ui-public-entities-data-plane-nodes"]={},i.Vue,i["kong-ui-public-entities-shared"],i.KongIcons,i["kong-ui-public-i18n"]))})(this,(function(i,e,L,p,A){"use strict";const H="20px",j={modal:{title:"Change log level temporarily",description:"Choose how much information Kong Gateway writes to its logs. Changes automatically revert when the TTL expires.",log_level_label:"Log level",log_level_help:"Selecting a log level captures logs at the selected level and all lower-severity levels.",learn_more:"Learn more",expiration:{label:"Expiration",tooltip:"The duration before the log level automatically reverts to its default value.",help:{seconds:"Enter a value between 10 seconds and 3600 seconds.",mins:"Enter a value between 1 minute and 60 minutes."},unit:{seconds:"secs",mins:"mins"}},warning:"Higher log levels can significantly increase log volume and disk usage. Use them only while troubleshooting.",save:"Save",cancel:"Cancel",done:"Done",status_title:"Change log level status",node_host:"Node host",status:"Status",status_note:"Updates typically reach all data plane nodes in about 5 seconds. Monitor progress here while the update is in progress."},log_level:{debug:"Debug",info:"Info",notice:"Notice",warn:"Warn",error:"Error",crit:"Critical"},operation_status:{in_progress:"In progress",applied:"Applied",reverted:"Reverted",superseded:"Superseded",failed:"Failed",unsupported:"Unsupported"}};function Z(){const a=A.createI18n("en-us",j);return{i18n:a,i18nT:A.i18nTComponent(a)}}const M={useI18n:Z},B="/v2/control-planes/{controlPlaneId}",D="/debug/cluster",U={logLevel:{konnect:{update:`${B}/nodes/log-level-operations`,results:`${B}/nodes/log-level-operations/{operationId}/results`},kongManager:{update:`${D}/data-planes/log-level-operations`,results:`${D}/data-planes/log-level-operations/{operationId}/results?size=1000`}}};var E=(a=>(a.Debug="debug",a.Info="info",a.Notice="notice",a.Warn="warn",a.Error="error",a.Critical="crit",a))(E||{});const O=["debug","info","notice","warn","error","crit"],J={key:0,class:"change-log-level-modal-content"},Q={class:"description"},Y={class:"log-level-field"},ee={class:"field-help"},te={class:"expiration-field"},oe={class:"expiration-inputs"},ne={key:1,class:"change-log-level-status"},ae={class:"status-note"},K=1,R="mins",P=10,$=3600,le=1,se=60,ie=2e3,re="https://developer.konghq.com/gateway/logs/",de=((a,k)=>{const r=a.__vccOpts||a;for(const[g,b]of k)r[g]=b;return r})(e.defineComponent({name:"ChangeLogLevelModal",__name:"ChangeLogLevelModal",props:e.mergeModels({config:{},nodes:{},getNodeDetailRoute:{type:Function}},{visible:{type:Boolean},visibleModifiers:{}}),emits:e.mergeModels(["success","close","node-error"],["update:visible"]),setup(a,{emit:k}){const r=a,g=k,b=e.useModel(a,"visible"),{i18n:n}=M.useI18n(),{axiosInstance:X}=L.useAxios(r.config.axiosRequestConfig),{getMessageFromError:ce}=L.useErrors(),F=E.Notice,pe={in_progress:"info",applied:"success",reverted:"neutral",superseded:"neutral",failed:"danger",unsupported:"warning"},ue={in_progress:p.ProgressIcon,applied:p.CheckCircleIcon,reverted:p.InfoIcon,superseded:p.InfoIcon,failed:p.DangerCircleIcon,unsupported:p.WarningIcon},me={failed:0,unsupported:1,reverted:2,superseded:3,applied:4,in_progress:5},d=e.ref("edit"),v=e.ref(F),m=e.ref(K),u=e.ref(R),_=e.ref(!1),f=e.ref(""),C=e.ref(""),I=e.ref({}),x=e.ref(null),h=e.ref(null),y=e.ref(!1),V=new Set,ge=e.computed(()=>O.map(o=>({label:n.t(`log_level.${o}`),value:o}))),_e=e.computed(()=>[{label:n.t("modal.expiration.unit.mins"),value:"mins"},{label:n.t("modal.expiration.unit.seconds"),value:"seconds"}]),S=e.computed(()=>u.value==="mins"?m.value*60:m.value),fe=e.computed(()=>n.t(`modal.expiration.help.${u.value}`)),T=e.computed(()=>Number.isInteger(m.value)&&S.value>=P&&S.value<=$),he=e.computed(()=>d.value==="status"?n.t("modal.status_title"):n.t("modal.title")),be=e.computed(()=>d.value==="status"?n.t("modal.done"):n.t("modal.save")),ve=e.computed(()=>[{key:"host",label:n.t("modal.node_host")},{key:"status",label:n.t("modal.status"),sortable:!0}]),q=e.computed(()=>r.nodes.map(o=>({id:o.id,hostname:o.hostname,status:I.value[o.id]??"in_progress"}))),Ie=e.computed(()=>{if(!x.value)return q.value;const o=x.value==="asc"?1:-1,l=t=>me[t]??Number.MAX_SAFE_INTEGER;return[...q.value].sort((t,c)=>(l(t.status)-l(c.status))*o)}),G=(o,l)=>{let t=`${r.config.apiBaseUrl}${o}`;return r.config.app==="konnect"&&(t=t.replace(/{controlPlaneId}/gi,r.config.controlPlaneId)),t.replace(/{operationId}/gi,l??"")},w=()=>{y.value=!1,h.value&&(clearTimeout(h.value),h.value=null)},z=async()=>{try{const o=G(U.logLevel[r.config.app].results,C.value),{data:l}=await X.get(o);for(const t of l.data)if(I.value[t.node_id]=t.status,(t.status==="failed"||t.status==="unsupported")&&!V.has(t.node_id)){V.add(t.node_id);const c=r.nodes.find(N=>N.id===t.node_id)?.hostname??"";g("node-error",{id:t.node_id,hostname:c,status:t.status})}if(l.data.length>0&&l.data.every(t=>t.status!=="in_progress")){w();return}}catch{}y.value&&(h.value=setTimeout(()=>{h.value=null,z()},ie))},xe=()=>{I.value={},y.value=!0,z()},Ne=async()=>{f.value="",_.value=!0;try{const o=G(U.logLevel[r.config.app].update),l={log_level:v.value,ttl:S.value,targets:{node_ids:r.nodes.map(c=>c.id)}},{data:t}=await X.post(o,l);C.value=t.id,g("success"),d.value="status",xe()}catch(o){f.value=ce(o)}finally{_.value=!1}},Ee=()=>{d.value==="status"?W():Ne()},W=()=>{g("close")},ke=o=>{x.value=o.sortColumnKey==="status"?o.sortColumnOrder:null},Ce=()=>{w(),d.value="edit",v.value=F,m.value=K,u.value=R,f.value="",C.value="",I.value={},x.value=null,V.clear()};return e.watch(b,o=>{o&&Ce()}),e.onBeforeUnmount(w),(o,l)=>{const t=e.resolveComponent("KAlert"),c=e.resolveComponent("KSelect"),N=e.resolveComponent("KExternalLink"),ye=e.resolveComponent("KLabel"),Ve=e.resolveComponent("KInput"),Se=e.resolveComponent("KBadge"),Te=e.resolveComponent("KTableView"),we=e.resolveComponent("KModal");return e.openBlock(),e.createBlock(we,{"action-button-disabled":d.value==="edit"&&(_.value||!T.value||r.nodes.length===0),"action-button-text":be.value,"cancel-button-disabled":_.value,"cancel-button-text":e.unref(n).t("modal.cancel"),"data-testid":"change-log-level-modal","hide-cancel-button":d.value==="status","hide-close-icon":_.value,"max-width":"640px",title:he.value,visible:b.value,onCancel:W,onProceed:Ee},{default:e.withCtx(()=>[d.value==="edit"?(e.openBlock(),e.createElementBlock("div",J,[e.createElementVNode("p",Q,e.toDisplayString(e.unref(n).t("modal.description")),1),e.createVNode(t,{appearance:"warning","data-testid":"log-level-warning",message:e.unref(n).t("modal.warning"),"show-icon":""},null,8,["message"]),e.createElementVNode("div",Y,[e.createVNode(c,{modelValue:v.value,"onUpdate:modelValue":l[0]||(l[0]=s=>v.value=s),"data-testid":"log-level-select",items:ge.value,"kpop-attributes":{"data-testid":"log-level-select-popover"},label:e.unref(n).t("modal.log_level_label")},null,8,["modelValue","items","label"]),e.createElementVNode("p",ee,[e.createTextVNode(e.toDisplayString(e.unref(n).t("modal.log_level_help"))+" ",1),e.createVNode(N,{"data-testid":"log-level-learn-more","hide-icon":"",href:re},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).t("modal.learn_more")),1)]),_:1})])]),e.createElementVNode("div",te,[e.createVNode(ye,{class:"expiration-label",info:e.unref(n).t("modal.expiration.tooltip"),"tooltip-attributes":{maxWidth:"340px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).t("modal.expiration.label")),1)]),_:1},8,["info"]),e.createElementVNode("div",oe,[e.createVNode(Ve,{modelValue:m.value,"onUpdate:modelValue":l[1]||(l[1]=s=>m.value=s),modelModifiers:{number:!0},class:"expiration-value","data-testid":"expiration-input",error:!T.value,max:u.value==="mins"?se:$,min:u.value==="mins"?le:P,type:"number"},null,8,["modelValue","error","max","min"]),e.createVNode(c,{modelValue:u.value,"onUpdate:modelValue":l[2]||(l[2]=s=>u.value=s),"data-testid":"expiration-unit-select",items:_e.value,"kpop-attributes":{"data-testid":"expiration-unit-select-popover"},width:"140"},null,8,["modelValue","items"])]),e.createElementVNode("p",{class:e.normalizeClass(["field-help",{"field-help-error":!T.value}])},e.toDisplayString(fe.value),3)]),f.value?(e.openBlock(),e.createBlock(t,{key:0,appearance:"danger","data-testid":"log-level-error",message:f.value},null,8,["message"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",ne,[e.createVNode(Te,{class:"change-log-level-status-table",data:Ie.value,"data-testid":"log-level-status-table",headers:ve.value,"hide-pagination":"","row-key":"id",onSort:ke},{host:e.withCtx(({row:s})=>[a.getNodeDetailRoute?(e.openBlock(),e.createBlock(N,{key:0,"hide-icon":"",href:a.getNodeDetailRoute(s.id)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.hostname),1)]),_:2},1032,["href"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(s.hostname),1)],64))]),status:e.withCtx(({row:s})=>[e.createVNode(Se,{appearance:pe[s.status],"data-testid":`log-level-status-${s.status}`},{icon:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ue[s.status])))]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(n).t(`operation_status.${s.status}`)),1)]),_:2},1032,["appearance","data-testid"])]),_:1},8,["data","headers"]),e.createElementVNode("p",ae,[e.createVNode(e.unref(p.InfoIcon),{size:`var(--kui-icon-size-40, ${e.unref(H)})`},null,8,["size"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(n).t("modal.status_note")),1)])]))]),_:1},8,["action-button-disabled","action-button-text","cancel-button-disabled","cancel-button-text","hide-cancel-button","hide-close-icon","title","visible"])}}}),[["__scopeId","data-v-d89842b4"]]);i.ChangeLogLevelModal=de,i.LOG_LEVELS=O,i.LogLevel=E,i.composables=M,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})}));
package/dist/style.css DELETED
@@ -1 +0,0 @@
1
- .change-log-level-modal-content[data-v-d89842b4]{display:flex;flex-direction:column;gap:20px;gap:var(--kui-space-70, 20px)}.change-log-level-modal-content .description[data-v-d89842b4]{color:#3a3f51;color:var(--kui-color-text-neutral-stronger, #3a3f51);margin:0}.change-log-level-modal-content .field-help[data-v-d89842b4]{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:16px;line-height:var(--kui-line-height-20, 16px);margin:8px 0 0!important;margin:var(--kui-space-40, 8px) 0 0!important}.change-log-level-modal-content .field-help.field-help-error[data-v-d89842b4]{color:#d60027;color:var(--kui-color-text-danger, #d60027)}.change-log-level-modal-content .expiration-label[data-v-d89842b4]{display:flex}.change-log-level-modal-content .expiration-inputs[data-v-d89842b4]{align-items:flex-start;display:inline-flex;gap:8px;gap:var(--kui-space-40, 8px)}.change-log-level-modal-content .expiration-inputs .expiration-value[data-v-d89842b4]{width:140px}.change-log-level-status .change-log-level-status-table[data-v-d89842b4]{background-color:#0000;background-color:var(--kui-color-background-transparent, rgba(0, 0, 0, 0));border-bottom:1px solid #e0e4ea;border-bottom:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);max-height:400px;overflow:auto}.change-log-level-status .status-note[data-v-d89842b4]{color:#3a3f51;color:var(--kui-color-text-neutral-stronger, #3a3f51);display:flex;font-size:14px;font-size:var(--kui-font-size-30, 14px);gap:8px;gap:var(--kui-space-40, 8px);margin:16px 0 0!important;margin:var(--kui-space-60, 16px) 0 0!important}.change-log-level-status .status-note[data-v-d89842b4] svg{flex-shrink:0;margin-top:2px;margin-top:var(--kui-space-10, 2px)}
@@ -1,35 +0,0 @@
1
- import type { ChangeLogLevelConfig } from '../types';
2
- type __VLS_Props = {
3
- config: ChangeLogLevelConfig;
4
- nodes: Array<{
5
- id: string;
6
- hostname: string;
7
- }>;
8
- getNodeDetailRoute?: (nodeId: string) => string;
9
- };
10
- type __VLS_ModelProps = {
11
- 'visible'?: boolean;
12
- };
13
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
14
- declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
- success: () => any;
16
- close: () => any;
17
- "node-error": (payload: {
18
- id: string;
19
- hostname: string;
20
- status: "failed" | "unsupported";
21
- }) => any;
22
- "update:visible": (value: boolean | undefined) => any;
23
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
24
- onSuccess?: (() => any) | undefined;
25
- onClose?: (() => any) | undefined;
26
- "onNode-error"?: ((payload: {
27
- id: string;
28
- hostname: string;
29
- status: "failed" | "unsupported";
30
- }) => any) | undefined;
31
- "onUpdate:visible"?: ((value: boolean | undefined) => any) | undefined;
32
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
- declare const _default: typeof __VLS_export;
34
- export default _default;
35
- //# sourceMappingURL=ChangeLogLevelModal.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChangeLogLevelModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ChangeLogLevelModal.vue"],"names":[],"mappings":"AA0dA,OAAO,KAAK,EACV,oBAAoB,EAKrB,MAAM,UAAU,CAAA;AAQjB,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,KAAK,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC9C,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAA;CAChD,CAAC;AAmPF,KAAK,gBAAgB,GAAG;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAwYxD,QAAA,MAAM,YAAY;;;;YA5nBc,MAAM;kBAAY,MAAM;gBAAU,QAAQ,GAAG,aAAa;;;;;;;YAA1D,MAAM;kBAAY,MAAM;gBAAU,QAAQ,GAAG,aAAa;;;kFA+nBxF,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,6 +0,0 @@
1
- import useI18n from './useI18n';
2
- declare const _default: {
3
- useI18n: typeof useI18n;
4
- };
5
- export default _default;
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAA;;;;AAG/B,wBAEC"}
@@ -1,9 +0,0 @@
1
- import { createI18n, i18nTComponent } from '@kong-ui-public/i18n';
2
- import english from '../locales/en.json';
3
- interface UseI18nReturn {
4
- i18n: ReturnType<typeof createI18n<typeof english>>;
5
- i18nT: ReturnType<typeof i18nTComponent<typeof english>>;
6
- }
7
- export default function useI18n(): UseI18nReturn;
8
- export {};
9
- //# sourceMappingURL=useI18n.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../../src/composables/useI18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,OAAO,MAAM,oBAAoB,CAAA;AAExC,UAAU,aAAa;IACrB,IAAI,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,CAAA;IACnD,KAAK,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,CAAA;CACzD;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,IAAI,aAAa,CAO/C"}
@@ -1,14 +0,0 @@
1
- declare const _default: {
2
- logLevel: {
3
- konnect: {
4
- update: string;
5
- results: string;
6
- };
7
- kongManager: {
8
- update: string;
9
- results: string;
10
- };
11
- };
12
- };
13
- export default _default;
14
- //# sourceMappingURL=data-plane-nodes-endpoints.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"data-plane-nodes-endpoints.d.ts","sourceRoot":"","sources":["../../src/data-plane-nodes-endpoints.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,wBAWC"}
@@ -1,7 +0,0 @@
1
- import ChangeLogLevelModal from './components/ChangeLogLevelModal.vue';
2
- import composables from './composables';
3
- export { ChangeLogLevelModal };
4
- export { composables };
5
- export type * from './composables';
6
- export * from './types';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,MAAM,sCAAsC,CAAA;AACtE,OAAO,WAAW,MAAM,eAAe,CAAA;AAEvC,OAAO,EAAE,mBAAmB,EAAE,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,CAAA;AAEtB,mBAAmB,eAAe,CAAA;AAClC,cAAc,SAAS,CAAA"}
@@ -1,15 +0,0 @@
1
- import type { AxiosRequestConfig } from 'axios';
2
- interface BaseChangeLogLevelConfig {
3
- apiBaseUrl: string;
4
- axiosRequestConfig?: AxiosRequestConfig;
5
- }
6
- export interface KonnectChangeLogLevelConfig extends BaseChangeLogLevelConfig {
7
- app: 'konnect';
8
- controlPlaneId: string;
9
- }
10
- export interface KongManagerChangeLogLevelConfig extends BaseChangeLogLevelConfig {
11
- app: 'kongManager';
12
- }
13
- export type ChangeLogLevelConfig = KonnectChangeLogLevelConfig | KongManagerChangeLogLevelConfig;
14
- export {};
15
- //# sourceMappingURL=config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/types/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAE/C,UAAU,wBAAwB;IAChC,UAAU,EAAE,MAAM,CAAA;IAClB,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;CACxC;AAED,MAAM,WAAW,2BAA4B,SAAQ,wBAAwB;IAC3E,GAAG,EAAE,SAAS,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,+BAAgC,SAAQ,wBAAwB;IAC/E,GAAG,EAAE,aAAa,CAAA;CACnB;AAED,MAAM,MAAM,oBAAoB,GAAG,2BAA2B,GAAG,+BAA+B,CAAA"}
@@ -1,3 +0,0 @@
1
- export * from './config';
2
- export * from './log-level';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA"}
@@ -1,28 +0,0 @@
1
- export declare enum LogLevel {
2
- Debug = "debug",
3
- Info = "info",
4
- Notice = "notice",
5
- Warn = "warn",
6
- Error = "error",
7
- Critical = "crit"
8
- }
9
- export declare const LOG_LEVELS: LogLevel[];
10
- export interface LogLevelOperationPayload {
11
- log_level: LogLevel;
12
- ttl: number;
13
- targets: {
14
- node_ids: string[];
15
- };
16
- }
17
- export interface LogLevelOperationResponse {
18
- id: string;
19
- }
20
- export type LogLevelOperationStatus = 'in_progress' | 'applied' | 'reverted' | 'superseded' | 'failed' | 'unsupported';
21
- export interface LogLevelOperationResult {
22
- node_id: string;
23
- status: LogLevelOperationStatus;
24
- }
25
- export interface LogLevelOperationResultsResponse {
26
- data: LogLevelOperationResult[];
27
- }
28
- //# sourceMappingURL=log-level.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"log-level.d.ts","sourceRoot":"","sources":["../../../src/types/log-level.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,QAAQ,SAAS;CAClB;AAGD,eAAO,MAAM,UAAU,EAAE,QAAQ,EAOhC,CAAA;AAED,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,QAAQ,CAAA;IACnB,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE;QAAE,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAE,CAAA;CAChC;AAED,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAA;CACX;AAED,MAAM,MAAM,uBAAuB,GAC/B,aAAa,GACb,SAAS,GACT,UAAU,GACV,YAAY,GACZ,QAAQ,GACR,aAAa,CAAA;AAEjB,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,uBAAuB,CAAA;CAChC;AAED,MAAM,WAAW,gCAAgC;IAC/C,IAAI,EAAE,uBAAuB,EAAE,CAAA;CAChC"}