mirror of
https://github.com/SigNoz/signoz.git
synced 2026-08-05 12:40:46 +01:00
Compare commits
3 Commits
SIG-6986
...
fix/instal
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
abea45f255 | ||
|
|
c0d8f8de3a | ||
|
|
860fa4a995 |
@@ -309,7 +309,7 @@ request_sudo() {
|
||||
echo -e "Got it! Thanks!! 🙏\n"
|
||||
echo -e "Okay! We will bring up the SigNoz cluster from here 🚀\n"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
echo ""
|
||||
@@ -317,7 +317,7 @@ echo -e "👋 Thank you for trying out SigNoz! "
|
||||
echo ""
|
||||
|
||||
sudo_cmd=""
|
||||
docker_compose_cmd=""
|
||||
docker_compose_cmd="docker compose"
|
||||
|
||||
# Check sudo permissions
|
||||
if (( $EUID != 0 )); then
|
||||
@@ -325,7 +325,13 @@ if (( $EUID != 0 )); then
|
||||
echo " In case of any failure or prompt, please consider running the script with sudo privileges."
|
||||
echo ""
|
||||
else
|
||||
sudo_cmd="sudo"
|
||||
if hash sudo 2>/dev/null; then
|
||||
sudo_cmd="sudo"
|
||||
else
|
||||
echo "🟡 Running installer with root permissions but sudo command not found, running without sudo"
|
||||
echo " In case of any failure or prompt, please consider installing sudo and running the script again."
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
|
||||
# Checking OS and assigning package manager
|
||||
@@ -466,11 +472,10 @@ if ! is_command_present docker; then
|
||||
fi
|
||||
|
||||
if has_docker_compose_plugin; then
|
||||
echo "docker compose plugin is present, using it"
|
||||
docker_compose_cmd="docker compose"
|
||||
# Install docker-compose
|
||||
echo "docker compose plugin found, using it"
|
||||
else
|
||||
docker_compose_cmd="docker-compose"
|
||||
echo "docker compose plugin not found, using docker-compose instead"
|
||||
if ! is_command_present docker-compose; then
|
||||
request_sudo
|
||||
install_docker_compose
|
||||
|
||||
@@ -6,10 +6,7 @@ import {
|
||||
getValuesFromQueryParams,
|
||||
setQueryParamsFromOptions,
|
||||
} from 'components/CeleryTask/CeleryUtils';
|
||||
import {
|
||||
FilterCofigs,
|
||||
useCeleryFilterOptions,
|
||||
} from 'components/CeleryTask/useCeleryFilterOptions';
|
||||
import { useCeleryFilterOptions } from 'components/CeleryTask/useCeleryFilterOptions';
|
||||
import { SelectMaxTagPlaceholder } from 'components/MessagingQueues/MQCommon/MQCommon';
|
||||
import { QueryParams } from 'constants/query';
|
||||
import useUrlQuery from 'hooks/useUrlQuery';
|
||||
@@ -17,24 +14,20 @@ import { Check, Share2 } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import { useHistory, useLocation } from 'react-router-dom';
|
||||
import { useCopyToClipboard } from 'react-use';
|
||||
import { DataSource } from 'types/common/queryBuilder';
|
||||
|
||||
interface SelectOptionConfig {
|
||||
placeholder: string;
|
||||
queryParam: QueryParams;
|
||||
filterType: string | string[];
|
||||
filterConfigs?: FilterCofigs;
|
||||
}
|
||||
|
||||
function FilterSelect({
|
||||
placeholder,
|
||||
queryParam,
|
||||
filterType,
|
||||
filterConfigs,
|
||||
}: SelectOptionConfig): JSX.Element {
|
||||
const { handleSearch, isFetching, options } = useCeleryFilterOptions(
|
||||
filterType,
|
||||
filterConfigs,
|
||||
);
|
||||
|
||||
const urlQuery = useUrlQuery();
|
||||
@@ -72,26 +65,12 @@ function FilterSelect({
|
||||
);
|
||||
}
|
||||
|
||||
FilterSelect.defaultProps = {
|
||||
filterConfigs: undefined,
|
||||
};
|
||||
|
||||
function CeleryOverviewConfigOptions(): JSX.Element {
|
||||
const [isURLCopied, setIsURLCopied] = useState(false);
|
||||
|
||||
const [, handleCopyToClipboard] = useCopyToClipboard();
|
||||
|
||||
const selectConfigs: SelectOptionConfig[] = [
|
||||
{
|
||||
placeholder: 'Environment',
|
||||
queryParam: QueryParams.environment,
|
||||
filterType: 'resource_deployment_environment',
|
||||
filterConfigs: {
|
||||
aggregateOperator: 'rate',
|
||||
dataSource: DataSource.METRICS,
|
||||
aggregateAttribute: 'signoz_calls_total',
|
||||
},
|
||||
},
|
||||
{
|
||||
placeholder: 'Service Name',
|
||||
queryParam: QueryParams.service,
|
||||
@@ -136,7 +115,6 @@ function CeleryOverviewConfigOptions(): JSX.Element {
|
||||
placeholder={config.placeholder}
|
||||
queryParam={config.queryParam}
|
||||
filterType={config.filterType}
|
||||
filterConfigs={config.filterConfigs}
|
||||
/>
|
||||
))}
|
||||
</Row>
|
||||
|
||||
@@ -322,11 +322,6 @@ function makeFilters(urlQuery: URLSearchParams): Filter[] {
|
||||
{ paramName: QueryParams.kindString, key: 'kind_string', operator: 'in' },
|
||||
{ paramName: QueryParams.service, key: 'service.name', operator: 'in' },
|
||||
{ paramName: QueryParams.spanName, key: 'name', operator: 'in' },
|
||||
{
|
||||
paramName: QueryParams.environment,
|
||||
key: 'deployment.environment',
|
||||
operator: 'in',
|
||||
},
|
||||
];
|
||||
|
||||
return filterConfigs
|
||||
|
||||
@@ -6,17 +6,13 @@ import { DataSource } from 'types/common/queryBuilder';
|
||||
|
||||
import { useGetAllFilters } from './CeleryTaskConfigOptions/useGetCeleryFilters';
|
||||
|
||||
export interface FilterCofigs {
|
||||
aggregateOperator?: string;
|
||||
dataSource?: DataSource;
|
||||
aggregateAttribute?: string;
|
||||
filterAttributeKeyDataType?: DataTypes;
|
||||
tagType?: string;
|
||||
}
|
||||
|
||||
export const useCeleryFilterOptions = (
|
||||
type: string | string[],
|
||||
filterCofigs?: FilterCofigs,
|
||||
aggregateOperator?: string,
|
||||
dataSource?: DataSource,
|
||||
aggregateAttribute?: string,
|
||||
filterAttributeKeyDataType?: DataTypes,
|
||||
tagType?: string,
|
||||
): {
|
||||
searchText: string;
|
||||
handleSearch: (value: string) => void;
|
||||
@@ -27,7 +23,11 @@ export const useCeleryFilterOptions = (
|
||||
const { isFetching, options } = useGetAllFilters({
|
||||
attributeKey: type,
|
||||
searchText,
|
||||
...filterCofigs,
|
||||
aggregateOperator,
|
||||
dataSource,
|
||||
aggregateAttribute,
|
||||
filterAttributeKeyDataType,
|
||||
tagType,
|
||||
});
|
||||
const handleDebouncedSearch = useDebouncedFn((searchText): void => {
|
||||
setSearchText(searchText as string);
|
||||
|
||||
@@ -46,5 +46,4 @@ export enum QueryParams {
|
||||
msgSystem = 'msgSystem',
|
||||
destination = 'destination',
|
||||
kindString = 'kindString',
|
||||
environment = 'environment',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user