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
d1c59c36
Unverified
Commit
d1c59c36
authored
2 years ago
by
Henrique Guimarães Ribeiro
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Regression: Re-add view logs button (#25876)
parent
8e7135be
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/meteor/client/views/admin/apps/AppMenu.js
+30
-2
30 additions, 2 deletions
apps/meteor/client/views/admin/apps/AppMenu.js
with
30 additions
and
2 deletions
apps/meteor/client/views/admin/apps/AppMenu.js
+
30
−
2
View file @
d1c59c36
import
{
Box
,
Icon
,
Menu
}
from
'
@rocket.chat/fuselage
'
;
import
{
useSetModal
,
useMethod
,
useEndpoint
,
useTranslation
}
from
'
@rocket.chat/ui-contexts
'
;
import
{
useSetModal
,
useMethod
,
useEndpoint
,
useTranslation
,
useRoute
,
useRouteParameter
}
from
'
@rocket.chat/ui-contexts
'
;
import
React
,
{
useMemo
,
useCallback
}
from
'
react
'
;
import
CloudLoginModal
from
'
./CloudLoginModal
'
;
...
...
@@ -11,6 +11,8 @@ function AppMenu({ app, ...props }) {
const
t
=
useTranslation
();
const
setModal
=
useSetModal
();
const
checkUserLoggedIn
=
useMethod
(
'
cloud:checkUserLoggedIn
'
);
const
appsRoute
=
useRoute
(
'
admin-apps
'
);
const
context
=
useRouteParameter
(
'
context
'
);
const
setAppStatus
=
useEndpoint
(
'
POST
'
,
`/apps/
${
app
.
id
}
/status`
);
const
buildExternalUrl
=
useEndpoint
(
'
GET
'
,
'
/apps
'
);
...
...
@@ -64,6 +66,10 @@ function AppMenu({ app, ...props }) {
setModal
(
<
IframeModal
url
=
{
data
.
url
}
confirm
=
{
confirm
}
cancel
=
{
closeModal
}
/>
)
;
},
[
checkUserLoggedIn
,
setModal
,
closeModal
,
buildExternalUrl
,
app
.
id
,
app
.
purchaseType
,
syncApp
]);
const
handleViewLogs
=
useCallback
(()
=>
{
appsRoute
.
push
({
context
:
'
details
'
,
id
:
app
.
id
,
version
:
app
.
version
,
tab
:
'
logs
'
});
},
[
app
.
id
,
app
.
version
,
appsRoute
]);
const
handleDisable
=
useCallback
(()
=>
{
const
confirm
=
async
()
=>
{
closeModal
();
...
...
@@ -124,6 +130,17 @@ function AppMenu({ app, ...props }) {
action
:
handleSubscription
,
},
}),
...(
context
!==
'
details
'
&&
{
viewLogs
:
{
label
:
(
<
Box
>
<
Icon
name
=
'
list-alt
'
size
=
'
x16
'
marginInlineEnd
=
'
x4
'
/>
{
t
(
'
View_Logs
'
)}
<
/Box
>
),
action
:
handleViewLogs
,
},
}),
...(
app
.
installed
&&
isAppEnabled
&&
{
disable
:
{
...
...
@@ -160,7 +177,18 @@ function AppMenu({ app, ...props }) {
},
}),
}),
[
canAppBeSubscribed
,
t
,
handleSubscription
,
app
.
installed
,
isAppEnabled
,
handleDisable
,
handleEnable
,
handleUninstall
],
[
canAppBeSubscribed
,
t
,
handleSubscription
,
context
,
handleViewLogs
,
app
.
installed
,
isAppEnabled
,
handleDisable
,
handleEnable
,
handleUninstall
,
],
);
return
<
Menu
options
=
{
menuOptions
}
placement
=
'
bottom-start
'
{...
props
}
/>
;
...
...
This diff is collapsed.
Click to expand it.
Git Mirror User
@gitmirror
mentioned in commit
33aea75a
·
2 years ago
mentioned in commit
33aea75a
mentioned in commit 33aea75a82aef935c3402b94d82f6d073b78ea07
Toggle commit list
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