Skip to content

Commit 338b731

Browse files
authored
Fixes (#177)
* fix: adjust table cells and remove useless code * update snapshots
1 parent ae57c4c commit 338b731

File tree

15 files changed

+7
-17
lines changed

15 files changed

+7
-17
lines changed

src/environments/EnvironmentList.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ const columns: GridColDef[] = [
1717
{
1818
field: 'display_name',
1919
headerName: 'Name',
20-
flex: 1
20+
flex: 1,
21+
minWidth: 200
2122
},
2223
{
2324
field: 'repo',
2425
headerName: 'Repository URL',
2526
flex: 1,
27+
minWidth: 100,
2628
renderCell: params => {
2729
return (
2830
<a title={params.value} href={params.value} target="_blank">
@@ -34,7 +36,7 @@ const columns: GridColDef[] = [
3436
{
3537
field: 'ref',
3638
headerName: 'Reference',
37-
width: 200,
39+
width: 130,
3840
renderCell: params => {
3941
return (
4042
<a href={`${params.row.repo}/tree/${params.value}`}>{params.value}</a>
@@ -44,12 +46,12 @@ const columns: GridColDef[] = [
4446
{
4547
field: 'mem_limit',
4648
headerName: 'Mem. Limit (GB)',
47-
width: 200
49+
width: 180
4850
},
4951
{
5052
field: 'cpu_limit',
5153
headerName: 'CPU Limit',
52-
width: 150
54+
width: 130
5355
},
5456
{
5557
field: 'creation_date',

src/spawn/ImageTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ const ImageTable: React.FC<{ rows: IImage[] }> = ({ rows }) => {
165165
'& .MuiDataGrid-row:hover': {
166166
backgroundColor: '#f5f5f5'
167167
},
168-
'& .MuiDataGrid-row:nth-child(even)': {
168+
'& .MuiDataGrid-row:nth-of-type(even)': {
169169
backgroundColor: '#fafafa'
170170
}
171171
}}

tljh_repo2docker/__init__.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,6 @@ class SpawnerMixin(Configurable):
4444
<br />
4545
<div id="image-table-container" class="tljh-container"></div>
4646
<script src="/services/tljh_repo2docker/service_static/js/spawn.js"></script>
47-
<script>
48-
document.addEventListener('DOMContentLoaded', function() {
49-
const imageList = {{ image_list | tojson }};
50-
const container = document.getElementById('image-table-container');
51-
if (container) {
52-
const root = ReactDOM.createRoot(container);
53-
root.render(
54-
React.createElement(ImageTable, { rows: window.imageList })
55-
);
56-
}
57-
});
58-
</script>
5947
""",
6048
config=True,
6149
help="""
-319 Bytes
Loading
545 Bytes
Loading
160 Bytes
Loading
132 Bytes
Loading
131 Bytes
Loading
2.03 KB
Loading
-355 Bytes
Loading

0 commit comments

Comments
 (0)