Skip to content

Commit 0c3c4d5

Browse files
committed
Merge branch 'main' into feature/errors-rest
2 parents c141515 + e9f7165 commit 0c3c4d5

File tree

4 files changed

+23
-16
lines changed

4 files changed

+23
-16
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "digma-ui",
3-
"version": "12.0.1",
3+
"version": "12.0.2",
44
"description": "Digma UI",
55
"scripts": {
66
"lint:eslint": "eslint --cache .",

src/components/Admin/Environments/index.tsx

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
setEnvironmentToDelete,
2323
setIsSidebarOpen
2424
} from "../../../redux/slices/environmentsSlice";
25+
import { useConfigSelector } from "../../../store/config/useConfigSelector";
2526
import { FeatureFlag } from "../../../types";
2627
import { sortEnvironments } from "../../common/IssuesReport/utils";
2728
import { Pagination } from "../../common/v3/Pagination";
@@ -37,6 +38,7 @@ const columnHelper = createColumnHelper<Environment>();
3738
export const Environments = () => {
3839
const containerRef = useRef<HTMLDivElement>(null);
3940
const { data: about } = useGetAboutQuery();
41+
const { isSandboxModeEnabled } = useConfigSelector();
4042
const isCreateEnvironmentSidebarOpen = useAdminSelector(
4143
(state) => state.environmentsSlice.isSidebarOpen
4244
);
@@ -63,7 +65,7 @@ export const Environments = () => {
6365
columnHelper.accessor("name", {
6466
header: "Name",
6567
meta: {
66-
width: isEnvironmentLastActiveTimestampEnabled ? "60%" : "80%",
68+
width: "100%",
6769
minWidth: 60
6870
},
6971
cell: (info) => {
@@ -103,18 +105,22 @@ export const Environments = () => {
103105
return <s.EnvironmentType>{value}</s.EnvironmentType>;
104106
}
105107
}),
106-
columnHelper.accessor((row) => row, {
107-
header: "Actions",
108-
meta: {
109-
width: "10%",
110-
minWidth: 60,
111-
textAlign: "right"
112-
},
113-
cell: (info) => {
114-
const value = info.getValue();
115-
return <ActionsMenuButton environment={value} />;
116-
}
117-
})
108+
...(isSandboxModeEnabled
109+
? []
110+
: [
111+
columnHelper.accessor((row) => row, {
112+
header: "Actions",
113+
meta: {
114+
width: "10%",
115+
minWidth: 60,
116+
textAlign: "right"
117+
},
118+
cell: (info) => {
119+
const value = info.getValue();
120+
return <ActionsMenuButton environment={value} />;
121+
}
122+
})
123+
])
118124
];
119125

120126
const table = useReactTable({

src/components/Admin/Environments/styles.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export const TableHeaderCell = styled.div`
4545
4646
&:last-child {
4747
padding-right: 18px;
48+
text-align: right;
4849
}
4950
`;
5051

0 commit comments

Comments
 (0)