mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Upgrade to latest for all linting deps (#4755)
* Upgrade to eslint latest Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix OOM error Signed-off-by: Sebastian Malton <sebastian@malton.name> * resolve PR comments Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
2ad78c2a86
commit
38790eb886
35 files changed
+284
-470
No files matched your search
@@ -115,8 +115,7 @@ export class ClusterRoleBindingDialog extends React.Component<Props> {
|
||||
return this.serviceAccountOptions.filter(({ value }) => this.selectedAccounts.has(value));
|
||||
}
|
||||
|
||||
@action
|
||||
onOpen = () => {
|
||||
onOpen = action(() => {
|
||||
const binding = this.clusterRoleBinding;
|
||||
|
||||
if (!binding) {
|
||||
@@ -137,16 +136,15 @@ export class ClusterRoleBindingDialog extends React.Component<Props> {
|
||||
);
|
||||
this.selectedUsers.replace(uSubjects.map(user => user.name));
|
||||
this.selectedGroups.replace(gSubjects.map(group => group.name));
|
||||
};
|
||||
});
|
||||
|
||||
@action
|
||||
reset = () => {
|
||||
reset = action(() => {
|
||||
this.selectedRoleRef = undefined;
|
||||
this.bindingName = "";
|
||||
this.selectedAccounts.clear();
|
||||
this.selectedUsers.clear();
|
||||
this.selectedGroups.clear();
|
||||
};
|
||||
});
|
||||
|
||||
createBindings = async () => {
|
||||
const { selectedRoleRef, selectedBindings, bindingName } = this;
|
||||
|
||||
@@ -116,8 +116,7 @@ export class RoleBindingDialog extends React.Component<Props> {
|
||||
return this.serviceAccountOptions.filter(({ value }) => this.selectedAccounts.has(value));
|
||||
}
|
||||
|
||||
@action
|
||||
onOpen = () => {
|
||||
onOpen = action(() => {
|
||||
const binding = this.roleBinding;
|
||||
|
||||
if (!binding) {
|
||||
@@ -140,17 +139,16 @@ export class RoleBindingDialog extends React.Component<Props> {
|
||||
);
|
||||
this.selectedUsers.replace(uSubjects.map(user => user.name));
|
||||
this.selectedGroups.replace(gSubjects.map(group => group.name));
|
||||
};
|
||||
});
|
||||
|
||||
@action
|
||||
reset = () => {
|
||||
reset = action(() => {
|
||||
this.selectedRoleRef = undefined;
|
||||
this.bindingName = "";
|
||||
this.bindingNamespace = "";
|
||||
this.selectedAccounts.clear();
|
||||
this.selectedUsers.clear();
|
||||
this.selectedGroups.clear();
|
||||
};
|
||||
});
|
||||
|
||||
createBindings = async () => {
|
||||
const { selectedRoleRef, bindingNamespace: namespace, selectedBindings } = this;
|
||||
|
||||
@@ -28,27 +28,30 @@ export class ServiceAccountsDetails extends React.Component<Props> {
|
||||
@observable secrets: Secret[];
|
||||
@observable imagePullSecrets: Secret[];
|
||||
|
||||
@disposeOnUnmount
|
||||
loadSecrets = autorun(async () => {
|
||||
this.secrets = null;
|
||||
this.imagePullSecrets = null;
|
||||
const { object: serviceAccount } = this.props;
|
||||
componentDidMount(): void {
|
||||
disposeOnUnmount(this, [
|
||||
autorun(async () => {
|
||||
this.secrets = null;
|
||||
this.imagePullSecrets = null;
|
||||
const { object: serviceAccount } = this.props;
|
||||
|
||||
if (!serviceAccount) {
|
||||
return;
|
||||
}
|
||||
const namespace = serviceAccount.getNs();
|
||||
const secrets = serviceAccount.getSecrets().map(({ name }) => {
|
||||
return secretsStore.load({ name, namespace });
|
||||
});
|
||||
if (!serviceAccount) {
|
||||
return;
|
||||
}
|
||||
const namespace = serviceAccount.getNs();
|
||||
const secrets = serviceAccount.getSecrets().map(({ name }) => {
|
||||
return secretsStore.load({ name, namespace });
|
||||
});
|
||||
|
||||
this.secrets = await Promise.all(secrets);
|
||||
const imagePullSecrets = serviceAccount.getImagePullSecrets().map(async ({ name }) => {
|
||||
return secretsStore.load({ name, namespace }).catch(() => this.generateDummySecretObject(name));
|
||||
});
|
||||
this.secrets = await Promise.all(secrets);
|
||||
const imagePullSecrets = serviceAccount.getImagePullSecrets().map(async ({ name }) => {
|
||||
return secretsStore.load({ name, namespace }).catch(() => this.generateDummySecretObject(name));
|
||||
});
|
||||
|
||||
this.imagePullSecrets = await Promise.all(imagePullSecrets);
|
||||
});
|
||||
this.imagePullSecrets = await Promise.all(imagePullSecrets);
|
||||
}),
|
||||
]);
|
||||
}
|
||||
|
||||
constructor(props: Props) {
|
||||
super(props);
|
||||
|
||||
Reference in new issue
Block a user