common.tsx 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. import aws from "../assets/aws.png";
  2. import digitalOcean from "../assets/do.png";
  3. import gcp from "../assets/gcp.png";
  4. import github from "../assets/github.png";
  5. export const infraNames: any = {
  6. ecr: "Elastic Container Registry (ECR)",
  7. eks: "Elastic Kubernetes Service (EKS)",
  8. gcr: "Google Container Registry (GCR)",
  9. gke: "Google Kubernetes Engine (GKE)",
  10. docr: "DigitalOcean Container Registry",
  11. doks: "DigitalOcean Kubernetes Service",
  12. };
  13. export const integrationList: any = {
  14. kubernetes: {
  15. icon:
  16. "https://uxwing.com/wp-content/themes/uxwing/download/10-brands-and-social-media/kubernetes.png",
  17. label: "Kubernetes",
  18. buttonText: "Add a Cluster",
  19. },
  20. repo: {
  21. icon: "https://git-scm.com/images/logos/downloads/Git-Icon-1788C.png",
  22. label: "Git Repository",
  23. buttonText: "Link a Github Account",
  24. },
  25. slack: {
  26. icon: "https://image.flaticon.com/icons/png/512/2111/2111615.png",
  27. label: "Slack",
  28. buttonText: "Install Application",
  29. },
  30. registry: {
  31. icon:
  32. "https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/97_Docker_logo_logos-512.png",
  33. label: "Docker Registry",
  34. buttonText: "Add a Registry",
  35. },
  36. gke: {
  37. icon: "https://sysdig.com/wp-content/uploads/2016/08/GKE_color.png",
  38. label: "Google Kubernetes Engine (GKE)",
  39. },
  40. eks: {
  41. icon: "https://img.stackshare.io/service/7991/amazon-eks.png",
  42. label: "Amazon Elastic Kubernetes Service (EKS)",
  43. },
  44. test: {
  45. icon:
  46. "https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/97_Docker_logo_logos-512.png",
  47. label: "Testing",
  48. },
  49. kube: {
  50. icon:
  51. "https://uxwing.com/wp-content/themes/uxwing/download/10-brands-and-social-media/kubernetes.png",
  52. label: "Upload Kubeconfig",
  53. },
  54. dockerhub: {
  55. icon:
  56. "https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/97_Docker_logo_logos-512.png",
  57. label: "Docker Hub",
  58. },
  59. gcr: {
  60. icon:
  61. "https://carlossanchez.files.wordpress.com/2019/06/21046548.png?w=640",
  62. label: "Google Container Registry (GCR)",
  63. },
  64. ecr: {
  65. icon:
  66. "https://avatars2.githubusercontent.com/u/52505464?s=400&u=da920f994c67665c7ad6c606a5286557d4f8555f&v=4",
  67. label: "Elastic Container Registry (ECR)",
  68. },
  69. doks: {
  70. icon:
  71. "https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/97_Docker_logo_logos-512.png",
  72. label: "Digital Ocean Kubernetes Service (DOKS)",
  73. },
  74. docr: {
  75. icon:
  76. "https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/97_Docker_logo_logos-512.png",
  77. label: "Digital Ocean Container Registry (DOCR)",
  78. },
  79. aws: {
  80. icon: aws,
  81. label: "AWS",
  82. },
  83. gcp: {
  84. icon: gcp,
  85. label: "GCP",
  86. },
  87. do: {
  88. icon: digitalOcean,
  89. label: "DigitalOcean",
  90. },
  91. github: {
  92. icon: github,
  93. label: "GitHub",
  94. },
  95. gitlab: {
  96. icon: "https://about.gitlab.com/images/press/logo/png/gitlab-icon-rgb.png",
  97. label: "Gitlab",
  98. },
  99. rds: {
  100. icon:
  101. "https://cdn2.iconfinder.com/data/icons/amazon-aws-stencils/100/Database_copy_Amazon_RDS-512.png",
  102. label: "Amazon Relational Database Service",
  103. },
  104. };
  105. export const isAlphanumeric = (x: string | null) => {
  106. let re = /^[a-z0-9-]+$/;
  107. if (!x || x.length == 0 || x.search(re) === -1) {
  108. return false;
  109. }
  110. return true;
  111. };
  112. export const getIgnoreCase = (object: any, key: string) => {
  113. return object[
  114. Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase())
  115. ];
  116. };