columns.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import i18n from '@/locales'
  2. export const getTechStackTableColumn = () => {
  3. return {
  4. field: 'tech_stack',
  5. title: i18n.t('compute.webapp.tech.stack'),
  6. minWidth: 100,
  7. formatter: ({ row }) => {
  8. return row.tech_stack
  9. },
  10. }
  11. }
  12. export const getOsTypeTableColumn = () => {
  13. return {
  14. field: 'os_type',
  15. title: i18n.t('compute.webapp.os_type'),
  16. minWidth: 100,
  17. formatter: ({ row }) => {
  18. return row.os_type
  19. },
  20. }
  21. }
  22. export const getDomainTableColumn = () => {
  23. return {
  24. field: 'hostname',
  25. title: i18n.t('compute.webapp.domain'),
  26. minWidth: 100,
  27. formatter: ({ row }) => {
  28. return row.hostname
  29. },
  30. }
  31. }
  32. export const getIpAddrTableColumn = () => {
  33. return {
  34. field: 'ip_addr',
  35. title: i18n.t('compute.webapp.ip_addr'),
  36. minWidth: 100,
  37. formatter: ({ row }) => {
  38. return row.ip_addr
  39. },
  40. }
  41. }
  42. export const getServerFarmTableColumn = () => {
  43. return {
  44. field: 'server_farm',
  45. title: i18n.t('compute.webapp.server_farm'),
  46. minWidth: 100,
  47. formatter: ({ row }) => {
  48. return row.server_farm
  49. },
  50. }
  51. }