Skip to content

Commit

Permalink
Merge branch 'develop' into enable-new-search-bar-for-logs
Browse files Browse the repository at this point in the history
  • Loading branch information
vikrantgupta25 authored Sep 20, 2024
2 parents d8135c1 + 4aabfe7 commit da3719c
Show file tree
Hide file tree
Showing 44 changed files with 1,478 additions and 164 deletions.
49 changes: 20 additions & 29 deletions .github/ISSUE_TEMPLATE/request_dashboard.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,49 @@
---
name: Request Dashboard
about: Request a new dashboard for the SigNoz Dashboards repository
title: ''
title: '[Dashboard Request] '
labels: 'dashboard-template'
assignees: ''

---

## 📝 Dashboard Request Template
<!-- Use this template to request a new dashboard for the SigNoz Dashboards repository. Providing detailed information will help us understand your needs better and speed up the dashboard creation process. -->

*Use this template to request a new dashboard for the SigNoz Dashboards repository. Please provide as much detail as possible to help us understand your needs.*
## Dashboard Name

---

### 1. Dashboard Name
<!-- Provide the name for the requested dashboard. Be specific (e.g., "MySQL Monitoring Dashboard"). -->

Name of the requested dashboard (e.g., MySQL Monitoring Dashboard):
## Expected Dashboard Sections and Panels

---
(Can be tweaked (add or remove panels/sections) according to available metrics)

### 2. Expected Dashboard Sections and Panels
### Section Name

#### Section Name
<!-- Brief description of what this section should display (e.g., "Resource usage metrics for MySQL database"). -->

Brief description of the section (e.g., "Resource usage metrics for MySQL database").
### Panel Name

#### Panel Name
<!-- Description of the panel (e.g., "Displays current CPU usage, memory usage, etc."). -->

Panel description (e.g., "Value-type panels displaying current CPU usage, memory usage, etc.").

- **Example:**
<!-- - **Example:**
- **Section**: Resource Metrics
- **Panel**: CPU Usage - Displays the current CPU usage across all database instances.
- **Panel**: Memory Usage - Displays the total memory used by the MySQL process.

(Repeat this format for additional sections and panels)
- **Panel**: Memory Usage - Displays the total memory used by the MySQL process. -->

---
<!-- Repeat this format for any additional sections or panels. -->

### 3. Expected Variables
## Expected Dashboard Variables

List any variables you expect to use in the dashboard (e.g., `deployment.environment`, `hostname`, etc.).
<!-- List any dashboard variables that should be included in the dashboard. Examples could be `deployment.environment`, `hostname`, `region`, etc. -->

---
## Additional Comments or Requirements

### 4. Additional Comments or Requirements
<!-- Include any other details, special requirements, or specific visualizations you'd like to request for this dashboard. -->

Any additional details or special requirements for the dashboard?
## References or Screenshots

---
<!-- Add any references or screenshots of requested dashboard if available. -->

### 📋 Notes
## 📋 Notes

