Compare commits

..

176 Commits

Author SHA1 Message Date
Naman Verma
574867bafb chore: update frontend schema 2026-05-18 20:33:38 +05:30
Naman Verma
d87edca9d1 Merge branch 'main' into nv/v2-dashboard-create 2026-05-18 20:32:34 +05:30
Naman Verma
f0ed0a8967 feat: v2 dashboard GET API (#11136)
* feat: v2 dashboard GET API

* Merge branch 'nv/v2-dashboard-create' into nv/v2-dashboard-get

* chore: update api specs

* fix: remove soft delete references

* chore: embed StorableDashboard into joinedRow in store method

* fix: fix build error

* chore: revert all frontend changes

* fix: remove public dashboard from get v2 call
2026-05-15 11:26:02 +05:30
Naman Verma
b47343bc09 Merge branch 'main' into nv/v2-dashboard-create 2026-05-15 10:52:06 +05:30
Naman Verma
bb39c52229 feat: follow the metadata+spec key structure in open api spec 2026-05-15 00:36:49 +05:30
Naman Verma
5fe69473c9 feat: follow the metadata+spec key structure 2026-05-15 00:34:12 +05:30
Naman Verma
9be77ace42 chore: change dashboardData to dashboardSpec 2026-05-14 20:23:54 +05:30
Naman Verma
c804d8f9b6 fix: remove sqlstore passage in ee pkg 2026-05-14 20:21:12 +05:30
Naman Verma
996bd949f2 fix: add ctx needed in sqlstore 2026-05-14 20:20:44 +05:30
Naman Verma
84225023a5 chore: rename module to m 2026-05-14 20:04:25 +05:30
Naman Verma
a5b9dd279c chore: move NewDashboardV2 to NewDashboardV2WithoutTags 2026-05-14 20:03:44 +05:30
Naman Verma
172418a337 fix: use binding package to get request 2026-05-14 20:02:46 +05:30
Naman Verma
d1d5a9fa32 fix: use store.RunInTx instead of taking in sqlstore 2026-05-14 20:01:18 +05:30
Naman Verma
6f81e9f364 chore: revert idx generation to resolve conflicts 2026-05-14 19:50:09 +05:30
Naman Verma
1933bec786 Merge branch 'main' into nv/v2-dashboard-create 2026-05-14 19:48:57 +05:30
Naman Verma
6d3d9bfb49 Merge branch 'main' into nv/v2-dashboard-create 2026-05-14 19:46:00 +05:30
Naman Verma
8b89f4af85 chore: remove uploaded grafana flag from metadata 2026-05-14 17:51:10 +05:30
Naman Verma
66e4132504 Merge branch 'nv/tags' into nv/v2-dashboard-create 2026-05-14 17:49:37 +05:30
Naman Verma
29e14ce9c6 chore: bump migration number 2026-05-14 17:47:34 +05:30
Naman Verma
d7dc789a58 Merge branch 'main' into nv/tags 2026-05-14 17:45:55 +05:30
Naman Verma
d2d129eea9 chore: comment out unique index test 2026-05-14 16:03:21 +05:30
Naman Verma
9e1704615f feat: add created at to tag relations 2026-05-14 15:58:52 +05:30
Naman Verma
db06557c12 chore: comment out unique index test 2026-05-14 15:51:18 +05:30
Naman Verma
1475e2b53a chore: add a todo comment 2026-05-14 15:37:07 +05:30
Naman Verma
e58119a416 chore: comment out tags unique index for now 2026-05-14 15:27:53 +05:30
Naman Verma
f5935ccaf4 Merge branch 'nv/tags' into nv/v2-dashboard-create 2026-05-13 22:41:17 +05:30
Naman Verma
d354044fbe Merge branch 'main' into nv/tags 2026-05-13 22:40:29 +05:30
Naman Verma
fe6cbc3c0c test: add unit tests for new idx type 2026-05-13 22:39:01 +05:30
Naman Verma
45fa0c739c chore: move tag resolution to module 2026-05-13 17:35:24 +05:30
Naman Verma
e1527dd148 chore: combine functional unique index with unique index 2026-05-13 17:23:22 +05:30
Naman Verma
5063be6467 chore: use tagtypestest package for mock store 2026-05-13 17:09:09 +05:30
Naman Verma
b453655dea chore: rename create method to createOrGet 2026-05-13 16:54:58 +05:30
Naman Verma
4cb27e330e Merge branch 'nv/tags' into nv/v2-dashboard-create 2026-05-13 14:22:20 +05:30
Naman Verma
b47bc6bcc4 fix: only ascii in regex 2026-05-13 13:51:02 +05:30
Naman Verma
5321e9ee87 feat: functional unique index in sql schema 2026-05-13 13:27:44 +05:30
Naman Verma
fc4f326953 fix: use sync tags in create api 2026-05-13 12:21:45 +05:30
Naman Verma
2af4cbf0f9 Merge branch 'nv/tags' into nv/v2-dashboard-create 2026-05-13 12:11:30 +05:30
Naman Verma
e82f568a27 chore: remove methods that shouldn't be exposed 2026-05-13 12:11:09 +05:30
Naman Verma
c2aac3a278 fix: add regex for tags 2026-05-13 12:00:26 +05:30
Naman Verma
ddfec3e5f7 fix: add len check on tags keys and values 2026-05-13 11:32:31 +05:30
Naman Verma
af623f66e8 chore: bump migration number 2026-05-13 11:23:03 +05:30
Naman Verma
268e747f5c fix: fix build error 2026-05-13 10:59:12 +05:30
Naman Verma
3fc72329c9 Merge branch 'nv/tags' into nv/v2-dashboard-create 2026-05-13 10:56:15 +05:30
Naman Verma
10ecb7524c fix: add ID in tag relation 2026-05-13 10:33:27 +05:30
Naman Verma
8fc21ca6b9 fix: remove user auditable 2026-05-13 10:19:51 +05:30
Naman Verma
422149369d fix: add org id filter in all list and delete queries 2026-05-13 10:11:55 +05:30
Naman Verma
2063697350 chore: change entity id to resource id 2026-05-13 09:41:01 +05:30
Naman Verma
685faa9211 Merge branch 'main' into nv/tags 2026-05-13 09:23:28 +05:30
Naman Verma
de6fcb9fbb chore: bump migration number 2026-05-12 14:19:47 +05:30
Naman Verma
828619a9e6 Merge branch 'main' into nv/tags 2026-05-12 14:19:17 +05:30
Naman Verma
aff2e1be6b fix: fix build errors in dashboard module 2026-05-12 14:13:40 +05:30
Naman Verma
9728d17a0a fix: remove entity type definition 2026-05-12 14:10:29 +05:30
Naman Verma
ffaf334dfd Merge branch 'nv/tags' into nv/v2-dashboard-create 2026-05-12 14:09:58 +05:30
Naman Verma
d87e7241c0 feat: add SyncTags method that covers creation and linking 2026-05-12 14:09:19 +05:30
Naman Verma
ae184315a9 feat: foreign key on tag id 2026-05-12 13:55:33 +05:30
Naman Verma
29f782a3a0 chore: remove org ID from tag relation 2026-05-12 13:51:14 +05:30
Naman Verma
71d8dafce1 fix: singular table name 2026-05-12 13:45:02 +05:30
Naman Verma
412320d7d9 fix: use coretypes.Kind instead of defining entity type 2026-05-12 13:42:35 +05:30
Naman Verma
9b5d78b5a0 Merge branch 'main' into nv/tags 2026-05-12 13:21:20 +05:30
Naman Verma
444464ae15 fix: created and updated by schema 2026-05-12 13:04:48 +05:30
Naman Verma
d5841f8daa fix: correct pk in bun model for tag relations 2026-05-12 12:29:29 +05:30
Naman Verma
c344cd256f fix: diff error codes for invalid keys and values 2026-05-12 12:27:46 +05:30
Naman Verma
2f6b7b6260 Merge branch 'nv/tags' into nv/v2-dashboard-create 2026-05-11 23:42:21 +05:30
Naman Verma
5e61be1606 feat: method to build postable tags from tags 2026-05-11 23:42:08 +05:30
Naman Verma
1f7032953c Merge branch 'nv/tags' into nv/v2-dashboard-create 2026-05-11 22:34:02 +05:30
Naman Verma
173037d3be fix: extend bun in joinedRow 2026-05-11 22:33:37 +05:30
Naman Verma
4713fd4839 chore: generate api spec 2026-05-11 14:47:02 +05:30
Naman Verma
4ad872b722 fix: add back api endpoint 2026-05-11 14:24:53 +05:30
Naman Verma
642fb66831 Merge branch 'nv/tags' into nv/v2-dashboard-create 2026-05-11 14:11:28 +05:30
Naman Verma
d12c846212 chore: change where tag module is instantiated 2026-05-11 14:10:07 +05:30
Naman Verma
4e5bd7cf6f fix: lint fix regarding nil, nil return in test file 2026-05-11 14:06:08 +05:30
Naman Verma
3982cce603 chore: merge conflicts error fixing pt 1 2026-05-11 13:59:41 +05:30
Naman Verma
1a43c85cb8 Merge branch 'nv/tags' into nv/v2-dashboard-create 2026-05-11 13:53:21 +05:30
Naman Verma
bd11e985e1 feat: new module for tags 2026-05-11 13:45:10 +05:30
Naman Verma
3e849ee2d3 feat: reserved DSL key validation for tags 2026-05-08 18:10:28 +05:30
Naman Verma
f7d9a57637 fix: pass entity type in create many 2026-05-08 17:56:58 +05:30
Naman Verma
fceb770337 Merge branch 'nv/tags-for-dashboard-create' into nv/v2-dashboard-create 2026-05-08 15:48:58 +05:30
Naman Verma
44496d9d8d feat: entity type column in tags 2026-05-08 15:48:51 +05:30
Naman Verma
398943fe41 Merge branch 'nv/tags-for-dashboard-create' into nv/v2-dashboard-create 2026-05-08 13:38:22 +05:30
Naman Verma
a17debc61b feat: move tags to key:value pairs model 2026-05-08 13:38:13 +05:30
Naman Verma
3113b82904 Merge branch 'nv/tags-for-dashboard-create' into nv/v2-dashboard-create 2026-05-07 12:06:33 +05:30
Naman Verma
71c60c3f2a test: fix mock interface in test 2026-05-07 12:06:27 +05:30
Naman Verma
3b824d50a3 Merge branch 'nv/tags-for-dashboard-create' into nv/v2-dashboard-create 2026-05-07 02:25:09 +05:30
Naman Verma
d0a693b034 feat: method to fetch tags for multiple entries at once 2026-05-07 02:24:42 +05:30
Naman Verma
90377f8116 Merge branch 'nv/tags-for-dashboard-create' into nv/v2-dashboard-create 2026-05-07 02:18:54 +05:30
Naman Verma
cabfd7271b Merge branch 'nv/dashboardv2' into nv/tags-for-dashboard-create 2026-05-07 02:18:50 +05:30
Naman Verma
750d63cf6b test: unit test fixes 2026-05-07 02:16:05 +05:30
Naman Verma
e4c4acb5df Merge branch 'nv/tags-for-dashboard-create' into nv/v2-dashboard-create 2026-05-06 11:25:36 +05:30
Naman Verma
c9235cd3d2 Merge branch 'nv/dashboardv2' into nv/tags-for-dashboard-create 2026-05-06 11:22:25 +05:30
Naman Verma
ec837c7006 fix: allow only 1 query in a panel 2026-05-06 11:21:49 +05:30
Naman Verma
a1f73655ca Merge branch 'nv/tags-for-dashboard-create' into nv/v2-dashboard-create 2026-05-05 16:39:35 +05:30
Naman Verma
0d6081d0d0 feat: consolidate tag module and tagtypes changes from downstream branches 2026-05-05 16:39:13 +05:30
Naman Verma
54832cad34 Merge branch 'nv/tags-for-dashboard-create' into nv/v2-dashboard-create 2026-05-05 11:54:38 +05:30
Naman Verma
a45178d709 Merge branch 'nv/dashboardv2' into nv/tags-for-dashboard-create 2026-05-05 11:54:21 +05:30
Naman Verma
c4224ecf72 Merge branch 'main' into nv/dashboardv2 2026-05-05 11:53:56 +05:30
Naman Verma
ff578f7d92 Merge branch 'nv/tags-for-dashboard-create' into nv/v2-dashboard-create 2026-05-04 19:26:49 +05:30
Naman Verma
cd630b1152 Merge branch 'nv/dashboardv2' into nv/tags-for-dashboard-create 2026-05-04 19:26:36 +05:30
Naman Verma
bd0842ac17 fix: query-less panels not allowed 2026-05-04 19:25:49 +05:30
Naman Verma
97b85c386a fix: no v2 package and its consequences 2026-05-04 17:27:58 +05:30
Naman Verma
00bdf50c1c fix: no v2 package and its consequences 2026-05-04 17:26:12 +05:30
Naman Verma
5dec4ec580 Merge branch 'nv/tags-for-dashboard-create' into nv/v2-dashboard-create 2026-05-04 17:18:39 +05:30
Naman Verma
325767c240 Merge branch 'nv/dashboardv2' into nv/tags-for-dashboard-create 2026-05-04 17:17:32 +05:30
Naman Verma
5fed2a4585 chore: no v2 subpackage 2026-05-04 17:16:39 +05:30
Naman Verma
664337ae0f Merge branch 'nv/tags-for-dashboard-create' into nv/v2-dashboard-create 2026-05-04 16:19:29 +05:30
Naman Verma
a0ea276681 Merge branch 'nv/dashboardv2' into nv/tags-for-dashboard-create 2026-05-04 16:18:03 +05:30
Naman Verma
2dc8699f08 fix: wrap errors 2026-05-04 14:55:38 +05:30
Naman Verma
ed81ed8ab5 fix: no need for copying textboxvariablespec 2026-05-04 14:44:42 +05:30
Naman Verma
48c9da19df fix: return 500 err if spec is nil for composite kind w/ code comment 2026-05-04 14:34:16 +05:30
Naman Verma
eb9663d518 fix: remove extra (un)marshal cycle 2026-05-04 14:18:37 +05:30
Naman Verma
a56a862338 fix: add allowed values in err messages 2026-05-04 14:16:22 +05:30
Naman Verma
021f33f65e Merge branch 'main' into nv/dashboardv2 2026-05-04 12:52:31 +05:30
Naman Verma
4d9386f418 fix: merge conflicts 2026-04-29 14:36:39 +05:30
Naman Verma
737473521d Merge branch 'nv/tags-for-dashboard-create' into nv/v2-dashboard-create 2026-04-29 14:33:25 +05:30
Naman Verma
1863db8ba8 Merge branch 'nv/dashboardv2' into nv/tags-for-dashboard-create 2026-04-29 14:32:14 +05:30
Naman Verma
661af09a13 Merge branch 'main' into nv/dashboardv2 2026-04-29 14:31:59 +05:30
Naman Verma
6024fa2b91 fix: remove extra spec from builder query marshalling 2026-04-29 14:31:16 +05:30
Naman Verma
8996a96387 chore: use existing mapper 2026-04-29 14:09:34 +05:30
Naman Verma
d6db5c2aab test: integration test fixes 2026-04-29 12:56:14 +05:30
Naman Verma
709590ea1b test: integration tests for create API 2026-04-29 12:23:12 +05:30
Naman Verma
1add46b4c5 fix: module should also validate postable dashboard 2026-04-28 20:05:38 +05:30
Naman Verma
8401261e20 Merge branch 'nv/tags-for-dashboard-create' into nv/v2-dashboard-create 2026-04-28 20:04:33 +05:30
Naman Verma
0ff34a7274 Merge branch 'nv/dashboardv2' into nv/tags-for-dashboard-create 2026-04-28 20:04:08 +05:30
Naman Verma
44e3bd9608 chore: separate method for validation 2026-04-28 20:03:48 +05:30
Naman Verma
c3944d779e fix: more dashboard request validations 2026-04-28 19:59:11 +05:30
Naman Verma
f5ec783a53 fix: go lint fix 2026-04-28 19:33:28 +05:30
Naman Verma
35b729c425 Merge branch 'nv/tags-for-dashboard-create' into nv/v2-dashboard-create 2026-04-28 19:30:42 +05:30
Naman Verma
4f43c3d803 fix: use existing tag's casing if new tag is a prefix of an existing tag 2026-04-28 19:30:07 +05:30
Naman Verma
5dbde6c64d fix: only return name of a tag in dashboard response 2026-04-28 19:13:03 +05:30
Naman Verma
fb6fdd54ec feat: v2 create dashboard API 2026-04-28 15:05:29 +05:30
Naman Verma
64b8ba62da Merge branch 'nv/dashboardv2' into nv/tags-for-dashboard-create 2026-04-28 15:04:11 +05:30
Naman Verma
7c66df408b Merge branch 'main' into nv/dashboardv2 2026-04-28 15:04:03 +05:30
Naman Verma
54049de391 chore: follow proper unmarshal json method structure 2026-04-28 15:02:49 +05:30
Naman Verma
a82f4237c8 Merge branch 'nv/dashboardv2' into nv/tags-for-dashboard-create 2026-04-28 09:52:23 +05:30
Naman Verma
89606b6238 Merge branch 'main' into nv/dashboardv2 2026-04-28 09:52:13 +05:30
Naman Verma
db5ce958eb Merge branch 'nv/dashboardv2' into nv/tags-for-dashboard-create 2026-04-28 09:49:01 +05:30
Naman Verma
c8d3a9a54b feat: enum for entity type that other modules can register 2026-04-28 09:47:24 +05:30
Naman Verma
637870b1fc feat: define tags module for v2 dashboard creation 2026-04-27 22:14:47 +05:30
Naman Verma
d46a7e24c9 Merge branch 'main' into nv/dashboardv2 2026-04-27 22:12:12 +05:30
Naman Verma
2a451e1c31 test: test for drift detection mechanics 2026-04-27 18:57:41 +05:30
Naman Verma
60b6d1d890 chore: better method name extractKindAndSpec 2026-04-27 18:42:31 +05:30
Naman Verma
36f755b232 chore: cleanup comments 2026-04-27 18:39:41 +05:30
Naman Verma
c1b3e3683a chore: code movement 2026-04-27 18:37:57 +05:30
Naman Verma
4c68544b1a chore: go lint fix (godot) 2026-04-27 18:37:05 +05:30
Naman Verma
90d9ab95f9 chore: code movement 2026-04-27 18:35:18 +05:30
Naman Verma
065e712e0c chore: code movement 2026-04-27 18:33:48 +05:30
Naman Verma
50db309ecd chore: code movement 2026-04-27 18:32:41 +05:30
Naman Verma
261bc552b0 chore: cleanup testing code 2026-04-27 18:24:52 +05:30
Naman Verma
bab720e98b Merge branch 'main' into nv/dashboardv2 2026-04-27 18:21:09 +05:30
Naman Verma
71fef6636b chore: better method name 2026-04-27 18:18:14 +05:30
Naman Verma
fc3cdecbbb chore: cleaner comment 2026-04-27 18:15:21 +05:30
Naman Verma
860fcfa641 chore: cleaner comment 2026-04-27 18:14:27 +05:30
Naman Verma
a090e3a4aa chore: cleaner comment 2026-04-27 18:14:02 +05:30
Naman Verma
6cf73e2ade chore: better comment to explain what restrictKindToLiteral does 2026-04-27 18:13:34 +05:30
Naman Verma
bbcb6a45d6 chore: renames and code rearrangement 2026-04-27 17:53:54 +05:30
Naman Verma
d13934febc fix: remove textbox plugin from openapi spec 2026-04-27 17:29:36 +05:30
Naman Verma
d5a7b7523d fix: strict decode variable spec as well 2026-04-27 17:27:51 +05:30
Naman Verma
5b8984f131 Merge branch 'main' into nv/dashboardv2 2026-04-27 17:18:44 +05:30
Naman Verma
6ddc5f1f12 chore: better error messages 2026-04-27 17:18:11 +05:30
Naman Verma
055968bfad fix: dot at the end of a comment 2026-04-27 17:07:58 +05:30
Naman Verma
1bf0f38ed9 fix: js lint errors 2026-04-27 17:07:38 +05:30
Naman Verma
842125e20a chore: too many comments 2026-04-27 16:50:41 +05:30
Naman Verma
6dab35caf8 chore: better file name 2026-04-27 16:43:42 +05:30
Naman Verma
047e9e2001 chore: better file names 2026-04-27 16:42:31 +05:30
Naman Verma
45eaa7db58 test: add tests for spec wrappers 2026-04-27 16:36:27 +05:30
Naman Verma
8a3d894eba chore: comment cleanup 2026-04-27 16:32:29 +05:30
Naman Verma
5239060b53 chore: move plugin maps to correct file 2026-04-27 16:30:33 +05:30
Naman Verma
42c6f507ac test: more descriptive test file name 2026-04-27 15:42:54 +05:30
Naman Verma
1b695a0b80 chore: separate file for perses replicas 2026-04-27 15:42:21 +05:30
Naman Verma
438cfab155 chore: comment clean up 2026-04-27 15:39:46 +05:30
Naman Verma
69f7617e01 Merge branch 'main' into nv/dashboardv2 2026-04-27 15:36:58 +05:30
Naman Verma
4420a7e1fc test: much bigger json for data column 2026-04-24 22:16:03 +05:30
Naman Verma
b4bc68c5c5 test: data column in perf tests should match real data 2026-04-24 17:17:37 +05:30
Naman Verma
eb9eb317cc test: perf test script for both sql flavours 2026-04-23 17:14:33 +05:30
Naman Verma
0b1eb16a42 test: fixes in dashboard perf testing data generator 2026-04-23 15:42:58 +05:30
Naman Verma
05a4d12183 test: script to generate test dashboard data in a sql db 2026-04-23 14:19:58 +05:30
Naman Verma
bbaf64c4f0 feat: openapi spec generation 2026-04-21 13:41:06 +05:30
284 changed files with 4731 additions and 2633 deletions

View File

@@ -33,6 +33,7 @@ import (
"github.com/SigNoz/signoz/pkg/modules/retention"
"github.com/SigNoz/signoz/pkg/modules/rulestatehistory"
"github.com/SigNoz/signoz/pkg/modules/serviceaccount"
"github.com/SigNoz/signoz/pkg/modules/tag"
"github.com/SigNoz/signoz/pkg/prometheus"
"github.com/SigNoz/signoz/pkg/querier"
"github.com/SigNoz/signoz/pkg/query-service/app"
@@ -100,8 +101,8 @@ func runServer(ctx context.Context, config signoz.Config, logger *slog.Logger) e
return openfgaauthz.NewProviderFactory(sqlstore, openfgaschema.NewSchema().Get(ctx), openfgaDataStore, authtypes.NewRegistry()), nil
},
func(store sqlstore.SQLStore, settings factory.ProviderSettings, analytics analytics.Analytics, orgGetter organization.Getter, queryParser queryparser.QueryParser, _ querier.Querier, _ licensing.Licensing) dashboard.Module {
return impldashboard.NewModule(impldashboard.NewStore(store), settings, analytics, orgGetter, queryParser)
func(store sqlstore.SQLStore, settings factory.ProviderSettings, analytics analytics.Analytics, orgGetter organization.Getter, queryParser queryparser.QueryParser, _ querier.Querier, _ licensing.Licensing, tagModule tag.Module) dashboard.Module {
return impldashboard.NewModule(impldashboard.NewStore(store), settings, analytics, orgGetter, queryParser, tagModule)
},
func(_ licensing.Licensing) factory.ProviderFactory[gateway.Gateway, gateway.Config] {
return noopgateway.NewProviderFactory()

View File

@@ -46,6 +46,7 @@ import (
pkgcloudintegration "github.com/SigNoz/signoz/pkg/modules/cloudintegration/implcloudintegration"
"github.com/SigNoz/signoz/pkg/modules/dashboard"
pkgimpldashboard "github.com/SigNoz/signoz/pkg/modules/dashboard/impldashboard"
"github.com/SigNoz/signoz/pkg/modules/tag"
"github.com/SigNoz/signoz/pkg/modules/organization"
"github.com/SigNoz/signoz/pkg/modules/retention"
"github.com/SigNoz/signoz/pkg/modules/rulestatehistory"
@@ -133,8 +134,8 @@ func runServer(ctx context.Context, config signoz.Config, logger *slog.Logger) e
}
return openfgaauthz.NewProviderFactory(sqlstore, openfgaschema.NewSchema().Get(ctx), openfgaDataStore, licensing, onBeforeRoleDelete, authtypes.NewRegistry()), nil
},
func(store sqlstore.SQLStore, settings factory.ProviderSettings, analytics analytics.Analytics, orgGetter organization.Getter, queryParser queryparser.QueryParser, querier querier.Querier, licensing licensing.Licensing) dashboard.Module {
return impldashboard.NewModule(pkgimpldashboard.NewStore(store), settings, analytics, orgGetter, queryParser, querier, licensing)
func(store sqlstore.SQLStore, settings factory.ProviderSettings, analytics analytics.Analytics, orgGetter organization.Getter, queryParser queryparser.QueryParser, querier querier.Querier, licensing licensing.Licensing, tagModule tag.Module) dashboard.Module {
return impldashboard.NewModule(pkgimpldashboard.NewStore(store), store, settings, analytics, orgGetter, queryParser, querier, licensing, tagModule)
},
func(licensing licensing.Licensing) factory.ProviderFactory[gateway.Gateway, gateway.Config] {
return httpgateway.NewProviderFactory(licensing)

File diff suppressed because it is too large Load Diff

View File

@@ -11,8 +11,10 @@ import (
"github.com/SigNoz/signoz/pkg/modules/dashboard"
pkgimpldashboard "github.com/SigNoz/signoz/pkg/modules/dashboard/impldashboard"
"github.com/SigNoz/signoz/pkg/modules/organization"
"github.com/SigNoz/signoz/pkg/modules/tag"
"github.com/SigNoz/signoz/pkg/querier"
"github.com/SigNoz/signoz/pkg/queryparser"
"github.com/SigNoz/signoz/pkg/sqlstore"
"github.com/SigNoz/signoz/pkg/types"
"github.com/SigNoz/signoz/pkg/types/coretypes"
"github.com/SigNoz/signoz/pkg/types/ctxtypes"
@@ -30,9 +32,9 @@ type module struct {
licensing licensing.Licensing
}
func NewModule(store dashboardtypes.Store, settings factory.ProviderSettings, analytics analytics.Analytics, orgGetter organization.Getter, queryParser queryparser.QueryParser, querier querier.Querier, licensing licensing.Licensing) dashboard.Module {
func NewModule(store dashboardtypes.Store, sqlstore sqlstore.SQLStore, settings factory.ProviderSettings, analytics analytics.Analytics, orgGetter organization.Getter, queryParser queryparser.QueryParser, querier querier.Querier, licensing licensing.Licensing, tagModule tag.Module) dashboard.Module {
scopedProviderSettings := factory.NewScopedProviderSettings(settings, "github.com/SigNoz/signoz/ee/modules/dashboard/impldashboard")
pkgDashboardModule := pkgimpldashboard.NewModule(store, settings, analytics, orgGetter, queryParser)
pkgDashboardModule := pkgimpldashboard.NewModule(store, settings, analytics, orgGetter, queryParser, tagModule)
return &module{
pkgDashboardModule: pkgDashboardModule,
@@ -197,6 +199,14 @@ func (module *module) Create(ctx context.Context, orgID valuer.UUID, createdBy s
return module.pkgDashboardModule.Create(ctx, orgID, createdBy, creator, data)
}
func (module *module) CreateV2(ctx context.Context, orgID valuer.UUID, createdBy string, creator valuer.UUID, postable dashboardtypes.PostableDashboardV2) (*dashboardtypes.DashboardV2, error) {
return module.pkgDashboardModule.CreateV2(ctx, orgID, createdBy, creator, postable)
}
func (module *module) GetV2(ctx context.Context, orgID valuer.UUID, id valuer.UUID) (*dashboardtypes.DashboardV2, error) {
return module.pkgDashboardModule.GetV2(ctx, orgID, id)
}
func (module *module) Get(ctx context.Context, orgID valuer.UUID, id valuer.UUID) (*dashboardtypes.Dashboard, error) {
return module.pkgDashboardModule.Get(ctx, orgID, id)
}

View File

@@ -18,11 +18,15 @@ import type {
} from 'react-query';
import type {
CreateDashboardV2201,
CreatePublicDashboard201,
CreatePublicDashboardPathParameters,
DashboardtypesPostableDashboardV2DTO,
DashboardtypesPostablePublicDashboardDTO,
DashboardtypesUpdatablePublicDashboardDTO,
DeletePublicDashboardPathParameters,
GetDashboardV2200,
GetDashboardV2PathParameters,
GetPublicDashboard200,
GetPublicDashboardData200,
GetPublicDashboardDataPathParameters,
@@ -628,3 +632,187 @@ export const invalidateGetPublicDashboardWidgetQueryRange = async (
return queryClient;
};
/**
* This endpoint creates a v2-shape dashboard with structured metadata, a typed data tree, and resolved tags.
* @summary Create dashboard (v2)
*/
export const createDashboardV2 = (
dashboardtypesPostableDashboardV2DTO?: BodyType<DashboardtypesPostableDashboardV2DTO>,
signal?: AbortSignal,
) => {
return GeneratedAPIInstance<CreateDashboardV2201>({
url: `/api/v2/dashboards`,
method: 'POST',
headers: { 'Content-Type': 'application/json' },
data: dashboardtypesPostableDashboardV2DTO,
signal,
});
};
export const getCreateDashboardV2MutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
>(options?: {
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createDashboardV2>>,
TError,
{ data?: BodyType<DashboardtypesPostableDashboardV2DTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createDashboardV2>>,
TError,
{ data?: BodyType<DashboardtypesPostableDashboardV2DTO> },
TContext
> => {
const mutationKey = ['createDashboardV2'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
options.mutation.mutationKey
? options
: { ...options, mutation: { ...options.mutation, mutationKey } }
: { mutation: { mutationKey } };
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createDashboardV2>>,
{ data?: BodyType<DashboardtypesPostableDashboardV2DTO> }
> = (props) => {
const { data } = props ?? {};
return createDashboardV2(data);
};
return { mutationFn, ...mutationOptions };
};
export type CreateDashboardV2MutationResult = NonNullable<
Awaited<ReturnType<typeof createDashboardV2>>
>;
export type CreateDashboardV2MutationBody =
| BodyType<DashboardtypesPostableDashboardV2DTO>
| undefined;
export type CreateDashboardV2MutationError = ErrorType<RenderErrorResponseDTO>;
/**
* @summary Create dashboard (v2)
*/
export const useCreateDashboardV2 = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
>(options?: {
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createDashboardV2>>,
TError,
{ data?: BodyType<DashboardtypesPostableDashboardV2DTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createDashboardV2>>,
TError,
{ data?: BodyType<DashboardtypesPostableDashboardV2DTO> },
TContext
> => {
return useMutation(getCreateDashboardV2MutationOptions(options));
};
/**
* This endpoint returns a v2-shape dashboard with its tags and public sharing config (if any).
* @summary Get dashboard (v2)
*/
export const getDashboardV2 = (
{ id }: GetDashboardV2PathParameters,
signal?: AbortSignal,
) => {
return GeneratedAPIInstance<GetDashboardV2200>({
url: `/api/v2/dashboards/${id}`,
method: 'GET',
signal,
});
};
export const getGetDashboardV2QueryKey = ({
id,
}: GetDashboardV2PathParameters) => {
return [`/api/v2/dashboards/${id}`] as const;
};
export const getGetDashboardV2QueryOptions = <
TData = Awaited<ReturnType<typeof getDashboardV2>>,
TError = ErrorType<RenderErrorResponseDTO>,
>(
{ id }: GetDashboardV2PathParameters,
options?: {
query?: UseQueryOptions<
Awaited<ReturnType<typeof getDashboardV2>>,
TError,
TData
>;
},
) => {
const { query: queryOptions } = options ?? {};
const queryKey = queryOptions?.queryKey ?? getGetDashboardV2QueryKey({ id });
const queryFn: QueryFunction<Awaited<ReturnType<typeof getDashboardV2>>> = ({
signal,
}) => getDashboardV2({ id }, signal);
return {
queryKey,
queryFn,
enabled: !!id,
...queryOptions,
} as UseQueryOptions<
Awaited<ReturnType<typeof getDashboardV2>>,
TError,
TData
> & { queryKey: QueryKey };
};
export type GetDashboardV2QueryResult = NonNullable<
Awaited<ReturnType<typeof getDashboardV2>>
>;
export type GetDashboardV2QueryError = ErrorType<RenderErrorResponseDTO>;
/**
* @summary Get dashboard (v2)
*/
export function useGetDashboardV2<
TData = Awaited<ReturnType<typeof getDashboardV2>>,
TError = ErrorType<RenderErrorResponseDTO>,
>(
{ id }: GetDashboardV2PathParameters,
options?: {
query?: UseQueryOptions<
Awaited<ReturnType<typeof getDashboardV2>>,
TError,
TData
>;
},
): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
const queryOptions = getGetDashboardV2QueryOptions({ id }, options);
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
queryKey: QueryKey;
};
return { ...query, queryKey: queryOptions.queryKey };
}
/**
* @summary Get dashboard (v2)
*/
export const invalidateGetDashboardV2 = async (
queryClient: QueryClient,
{ id }: GetDashboardV2PathParameters,
options?: InvalidateOptions,
): Promise<QueryClient> => {
await queryClient.invalidateQueries(
{ queryKey: getGetDashboardV2QueryKey({ id }) },
options,
);
return queryClient;
};

File diff suppressed because it is too large Load Diff

View File

@@ -5,6 +5,7 @@ import { useSelector } from 'react-redux';
import { Loader, Search } from '@signozhq/icons';
import { Color } from '@signozhq/design-tokens';
import {
Button,
Flex,
Input,
InputRef,
@@ -16,7 +17,6 @@ import {
Tooltip,
} from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { Button } from '@signozhq/ui/button';
import type { FilterDropdownProps } from 'antd/lib/table/interface';
import logEvent from 'api/common/logEvent';
import {
@@ -105,8 +105,9 @@ const getColumnSearchProps = (
/>
<Space>
<Button
type="primary"
size="small"
onClick={(): void => handleSearch(selectedKeys as string[], confirm)}
size="sm"
>
<Flex align="center" gap={4}>
<Search size="md" />
@@ -115,19 +116,17 @@ const getColumnSearchProps = (
</Button>
<Button
onClick={(): void => clearFilters && handleReset(clearFilters, confirm)}
size="small"
style={{ width: 90 }}
size="sm"
variant="outlined"
color="secondary"
>
Reset
</Button>
<Button
type="link"
size="small"
onClick={(): void => {
close();
}}
size="sm"
variant="link"
>
close
</Button>

View File

@@ -1,7 +1,7 @@
import { useCallback, useEffect, useRef, useState } from 'react';
import { useMutation } from 'react-query';
import { Check, ChevronsDown, ScrollText, X } from '@signozhq/icons';
import { Flex, Modal } from 'antd';
import { Button, Flex, Modal } from 'antd';
import updateUserPreference from 'api/v1/user/preferences/name/update';
import cx from 'classnames';
import { USER_PREFERENCES } from 'constants/userPreferences';
@@ -14,7 +14,6 @@ import { UserPreference } from 'types/api/preferences/preference';
import ChangelogRenderer from './components/ChangelogRenderer';
import './ChangelogModal.styles.scss';
import { Button } from '@signozhq/ui/button';
interface Props {
changelog: ChangelogSchema;
@@ -116,13 +115,13 @@ function ChangelogModal({ changelog, onClose }: Props): JSX.Element {
>
{!isCloudUser && (
<div className="changelog-modal-footer-ctas">
<Button onClick={onClose} variant="outlined" color="secondary">
<Button type="default" onClick={onClose}>
<Flex align="center" gap="4px">
<X size="md" />
Skip for now
</Flex>
</Button>
<Button onClick={onClickUpdateWorkspace}>
<Button type="primary" onClick={onClickUpdateWorkspace}>
<Flex align="center" gap="4px">
<Check size="md" />
Update my workspace

View File

@@ -1,9 +1,8 @@
import { useState } from 'react';
import { useMutation } from 'react-query';
import { useLocation } from 'react-router-dom';
import { Modal } from 'antd';
import { Button, Modal } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { Button } from '@signozhq/ui/button';
import logEvent from 'api/common/logEvent';
import updateCreditCardApi from 'api/v1/checkout/create';
import { useNotifications } from 'hooks/useNotifications';
@@ -73,8 +72,6 @@ export default function ChatSupportGateway(): JSX.Element {
setIsAddCreditCardModalOpen(true);
}}
variant="outlined"
color="secondary"
>
<MessageSquareText size={24} />
</Button>
@@ -93,19 +90,19 @@ export default function ChatSupportGateway(): JSX.Element {
key="cancel"
onClick={(): void => setIsAddCreditCardModalOpen(false)}
className="cancel-btn"
variant="outlined"
color="secondary"
prefix={<X size={16} />}
icon={<X size={16} />}
>
Cancel
</Button>,
<Button
key="submit"
type="primary"
icon={<CreditCard size={16} />}
size="middle"
loading={isLoadingBilling}
disabled={isLoadingBilling}
onClick={handleAddCreditCard}
className="add-credit-card-btn"
prefix={<CreditCard size={16} />}
>
Add Credit Card
</Button>,

View File

@@ -1,5 +1,5 @@
import { Calendar } from '@signozhq/ui/calendar';
import { Button } from '@signozhq/ui/button';
import { Button } from 'antd';
import { DATE_TIME_FORMATS } from 'constants/dateTimeFormats';
import dayjs from 'dayjs';
import { Calendar as CalendarIcon, Check, X } from '@signozhq/icons';
@@ -78,20 +78,18 @@ function CalendarContainer({
<div className="calendar-actions">
<Button
className="cancel-btn"
type="primary"
className="periscope-btn secondary cancel-btn"
onClick={onCancel}
prefix={<X size={12} />}
variant="outlined"
color="secondary"
icon={<X size={12} />}
>
Cancel
</Button>
<Button
className="apply-btn"
type="primary"
className="periscope-btn primary apply-btn"
onClick={onApply}
prefix={<Check size={12} />}
variant="solid"
color="primary"
icon={<Check size={12} />}
>
Apply
</Button>

View File

@@ -108,7 +108,7 @@
}
.info-text:hover {
& {
&.ant-btn-text {
background-color: unset !important;
}
}

View File

@@ -8,6 +8,7 @@ import {
} from 'react';
import { useLocation } from 'react-router-dom';
import { Color } from '@signozhq/design-tokens';
import { Button } from 'antd';
import logEvent from 'api/common/logEvent';
import cx from 'classnames';
import { DATE_TIME_FORMATS } from 'constants/dateTimeFormats';
@@ -31,7 +32,6 @@ import TimezonePicker from './TimezonePicker';
import { Timezone } from './timezoneUtils';
import './CustomTimePicker.styles.scss';
import { Button } from '@signozhq/ui/button';
const TO_MILLISECONDS_FACTOR = 1000_000;
@@ -177,13 +177,13 @@ function CustomTimePickerPopoverContent({
<div className="relative-date-time-section">
{options.map((option) => (
<Button
type="text"
className="time-btns"
key={option.label + option.value}
onClick={(): void => {
handleExitLiveLogs();
onSelectHandler(option.label, option.value);
}}
variant="ghost"
>
{option.label}
</Button>
@@ -249,14 +249,15 @@ function CustomTimePickerPopoverContent({
{isLogsExplorerPage && isLogsListView && (
<Button
className={cx('data-time-live', isLiveLogsEnabled ? 'active' : '')}
type="text"
onClick={handleGoLive}
variant="ghost"
>
Live
</Button>
)}
{options.map((option) => (
<Button
type="text"
key={option.label + option.value}
onClick={(e: React.MouseEvent<HTMLButtonElement>): void => {
e.stopPropagation();
@@ -270,7 +271,6 @@ function CustomTimePickerPopoverContent({
? option.value === 'custom' && !isLiveLogsEnabled && 'active'
: selectedTime === option.value && !isLiveLogsEnabled && 'active',
)}
variant="ghost"
>
<span className="time-label">{option.label}</span>
@@ -370,12 +370,11 @@ function CustomTimePickerPopoverContent({
<div className="timezone-container__right">
<Button
className="timezone-change-button"
type="text"
size="small"
className="periscope-btn text timezone-change-button"
onClick={handleTimezoneHintClick}
size="sm"
variant="ghost"
prefix={<PenLine size={10} />}
color="none"
icon={<PenLine size={10} />}
>
Change Timezone
</Button>

View File

@@ -1,7 +1,6 @@
import { useCallback, useMemo, useState } from 'react';
import { Popover, Radio, Tooltip } from 'antd';
import { Button, Popover, Radio, Tooltip } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { Button } from '@signozhq/ui/button';
import { TelemetryFieldKey } from 'api/v5/v5';
import { useExportRawData } from 'hooks/useDownloadOptionsMenu/useDownloadOptionsMenu';
import { Download, LoaderCircle } from '@signozhq/icons';
@@ -105,11 +104,12 @@ export default function DownloadOptionsMenu({
)}
<Button
type="primary"
icon={<Download size={16} />}
onClick={handleExport}
className="export-button"
disabled={isDownloading}
loading={isDownloading}
prefix={<Download size={16} />}
>
Export
</Button>
@@ -137,18 +137,16 @@ export default function DownloadOptionsMenu({
>
<Tooltip title="Download" placement="top">
<Button
data-testid={`periscope-btn-download-${dataSource}`}
disabled={isDownloading}
variant="outlined"
color="secondary"
size="icon"
prefix={
className="periscope-btn ghost"
icon={
isDownloading ? (
<LoaderCircle size={14} className="animate-spin" />
) : (
<Download size={14} />
)
}
data-testid={`periscope-btn-download-${dataSource}`}
disabled={isDownloading}
/>
</Tooltip>
</Popover>

View File

@@ -1,9 +1,8 @@
import { useState } from 'react';
import { Ellipsis } from '@signozhq/icons';
import { Dropdown, MenuProps } from 'antd';
import { Button, Dropdown, MenuProps } from 'antd';
import './DropDown.styles.scss';
import { Button } from '@signozhq/ui/button';
function DropDown({
element,
@@ -32,12 +31,12 @@ function DropDown({
open={isDdOpen}
>
<Button
type="link"
className={`dropdown-button`}
onClick={(e): void => {
e.preventDefault();
setDdOpen(true);
}}
variant="link"
>
<Ellipsis className="dropdown-icon" size={16} />
</Button>

View File

@@ -1,6 +1,6 @@
import React from 'react';
import { Color } from '@signozhq/design-tokens';
import { Modal, Tag } from 'antd';
import { Button, Modal, Tag } from 'antd';
import { CircleAlert, X } from '@signozhq/icons';
import KeyValueLabel from 'periscope/components/KeyValueLabel';
import { useAppContext } from 'providers/App/App';
@@ -9,7 +9,6 @@ import APIError from 'types/api/error';
import ErrorContent from './components/ErrorContent';
import './ErrorModal.styles.scss';
import { Button } from '@signozhq/ui/button';
type Props = {
error: APIError;
@@ -74,11 +73,10 @@ function ErrorModal({
<div className="error-modal__version-placeholder" />
)}
<Button
type="default"
className="close-button"
onClick={handleClose}
data-testid="close-button"
variant="outlined"
color="secondary"
>
<X size={16} color={Color.BG_VANILLA_400} />
</Button>

View File

@@ -1,8 +1,16 @@
import { useState } from 'react';
import { useCopyToClipboard } from 'react-use';
import { Col, Dropdown, MenuProps, Popover, Row, Select, Space } from 'antd';
import {
Button,
Col,
Dropdown,
MenuProps,
Popover,
Row,
Select,
Space,
} from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { Button } from '@signozhq/ui/button';
import axios from 'axios';
import TextToolTip from 'components/TextToolTip';
import { SOMETHING_WENT_WRONG } from 'constants/api';
@@ -151,6 +159,7 @@ function ExplorerCard({
],
};
const saveButtonType = isQueryUpdated ? 'default' : 'primary';
const saveButtonIcon = isQueryUpdated ? null : <Save size="md" />;
const showSaveView = false;
@@ -201,7 +210,7 @@ function ExplorerCard({
</Space>
)}
{isQueryUpdated && (
<Button onClick={onUpdateQueryHandler} prefix={<Save />}>
<Button type="primary" icon={<Save />} onClick={onUpdateQueryHandler}>
Save changes
</Button>
)}
@@ -221,10 +230,9 @@ function ExplorerCard({
onOpenChange={handleOpenChange}
>
<Button
type={saveButtonType}
icon={saveButtonIcon}
data-testid="traces-save-view-action"
variant="outlined"
color="secondary"
prefix={saveButtonIcon ?? undefined}
>
{isQueryUpdated
? SaveButtonText.SAVE_AS_NEW_VIEW

View File

@@ -1,9 +1,8 @@
import { useCallback, useEffect, useState } from 'react';
import { useLocation } from 'react-router-dom';
import { toast } from '@signozhq/ui/sonner';
import { Input, Radio, RadioChangeEvent } from 'antd';
import { Button, Input, Radio, RadioChangeEvent } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { Button } from '@signozhq/ui/button';
import logEvent from 'api/common/logEvent';
import { handleContactSupport } from 'container/Integrations/utils';
import { useGetTenantLicense } from 'hooks/useGetTenantLicense';
@@ -126,11 +125,11 @@ function FeedbackModal({ onClose }: { onClose: () => void }): JSX.Element {
<div className="feedback-modal-content-footer">
<Button
className="periscope-btn primary"
type="primary"
onClick={handleSubmit}
loading={isLoading}
disabled={feedback.length === 0}
variant="solid"
color="primary"
>
Submit
</Button>

View File

@@ -156,12 +156,12 @@ function HeaderRightSection({
variant="ghost"
size="icon"
aria-label="Announcements"
prefix={<Inbox size={14} />}
onClick={(): void => {
logEvent('Announcements: Clicked', {
page: location.pathname,
});
}}
prefix={<Inbox size={14} />}
/>
</Popover>
)}

View File

@@ -4,9 +4,8 @@ import { useSelector } from 'react-redux';
import { matchPath, useLocation } from 'react-router-dom';
import { useCopyToClipboard } from 'react-use';
import { Color } from '@signozhq/design-tokens';
import { Switch } from 'antd';
import { Button, Switch } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { Button } from '@signozhq/ui/button';
import logEvent from 'api/common/logEvent';
import { QueryParams } from 'constants/query';
import ROUTES from 'constants/routes';
@@ -156,10 +155,9 @@ function ShareURLModal(): JSX.Element {
</div>
<Button
className="periscope-btn secondary"
onClick={handleCopyURL}
variant="outlined"
color="secondary"
prefix={isURLCopied ? <Check size={14} /> : <Link2 size={14} />}
icon={isURLCopied ? <Check size={14} /> : <Link2 size={14} />}
>
Copy page link
</Button>

View File

@@ -1,8 +1,8 @@
import { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Color } from '@signozhq/design-tokens';
import { Button } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { Button } from '@signozhq/ui/button';
import logEvent from 'api/common/logEvent';
import { useNotifications } from 'hooks/useNotifications';
import { CircleCheckBig, HandPlatter } from '@signozhq/icons';
@@ -57,18 +57,17 @@ export default function WaitlistFragment({
</Typography.Text>
<Button
className="join-waitlist-btn"
className="periscope-btn join-waitlist-btn"
type="default"
loading={isSubmitting}
onClick={handleJoinWaitlist}
variant="outlined"
color="secondary"
prefix={
icon={
isSuccess ? (
<CircleCheckBig size={16} color={Color.BG_FOREST_500} />
) : (
<HandPlatter size={16} />
)
}
onClick={handleJoinWaitlist}
>
Get early access
</Button>

View File

@@ -1,7 +1,6 @@
import { useState } from 'react';
import { Input } from 'antd';
import { Button, Input } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { Button } from '@signozhq/ui/button';
import cx from 'classnames';
import { X } from '@signozhq/icons';
@@ -56,12 +55,9 @@ function InputWithLabel({
{labelAfter && <Typography.Text className="label">{label}</Typography.Text>}
{onClose && (
<Button
className="close-btn"
className="periscope-btn ghost close-btn"
icon={closeIcon || <X size={16} />}
onClick={onClose}
variant="outlined"
color="secondary"
size="icon"
prefix={(closeIcon as JSX.Element) || <X size={16} />}
/>
)}
</div>

View File

@@ -2,7 +2,7 @@
color: var(--bg-amber-500);
border-color: var(--bg-amber-500);
> button:hover {
> .ant-btn:hover {
color: var(--bg-amber-400) !important;
border-color: var(--bg-amber-300) !important;
}

View File

@@ -1,9 +1,8 @@
import { useMemo, useState } from 'react';
import { useMutation } from 'react-query';
import { useLocation } from 'react-router-dom';
import { Modal, Tooltip } from 'antd';
import { Button, Modal, Tooltip } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { Button } from '@signozhq/ui/button';
import logEvent from 'api/common/logEvent';
import updateCreditCardApi from 'api/v1/checkout/create';
import cx from 'classnames';
@@ -171,9 +170,7 @@ function LaunchChatSupport({
<Button
className={cx('periscope-btn', 'facing-issue-button', className)}
onClick={handleFacingIssuesClick}
variant="outlined"
color="secondary"
prefix={<CircleHelp size={14} />}
icon={<CircleHelp size={14} />}
>
{buttonText || 'Facing issues?'}
</Button>
@@ -192,19 +189,19 @@ function LaunchChatSupport({
key="cancel"
onClick={(): void => setIsAddCreditCardModalOpen(false)}
className="cancel-btn"
variant="outlined"
color="secondary"
prefix={<X size={16} />}
icon={<X size={16} />}
>
Cancel
</Button>,
<Button
key="submit"
type="primary"
icon={<CreditCard size={16} />}
size="middle"
loading={isLoadingBilling}
disabled={isLoadingBilling}
onClick={handleAddCreditCard}
className="add-credit-card-btn"
prefix={<CreditCard size={16} />}
>
Add Credit Card
</Button>,

View File

@@ -1,9 +1,9 @@
import { Color } from '@signozhq/design-tokens';
import { Button } from 'antd';
import { ArrowUpRight } from '@signozhq/icons';
import { openInNewTab } from 'utils/navigation';
import './LearnMore.styles.scss';
import { Button } from '@signozhq/ui/button';
type LearnMoreProps = {
text?: string;
@@ -19,7 +19,7 @@ function LearnMore({ text, url, onClick }: LearnMoreProps): JSX.Element {
}
};
return (
<Button className="learn-more" onClick={handleClick} variant="link">
<Button type="link" className="learn-more" onClick={handleClick}>
<div className="learn-more__text">{text}</div>
<ArrowUpRight size={16} color={Color.BG_ROBIN_400} />
</Button>

View File

@@ -17,7 +17,7 @@
.log-detail-drawer__title-right {
display: flex;
align-items: center;
button {
.ant-btn {
display: flex;
align-items: center;
}

View File

@@ -166,7 +166,7 @@
border-left: 1px solid var(--l1-border) !important;
}
button {
.ant-btn-default {
border: none;
box-shadow: none;
}

View File

@@ -9,7 +9,7 @@
border: 1px solid var(--l1-border);
background: var(--l2-background);
button {
.ant-btn-default {
border: none;
box-shadow: none;
padding: 9px;

View File

@@ -1,9 +1,8 @@
import { memo, MouseEventHandler } from 'react';
import { Link, TextSelect } from '@signozhq/icons';
import { Tooltip } from 'antd';
import { Button, Tooltip } from 'antd';
import './LogLinesActionButtons.styles.scss';
import { Button } from '@signozhq/ui/button';
export interface LogLinesActionButtonsProps {
handleShowContext: MouseEventHandler<HTMLElement>;
@@ -20,22 +19,18 @@ function LogLinesActionButtons({
<div className={`log-line-action-buttons ${customClassName}`}>
<Tooltip title="Show in Context">
<Button
size="small"
icon={<TextSelect size={14} />}
className="show-context-btn"
onClick={handleShowContext}
size="sm"
variant="outlined"
color="secondary"
prefix={<TextSelect size={14} />}
/>
</Tooltip>
<Tooltip title="Copy Link">
<Button
size="small"
icon={<Link size={14} />}
onClick={onLogCopy}
className="copy-log-btn"
size="sm"
variant="outlined"
color="secondary"
prefix={<Link size={14} />}
/>
</Tooltip>
</div>

View File

@@ -1,7 +1,6 @@
import { useCallback, useEffect, useRef, useState } from 'react';
import { Input, InputNumber, Popover, Tooltip } from 'antd';
import { Button, Input, InputNumber, Popover, Tooltip } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { Button } from '@signozhq/ui/button';
import type { DefaultOptionType } from 'antd/es/select';
import cx from 'classnames';
import { LogViewMode } from 'container/LogsTable';
@@ -224,7 +223,7 @@ function OptionsMenu({
<Button
onClick={(): void => setIsFontSizeOptionsOpen(false)}
className="back-btn"
variant="ghost"
type="text"
>
<ChevronLeft size={14} className="icon" />
<Typography.Text className="text">Select font size</Typography.Text>
@@ -236,7 +235,7 @@ function OptionsMenu({
setFontSizeValue(FontSize.SMALL);
}}
className="option-btn"
variant="ghost"
type="text"
>
<Typography.Text className="text">{FontSize.SMALL}</Typography.Text>
{fontSizeValue === FontSize.SMALL && (
@@ -248,7 +247,7 @@ function OptionsMenu({
setFontSizeValue(FontSize.MEDIUM);
}}
className="option-btn"
variant="ghost"
type="text"
>
<Typography.Text className="text">{FontSize.MEDIUM}</Typography.Text>
{fontSizeValue === FontSize.MEDIUM && (
@@ -260,7 +259,7 @@ function OptionsMenu({
setFontSizeValue(FontSize.LARGE);
}}
className="option-btn"
variant="ghost"
type="text"
>
<Typography.Text className="text">{FontSize.LARGE}</Typography.Text>
{fontSizeValue === FontSize.LARGE && (
@@ -339,10 +338,10 @@ function OptionsMenu({
<div className="title">Font Size</div>
<Button
className="value"
type="text"
onClick={(): void => {
setIsFontSizeOptionsOpen(true);
}}
variant="ghost"
>
<Typography.Text className="font-value">{fontSizeValue}</Typography.Text>
<ChevronRight size={14} className="icon" />
@@ -473,11 +472,9 @@ function LogsFormatOptionsMenu({
>
<Tooltip title="Options">
<Button
className="periscope-btn ghost"
icon={<SlidersVertical size="md" />}
data-testid="periscope-btn-format-options"
variant="outlined"
color="secondary"
size="icon"
prefix={<SlidersVertical size={14} />}
/>
</Tooltip>
</Popover>

View File

@@ -1,4 +1,5 @@
import { useEffect, useMemo, useState } from 'react';
import { Button } from 'antd';
import cx from 'classnames';
import { useOnboardingStatus } from 'hooks/messagingQueue/useOnboardingStatus';
import { Bolt, FolderTree } from '@signozhq/icons';
@@ -7,7 +8,6 @@ import { MessagingQueueHealthCheckService } from 'pages/MessagingQueues/Messagin
import AttributeCheckList from './AttributeCheckList';
import './MessagingQueueHealthCheck.styles.scss';
import { Button } from '@signozhq/ui/button';
interface MessagingQueueHealthCheckProps {
serviceToInclude: string[];
@@ -94,9 +94,7 @@ function MessagingQueueHealthCheck({
'config-btn',
missingConfiguration ? 'missing-config-btn' : '',
)}
variant="outlined"
color="secondary"
prefix={<Bolt size={12} />}
icon={<Bolt size={12} />}
>
<div className="config-btn-content">
{missingConfiguration

View File

@@ -18,9 +18,8 @@ import {
RefreshCw,
} from '@signozhq/icons';
import { Color } from '@signozhq/design-tokens';
import { Checkbox, Select } from 'antd';
import { Button, Checkbox, Select } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { Button } from '@signozhq/ui/button';
import cx from 'classnames';
import TextToolTip from 'components/TextToolTip/TextToolTip';
import { SOMETHING_WENT_WRONG } from 'constants/api';
@@ -768,11 +767,11 @@ const CustomMultiSelect: React.FC<CustomMultiSelectProps> = ({
<div className="option-badge">{capitalize(option.type)}</div>
)}
{option.value && ensureValidOption(option.value) && (
<Button className="only-btn" variant="ghost">
<Button type="text" className="only-btn">
{currentToggleTagValue({ option: option.value })}
</Button>
)}
<Button className="toggle-btn" variant="ghost">
<Button type="text" className="toggle-btn">
Toggle
</Button>
</div>

View File

@@ -13,12 +13,12 @@ import { javascript } from '@codemirror/lang-javascript';
import { copilot } from '@uiw/codemirror-theme-copilot';
import { githubLight } from '@uiw/codemirror-theme-github';
import CodeMirror, { EditorView, keymap } from '@uiw/react-codemirror';
import { Button } from 'antd';
import { Having } from 'api/v5/v5';
import { useQueryBuilderV2Context } from 'components/QueryBuilderV2/QueryBuilderV2Context';
import { useIsDarkMode } from 'hooks/useDarkMode';
import { ChevronUp } from '@signozhq/icons';
import { IBuilderQuery } from 'types/api/queryBuilder/queryBuilderData';
import { Button } from '@signozhq/ui/button';
const havingOperators = [
{
@@ -368,12 +368,9 @@ function HavingFilter({
}}
/>
<Button
className="close-btn"
className="close-btn periscope-btn ghost"
icon={<ChevronUp size={16} />}
onClick={onClose}
variant="outlined"
color="secondary"
size="icon"
prefix={<ChevronUp size={16} />}
/>
</div>
</div>

View File

@@ -1,5 +1,5 @@
import { useCallback, useEffect, useRef, useState } from 'react';
import { Radio, RadioChangeEvent, Tooltip } from 'antd';
import { Button, Radio, RadioChangeEvent, Tooltip } from 'antd';
import InputWithLabel from 'components/InputWithLabel/InputWithLabel';
import { PANEL_TYPES } from 'constants/queryBuilder';
import { GroupByFilter } from 'container/QueryBuilder/filters/GroupByFilter/GroupByFilter';
@@ -17,7 +17,6 @@ import HavingFilter from './HavingFilter/HavingFilter';
import { buildDefaultLegendFromGroupBy } from './utils';
import './QueryAddOns.styles.scss';
import { Button } from '@signozhq/ui/button';
interface AddOn {
icon: React.ReactNode;
@@ -371,12 +370,9 @@ function QueryAddOns({
/>
</div>
<Button
className="close-btn"
className="close-btn periscope-btn ghost"
icon={<ChevronUp size={16} />}
onClick={(): void => handleRemoveView('group_by')}
variant="outlined"
color="secondary"
size="icon"
prefix={<ChevronUp size={16} />}
/>
</div>
</div>
@@ -459,12 +455,9 @@ function QueryAddOns({
</div>
{!isListViewPanel && (
<Button
className="close-btn"
className="close-btn periscope-btn ghost"
icon={<ChevronUp size={16} />}
onClick={(): void => handleRemoveView('order_by')}
variant="outlined"
color="secondary"
size="icon"
prefix={<ChevronUp size={16} />}
/>
)}
</div>
@@ -495,12 +488,9 @@ function QueryAddOns({
</div>
<Button
className="close-btn"
className="close-btn periscope-btn ghost"
icon={<ChevronUp size={16} />}
onClick={(): void => handleRemoveView('reduce_to')}
variant="outlined"
color="secondary"
size="icon"
prefix={<ChevronUp size={16} />}
/>
</div>
</div>

View File

@@ -23,7 +23,7 @@ import CodeMirror, {
ViewPlugin,
ViewUpdate,
} from '@uiw/react-codemirror';
import { Popover, Tooltip } from 'antd';
import { Button, Popover, Tooltip } from 'antd';
import { getKeySuggestions } from 'api/querySuggestions/getKeySuggestions';
import { QUERY_BUILDER_KEY_TYPES } from 'constants/antlrQueryConstants';
import { QueryBuilderKeys } from 'constants/queryBuilder';
@@ -36,7 +36,6 @@ import { TracesAggregatorOperator } from 'types/common/queryBuilder';
import { useQueryBuilderV2Context } from '../../QueryBuilderV2Context';
import './QueryAggregation.styles.scss';
import { Button } from '@signozhq/ui/button';
const chipDecoration = Decoration.mark({
class: 'chip-decorator',
@@ -721,10 +720,9 @@ function QueryAggregationSelect({
overlayClassName="query-aggregation-error-popover"
>
<Button
className="query-aggregation-error-btn"
variant="ghost"
size="icon"
prefix={<TriangleAlert size={14} color={Color.BG_CHERRY_500} />}
type="text"
icon={<TriangleAlert size={14} color={Color.BG_CHERRY_500} />}
className="periscope-btn ghost query-aggregation-error-btn"
/>
</Popover>
</div>

View File

@@ -1,7 +1,6 @@
import { useMemo } from 'react';
import { Tooltip } from 'antd';
import { Button, Tooltip } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { Button } from '@signozhq/ui/button';
import WarningPopover from 'components/WarningPopover/WarningPopover';
import { PANEL_TYPES } from 'constants/queryBuilder';
import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';
@@ -57,11 +56,9 @@ function TraceOperatorSection({
}
>
<Button
className="add-trace-operator-button"
className="add-trace-operator-button periscope-btn"
icon={<DraftingCompass size={16} />}
onClick={(): void => addTraceOperator?.()}
variant="outlined"
color="secondary"
prefix={<DraftingCompass size={16} />}
>
<div className="qb-trace-operator-button-container-text">
Add Trace Matching
@@ -95,12 +92,9 @@ export default function QueryFooter({
<div className="qb-add-new-query">
<Tooltip title={<div style={{ textAlign: 'center' }}>Add New Query</div>}>
<Button
className="add-new-query-button"
className="add-new-query-button periscope-btn "
icon={<Plus size={16} />}
onClick={addNewBuilderQuery}
variant="outlined"
color="secondary"
size="icon"
prefix={<Plus size={16} />}
/>
</Tooltip>
</div>
@@ -124,11 +118,9 @@ export default function QueryFooter({
}
>
<Button
className="add-formula-button"
className="add-formula-button periscope-btn "
icon={<Sigma size={16} />}
onClick={addNewFormula}
variant="outlined"
color="secondary"
prefix={<Sigma size={16} />}
>
Add Formula
</Button>

View File

@@ -14,7 +14,7 @@ import { Color } from '@signozhq/design-tokens';
import { copilot } from '@uiw/codemirror-theme-copilot';
import { githubLight } from '@uiw/codemirror-theme-github';
import CodeMirror, { EditorView, keymap, Prec } from '@uiw/react-codemirror';
import { Card, Collapse, Popover, Tag, Tooltip } from 'antd';
import { Button, Card, Collapse, Popover, Tag, Tooltip } from 'antd';
import { getKeySuggestions } from 'api/querySuggestions/getKeySuggestions';
import { getValueSuggestions } from 'api/querySuggestions/getValueSuggestion';
import cx from 'classnames';
@@ -49,7 +49,6 @@ import { queryExamples } from './constants';
import { combineInitialAndUserExpression } from './utils';
import './QuerySearch.styles.scss';
import { Button } from '@signozhq/ui/button';
const { Panel } = Collapse;
@@ -1485,16 +1484,15 @@ function QuerySearch({
>
{validation.isValid ? (
<Button
variant="ghost"
size="icon"
type="text"
icon={<CircleCheck size="md" />}
className="periscope-btn ghost"
prefix={<CircleCheck size={14} />}
/>
) : (
<Button
variant="ghost"
size="icon"
prefix={<TriangleAlert size={14} color={Color.BG_CHERRY_500} />}
type="text"
icon={<TriangleAlert size={14} color={Color.BG_CHERRY_500} />}
className="periscope-btn ghost"
/>
)}
</Popover>

View File

@@ -1,6 +1,5 @@
import { useCallback } from 'react';
import { Tooltip } from 'antd';
import { Button } from '@signozhq/ui/button';
import { Button, Tooltip } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import cx from 'classnames';
import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';
@@ -109,7 +108,7 @@ export default function TraceOperator({
)}
</div>
<Tooltip title="Remove Trace Operator" placement="topLeft">
<Button onClick={removeTraceOperator} variant="outlined" color="secondary">
<Button className="periscope-btn ghost" onClick={removeTraceOperator}>
<Trash2 size={14} />
</Button>
</Tooltip>

View File

@@ -15,7 +15,7 @@ import { Color } from '@signozhq/design-tokens';
import { copilot } from '@uiw/codemirror-theme-copilot';
import { githubLight } from '@uiw/codemirror-theme-github';
import CodeMirror, { EditorView, keymap, Prec } from '@uiw/react-codemirror';
import { Popover } from 'antd';
import { Button, Popover } from 'antd';
import cx from 'classnames';
import {
TRACE_OPERATOR_OPERATORS,
@@ -34,7 +34,6 @@ import { getInvolvedQueriesInTraceOperator } from './utils/utils';
import '../QuerySearch/QuerySearch.styles.scss';
import { CircleCheck, TriangleAlert } from '@signozhq/icons';
import { Button } from '@signozhq/ui/button';
// Custom extension to stop events
const stopEventsExtension = EditorView.domEventHandlers({
@@ -466,15 +465,15 @@ function TraceOperatorEditor({
>
{validation.isValid ? (
<Button
variant="ghost"
size="icon"
prefix={<CircleCheck size={14} />}
type="text"
icon={<CircleCheck size="md" />}
className="periscope-btn ghost"
/>
) : (
<Button
variant="ghost"
size="icon"
prefix={<TriangleAlert size={14} color={Color.BG_CHERRY_500} />}
type="text"
icon={<TriangleAlert size={14} color={Color.BG_CHERRY_500} />}
className="periscope-btn ghost"
/>
)}
</Popover>

View File

@@ -1,7 +1,6 @@
/* eslint-disable sonarjs/no-identical-functions */
import { Fragment, useMemo, useState } from 'react';
import { Checkbox, Input, Skeleton } from 'antd';
import { Button } from '@signozhq/ui/button';
import { Button, Checkbox, Input, Skeleton } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import cx from 'classnames';
import { removeKeysFromExpression } from 'components/QueryBuilderV2/utils';
@@ -661,14 +660,14 @@ export default function CheckboxFilter(props: ICheckboxProps): JSX.Element {
{String(value)}
</Typography.Text>
)}
<Button className="only-btn" variant="ghost">
<Button type="text" className="only-btn">
{isSomeFilterPresentForCurrentAttribute
? currentFilterState[value] && !isMultipleValuesTrueForTheKey
? 'All'
: 'Only'
: 'Only'}
</Button>
<Button className="toggle-btn" variant="ghost">
<Button type="text" className="toggle-btn">
Toggle
</Button>
</div>

View File

@@ -1,7 +1,7 @@
import { Color } from '@signozhq/design-tokens';
import { Button } from 'antd';
import EmptyQuickFilterIcon from 'assets/CustomIcons/EmptyQuickFilterIcon';
import { ArrowUpRight } from '@signozhq/icons';
import { Button } from '@signozhq/ui/button';
const QUICK_FILTER_DOC_PATHS: Record<string, string> = {
severity_text: 'severity-text',
@@ -39,9 +39,9 @@ function LogsQuickFilterEmptyState({
</div>
</div>
<Button
type="link"
className="go-to-docs__button"
onClick={handleLearnMoreClick}
variant="link"
>
<div className="go-to-docs__button-text">Learn more</div>
<ArrowUpRight size={14} color={Color.BG_ROBIN_400} />

View File

@@ -1,5 +1,5 @@
import { useCallback, useEffect, useMemo, useState } from 'react';
import { Collapse } from 'antd';
import { Button, Collapse } from 'antd';
import {
IQuickFiltersConfig,
QuickFiltersSource,
@@ -21,7 +21,6 @@ import { Query, TagFilterItem } from 'types/api/queryBuilder/queryBuilderData';
import { v4 as uuid } from 'uuid';
import './Duration.styles.scss';
import { Button } from '@signozhq/ui/button';
export type FilterType = Record<
AllTraceFilterKeys,
@@ -300,9 +299,9 @@ function Duration({
/>
{activeKeys.includes('durationNano') && (
<Button
type="link"
onClick={onClearHandler}
data-testid="collapse-duration-clearBtn"
variant="link"
>
Clear All
</Button>

View File

@@ -14,10 +14,10 @@ import {
verticalListSortingStrategy,
} from '@dnd-kit/sortable';
import { CSS } from '@dnd-kit/utilities';
import { Button } from 'antd';
import OverlayScrollbar from 'components/OverlayScrollbar/OverlayScrollbar';
import { GripVertical } from '@signozhq/icons';
import { Filter as FilterType } from 'types/api/quickFilters/getCustomFilters';
import { Button } from '@signozhq/ui/button';
function SortableFilter({
filter,
@@ -50,13 +50,11 @@ function SortableFilter({
</div>
{allowRemove && (
<Button
className="remove-filter-btn"
className="remove-filter-btn periscope-btn"
size="small"
onClick={(): void => {
onRemove(filter as FilterType);
}}
size="sm"
variant="outlined"
color="secondary"
>
Remove
</Button>

View File

@@ -1,5 +1,5 @@
import { useMemo } from 'react';
import { Skeleton } from 'antd';
import { Button, Skeleton } from 'antd';
import OverlayScrollbar from 'components/OverlayScrollbar/OverlayScrollbar';
import { SIGNAL_DATA_SOURCE_MAP } from 'components/QuickFilters/QuickFiltersSettings/constants';
import { SignalType } from 'components/QuickFilters/types';
@@ -12,7 +12,6 @@ import { TagFilter } from 'types/api/queryBuilder/queryBuilderData';
import { QueryKeyDataSuggestionsProps } from 'types/api/querySuggestions/types';
import { Filter as FilterType } from 'types/api/quickFilters/getCustomFilters';
import { DataSource } from 'types/common/queryBuilder';
import { Button } from '@signozhq/ui/button';
function OtherFiltersSkeleton(): JSX.Element {
return (
@@ -147,11 +146,9 @@ function OtherFilters({
<div key={filter.key} className="qf-filter-item other-filters-item">
<div className="qf-filter-key">{filter.key}</div>
<Button
className="add-filter-btn"
className="add-filter-btn periscope-btn"
size="small"
onClick={(): void => handleAddFilter(filter as FilterType)}
size="sm"
variant="outlined"
color="secondary"
>
Add
</Button>

View File

@@ -1,5 +1,5 @@
import { useMemo } from 'react';
import { Input } from 'antd';
import { Button, Input } from 'antd';
import { Check, TableColumnsSplit, X } from '@signozhq/icons';
import { Filter as FilterType } from 'types/api/quickFilters/getCustomFilters';
@@ -9,7 +9,6 @@ import useQuickFilterSettings from './hooks/useQuickFilterSettings';
import OtherFilters from './OtherFilters';
import './QuickFiltersSettings.styles.scss';
import { Button } from '@signozhq/ui/button';
function QuickFiltersSettings({
signal,
@@ -87,17 +86,17 @@ function QuickFiltersSettings({
{hasUnsavedChanges && (
<div className="qf-footer">
<Button
type="default"
onClick={handleDiscardChanges}
variant="outlined"
color="secondary"
prefix={<X size={16} />}
icon={<X size={16} />}
>
Discard
</Button>
<Button
type="primary"
onClick={handleSaveChanges}
icon={<Check size={16} />}
loading={isUpdatingCustomFilters}
prefix={<Check size={16} />}
>
Save changes
</Button>

View File

@@ -1,15 +1,16 @@
import { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Tooltip } from 'antd';
import { Button, Tooltip } from 'antd';
import refreshPaymentStatus from 'api/v3/licenses/put';
import cx from 'classnames';
import { RefreshCcw } from '@signozhq/icons';
import { useAppContext } from 'providers/App/App';
import { Button } from '@signozhq/ui/button';
function RefreshPaymentStatus({
btnShape,
type,
}: {
btnShape?: 'default' | 'round' | 'circle';
type?: 'button' | 'text' | 'tooltip';
}): JSX.Element {
const { t } = useTranslation(['failedPayment']);
@@ -34,12 +35,12 @@ function RefreshPaymentStatus({
<span className="refresh-payment-status-btn-wrapper">
<Tooltip title={type === 'tooltip' ? t('refreshPaymentStatus') : ''}>
<Button
type={type === 'text' ? 'text' : 'default'}
shape={btnShape}
className={cx('periscope-btn', { text: type === 'text' })}
onClick={handleRefreshPaymentStatus}
icon={<RefreshCcw size={14} />}
loading={isLoading}
variant="outlined"
color="secondary"
prefix={<RefreshCcw size={14} />}
>
{type !== 'tooltip' ? t('refreshPaymentStatus') : ''}
</Button>
@@ -48,6 +49,7 @@ function RefreshPaymentStatus({
);
}
RefreshPaymentStatus.defaultProps = {
btnShape: 'default',
type: 'button',
};

View File

@@ -4,7 +4,7 @@ import type {
TableColumnsType as ColumnsType,
TableColumnType as ColumnType,
} from 'antd';
import { Dropdown, Flex, MenuProps, Switch } from 'antd';
import { Button, Dropdown, Flex, MenuProps, Switch } from 'antd';
import logEvent from 'api/common/logEvent';
import LaunchChatSupport from 'components/LaunchChatSupport/LaunchChatSupport';
import { useSafeNavigate } from 'hooks/useSafeNavigate';
@@ -21,7 +21,6 @@ import {
} from './utils';
import './DynamicColumnTable.syles.scss';
import { Button } from '@signozhq/ui/button';
function DynamicColumnTable({
tablesource,
@@ -134,11 +133,9 @@ function DynamicColumnTable({
>
<Button
className="dynamicColumnTable-button filter-btn"
size="middle"
icon={<SlidersHorizontal size={14} />}
data-testid="additional-filters-button"
variant="outlined"
color="secondary"
size="icon"
prefix={<SlidersHorizontal size={14} />}
/>
</Dropdown>
)}

View File

@@ -74,7 +74,7 @@
}
.ant-modal-footer {
button {
.ant-btn {
display: flex;
align-items: center;
gap: 4px;

View File

@@ -1,10 +1,9 @@
import React, { Dispatch, SetStateAction, useState } from 'react';
import { Check, Plus, X } from '@signozhq/icons';
import { Flex, Tag } from 'antd';
import { Button, Flex, Tag } from 'antd';
import Input from 'components/Input';
import './Tags.styles.scss';
import { Button } from '@signozhq/ui/button';
function Tags({ tags, setTags }: AddTagsProps): JSX.Element {
const [inputValue, setInputValue] = useState<string>('');
@@ -72,19 +71,19 @@ function Tags({ tags, setTags }: AddTagsProps): JSX.Element {
<div className="confirm-cancel-actions">
<Button
type="primary"
className="periscope-btn"
size="small"
icon={<Check size={14} />}
onClick={handleInputConfirm}
size="sm"
prefix={<Check size={14} />}
variant="outlined"
color="secondary"
/>
<Button
type="primary"
className="periscope-btn"
size="small"
icon={<X size={14} />}
onClick={hideInput}
size="sm"
prefix={<X size={14} />}
variant="outlined"
color="secondary"
/>
</div>
</div>
@@ -92,14 +91,15 @@ function Tags({ tags, setTags }: AddTagsProps): JSX.Element {
{!inputVisible && (
<Button
type="primary"
size="small"
style={{
fontSize: '11px',
}}
onClick={showInput}
size="sm"
prefix={<Plus size={14} />}
>
<Flex justify="center" align="center" gap={4}>
<Plus size="md" />
New Tag
</Flex>
</Button>

View File

@@ -1,7 +1,6 @@
import { Dispatch, SetStateAction, useCallback, useMemo } from 'react';
import { ChevronDown, Globe } from '@signozhq/icons';
import { Dropdown } from 'antd';
import { Button } from '@signozhq/ui/button';
import { Button, Dropdown } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import TimeItems, {
timePreferance,
@@ -41,7 +40,7 @@ function TimePreference({
className="time-selection-target"
trigger={['click']}
>
<Button variant="outlined" color="secondary">
<Button>
<div className="button-selected-text">
<Globe size={14} />
<Typography.Text className="selected-value">

View File

@@ -1,6 +1,7 @@
import { useMemo, useState } from 'react';
import { useLocation } from 'react-router-dom';
import { Color } from '@signozhq/design-tokens';
import { Button } from 'antd';
import { useIsDarkMode } from 'hooks/useDarkMode';
import history from 'lib/history';
import { ArrowRight } from '@signozhq/icons';
@@ -10,7 +11,6 @@ import { TopContributorsCardProps } from './types';
import ViewAllDrawer from './ViewAllDrawer';
import './TopContributorsCard.styles.scss';
import { Button } from '@signozhq/ui/button';
function TopContributorsCard({
topContributorsData,
@@ -52,11 +52,7 @@ function TopContributorsCard({
<div className="top-contributors-card__header">
<div className="title">top contributors</div>
{topContributorsData.length > 3 && (
<Button
className="view-all"
onClick={toggleViewAllDrawer}
variant="ghost"
>
<Button type="text" className="view-all" onClick={toggleViewAllDrawer}>
<div className="label">View all</div>
<div className="icon">
<ArrowRight

View File

@@ -1,6 +1,7 @@
import { useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import { generatePath } from 'react-router-dom';
import { Button } from 'antd';
import type { ColumnsType } from 'antd/lib/table';
import { ResizeTable } from 'components/ResizeTable';
import ROUTES from 'constants/routes';
@@ -11,7 +12,6 @@ import { useAppContext } from 'providers/App/App';
import { Channels } from 'types/api/channels/getAll';
import Delete from './Delete';
import { Button } from '@signozhq/ui/button';
function AlertChannels({ allChannels }: AlertChannelsProps): JSX.Element {
const { t } = useTranslation(['channels']);
@@ -51,7 +51,7 @@ function AlertChannels({ allChannels }: AlertChannelsProps): JSX.Element {
width: 80,
render: (id: string): JSX.Element => (
<>
<Button onClick={(): void => onClickEditHandler(id)} variant="link">
<Button onClick={(): void => onClickEditHandler(id)} type="link">
{t('column_channel_edit')}
</Button>
<Delete id={id} notifications={notifications} />

View File

@@ -1,10 +1,10 @@
import { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useQueryClient } from 'react-query';
import { Button } from 'antd';
import type { NotificationInstance } from 'antd/es/notification/interface';
import deleteChannel from 'api/channels/delete';
import APIError from 'types/api/error';
import { Button } from '@signozhq/ui/button';
function Delete({ notifications, id }: DeleteProps): JSX.Element {
const { t } = useTranslation(['channels']);
@@ -38,8 +38,8 @@ function Delete({ notifications, id }: DeleteProps): JSX.Element {
<Button
loading={loading}
disabled={loading}
type="link"
onClick={onClickHandler}
variant="link"
>
Delete
</Button>

View File

@@ -1,4 +1,3 @@
import { Button } from '@signozhq/ui/button';
import { Typography } from '@signozhq/ui/typography';
import { useCallback, useEffect, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
@@ -6,7 +5,7 @@ import { useQueries } from 'react-query';
// eslint-disable-next-line no-restricted-imports
import { useSelector } from 'react-redux';
import { Link, useLocation } from 'react-router-dom';
import { Card, Input, Space, TableProps, Tooltip, Flex } from 'antd';
import { Button, Card, Input, Space, TableProps, Tooltip, Flex } from 'antd';
import { Search } from '@signozhq/icons';
import type { ColumnType, TablePaginationConfig } from 'antd/es/table';
import type { FilterValue, SorterResult } from 'antd/es/table/interface';
@@ -267,8 +266,9 @@ function AllErrors(): JSX.Element {
onPressEnter={handleSearch(confirm, String(selectedKeys[0]), filterKey)}
/>
<Button
type="primary"
onClick={handleSearch(confirm, String(selectedKeys[0]), filterKey)}
size="sm"
size="small"
>
<Flex align="center" justify="center" gap={4}>
<Search size="md" />

View File

@@ -706,7 +706,7 @@
.views-tabs {
color: var(--l2-foreground);
button {
.ant-btn {
box-shadow: none;
position: relative;
}

View File

@@ -2,8 +2,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
// eslint-disable-next-line no-restricted-imports
import { useSelector } from 'react-redux';
import { Spacing } from '@signozhq/design-tokens';
import { Divider, Drawer, Radio } from 'antd';
import { Button } from '@signozhq/ui/button';
import { Button, Divider, Drawer, Radio } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import type { RadioChangeEvent } from 'antd/lib';
import DateTimeSelectionV2 from 'container/TopNav/DateTimeSelectionV2';
@@ -25,7 +24,6 @@ import EndPointDetails from './EndPointDetails';
import TopErrors from './TopErrors';
import './DomainDetails.styles.scss';
import ButtonGroup from 'periscope/components/ButtonGroup/ButtonGroup';
const TimeRangeOffset = 1000000000;
@@ -178,7 +176,7 @@ function DomainDetails({
modalInitialStartTime={modalTimeRange.startTime * 1000}
modalInitialEndTime={modalTimeRange.endTime * 1000}
/>
<ButtonGroup className="domain-details-drawer-header-ctas">
<Button.Group className="domain-details-drawer-header-ctas">
<Button
className="domain-navigate-cta"
onClick={(): void => {
@@ -187,12 +185,9 @@ function DomainDetails({
setEndPointsGroupBy([]);
setSelectedView(VIEW_TYPES.ALL_ENDPOINTS);
}}
icon={<ArrowUp size={16} />}
disabled={selectedDomainIndex === 0}
title="Previous domain"
variant="outlined"
color="secondary"
size="icon"
prefix={<ArrowUp size={16} />}
/>
<Button
className="domain-navigate-cta"
@@ -202,14 +197,11 @@ function DomainDetails({
setEndPointsGroupBy([]);
setSelectedView(VIEW_TYPES.ALL_ENDPOINTS);
}}
icon={<ArrowDown size={16} />}
disabled={selectedDomainIndex === domainListLength - 1}
title="Next domain"
variant="outlined"
color="secondary"
size="icon"
prefix={<ArrowDown size={16} />}
/>
</ButtonGroup>
</Button.Group>
</div>
</div>
}

View File

@@ -1,4 +1,4 @@
import { Button } from '@signozhq/ui/button';
import { Button } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { RotateCw } from '@signozhq/icons';
@@ -22,9 +22,7 @@ function ErrorState({ refetch }: { refetch: () => void }): JSX.Element {
<Button
className="refresh-cta"
onClick={(): void => refetch()}
variant="outlined"
color="secondary"
prefix={<RotateCw size={16} />}
icon={<RotateCw size={16} />}
>
Refresh this panel
</Button>

View File

@@ -1,8 +1,7 @@
import { useCallback, useMemo, useRef, useState } from 'react';
import { UseQueryResult } from 'react-query';
import { Color } from '@signozhq/design-tokens';
import { Card, Skeleton } from 'antd';
import { Button } from '@signozhq/ui/button';
import { Button, Card, Skeleton } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import cx from 'classnames';
import { useNavigateToExplorer } from 'components/CeleryTask/useNavigateToExplorer';
@@ -30,7 +29,6 @@ import { IBuilderQuery } from 'types/api/queryBuilder/queryBuilderData';
import ErrorState from './ErrorState';
import { prepareStatusCodeBarChartsConfig } from './utils';
import ButtonGroup from 'periscope/components/ButtonGroup/ButtonGroup';
function StatusCodeBarCharts({
endPointStatusCodeBarChartsDataQuery,
@@ -249,25 +247,23 @@ function StatusCodeBarCharts({
<Card bordered className="endpoint-details-card">
<div className="header">
<Typography.Text>Call response status</Typography.Text>
<ButtonGroup className="views-tabs">
<Button.Group className="views-tabs">
<Button
value={0}
className={currentWidgetInfoIndex === 0 ? 'selected_view tab' : 'tab'}
disabled={false}
onClick={(): void => setCurrentWidgetInfoIndex(0)}
variant="outlined"
color="secondary"
>
Number of calls
</Button>
<Button
value={1}
className={currentWidgetInfoIndex === 1 ? 'selected_view tab' : 'tab'}
onClick={(): void => setCurrentWidgetInfoIndex(1)}
variant="outlined"
color="secondary"
>
Latency
</Button>
</ButtonGroup>
</Button.Group>
</div>
<div className="graph-container" ref={graphRef}>
{renderCardContent(endPointStatusCodeBarChartsDataQuery)}

View File

@@ -1,4 +1,3 @@
import { Button } from '@signozhq/ui/button';
import { Typography } from '@signozhq/ui/typography';
import { useCallback, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
@@ -7,6 +6,7 @@ import { CircleCheck, CloudDownload } from '@signozhq/icons';
import { Color } from '@signozhq/design-tokens';
import {
Alert,
Button,
Card,
Col,
Flex,
@@ -445,11 +445,12 @@ export default function BillingContainer(): JSX.Element {
</Flex>
<Flex gap={8}>
<Button
type="default"
size="middle"
loading={isLoadingBilling || isLoadingManageBilling}
disabled={isLoading || isFetchingBillingData}
onClick={handleCsvDownload}
variant="outlined"
color="secondary"
className="periscope-btn"
>
<Flex align="center" justify="center" gap={4}>
<CloudDownload size="md" />
@@ -458,6 +459,8 @@ export default function BillingContainer(): JSX.Element {
</Button>
<Button
data-testid="header-billing-button"
type="primary"
size="middle"
loading={isLoadingBilling || isLoadingManageBilling}
disabled={isLoading}
onClick={handleBilling}
@@ -581,6 +584,8 @@ export default function BillingContainer(): JSX.Element {
<Col span={4} style={{ display: 'flex', justifyContent: 'flex-end' }}>
<Button
data-testid="upgrade-plan-button"
type="primary"
size="middle"
loading={isLoadingBilling || isLoadingManageBilling}
onClick={handleBilling}
>

View File

@@ -1,12 +1,11 @@
import { memo, useMemo } from 'react';
import { ChevronLeft, ChevronRight } from '@signozhq/icons';
import { Flex, Select } from 'antd';
import { Button, Flex, Select } from 'antd';
import { DEFAULT_PER_PAGE_OPTIONS, Pagination } from 'hooks/queryPagination';
import { popupContainer } from 'utils/selectPopupContainer';
import { defaultSelectStyle } from './config';
import { Container } from './styles';
import { Button } from '@signozhq/ui/button';
function Controls({
offset = 0,
@@ -38,10 +37,10 @@ function Controls({
<Container>
<Button
loading={isLoading}
size="small"
type="link"
disabled={isPreviousDisabled}
onClick={handleNavigatePrevious}
size="sm"
variant="link"
>
<Flex align="center" gap="4px">
<ChevronLeft size={16} /> Previous
@@ -49,10 +48,10 @@ function Controls({
</Button>
<Button
loading={isLoading}
size="small"
type="link"
disabled={isNextDisabled}
onClick={handleNavigateNext}
size="sm"
variant="link"
>
<Flex align="center" gap="4px">
Next <ChevronRight size={16} />

View File

@@ -1,5 +1,5 @@
import { useQuery } from 'react-query';
import { Tooltip } from 'antd';
import { Button, Tooltip } from 'antd';
import getAllChannels from 'api/channels/getAll';
import classNames from 'classnames';
import { ChartLine } from '@signozhq/icons';
@@ -16,7 +16,6 @@ import AnomalyThreshold from './AnomalyThreshold';
import { ANOMALY_TAB_TOOLTIP, THRESHOLD_TAB_TOOLTIP } from './constants';
import './styles.scss';
import { Button } from '@signozhq/ui/button';
function AlertCondition(): JSX.Element {
const { alertType, setAlertType } = useCreateAlertState();
@@ -83,8 +82,6 @@ function AlertCondition(): JSX.Element {
handleAlertTypeChange(tab.value as AlertTypes);
}
}}
variant="outlined"
color="secondary"
>
{tab.icon}
{tab.label}

View File

@@ -1,6 +1,5 @@
import { useEffect } from 'react';
import { Select, Tooltip } from 'antd';
import { Button } from '@signozhq/ui/button';
import { Button, Select, Tooltip } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import classNames from 'classnames';
import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';
@@ -295,11 +294,11 @@ function AlertThreshold({
/>
))}
<Button
type="dashed"
icon={<Plus size={16} />}
onClick={addThreshold}
className="add-threshold-btn"
data-testid="add-threshold-button"
variant="dashed"
prefix={<Plus size={16} />}
>
Add Threshold
</Button>

View File

@@ -1,6 +1,5 @@
import { useMemo, useState } from 'react';
import { Input, Select, Tooltip } from 'antd';
import { Button } from '@signozhq/ui/button';
import { Button, Input, Select, Tooltip } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { CircleX, Trash } from '@signozhq/icons';
import { useAppContext } from 'providers/App/App';
@@ -10,7 +9,6 @@ import { AlertThresholdOperator } from '../context/types';
import { normalizeOperator } from '../utils';
import { ThresholdItemProps } from './types';
import { NotificationChannelsNotFoundContent } from './utils';
import ButtonGroup from 'periscope/components/ButtonGroup/ButtonGroup';
function ThresholdItem({
threshold,
@@ -168,18 +166,16 @@ function ThresholdItem({
/>
<Tooltip title="Remove recovery threshold">
<Button
type="default"
icon={<Trash size={16} />}
onClick={removeRecoveryThreshold}
className="icon-btn"
data-testid="remove-recovery-threshold-button"
variant="outlined"
color="secondary"
size="icon"
prefix={<Trash size={16} />}
/>
</Tooltip>
</>
)}
<ButtonGroup>
<Button.Group>
{/* TODO: Add recovery threshold back once the functionality is implemented */}
{/* {!showRecoveryThreshold && (
<Tooltip title="Add recovery threshold">
@@ -194,17 +190,15 @@ function ThresholdItem({
{showRemoveButton && (
<Tooltip title="Remove threshold">
<Button
type="default"
icon={<CircleX size={16} />}
onClick={(): void => removeThreshold(threshold.id)}
className="icon-btn"
data-testid="remove-threshold-button"
variant="outlined"
color="secondary"
size="icon"
prefix={<CircleX size={16} />}
/>
</Tooltip>
)}
</ButtonGroup>
</Button.Group>
</div>
</div>
</div>

View File

@@ -333,7 +333,7 @@
}
.condensed-evaluation-settings-container {
button {
.ant-btn {
display: flex;
align-items: center;
min-width: 240px;

View File

@@ -1,5 +1,4 @@
import { Flex, SelectProps, Switch } from 'antd';
import { Button } from '@signozhq/ui/button';
import { Button, Flex, SelectProps, Switch } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import type { BaseOptionType, DefaultOptionType } from 'antd/es/select';
import { getInvolvedQueriesInTraceOperator } from 'components/QueryBuilderV2/QueryV2/TraceOperator/utils/utils';
@@ -389,10 +388,10 @@ export function NotificationChannelsNotFoundContent({
Create one
<Button
style={{ padding: '0 4px' }}
type="link"
onClick={(): void => {
openInNewTab(ROUTES.CHANNELS_NEW);
}}
variant="link"
>
here.
</Button>
@@ -401,7 +400,7 @@ export function NotificationChannelsNotFoundContent({
<Typography.Text>Please ask your admin to create one.</Typography.Text>
)}
</Flex>
<Button onClick={refreshChannels} variant="ghost">
<Button type="text" onClick={refreshChannels}>
Refresh
</Button>
</Flex>
@@ -430,10 +429,10 @@ export function RoutingPolicyBanner({
}}
/>
<Button
type="link"
className="view-routing-policies-button"
data-testid="view-routing-policies-button"
onClick={(): void => safeNavigate(ROUTING_POLICIES_ROUTE)}
variant="link"
>
View Routing Policies
<ArrowRight size={14} />

View File

@@ -50,7 +50,7 @@
color: var(--l2-foreground);
}
button {
.ant-btn {
display: flex;
gap: 4px;
align-items: center;

View File

@@ -1,11 +1,10 @@
import { useMemo } from 'react';
import { Button } from '@signozhq/ui/button';
import { Button } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { useCreateAlertState } from 'container/CreateAlertV2/context';
import { INITIAL_ADVANCED_OPTIONS_STATE } from 'container/CreateAlertV2/context/constants';
import { IEditCustomScheduleProps } from 'container/CreateAlertV2/EvaluationSettings/types';
import { Calendar1, Pencil, Trash } from '@signozhq/icons';
import ButtonGroup from 'periscope/components/ButtonGroup/ButtonGroup';
function EditCustomSchedule({
setIsEvaluationCadenceDetailsVisible,
@@ -81,24 +80,23 @@ function EditCustomSchedule({
<div className="edit-custom-schedule">
{displayText}
<div className="button-row">
<ButtonGroup>
<Button onClick={handleEdit} variant="outlined" color="secondary">
<Button.Group>
<Button type="default" onClick={handleEdit}>
<Pencil size={12} />
<Typography.Text>Edit custom schedule</Typography.Text>
</Button>
<Button onClick={handlePreview} variant="outlined" color="secondary">
<Button type="default" onClick={handlePreview}>
<Calendar1 size={12} />
<Typography.Text>Preview</Typography.Text>
</Button>
<Button
data-testid="discard-button"
type="default"
onClick={handleDiscard}
variant="outlined"
color="secondary"
>
<Trash size={12} />
</Button>
</ButtonGroup>
</Button.Group>
</div>
</div>
);

View File

@@ -1,6 +1,5 @@
import { useEffect, useMemo, useState } from 'react';
import { DatePicker, Input, Select } from 'antd';
import { Button } from '@signozhq/ui/button';
import { Button, DatePicker, Input, Select } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import classNames from 'classnames';
import { useCreateAlertState } from 'container/CreateAlertV2/context';
@@ -312,8 +311,6 @@ function EvaluationCadenceDetails({
onClick={(): void => {
handleChangeTab(tab.value as 'editor' | 'rrule');
}}
variant="outlined"
color="secondary"
>
{tab.icon}
{tab.label}
@@ -324,10 +321,14 @@ function EvaluationCadenceDetails({
{activeTab === 'editor' && EditorView}
{activeTab === 'rrule' && RRuleView}
<div className="buttons-row">
<Button onClick={handleDiscard} variant="outlined" color="secondary">
<Button type="default" onClick={handleDiscard}>
Discard
</Button>
<Button onClick={handleSaveCustomSchedule} disabled={disableSaveButton}>
<Button
type="primary"
onClick={handleSaveCustomSchedule}
disabled={disableSaveButton}
>
Save Custom Schedule
</Button>
</div>

View File

@@ -26,8 +26,8 @@
}
}
.periscope-btn-group {
button {
.ant-btn-group {
.ant-btn {
border: 1px solid var(--l1-border);
color: var(--l2-foreground);
font-size: 13px;

View File

@@ -1,5 +1,5 @@
import { useState } from 'react';
import { Popover } from 'antd';
import { Button, Popover } from 'antd';
import { ChevronDown, ChevronUp } from '@signozhq/icons';
import { useCreateAlertState } from '../context';
@@ -7,7 +7,6 @@ import EvaluationWindowPopover from './EvaluationWindowPopover';
import { getEvaluationWindowTypeText, getTimeframeText } from './utils';
import './styles.scss';
import { Button } from '@signozhq/ui/button';
function EvaluationSettings(): JSX.Element {
const { evaluationWindow, setEvaluationWindow } = useCreateAlertState();
@@ -30,11 +29,7 @@ function EvaluationSettings(): JSX.Element {
trigger="click"
showArrow={false}
>
<Button
data-testid="evaluation-settings-button"
variant="outlined"
color="secondary"
>
<Button data-testid="evaluation-settings-button">
<div className="evaluate-alert-conditions-button-left">
{getTimeframeText(evaluationWindow)}
</div>

View File

@@ -1,4 +1,4 @@
import { Button } from '@signozhq/ui/button';
import { Button } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import classNames from 'classnames';
import { Check } from '@signozhq/icons';
@@ -98,7 +98,7 @@ function EvaluationWindowPopover({
<Typography.Text>
{getRollingWindowDescription(evaluationWindow.timeframe)}
</Typography.Text>
<Button variant="link">Read the docs</Button>
<Button type="link">Read the docs</Button>
</div>
);
}
@@ -112,7 +112,7 @@ function EvaluationWindowPopover({
<Typography.Text>
{getCumulativeWindowDescription(evaluationWindow.timeframe)}
</Typography.Text>
<Button variant="link">Read the docs</Button>
<Button type="link">Read the docs</Button>
</div>
);
}

View File

@@ -22,7 +22,7 @@
border-top: 1px dashed var(--l1-border);
}
button {
.ant-btn {
display: flex;
align-items: center;
justify-content: space-between;
@@ -156,7 +156,7 @@
color: var(--muted-foreground);
}
button {
.ant-btn {
width: fit-content;
}
}
@@ -171,7 +171,7 @@
padding: 16px;
}
button {
.ant-btn {
background-color: var(--l3-background);
border: 1px solid var(--l1-border);
color: var(--l2-foreground);

View File

@@ -17,13 +17,13 @@
gap: 12px;
}
button {
.ant-btn {
display: flex;
align-items: center;
gap: 8px;
}
button {
.ant-btn-default {
background-color: var(--l1-background);
border: 1px solid var(--l1-border);
color: var(--l2-foreground);

View File

@@ -42,7 +42,7 @@
}
.notification-message-header-actions {
button {
.ant-btn {
display: flex;
align-items: center;
justify-content: center;

View File

@@ -1,5 +1,6 @@
import { useCallback, useEffect, useMemo, useState } from 'react';
import { useQueryClient } from 'react-query';
import { Button } from 'antd';
import classNames from 'classnames';
import { YAxisSource } from 'components/YAxisUnitSelector/types';
import { QueryParams } from 'constants/query';
@@ -25,7 +26,6 @@ import ChartPreview from './ChartPreview';
import { buildAlertDefForChartPreview } from './utils';
import './styles.scss';
import { Button } from '@signozhq/ui/button';
function QuerySection(): JSX.Element {
const {
@@ -149,8 +149,6 @@ function QuerySection(): JSX.Element {
onClick={(): void => {
setAlertType(tab.value as AlertTypes);
}}
variant="outlined"
color="secondary"
>
{tab.icon}
{tab.label}

View File

@@ -192,7 +192,7 @@
align-items: start;
border-bottom: 1px solid var(--l1-border);
button {
.ant-btn {
display: flex;
width: 100%;
height: 20px;
@@ -217,7 +217,7 @@
align-items: start;
border-bottom: 1px solid var(--l1-border);
button {
.ant-btn {
display: flex;
width: 100%;
height: 20px;

View File

@@ -16,8 +16,7 @@ import {
Plus,
X,
} from '@signozhq/icons';
import { Card, Input, Modal, Popover, Tag, Tooltip } from 'antd';
import { Button } from '@signozhq/ui/button';
import { Button, Card, Input, Modal, Popover, Tag, Tooltip } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import logEvent from 'api/common/logEvent';
import ConfigureIcon from 'assets/Integrations/ConfigureIcon';
@@ -376,11 +375,11 @@ function DashboardDescription(props: DashboardDescriptionProps): JSX.Element {
}
>
<Button
type="text"
icon={<LockKeyhole size={14} />}
disabled={dashboardData?.createdBy === 'integration'}
onClick={handleLockDashboardToggle}
data-testid="lock-unlock-dashboard"
variant="ghost"
prefix={<LockKeyhole size={14} />}
>
{isDashboardLocked ? 'Unlock Dashboard' : 'Lock Dashboard'}
</Button>
@@ -389,21 +388,21 @@ function DashboardDescription(props: DashboardDescriptionProps): JSX.Element {
{!isDashboardLocked && editDashboard && (
<Button
type="text"
icon={<PenLine size={14} />}
onClick={(): void => {
setIsRenameDashboardOpen(true);
setIsDashbordSettingsOpen(false);
}}
variant="ghost"
prefix={<PenLine size={14} />}
>
Rename
</Button>
)}
<Button
type="text"
icon={<Fullscreen size={14} />}
onClick={handle.enter}
variant="ghost"
prefix={<Fullscreen size={14} />}
>
Full screen
</Button>
@@ -411,18 +410,20 @@ function DashboardDescription(props: DashboardDescriptionProps): JSX.Element {
<section className="section-2">
{!isDashboardLocked && addPanelPermission && (
<Button
type="text"
icon={<FolderKanban size={14} />}
onClick={(): void => {
setIsPanelNameModalOpen(true);
setIsDashbordSettingsOpen(false);
}}
variant="ghost"
prefix={<FolderKanban size={14} />}
>
New section
</Button>
)}
<Button
type="text"
icon={<FileJson size={14} />}
onClick={(): void => {
downloadObjectAsJson(
sanitizeDashboardData(selectedData),
@@ -430,20 +431,18 @@ function DashboardDescription(props: DashboardDescriptionProps): JSX.Element {
);
setIsDashbordSettingsOpen(false);
}}
variant="ghost"
prefix={<FileJson size={14} />}
>
Export JSON
</Button>
<Button
type="text"
icon={<ClipboardCopy size={14} />}
onClick={(): void => {
setCopy(
JSON.stringify(sanitizeDashboardData(selectedData), null, 2),
);
setIsDashbordSettingsOpen(false);
}}
variant="ghost"
prefix={<ClipboardCopy size={14} />}
>
Copy as JSON
</Button>
@@ -463,21 +462,20 @@ function DashboardDescription(props: DashboardDescriptionProps): JSX.Element {
placement="bottomRight"
>
<Button
icon={<Ellipsis size={14} />}
type="text"
className="icons"
data-testid="options"
variant="ghost"
size="icon"
prefix={<Ellipsis size={14} />}
/>
</Popover>
{!isDashboardLocked && editDashboard && (
<>
<Button
type="text"
className="configure-button"
icon={<ConfigureIcon />}
data-testid="show-drawer"
onClick={onConfigureClick}
variant="ghost"
prefix={<ConfigureIcon />}
>
Configure
</Button>
@@ -496,8 +494,9 @@ function DashboardDescription(props: DashboardDescriptionProps): JSX.Element {
<Button
className="add-panel-btn"
onClick={onEmptyWidgetHandler}
icon={<Plus size="md" />}
type="primary"
data-testid="add-panel-header"
prefix={<Plus size="md" />}
>
New Panel
</Button>
@@ -537,18 +536,19 @@ function DashboardDescription(props: DashboardDescriptionProps): JSX.Element {
footer={
<div className="dashboard-rename">
<Button
type="primary"
icon={<Check size={14} />}
className="rename-btn"
onClick={onNameChangeHandler}
disabled={updateDashboardMutation.isLoading}
prefix={<Check size={14} />}
>
Rename Dashboard
</Button>
<Button
type="text"
icon={<X size={14} />}
className="cancel-btn"
onClick={(): void => setIsRenameDashboardOpen(false)}
variant="ghost"
prefix={<X size={14} />}
>
Cancel
</Button>
@@ -577,21 +577,22 @@ function DashboardDescription(props: DashboardDescriptionProps): JSX.Element {
footer={
<div className="dashboard-rename">
<Button
type="primary"
icon={<Check size={14} />}
className="rename-btn"
onClick={(): void => handleAddRow()}
disabled={updateDashboardMutation.isLoading}
prefix={<Check size={14} />}
>
Create Section
</Button>
<Button
type="text"
icon={<X size={14} />}
className="cancel-btn"
onClick={(): void => {
setIsPanelNameModalOpen(false);
setSectionName(DEFAULT_ROW_NAME);
}}
variant="ghost"
prefix={<X size={14} />}
>
Cancel
</Button>

View File

@@ -114,7 +114,7 @@
background: var(--l2-background);
box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
button {
.ant-btn {
width: 114px;
height: 32px;
flex-shrink: 0;

View File

@@ -5,8 +5,7 @@ import { useQuery } from 'react-query';
import { useSelector } from 'react-redux';
import { orange } from '@ant-design/colors';
import { Color } from '@signozhq/design-tokens';
import { Collapse, Input, Select, Switch, Tag } from 'antd';
import { Button } from '@signozhq/ui/button';
import { Button, Collapse, Input, Select, Switch, Tag } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import dashboardVariablesQuery from 'api/dashboard/variables/dashboardVariablesQuery';
import cx from 'classnames';
@@ -442,10 +441,10 @@ function VariableItem({
<div className="variable-item-container">
<div className="all-variables">
<Button
type="text"
className="all-variables-btn"
icon={<ArrowLeft size={14} />}
onClick={onCancel}
variant="ghost"
prefix={<ArrowLeft size={14} />}
>
All variables
</Button>
@@ -526,6 +525,8 @@ function VariableItem({
<div className="variable-type-btn-group">
<Button
type="text"
icon={<Pyramid size={14} />}
className={cx(
'variable-type-btn',
queryType === 'DYNAMIC' ? 'selected' : '',
@@ -538,8 +539,6 @@ function VariableItem({
setHasUserManuallyChangedName(false);
}
}}
variant="ghost"
prefix={<Pyramid size={14} />}
>
Dynamic
<Tag bordered={false} className="sidenav-beta-tag" color="geekblue">
@@ -547,6 +546,8 @@ function VariableItem({
</Tag>
</Button>
<Button
type="text"
icon={<ClipboardType size={14} />}
className={cx(
'variable-type-btn',
queryType === 'TEXTBOX' ? 'selected' : '',
@@ -559,12 +560,12 @@ function VariableItem({
setHasUserManuallyChangedName(false);
}
}}
variant="ghost"
prefix={<ClipboardType size={14} />}
>
Textbox
</Button>
<Button
type="text"
icon={<LayoutList size={14} />}
className={cx(
'variable-type-btn',
queryType === 'CUSTOM' ? 'selected' : '',
@@ -577,12 +578,12 @@ function VariableItem({
setHasUserManuallyChangedName(false);
}
}}
variant="ghost"
prefix={<LayoutList size={14} />}
>
Custom
</Button>
<Button
type="text"
icon={<DatabaseZap size={14} />}
className={cx(
'variable-type-btn',
queryType === 'QUERY' ? 'selected' : '',
@@ -595,8 +596,6 @@ function VariableItem({
setHasUserManuallyChangedName(false);
}
}}
variant="ghost"
prefix={<DatabaseZap size={14} />}
>
Query
<Tag bordered={false} className="sidenav-beta-tag" color="warning">
@@ -657,13 +656,14 @@ function VariableItem({
}}
/>
<Button
type="primary"
size="small"
onClick={handleTestRunQuery}
style={{
position: 'absolute',
bottom: 0,
}}
loading={previewLoading}
size="sm"
>
Test Run Query
</Button>
@@ -824,19 +824,19 @@ function VariableItem({
<div className="variable-item-footer">
<VariableItemRow>
<Button
type="default"
onClick={onCancel}
icon={<X size={14} />}
className="footer-btn-discard"
variant="outlined"
color="secondary"
prefix={<X size={14} />}
>
Discard
</Button>
<Button
type="primary"
onClick={handleSave}
disabled={errorName || errorAttributeKey}
icon={<Check size={14} />}
className="footer-btn-save"
prefix={<Check size={14} />}
>
Save Variable
</Button>

View File

@@ -11,8 +11,7 @@ import {
import { restrictToVerticalAxis } from '@dnd-kit/modifiers';
import { arrayMove, SortableContext, useSortable } from '@dnd-kit/sortable';
import { CSS } from '@dnd-kit/utilities';
import { Flex, Modal, Row, RowProps, Space, Table } from 'antd';
import { Button } from '@signozhq/ui/button';
import { Button, Modal, Row, RowProps, Space, Table, Flex } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { VariablesSettingsTabHandle } from 'container/DashboardContainer/DashboardDescription/types';
import { convertVariablesToDbFormat } from 'container/DashboardContainer/DashboardVariablesSelection/util';
@@ -332,29 +331,29 @@ function VariablesSettings({
<Space className="actions-btns">
{variable.type === 'DYNAMIC' && (
<Button
type="text"
onClick={(): void => onApplyToAllHandler(variable)}
className="apply-to-all-button"
loading={updateMutation.isLoading}
variant="ghost"
>
<Typography.Text>Apply to all</Typography.Text>
</Button>
)}
<Button
type="text"
onClick={(): void => onVariableViewModeEnter('EDIT', variable)}
className="edit-variable-button"
variant="ghost"
>
<PenLine size={14} />
</Button>
<Button
type="text"
onClick={(): void => {
if (variable) {
onVariableDeleteHandler(variable);
}
}}
className="delete-variable-button"
variant="ghost"
>
<Trash2 size={14} />
</Button>
@@ -435,6 +434,7 @@ function VariablesSettings({
>
<Button
data-testid="add-new-variable"
type="primary"
onClick={(): void =>
onVariableViewModeEnter('ADD', {} as IDashboardVariable)
}

View File

@@ -3,8 +3,7 @@ import { useMutation } from 'react-query';
import { useCopyToClipboard } from 'react-use';
import { Checkbox } from '@signozhq/ui/checkbox';
import { toast } from '@signozhq/ui/sonner';
import { Select } from 'antd';
import { Button } from '@signozhq/ui/button';
import { Button, Select } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import createPublicDashboardAPI from 'api/dashboard/public/createPublicDashboard';
import revokePublicDashboardAccessAPI from 'api/dashboard/public/revokePublicDashboardAccess';
@@ -295,21 +294,20 @@ function PublicDashboardSetting(): JSX.Element {
</Typography.Text>
<Button
className="url-copy-btn"
type="link"
className="url-copy-btn periscope-btn ghost"
icon={<Copy size={12} />}
onClick={handleCopyPublicDashboardURL}
variant="link"
size="icon"
prefix={<Copy size={12} />}
/>
<Button
type="link"
className="periscope-btn ghost"
icon={<ExternalLink size={12} />}
onClick={(): void => {
if (publicDashboardURL) {
openInNewTab(publicDashboardURL);
}
}}
variant="link"
size="icon"
prefix={<ExternalLink size={12} />}
/>
</div>
</div>
@@ -325,7 +323,8 @@ function PublicDashboardSetting(): JSX.Element {
<div className="public-dashboard-setting-actions">
{!isPublicDashboard ? (
<Button
className="create-public-dashboard-btn"
type="primary"
className="create-public-dashboard-btn periscope-btn primary"
disabled={isLoading || !isAdmin}
onClick={handleCreatePublicDashboard}
loading={
@@ -333,7 +332,7 @@ function PublicDashboardSetting(): JSX.Element {
isFetchingPublicDashboard ||
isLoadingPublicDashboard
}
prefix={
icon={
isLoadingCreatePublicDashboard ||
isFetchingPublicDashboard ||
isLoadingPublicDashboard ? (
@@ -342,32 +341,29 @@ function PublicDashboardSetting(): JSX.Element {
<Globe size={14} />
)
}
variant="solid"
color="primary"
>
Publish dashboard
</Button>
) : (
<>
<Button
type="default"
className="periscope-btn secondary"
disabled={isLoading || !isAdmin}
onClick={handleRevokePublicDashboardAccess}
loading={isLoadingRevokePublicDashboardAccess}
variant="outlined"
color="secondary"
prefix={<Trash size={14} />}
icon={<Trash size={14} />}
>
Unpublish dashboard
</Button>
<Button
className="create-public-dashboard-btn"
type="primary"
className="create-public-dashboard-btn periscope-btn primary"
disabled={isLoading || !isAdmin}
onClick={handleUpdatePublicDashboard}
loading={isLoadingUpdatePublicDashboard}
prefix={<Globe size={14} />}
variant="solid"
color="primary"
icon={<Globe size={14} />}
>
Update published dashboard
</Button>

View File

@@ -1,4 +1,4 @@
import { Tabs, Tooltip } from 'antd';
import { Button, Tabs, Tooltip } from 'antd';
import { useGetTenantLicense } from 'hooks/useGetTenantLicense';
import { Braces, Globe, Table } from '@signozhq/icons';
import { useAppContext } from 'providers/App/App';
@@ -10,7 +10,6 @@ import GeneralDashboardSettings from './General';
import PublicDashboardSetting from './PublicDashboard';
import './DashboardSettingsContent.styles.scss';
import { Button } from '@signozhq/ui/button';
function DashboardSettings({
variablesSettingsTabHandle,
@@ -33,11 +32,11 @@ function DashboardSettings({
placement="right"
>
<Button
type="text"
icon={<Globe size={14} />}
className={`public-dashboard-btn ${
user?.role !== USER_ROLES.ADMIN ? 'disabled-btn' : ''
}`}
variant="ghost"
prefix={<Globe size={14} />}
>
Publish
</Button>
@@ -51,11 +50,7 @@ function DashboardSettings({
const items = [
{
label: (
<Button
className="overview-btn"
variant="ghost"
prefix={<Table size={14} />}
>
<Button type="text" icon={<Table size={14} />} className="overview-btn">
Overview
</Button>
),
@@ -64,11 +59,7 @@ function DashboardSettings({
},
{
label: (
<Button
className="variables-btn"
variant="ghost"
prefix={<Braces size={14} />}
>
<Button type="text" icon={<Braces size={14} />} className="variables-btn">
Variables
</Button>
),

View File

@@ -90,7 +90,7 @@
padding: 12px 15px;
margin-top: 0px;
button {
.ant-btn {
width: 100%;
display: flex;
align-items: center;

View File

@@ -1,4 +1,5 @@
import { useCallback, useRef } from 'react';
import { Button } from 'antd';
import getSessionStorageApi from 'api/browser/sessionstorage/get';
import ROUTES from 'constants/routes';
import { DASHBOARDS_LIST_QUERY_PARAMS_STORAGE_KEY } from 'hooks/dashboard/useDashboardsListQueryParams';
@@ -10,7 +11,6 @@ import { DashboardData } from 'types/api/dashboard/getAll';
import { Base64Icons } from '../../DashboardSettings/General/utils';
import './DashboardBreadcrumbs.styles.scss';
import { Button } from '@signozhq/ui/button';
function DashboardBreadcrumbs(): JSX.Element {
const { safeNavigate } = useSafeNavigate();
@@ -46,14 +46,14 @@ function DashboardBreadcrumbs(): JSX.Element {
return (
<div className="dashboard-breadcrumbs">
<Button
type="text"
icon={<LayoutGrid size={14} />}
className="dashboard-btn"
onClick={goToListPage}
variant="ghost"
prefix={<LayoutGrid size={14} />}
>
Dashboard /
</Button>
<Button className="id-btn dashboard-name-btn" variant="ghost">
<Button type="text" className="id-btn dashboard-name-btn">
<img src={image} alt="dashboard-icon" className="dashboard-icon-image" />
{title}
</Button>

View File

@@ -1,5 +1,5 @@
import { useCallback, useEffect, useMemo, useState } from 'react';
import { Input } from 'antd';
import { Button, Input } from 'antd';
import { PrecisionOption, PrecisionOptionsEnum } from 'components/Graph/types';
import { ResizeTable } from 'components/ResizeTable';
import { useNotifications } from 'hooks/useNotifications';
@@ -15,7 +15,6 @@ import { getChartManagerColumns } from './getChartMangerColumns';
import { ExtendedChartDataset, getDefaultTableDataSet } from './utils';
import './ChartManager.styles.scss';
import { Button } from '@signozhq/ui/button';
interface ChartManagerProps {
config: UPlotConfigBuilder;
@@ -152,10 +151,12 @@ export default function ChartManager({
data-testid="filter-input"
/>
<div className="chart-manager-actions-container">
<Button onClick={onCancel} variant="outlined" color="secondary">
<Button type="default" onClick={onCancel}>
Cancel
</Button>
<Button onClick={handleSave}>Save</Button>
<Button type="primary" onClick={handleSave}>
Save
</Button>
</div>
</div>
<div className="chart-manager-table-container">

View File

@@ -1,12 +1,11 @@
import { useState } from 'react';
import { CloudDownload } from '@signozhq/icons';
import { Dropdown, Flex, MenuProps } from 'antd';
import { Button, Dropdown, MenuProps, Flex } from 'antd';
import { unparse } from 'papaparse';
import { DownloadProps } from './Download.types';
import './Download.styles.scss';
import { Button } from '@signozhq/ui/button';
function Download({ data, isLoading, fileName }: DownloadProps): JSX.Element {
const [isDownloading, setIsDownloading] = useState(false);
@@ -72,8 +71,8 @@ function Download({ data, isLoading, fileName }: DownloadProps): JSX.Element {
<Button
className="download-button"
loading={isLoading || isDownloading}
size="sm"
variant="link"
size="small"
type="link"
>
<Flex align="center" gap={4}>
<CloudDownload size="md" />

View File

@@ -2,8 +2,7 @@ import { useEffect, useMemo, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useQuery } from 'react-query';
import { useLocation } from 'react-router-dom';
import { Divider, Space } from 'antd';
import { Button } from '@signozhq/ui/button';
import { Button, Divider, Space } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import logEvent from 'api/common/logEvent';
import getNextPrevId from 'api/errors/getNextPrevId';
@@ -173,8 +172,6 @@ function ErrorDetails(props: ErrorDetailsProps): JSX.Element {
nextPrevData?.payload?.prevTimestamp || '',
)
}
variant="outlined"
color="secondary"
>
{t('older')}
</Button>
@@ -187,8 +184,6 @@ function ErrorDetails(props: ErrorDetailsProps): JSX.Element {
nextPrevData?.payload?.nextTimestamp || '',
)
}
variant="outlined"
color="secondary"
>
{t('newer')}
</Button>
@@ -198,7 +193,7 @@ function ErrorDetails(props: ErrorDetailsProps): JSX.Element {
<DashedContainer>
<Typography>{t('see_trace_graph')}</Typography>
<Button onClick={onClickTraceHandler}>
<Button onClick={onClickTraceHandler} type="primary">
{t('see_error_in_trace_graph')}
</Button>
</DashedContainer>

View File

@@ -20,7 +20,7 @@ import {
} from '@signozhq/icons';
import { Color } from '@signozhq/design-tokens';
import {
Button as AntdButton,
Button,
ColorPicker,
Divider,
Input,
@@ -29,7 +29,6 @@ import {
Select,
Tooltip,
} from 'antd';
import { Button } from '@signozhq/ui/button';
import { Typography } from '@signozhq/ui/typography';
import getLocalStorageKey from 'api/browser/localstorage/get';
import setLocalStorageKey from 'api/browser/localstorage/set';
@@ -737,13 +736,13 @@ function ExplorerOptions({
const CreateAlertButton = useMemo(() => {
if (isOneChartPerQuery) {
const selectLabel = (
<AntdButton
<Button
disabled={disabled}
shape="round"
icon={<ConciergeBell size={16} />}
>
Create an Alert
</AntdButton>
</Button>
);
return (
<Select
@@ -770,14 +769,14 @@ function ExplorerOptions({
);
}
return (
<AntdButton
<Button
disabled={disabled}
shape="round"
onClick={(): void => onCreateAlertsHandler(query)}
icon={<ConciergeBell size={16} />}
>
Create an Alert
</AntdButton>
</Button>
);
}, [
disabled,
@@ -790,7 +789,7 @@ function ExplorerOptions({
const AddToDashboardButton = useMemo(() => {
if (isOneChartPerQuery) {
const selectLabel = (
<AntdButton
<Button
type="primary"
disabled={disabled}
shape="round"
@@ -798,7 +797,7 @@ function ExplorerOptions({
icon={<Plus size={16} />}
>
Add to Dashboard
</AntdButton>
</Button>
);
return (
<Select
@@ -829,7 +828,7 @@ function ExplorerOptions({
);
}
return (
<AntdButton
<Button
type="primary"
disabled={disabled}
shape="round"
@@ -837,7 +836,7 @@ function ExplorerOptions({
icon={<Plus size={16} />}
>
Add to Dashboard
</AntdButton>
</Button>
);
}, [disabled, isOneChartPerQuery, onAddToDashboard, splitedQueries]);
@@ -865,9 +864,7 @@ function ExplorerOptions({
<Button
className="action-icon"
onClick={handleClearSelect}
variant="outlined"
color="secondary"
prefix={<X size={14} />}
icon={<X size={14} />}
/>
</Tooltip>
{
@@ -884,9 +881,7 @@ function ExplorerOptions({
className={cx('action-icon', isEditDeleteSupported ? ' ' : 'hidden')}
disabled={isViewUpdating}
onClick={onUpdateQueryHandler}
variant="outlined"
color="secondary"
prefix={<Disc3 size={14} />}
icon={<Disc3 size={14} />}
/>
</Tooltip>
</>
@@ -941,7 +936,7 @@ function ExplorerOptions({
})}
</Select>
<AntdButton
<Button
shape="round"
onClick={handleSaveViewModalToggle}
className={isEditDeleteSupported ? '' : 'hidden'}
@@ -949,7 +944,7 @@ function ExplorerOptions({
icon={<Disc3 size={16} />}
>
Save this view
</AntdButton>
</Button>
</div>
<hr className={isEditDeleteSupported ? '' : 'hidden'} />
@@ -980,7 +975,7 @@ function ExplorerOptions({
)}
<Tooltip title="Hide">
<AntdButton
<Button
disabled={disabled}
shape="circle"
onClick={hideToolbar}
@@ -1010,13 +1005,12 @@ function ExplorerOptions({
footer={[
<Button
key="submit"
type="primary"
icon={<Check size={16} />}
onClick={onSaveHandler}
disabled={isSaveViewLoading}
data-testid="save-view-btn"
className="save-button"
prefix={<Check size={16} />}
variant="outlined"
color="secondary"
>
Save this view
</Button>,

View File

@@ -1,13 +1,12 @@
import { Dispatch, SetStateAction } from 'react';
import { Color } from '@signozhq/design-tokens';
import { Button, Tooltip } from 'antd';
import { Disc3, X } from '@signozhq/icons';
import { Tooltip } from 'antd';
import { DataSource } from 'types/common/queryBuilder';
import { setExplorerToolBarVisibility } from './utils';
import './ExplorerOptionsHideArea.styles.scss';
import { Button } from '@signozhq/ui/button';
interface DroppableAreaProps {
viewName: string;
@@ -48,10 +47,7 @@ function ExplorerOptionsHideArea({
onClick={handleClearSelect}
className="action-btn"
style={{ background: Color.BG_CHERRY_500 }}
variant="outlined"
color="secondary"
size="icon"
prefix={<X size={14} color={Color.BG_INK_500} />}
icon={<X size={14} color={Color.BG_INK_500} />}
/>
</Tooltip>
{isEditDeleteSupported && isQueryUpdated && (
@@ -60,10 +56,7 @@ function ExplorerOptionsHideArea({
onClick={onUpdateQueryHandler}
className="action-btn"
style={{ background: Color.BG_ROBIN_500 }}
variant="outlined"
color="secondary"
size="icon"
prefix={<Disc3 size={14} color={Color.BG_INK_500} />}
icon={<Disc3 size={14} color={Color.BG_INK_500} />}
/>
</Tooltip>
)}
@@ -74,8 +67,6 @@ function ExplorerOptionsHideArea({
className="explorer-show-btn"
onClick={handleShowExplorerOption}
data-testid="show-explorer-option"
variant="outlined"
color="secondary"
>
<div className="menu-bar" />
</Button>

View File

@@ -1,7 +1,7 @@
import { useCallback, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useMutation } from 'react-query';
import { Button } from '@signozhq/ui/button';
import { Button } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import createDashboard from 'api/v1/dashboards/create';
import { ENTITY_VERSION_V5 } from 'constants/app';
@@ -100,6 +100,7 @@ function ExportPanelContainer({
filterOption={filterOptions}
/>
<Button
type="primary"
loading={isLoading}
disabled={isDisabled}
onClick={handleExportClick}

View File

@@ -2,7 +2,7 @@ import { useCallback, useEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useQuery } from 'react-query';
import { Plus } from '@signozhq/icons';
import { Flex, Form, Select, Switch, Tooltip } from 'antd';
import { Button, Flex, Form, Select, Switch, Tooltip } from 'antd';
import getAll from 'api/channels/getAll';
import logEvent from 'api/common/logEvent';
import { ALERTS_DATA_SOURCE_MAP } from 'constants/alerts';
@@ -30,7 +30,6 @@ import {
} from './styles';
import './FormAlertRules.styles.scss';
import { Button } from '@signozhq/ui/button';
const { Option } = Select;
@@ -257,8 +256,6 @@ function BasicInfo({
onClick={handleCreateNewChannels}
className="create-notification-btn"
disabled={!addNewChannelPermission}
variant="outlined"
color="secondary"
>
<Flex align="center" justify="center">
<Plus size="md" />

View File

@@ -17,7 +17,7 @@
width: 14px;
}
}
button {
.ant-btn-default {
border-color: transparent;
}
}

View File

@@ -1,8 +1,7 @@
import { useEffect, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Color } from '@signozhq/design-tokens';
import { Tabs, Tooltip } from 'antd';
import { Button } from '@signozhq/ui/button';
import { Button, Tabs, Tooltip } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import logEvent from 'api/common/logEvent';
import PromQLIcon from 'assets/Dashboard/PromQl';
@@ -106,7 +105,7 @@ function QuerySection({
{
label: (
<Tooltip title="Query Builder">
<Button className="nav-btns" variant="outlined" color="secondary">
<Button className="nav-btns">
<Atom size={14} />
<Typography.Text>Query Builder</Typography.Text>
</Button>
@@ -123,12 +122,7 @@ function QuerySection({
: 'ClickHouse'
}
>
<Button
className="nav-btns"
disabled={isAnomalyDetection}
variant="outlined"
color="secondary"
>
<Button className="nav-btns" disabled={isAnomalyDetection}>
<Terminal size={14} />
<Typography.Text>ClickHouse Query</Typography.Text>
</Button>
@@ -151,12 +145,7 @@ function QuerySection({
{
label: (
<Tooltip title="Query Builder">
<Button
className="nav-btns"
data-testid="query-builder-tab"
variant="outlined"
color="secondary"
>
<Button className="nav-btns" data-testid="query-builder-tab">
<Atom size={14} />
<Typography.Text>Query Builder</Typography.Text>
</Button>
@@ -173,12 +162,7 @@ function QuerySection({
: 'ClickHouse'
}
>
<Button
className="nav-btns"
disabled={isAnomalyDetection}
variant="outlined"
color="secondary"
>
<Button className="nav-btns" disabled={isAnomalyDetection}>
<Terminal size={14} />
<Typography.Text>ClickHouse Query</Typography.Text>
</Button>
@@ -196,12 +180,7 @@ function QuerySection({
: 'PromQL'
}
>
<Button
className="nav-btns"
disabled={isAnomalyDetection}
variant="outlined"
color="secondary"
>
<Button className="nav-btns" disabled={isAnomalyDetection}>
<PromQLIcon
fillColor={isDarkMode ? Color.BG_VANILLA_200 : Color.BG_INK_300}
/>

View File

@@ -5,8 +5,7 @@ import { useQueryClient } from 'react-query';
import { useSelector } from 'react-redux';
import { useLocation } from 'react-router-dom';
import { BellDot, CircleAlert, ExternalLink, Save } from '@signozhq/icons';
import { FormInstance, Modal, SelectProps } from 'antd';
import { Button } from '@signozhq/ui/button';
import { Button, FormInstance, Modal, SelectProps } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import logEvent from 'api/common/logEvent';
import { convertToApiError } from 'api/ErrorResponseHandlerForGeneratedAPIs';
@@ -864,10 +863,9 @@ function FormAlertRules({
</div>
<Button
className="periscope-btn"
onClick={(): void => handleRedirection(alertDef.alertType as AlertTypes)}
variant="outlined"
color="secondary"
prefix={<ExternalLink size={14} />}
icon={<ExternalLink size={14} />}
>
Alert Setup Guide
</Button>

View File

@@ -1,7 +1,7 @@
import { ChangeEvent, useCallback, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { CircleAlert, CircleX } from '@signozhq/icons';
import { Input, message, Modal } from 'antd';
import { Button, Input, message, Modal } from 'antd';
import { useIsDarkMode } from 'hooks/useDarkMode';
import { map } from 'lodash-es';
import { Labels } from 'types/api/alerts/def';
@@ -11,7 +11,6 @@ import QueryChip from './QueryChip';
import { QueryChipItem, SearchContainer } from './styles';
import { ILabelRecord } from './types';
import { createQuery, flattenLabels, prepareLabels } from './utils';
import { Button } from '@signozhq/ui/button';
type LabelStep = 'Idle' | 'LabelKey' | 'LabelValue';
type LabelEvent = 'NEXT' | 'onBlur' | 'RESET';
@@ -183,9 +182,8 @@ function LabelSelect({
{queries.length > 0 || staging.length > 0 || currentVal ? (
<Button
onClick={handleClearAll}
variant="ghost"
size="icon"
prefix={<CircleX size="md" />}
icon={<CircleX size="md" />}
type="text"
/>
) : null}
</div>

View File

@@ -1,6 +1,6 @@
import { useCallback, useRef, useState } from 'react';
import { Plus } from '@signozhq/icons';
import { Button } from '@signozhq/ui/button';
import { Button } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import logEvent from 'api/common/logEvent';
import ConfigureIcon from 'assets/Integrations/ConfigureIcon';
@@ -107,11 +107,11 @@ export default function DashboardEmptyState(): JSX.Element {
{/* This Empty State needs to be consolidated. The SettingsDrawer should be global to the
whole dashboard page instead of confined to this Empty State */}
<Button
type="text"
className="configure-button"
icon={<ConfigureIcon />}
data-testid="show-drawer"
onClick={onConfigureClick}
variant="ghost"
prefix={<ConfigureIcon />}
>
Configure
</Button>
@@ -143,8 +143,9 @@ export default function DashboardEmptyState(): JSX.Element {
<Button
className="add-panel-btn"
onClick={onEmptyWidgetHandler}
icon={<Plus size="md" />}
type="primary"
data-testid="add-panel"
prefix={<Plus size="md" />}
>
New Panel
</Button>

View File

@@ -10,7 +10,7 @@ import { useQueryClient } from 'react-query';
// eslint-disable-next-line no-restricted-imports
import { useSelector } from 'react-redux'; // old code, TODO: fix this correctly
import { Loader, RefreshCw, Search } from '@signozhq/icons';
import { Input, Spin } from 'antd';
import { Button, Input, Spin } from 'antd';
import cx from 'classnames';
import { ToggleGraphProps } from 'components/Graph/types';
import OverlayScrollbar from 'components/OverlayScrollbar/OverlayScrollbar';
@@ -61,7 +61,6 @@ import { GraphContainer, TimeContainer } from './styles';
import { FullViewProps } from './types';
import './WidgetFullView.styles.scss';
import { Button } from '@signozhq/ui/button';
function FullView({
widget,
@@ -303,7 +302,7 @@ function FullView({
{enableDrillDown && (
<div className="drildown-options-container">
{showResetQuery && (
<Button onClick={handleResetQuery} variant="link">
<Button type="link" onClick={handleResetQuery}>
Reset Query
</Button>
)}
@@ -318,8 +317,6 @@ function FullView({
});
}
}}
variant="outlined"
color="secondary"
>
Switch to Edit Mode
</Button>
@@ -353,8 +350,8 @@ function FullView({
onClick={(): void => {
response.refetch();
}}
size="icon"
prefix={<RefreshCw size="md" />}
type="primary"
icon={<RefreshCw size="md" />}
/>
</div>
</TimeContainer>

View File

@@ -6,8 +6,7 @@ import { useIsFetching } from 'react-query';
import { useDispatch } from 'react-redux';
import { useLocation } from 'react-router-dom';
import { Color } from '@signozhq/design-tokens';
import { Form, Input, Modal } from 'antd';
import { Button } from '@signozhq/ui/button';
import { Button, Form, Input, Modal } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import logEvent from 'api/common/logEvent';
import cx from 'classnames';
@@ -524,9 +523,9 @@ function GraphLayout(props: GraphLayoutProps): JSX.Element {
{isDashboardLocked && (
<div className="footer">
<Button
type="text"
icon={<LockKeyhole size={14} />}
className="locked-text"
variant="ghost"
prefix={<LockKeyhole size={14} />}
>
Locked
</Button>
@@ -561,21 +560,22 @@ function GraphLayout(props: GraphLayoutProps): JSX.Element {
<Form.Item>
<div className="action-btns">
<Button
type="primary"
htmlType="submit"
className="ok-btn"
icon={<Check size={14} />}
disabled={updateDashboardMutation.isLoading}
type="submit"
prefix={<Check size={14} />}
>
Apply Changes
</Button>
<Button
type="text"
className="cancel-btn"
icon={<X size={14} />}
onClick={(): void => {
setIsSettingsModalOpen(false);
setCurrentSelectRowId(null);
}}
variant="ghost"
prefix={<X size={14} />}
>
Cancel
</Button>

View File

@@ -1,6 +1,6 @@
import { useState } from 'react';
import { Layout } from 'react-grid-layout';
import { Popover } from 'antd';
import { Button, Popover } from 'antd';
import useComponentPermission from 'hooks/useComponentPermission';
import { Ellipsis, PenLine, Plus, X } from '@signozhq/icons';
import { useAppContext } from 'providers/App/App';
@@ -12,7 +12,6 @@ import {
} from 'providers/Dashboard/store/useDashboardStore';
import { ROLES, USER_ROLES } from 'types/roles';
import { ComponentTypes } from 'utils/permission';
import { Button } from '@signozhq/ui/button';
interface WidgetRowHeaderProps {
rowWidgetProperties: {
@@ -68,14 +67,14 @@ export function WidgetRowHeader(props: WidgetRowHeaderProps): JSX.Element {
<section className="section-1">
<Button
className="rename-btn"
type="text"
disabled={!editWidget}
icon={<PenLine size={14} />}
onClick={(): void => {
setIsSettingsModalOpen(true);
setCurrentSelectRowId(id);
setIsRowSettingsOpen(false);
}}
variant="ghost"
prefix={<PenLine size={14} />}
>
Rename
</Button>
@@ -83,7 +82,9 @@ export function WidgetRowHeader(props: WidgetRowHeaderProps): JSX.Element {
<section className="section-1">
<Button
className="new-panel-btn"
type="text"
disabled={!editWidget && addPanelPermission && !isDashboardLocked}
icon={<Plus size={14} />}
onClick={(): void => {
// TODO: @AshwinBhatkal Simplify this check in cleanup of https://github.com/SigNoz/engineering-pod/issues/3953
if (!dashboardData?.id) {
@@ -93,8 +94,6 @@ export function WidgetRowHeader(props: WidgetRowHeaderProps): JSX.Element {
setSelectedRowWidgetId(dashboardData.id, id);
setIsPanelTypeSelectionModalOpen(true);
}}
variant="ghost"
prefix={<Plus size={14} />}
>
New Panel
</Button>
@@ -103,14 +102,14 @@ export function WidgetRowHeader(props: WidgetRowHeaderProps): JSX.Element {
<section className="section-2">
<Button
className="remove-section"
type="text"
icon={<X size={14} />}
disabled={!deleteWidget}
onClick={(): void => {
setIsDeleteModalOpen(true);
setCurrentSelectRowId(id);
setIsRowSettingsOpen(false);
}}
variant="ghost"
prefix={<X size={14} />}
>
Remove Section
</Button>

View File

@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import { Link, useLocation } from 'react-router-dom';
import { Skeleton, Tag } from 'antd';
import { Button, Skeleton, Tag } from 'antd';
import logEvent from 'api/common/logEvent';
import { useListRules } from 'api/generated/services/rules';
import type { RuletypesRuleDTO } from 'api/generated/services/sigNoz.schemas';
@@ -17,7 +17,6 @@ import { USER_ROLES } from 'types/roles';
import beaconUrl from '@/assets/Icons/beacon.svg';
import { getItemIcon } from '../constants';
import { Button } from '@signozhq/ui/button';
export default function AlertRules({
onUpdateChecklistDoneItem,
@@ -90,18 +89,19 @@ export default function AlertRules({
<div className="empty-actions-container">
<Link to={ROUTES.ALERTS_NEW}>
<Button
type="default"
className="periscope-btn secondary"
icon={<Plus size={16} />}
onClick={(): void => {
logEvent('Homepage: Create alert rule clicked', {});
}}
variant="outlined"
color="secondary"
prefix={<Plus size={16} />}
>
Create Alert Rule
</Button>
</Link>
<Button
type="link"
className="learn-more-link"
onClick={(): void => {
logEvent('Homepage: Learn more clicked', {
@@ -114,7 +114,6 @@ export default function AlertRules({
'noreferrer noopener',
);
}}
variant="link"
>
Learn more <ArrowUpRight size={12} />
</Button>
@@ -228,11 +227,11 @@ export default function AlertRules({
<div className="alert-rules-footer home-data-card-footer">
<Link to={ROUTES.LIST_ALL_ALERT}>
<Button
className="learn-more-link"
type="link"
className="periscope-btn link learn-more-link"
onClick={(): void => {
logEvent('Homepage: All alert rules clicked', {});
}}
variant="link"
>
All Alert Rules <ArrowRight size={12} />
</Button>

View File

@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import { Link } from 'react-router-dom';
import { Skeleton, Tag } from 'antd';
import { Button, Skeleton, Tag } from 'antd';
import logEvent from 'api/common/logEvent';
import ROUTES from 'constants/routes';
import { useGetAllDashboard } from 'hooks/dashboard/useGetAllDashboard';
@@ -15,7 +15,6 @@ import { openInNewTab } from 'utils/navigation';
import dialsUrl from '@/assets/Icons/dials.svg';
import { getItemIcon } from '../constants';
import { Button } from '@signozhq/ui/button';
export default function Dashboards({
onUpdateChecklistDoneItem,
@@ -71,18 +70,19 @@ export default function Dashboards({
<div className="empty-actions-container">
<Link to={ROUTES.ALL_DASHBOARD}>
<Button
type="default"
className="periscope-btn secondary"
icon={<Plus size={16} />}
onClick={(): void => {
logEvent('Homepage: Create dashboard clicked', {});
}}
variant="outlined"
color="secondary"
prefix={<Plus size={16} />}
>
New Dashboard
</Button>
</Link>
<Button
type="link"
className="learn-more-link"
onClick={(): void => {
logEvent('Homepage: Learn more clicked', {
@@ -93,7 +93,6 @@ export default function Dashboards({
'_blank',
);
}}
variant="link"
>
Learn more <ArrowUpRight size={12} />
</Button>
@@ -199,11 +198,11 @@ export default function Dashboards({
<div className="dashboards-footer home-data-card-footer">
<Link to={ROUTES.ALL_DASHBOARD}>
<Button
className="learn-more-link"
type="link"
className="periscope-btn link learn-more-link"
onClick={(): void => {
logEvent('Homepage: All dashboards clicked', {});
}}
variant="link"
>
All Dashboards <ArrowRight size={12} />
</Button>

Some files were not shown because too many files have changed in this diff Show More