1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 08:19:40 +02:00

refactor(namespace): migrate namespace edit to react [r8s-125] (#38)

This commit is contained in:
Ali 2024-12-11 10:15:46 +13:00 committed by GitHub
parent 40c7742e46
commit ce7e0d8d60
108 changed files with 3183 additions and 2194 deletions

View file

@ -1,6 +1,6 @@
import { CellContext } from '@tanstack/react-table';
import { Service } from '../../../types';
import { ServiceRowData } from '../types';
import { ExternalIPLink } from './ExternalIPLink';
import { columnHelper } from './helper';
@ -46,7 +46,7 @@ export const externalIP = columnHelper.accessor(
}
);
function Cell({ row }: CellContext<Service, string>) {
function Cell({ row }: CellContext<ServiceRowData, string>) {
if (row.original.Type === 'ExternalName') {
if (row.original.ExternalName) {
const linkTo = `http://${row.original.ExternalName}`;
@ -106,7 +106,7 @@ function Cell({ row }: CellContext<Service, string>) {
// calculate the scheme based on the ports of the service
// favour https over http.
function getSchemeAndPort(svc: Service): [string, number] {
function getSchemeAndPort(svc: ServiceRowData): [string, number] {
let scheme = '';
let servicePort = 0;