refactor: Remove useless func getUrl

Remove useless func getUrl

Change-Id: I12989c6efcfc4ba7fb4cd292860be9059b74497b
This commit is contained in:
Jingwei.Zhang 2021-11-18 09:13:18 +08:00
parent dc0fa2104f
commit 86fd689e78
11 changed files with 0 additions and 44 deletions

View File

@ -134,10 +134,6 @@ export default class BaseForm extends React.Component {
return this.props.rootStore.projectName; return this.props.rootStore.projectName;
} }
getUrl(path, adminStr) {
return this.isAdminPage ? `${path}${adminStr || '-admin'}` : path;
}
getRouteName(routeName) { getRouteName(routeName) {
return this.isAdminPage ? `${routeName}Admin` : routeName; return this.isAdminPage ? `${routeName}Admin` : routeName;
} }

View File

@ -209,10 +209,6 @@ export default class BaseStepForm extends React.Component {
this.formRefs = this.steps.map(() => React.createRef()); this.formRefs = this.steps.map(() => React.createRef());
} }
getUrl(path, adminStr) {
return this.isAdminPage ? `${path}${adminStr || '-admin'}` : path;
}
getRouteName(routeName) { getRouteName(routeName) {
return this.isAdminPage ? `${routeName}Admin` : routeName; return this.isAdminPage ? `${routeName}Admin` : routeName;
} }

View File

@ -18,10 +18,6 @@ import { getSelfColumns } from 'resources/security-group-rule';
import { getPath } from 'utils/route-map'; import { getPath } from 'utils/route-map';
export default class RuleButton extends Component { export default class RuleButton extends Component {
getUrl(path, adminStr) {
return this.isAdminPage ? `${path}${adminStr || '-admin'}` : path;
}
getDetailUrl(id) { getDetailUrl(id) {
const key = this.isAdminPage const key = this.isAdminPage
? 'securityGroupDetailAdmin' ? 'securityGroupDetailAdmin'

View File

@ -34,10 +34,6 @@ export default class FormAction extends BaseForm {
return this.props.isAdminPage || false; return this.props.isAdminPage || false;
} }
getUrl(path, adminStr) {
return this.isAdminPage ? `${path}${adminStr || '-admin'}` : path;
}
getRouteName(routeName) { getRouteName(routeName) {
return this.isAdminPage ? `${routeName}Admin` : routeName; return this.isAdminPage ? `${routeName}Admin` : routeName;
} }

View File

@ -83,10 +83,6 @@ export default class BaseDetail extends React.Component {
return false; return false;
} }
getUrl(path, adminStr) {
return this.isAdminPage ? `${path}${adminStr || '-admin'}` : path;
}
getRouteName(routeName) { getRouteName(routeName) {
return this.isAdminPage ? `${routeName}Admin` : routeName; return this.isAdminPage ? `${routeName}Admin` : routeName;
} }

View File

@ -166,10 +166,6 @@ export default class BaseList extends React.Component {
return this.props.rootStore.hasAdminRole; return this.props.rootStore.hasAdminRole;
} }
getUrl(path, adminStr) {
return this.isAdminPage ? `${path}${adminStr || '-admin'}` : path;
}
getRouteName(routeName) { getRouteName(routeName) {
return this.isAdminPage ? `${routeName}Admin` : routeName; return this.isAdminPage ? `${routeName}Admin` : routeName;
} }

View File

@ -68,10 +68,6 @@ export default class DetailBase extends React.Component {
return isAdminPage(pathname); return isAdminPage(pathname);
} }
getUrl(path, adminStr) {
return this.isAdminPage ? `${path}${adminStr || '-admin'}` : path;
}
getRouteName(routeName) { getRouteName(routeName) {
return this.isAdminPage ? `${routeName}Admin` : routeName; return this.isAdminPage ? `${routeName}Admin` : routeName;
} }

View File

@ -64,10 +64,6 @@ export default class TabList extends Component {
return this.checkEndpoint && !this.endpoint; return this.checkEndpoint && !this.endpoint;
} }
getUrl(path, adminStr) {
return this.isAdminPage ? `${path}${adminStr || '-admin'}` : path;
}
getRouteName(routeName) { getRouteName(routeName) {
return this.isAdminPage ? `${routeName}Admin` : routeName; return this.isAdminPage ? `${routeName}Admin` : routeName;
} }

View File

@ -44,10 +44,6 @@ export class LayoutMenu extends Component {
return this.props.isAdminPage || false; return this.props.isAdminPage || false;
} }
getUrl(path, adminStr) {
return this.isAdminPage ? `${path}${adminStr || '-admin'}` : path;
}
getRouteName(routeName) { getRouteName(routeName) {
return this.isAdminPage ? `${routeName}Admin` : routeName; return this.isAdminPage ? `${routeName}Admin` : routeName;
} }

View File

@ -56,10 +56,6 @@ class Right extends Component {
return this.props.isAdminPage || false; return this.props.isAdminPage || false;
} }
getUrl(path, adminStr) {
return this.isAdminPage ? `${path}${adminStr || '-admin'}` : path;
}
getRouteName(routeName) { getRouteName(routeName) {
return this.isAdminPage ? `${routeName}Admin` : routeName; return this.isAdminPage ? `${routeName}Admin` : routeName;
} }

View File

@ -97,10 +97,6 @@ export class BaseLayout extends Component {
return this.getMenuByLicense(this.originMenu); return this.getMenuByLicense(this.originMenu);
} }
getUrl(path, adminStr) {
return this.isAdminPage ? `${path}${adminStr || '-admin'}` : path;
}
getRouteName(routeName) { getRouteName(routeName) {
return this.isAdminPage ? `${routeName}Admin` : routeName; return this.isAdminPage ? `${routeName}Admin` : routeName;
} }