@jfvilas/plugin-kwirth-log 0.12.8 → 0.13.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.
Files changed (29) hide show
  1. package/README.md +47 -4
  2. package/dist/api/KwirthLogClient.esm.js +4 -56
  3. package/dist/api/KwirthLogClient.esm.js.map +1 -1
  4. package/dist/api/types.esm.js.map +1 -1
  5. package/dist/components/{EntityKwirthLogContent/EntityKwirthLogContent.esm.js → EntityKwirthLogContent.esm.js} +119 -50
  6. package/dist/components/EntityKwirthLogContent.esm.js.map +1 -0
  7. package/dist/components/Options.esm.js +20 -0
  8. package/dist/components/Options.esm.js.map +1 -0
  9. package/dist/index.d.ts +16 -6
  10. package/dist/index.esm.js +4 -0
  11. package/dist/index.esm.js.map +1 -1
  12. package/dist/plugin.esm.js +1 -1
  13. package/dist/plugin.esm.js.map +1 -1
  14. package/dist/routes.esm.js.map +1 -1
  15. package/package.json +1 -1
  16. package/dist/assets/kwirth-log-component-not-found.svg +0 -30
  17. package/dist/components/ClusterList/ClusterList.esm.js +0 -30
  18. package/dist/components/ClusterList/ClusterList.esm.js.map +0 -1
  19. package/dist/components/ComponentNotFound/ComponentNotFound.esm.js +0 -64
  20. package/dist/components/ComponentNotFound/ComponentNotFound.esm.js.map +0 -1
  21. package/dist/components/EntityKwirthLogContent/EntityKwirthLogContent.esm.js.map +0 -1
  22. package/dist/components/EntityKwirthLogContent/index.esm.js +0 -2
  23. package/dist/components/EntityKwirthLogContent/index.esm.js.map +0 -1
  24. package/dist/components/ObjectSelector/ObjectSelector.esm.js +0 -84
  25. package/dist/components/ObjectSelector/ObjectSelector.esm.js.map +0 -1
  26. package/dist/components/Options/Options.esm.js +0 -20
  27. package/dist/components/Options/Options.esm.js.map +0 -1
  28. package/dist/components/StatusLog/StatusLog.esm.js +0 -10
  29. package/dist/components/StatusLog/StatusLog.esm.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,84 +0,0 @@
