common.tsx 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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:
  22. "https://3.bp.blogspot.com/-xhNpNJJyQhk/XIe4GY78RQI/AAAAAAAAItc/ouueFUj2Hqo5dntmnKqEaBJR4KQ4Q2K3ACK4BGAYYCw/s1600/logo%2Bgit%2Bicon.png",
  23. label: "Git Repository",
  24. buttonText: "Link a Github Account",
  25. },
  26. slack: {
  27. icon: "https://image.flaticon.com/icons/png/512/2111/2111615.png",
  28. label: "Slack",
  29. buttonText: "Install Application",
  30. },
  31. registry: {
  32. icon:
  33. "https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/97_Docker_logo_logos-512.png",
  34. label: "Docker Registry",
  35. buttonText: "Add a Registry",
  36. },
  37. gke: {
  38. icon: "https://sysdig.com/wp-content/uploads/2016/08/GKE_color.png",
  39. label: "Google Kubernetes Engine (GKE)",
  40. },
  41. eks: {
  42. icon: "https://img.stackshare.io/service/7991/amazon-eks.png",
  43. label: "Amazon Elastic Kubernetes Service (EKS)",
  44. },
  45. kube: {
  46. icon:
  47. "https://uxwing.com/wp-content/themes/uxwing/download/10-brands-and-social-media/kubernetes.png",
  48. label: "Upload Kubeconfig",
  49. },
  50. dockerhub: {
  51. icon:
  52. "https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/97_Docker_logo_logos-512.png",
  53. label: "Docker Hub",
  54. },
  55. gcr: {
  56. icon:
  57. "https://carlossanchez.files.wordpress.com/2019/06/21046548.png?w=640",
  58. label: "Google Container Registry (GCR)",
  59. },
  60. ecr: {
  61. icon:
  62. "https://avatars2.githubusercontent.com/u/52505464?s=400&u=da920f994c67665c7ad6c606a5286557d4f8555f&v=4",
  63. label: "Elastic Container Registry (ECR)",
  64. },
  65. aws: {
  66. icon: aws,
  67. label: "AWS",
  68. },
  69. gcp: {
  70. icon: gcp,
  71. label: "GCP",
  72. },
  73. do: {
  74. icon: digitalOcean,
  75. label: "DigitalOcean",
  76. },
  77. github: {
  78. icon: github,
  79. label: "GitHub",
  80. },
  81. gitlab: {
  82. icon: "https://about.gitlab.com/images/press/logo/png/gitlab-icon-rgb.png",
  83. label: "Gitlab",
  84. },
  85. };
  86. export const isAlphanumeric = (x: string | null) => {
  87. let re = /^[a-z0-9-]+$/;
  88. if (!x || x.length == 0 || x.search(re) === -1) {
  89. return false;
  90. }
  91. return true;
  92. };
  93. export const getIgnoreCase = (object: any, key: string) => {
  94. return object[
  95. Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase())
  96. ];
  97. };