diff --git a/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/atlas/icon.svg b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/atlas/icon.svg new file mode 100644 index 0000000000..7265019db2 --- /dev/null +++ b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/atlas/icon.svg @@ -0,0 +1 @@ +Atlas_Logo_monogram \ No newline at end of file diff --git a/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/elasticsearch/icon.svg b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/elasticsearch/icon.svg new file mode 100644 index 0000000000..e5135a453e --- /dev/null +++ b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/elasticsearch/icon.svg @@ -0,0 +1,849 @@ + + + + diff --git a/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/hbase/icon.svg b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/hbase/icon.svg new file mode 100644 index 0000000000..6d5a1f9aba --- /dev/null +++ b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/hbase/icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/hdfs/icon.svg b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/hdfs/icon.svg new file mode 100644 index 0000000000..fdd43c9692 --- /dev/null +++ b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/hdfs/icon.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/hive/icon.svg b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/hive/icon.svg new file mode 100644 index 0000000000..9b6b3f1cdd --- /dev/null +++ b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/hive/icon.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/kafka/icon.svg b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/kafka/icon.svg new file mode 100644 index 0000000000..725ebf3b48 --- /dev/null +++ b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/kafka/icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/knox/icon.svg b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/knox/icon.svg new file mode 100644 index 0000000000..c2dae0f63c --- /dev/null +++ b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/knox/icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/kudu/icon.svg b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/kudu/icon.svg new file mode 100644 index 0000000000..b2ad402c18 --- /dev/null +++ b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/kudu/icon.svg @@ -0,0 +1,17 @@ + + + + ic-kudu-alt + Created with Sketch. + + + + + + + + + + + + \ No newline at end of file diff --git a/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/kylin/icon.svg b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/kylin/icon.svg new file mode 100644 index 0000000000..22b2f5001d --- /dev/null +++ b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/kylin/icon.svg @@ -0,0 +1,20 @@ + + + + Apache Kylin logo + + + + image/svg+xml + + + + + + + + + + Apache Kylin + + diff --git a/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/nifi-registry/icon.svg b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/nifi-registry/icon.svg new file mode 100644 index 0000000000..e7dc63d83c --- /dev/null +++ b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/nifi-registry/icon.svg @@ -0,0 +1,14 @@ + + + + diff --git a/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/nifi/icon.svg b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/nifi/icon.svg new file mode 100644 index 0000000000..718dd15bae --- /dev/null +++ b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/nifi/icon.svg @@ -0,0 +1,15 @@ + + + + diff --git a/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/ozone/icon.svg b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/ozone/icon.svg new file mode 100644 index 0000000000..657ffefc55 --- /dev/null +++ b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/ozone/icon.svg @@ -0,0 +1,534 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/presto/icon.svg b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/presto/icon.svg new file mode 100644 index 0000000000..d2214e6dfe --- /dev/null +++ b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/presto/icon.svg @@ -0,0 +1,117 @@ + + + + diff --git a/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/schema-registry/icon.svg b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/schema-registry/icon.svg new file mode 100644 index 0000000000..b865348493 --- /dev/null +++ b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/schema-registry/icon.svg @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/solr/icon.svg b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/solr/icon.svg new file mode 100644 index 0000000000..70c62dda3d --- /dev/null +++ b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/solr/icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/sqoop/icon.svg b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/sqoop/icon.svg new file mode 100644 index 0000000000..b4251acbb4 --- /dev/null +++ b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/sqoop/icon.svg @@ -0,0 +1,752 @@ + + + + diff --git a/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/storm/icon.svg b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/storm/icon.svg new file mode 100644 index 0000000000..d3aeefafd5 --- /dev/null +++ b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/storm/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/trino/icon.svg b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/trino/icon.svg new file mode 100644 index 0000000000..8eb9846df3 --- /dev/null +++ b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/trino/icon.svg @@ -0,0 +1,2031 @@ + + + + diff --git a/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/yarn/icon.svg b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/yarn/icon.svg new file mode 100644 index 0000000000..ecbc757a07 --- /dev/null +++ b/security-admin/src/main/webapp/react-webapp/src/images/serviceDefIcons/yarn/icon.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/security-admin/src/main/webapp/react-webapp/src/styles/style.css b/security-admin/src/main/webapp/react-webapp/src/styles/style.css index 10f47923b6..9b1691b53d 100644 --- a/security-admin/src/main/webapp/react-webapp/src/styles/style.css +++ b/security-admin/src/main/webapp/react-webapp/src/styles/style.css @@ -2554,6 +2554,16 @@ li.list-group-item:hover { .manage-service .dropdown-toggle::after { vertical-align: 0.125em; } +.serviceDef-icon { + vertical-align: baseline; + background-repeat: no-repeat; + width: 27px; + height: 20px; + text-align: center; + display: inline-block; + padding: 0 2px; + position: relative; +} .text-word-break { word-break: break-all; } diff --git a/security-admin/src/main/webapp/react-webapp/src/utils/XAUtils.js b/security-admin/src/main/webapp/react-webapp/src/utils/XAUtils.js index 9f67062617..030fb596fe 100644 --- a/security-admin/src/main/webapp/react-webapp/src/utils/XAUtils.js +++ b/security-admin/src/main/webapp/react-webapp/src/utils/XAUtils.js @@ -53,6 +53,7 @@ import InfiniteScroll from "react-infinite-scroll-component"; import { toast } from "react-toastify"; import { policyInfoMessage } from "./XAMessages"; import { fetchApi } from "Utils/fetchAPI"; +import folderIcon from "Images/folder-grey.png"; export const LoginUser = (role) => { const userProfile = getUserProfile(); @@ -1535,3 +1536,31 @@ export const getLandingPageURl = () => { } } }; + +export const getServiceDefIcon = (serviceDefName) => { + let imagePath = folderIcon; + let imageStyling; + + try { + const serviceDefIcon = + require(`../images/serviceDefIcons/${serviceDefName}/icon.svg`).default; + imagePath = serviceDefIcon; + imageStyling = { height: "27px", width: "27px" }; + } catch (error) { + console.log( + `Continuing to use default icon for ${serviceDefName.toUpperCase()}` + ); + } + + return ( + + {`${serviceDefName.toUpperCase()} + + ); +}; diff --git a/security-admin/src/main/webapp/react-webapp/src/views/ServiceManager/ServiceDefinition.jsx b/security-admin/src/main/webapp/react-webapp/src/views/ServiceManager/ServiceDefinition.jsx index bedce6f4b6..2643c55864 100644 --- a/security-admin/src/main/webapp/react-webapp/src/views/ServiceManager/ServiceDefinition.jsx +++ b/security-admin/src/main/webapp/react-webapp/src/views/ServiceManager/ServiceDefinition.jsx @@ -24,7 +24,7 @@ import { difference, isEmpty, keys, map, omit, pick } from "lodash"; import { RangerPolicyType } from "Utils/XAEnums"; import ExportPolicy from "./ExportPolicy"; import ImportPolicy from "./ImportPolicy"; -import folderLogo from "Images/folder-grey.png"; +import { getServiceDefIcon } from "../../utils/XAUtils"; class ServiceDefinition extends Component { constructor(props) { @@ -319,13 +319,10 @@ class ServiceDefinition extends Component {
- Folder logo + {getServiceDefIcon(serviceDef.name)} {serviceDef.displayName} + {this.props.isAdminRole && ( {isEmpty(this.props.selectedZone) ? (