mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Enforce semicolons in eslint
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
1 parent
0f3f5611ba
commit
1477bb8274
531 files changed
+3979
-3975
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import "./add-role-dialog.scss"
|
||||
import "./add-role-dialog.scss";
|
||||
|
||||
import React from "react";
|
||||
import { observable } from "mobx";
|
||||
@@ -34,7 +34,7 @@ export class AddRoleDialog extends React.Component<Props> {
|
||||
}
|
||||
|
||||
reset = () => {
|
||||
this.roleName = ""
|
||||
this.roleName = "";
|
||||
}
|
||||
|
||||
createRole = async () => {
|
||||
@@ -74,6 +74,6 @@ export class AddRoleDialog extends React.Component<Props> {
|
||||
</WizardStep>
|
||||
</Wizard>
|
||||
</Dialog>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
export * from "./roles"
|
||||
export * from "./role-details"
|
||||
export * from "./add-role-dialog"
|
||||
export * from "./roles";
|
||||
export * from "./role-details";
|
||||
export * from "./add-role-dialog";
|
||||
@@ -1,4 +1,4 @@
|
||||
import "./role-details.scss"
|
||||
import "./role-details.scss";
|
||||
|
||||
import React from "react";
|
||||
import { Trans } from "@lingui/macro";
|
||||
@@ -57,10 +57,10 @@ export class RoleDetails extends React.Component<Props> {
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ kubeObjectDetailRegistry.add({
|
||||
components: {
|
||||
Details: (props) => <RoleDetails {...props}/>
|
||||
}
|
||||
})
|
||||
});
|
||||
kubeObjectDetailRegistry.add({
|
||||
kind: "Role",
|
||||
apiVersions: ["rbac.authorization.k8s.io/v1"],
|
||||
@@ -78,7 +78,7 @@ kubeObjectDetailRegistry.add({
|
||||
components: {
|
||||
Details: (props) => <KubeEventDetails {...props} />
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
kubeObjectDetailRegistry.add({
|
||||
kind: "ClusterRole",
|
||||
@@ -86,7 +86,7 @@ kubeObjectDetailRegistry.add({
|
||||
components: {
|
||||
Details: (props) => <RoleDetails {...props}/>
|
||||
}
|
||||
})
|
||||
});
|
||||
kubeObjectDetailRegistry.add({
|
||||
kind: "ClusterRole",
|
||||
apiVersions: ["rbac.authorization.k8s.io/v1"],
|
||||
@@ -94,4 +94,4 @@ kubeObjectDetailRegistry.add({
|
||||
components: {
|
||||
Details: (props) => <KubeEventDetails {...props}/>
|
||||
}
|
||||
})
|
||||
});
|
||||
@@ -8,37 +8,37 @@ export class RolesStore extends KubeObjectStore<Role> {
|
||||
api = clusterRoleApi
|
||||
|
||||
subscribe() {
|
||||
return super.subscribe([roleApi, clusterRoleApi])
|
||||
return super.subscribe([roleApi, clusterRoleApi]);
|
||||
}
|
||||
|
||||
protected sortItems(items: Role[]) {
|
||||
return super.sortItems(items, [
|
||||
role => role.kind,
|
||||
role => role.getName(),
|
||||
])
|
||||
]);
|
||||
}
|
||||
|
||||
protected loadItem(params: { name: string; namespace?: string }) {
|
||||
if (params.namespace) return roleApi.get(params)
|
||||
return clusterRoleApi.get(params)
|
||||
if (params.namespace) return roleApi.get(params);
|
||||
return clusterRoleApi.get(params);
|
||||
}
|
||||
|
||||
protected loadItems(namespaces?: string[]): Promise<Role[]> {
|
||||
if (namespaces) {
|
||||
return Promise.all(
|
||||
namespaces.map(namespace => roleApi.list({ namespace }))
|
||||
).then(items => items.flat())
|
||||
).then(items => items.flat());
|
||||
} else {
|
||||
return Promise.all([clusterRoleApi.list(), roleApi.list()])
|
||||
.then(items => items.flat())
|
||||
.then(items => items.flat());
|
||||
}
|
||||
}
|
||||
|
||||
protected async createItem(params: { name: string; namespace?: string }, data?: Partial<Role>) {
|
||||
if (params.namespace) {
|
||||
return roleApi.create(params, data)
|
||||
return roleApi.create(params, data);
|
||||
} else {
|
||||
return clusterRoleApi.create(params, data)
|
||||
return clusterRoleApi.create(params, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import "./roles.scss"
|
||||
import "./roles.scss";
|
||||
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
@@ -56,6 +56,6 @@ export class Roles extends React.Component<Props> {
|
||||
/>
|
||||
<AddRoleDialog/>
|
||||
</>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user