Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
catalog.genesys-pgr.org
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Genesys PGR
Genesys Catalog
catalog.genesys-pgr.org
Commits
1407a0a3
Commit
1407a0a3
authored
Oct 22, 2018
by
Matija Obreza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: Permissions button in Dashboard not working
parent
d39b8158
Pipeline
#7141
passed with stages
in 6 minutes and 22 seconds
Changes
6
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
3 deletions
+12
-3
src/datasets/ui/DashboardPage.tsx
src/datasets/ui/DashboardPage.tsx
+1
-0
src/descriptorlists/ui/DashboardPage.tsx
src/descriptorlists/ui/DashboardPage.tsx
+2
-0
src/descriptors/ui/DashboardPage.tsx
src/descriptors/ui/DashboardPage.tsx
+1
-0
src/ui/catalog/dashboard/MyDataPage.tsx
src/ui/catalog/dashboard/MyDataPage.tsx
+3
-1
src/ui/catalog/dashboard/c/DashboardTableRow.tsx
src/ui/catalog/dashboard/c/DashboardTableRow.tsx
+2
-2
src/ui/catalog/dashboard/c/MyDataTable.tsx
src/ui/catalog/dashboard/c/MyDataTable.tsx
+3
-0
No files found.
src/datasets/ui/DashboardPage.tsx
View file @
1407a0a3
...
...
@@ -29,6 +29,7 @@ class DashboardPage extends BaseMyDataPage<Dataset> {
const
mapStateToProps
=
(
state
,
ownProps
)
=>
({
paged
:
state
.
datasets
.
dashboard
.
paged
,
tab
:
'
datasets
'
,
dataClassName
:
Dataset
.
clazz
,
});
const
mapDispatchToProps
=
(
dispatch
)
=>
bindActionCreators
({
...
...
src/descriptorlists/ui/DashboardPage.tsx
View file @
1407a0a3
...
...
@@ -7,6 +7,7 @@ import BaseMyDataPage from 'ui/catalog/dashboard/MyDataPage';
import
{
listMyDescriptorLists
,
approveDescriptorList
,
deleteDescriptorList
,
unpublishDescriptorList
,
publishDescriptorList
}
from
'
descriptorlists/actions/dashboard
'
;
import
{
DescriptorListLink
}
from
'
ui/catalog/Links
'
;
import
{
PublishState
}
from
'
model/common.model
'
;
import
DescriptorList
from
'
model/catalog/DescriptorList
'
;
const
renderDataLink
=
({
row
,
children
})
=>
(<
DescriptorListLink
to
=
{
row
}
edit
=
{
row
.
state
===
PublishState
.
DRAFT
&&
row
.
_permissions
.
write
}
>
{
children
}
</
DescriptorListLink
>);
...
...
@@ -27,6 +28,7 @@ class DashboardPage extends BaseMyDataPage<any> {
const
mapStateToProps
=
(
state
,
ownProps
)
=>
({
paged
:
state
.
descriptorList
.
dashboard
.
paged
,
tab
:
'
descriptorlists
'
,
dataClassName
:
DescriptorList
.
clazz
,
});
const
mapDispatchToProps
=
(
dispatch
)
=>
bindActionCreators
({
...
...
src/descriptors/ui/DashboardPage.tsx
View file @
1407a0a3
...
...
@@ -30,6 +30,7 @@ class DashboardPage extends BaseMyDataPage<Descriptor> {
const
mapStateToProps
=
(
state
,
ownProps
)
=>
({
paged
:
state
.
descriptors
.
dashboard
.
paged
,
tab
:
'
descriptors
'
,
dataClassName
:
Descriptor
.
clazz
,
filterComponent
:
DashboardDescriptorFilters
,
});
...
...
src/ui/catalog/dashboard/MyDataPage.tsx
View file @
1407a0a3
...
...
@@ -28,6 +28,7 @@ interface IDataPublishedContainerProps extends React.ClassAttributes<any> {
basePath
:
string
;
filterCodeToUrl
:
any
;
listData
:
any
;
dataClassName
:
string
;
renderDataLink
:
any
;
setPageTitle
:
(
title
:
string
)
=>
void
;
addToEditList
:
(
item
:
any
)
=>
void
;
...
...
@@ -138,7 +139,7 @@ class BaseMyDataPage<T> extends React.Component<T & IDataPublishedContainerProps
}
public
render
()
{
const
{
tab
,
filterComponent
,
basePath
,
pagination
,
addToEditList
,
removeFromEditList
,
isEditMode
,
setEditMode
,
editList
,
paged
,
renderDataLink
}
=
this
.
props
;
const
{
tab
,
filterComponent
,
basePath
,
pagination
,
addToEditList
,
removeFromEditList
,
isEditMode
,
setEditMode
,
editList
,
paged
,
dataClassName
,
renderDataLink
}
=
this
.
props
;
const
actionHandlers
=
this
.
getActionHandlers
();
return
(
...
...
@@ -149,6 +150,7 @@ class BaseMyDataPage<T> extends React.Component<T & IDataPublishedContainerProps
filterComponent
=
{
filterComponent
}
basePath
=
{
basePath
}
onFilter
=
{
this
.
onFilter
}
dataClassName
=
{
dataClassName
}
renderDataLink
=
{
renderDataLink
}
paged
=
{
paged
}
onPaginationChange
=
{
this
.
onPaginationChange
}
...
...
src/ui/catalog/dashboard/c/DashboardTableRow.tsx
View file @
1407a0a3
...
...
@@ -49,7 +49,7 @@ export class DashboardTableRow extends React.Component<any> {
}
public
render
()
{
const
{
row
,
tab
,
index
,
isEditMode
,
DataLink
}
=
this
.
props
;
const
{
row
,
tab
,
index
,
isEditMode
,
DataLink
,
dataClassName
}
=
this
.
props
;
const
{
inEditList
}
=
this
.
state
;
return
(
...
...
@@ -78,7 +78,7 @@ export class DashboardTableRow extends React.Component<any> {
<
Button
variant
=
"raised"
>
{
row
.
state
===
PublishState
.
DRAFT
&&
row
.
_permissions
.
write
?
'
EDIT
'
:
'
VIEW
'
}
</
Button
>
</
DataLink
>
{
row
.
_permissions
.
manage
&&
<
Permissions
clazz
=
{
row
.
clazz
}
id
=
{
row
.
id
}
/>
<
Permissions
clazz
=
{
dataClassName
}
id
=
{
row
.
id
}
/>
}
</
TableCell
>
</
TableRow
>
...
...
src/ui/catalog/dashboard/c/MyDataTable.tsx
View file @
1407a0a3
...
...
@@ -36,6 +36,7 @@ interface IMyDataTableProps extends React.Props<any> {
onPaginationChange
:
(
page
:
number
,
results
:
number
,
sortBy
:
string
,
dir
?:
string
)
=>
void
;
pageSort
?:
string
;
onFilter
:
(
filter
)
=>
void
;
dataClassName
:
string
;
renderDataLink
:
any
;
pagination
:
any
;
promiseListData
:
any
;
...
...
@@ -67,6 +68,7 @@ function MyDataTable({
onPaginationChange
,
onFilter
,
pagination
,
dataClassName
,
renderDataLink
,
promiseListData
,
deleteAllAction
,
...
...
@@ -99,6 +101,7 @@ function MyDataTable({
inEditList
=
{
_
.
includes
(
editList
,
row
.
uuid
)
}
addToEditAction
=
{
addToEditList
}
removeFromEditAction
=
{
removeFromEditList
}
dataClassName
=
{
dataClassName
}
DataLink
=
{
renderDataLink
}
/>
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment