ywana-core8 0.0.995 → 0.0.997
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/dist/index.cjs +7 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +7 -4
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +7 -4
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/incubator/task.js +4 -2
package/package.json
CHANGED
package/src/incubator/task.js
CHANGED
@@ -166,7 +166,7 @@ export const TaskProgress = (props) => {
|
|
166
166
|
*/
|
167
167
|
export const TaskMonitor = (props) => {
|
168
168
|
|
169
|
-
const { title = "Task Monitor", filters = {}, editors, frequency = 5000 } = props
|
169
|
+
const { title = "Task Monitor", filters = {}, editors, frequency = 5000, onRefresh } = props
|
170
170
|
const context = useContext(TaskContext)
|
171
171
|
const [tasks = [], setTasks] = useState([])
|
172
172
|
const [minimized, setMinimized] = useState(false)
|
@@ -182,6 +182,7 @@ export const TaskMonitor = (props) => {
|
|
182
182
|
async function refresh() {
|
183
183
|
const tasks = await context.tasks(filters)
|
184
184
|
setTasks(tasks)
|
185
|
+
if (onRefresh) onRefresh(tasks)
|
185
186
|
}
|
186
187
|
|
187
188
|
async function remove(task) {
|
@@ -195,9 +196,9 @@ export const TaskMonitor = (props) => {
|
|
195
196
|
{ id: "init", label: "Init Date", type: TYPES.STRING, format: FORMATS.DATE },
|
196
197
|
{ id: "end", label: "End Date", type: TYPES.STRING, format: FORMATS.DATE },
|
197
198
|
{ id: "description", label: "Description" },
|
199
|
+
{ id: "message", label: "Message" },
|
198
200
|
{ id: "progress", label: "%" },
|
199
201
|
{ id: "percentage", label: "" },
|
200
|
-
{ id: "message", label: "Message" },
|
201
202
|
// { id: "resourceID", label: "Recurso" },
|
202
203
|
// { id: "owner", label: "Propietario" },
|
203
204
|
{ id: "actions", label: "" }
|
@@ -216,6 +217,7 @@ export const TaskMonitor = (props) => {
|
|
216
217
|
id: task.id,
|
217
218
|
state: <Text>{task.state}</Text>,
|
218
219
|
description: task.description,
|
220
|
+
message: task.message,
|
219
221
|
progress: <LinearProgress progress={task.percentage} />,
|
220
222
|
percentage: task.percentage,
|
221
223
|
init: task.init,
|