Repository navigation
mgr/dashboard: Add table actions component - #23779
Conversation
|
With that PR merged on my test system, I observed the following issue: (I initially thought this is a general problem with the RBD management, that's why I filed a bug about it - feel free to resolve it once you've fixed this in this PR) |
tspmelo
left a comment
There was a problem hiding this comment.
It would be nice to have the other buttons also included in the TableActionsComponent, but it can be added in another PR.
There was a problem hiding this comment.
Add action should not be disabled in the dropdown when a row is selected.
There was a problem hiding this comment.
This should be import { BehaviorSubject } from 'rxjs';
There was a problem hiding this comment.
Please move this line to the top import group
|
Missing updating this files:
|
fa7ac85 to
b3fbe3e
Compare
|
I've added the use in RBD snapshots, but it's still missing in users. I'm on vacation for one week after that I will add the missing part. |
b3fbe3e to
f9ced6c
Compare
|
Added usage of table component in users and roles. |
|
jenkins retest this please |
There was a problem hiding this comment.
I would like to see some documentation here. Especially i'm interested in a description of the routerLink attribute and why it is a function.
There was a problem hiding this comment.
I suggest to rename attribute call to callFn and use readableExpect(task: string, callFn: Function, expected: any) to prevent confusion with the JS call function.
There was a problem hiding this comment.
What are the types of call and expected?
There was a problem hiding this comment.
- s/call/callFn/
- Add types to attributes
f9ced6c to
19f70dc
Compare
|
Addressed all comments :) |
|
@tspmelo - could you please re-check this PR and update your review? |
With the help of this component it is easy to create all actions for a table with the right permission for each table action with a simple configuration. Per default action button and action drop down list are shown. All actions will be filtered depending on the permissions on initialization. Per default all actions that have the permission 'update' or 'delete' are only enabled if an item is selected which holds no running task. You can use change the default behavior, to show actions only in a named drop down. For each item you can change it's default behaviors by using custom functions to enable/disable an action or show/hide it as action button or drop down item. Please look at the tests to understand how to use it in practice. Signed-off-by: Stephan Müller <[email protected]>
Signed-off-by: Stephan Müller <[email protected]>
Signed-off-by: Stephan Müller <[email protected]>
Signed-off-by: Stephan Müller <[email protected]>
Signed-off-by: Stephan Müller <[email protected]>
Signed-off-by: Stephan Müller <[email protected]>
Typescript has thrown an warning because a private method is called in the RBD snapshot unit tests. Signed-off-by: Stephan Müller <[email protected]>
Signed-off-by: Stephan Müller <[email protected]>
Signed-off-by: Stephan Müller <[email protected]>
Signed-off-by: Stephan Müller <[email protected]>
19f70dc to
62b85cc
Compare
|
jenkins retest this please |
With the help of this component it is easy to create all actions for a
table with the right permission for each table action with a simple
configuration.
Per default action button and action drop down list are shown. All
actions will be filtered depending on the permissions on
initialization. Per default all actions that have the permission
'update' or 'delete' are only enabled if an item is selected which
holds no running task.
You can use change the default behavior, to show actions only in a
named drop down.
For each item you can change it's default behaviors by using custom
functions to enable/disable an action or show/hide it
as action button.
Please look at the tests to understand how to use it in practice.
Signed-off-by: Stephan Müller [email protected]