Lint code.
This commit is contained in:
parent
0273793569
commit
7180edf2a3
|
@ -1,4 +1,11 @@
|
||||||
|
// So that we dont get `PageType not found in 'z-pagerouter' import/named`
|
||||||
|
/* eslint-disable */
|
||||||
|
import { PageType } from "z-pagerouter";
|
||||||
|
/* eslint-enable */
|
||||||
|
|
||||||
import { AccessHomePage } from "./pages/Access/AccessHome";
|
import { AccessHomePage } from "./pages/Access/AccessHome";
|
||||||
|
import { AuthHomePage } from "./pages/Access/Auth/AuthHome";
|
||||||
|
import { AuthViewConfigPage } from "./pages/Access/Auth/AuthViewConfig";
|
||||||
import { HomePage } from "./pages/Home";
|
import { HomePage } from "./pages/Home";
|
||||||
import { KeyValueDeletePage } from "./pages/Secrets/KeyValue/KeyValueDelete";
|
import { KeyValueDeletePage } from "./pages/Secrets/KeyValue/KeyValueDelete";
|
||||||
import { KeyValueNewPage } from "./pages/Secrets/KeyValue/KeyValueNew";
|
import { KeyValueNewPage } from "./pages/Secrets/KeyValue/KeyValueNew";
|
||||||
|
@ -26,14 +33,8 @@ import { TransitRewrapPage } from "./pages/Secrets/Transit/TransitRewrap";
|
||||||
import { TransitViewPage } from "./pages/Secrets/Transit/TransitView";
|
import { TransitViewPage } from "./pages/Secrets/Transit/TransitView";
|
||||||
import { TransitViewSecretPage } from "./pages/Secrets/Transit/TransitViewSecret";
|
import { TransitViewSecretPage } from "./pages/Secrets/Transit/TransitViewSecret";
|
||||||
import { UnsealPage } from "./pages/Unseal";
|
import { UnsealPage } from "./pages/Unseal";
|
||||||
import { getObjectKeys } from "./utils";
|
|
||||||
|
|
||||||
/* eslint-disable */
|
|
||||||
import { AuthHomePage } from "./pages/Access/Auth/AuthHome";
|
|
||||||
import { AuthViewConfigPage } from "./pages/Access/Auth/AuthViewConfig";
|
|
||||||
import { PageType } from "z-pagerouter";
|
|
||||||
import { UserPassUsersListPage } from "./pages/Access/Auth/userpass/UserPassUsersList";
|
import { UserPassUsersListPage } from "./pages/Access/Auth/userpass/UserPassUsersList";
|
||||||
/* eslint-enable */
|
import { getObjectKeys } from "./utils";
|
||||||
|
|
||||||
type pagesList = {
|
type pagesList = {
|
||||||
[key: string]: Page;
|
[key: string]: Page;
|
||||||
|
|
|
@ -56,10 +56,7 @@ export class KeyValueSecretPage extends Page {
|
||||||
let deleteButtonText = i18next.t("kv_secret_delete_btn");
|
let deleteButtonText = i18next.t("kv_secret_delete_btn");
|
||||||
if (this.state.secretMountType == "kv-v2" && this.state.secretVersion == null) {
|
if (this.state.secretMountType == "kv-v2" && this.state.secretVersion == null) {
|
||||||
deleteButtonText = i18next.t("kv_secret_delete_all_btn");
|
deleteButtonText = i18next.t("kv_secret_delete_all_btn");
|
||||||
} else if (
|
} else if (this.state.secretMountType == "kv-v2" && this.state.secretVersion != null) {
|
||||||
this.state.secretMountType == "kv-v2" &&
|
|
||||||
this.state.secretVersion != null
|
|
||||||
) {
|
|
||||||
deleteButtonText = i18next.t("kv_secret_delete_version_btn", {
|
deleteButtonText = i18next.t("kv_secret_delete_version_btn", {
|
||||||
version: this.state.secretVersion,
|
version: this.state.secretVersion,
|
||||||
});
|
});
|
||||||
|
|
|
@ -55,7 +55,8 @@ export class SecretsHomePage extends Page {
|
||||||
if (!("type" in mount)) return;
|
if (!("type" in mount)) return;
|
||||||
if (!["kv", "totp", "transit", "cubbyhole"].includes(mount.type)) return;
|
if (!["kv", "totp", "transit", "cubbyhole"].includes(mount.type)) return;
|
||||||
|
|
||||||
const secretMountType = mount.type == "kv" ? "kv-v" + String(mount.options.version) : mount.type;
|
const secretMountType =
|
||||||
|
mount.type == "kv" ? "kv-v" + String(mount.options.version) : mount.type;
|
||||||
|
|
||||||
let linkText = "";
|
let linkText = "";
|
||||||
let linkPage: string;
|
let linkPage: string;
|
||||||
|
|
Loading…
Reference in a new issue