Please review the [CONTRIBUTING.md](https://github.com/SigNoz/dashboards/blob/main/CONTRIBUTING.md) for guidelines on dashboard structure, naming conventions, and how to submit a pull request.

---
Thank you for your request! We will review it and provide feedback or guidance as necessary.
37 changes: 24 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ Also, have a look at these [good first issues label](https://github.com/SigNoz/s
- [To run ClickHouse setup](#41-to-run-clickhouse-setup-recommended-for-local-development)
- [Contribute to SigNoz Helm Chart](#5-contribute-to-signoz-helm-chart-)
- [To run helm chart for local development](#51-to-run-helm-chart-for-local-development)
- [Contribute to Dashboards](#6-contribute-to-dashboards-)
- [Other Ways to Contribute](#other-ways-to-contribute)

# 1. General Instructions 📝

## 1.1 For Creating Issue(s)
Before making any significant changes and before filing a new issue, please check [existing open](https://github.com/SigNoz/signoz/issues?q=is%3Aopen+is%3Aissue), or [recently closed](https://github.com/SigNoz/signoz/issues?q=is%3Aissue+is%3Aclosed) issues to make sure somebody else hasn't already reported the issue. Please try to include as much information as you can.

**Issue Types** - [Bug Report](https://github.com/SigNoz/signoz/issues/new?assignees=&labels=&template=bug_report.md&title=) | [Feature Request](https://github.com/SigNoz/signoz/issues/new?assignees=&labels=&template=feature_request.md&title=) | [Performance Issue Report](https://github.com/SigNoz/signoz/issues/new?assignees=&labels=&template=performance-issue-report.md&title=) | [Report a Security Vulnerability](https://github.com/SigNoz/signoz/security/policy)
**Issue Types** - [Bug Report](https://github.com/SigNoz/signoz/issues/new?assignees=&labels=&template=bug_report.md&title=) | [Feature Request](https://github.com/SigNoz/signoz/issues/new?assignees=&labels=&template=feature_request.md&title=) | [Performance Issue Report](https://github.com/SigNoz/signoz/issues/new?assignees=&labels=&template=performance-issue-report.md&title=) | [Request Dashboard](https://github.com/SigNoz/signoz/issues/new?assignees=&labels=dashboard-template&projects=&template=request_dashboard.md&title=%5BDashboard+Request%5D+) | [Report a Security Vulnerability](https://github.com/SigNoz/signoz/security/policy)

#### Details like these are incredibly useful:

Expand All @@ -56,7 +57,7 @@ Before making any significant changes and before filing a new issue, please chec
Discussing your proposed changes ahead of time will make the contribution
process smooth for everyone 🙌.

**[`^top^`](#)**
**[`^top^`](#contributing-guidelines)**

<hr>

Expand Down Expand Up @@ -97,13 +98,14 @@ GitHub provides additional document on [forking a repository](https://help.githu
stability and quality of the component.


You can always reach out to `[email protected]` to understand more about the repo and product. We are very responsive over email and [SLACK](https://signoz.io/slack).
You can always reach out to `[email protected]` to understand more about the repo and product. We are very responsive over email and [slack community](https://signoz.io/slack).

### Pointers:
- If you find any **bugs** → please create an [**issue.**](https://github.com/SigNoz/signoz/issues/new?assignees=&labels=&template=bug_report.md&title=)
- If you find anything **missing** in documentation → you can create an issue with the label **`documentation`**.
- If you want to build any **new feature** → please create an [issue with the label **`enhancement`**.](https://github.com/SigNoz/signoz/issues/new?assignees=&labels=&template=feature_request.md&title=)
- If you want to **discuss** something about the product, start a new [**discussion**.](https://github.com/SigNoz/signoz/discussions)
- If you want to request a new **dashboard template** → please create an issue [here](https://github.com/SigNoz/signoz/issues/new?assignees=&labels=dashboard-template&projects=&template=request_dashboard.md&title=%5BDashboard+Request%5D+).

<hr>

Expand All @@ -117,7 +119,7 @@ e.g. If you are submitting a fix for an issue in frontend, the PR name should be

- Feel free to ping us on [`#contributing`](https://signoz-community.slack.com/archives/C01LWQ8KS7M) or [`#contributing-frontend`](https://signoz-community.slack.com/archives/C027134DM8B) on our slack community if you need any help on this :)

**[`^top^`](#)**
**[`^top^`](#contributing-guidelines)**

<hr>

Expand All @@ -127,14 +129,13 @@ e.g. If you are submitting a fix for an issue in frontend, the PR name should be

- [**Frontend**](#3-develop-frontend-) (Written in Typescript, React)
- [**Backend**](#4-contribute-to-backend-query-service-) (Query Service, written in Go)
- [**Dashboard Templates**](#6-contribute-to-dashboards-) (JSON dashboard templates built with SigNoz)

Depending upon your area of expertise & interest, you can choose one or more to contribute. Below are detailed instructions to contribute in each area.

**Please note:** If you want to work on an issue, please ask the maintainers to assign the issue to you before starting work on it. This would help us understand who is working on an issue and prevent duplicate work. 🙏🏻
**Please note:** If you want to work on an issue, please add a brief description of your solution on the issue before starting work on it.

⚠️ If you just raise a PR, without the corresponding issue being assigned to you - it may not be accepted.

**[`^top^`](#)**
**[`^top^`](#contributing-guidelines)**

<hr>

Expand Down Expand Up @@ -188,7 +189,7 @@ Also, have a look at [Frontend README.md](https://github.com/SigNoz/signoz/blob/
### Important Notes:
The Maintainers / Contributors who will change Line Numbers of `Frontend` & `Query-Section`, please update line numbers in [`/.scripts/commentLinesForSetup.sh`](https://github.com/SigNoz/signoz/blob/develop/.scripts/commentLinesForSetup.sh)

**[`^top^`](#)**
**[`^top^`](#contributing-guidelines)**

## 3.2 Contribute to Frontend without installing SigNoz backend

Expand All @@ -209,7 +210,7 @@ Please ping us in the [`#contributing`](https://signoz-community.slack.com/archi

**Frontend should now be accessible at** [`http://localhost:3301/services`](http://localhost:3301/services)

**[`^top^`](#)**
**[`^top^`](#contributing-guidelines)**

<hr>

Expand Down Expand Up @@ -309,7 +310,7 @@ Click the button below. A workspace with all required environments will be creat
> To use it on your forked repo, edit the 'Open in Gitpod' button URL to `https://gitpod.io/#https://github.com/<your-github-username>/signoz` -->

**[`^top^`](#)**
**[`^top^`](#contributing-guidelines)**

<hr>

Expand Down Expand Up @@ -365,10 +366,21 @@ curl -sL https://github.com/SigNoz/signoz/raw/develop/sample-apps/hotrod/hotrod-
| HOTROD_NAMESPACE=sample-application bash
```

**[`^top^`](#)**
**[`^top^`](#contributing-guidelines)**

---

# 6. Contribute to Dashboards 📈

**Need to Update: [https://github.com/SigNoz/dashboards](https://github.com/SigNoz/dashboards)**

To contribute a new dashboard template for any service, follow the contribution guidelines in the [Dashboard Contributing Guide](https://github.com/SigNoz/dashboards/blob/main/CONTRIBUTING.md). In brief:

1. Create a dashboard JSON file.
2. Add a README file explaining the dashboard, the metrics ingested, and the configurations needed.
3. Include screenshots of the dashboard in the `assets/` directory.
4. Submit a pull request for review.

## Other Ways to Contribute

There are many other ways to get involved with the community and to participate in this project:
Expand All @@ -379,7 +391,6 @@ There are many other ways to get involved with the community and to participate
- Help answer questions on forums such as Stack Overflow and [SigNoz Community Slack Channel](https://signoz.io/slack).
- Tell others about the project on Twitter, your blog, etc.


Again, Feel free to ping us on [`#contributing`](https://signoz-community.slack.com/archives/C01LWQ8KS7M) or [`#contributing-frontend`](https://signoz-community.slack.com/archives/C027134DM8B) on our slack community if you need any help on this :)

Thank You!
1 change: 1 addition & 0 deletions frontend/public/locales/en-GB/alerts.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"option_atleastonce": "at least once",
"option_onaverage": "on average",
"option_intotal": "in total",
"option_last": "last",
"option_above": "above",
"option_below": "below",
"option_equal": "is equal to",
Expand Down
1 change: 1 addition & 0 deletions frontend/public/locales/en-GB/rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"option_atleastonce": "at least once",
"option_onaverage": "on average",
"option_intotal": "in total",
"option_last": "last",
"option_above": "above",
"option_below": "below",
"option_equal": "is equal to",
Expand Down
1 change: 1 addition & 0 deletions frontend/public/locales/en/alerts.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"option_atleastonce": "at least once",
"option_onaverage": "on average",
"option_intotal": "in total",
"option_last": "last",
"option_above": "above",
"option_below": "below",
"option_equal": "is equal to",
Expand Down
1 change: 1 addition & 0 deletions frontend/public/locales/en/rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"option_atleastonce": "at least once",
"option_onaverage": "on average",
"option_intotal": "in total",
"option_last": "last",
"option_above": "above",
"option_below": "below",
"option_equal": "is equal to",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,21 @@
}

&.INFO {
background-color: var(--bg-slate-400);
background-color: var(--bg-robin-500);
}

&.WARNING,
&.WARN {
background-color: var(--bg-amber-500);
}

&.ERROR {
background-color: var(--bg-cherry-500);
}

&.TRACE {
background-color: var(--bg-robin-300);
background-color: var(--bg-forest-400);
}

&.DEBUG {
background-color: var(--bg-forest-500);
background-color: var(--bg-aqua-500);
}

&.FATAL {
background-color: var(--bg-sakura-500);
}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/container/FormAlertRules/RuleOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ function RuleOptions({
<Select.Option value="2">{t('option_allthetimes')}</Select.Option>
<Select.Option value="3">{t('option_onaverage')}</Select.Option>
<Select.Option value="4">{t('option_intotal')}</Select.Option>
<Select.Option value="5">{t('option_last')}</Select.Option>
</InlineSelect>
);

Expand Down
5 changes: 4 additions & 1 deletion frontend/src/container/FormAlertRules/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,10 @@ function FormAlertRules({
});

// invalidate rule in cache
ruleCache.invalidateQueries([REACT_QUERY_KEY.ALERT_RULE_DETAILS, ruleId]);
ruleCache.invalidateQueries([
REACT_QUERY_KEY.ALERT_RULE_DETAILS,
`${ruleId}`,
]);

// eslint-disable-next-line sonarjs/no-identical-functions
setTimeout(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
box-sizing: border-box;
margin: 16px 0;
border-radius: 3px;

.global-search {
.ant-input-group-addon {
border: none;
background-color: var(--bg-ink-300);
}
}
}

.height-widget {
Expand Down Expand Up @@ -55,3 +62,15 @@
}
}
}

.lightMode {
.full-view-container {
.graph-container {
.global-search {
.ant-input-group-addon {
background-color: var(--bg-vanilla-200);
}
}
}
}
}
25 changes: 23 additions & 2 deletions frontend/src/container/GridCardLayout/GridCard/FullView/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import './WidgetFullView.styles.scss';

import { LoadingOutlined, SyncOutlined } from '@ant-design/icons';
import { Button, Spin } from 'antd';
import {
LoadingOutlined,
SearchOutlined,
SyncOutlined,
} from '@ant-design/icons';
import { Button, Input, Spin } from 'antd';
import cx from 'classnames';
import { ToggleGraphProps } from 'components/Graph/types';
import Spinner from 'components/Spinner';
Expand Down Expand Up @@ -172,6 +176,10 @@ function FullView({

const isListView = widget.panelTypes === PANEL_TYPES.LIST;

const isTablePanel = widget.panelTypes === PANEL_TYPES.TABLE;

const [searchTerm, setSearchTerm] = useState<string>('');

if (response.isLoading && widget.panelTypes !== PANEL_TYPES.LIST) {
return <Spinner height="100%" size="large" tip="Loading..." />;
}
Expand Down Expand Up @@ -216,6 +224,18 @@ function FullView({
}}
isGraphLegendToggleAvailable={canModifyChart}
>
{isTablePanel && (
<Input
addonBefore={<SearchOutlined size={14} />}
className="global-search"
placeholder="Search..."
allowClear
key={widget.id}
onChange={(e): void => {
setSearchTerm(e.target.value || '');
}}
/>
)}
<PanelWrapper
queryResponse={response}
widget={widget}
Expand All @@ -226,6 +246,7 @@ function FullView({
graphVisibility={graphsVisibilityStates}
onDragSelect={onDragSelect}
tableProcessedDataRef={tableProcessedDataRef}
searchTerm={searchTerm}
/>
</GraphContainer>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ function WidgetGraphComponent({
});
};

const [searchTerm, setSearchTerm] = useState<string>('');

const loadingState =
(queryResponse.isLoading || queryResponse.status === 'idle') &&
widget.panelTypes !== PANEL_TYPES.LIST;
Expand Down Expand Up @@ -317,6 +319,7 @@ function WidgetGraphComponent({
isWarning={isWarning}
isFetchingResponse={isFetchingResponse}
tableProcessedDataRef={tableProcessedDataRef}
setSearchTerm={setSearchTerm}
/>
</div>
{queryResponse.isLoading && widget.panelTypes !== PANEL_TYPES.LIST && (
Expand All @@ -337,6 +340,7 @@ function WidgetGraphComponent({
onDragSelect={onDragSelect}
tableProcessedDataRef={tableProcessedDataRef}
customTooltipElement={customTooltipElement}
searchTerm={searchTerm}
/>
</div>
)}
Expand Down
Loading

0 comments on commit da3719c

Please sign in to comment.