133 lines
2.8 KiB
TypeScript
Raw Normal View History

Shifting of graph from Dashboard to Service layer (#3107) * refactor: initial setup for full view done * feat: done with shifting of chart to services * refactor: removed the dependency dashboard action * refactor: make ondelete and onclone optional in widgetheader * refactor: optimised the allowdelete, allowclone and allowEdit * fix: build pipline error * refactor: moved contant to contant.js * refactor: create a utils and types and seperated it from component * refactor: merge the latest overview from develop * refactor: review comments changes * refactor: magic string to constants * refactor: handle the isloading for topLevelOperations * refactor: apply loading check for other api's * refactor: seperated the component * refactor: removed the graphwithoutdashboard component * fix: the type of variable from dashboard * refactor: created utils and updated types * refactor: changed the name of variable and fixed typos * fix: the menu option dropdown for services widget header * chore: ts config is updated for the isTwidgetoptions * chore: removed the unwanted file * fix: css on hover of widget header and default value * refactor: renamed the file to index in fullView * refactor: disable the edit delete clone option * fix: typos * chore: types are updated in metrics application * chore: type is updated * fix: build is fixed * refactor: changes the yaxisunit to ns of serviceoverview --------- Co-authored-by: Palash Gupta <palashgdev@gmail.com> Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
2023-07-18 08:55:01 +05:30
import { OPERATORS } from 'constants/queryBuilder';
feat: tree is updated to show different node values instead of editor (#2696) * feat: tree is updated to show different node values instead of editor * chore: table view is updated * [Refactoring]: Seperate title and menu to another component (#3531) * refactor: separated the title renderer * refactor: separated styles * refactor: seperate types * refactor: instead of key showing value if array (#3532) * refactor: instead of key showing value if array * feat: added filter for array and also nodekey * refactor: made common check for value is array * refactor: changed the key to value for arrays * chore: getData types is updated * chore: getDataTypes function types is updated * refactor: connection to querybuilder (#3535) Co-authored-by: Palash Gupta <palashgdev@gmail.com> * chore: operator is updated * fix: build is fixed * fix: build is fixed * chore: operator is updated * chore: operator is updated * chore: parsing is updated * chore: key is updated * Refactor: Log parsing updates (#3542) * refactor: updated nodekey * refactor: removed pasred data * refactor: parentIsArray check * chore: added the support for the bool * [Refactor]: handle nested object case (#3545) * refactor: updated nodekey * refactor: removed pasred data * refactor: parentIsArray check * refactor: handled nested array inside object case * fix: float issue parsing * chore: operator is updated * chore: title is updated * chore: title is updated * fix: update tagRegexp * fix: maintain single source of DataTypes * chore: operator is updated * fix: fixed due to merge conflicts --------- Co-authored-by: Rajat Dabade <rajat@signoz.io> Co-authored-by: Yunus A M <myounis.ar@live.com>
2023-09-15 10:21:42 +05:30
import {
BaseAutocompleteData,
DataTypes,
} from 'types/api/queryBuilder/queryAutocompleteResponse';
import { TagFilterItem } from 'types/api/queryBuilder/queryBuilderData';
import {
DataSource,
MetricAggregateOperator,
QueryBuilderData,
} from 'types/common/queryBuilder';
feat: tree is updated to show different node values instead of editor (#2696) * feat: tree is updated to show different node values instead of editor * chore: table view is updated * [Refactoring]: Seperate title and menu to another component (#3531) * refactor: separated the title renderer * refactor: separated styles * refactor: seperate types * refactor: instead of key showing value if array (#3532) * refactor: instead of key showing value if array * feat: added filter for array and also nodekey * refactor: made common check for value is array * refactor: changed the key to value for arrays * chore: getData types is updated * chore: getDataTypes function types is updated * refactor: connection to querybuilder (#3535) Co-authored-by: Palash Gupta <palashgdev@gmail.com> * chore: operator is updated * fix: build is fixed * fix: build is fixed * chore: operator is updated * chore: operator is updated * chore: parsing is updated * chore: key is updated * Refactor: Log parsing updates (#3542) * refactor: updated nodekey * refactor: removed pasred data * refactor: parentIsArray check * chore: added the support for the bool * [Refactor]: handle nested object case (#3545) * refactor: updated nodekey * refactor: removed pasred data * refactor: parentIsArray check * refactor: handled nested array inside object case * fix: float issue parsing * chore: operator is updated * chore: title is updated * chore: title is updated * fix: update tagRegexp * fix: maintain single source of DataTypes * chore: operator is updated * fix: fixed due to merge conflicts --------- Co-authored-by: Rajat Dabade <rajat@signoz.io> Co-authored-by: Yunus A M <myounis.ar@live.com>
2023-09-15 10:21:42 +05:30
import { FORMULA, MetricsType, WidgetKeys } from '../constant';
Service layer to metrics using `USE_SPAN_METRIC` feature flag (#3196) * refactor: remove the dependency of services using redux * refactor: seperated columns and unit test case * refactor: move the constant to other file * refactor: updated test case * refactor: removed the duplicate enum * fix: removed the inline function * fix: removed the inline function * refactor: removed the magic string * fix: change the name from matrics to metrics * fix: one on one mapping of props * refactor: created a hook to getting services through api call * fix: linter error * refactor: renamed the file according to functionality * refactor: renamed more file according to functionality * refactor: generic querybuilderWithFormula * refactor: added generic datasource * refactor: dynamic disabled in getQueryBuilderQueriesWithFormula * refactor: generic legend for building query with formulas * feat: added new TopOperationMetrics component for key operation * refactor: added feature flag for key operation * refactor: shifted types and fixed typos * refactor: separated types and renamed file * refactor: one on one mapping * refactor: removed unwanted interfaces and renamed files * refactor: separated types * chore: done with basic struction and moving up the files * chore: moved some files to proper places * feat: added the support for metrics in service layer * refactor: shifted SkipOnBoardingModal logic to parent * refactor: created object to send as an augument for getQueryRangeRequestData * refactor: changes from columns to getColumns * refactor: updated the utils function getServiceListFromQuery * refactor: added memo to getQueryRangeRequestData in serive metrics application * refactor: separated constants from ServiceMetricsQuery.ts * refactor: separated mock data and updated test case * refactor: added useMemo on getColumns * refactor: made the use of useErrorNotification for show error * refactor: handled the error case * refactor: one on one mapping * chore: useGetQueriesRange hooks type is updated * refactor: review changes * chore: update type for columnconstants * chore: reverted back the changes lost in merge conflicts --------- Co-authored-by: Vishal Sharma <makeavish786@gmail.com> Co-authored-by: Palash Gupta <palashgdev@gmail.com> Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
2023-08-02 15:00:58 +05:30
import { DatabaseCallProps, DatabaseCallsRPSProps } from '../types';
import {
getQueryBuilderQueries,
getQueryBuilderQuerieswithFormula,
} from './MetricsPageQueriesFactory';
export const databaseCallsRPS = ({
servicename,
legend,
tagFilterItems,
}: DatabaseCallsRPSProps): QueryBuilderData => {
Shifting of graph from Dashboard to Service layer (#3107) * refactor: initial setup for full view done * feat: done with shifting of chart to services * refactor: removed the dependency dashboard action * refactor: make ondelete and onclone optional in widgetheader * refactor: optimised the allowdelete, allowclone and allowEdit * fix: build pipline error * refactor: moved contant to contant.js * refactor: create a utils and types and seperated it from component * refactor: merge the latest overview from develop * refactor: review comments changes * refactor: magic string to constants * refactor: handle the isloading for topLevelOperations * refactor: apply loading check for other api's * refactor: seperated the component * refactor: removed the graphwithoutdashboard component * fix: the type of variable from dashboard * refactor: created utils and updated types * refactor: changed the name of variable and fixed typos * fix: the menu option dropdown for services widget header * chore: ts config is updated for the isTwidgetoptions * chore: removed the unwanted file * fix: css on hover of widget header and default value * refactor: renamed the file to index in fullView * refactor: disable the edit delete clone option * fix: typos * chore: types are updated in metrics application * chore: type is updated * fix: build is fixed * refactor: changes the yaxisunit to ns of serviceoverview --------- Co-authored-by: Palash Gupta <palashgdev@gmail.com> Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
2023-07-18 08:55:01 +05:30
const autocompleteData: BaseAutocompleteData[] = [
{
key: WidgetKeys.SignozDBLatencyCount,
feat: tree is updated to show different node values instead of editor (#2696) * feat: tree is updated to show different node values instead of editor * chore: table view is updated * [Refactoring]: Seperate title and menu to another component (#3531) * refactor: separated the title renderer * refactor: separated styles * refactor: seperate types * refactor: instead of key showing value if array (#3532) * refactor: instead of key showing value if array * feat: added filter for array and also nodekey * refactor: made common check for value is array * refactor: changed the key to value for arrays * chore: getData types is updated * chore: getDataTypes function types is updated * refactor: connection to querybuilder (#3535) Co-authored-by: Palash Gupta <palashgdev@gmail.com> * chore: operator is updated * fix: build is fixed * fix: build is fixed * chore: operator is updated * chore: operator is updated * chore: parsing is updated * chore: key is updated * Refactor: Log parsing updates (#3542) * refactor: updated nodekey * refactor: removed pasred data * refactor: parentIsArray check * chore: added the support for the bool * [Refactor]: handle nested object case (#3545) * refactor: updated nodekey * refactor: removed pasred data * refactor: parentIsArray check * refactor: handled nested array inside object case * fix: float issue parsing * chore: operator is updated * chore: title is updated * chore: title is updated * fix: update tagRegexp * fix: maintain single source of DataTypes * chore: operator is updated * fix: fixed due to merge conflicts --------- Co-authored-by: Rajat Dabade <rajat@signoz.io> Co-authored-by: Yunus A M <myounis.ar@live.com>
2023-09-15 10:21:42 +05:30
dataType: DataTypes.Float64,
Shifting of graph from Dashboard to Service layer (#3107) * refactor: initial setup for full view done * feat: done with shifting of chart to services * refactor: removed the dependency dashboard action * refactor: make ondelete and onclone optional in widgetheader * refactor: optimised the allowdelete, allowclone and allowEdit * fix: build pipline error * refactor: moved contant to contant.js * refactor: create a utils and types and seperated it from component * refactor: merge the latest overview from develop * refactor: review comments changes * refactor: magic string to constants * refactor: handle the isloading for topLevelOperations * refactor: apply loading check for other api's * refactor: seperated the component * refactor: removed the graphwithoutdashboard component * fix: the type of variable from dashboard * refactor: created utils and updated types * refactor: changed the name of variable and fixed typos * fix: the menu option dropdown for services widget header * chore: ts config is updated for the isTwidgetoptions * chore: removed the unwanted file * fix: css on hover of widget header and default value * refactor: renamed the file to index in fullView * refactor: disable the edit delete clone option * fix: typos * chore: types are updated in metrics application * chore: type is updated * fix: build is fixed * refactor: changes the yaxisunit to ns of serviceoverview --------- Co-authored-by: Palash Gupta <palashgdev@gmail.com> Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
2023-07-18 08:55:01 +05:30
isColumn: true,
type: '',
Shifting of graph from Dashboard to Service layer (#3107) * refactor: initial setup for full view done * feat: done with shifting of chart to services * refactor: removed the dependency dashboard action * refactor: make ondelete and onclone optional in widgetheader * refactor: optimised the allowdelete, allowclone and allowEdit * fix: build pipline error * refactor: moved contant to contant.js * refactor: create a utils and types and seperated it from component * refactor: merge the latest overview from develop * refactor: review comments changes * refactor: magic string to constants * refactor: handle the isloading for topLevelOperations * refactor: apply loading check for other api's * refactor: seperated the component * refactor: removed the graphwithoutdashboard component * fix: the type of variable from dashboard * refactor: created utils and updated types * refactor: changed the name of variable and fixed typos * fix: the menu option dropdown for services widget header * chore: ts config is updated for the isTwidgetoptions * chore: removed the unwanted file * fix: css on hover of widget header and default value * refactor: renamed the file to index in fullView * refactor: disable the edit delete clone option * fix: typos * chore: types are updated in metrics application * chore: type is updated * fix: build is fixed * refactor: changes the yaxisunit to ns of serviceoverview --------- Co-authored-by: Palash Gupta <palashgdev@gmail.com> Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
2023-07-18 08:55:01 +05:30
},
];
const groupBy: BaseAutocompleteData[] = [
feat: tree is updated to show different node values instead of editor (#2696) * feat: tree is updated to show different node values instead of editor * chore: table view is updated * [Refactoring]: Seperate title and menu to another component (#3531) * refactor: separated the title renderer * refactor: separated styles * refactor: seperate types * refactor: instead of key showing value if array (#3532) * refactor: instead of key showing value if array * feat: added filter for array and also nodekey * refactor: made common check for value is array * refactor: changed the key to value for arrays * chore: getData types is updated * chore: getDataTypes function types is updated * refactor: connection to querybuilder (#3535) Co-authored-by: Palash Gupta <palashgdev@gmail.com> * chore: operator is updated * fix: build is fixed * fix: build is fixed * chore: operator is updated * chore: operator is updated * chore: parsing is updated * chore: key is updated * Refactor: Log parsing updates (#3542) * refactor: updated nodekey * refactor: removed pasred data * refactor: parentIsArray check * chore: added the support for the bool * [Refactor]: handle nested object case (#3545) * refactor: updated nodekey * refactor: removed pasred data * refactor: parentIsArray check * refactor: handled nested array inside object case * fix: float issue parsing * chore: operator is updated * chore: title is updated * chore: title is updated * fix: update tagRegexp * fix: maintain single source of DataTypes * chore: operator is updated * fix: fixed due to merge conflicts --------- Co-authored-by: Rajat Dabade <rajat@signoz.io> Co-authored-by: Yunus A M <myounis.ar@live.com>
2023-09-15 10:21:42 +05:30
{
dataType: DataTypes.String,
isColumn: false,
key: 'db_system',
type: 'tag',
},
];
Shifting of graph from Dashboard to Service layer (#3107) * refactor: initial setup for full view done * feat: done with shifting of chart to services * refactor: removed the dependency dashboard action * refactor: make ondelete and onclone optional in widgetheader * refactor: optimised the allowdelete, allowclone and allowEdit * fix: build pipline error * refactor: moved contant to contant.js * refactor: create a utils and types and seperated it from component * refactor: merge the latest overview from develop * refactor: review comments changes * refactor: magic string to constants * refactor: handle the isloading for topLevelOperations * refactor: apply loading check for other api's * refactor: seperated the component * refactor: removed the graphwithoutdashboard component * fix: the type of variable from dashboard * refactor: created utils and updated types * refactor: changed the name of variable and fixed typos * fix: the menu option dropdown for services widget header * chore: ts config is updated for the isTwidgetoptions * chore: removed the unwanted file * fix: css on hover of widget header and default value * refactor: renamed the file to index in fullView * refactor: disable the edit delete clone option * fix: typos * chore: types are updated in metrics application * chore: type is updated * fix: build is fixed * refactor: changes the yaxisunit to ns of serviceoverview --------- Co-authored-by: Palash Gupta <palashgdev@gmail.com> Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
2023-07-18 08:55:01 +05:30
const filterItems: TagFilterItem[][] = [
[
{
id: '',
key: {
key: WidgetKeys.Service_name,
feat: tree is updated to show different node values instead of editor (#2696) * feat: tree is updated to show different node values instead of editor * chore: table view is updated * [Refactoring]: Seperate title and menu to another component (#3531) * refactor: separated the title renderer * refactor: separated styles * refactor: seperate types * refactor: instead of key showing value if array (#3532) * refactor: instead of key showing value if array * feat: added filter for array and also nodekey * refactor: made common check for value is array * refactor: changed the key to value for arrays * chore: getData types is updated * chore: getDataTypes function types is updated * refactor: connection to querybuilder (#3535) Co-authored-by: Palash Gupta <palashgdev@gmail.com> * chore: operator is updated * fix: build is fixed * fix: build is fixed * chore: operator is updated * chore: operator is updated * chore: parsing is updated * chore: key is updated * Refactor: Log parsing updates (#3542) * refactor: updated nodekey * refactor: removed pasred data * refactor: parentIsArray check * chore: added the support for the bool * [Refactor]: handle nested object case (#3545) * refactor: updated nodekey * refactor: removed pasred data * refactor: parentIsArray check * refactor: handled nested array inside object case * fix: float issue parsing * chore: operator is updated * chore: title is updated * chore: title is updated * fix: update tagRegexp * fix: maintain single source of DataTypes * chore: operator is updated * fix: fixed due to merge conflicts --------- Co-authored-by: Rajat Dabade <rajat@signoz.io> Co-authored-by: Yunus A M <myounis.ar@live.com>
2023-09-15 10:21:42 +05:30
dataType: DataTypes.String,
Shifting of graph from Dashboard to Service layer (#3107) * refactor: initial setup for full view done * feat: done with shifting of chart to services * refactor: removed the dependency dashboard action * refactor: make ondelete and onclone optional in widgetheader * refactor: optimised the allowdelete, allowclone and allowEdit * fix: build pipline error * refactor: moved contant to contant.js * refactor: create a utils and types and seperated it from component * refactor: merge the latest overview from develop * refactor: review comments changes * refactor: magic string to constants * refactor: handle the isloading for topLevelOperations * refactor: apply loading check for other api's * refactor: seperated the component * refactor: removed the graphwithoutdashboard component * fix: the type of variable from dashboard * refactor: created utils and updated types * refactor: changed the name of variable and fixed typos * fix: the menu option dropdown for services widget header * chore: ts config is updated for the isTwidgetoptions * chore: removed the unwanted file * fix: css on hover of widget header and default value * refactor: renamed the file to index in fullView * refactor: disable the edit delete clone option * fix: typos * chore: types are updated in metrics application * chore: type is updated * fix: build is fixed * refactor: changes the yaxisunit to ns of serviceoverview --------- Co-authored-by: Palash Gupta <palashgdev@gmail.com> Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
2023-07-18 08:55:01 +05:30
isColumn: false,
type: MetricsType.Resource,
},
op: OPERATORS.IN,
value: [`${servicename}`],
},
Shifting of graph from Dashboard to Service layer (#3107) * refactor: initial setup for full view done * feat: done with shifting of chart to services * refactor: removed the dependency dashboard action * refactor: make ondelete and onclone optional in widgetheader * refactor: optimised the allowdelete, allowclone and allowEdit * fix: build pipline error * refactor: moved contant to contant.js * refactor: create a utils and types and seperated it from component * refactor: merge the latest overview from develop * refactor: review comments changes * refactor: magic string to constants * refactor: handle the isloading for topLevelOperations * refactor: apply loading check for other api's * refactor: seperated the component * refactor: removed the graphwithoutdashboard component * fix: the type of variable from dashboard * refactor: created utils and updated types * refactor: changed the name of variable and fixed typos * fix: the menu option dropdown for services widget header * chore: ts config is updated for the isTwidgetoptions * chore: removed the unwanted file * fix: css on hover of widget header and default value * refactor: renamed the file to index in fullView * refactor: disable the edit delete clone option * fix: typos * chore: types are updated in metrics application * chore: type is updated * fix: build is fixed * refactor: changes the yaxisunit to ns of serviceoverview --------- Co-authored-by: Palash Gupta <palashgdev@gmail.com> Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
2023-07-18 08:55:01 +05:30
...tagFilterItems,
],
];
Shifting of graph from Dashboard to Service layer (#3107) * refactor: initial setup for full view done * feat: done with shifting of chart to services * refactor: removed the dependency dashboard action * refactor: make ondelete and onclone optional in widgetheader * refactor: optimised the allowdelete, allowclone and allowEdit * fix: build pipline error * refactor: moved contant to contant.js * refactor: create a utils and types and seperated it from component * refactor: merge the latest overview from develop * refactor: review comments changes * refactor: magic string to constants * refactor: handle the isloading for topLevelOperations * refactor: apply loading check for other api's * refactor: seperated the component * refactor: removed the graphwithoutdashboard component * fix: the type of variable from dashboard * refactor: created utils and updated types * refactor: changed the name of variable and fixed typos * fix: the menu option dropdown for services widget header * chore: ts config is updated for the isTwidgetoptions * chore: removed the unwanted file * fix: css on hover of widget header and default value * refactor: renamed the file to index in fullView * refactor: disable the edit delete clone option * fix: typos * chore: types are updated in metrics application * chore: type is updated * fix: build is fixed * refactor: changes the yaxisunit to ns of serviceoverview --------- Co-authored-by: Palash Gupta <palashgdev@gmail.com> Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
2023-07-18 08:55:01 +05:30
const legends = [legend];
const dataSource = DataSource.METRICS;
Shifting of graph from Dashboard to Service layer (#3107) * refactor: initial setup for full view done * feat: done with shifting of chart to services * refactor: removed the dependency dashboard action * refactor: make ondelete and onclone optional in widgetheader * refactor: optimised the allowdelete, allowclone and allowEdit * fix: build pipline error * refactor: moved contant to contant.js * refactor: create a utils and types and seperated it from component * refactor: merge the latest overview from develop * refactor: review comments changes * refactor: magic string to constants * refactor: handle the isloading for topLevelOperations * refactor: apply loading check for other api's * refactor: seperated the component * refactor: removed the graphwithoutdashboard component * fix: the type of variable from dashboard * refactor: created utils and updated types * refactor: changed the name of variable and fixed typos * fix: the menu option dropdown for services widget header * chore: ts config is updated for the isTwidgetoptions * chore: removed the unwanted file * fix: css on hover of widget header and default value * refactor: renamed the file to index in fullView * refactor: disable the edit delete clone option * fix: typos * chore: types are updated in metrics application * chore: type is updated * fix: build is fixed * refactor: changes the yaxisunit to ns of serviceoverview --------- Co-authored-by: Palash Gupta <palashgdev@gmail.com> Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
2023-07-18 08:55:01 +05:30
return getQueryBuilderQueries({
Shifting of graph from Dashboard to Service layer (#3107) * refactor: initial setup for full view done * feat: done with shifting of chart to services * refactor: removed the dependency dashboard action * refactor: make ondelete and onclone optional in widgetheader * refactor: optimised the allowdelete, allowclone and allowEdit * fix: build pipline error * refactor: moved contant to contant.js * refactor: create a utils and types and seperated it from component * refactor: merge the latest overview from develop * refactor: review comments changes * refactor: magic string to constants * refactor: handle the isloading for topLevelOperations * refactor: apply loading check for other api's * refactor: seperated the component * refactor: removed the graphwithoutdashboard component * fix: the type of variable from dashboard * refactor: created utils and updated types * refactor: changed the name of variable and fixed typos * fix: the menu option dropdown for services widget header * chore: ts config is updated for the isTwidgetoptions * chore: removed the unwanted file * fix: css on hover of widget header and default value * refactor: renamed the file to index in fullView * refactor: disable the edit delete clone option * fix: typos * chore: types are updated in metrics application * chore: type is updated * fix: build is fixed * refactor: changes the yaxisunit to ns of serviceoverview --------- Co-authored-by: Palash Gupta <palashgdev@gmail.com> Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
2023-07-18 08:55:01 +05:30
autocompleteData,
groupBy,
Shifting of graph from Dashboard to Service layer (#3107) * refactor: initial setup for full view done * feat: done with shifting of chart to services * refactor: removed the dependency dashboard action * refactor: make ondelete and onclone optional in widgetheader * refactor: optimised the allowdelete, allowclone and allowEdit * fix: build pipline error * refactor: moved contant to contant.js * refactor: create a utils and types and seperated it from component * refactor: merge the latest overview from develop * refactor: review comments changes * refactor: magic string to constants * refactor: handle the isloading for topLevelOperations * refactor: apply loading check for other api's * refactor: seperated the component * refactor: removed the graphwithoutdashboard component * fix: the type of variable from dashboard * refactor: created utils and updated types * refactor: changed the name of variable and fixed typos * fix: the menu option dropdown for services widget header * chore: ts config is updated for the isTwidgetoptions * chore: removed the unwanted file * fix: css on hover of widget header and default value * refactor: renamed the file to index in fullView * refactor: disable the edit delete clone option * fix: typos * chore: types are updated in metrics application * chore: type is updated * fix: build is fixed * refactor: changes the yaxisunit to ns of serviceoverview --------- Co-authored-by: Palash Gupta <palashgdev@gmail.com> Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
2023-07-18 08:55:01 +05:30
legends,
filterItems,
dataSource,
});
};
export const databaseCallsAvgDuration = ({
servicename,
tagFilterItems,
}: DatabaseCallProps): QueryBuilderData => {
Shifting of graph from Dashboard to Service layer (#3107) * refactor: initial setup for full view done * feat: done with shifting of chart to services * refactor: removed the dependency dashboard action * refactor: make ondelete and onclone optional in widgetheader * refactor: optimised the allowdelete, allowclone and allowEdit * fix: build pipline error * refactor: moved contant to contant.js * refactor: create a utils and types and seperated it from component * refactor: merge the latest overview from develop * refactor: review comments changes * refactor: magic string to constants * refactor: handle the isloading for topLevelOperations * refactor: apply loading check for other api's * refactor: seperated the component * refactor: removed the graphwithoutdashboard component * fix: the type of variable from dashboard * refactor: created utils and updated types * refactor: changed the name of variable and fixed typos * fix: the menu option dropdown for services widget header * chore: ts config is updated for the isTwidgetoptions * chore: removed the unwanted file * fix: css on hover of widget header and default value * refactor: renamed the file to index in fullView * refactor: disable the edit delete clone option * fix: typos * chore: types are updated in metrics application * chore: type is updated * fix: build is fixed * refactor: changes the yaxisunit to ns of serviceoverview --------- Co-authored-by: Palash Gupta <palashgdev@gmail.com> Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
2023-07-18 08:55:01 +05:30
const autocompleteDataA: BaseAutocompleteData = {
key: WidgetKeys.SignozDbLatencySum,
feat: tree is updated to show different node values instead of editor (#2696) * feat: tree is updated to show different node values instead of editor * chore: table view is updated * [Refactoring]: Seperate title and menu to another component (#3531) * refactor: separated the title renderer * refactor: separated styles * refactor: seperate types * refactor: instead of key showing value if array (#3532) * refactor: instead of key showing value if array * feat: added filter for array and also nodekey * refactor: made common check for value is array * refactor: changed the key to value for arrays * chore: getData types is updated * chore: getDataTypes function types is updated * refactor: connection to querybuilder (#3535) Co-authored-by: Palash Gupta <palashgdev@gmail.com> * chore: operator is updated * fix: build is fixed * fix: build is fixed * chore: operator is updated * chore: operator is updated * chore: parsing is updated * chore: key is updated * Refactor: Log parsing updates (#3542) * refactor: updated nodekey * refactor: removed pasred data * refactor: parentIsArray check * chore: added the support for the bool * [Refactor]: handle nested object case (#3545) * refactor: updated nodekey * refactor: removed pasred data * refactor: parentIsArray check * refactor: handled nested array inside object case * fix: float issue parsing * chore: operator is updated * chore: title is updated * chore: title is updated * fix: update tagRegexp * fix: maintain single source of DataTypes * chore: operator is updated * fix: fixed due to merge conflicts --------- Co-authored-by: Rajat Dabade <rajat@signoz.io> Co-authored-by: Yunus A M <myounis.ar@live.com>
2023-09-15 10:21:42 +05:30
dataType: DataTypes.Float64,
isColumn: true,
type: '',
};
Shifting of graph from Dashboard to Service layer (#3107) * refactor: initial setup for full view done * feat: done with shifting of chart to services * refactor: removed the dependency dashboard action * refactor: make ondelete and onclone optional in widgetheader * refactor: optimised the allowdelete, allowclone and allowEdit * fix: build pipline error * refactor: moved contant to contant.js * refactor: create a utils and types and seperated it from component * refactor: merge the latest overview from develop * refactor: review comments changes * refactor: magic string to constants * refactor: handle the isloading for topLevelOperations * refactor: apply loading check for other api's * refactor: seperated the component * refactor: removed the graphwithoutdashboard component * fix: the type of variable from dashboard * refactor: created utils and updated types * refactor: changed the name of variable and fixed typos * fix: the menu option dropdown for services widget header * chore: ts config is updated for the isTwidgetoptions * chore: removed the unwanted file * fix: css on hover of widget header and default value * refactor: renamed the file to index in fullView * refactor: disable the edit delete clone option * fix: typos * chore: types are updated in metrics application * chore: type is updated * fix: build is fixed * refactor: changes the yaxisunit to ns of serviceoverview --------- Co-authored-by: Palash Gupta <palashgdev@gmail.com> Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
2023-07-18 08:55:01 +05:30
const autocompleteDataB: BaseAutocompleteData = {
key: WidgetKeys.SignozDBLatencyCount,
feat: tree is updated to show different node values instead of editor (#2696) * feat: tree is updated to show different node values instead of editor * chore: table view is updated * [Refactoring]: Seperate title and menu to another component (#3531) * refactor: separated the title renderer * refactor: separated styles * refactor: seperate types * refactor: instead of key showing value if array (#3532) * refactor: instead of key showing value if array * feat: added filter for array and also nodekey * refactor: made common check for value is array * refactor: changed the key to value for arrays * chore: getData types is updated * chore: getDataTypes function types is updated * refactor: connection to querybuilder (#3535) Co-authored-by: Palash Gupta <palashgdev@gmail.com> * chore: operator is updated * fix: build is fixed * fix: build is fixed * chore: operator is updated * chore: operator is updated * chore: parsing is updated * chore: key is updated * Refactor: Log parsing updates (#3542) * refactor: updated nodekey * refactor: removed pasred data * refactor: parentIsArray check * chore: added the support for the bool * [Refactor]: handle nested object case (#3545) * refactor: updated nodekey * refactor: removed pasred data * refactor: parentIsArray check * refactor: handled nested array inside object case * fix: float issue parsing * chore: operator is updated * chore: title is updated * chore: title is updated * fix: update tagRegexp * fix: maintain single source of DataTypes * chore: operator is updated * fix: fixed due to merge conflicts --------- Co-authored-by: Rajat Dabade <rajat@signoz.io> Co-authored-by: Yunus A M <myounis.ar@live.com>
2023-09-15 10:21:42 +05:30
dataType: DataTypes.Float64,
isColumn: true,
type: '',
};
Shifting of graph from Dashboard to Service layer (#3107) * refactor: initial setup for full view done * feat: done with shifting of chart to services * refactor: removed the dependency dashboard action * refactor: make ondelete and onclone optional in widgetheader * refactor: optimised the allowdelete, allowclone and allowEdit * fix: build pipline error * refactor: moved contant to contant.js * refactor: create a utils and types and seperated it from component * refactor: merge the latest overview from develop * refactor: review comments changes * refactor: magic string to constants * refactor: handle the isloading for topLevelOperations * refactor: apply loading check for other api's * refactor: seperated the component * refactor: removed the graphwithoutdashboard component * fix: the type of variable from dashboard * refactor: created utils and updated types * refactor: changed the name of variable and fixed typos * fix: the menu option dropdown for services widget header * chore: ts config is updated for the isTwidgetoptions * chore: removed the unwanted file * fix: css on hover of widget header and default value * refactor: renamed the file to index in fullView * refactor: disable the edit delete clone option * fix: typos * chore: types are updated in metrics application * chore: type is updated * fix: build is fixed * refactor: changes the yaxisunit to ns of serviceoverview --------- Co-authored-by: Palash Gupta <palashgdev@gmail.com> Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
2023-07-18 08:55:01 +05:30
const additionalItemsA: TagFilterItem[] = [
{
id: '',
key: {
Shifting of graph from Dashboard to Service layer (#3107) * refactor: initial setup for full view done * feat: done with shifting of chart to services * refactor: removed the dependency dashboard action * refactor: make ondelete and onclone optional in widgetheader * refactor: optimised the allowdelete, allowclone and allowEdit * fix: build pipline error * refactor: moved contant to contant.js * refactor: create a utils and types and seperated it from component * refactor: merge the latest overview from develop * refactor: review comments changes * refactor: magic string to constants * refactor: handle the isloading for topLevelOperations * refactor: apply loading check for other api's * refactor: seperated the component * refactor: removed the graphwithoutdashboard component * fix: the type of variable from dashboard * refactor: created utils and updated types * refactor: changed the name of variable and fixed typos * fix: the menu option dropdown for services widget header * chore: ts config is updated for the isTwidgetoptions * chore: removed the unwanted file * fix: css on hover of widget header and default value * refactor: renamed the file to index in fullView * refactor: disable the edit delete clone option * fix: typos * chore: types are updated in metrics application * chore: type is updated * fix: build is fixed * refactor: changes the yaxisunit to ns of serviceoverview --------- Co-authored-by: Palash Gupta <palashgdev@gmail.com> Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
2023-07-18 08:55:01 +05:30
key: WidgetKeys.Service_name,
feat: tree is updated to show different node values instead of editor (#2696) * feat: tree is updated to show different node values instead of editor * chore: table view is updated * [Refactoring]: Seperate title and menu to another component (#3531) * refactor: separated the title renderer * refactor: separated styles * refactor: seperate types * refactor: instead of key showing value if array (#3532) * refactor: instead of key showing value if array * feat: added filter for array and also nodekey * refactor: made common check for value is array * refactor: changed the key to value for arrays * chore: getData types is updated * chore: getDataTypes function types is updated * refactor: connection to querybuilder (#3535) Co-authored-by: Palash Gupta <palashgdev@gmail.com> * chore: operator is updated * fix: build is fixed * fix: build is fixed * chore: operator is updated * chore: operator is updated * chore: parsing is updated * chore: key is updated * Refactor: Log parsing updates (#3542) * refactor: updated nodekey * refactor: removed pasred data * refactor: parentIsArray check * chore: added the support for the bool * [Refactor]: handle nested object case (#3545) * refactor: updated nodekey * refactor: removed pasred data * refactor: parentIsArray check * refactor: handled nested array inside object case * fix: float issue parsing * chore: operator is updated * chore: title is updated * chore: title is updated * fix: update tagRegexp * fix: maintain single source of DataTypes * chore: operator is updated * fix: fixed due to merge conflicts --------- Co-authored-by: Rajat Dabade <rajat@signoz.io> Co-authored-by: Yunus A M <myounis.ar@live.com>
2023-09-15 10:21:42 +05:30
dataType: DataTypes.String,
isColumn: false,
Shifting of graph from Dashboard to Service layer (#3107) * refactor: initial setup for full view done * feat: done with shifting of chart to services * refactor: removed the dependency dashboard action * refactor: make ondelete and onclone optional in widgetheader * refactor: optimised the allowdelete, allowclone and allowEdit * fix: build pipline error * refactor: moved contant to contant.js * refactor: create a utils and types and seperated it from component * refactor: merge the latest overview from develop * refactor: review comments changes * refactor: magic string to constants * refactor: handle the isloading for topLevelOperations * refactor: apply loading check for other api's * refactor: seperated the component * refactor: removed the graphwithoutdashboard component * fix: the type of variable from dashboard * refactor: created utils and updated types * refactor: changed the name of variable and fixed typos * fix: the menu option dropdown for services widget header * chore: ts config is updated for the isTwidgetoptions * chore: removed the unwanted file * fix: css on hover of widget header and default value * refactor: renamed the file to index in fullView * refactor: disable the edit delete clone option * fix: typos * chore: types are updated in metrics application * chore: type is updated * fix: build is fixed * refactor: changes the yaxisunit to ns of serviceoverview --------- Co-authored-by: Palash Gupta <palashgdev@gmail.com> Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
2023-07-18 08:55:01 +05:30
type: MetricsType.Resource,
},
Shifting of graph from Dashboard to Service layer (#3107) * refactor: initial setup for full view done * feat: done with shifting of chart to services * refactor: removed the dependency dashboard action * refactor: make ondelete and onclone optional in widgetheader * refactor: optimised the allowdelete, allowclone and allowEdit * fix: build pipline error * refactor: moved contant to contant.js * refactor: create a utils and types and seperated it from component * refactor: merge the latest overview from develop * refactor: review comments changes * refactor: magic string to constants * refactor: handle the isloading for topLevelOperations * refactor: apply loading check for other api's * refactor: seperated the component * refactor: removed the graphwithoutdashboard component * fix: the type of variable from dashboard * refactor: created utils and updated types * refactor: changed the name of variable and fixed typos * fix: the menu option dropdown for services widget header * chore: ts config is updated for the isTwidgetoptions * chore: removed the unwanted file * fix: css on hover of widget header and default value * refactor: renamed the file to index in fullView * refactor: disable the edit delete clone option * fix: typos * chore: types are updated in metrics application * chore: type is updated * fix: build is fixed * refactor: changes the yaxisunit to ns of serviceoverview --------- Co-authored-by: Palash Gupta <palashgdev@gmail.com> Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
2023-07-18 08:55:01 +05:30
op: OPERATORS.IN,
feat: tree is updated to show different node values instead of editor (#2696) * feat: tree is updated to show different node values instead of editor * chore: table view is updated * [Refactoring]: Seperate title and menu to another component (#3531) * refactor: separated the title renderer * refactor: separated styles * refactor: seperate types * refactor: instead of key showing value if array (#3532) * refactor: instead of key showing value if array * feat: added filter for array and also nodekey * refactor: made common check for value is array * refactor: changed the key to value for arrays * chore: getData types is updated * chore: getDataTypes function types is updated * refactor: connection to querybuilder (#3535) Co-authored-by: Palash Gupta <palashgdev@gmail.com> * chore: operator is updated * fix: build is fixed * fix: build is fixed * chore: operator is updated * chore: operator is updated * chore: parsing is updated * chore: key is updated * Refactor: Log parsing updates (#3542) * refactor: updated nodekey * refactor: removed pasred data * refactor: parentIsArray check * chore: added the support for the bool * [Refactor]: handle nested object case (#3545) * refactor: updated nodekey * refactor: removed pasred data * refactor: parentIsArray check * refactor: handled nested array inside object case * fix: float issue parsing * chore: operator is updated * chore: title is updated * chore: title is updated * fix: update tagRegexp * fix: maintain single source of DataTypes * chore: operator is updated * fix: fixed due to merge conflicts --------- Co-authored-by: Rajat Dabade <rajat@signoz.io> Co-authored-by: Yunus A M <myounis.ar@live.com>
2023-09-15 10:21:42 +05:30
value: [servicename],
},
...tagFilterItems,
];
const autocompleteData: BaseAutocompleteData[] = [
Shifting of graph from Dashboard to Service layer (#3107) * refactor: initial setup for full view done * feat: done with shifting of chart to services * refactor: removed the dependency dashboard action * refactor: make ondelete and onclone optional in widgetheader * refactor: optimised the allowdelete, allowclone and allowEdit * fix: build pipline error * refactor: moved contant to contant.js * refactor: create a utils and types and seperated it from component * refactor: merge the latest overview from develop * refactor: review comments changes * refactor: magic string to constants * refactor: handle the isloading for topLevelOperations * refactor: apply loading check for other api's * refactor: seperated the component * refactor: removed the graphwithoutdashboard component * fix: the type of variable from dashboard * refactor: created utils and updated types * refactor: changed the name of variable and fixed typos * fix: the menu option dropdown for services widget header * chore: ts config is updated for the isTwidgetoptions * chore: removed the unwanted file * fix: css on hover of widget header and default value * refactor: renamed the file to index in fullView * refactor: disable the edit delete clone option * fix: typos * chore: types are updated in metrics application * chore: type is updated * fix: build is fixed * refactor: changes the yaxisunit to ns of serviceoverview --------- Co-authored-by: Palash Gupta <palashgdev@gmail.com> Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
2023-07-18 08:55:01 +05:30
autocompleteDataA,
autocompleteDataB,
];
const additionalItems: TagFilterItem[][] = [
additionalItemsA,
additionalItemsA,
];
const legends = ['', ''];
const disabled = [true, true];
Service layer to metrics using `USE_SPAN_METRIC` feature flag (#3196) * refactor: remove the dependency of services using redux * refactor: seperated columns and unit test case * refactor: move the constant to other file * refactor: updated test case * refactor: removed the duplicate enum * fix: removed the inline function * fix: removed the inline function * refactor: removed the magic string * fix: change the name from matrics to metrics * fix: one on one mapping of props * refactor: created a hook to getting services through api call * fix: linter error * refactor: renamed the file according to functionality * refactor: renamed more file according to functionality * refactor: generic querybuilderWithFormula * refactor: added generic datasource * refactor: dynamic disabled in getQueryBuilderQueriesWithFormula * refactor: generic legend for building query with formulas * feat: added new TopOperationMetrics component for key operation * refactor: added feature flag for key operation * refactor: shifted types and fixed typos * refactor: separated types and renamed file * refactor: one on one mapping * refactor: removed unwanted interfaces and renamed files * refactor: separated types * chore: done with basic struction and moving up the files * chore: moved some files to proper places * feat: added the support for metrics in service layer * refactor: shifted SkipOnBoardingModal logic to parent * refactor: created object to send as an augument for getQueryRangeRequestData * refactor: changes from columns to getColumns * refactor: updated the utils function getServiceListFromQuery * refactor: added memo to getQueryRangeRequestData in serive metrics application * refactor: separated constants from ServiceMetricsQuery.ts * refactor: separated mock data and updated test case * refactor: added useMemo on getColumns * refactor: made the use of useErrorNotification for show error * refactor: handled the error case * refactor: one on one mapping * chore: useGetQueriesRange hooks type is updated * refactor: review changes * chore: update type for columnconstants * chore: reverted back the changes lost in merge conflicts --------- Co-authored-by: Vishal Sharma <makeavish786@gmail.com> Co-authored-by: Palash Gupta <palashgdev@gmail.com> Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
2023-08-02 15:00:58 +05:30
const legendFormulas = ['Average Duration'];
const expressions = [FORMULA.DATABASE_CALLS_AVG_DURATION];
const aggregateOperators = [
MetricAggregateOperator.SUM_RATE,
MetricAggregateOperator.SUM_RATE,
];
const dataSource = DataSource.METRICS;
return getQueryBuilderQuerieswithFormula({
autocompleteData,
additionalItems,
legends,
disabled,
Service layer to metrics using `USE_SPAN_METRIC` feature flag (#3196) * refactor: remove the dependency of services using redux * refactor: seperated columns and unit test case * refactor: move the constant to other file * refactor: updated test case * refactor: removed the duplicate enum * fix: removed the inline function * fix: removed the inline function * refactor: removed the magic string * fix: change the name from matrics to metrics * fix: one on one mapping of props * refactor: created a hook to getting services through api call * fix: linter error * refactor: renamed the file according to functionality * refactor: renamed more file according to functionality * refactor: generic querybuilderWithFormula * refactor: added generic datasource * refactor: dynamic disabled in getQueryBuilderQueriesWithFormula * refactor: generic legend for building query with formulas * feat: added new TopOperationMetrics component for key operation * refactor: added feature flag for key operation * refactor: shifted types and fixed typos * refactor: separated types and renamed file * refactor: one on one mapping * refactor: removed unwanted interfaces and renamed files * refactor: separated types * chore: done with basic struction and moving up the files * chore: moved some files to proper places * feat: added the support for metrics in service layer * refactor: shifted SkipOnBoardingModal logic to parent * refactor: created object to send as an augument for getQueryRangeRequestData * refactor: changes from columns to getColumns * refactor: updated the utils function getServiceListFromQuery * refactor: added memo to getQueryRangeRequestData in serive metrics application * refactor: separated constants from ServiceMetricsQuery.ts * refactor: separated mock data and updated test case * refactor: added useMemo on getColumns * refactor: made the use of useErrorNotification for show error * refactor: handled the error case * refactor: one on one mapping * chore: useGetQueriesRange hooks type is updated * refactor: review changes * chore: update type for columnconstants * chore: reverted back the changes lost in merge conflicts --------- Co-authored-by: Vishal Sharma <makeavish786@gmail.com> Co-authored-by: Palash Gupta <palashgdev@gmail.com> Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
2023-08-02 15:00:58 +05:30
expressions,
legendFormulas,
aggregateOperators,
dataSource,
});
};