Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
aff37219
Unverified
Commit
aff37219
authored
2 years ago
by
gabriellsh
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Regression: Instances Modal breaking (#26779)
parent
23b252cd
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/meteor/client/views/admin/info/InformationRoute.tsx
+5
-5
5 additions, 5 deletions
apps/meteor/client/views/admin/info/InformationRoute.tsx
yarn.lock
+9
-2
9 additions, 2 deletions
yarn.lock
with
14 additions
and
7 deletions
apps/meteor/client/views/admin/info/InformationRoute.tsx
+
5
−
5
View file @
aff37219
import
type
{
IInstanceStatus
,
IStats
}
from
'
@rocket.chat/core-typings
'
;
import
{
Callout
,
ButtonGroup
,
Button
,
Icon
}
from
'
@rocket.chat/fuselage
'
;
import
{
usePermission
,
useServerInformation
,
useEndpoint
,
useTranslation
}
from
'
@rocket.chat/ui-contexts
'
;
import
{
usePermission
,
useServerInformation
,
useEndpoint
,
useTranslation
,
useMethod
}
from
'
@rocket.chat/ui-contexts
'
;
import
React
,
{
useState
,
useEffect
,
memo
,
ReactElement
}
from
'
react
'
;
import
Page
from
'
../../../components/Page
'
;
...
...
@@ -18,10 +18,10 @@ const InformationRoute = (): ReactElement => {
const
[
isLoading
,
setLoading
]
=
useState
(
true
);
const
[
error
,
setError
]
=
useState
(
false
);
const
[
statistics
,
setStatistics
]
=
useState
<
IStats
>
();
const
[
instances
,
setInstances
]
=
useState
<
IInstanceStatus
[]
>
();
const
[
instances
,
setInstances
]
=
useState
<
IInstanceStatus
[]
>
(
[]
);
const
[
fetchStatistics
,
setFetchStatistics
]
=
useState
<
fetchStatisticsCallback
>
(()
=>
():
void
=>
undefined
);
const
getStatistics
=
useEndpoint
(
'
GET
'
,
'
/v1/statistics
'
);
const
getInstances
=
use
Endpoint
(
'
GET
'
,
'
/v1/
instances
.
get
'
);
const
getInstances
=
use
Method
(
'
instances
/
get
'
);
useEffect
(()
=>
{
let
didCancel
=
false
;
...
...
@@ -31,7 +31,7 @@ const InformationRoute = (): ReactElement => {
setError
(
false
);
try
{
const
[
statistics
,
{
instances
}
]
=
await
Promise
.
all
([
getStatistics
({
refresh
:
refresh
?
'
true
'
:
'
false
'
}),
getInstances
()]);
const
[
statistics
,
instances
]
=
await
Promise
.
all
([
getStatistics
({
refresh
:
refresh
?
'
true
'
:
'
false
'
}),
getInstances
()]);
if
(
didCancel
)
{
return
;
...
...
@@ -98,7 +98,7 @@ const InformationRoute = (): ReactElement => {
canViewStatistics
=
{
canViewStatistics
}
info
=
{
info
}
statistics
=
{
statistics
}
instances
=
{
instances
||
[]
}
instances
=
{
instances
}
onClickRefreshButton
=
{
handleClickRefreshButton
}
onClickDownloadInfo
=
{
handleClickDownloadInfo
}
/>
...
...
This diff is collapsed.
Click to expand it.
yarn.lock
+
9
−
2
View file @
aff37219
...
...
@@ -3710,7 +3710,7 @@ __metadata:
"@rocket.chat/fuselage-tokens": 0.31.18
"@rocket.chat/logo": 0.31.18
"@rocket.chat/sdk": ^1.0.0-alpha.42
"@rocket.chat/ui-kit": 0.
3
1.1
8
"@rocket.chat/ui-kit":
^
0.1
4
.1
"@storybook/addon-actions": ~6.5.10
"@storybook/addon-backgrounds": ~6.5.10
"@storybook/addon-essentials": ~6.5.10
...
...
@@ -4360,6 +4360,13 @@ __metadata:
languageName: node
linkType: hard
"@rocket.chat/ui-kit@npm:^0.14.1":
version: 0.14.1
resolution: "@rocket.chat/ui-kit@npm:0.14.1"
checksum: c9da95fbb079b2bbd39d746552083f0a67171347f303a3f27cad875f0eedf8d121d372fd0671c2ba9b2cd93b727fec10b01fe906cd71057a98872338c58f48bb
languageName: node
linkType: hard
"@rocket.chat/ui-video-conf@workspace:^, @rocket.chat/ui-video-conf@workspace:packages/ui-video-conf":
version: 0.0.0-use.local
resolution: "@rocket.chat/ui-video-conf@workspace:packages/ui-video-conf"
...
...
@@ -20294,7 +20301,7 @@ __metadata:
optional: true
bin:
lessc: ./bin/lessc
checksum:
61568b56b5289fdcfe3d51baf3c13e7db7140022c0a37ef0ae343169f0de927a4b4f4272bc10c20101796e8ee79e934e024051321bba93b3ae071f734309bd98
checksum:
c9b8c0e865427112c48a9cac36f14964e130577743c29d56a6d93b5812b70846b04ccaa364acf1e8d75cee3855215ec0a2d8d9de569c80e774f10b6245f39b7d
languageName: node
linkType: hard
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment