mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
dynamic dashboard ui based on rbac rules
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
1 parent
50dfd4fa63
commit
b87e750610
16 files changed
+193
-90
No files matched your search
@@ -13,6 +13,7 @@ import { nodesStore } from "../+nodes/nodes.store";
|
||||
import { podsStore } from "../+workloads-pods/pods.store";
|
||||
import { clusterStore } from "./cluster.store";
|
||||
import { eventStore } from "../+events/event.store";
|
||||
import { isAllowedResource } from "../../api/rbac";
|
||||
|
||||
@observer
|
||||
export class Cluster extends React.Component {
|
||||
@@ -25,6 +26,9 @@ export class Cluster extends React.Component {
|
||||
|
||||
async componentDidMount() {
|
||||
const { dependentStores } = this;
|
||||
if (!isAllowedResource("nodes")) {
|
||||
dependentStores.splice(dependentStores.indexOf(nodesStore), 1)
|
||||
}
|
||||
this.watchers.forEach(watcher => watcher.start(true));
|
||||
|
||||
await Promise.all([
|
||||
|
||||
Reference in new issue
Block a user