1
- import React, { useState } from 'react';
2
- import FormControl from '@material-ui/core/FormControl';
3
- import Select from '@material-ui/core/Select';
4
- import MenuItem from '@material-ui/core/MenuItem';
5
- import { Grid, Chip, Checkbox, ListItemText } from '@material-ui/core';
6
- import { InstanceConfigScopeEnum, parseResources } from '@jfvilas/kwirth-common';
7
-
8
- const ObjectSelector = (props) => {
9
- const [render, setRender] = useState(false);
10
- let pods = props.cluster.data;
11
- let namespaceList = Array.from(new Set(pods.map((p) => p.namespace)));
12
- const onNamespaceChange = (namespace) => {
13
- let i = props.selectedNamespaces.indexOf(namespace);
14
- if (i >= 0)
15
- props.selectedNamespaces.splice(i, 1);
16
- else
17
- props.selectedNamespaces.push(namespace);
18
- props.selectedPodNames.splice(0, props.selectedPodNames.length);
19
- let pods2 = getPodList();
20
- if (pods2.length === 1) props.selectedPodNames.push(...pods2.map((p) => p.name));
21
- props.selectedContainerNames.splice(0, props.selectedContainerNames.length);
22
- let containers = getContainerList();
23
- if (containers.length === 1) {
24
- props.selectedContainerNames.push(...containers);
25
- props.onSelect([...props.selectedNamespaces], [...props.selectedPodNames], [...props.selectedContainerNames]);
26
- }
27
- setRender(!render);
28
- };
29
- const onPodNameChange = (event) => {
30
- props.selectedPodNames.splice(0, props.selectedPodNames.length);
31
- props.selectedPodNames.push(...event.target.value);
32
- props.selectedContainerNames.splice(0, props.selectedContainerNames.length);
33
- let containers = getContainerList();
34
- if (containers.length === 1) props.selectedContainerNames.push(...containers);
35
- props.onSelect([...props.selectedNamespaces], [...props.selectedPodNames], [...props.selectedContainerNames]);
36
- setRender(!render);
37
- };
38
- const onContainerNameChange = (event) => {
39
- props.selectedContainerNames.splice(0, props.selectedContainerNames.length);
40
- props.selectedContainerNames.push(...event.target.value);
41
- props.onSelect([...props.selectedNamespaces], [...props.selectedPodNames], [...props.selectedContainerNames]);
42
- };
43
- const existAccessKey = (namespace) => {
44
- if (!props.cluster.accessKeys.has(InstanceConfigScopeEnum.VIEW)) return false;
45
- let accessKey = props.cluster.accessKeys.get(InstanceConfigScopeEnum.VIEW);
46
- if (accessKey) {
47
- let resources = parseResources(accessKey.resources);
48
- return resources.find((resource) => resource.namespaces === namespace);
49
- } else return false;
50
- };
51
- const getPodList = () => {
52
- return Array.from(pods.filter((m) => props.selectedNamespaces.includes(m.namespace)));
53
- };
54
- const getContainerList = () => {
55
- if (props.selectedNamespaces.length === 0 || props.selectedPodNames.length === 0) return [];
56
- let validpods = pods.filter((pod) => props.selectedNamespaces.includes(pod.namespace));
57
- validpods = validpods.filter((p2) => props.selectedPodNames.includes(p2.name));
58
- let validcontainers = [];
59
- for (var p of validpods) {
60
- validcontainers.push(...p.containers);
61
- }
62
- return Array.from(new Set(validcontainers));
63
- };
64
- return /* @__PURE__ */ React.createElement(Grid, { container: true, direction: "column", spacing: 0, style: { marginBottom: 6, width: "100%" } }, /* @__PURE__ */ React.createElement(Grid, { item: true }, namespaceList.map((ns, index) => {
65
- if (props.disabled) {
66
- if (existAccessKey(ns))
67
- return /* @__PURE__ */ React.createElement(Chip, { component: "span", key: index, label: ns, variant: props.selectedNamespaces.includes(ns) ? "default" : "outlined", size: "small", color: "default" });
68
- else
69
- return /* @__PURE__ */ React.createElement(Chip, { component: "span", key: index, label: ns, size: "small", color: "default", variant: "outlined" });
70
- } else {
71
- if (existAccessKey(ns))
72
- return /* @__PURE__ */ React.createElement(Chip, { component: "span", key: index, label: ns, onClick: () => onNamespaceChange(ns), variant: props.selectedNamespaces.includes(ns) ? "default" : "outlined", size: "small", color: "primary" });
73
- else
74
- return /* @__PURE__ */ React.createElement(Chip, { component: "span", key: index, label: ns, size: "small", color: "secondary", variant: "outlined" });
75
- }
76
- })), /* @__PURE__ */ React.createElement(Grid, { container: true, item: true, xs: 12, spacing: 2 }, /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React.createElement(FormControl, { size: "small", fullWidth: true }, /* @__PURE__ */ React.createElement(Select, { value: props.selectedPodNames, MenuProps: { variant: "menu" }, multiple: true, onChange: onPodNameChange, renderValue: (selected) => selected.join(", "), disabled: props.disabled || props.selectedNamespaces.length === 0 || getPodList().length === 1 }, getPodList().map((pod) => {
77
- return /* @__PURE__ */ React.createElement(MenuItem, { key: pod.name, value: pod.name }, /* @__PURE__ */ React.createElement(Checkbox, { checked: props.selectedPodNames.includes(pod.name) }), /* @__PURE__ */ React.createElement(ListItemText, { primary: pod.name }));
78
- })))), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React.createElement(FormControl, { size: "small", fullWidth: true }, /* @__PURE__ */ React.createElement(Select, { value: props.selectedContainerNames, MenuProps: { variant: "menu" }, multiple: true, onChange: onContainerNameChange, renderValue: (selected) => selected.join(", "), disabled: props.disabled || props.selectedPodNames.length === 0 || getContainerList().length === 1 }, getContainerList().map((container) => {
79
- return /* @__PURE__ */ React.createElement(MenuItem, { key: container, value: container }, /* @__PURE__ */ React.createElement(Checkbox, { checked: props.selectedContainerNames.includes(container) }), /* @__PURE__ */ React.createElement(ListItemText, { primary: container }));
80
- }))))));
81
- };
82
-
83
- export { ObjectSelector };
84
- //# sourceMappingURL=ObjectSelector.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ObjectSelector.esm.js","sources":["../../../src/components/ObjectSelector/ObjectSelector.tsx"],"sourcesContent":["import React, { useState } from 'react'\r\nimport { ClusterValidPods } from '@jfvilas/plugin-kwirth-common'\r\nimport FormControl from '@material-ui/core/FormControl'\r\nimport Select from '@material-ui/core/Select'\r\nimport MenuItem from '@material-ui/core/MenuItem'\r\nimport { Checkbox, Chip, Grid, ListItemText } from '@material-ui/core'\r\nimport { InstanceConfigScopeEnum, parseResources } from '@jfvilas/kwirth-common'\r\n\r\ninterface IProps {\r\n onSelect: (namespaces:string[], podNames:string[], containerNames:string[]) => void,\r\n cluster: ClusterValidPods,\r\n selectedNamespaces: string[],\r\n selectedPodNames: string[],\r\n selectedContainerNames: string[],\r\n disabled: boolean\r\n}\r\n\r\nconst ObjectSelector = (props: IProps) => {\r\n const [render, setRender] = useState(false)\r\n let pods = props.cluster.data\r\n let namespaceList = Array.from(new Set(pods.map(p => p.namespace)))\r\n\r\n const onNamespaceChange = (namespace:string) => {\r\n let i = props.selectedNamespaces.indexOf(namespace)\r\n if (i>=0)\r\n props.selectedNamespaces.splice(i,1)\r\n else\r\n props.selectedNamespaces.push(namespace)\r\n\r\n props.selectedPodNames.splice(0,props.selectedPodNames.length)\r\n let pods = getPodList()\r\n if (pods.length===1) props.selectedPodNames.push( ...pods.map(p => p.name) )\r\n\r\n props.selectedContainerNames.splice(0,props.selectedContainerNames.length)\r\n let containers = getContainerList()\r\n if (containers.length===1) {\r\n props.selectedContainerNames.push(...containers)\r\n props.onSelect([...props.selectedNamespaces], [...props.selectedPodNames], [...props.selectedContainerNames])\r\n }\r\n\r\n setRender(!render)\r\n };\r\n\r\n const onPodNameChange = (event : any) => {\r\n props.selectedPodNames.splice(0,props.selectedPodNames.length)\r\n props.selectedPodNames.push( ...event.target.value )\r\n\r\n props.selectedContainerNames.splice(0,props.selectedContainerNames.length)\r\n let containers = getContainerList()\r\n if (containers.length===1) props.selectedContainerNames.push(...containers)\r\n\r\n props.onSelect([...props.selectedNamespaces], [...props.selectedPodNames], [...props.selectedContainerNames])\r\n\r\n setRender(!render)\r\n };\r\n\r\n const onContainerNameChange = (event : any) => {\r\n props.selectedContainerNames.splice(0,props.selectedContainerNames.length)\r\n props.selectedContainerNames.push( ...event.target.value )\r\n props.onSelect([...props.selectedNamespaces], [...props.selectedPodNames], [...props.selectedContainerNames])\r\n };\r\n\r\n const existAccessKey = (namespace:string) => {\r\n if (!props.cluster.accessKeys.has(InstanceConfigScopeEnum.VIEW)) return false\r\n let accessKey = props.cluster.accessKeys.get(InstanceConfigScopeEnum.VIEW)\r\n if (accessKey) {\r\n let resources = parseResources(accessKey.resources)\r\n return (resources.find(resource => resource.namespaces === namespace))\r\n }\r\n else return false\r\n\r\n }\r\n\r\n const getPodList = () => {\r\n return Array.from(pods.filter(m => props.selectedNamespaces.includes(m.namespace)))\r\n }\r\n\r\n const getContainerList = () => {\r\n if (props.selectedNamespaces.length===0 || props.selectedPodNames.length===0) return []\r\n let validpods = pods.filter(pod => props.selectedNamespaces.includes(pod.namespace))\r\n validpods = validpods.filter(p => props.selectedPodNames.includes(p.name))\r\n let validcontainers:string[] = []\r\n for (var p of validpods) {\r\n validcontainers.push ( ...p.containers )\r\n }\r\n return Array.from(new Set(validcontainers))\r\n }\r\n\r\n return (\r\n <Grid container direction='column' spacing={0} style={{marginBottom:6, width:'100%'}}>\r\n <Grid item>\r\n {\r\n namespaceList.map ((ns,index) => {\r\n if (props.disabled) {\r\n if (existAccessKey(ns))\r\n return <Chip component={'span'} key={index} label={ns as string} variant={props.selectedNamespaces.includes(ns)?'default':'outlined'} size='small' color='default' />\r\n else\r\n return <Chip component={'span'} key={index} label={ns as string} size='small' color='default' variant={'outlined'}/>\r\n }\r\n else {\r\n if (existAccessKey(ns))\r\n return <Chip component={'span'} key={index} label={ns as string} onClick={() => onNamespaceChange(ns)} variant={props.selectedNamespaces.includes(ns)?'default':'outlined'} size='small' color='primary' />\r\n else\r\n return <Chip component={'span'} key={index} label={ns as string} size='small' color='secondary' variant={'outlined'}/>\r\n }\r\n })\r\n }\r\n </Grid>\r\n <Grid container item xs={12} spacing={2}>\r\n <Grid item xs={6}>\r\n <FormControl size='small' fullWidth>\r\n <Select value={props.selectedPodNames} MenuProps={{variant:'menu'}} multiple onChange={onPodNameChange} renderValue={(selected) => (selected as string[]).join(', ')} disabled={props.disabled || props.selectedNamespaces.length===0 || getPodList().length===1}>\r\n {\r\n getPodList().map(pod => {\r\n return (\r\n <MenuItem key={pod.name} value={pod.name}>\r\n <Checkbox checked={props.selectedPodNames.includes(pod.name)} />\r\n <ListItemText primary={pod.name} />\r\n </MenuItem>\r\n )\r\n })\r\n }\r\n </Select>\r\n </FormControl>\r\n </Grid>\r\n <Grid item xs={6}>\r\n <FormControl size='small' fullWidth>\r\n <Select value={props.selectedContainerNames} MenuProps={{variant:'menu'}} multiple onChange={onContainerNameChange} renderValue={(selected) => (selected as string[]).join(', ')} disabled={props.disabled || props.selectedPodNames.length===0 || getContainerList().length===1}>\r\n {\r\n getContainerList().map(container => {\r\n return (\r\n <MenuItem key={container} value={container}>\r\n <Checkbox checked={props.selectedContainerNames.includes(container)} />\r\n <ListItemText primary={container} />\r\n </MenuItem>\r\n )\r\n })\r\n }\r\n </Select>\r\n </FormControl>\r\n </Grid>\r\n </Grid>\r\n </Grid>\r\n )\r\n}\r\n\r\nexport { ObjectSelector }"],"names":["pods","p"],"mappings":";;;;;;;AAiBM,MAAA,cAAA,GAAiB,CAAC,KAAkB,KAAA;AACtC,EAAA,MAAM,CAAC,MAAA,EAAQ,SAAS,CAAA,GAAI,SAAS,KAAK,CAAA;AAC1C,EAAI,IAAA,IAAA,GAAO,MAAM,OAAQ,CAAA,IAAA;AACzB,EAAI,IAAA,aAAA,GAAgB,KAAM,CAAA,IAAA,CAAK,IAAI,GAAA,CAAI,IAAK,CAAA,GAAA,CAAI,CAAK,CAAA,KAAA,CAAA,CAAE,SAAS,CAAC,CAAC,CAAA;AAElE,EAAM,MAAA,iBAAA,GAAoB,CAAC,SAAqB,KAAA;AAC5C,IAAA,IAAI,CAAI,GAAA,KAAA,CAAM,kBAAmB,CAAA,OAAA,CAAQ,SAAS,CAAA;AAClD,IAAA,IAAI,CAAG,IAAA,CAAA;AACH,MAAM,KAAA,CAAA,kBAAA,CAAmB,MAAO,CAAA,CAAA,EAAE,CAAC,CAAA;AAAA;AAEnC,MAAM,KAAA,CAAA,kBAAA,CAAmB,KAAK,SAAS,CAAA;AAE3C,IAAA,KAAA,CAAM,gBAAiB,CAAA,MAAA,CAAO,CAAE,EAAA,KAAA,CAAM,iBAAiB,MAAM,CAAA;AAC7D,IAAA,IAAIA,QAAO,UAAW,EAAA;AACtB,IAAA,IAAIA,KAAK,CAA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A,EAAmB,CAAA,GAAA,CAAI,CAAa,SAAA,KAAA;AAChC,IAAA,2CACK,QAAS,EAAA,EAAA,GAAA,EAAK,WAAW,KAAO,EAAA,SAAA,EAAA,sCAC5B,QAAS,EAAA,EAAA,OAAA,EAAS,MAAM,sBAAuB,CAAA,QAAA,CAAS,SAAS,CAAG,EAAA,CAAA,sCACpE,YAAa,EAAA,EAAA,OAAA,EAAS,WAAW,CACtC,CAAA;AAAA,GAEP,CAET,CACJ,CACJ,CACJ,CACJ,CAAA;AAER;;;;"}
@@ -1,20 +0,0 @@
1
- import React, { useState } from 'react';
2
- import CardHeader from '@material-ui/core/CardHeader';
3
- import Checkbox from '@material-ui/core/Checkbox';
4
- import Divider from '@material-ui/core/Divider';
5
- import FormControlLabel from '@material-ui/core/FormControlLabel';
6
- import Grid from '@material-ui/core/Grid';
7
- import { Typography } from '@material-ui/core';
8
-
9
- const Options = (props) => {
10
- const [options, setOptions] = useState(props.options);
11
- const handleChange = (change) => {
12
- var a = { ...options, ...change };
13
- setOptions(a);
14
- props.onChange(a);
15
- };
16
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(CardHeader, { title: "Options" }), /* @__PURE__ */ React.createElement(Divider, { style: { marginTop: 8 } }), /* @__PURE__ */ React.createElement(Grid, { container: true, direction: "column", spacing: 0 }, /* @__PURE__ */ React.createElement(Grid, { item: true }, /* @__PURE__ */ React.createElement(FormControlLabel, { style: { marginLeft: 8 }, label: "From start", control: /* @__PURE__ */ React.createElement(Checkbox, { checked: options.fromStart, onChange: () => handleChange({ fromStart: !options.fromStart }), disabled: props.disabled }) })), /* @__PURE__ */ React.createElement(Grid, { item: true }, /* @__PURE__ */ React.createElement(FormControlLabel, { style: { marginLeft: 8 }, label: "Add timestamp", control: /* @__PURE__ */ React.createElement(Checkbox, { checked: options.timestamp, onChange: () => handleChange({ timestamp: !options.timestamp }), disabled: props.disabled }) })), /* @__PURE__ */ React.createElement(Grid, { item: true }, /* @__PURE__ */ React.createElement(FormControlLabel, { style: { marginLeft: 8 }, control: /* @__PURE__ */ React.createElement(Checkbox, { checked: options.follow, onChange: () => handleChange({ follow: !options.follow }) }), label: "Follow log", disabled: props.disabled })), /* @__PURE__ */ React.createElement(Grid, { item: true }, /* @__PURE__ */ React.createElement(Typography, { style: { fontSize: 9, marginLeft: 20, marginTop: 4, marginBottom: 6 } }, "Powered by ", /* @__PURE__ */ React.createElement("a", { href: "https://jfvilas.github.io/kwirth/", target: "_blank", style: { color: "blue" } }, "Kwirth")))));
17
- };
18
-
19
- export { Options };
20
- //# sourceMappingURL=Options.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Options.esm.js","sources":["../../../src/components/Options/Options.tsx"],"sourcesContent":["import React, { useState } from 'react'\r\nimport CardHeader from '@material-ui/core/CardHeader'\r\nimport Checkbox from '@material-ui/core/Checkbox'\r\nimport Divider from '@material-ui/core/Divider'\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel'\r\nimport Grid from '@material-ui/core/Grid'\r\nimport { Typography } from '@material-ui/core'\r\n\r\ninterface IProps {\r\n options: any,\r\n disabled: boolean,\r\n onChange: (options:{}) => void\r\n}\r\n\r\nconst Options = (props: IProps) => {\r\n const [options, setOptions] = useState<any>(props.options);\r\n\r\n const handleChange = (change:any) => {\r\n var a = {...options,...change}\r\n setOptions(a);\r\n props.onChange(a);\r\n }\r\n\r\n return (<>\r\n <CardHeader title={'Options'}/>\r\n <Divider style={{marginTop:8}}/>\r\n <Grid container direction='column' spacing={0}>\r\n <Grid item >\r\n <FormControlLabel style={{marginLeft:8}} label=\"From start\" control={<Checkbox checked={options.fromStart} onChange={() => handleChange({fromStart:!options.fromStart})} disabled={props.disabled}/>} />\r\n </Grid>\r\n <Grid item >\r\n <FormControlLabel style={{marginLeft:8}} label=\"Add timestamp\" control={<Checkbox checked={options.timestamp} onChange={() => handleChange({timestamp:!options.timestamp})} disabled={props.disabled}/>} />\r\n </Grid>\r\n <Grid item >\r\n <FormControlLabel style={{marginLeft:8}} control={<Checkbox checked={options.follow} onChange={() => handleChange({follow:!options.follow})} />} label=\"Follow log\" disabled={props.disabled}/>\r\n </Grid>\r\n <Grid item >\r\n <Typography style={{fontSize:9, marginLeft:20, marginTop:4, marginBottom:6}}>Powered by <a href='https://jfvilas.github.io/kwirth/' target='_blank' style={{color:'blue'}}>Kwirth</a></Typography>\r\n </Grid>\r\n </Grid>\r\n </>)\r\n}\r\n\r\nexport { Options }"],"names":[],"mappings":";;;;;;;;AAcM,MAAA,OAAA,GAAU,CAAC,KAAkB,KAAA;AAC/B,EAAA,MAAM,CAAC,OAAS,EAAA,UAAU,CAAI,GAAA,QAAA,CAAc,MAAM,OAAO,CAAA;AAEzD,EAAM,MAAA,YAAA,GAAe,CAAC,MAAe,KAAA;AACjC,IAAA,IAAI,CAAI,GAAA,EAAC,GAAG,OAAA,EAAQ,GAAG,MAAM,EAAA;AAC7B,IAAA,UAAA,CAAW,CAAC,CAAA;AACZ,IAAA,KAAA,CAAM,SAAS,CAAC,CAAA;AAAA,GACpB;AAEA,EAAA,iFACK,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,KAAO,EAAA,SAAA,EAAU,mBAC5B,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EAAQ,KAAO,EAAA,EAAC,WAAU,CAAC,EAAA,EAAE,CAC9B,kBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,SAAS,EAAA,IAAA,EAAC,SAAU,EAAA,QAAA,EAAS,SAAS,CACxC,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,IAAK,EAAA,EAAA,IAAA,EAAI,wBACL,KAAA,CAAA,aAAA,CAAA,gBAAA,EAAA,EAAiB,KAAO,EAAA,EAAC,YAAW,CAAC,EAAA,EAAG,OAAM,YAAa,EAAA,OAAA,sCAAU,QAAS,EAAA,EAAA,OAAA,EAAS,OAAQ,CAAA,SAAA,EAAW,UAAU,MAAM,YAAA,CAAa,EAAC,SAAA,EAAU,CAAC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;;;"}
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { Dialog, DialogTitle, DialogContent, Typography, DialogActions, Button } from '@material-ui/core';
3
- import { InstanceMessageTypeEnum } from '@jfvilas/kwirth-common';
4
-
5
- const StatusLog = (props) => {
6
- return /* @__PURE__ */ React.createElement(Dialog, { open: true }, /* @__PURE__ */ React.createElement(DialogTitle, null, "Stauts: ", props.level), /* @__PURE__ */ React.createElement(DialogContent, null, props.statusMessages.filter((m) => m.type === InstanceMessageTypeEnum.SIGNAL && m.level === props.level).map((m, index) => /* @__PURE__ */ React.createElement(Typography, { key: index }, m.text))), /* @__PURE__ */ React.createElement(DialogActions, null, /* @__PURE__ */ React.createElement(Button, { onClick: () => props.onClear(props.level), color: "primary", variant: "contained" }, "Clear"), /* @__PURE__ */ React.createElement(Button, { onClick: props.onClose, color: "primary", variant: "contained" }, "Close")));
7
- };
8
-
9
- export { StatusLog };
10
- //# sourceMappingURL=StatusLog.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StatusLog.esm.js","sources":["../../../src/components/StatusLog/StatusLog.tsx"],"sourcesContent":["import React from 'react';\r\nimport { Dialog, DialogTitle, DialogContent, DialogActions, Button, Typography } from '@material-ui/core'\r\nimport { InstanceMessageTypeEnum, SignalMessageLevelEnum } from '@jfvilas/kwirth-common'\r\nimport { IStatusLine } from '@jfvilas/plugin-kwirth-common';\r\n\r\ninterface IProps {\r\n level: SignalMessageLevelEnum\r\n statusMessages: IStatusLine[]\r\n onClear: (level:SignalMessageLevelEnum) => void\r\n onClose: () => void\r\n}\r\n\r\nconst StatusLog = (props:IProps) => {\r\n return (\r\n <Dialog open={true}>\r\n <DialogTitle>\r\n Stauts: {props.level} \r\n </DialogTitle>\r\n <DialogContent>\r\n { props.statusMessages.filter(m => m.type === InstanceMessageTypeEnum.SIGNAL && m.level === props.level).map( (m,index) => <Typography key={index}>{m.text}</Typography>) }\r\n </DialogContent>\r\n <DialogActions>\r\n <Button onClick={() => props.onClear(props.level)} color='primary' variant='contained'>Clear</Button>\r\n <Button onClick={props.onClose} color='primary' variant='contained'>Close</Button>\r\n </DialogActions>\r\n </Dialog>\r\n )\r\n\r\n}\r\n\r\nexport { StatusLog }"],"names":[],"mappings":";;;;AAYM,MAAA,SAAA,GAAY,CAAC,KAAiB,KAAA;AAChC,EAAA,uBACK,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAO,IAAM,EAAA,IAAA,EAAA,kBACT,KAAA,CAAA,aAAA,CAAA,WAAA,EAAA,IAAA,EAAY,UACA,EAAA,KAAA,CAAM,KACnB,CAAA,kBACC,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA,IAAA,EACK,MAAM,cAAe,CAAA,MAAA,CAAO,CAAK,CAAA,KAAA,CAAA,CAAE,IAAS,KAAA,uBAAA,CAAwB,MAAU,IAAA,CAAA,CAAE,UAAU,KAAM,CAAA,KAAK,CAAE,CAAA,GAAA,CAAK,CAAC,CAAA,EAAE,KAAU,qBAAA,KAAA,CAAA,aAAA,CAAC,cAAW,GAAK,EAAA,KAAA,EAAA,EAAQ,CAAE,CAAA,IAAK,CAAa,CAC5K,CACA,kBAAA,KAAA,CAAA,aAAA,CAAC,aACG,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,MAAO,EAAA,EAAA,OAAA,EAAS,MAAM,KAAA,CAAM,OAAQ,CAAA,KAAA,CAAM,KAAK,CAAG,EAAA,KAAA,EAAM,SAAU,EAAA,OAAA,EAAQ,WAAY,EAAA,EAAA,OAAK,CAC5F,kBAAA,KAAA,CAAA,aAAA,CAAC,UAAO,OAAS,EAAA,KAAA,CAAM,OAAS,EAAA,KAAA,EAAM,SAAU,EAAA,OAAA,EAAQ,WAAY,EAAA,EAAA,OAAK,CAC7E,CACJ,CAAA;AAGR;;;;"}