@@ -8,12 +8,11 @@ import {
88 Descriptions ,
99 Button ,
1010 Spin ,
11- Popover ,
1211 Modal ,
1312 Checkbox ,
1413} from "antd" ;
1514import { mapResponseError } from "../../utils/api/errors" ;
16- import { ApiOutlined , CopyOutlined , EllipsisOutlined } from "@ant-design/icons" ;
15+ import { ApiOutlined , CopyOutlined } from "@ant-design/icons" ;
1716import { useResourceListActions } from "./ResourceList/ResourceListActionsContext" ;
1817import { useTheme } from "../theme/ThemeContext" ;
1918
@@ -185,26 +184,6 @@ const Service = ({ name, namespace }: Props) => {
185184 ) ;
186185 } ;
187186
188- const portActionsMenu = ( port : any ) => {
189- return (
190- < div style = { { width : "400px" } } >
191- < h3 > Port actions</ h3 >
192- < Divider style = { { margin : "8px" } } />
193- < Row style = { { margin : 4 , gap : 8 } } >
194- < Button
195- style = { { width : "100%" } }
196- onClick = { ( ) => {
197- setPortForwardModal ( { open : true , ports : [ port . port ] } ) ;
198- } }
199- >
200- < ApiOutlined />
201- Port forward
202- </ Button >
203- </ Row >
204- </ div >
205- ) ;
206- } ;
207-
208187 const portForwardCommand = (
209188 < div >
210189 < span style = { { color : mode === "light" ? "navy" : "lightblue" } } >
@@ -259,6 +238,7 @@ const Service = ({ name, namespace }: Props) => {
259238 title = "Name"
260239 dataIndex = "name"
261240 key = "name"
241+ width = "20%"
262242 render = { ( text ) =>
263243 text ? (
264244 text
@@ -267,28 +247,26 @@ const Service = ({ name, namespace }: Props) => {
267247 )
268248 }
269249 />
270- < Table . Column title = "Protocol" dataIndex = "protocol" />
271- < Table . Column title = "Port" dataIndex = "port" />
272- < Table . Column title = "Target port" dataIndex = "targetPort" />
250+ < Table . Column title = "Protocol" dataIndex = "protocol" width = "19%" />
251+ < Table . Column title = "Port" dataIndex = "port" width = "18%" />
252+ < Table . Column
253+ title = "Target port"
254+ dataIndex = "targetPort"
255+ width = "18%"
256+ />
273257 < Table . Column
274- title = "Actions"
275258 key = "actions"
276- width = "8 %"
259+ width = "25 %"
277260 render = { ( port ) => (
278- < Popover
279- placement = { "topRight" }
280- content = { portActionsMenu ( port ) }
281- trigger = "click"
261+ < Button
262+ style = { { width : "100%" } }
263+ onClick = { ( ) => {
264+ setPortForwardModal ( { open : true , ports : [ port . port ] } ) ;
265+ } }
282266 >
283- < div
284- style = { {
285- display : "flex" ,
286- justifyContent : "center" ,
287- } }
288- >
289- < EllipsisOutlined />
290- </ div >
291- </ Popover >
267+ < ApiOutlined />
268+ Port forward
269+ </ Button >
292270 ) }
293271 />
294272 </ Table >
0 commit comments