@devtron-labs/devtron-fe-common-lib 0.0.37-beta-4 → 0.0.38

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.
@@ -4,7 +4,7 @@ export interface AppStatusType {
4
4
  isJobView?: boolean;
5
5
  isVirtualEnv?: boolean;
6
6
  /**
7
- * Hide the status message if true
7
+ * Hide the status message if true and show status message in tooltip
8
8
  *
9
9
  * @default false
10
10
  */
package/dist/index.js CHANGED
@@ -23696,6 +23696,7 @@ function AppStatus(_a) {
23696
23696
  var iconClass = isNotDeployed ? StatusConstants.NOT_DEPLOYED.lowerCase : appStatusLowerCase;
23697
23697
  var statusMessage = status || (isVirtualEnv ? StatusConstants.NOT_AVILABLE.normalCase : '-');
23698
23698
  var notDeployed = isJobView ? YET_TO_RUN : StatusConstants.NOT_DEPLOYED.normalCase;
23699
+ var textContent = isNotDeployed ? notDeployed : statusMessage;
23699
23700
  var renderIcon = function () {
23700
23701
  if (iconClass) {
23701
23702
  return jsxRuntime.jsx("span", { className: "dc__app-summary__icon icon-dim-16 ".concat(iconClass, " ").concat(iconClass, "--node") });
@@ -23707,7 +23708,7 @@ function AppStatus(_a) {
23707
23708
  return (jsxRuntime.jsx(Tippy, __assign({ className: "default-tt w-200", arrow: false, placement: "top", content: "To fetch app status for GitOps based deployments open the app detail page" }, { children: jsxRuntime.jsx(SvgIcInfoOutlined, { className: "icon-dim-16 fcn-6" }) })));
23708
23709
  }
23709
23710
  };
23710
- return hideStatusMessage ? (renderIcon()) : (jsxRuntime.jsxs("div", __assign({ className: "flex left" }, { children: [jsxRuntime.jsx("div", __assign({ className: "flex mr-6" }, { children: renderIcon() })), jsxRuntime.jsx("p", __assign({ "data-testid": "".concat(status, "-app-status"), className: "dc__truncate-text dc__first-letter-capitalize cn-6 m-0" }, { children: isNotDeployed ? notDeployed : statusMessage }))] })));
23711
+ return hideStatusMessage ? (iconClass || isVirtualEnv ? (jsxRuntime.jsx(Tippy, __assign({ className: "default-tt", arrow: false, placement: "top", content: textContent }, { children: jsxRuntime.jsx("div", __assign({ className: "flex" }, { children: renderIcon() })) }))) : (renderIcon())) : (jsxRuntime.jsxs("div", __assign({ className: "flex left" }, { children: [jsxRuntime.jsx("div", __assign({ className: "flex mr-6" }, { children: renderIcon() })), jsxRuntime.jsx("p", __assign({ "data-testid": "".concat(status, "-app-status"), className: "dc__truncate-text dc__first-letter-capitalize cn-6 m-0" }, { children: textContent }))] })));
23711
23712
  }
23712
23713
 
23713
23714
  exports.AppStatus = AppStatus;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "0.0.37-beta-4",
3
+ "version": "0.0.38",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -20,6 +20,7 @@ export default function AppStatus({
20
20
  const iconClass = isNotDeployed ? StatusConstants.NOT_DEPLOYED.lowerCase : appStatusLowerCase
21
21
  const statusMessage = status || (isVirtualEnv ? StatusConstants.NOT_AVILABLE.normalCase : '-')
22
22
  const notDeployed = isJobView ? YET_TO_RUN : StatusConstants.NOT_DEPLOYED.normalCase
23
+ const textContent = isNotDeployed ? notDeployed : statusMessage
23
24
 
24
25
  const renderIcon = () => {
25
26
  if (iconClass) {
@@ -45,12 +46,18 @@ export default function AppStatus({
45
46
  }
46
47
 
47
48
  return hideStatusMessage ? (
48
- renderIcon()
49
+ iconClass || isVirtualEnv ? (
50
+ <Tippy className="default-tt" arrow={false} placement="top" content={textContent}>
51
+ <div className="flex">{renderIcon()}</div>
52
+ </Tippy>
53
+ ) : (
54
+ renderIcon()
55
+ )
49
56
  ) : (
50
57
  <div className="flex left">
51
58
  <div className="flex mr-6">{renderIcon()}</div>
52
59
  <p data-testid={`${status}-app-status`} className="dc__truncate-text dc__first-letter-capitalize cn-6 m-0">
53
- {isNotDeployed ? notDeployed : statusMessage}
60
+ {textContent}
54
61
  </p>
55
62
  </div>
56
63
  )
@@ -4,7 +4,7 @@ export interface AppStatusType {
4
4
  isJobView?: boolean
5
5
  isVirtualEnv?: boolean
6
6
  /**
7
- * Hide the status message if true
7
+ * Hide the status message if true and show status message in tooltip
8
8
  *
9
9
  * @default false
10
10
  */
@@ -1,13 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
2
- <g fill="none" fill-rule="evenodd">
3
- <g fill="#06C">
4
- <g>
5
- <g>
6
- <g>
7
- <path d="M10 1.667c4.6 0 8.333 3.733 8.333 8.333S14.6 18.333 10 18.333 1.667 14.6 1.667 10 5.4 1.667 10 1.667zm0 1.666C6.32 3.333 3.333 6.32 3.333 10c0 3.68 2.987 6.667 6.667 6.667 3.68 0 6.667-2.987 6.667-6.667 0-3.68-2.987-6.667-6.667-6.667zm0 5.834c.46 0 .833.373.833.833v3.333c0 .46-.373.834-.833.834-.46 0-.833-.373-.833-.834V10c0-.46.373-.833.833-.833zm0-3.334c.46 0 .833.373.833.834 0 .46-.373.833-.833.833-.46 0-.833-.373-.833-.833 0-.46.373-.834.833-.834z" transform="translate(-315.000000, -313.000000) translate(303.000000, 256.000000) translate(4.000000, 49.000000) translate(8.000000, 8.000000)"/>
8
- </g>
9
- </g>
10
- </g>
11
- </g>
12
- </g>
13
- </svg>