@ansible/ansible-ui-framework 0.0.278 → 0.0.279
Sign up to get free protection for your applications and to get access to all the features.
@@ -20,9 +20,7 @@ exports.ElapsedTimeCell = void 0;
|
|
20
20
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
21
21
|
var react_core_1 = require("@patternfly/react-core");
|
22
22
|
var react_1 = require("react");
|
23
|
-
var react_i18next_1 = require("react-i18next");
|
24
23
|
function ElapsedTimeCell(props) {
|
25
|
-
var t = (0, react_i18next_1.useTranslation)().t;
|
26
24
|
var start = (0, react_1.useMemo)(function () { var _a; return new Date((_a = props.start) !== null && _a !== void 0 ? _a : 0).valueOf(); }, [props.start]);
|
27
25
|
var finish = (0, react_1.useMemo)(function () { var _a; return new Date((_a = props.finish) !== null && _a !== void 0 ? _a : 0).valueOf(); }, [props.finish]);
|
28
26
|
var _a = __read((0, react_1.useState)(Math.max(0, finish - start.valueOf())), 2), elapsed = _a[0], setElapsed = _a[1];
|
@@ -44,6 +42,6 @@ function ElapsedTimeCell(props) {
|
|
44
42
|
var days = Math.floor(totalSeconds / 60 / 60 / 24);
|
45
43
|
if (!start)
|
46
44
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
47
|
-
return ((0, jsx_runtime_1.jsxs)(react_core_1.Split, { children: [days !== 0 && ((0, jsx_runtime_1.jsxs)(react_core_1.SplitItem, { children: [days,
|
45
|
+
return ((0, jsx_runtime_1.jsxs)(react_core_1.Split, { children: [days !== 0 && ((0, jsx_runtime_1.jsxs)(react_core_1.SplitItem, { children: [days, 'd', "\u00A0"] })), hours !== 0 && ((0, jsx_runtime_1.jsxs)(react_core_1.SplitItem, { children: [hours, 'h', "\u00A0"] })), minutes !== 0 && ((0, jsx_runtime_1.jsxs)(react_core_1.SplitItem, { children: [minutes, 'm', "\u00A0"] })), (0, jsx_runtime_1.jsxs)(react_core_1.SplitItem, { children: [seconds, 's'] })] }));
|
48
46
|
}
|
49
47
|
exports.ElapsedTimeCell = ElapsedTimeCell;
|
package/package.json
CHANGED