feat: Update import && export
1. Update import with @ to relative path 2. Update decorator export Change-Id: Ib199a7c5eb54e1f30377af0349bca5959a1e54cc
This commit is contained in:
parent
3ba3223cf9
commit
73e352c4d5
@ -32,7 +32,8 @@
|
|||||||
["layouts", "./src/layouts"],
|
["layouts", "./src/layouts"],
|
||||||
["client", "./src/client"],
|
["client", "./src/client"],
|
||||||
["resources", "./src/resources"],
|
["resources", "./src/resources"],
|
||||||
["core", "./src/core"]
|
["core", "./src/core"],
|
||||||
|
["asset", "./src/asset"]
|
||||||
],
|
],
|
||||||
"extensions": [".js", ".jsx"]
|
"extensions": [".js", ".jsx"]
|
||||||
}
|
}
|
||||||
@ -68,6 +69,7 @@
|
|||||||
"import/no-extraneous-dependencies": "warn",
|
"import/no-extraneous-dependencies": "warn",
|
||||||
"import/prefer-default-export": "warn",
|
"import/prefer-default-export": "warn",
|
||||||
"no-nested-ternary": "warn",
|
"no-nested-ternary": "warn",
|
||||||
|
"import/no-named-as-default": "warn"
|
||||||
},
|
},
|
||||||
"globals": {
|
"globals": {
|
||||||
"t": true,
|
"t": true,
|
||||||
|
@ -30,6 +30,10 @@ export class HttpRequest {
|
|||||||
this.request = {};
|
this.request = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gotoLoginPage(path) {
|
||||||
|
globalRootStore.gotoLoginPage(path);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param instance instance of axios
|
* @param instance instance of axios
|
||||||
* @param url request url
|
* @param url request url
|
||||||
@ -93,7 +97,7 @@ export class HttpRequest {
|
|||||||
if (status === 401) {
|
if (status === 401) {
|
||||||
const currentPath = window.location.pathname;
|
const currentPath = window.location.pathname;
|
||||||
if (currentPath.indexOf('login') < 0) {
|
if (currentPath.indexOf('login') < 0) {
|
||||||
globalRootStore.gotoLoginPage(currentPath);
|
this.gotoLoginPage(currentPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import emptyCard from '@/asset/image/empty-card.svg';
|
import emptyCard from 'asset/image/empty-card.svg';
|
||||||
import { firstUpperCase } from 'utils/index';
|
import { firstUpperCase } from 'utils/index';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import styles from './index.less';
|
import styles from './index.less';
|
||||||
|
@ -25,7 +25,7 @@ import CodeEditor from 'components/CodeEditor';
|
|||||||
import ModalButton from 'components/ModalButton';
|
import ModalButton from 'components/ModalButton';
|
||||||
import globalRootStore from 'stores/root';
|
import globalRootStore from 'stores/root';
|
||||||
import { unescapeHtml } from 'utils/index';
|
import { unescapeHtml } from 'utils/index';
|
||||||
import { statusMap } from '@/resources/code';
|
import { statusMap } from 'resources/code';
|
||||||
import { isEmpty, isString } from 'lodash';
|
import { isEmpty, isString } from 'lodash';
|
||||||
import styles from './index.less';
|
import styles from './index.less';
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import BlankLayout from '@/layouts/Blank';
|
import BlankLayout from 'layouts/Blank';
|
||||||
import E404 from 'pages/base/containers/404';
|
import E404 from 'pages/base/containers/404';
|
||||||
import { lazy } from 'react';
|
import { lazy } from 'react';
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import AuthLayout from '@/layouts/Auth';
|
import AuthLayout from 'layouts/Auth';
|
||||||
import Login from '../containers/Login';
|
import Login from '../containers/Login';
|
||||||
import ChangePassword from '../containers/ChangePassword';
|
import ChangePassword from '../containers/ChangePassword';
|
||||||
|
|
||||||
|
@ -48,8 +48,6 @@ const actions = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@inject('rootStore')
|
|
||||||
@observer
|
|
||||||
class ProjectInfo extends Component {
|
class ProjectInfo extends Component {
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.props.store.getProjectInfoData();
|
this.props.store.getProjectInfoData();
|
||||||
@ -101,4 +99,4 @@ ProjectInfo.propTypes = {
|
|||||||
store: PropTypes.object.isRequired,
|
store: PropTypes.object.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ProjectInfo;
|
export default inject('rootStore')(observer(ProjectInfo));
|
||||||
|
@ -81,8 +81,6 @@ const volumeColors = {
|
|||||||
other: { color: '#F6B23D', text: t('Others') },
|
other: { color: '#F6B23D', text: t('Others') },
|
||||||
};
|
};
|
||||||
|
|
||||||
@inject('rootStore')
|
|
||||||
@observer
|
|
||||||
class virtualResourceInfo extends Component {
|
class virtualResourceInfo extends Component {
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.props.store.getVirtualResource();
|
this.props.store.getVirtualResource();
|
||||||
@ -199,4 +197,4 @@ virtualResourceInfo.propTypes = {
|
|||||||
store: PropTypes.object.isRequired,
|
store: PropTypes.object.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default virtualResourceInfo;
|
export default inject('rootStore')(observer(virtualResourceInfo));
|
||||||
|
@ -36,8 +36,7 @@ export const color = {
|
|||||||
warnColor: '#FE9901',
|
warnColor: '#FE9901',
|
||||||
dangerColor: '#D93126',
|
dangerColor: '#D93126',
|
||||||
};
|
};
|
||||||
@inject('rootStore')
|
|
||||||
@observer
|
|
||||||
class ResourceCircle extends Component {
|
class ResourceCircle extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
@ -129,4 +128,4 @@ class ResourceCircle extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ResourceCircle;
|
export default inject('rootStore')(observer(ResourceCircle));
|
||||||
|
@ -18,8 +18,6 @@ import { inject, observer } from 'mobx-react';
|
|||||||
import { UpOutlined, DownOutlined } from '@ant-design/icons';
|
import { UpOutlined, DownOutlined } from '@ant-design/icons';
|
||||||
import styles from '../style.less';
|
import styles from '../style.less';
|
||||||
|
|
||||||
@inject('rootStore')
|
|
||||||
@observer
|
|
||||||
class ProjectInfo extends Component {
|
class ProjectInfo extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
@ -87,4 +85,4 @@ class ProjectInfo extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ProjectInfo;
|
export default inject('rootStore')(observer(ProjectInfo));
|
||||||
|
@ -27,8 +27,6 @@ const colors = {
|
|||||||
full: { color: '#E8684A', text: t('Full') },
|
full: { color: '#E8684A', text: t('Full') },
|
||||||
};
|
};
|
||||||
|
|
||||||
@inject('rootStore')
|
|
||||||
@observer
|
|
||||||
class QuotaOverview extends Component {
|
class QuotaOverview extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
@ -272,4 +270,4 @@ class QuotaOverview extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default QuotaOverview;
|
export default inject('rootStore')(observer(QuotaOverview));
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import BaseLayout from '@/layouts/Basic';
|
import BaseLayout from 'layouts/Basic';
|
||||||
import E404 from '../containers/404';
|
import E404 from '../containers/404';
|
||||||
import Overview from '../containers/Overview';
|
import Overview from '../containers/Overview';
|
||||||
import AdminOverview from '../containers/AdminOverview';
|
import AdminOverview from '../containers/AdminOverview';
|
||||||
|
@ -25,9 +25,7 @@ import {
|
|||||||
import { getOptions } from 'utils/index';
|
import { getOptions } from 'utils/index';
|
||||||
import actionConfigs from './actions';
|
import actionConfigs from './actions';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class Flavor extends Base {
|
||||||
@observer
|
|
||||||
export default class Flavor extends Base {
|
|
||||||
init() {
|
init() {
|
||||||
this.store = new FlavorStore();
|
this.store = new FlavorStore();
|
||||||
}
|
}
|
||||||
@ -69,3 +67,5 @@ export default class Flavor extends Base {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(Flavor));
|
@ -23,9 +23,7 @@ import {
|
|||||||
} from 'resources/flavor';
|
} from 'resources/flavor';
|
||||||
import actionConfigs from './actions';
|
import actionConfigs from './actions';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class Flavor extends Base {
|
||||||
@observer
|
|
||||||
export default class Flavor extends Base {
|
|
||||||
init() {
|
init() {
|
||||||
this.store = new FlavorStore();
|
this.store = new FlavorStore();
|
||||||
}
|
}
|
||||||
@ -70,3 +68,5 @@ export default class Flavor extends Base {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(Flavor));
|
||||||
|
@ -26,9 +26,7 @@ import {
|
|||||||
import { getOptions } from 'utils/index';
|
import { getOptions } from 'utils/index';
|
||||||
import actionConfigs from './actions';
|
import actionConfigs from './actions';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class Flavor extends Base {
|
||||||
@observer
|
|
||||||
export default class Flavor extends Base {
|
|
||||||
init() {
|
init() {
|
||||||
this.store = new FlavorStore();
|
this.store = new FlavorStore();
|
||||||
}
|
}
|
||||||
@ -71,3 +69,5 @@ export default class Flavor extends Base {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(Flavor));
|
||||||
|
@ -19,9 +19,7 @@ import { emptyActionConfig } from 'utils/constants';
|
|||||||
import { getBaseColumns, extraColumns } from 'resources/flavor';
|
import { getBaseColumns, extraColumns } from 'resources/flavor';
|
||||||
import actionConfigs from './actions';
|
import actionConfigs from './actions';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class Flavor extends Base {
|
||||||
@observer
|
|
||||||
export default class Flavor extends Base {
|
|
||||||
init() {
|
init() {
|
||||||
this.store = new FlavorStore();
|
this.store = new FlavorStore();
|
||||||
}
|
}
|
||||||
@ -62,3 +60,5 @@ export default class Flavor extends Base {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(Flavor));
|
||||||
|
@ -25,9 +25,7 @@ import {
|
|||||||
import { getOptions } from 'utils/index';
|
import { getOptions } from 'utils/index';
|
||||||
import actionConfigs from './actions';
|
import actionConfigs from './actions';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class Flavor extends Base {
|
||||||
@observer
|
|
||||||
export default class Flavor extends Base {
|
|
||||||
init() {
|
init() {
|
||||||
this.store = new FlavorStore();
|
this.store = new FlavorStore();
|
||||||
}
|
}
|
||||||
@ -69,3 +67,5 @@ export default class Flavor extends Base {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(Flavor));
|
||||||
|
@ -37,9 +37,7 @@ import { parse } from 'qs';
|
|||||||
import KeyValueInput from 'components/FormItem/KeyValueInput';
|
import KeyValueInput from 'components/FormItem/KeyValueInput';
|
||||||
import { isEmpty } from 'lodash';
|
import { isEmpty } from 'lodash';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class ParamSetting extends Base {
|
||||||
@observer
|
|
||||||
export default class ParamSetting extends Base {
|
|
||||||
init() {
|
init() {
|
||||||
this.settingStore = globalSettingStore;
|
this.settingStore = globalSettingStore;
|
||||||
this.getSettings();
|
this.getSettings();
|
||||||
@ -520,3 +518,5 @@ export default class ParamSetting extends Base {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(ParamSetting));
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
import { inject, observer } from 'mobx-react';
|
import { inject, observer } from 'mobx-react';
|
||||||
import globalAggregateStore from 'stores/nova/aggregate';
|
import globalAggregateStore from 'stores/nova/aggregate';
|
||||||
import { ModalAction } from '@/containers/Action';
|
import { ModalAction } from 'containers/Action';
|
||||||
import globalAvailabilityZoneStore from 'stores/nova/zone';
|
import globalAvailabilityZoneStore from 'stores/nova/zone';
|
||||||
import { getYesNoList } from 'utils/index';
|
import { getYesNoList } from 'utils/index';
|
||||||
|
|
||||||
|
@ -17,9 +17,7 @@ import { HypervisorStore } from 'stores/nova/hypervisor';
|
|||||||
import Base from 'containers/TabDetail';
|
import Base from 'containers/TabDetail';
|
||||||
import Members from 'pages/compute/containers/Instance';
|
import Members from 'pages/compute/containers/Instance';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class HypervisorDetail extends Base {
|
||||||
@observer
|
|
||||||
export default class HypervisorDetail extends Base {
|
|
||||||
get name() {
|
get name() {
|
||||||
return t('hypervisor');
|
return t('hypervisor');
|
||||||
}
|
}
|
||||||
@ -71,3 +69,5 @@ export default class HypervisorDetail extends Base {
|
|||||||
this.store = new HypervisorStore();
|
this.store = new HypervisorStore();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(HypervisorDetail));
|
||||||
|
@ -17,9 +17,7 @@ import Base from 'containers/List';
|
|||||||
import globalHypervisorStore from 'stores/nova/hypervisor';
|
import globalHypervisorStore from 'stores/nova/hypervisor';
|
||||||
import { hypervisorColumns, hypervisorFilters } from 'resources/hypervisor';
|
import { hypervisorColumns, hypervisorFilters } from 'resources/hypervisor';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class Hypervisors extends Base {
|
||||||
@observer
|
|
||||||
export default class Hypervisors extends Base {
|
|
||||||
init() {
|
init() {
|
||||||
this.store = globalHypervisorStore;
|
this.store = globalHypervisorStore;
|
||||||
}
|
}
|
||||||
@ -59,3 +57,5 @@ export default class Hypervisors extends Base {
|
|||||||
return hypervisorFilters;
|
return hypervisorFilters;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(Hypervisors));
|
||||||
|
@ -20,9 +20,7 @@ import Base from 'containers/BaseDetail';
|
|||||||
import { isObject, isArray } from 'lodash';
|
import { isObject, isArray } from 'lodash';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class BaseDetail extends Base {
|
||||||
@observer
|
|
||||||
export default class BaseDetail extends Base {
|
|
||||||
get isImageDetail() {
|
get isImageDetail() {
|
||||||
const { pathname } = this.props.location;
|
const { pathname } = this.props.location;
|
||||||
return pathname.indexOf('image') >= 0;
|
return pathname.indexOf('image') >= 0;
|
||||||
@ -197,3 +195,5 @@ export default class BaseDetail extends Base {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(BaseDetail));
|
||||||
|
@ -19,9 +19,7 @@ import Base from 'containers/TabDetail';
|
|||||||
import BaseDetail from './BaseDetail';
|
import BaseDetail from './BaseDetail';
|
||||||
import actionConfigs from '../actions';
|
import actionConfigs from '../actions';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class ImageDetail extends Base {
|
||||||
@observer
|
|
||||||
export default class ImageDetail extends Base {
|
|
||||||
get name() {
|
get name() {
|
||||||
return this.isImageDetail ? t('image') : t('instance snapshot');
|
return this.isImageDetail ? t('image') : t('instance snapshot');
|
||||||
}
|
}
|
||||||
@ -92,3 +90,5 @@ export default class ImageDetail extends Base {
|
|||||||
this.store = new ImageStore();
|
this.store = new ImageStore();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(ImageDetail));
|
||||||
|
@ -27,8 +27,6 @@ import { NoSetValue, getOptionsWithNoset, getOptions } from 'utils/index';
|
|||||||
import { ProjectStore } from 'stores/keystone/project';
|
import { ProjectStore } from 'stores/keystone/project';
|
||||||
import { projectTableOptions } from 'resources/project';
|
import { projectTableOptions } from 'resources/project';
|
||||||
|
|
||||||
@inject('rootStore')
|
|
||||||
@observer
|
|
||||||
class CreateForm extends FormAction {
|
class CreateForm extends FormAction {
|
||||||
init() {
|
init() {
|
||||||
this.store = globalImageStore;
|
this.store = globalImageStore;
|
||||||
@ -334,4 +332,4 @@ class CreateForm extends FormAction {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default CreateForm;
|
export default inject('rootStore')(observer(CreateForm));
|
||||||
|
@ -16,9 +16,7 @@ import { inject, observer } from 'mobx-react';
|
|||||||
import { ModalAction } from 'containers/Action';
|
import { ModalAction } from 'containers/Action';
|
||||||
import globalVolumeStore from 'stores/cinder/volume';
|
import globalVolumeStore from 'stores/cinder/volume';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class CreateVolume extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class CreateVolume extends ModalAction {
|
|
||||||
static id = 'create';
|
static id = 'create';
|
||||||
|
|
||||||
static title = t('Create Volume');
|
static title = t('Create Volume');
|
||||||
@ -110,3 +108,5 @@ export default class CreateVolume extends ModalAction {
|
|||||||
return globalVolumeStore.create(body);
|
return globalVolumeStore.create(body);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(CreateVolume));
|
||||||
|
@ -37,9 +37,7 @@ import { getSinceTime } from 'utils/time';
|
|||||||
import AttachVolume from 'pages/compute/containers/Instance/actions/AttachVolume';
|
import AttachVolume from 'pages/compute/containers/Instance/actions/AttachVolume';
|
||||||
import styles from './index.less';
|
import styles from './index.less';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class BaseDetail extends Base {
|
||||||
@observer
|
|
||||||
export default class BaseDetail extends Base {
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.fetchVolumes();
|
this.fetchVolumes();
|
||||||
this.fetchInterfaces();
|
this.fetchInterfaces();
|
||||||
@ -424,3 +422,5 @@ export default class BaseDetail extends Base {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(BaseDetail));
|
||||||
|
@ -29,7 +29,7 @@ import {
|
|||||||
} from 'antd';
|
} from 'antd';
|
||||||
import PrimaryActionButtons from 'components/Tables/Base/PrimaryActionButtons';
|
import PrimaryActionButtons from 'components/Tables/Base/PrimaryActionButtons';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import interfaceImg from '@/asset/image/interface.png';
|
import interfaceImg from 'asset/image/interface.png';
|
||||||
import { CaretRightOutlined } from '@ant-design/icons';
|
import { CaretRightOutlined } from '@ant-design/icons';
|
||||||
import ItemActionButtons from 'components/Tables/Base/ItemActionButtons';
|
import ItemActionButtons from 'components/Tables/Base/ItemActionButtons';
|
||||||
import { getSelfColumns } from 'resources/security-group-rule';
|
import { getSelfColumns } from 'resources/security-group-rule';
|
||||||
@ -41,9 +41,7 @@ import ManageSecurityGroup from './action/ManageSecurityGroup';
|
|||||||
const { Panel } = Collapse;
|
const { Panel } = Collapse;
|
||||||
const { TabPane } = Tabs;
|
const { TabPane } = Tabs;
|
||||||
|
|
||||||
@inject('rootStore')
|
export class SecurityGroup extends React.Component {
|
||||||
@observer
|
|
||||||
export default class SecurityGroup extends React.Component {
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
@ -248,3 +246,5 @@ export default class SecurityGroup extends React.Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(SecurityGroup));
|
||||||
|
@ -30,9 +30,7 @@ import SecurityGroup from './SecurityGroup';
|
|||||||
import ActionLog from './ActionLog';
|
import ActionLog from './ActionLog';
|
||||||
import actionConfigs from '../actions';
|
import actionConfigs from '../actions';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class InstanceDetail extends Base {
|
||||||
@observer
|
|
||||||
export default class InstanceDetail extends Base {
|
|
||||||
get name() {
|
get name() {
|
||||||
return t('instance');
|
return t('instance');
|
||||||
}
|
}
|
||||||
@ -161,3 +159,5 @@ export default class InstanceDetail extends Base {
|
|||||||
this.store = new ServerStore();
|
this.store = new ServerStore();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(InstanceDetail));
|
||||||
|
@ -24,9 +24,7 @@ import {
|
|||||||
import { multiTip } from 'resources/volume';
|
import { multiTip } from 'resources/volume';
|
||||||
import { get as _get } from 'lodash';
|
import { get as _get } from 'lodash';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class AttachIsoVolume extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class AttachIsoVolume extends ModalAction {
|
|
||||||
static id = 'attach-iso-volume';
|
static id = 'attach-iso-volume';
|
||||||
|
|
||||||
static title = t('Attach Iso Volume');
|
static title = t('Attach Iso Volume');
|
||||||
@ -128,3 +126,5 @@ export default class AttachIsoVolume extends ModalAction {
|
|||||||
return this.store.attachVolume({ id, body });
|
return this.store.attachVolume({ id, body });
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(AttachIsoVolume));
|
||||||
|
@ -24,9 +24,7 @@ import {
|
|||||||
import { multiTip } from 'resources/volume';
|
import { multiTip } from 'resources/volume';
|
||||||
import { get as _get } from 'lodash';
|
import { get as _get } from 'lodash';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class AttachVolume extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class AttachVolume extends ModalAction {
|
|
||||||
static id = 'attach-volume';
|
static id = 'attach-volume';
|
||||||
|
|
||||||
static title = t('Attach Volume');
|
static title = t('Attach Volume');
|
||||||
@ -111,3 +109,5 @@ export default class AttachVolume extends ModalAction {
|
|||||||
return this.store.attachVolume({ id, body });
|
return this.store.attachVolume({ id, body });
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(AttachVolume));
|
||||||
|
@ -26,9 +26,7 @@ import {
|
|||||||
import Base from 'components/Form';
|
import Base from 'components/Form';
|
||||||
import FlavorSelectTable from '../../../components/FlavorSelectTable';
|
import FlavorSelectTable from '../../../components/FlavorSelectTable';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class BaseStep extends Base {
|
||||||
@observer
|
|
||||||
export default class BaseStep extends Base {
|
|
||||||
init() {
|
init() {
|
||||||
this.imageStore = globalImageStore;
|
this.imageStore = globalImageStore;
|
||||||
this.getAvailZones();
|
this.getAvailZones();
|
||||||
@ -209,3 +207,5 @@ export default class BaseStep extends Base {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(BaseStep));
|
||||||
|
@ -15,9 +15,7 @@
|
|||||||
import { inject, observer } from 'mobx-react';
|
import { inject, observer } from 'mobx-react';
|
||||||
import Base from 'components/Form';
|
import Base from 'components/Form';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class ConfirmStep extends Base {
|
||||||
@observer
|
|
||||||
export default class ConfirmStep extends Base {
|
|
||||||
init() {}
|
init() {}
|
||||||
|
|
||||||
get title() {
|
get title() {
|
||||||
@ -169,3 +167,5 @@ export default class ConfirmStep extends Base {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(ConfirmStep));
|
||||||
|
@ -33,9 +33,7 @@ import {
|
|||||||
// import EditYamlModal from 'components/Modals/EditYaml';
|
// import EditYamlModal from 'components/Modals/EditYaml';
|
||||||
const { isIPv4, isIpv6 } = ipValidate;
|
const { isIPv4, isIpv6 } = ipValidate;
|
||||||
|
|
||||||
@inject('rootStore')
|
export class NetworkStep extends Base {
|
||||||
@observer
|
|
||||||
export default class NetworkStep extends Base {
|
|
||||||
init() {
|
init() {
|
||||||
this.networkStore = new NetworkStore();
|
this.networkStore = new NetworkStore();
|
||||||
this.subnetStore = new SubnetStore();
|
this.subnetStore = new SubnetStore();
|
||||||
@ -259,3 +257,5 @@ export default class NetworkStep extends Base {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(NetworkStep));
|
||||||
|
@ -17,9 +17,7 @@ import globalKeyPairStore from 'stores/nova/keypair';
|
|||||||
import Base from 'components/Form';
|
import Base from 'components/Form';
|
||||||
import { getPasswordOtherRule } from 'utils/validate';
|
import { getPasswordOtherRule } from 'utils/validate';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class SystemStep extends Base {
|
||||||
@observer
|
|
||||||
export default class SystemStep extends Base {
|
|
||||||
init() {
|
init() {
|
||||||
this.keyPairStore = globalKeyPairStore;
|
this.keyPairStore = globalKeyPairStore;
|
||||||
this.getKeypairs();
|
this.getKeypairs();
|
||||||
@ -142,3 +140,5 @@ export default class SystemStep extends Base {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(SystemStep));
|
||||||
|
@ -30,9 +30,7 @@ import SystemStep from './SystemStep';
|
|||||||
import NetworkStep from './NetworkStep';
|
import NetworkStep from './NetworkStep';
|
||||||
import BaseStep from './BaseStep';
|
import BaseStep from './BaseStep';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class CreateIronic extends StepAction {
|
||||||
@observer
|
|
||||||
export default class CreateIronic extends StepAction {
|
|
||||||
static id = 'ironic-create';
|
static id = 'ironic-create';
|
||||||
|
|
||||||
static title = t('Create Ironic Instance');
|
static title = t('Create Ironic Instance');
|
||||||
@ -344,3 +342,5 @@ export default class CreateIronic extends StepAction {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(CreateIronic));
|
||||||
|
@ -19,9 +19,7 @@ import { checkStatus, isIronicInstance } from 'resources/instance';
|
|||||||
import globalInstanceVolumeStore from 'stores/nova/instance-volume';
|
import globalInstanceVolumeStore from 'stores/nova/instance-volume';
|
||||||
import globalVolumeTypeStore from 'stores/cinder/volume-type';
|
import globalVolumeTypeStore from 'stores/cinder/volume-type';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class CreateSnapshot extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class CreateSnapshot extends ModalAction {
|
|
||||||
static id = 'create-snapshot';
|
static id = 'create-snapshot';
|
||||||
|
|
||||||
static title = t('Create Snapshot');
|
static title = t('Create Snapshot');
|
||||||
@ -87,3 +85,5 @@ export default class CreateSnapshot extends ModalAction {
|
|||||||
return this.store.createImage({ id, image: snapshot });
|
return this.store.createImage({ id, image: snapshot });
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(CreateSnapshot));
|
||||||
|
@ -24,9 +24,7 @@ import {
|
|||||||
isIronicInstance,
|
isIronicInstance,
|
||||||
} from 'resources/instance';
|
} from 'resources/instance';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class DetachIsoVolume extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class DetachIsoVolume extends ModalAction {
|
|
||||||
static id = 'detach-iso-volume';
|
static id = 'detach-iso-volume';
|
||||||
|
|
||||||
static title = t('Detach Iso Volume');
|
static title = t('Detach Iso Volume');
|
||||||
@ -143,3 +141,5 @@ export default class DetachIsoVolume extends ModalAction {
|
|||||||
return this.store.detachVolume({ id, volumes: selectedRowKeys });
|
return this.store.detachVolume({ id, volumes: selectedRowKeys });
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(DetachIsoVolume));
|
||||||
|
@ -24,9 +24,7 @@ import {
|
|||||||
isIronicInstance,
|
isIronicInstance,
|
||||||
} from 'resources/instance';
|
} from 'resources/instance';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class DetachVolume extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class DetachVolume extends ModalAction {
|
|
||||||
static id = 'detach-volume';
|
static id = 'detach-volume';
|
||||||
|
|
||||||
static title = t('Detach Volume');
|
static title = t('Detach Volume');
|
||||||
@ -137,3 +135,5 @@ export default class DetachVolume extends ModalAction {
|
|||||||
return this.store.detachVolume({ id, volumes: selectedRowKeys });
|
return this.store.detachVolume({ id, volumes: selectedRowKeys });
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(DetachVolume));
|
||||||
|
@ -21,9 +21,7 @@ import { ModalAction } from 'containers/Action';
|
|||||||
import { isNotLocked, checkStatus, isIronicInstance } from 'resources/instance';
|
import { isNotLocked, checkStatus, isIronicInstance } from 'resources/instance';
|
||||||
import { isOsDisk } from 'resources/volume';
|
import { isOsDisk } from 'resources/volume';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class ExtendRootVolume extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class ExtendRootVolume extends ModalAction {
|
|
||||||
static id = 'extend-root-volume';
|
static id = 'extend-root-volume';
|
||||||
|
|
||||||
static title = t('Extend Root Volume');
|
static title = t('Extend Root Volume');
|
||||||
@ -118,3 +116,5 @@ export default class ExtendRootVolume extends ModalAction {
|
|||||||
return globalVolumeStore.extendSize(id, body);
|
return globalVolumeStore.extendSize(id, body);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(ExtendRootVolume));
|
||||||
|
@ -29,9 +29,7 @@ import {
|
|||||||
canImageCreateInstance,
|
canImageCreateInstance,
|
||||||
} from 'resources/image';
|
} from 'resources/image';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class Rebuild extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class Rebuild extends ModalAction {
|
|
||||||
static id = 'rebuild';
|
static id = 'rebuild';
|
||||||
|
|
||||||
static title = t('Rebuild Instance');
|
static title = t('Rebuild Instance');
|
||||||
@ -170,3 +168,5 @@ export default class Rebuild extends ModalAction {
|
|||||||
return this.store.rebuild({ id, image: selectedRowKeys[0] });
|
return this.store.rebuild({ id, image: selectedRowKeys[0] });
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(Rebuild));
|
||||||
|
@ -24,9 +24,7 @@ import {
|
|||||||
} from 'resources/instance';
|
} from 'resources/instance';
|
||||||
import FlavorSelectTable from '../components/FlavorSelectTable';
|
import FlavorSelectTable from '../components/FlavorSelectTable';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class Resize extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class Resize extends ModalAction {
|
|
||||||
static id = 'resize';
|
static id = 'resize';
|
||||||
|
|
||||||
static title = t('Resize');
|
static title = t('Resize');
|
||||||
@ -142,3 +140,5 @@ export default class Resize extends ModalAction {
|
|||||||
return globalServerStore.resize({ id, flavor });
|
return globalServerStore.resize({ id, flavor });
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(Resize));
|
||||||
|
@ -25,9 +25,7 @@ import {
|
|||||||
} from 'resources/instance';
|
} from 'resources/instance';
|
||||||
import FlavorSelectTable from '../components/FlavorSelectTable';
|
import FlavorSelectTable from '../components/FlavorSelectTable';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class ResizeOnline extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class ResizeOnline extends ModalAction {
|
|
||||||
static id = 'resize-online';
|
static id = 'resize-online';
|
||||||
|
|
||||||
static title = t('Online Resize');
|
static title = t('Online Resize');
|
||||||
@ -138,3 +136,5 @@ export default class ResizeOnline extends ModalAction {
|
|||||||
return globalServerStore.liveResize({ id, flavor });
|
return globalServerStore.liveResize({ id, flavor });
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(ResizeOnline));
|
||||||
|
@ -32,9 +32,7 @@ import InstanceVolume from 'components/FormItem/InstanceVolume';
|
|||||||
import { isGpuCategory } from 'resources/flavor';
|
import { isGpuCategory } from 'resources/flavor';
|
||||||
import FlavorSelectTable from '../../../components/FlavorSelectTable';
|
import FlavorSelectTable from '../../../components/FlavorSelectTable';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class BaseStep extends Base {
|
||||||
@observer
|
|
||||||
export default class BaseStep extends Base {
|
|
||||||
init() {
|
init() {
|
||||||
this.serverStore = globalServerStore;
|
this.serverStore = globalServerStore;
|
||||||
this.imageStore = globalImageStore;
|
this.imageStore = globalImageStore;
|
||||||
@ -458,3 +456,5 @@ export default class BaseStep extends Base {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(BaseStep));
|
||||||
|
@ -16,9 +16,7 @@ import { inject, observer } from 'mobx-react';
|
|||||||
import Base from 'components/Form';
|
import Base from 'components/Form';
|
||||||
import { physicalNodeTypes } from 'resources/instance';
|
import { physicalNodeTypes } from 'resources/instance';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class ConfirmStep extends Base {
|
||||||
@observer
|
|
||||||
export default class ConfirmStep extends Base {
|
|
||||||
init() {}
|
init() {}
|
||||||
|
|
||||||
get title() {
|
get title() {
|
||||||
@ -259,3 +257,5 @@ export default class ConfirmStep extends Base {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(ConfirmStep));
|
||||||
|
@ -33,9 +33,7 @@ import {
|
|||||||
// import EditYamlModal from 'components/Modals/EditYaml';
|
// import EditYamlModal from 'components/Modals/EditYaml';
|
||||||
const { isIPv4, isIpv6 } = ipValidate;
|
const { isIPv4, isIpv6 } = ipValidate;
|
||||||
|
|
||||||
@inject('rootStore')
|
export class NetworkStep extends Base {
|
||||||
@observer
|
|
||||||
export default class NetworkStep extends Base {
|
|
||||||
init() {
|
init() {
|
||||||
this.networkStore = new NetworkStore();
|
this.networkStore = new NetworkStore();
|
||||||
this.subnetStore = new SubnetStore();
|
this.subnetStore = new SubnetStore();
|
||||||
@ -259,3 +257,5 @@ export default class NetworkStep extends Base {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(NetworkStep));
|
||||||
|
@ -23,9 +23,7 @@ import { getPasswordOtherRule } from 'utils/validate';
|
|||||||
import { hypervisorColumns, hypervisorFilters } from 'resources/hypervisor';
|
import { hypervisorColumns, hypervisorFilters } from 'resources/hypervisor';
|
||||||
import { physicalNodeTypes } from 'resources/instance';
|
import { physicalNodeTypes } from 'resources/instance';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class SystemStep extends Base {
|
||||||
@observer
|
|
||||||
export default class SystemStep extends Base {
|
|
||||||
init() {
|
init() {
|
||||||
this.keyPairStore = globalKeyPairStore;
|
this.keyPairStore = globalKeyPairStore;
|
||||||
this.serverStore = globalServerStore;
|
this.serverStore = globalServerStore;
|
||||||
@ -340,3 +338,5 @@ export default class SystemStep extends Base {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(SystemStep));
|
||||||
|
@ -29,8 +29,6 @@ import SystemStep from './SystemStep';
|
|||||||
import NetworkStep from './NetworkStep';
|
import NetworkStep from './NetworkStep';
|
||||||
import BaseStep from './BaseStep';
|
import BaseStep from './BaseStep';
|
||||||
|
|
||||||
@inject('rootStore')
|
|
||||||
@observer
|
|
||||||
class StepCreate extends StepAction {
|
class StepCreate extends StepAction {
|
||||||
static id = 'instance-create';
|
static id = 'instance-create';
|
||||||
|
|
||||||
@ -387,4 +385,4 @@ class StepCreate extends StepAction {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default StepCreate;
|
export default inject('rootStore')(observer(StepCreate));
|
||||||
|
@ -32,9 +32,7 @@ import {
|
|||||||
} from 'resources/flavor';
|
} from 'resources/flavor';
|
||||||
import styles from './index.less';
|
import styles from './index.less';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class FlavorSelectTable extends Component {
|
||||||
@observer
|
|
||||||
export default class FlavorSelectTable extends Component {
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
@ -351,3 +349,5 @@ export default class FlavorSelectTable extends Component {
|
|||||||
return <SelectTable {...props} />;
|
return <SelectTable {...props} />;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(FlavorSelectTable));
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import BaseLayout from '@/layouts/Basic';
|
import BaseLayout from 'layouts/Basic';
|
||||||
import E404 from 'pages/base/containers/404';
|
import E404 from 'pages/base/containers/404';
|
||||||
import Instance from '../containers/Instance';
|
import Instance from '../containers/Instance';
|
||||||
import InstanceDetail from '../containers/Instance/Detail';
|
import InstanceDetail from '../containers/Instance/Detail';
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
import { inject, observer } from 'mobx-react';
|
import { inject, observer } from 'mobx-react';
|
||||||
import { NetworkStore } from 'stores/neutron/network';
|
import { NetworkStore } from 'stores/neutron/network';
|
||||||
import globalNeutronAgentNetworkStore from 'stores/neutron/agent-network';
|
import globalNeutronAgentNetworkStore from 'stores/neutron/agent-network';
|
||||||
import { ModalAction } from '@/containers/Action';
|
import { ModalAction } from 'containers/Action';
|
||||||
import { networkColumns, networkSortProps } from 'resources/network';
|
import { networkColumns, networkSortProps } from 'resources/network';
|
||||||
import { yesNoOptions } from 'utils/constants';
|
import { yesNoOptions } from 'utils/constants';
|
||||||
import { projectRender } from 'utils/table';
|
import { projectRender } from 'utils/table';
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import BaseLayout from '@/layouts/Basic';
|
import BaseLayout from 'layouts/Basic';
|
||||||
import E404 from 'pages/base/containers/404';
|
import E404 from 'pages/base/containers/404';
|
||||||
import SystemInfo from '../containers/SystemInfo';
|
import SystemInfo from '../containers/SystemInfo';
|
||||||
import Setting from '../containers/Setting';
|
import Setting from '../containers/Setting';
|
||||||
|
@ -19,9 +19,7 @@ import { StackResourceStore } from 'stores/heat/resource';
|
|||||||
import { stackStatus } from 'resources/stack';
|
import { stackStatus } from 'resources/stack';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class Resource extends Base {
|
||||||
@observer
|
|
||||||
export default class Resource extends Base {
|
|
||||||
init() {
|
init() {
|
||||||
this.store = new StackResourceStore();
|
this.store = new StackResourceStore();
|
||||||
}
|
}
|
||||||
@ -237,3 +235,5 @@ export default class Resource extends Base {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(Resource));
|
||||||
|
@ -22,9 +22,7 @@ import Event from './Event';
|
|||||||
import Template from './Template';
|
import Template from './Template';
|
||||||
import actionConfigs from '../actions';
|
import actionConfigs from '../actions';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class StackDetail extends Base {
|
||||||
@observer
|
|
||||||
export default class StackDetail extends Base {
|
|
||||||
get name() {
|
get name() {
|
||||||
return t('stack');
|
return t('stack');
|
||||||
}
|
}
|
||||||
@ -99,3 +97,5 @@ export default class StackDetail extends Base {
|
|||||||
return tabs;
|
return tabs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(StackDetail));
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import BaseLayout from '@/layouts/Basic';
|
import BaseLayout from 'layouts/Basic';
|
||||||
import E404 from 'pages/base/containers/404';
|
import E404 from 'pages/base/containers/404';
|
||||||
import Stack from '../containers/Stack';
|
import Stack from '../containers/Stack';
|
||||||
import StackDetail from '../containers/Stack/Detail';
|
import StackDetail from '../containers/Stack/Detail';
|
||||||
|
@ -22,9 +22,7 @@ import User from '../../User';
|
|||||||
import Quota from './Quota';
|
import Quota from './Quota';
|
||||||
import actionConfigs from '../actions';
|
import actionConfigs from '../actions';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class Detail extends Base {
|
||||||
@observer
|
|
||||||
export default class InstanceDetail extends Base {
|
|
||||||
get name() {
|
get name() {
|
||||||
return t('project');
|
return t('project');
|
||||||
}
|
}
|
||||||
@ -114,3 +112,5 @@ export default class InstanceDetail extends Base {
|
|||||||
this.routing.push(`${this.listUrl}/edit/${id}`);
|
this.routing.push(`${this.listUrl}/edit/${id}`);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(Detail));
|
||||||
|
@ -19,8 +19,6 @@ import globalProjectStore from 'stores/keystone/project';
|
|||||||
import { regex } from 'utils/validate';
|
import { regex } from 'utils/validate';
|
||||||
import { statusTypes } from 'utils/constants';
|
import { statusTypes } from 'utils/constants';
|
||||||
|
|
||||||
@inject('rootStore')
|
|
||||||
@observer
|
|
||||||
class CreateForm extends ModalAction {
|
class CreateForm extends ModalAction {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
@ -156,4 +154,4 @@ class CreateForm extends ModalAction {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default CreateForm;
|
export default inject('rootStore')(observer(CreateForm));
|
||||||
|
@ -18,8 +18,6 @@ import globalProjectStore from 'stores/keystone/project';
|
|||||||
import { regex } from 'utils/validate';
|
import { regex } from 'utils/validate';
|
||||||
import { statusTypes } from 'utils/constants';
|
import { statusTypes } from 'utils/constants';
|
||||||
|
|
||||||
@inject('rootStore')
|
|
||||||
@observer
|
|
||||||
class EditForm extends ModalAction {
|
class EditForm extends ModalAction {
|
||||||
init() {
|
init() {
|
||||||
this.store = globalProjectStore;
|
this.store = globalProjectStore;
|
||||||
@ -108,4 +106,4 @@ class EditForm extends ModalAction {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default EditForm;
|
export default inject('rootStore')(observer(EditForm));
|
||||||
|
@ -18,9 +18,7 @@ import React from 'react';
|
|||||||
import { ModalAction } from 'containers/Action';
|
import { ModalAction } from 'containers/Action';
|
||||||
import globalVolumeTypeStore from 'stores/cinder/volume-type';
|
import globalVolumeTypeStore from 'stores/cinder/volume-type';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class QuotaManager extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class QuotaManager extends ModalAction {
|
|
||||||
static id = 'quota-management';
|
static id = 'quota-management';
|
||||||
|
|
||||||
static title = t('Edit Quota');
|
static title = t('Edit Quota');
|
||||||
@ -374,3 +372,5 @@ export default class QuotaManager extends ModalAction {
|
|||||||
return results;
|
return results;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(QuotaManager));
|
||||||
|
@ -20,9 +20,7 @@ import globalGroupStore from 'stores/keystone/user-group';
|
|||||||
import globalRoleStore from 'stores/keystone/role';
|
import globalRoleStore from 'stores/keystone/role';
|
||||||
import { ModalAction } from 'containers/Action';
|
import { ModalAction } from 'containers/Action';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class UserGroupManager extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class UserGroupManager extends ModalAction {
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
@ -204,3 +202,5 @@ export default class UserGroupManager extends ModalAction {
|
|||||||
return results;
|
return results;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(UserGroupManager));
|
||||||
|
@ -21,9 +21,7 @@ import globalRoleStore from 'stores/keystone/role';
|
|||||||
import { ModalAction } from 'containers/Action';
|
import { ModalAction } from 'containers/Action';
|
||||||
import globalDomainStore from 'stores/keystone/domain';
|
import globalDomainStore from 'stores/keystone/domain';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class UserManager extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class UserManager extends ModalAction {
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
const projectRole = JSON.stringify(this.item.userMapProjectRoles);
|
const projectRole = JSON.stringify(this.item.userMapProjectRoles);
|
||||||
@ -313,3 +311,5 @@ export default class UserManager extends ModalAction {
|
|||||||
return results;
|
return results;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(UserManager));
|
||||||
|
@ -19,9 +19,7 @@ import User from '../../User';
|
|||||||
import Group from '../../UserGroup';
|
import Group from '../../UserGroup';
|
||||||
import impliedRole from './BaseDetail';
|
import impliedRole from './BaseDetail';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class RoleDetail extends Base {
|
||||||
@observer
|
|
||||||
export default class RoleDetail extends Base {
|
|
||||||
get name() {
|
get name() {
|
||||||
return t('role');
|
return t('role');
|
||||||
}
|
}
|
||||||
@ -72,3 +70,5 @@ export default class RoleDetail extends Base {
|
|||||||
return tabs;
|
return tabs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(RoleDetail));
|
||||||
|
@ -22,9 +22,7 @@ import UserGroup from '../../UserGroup';
|
|||||||
import Project from '../../Project';
|
import Project from '../../Project';
|
||||||
import actionConfigs from '../actions';
|
import actionConfigs from '../actions';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class UserDetail extends Base {
|
||||||
@observer
|
|
||||||
export default class UserDetail extends Base {
|
|
||||||
get name() {
|
get name() {
|
||||||
return t('user');
|
return t('user');
|
||||||
}
|
}
|
||||||
@ -134,3 +132,5 @@ export default class UserDetail extends Base {
|
|||||||
return tabs;
|
return tabs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(UserDetail));
|
||||||
|
@ -28,8 +28,6 @@ import {
|
|||||||
} from 'utils/validate';
|
} from 'utils/validate';
|
||||||
import { statusTypes } from 'utils/constants';
|
import { statusTypes } from 'utils/constants';
|
||||||
|
|
||||||
@inject('rootStore')
|
|
||||||
@observer
|
|
||||||
class CreateForm extends FormAction {
|
class CreateForm extends FormAction {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
@ -395,4 +393,4 @@ class CreateForm extends FormAction {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default CreateForm;
|
export default inject('rootStore')(observer(CreateForm));
|
||||||
|
@ -18,8 +18,6 @@ import globalUserStore from 'stores/keystone/user';
|
|||||||
import globalDomainStore from 'stores/keystone/domain';
|
import globalDomainStore from 'stores/keystone/domain';
|
||||||
import { phoneNumberValidate, emailValidate } from 'utils/validate';
|
import { phoneNumberValidate, emailValidate } from 'utils/validate';
|
||||||
|
|
||||||
@inject('rootStore')
|
|
||||||
@observer
|
|
||||||
class EditForm extends ModalAction {
|
class EditForm extends ModalAction {
|
||||||
init() {
|
init() {
|
||||||
this.store = globalUserStore;
|
this.store = globalUserStore;
|
||||||
@ -182,4 +180,4 @@ class EditForm extends ModalAction {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default EditForm;
|
export default inject('rootStore')(observer(EditForm));
|
||||||
|
@ -21,9 +21,7 @@ import globalRoleStore from 'stores/keystone/role';
|
|||||||
import { ModalAction } from 'containers/Action';
|
import { ModalAction } from 'containers/Action';
|
||||||
import globalDomainStore from 'stores/keystone/domain';
|
import globalDomainStore from 'stores/keystone/domain';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class SystemRole extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class SystemRole extends ModalAction {
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
const systemRole = JSON.stringify(this.item.projectMapSystemRole);
|
const systemRole = JSON.stringify(this.item.projectMapSystemRole);
|
||||||
@ -318,3 +316,5 @@ export default class SystemRole extends ModalAction {
|
|||||||
return results;
|
return results;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(SystemRole));
|
||||||
|
@ -22,9 +22,7 @@ import { getPasswordOtherRule } from 'utils/validate';
|
|||||||
import globalDomainStore from 'stores/keystone/domain';
|
import globalDomainStore from 'stores/keystone/domain';
|
||||||
import { statusTypes } from 'utils/constants';
|
import { statusTypes } from 'utils/constants';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class CreateForm extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class CreateForm extends ModalAction {
|
|
||||||
init() {
|
init() {
|
||||||
this.store = globalUserStore;
|
this.store = globalUserStore;
|
||||||
this.userGroupStore = globalGroupStore;
|
this.userGroupStore = globalGroupStore;
|
||||||
@ -233,3 +231,5 @@ export default class CreateForm extends ModalAction {
|
|||||||
return this.store.create(data);
|
return this.store.create(data);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(CreateForm));
|
||||||
|
@ -21,9 +21,7 @@ import { yesNoOptions, emptyActionConfig } from 'utils/constants';
|
|||||||
import actionConfigs from './actions';
|
import actionConfigs from './actions';
|
||||||
import actionConfigsInDomain from './actionsInDomain';
|
import actionConfigsInDomain from './actionsInDomain';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class User extends Base {
|
||||||
@observer
|
|
||||||
export default class User extends Base {
|
|
||||||
init() {
|
init() {
|
||||||
this.store = globalUserStore;
|
this.store = globalUserStore;
|
||||||
this.getDomains();
|
this.getDomains();
|
||||||
@ -202,3 +200,5 @@ export default class User extends Base {
|
|||||||
this.list.silent = false;
|
this.list.silent = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(User));
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import BaseLayout from '@/layouts/Basic';
|
import BaseLayout from 'layouts/Basic';
|
||||||
import E404 from 'pages/base/containers/404';
|
import E404 from 'pages/base/containers/404';
|
||||||
import Domain from '../containers/Domain';
|
import Domain from '../containers/Domain';
|
||||||
import DomainCreate from '../containers/Domain/actions/Create';
|
import DomainCreate from '../containers/Domain/actions/Create';
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import BaseLayout from '@/layouts/Basic';
|
import BaseLayout from 'layouts/Basic';
|
||||||
import E404 from 'pages/base/containers/404';
|
import E404 from 'pages/base/containers/404';
|
||||||
// import InstanceDetail from 'pages/compute/containers/Instance/Detail';
|
// import InstanceDetail from 'pages/compute/containers/Instance/Detail';
|
||||||
// import RecycleBin from '../containers/RecycleBin';
|
// import RecycleBin from '../containers/RecycleBin';
|
||||||
|
@ -18,9 +18,7 @@ import { FloatingIpStore } from 'stores/neutron/floatingIp';
|
|||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import Base from 'containers/BaseDetail';
|
import Base from 'containers/BaseDetail';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class BaseDetail extends Base {
|
||||||
@observer
|
|
||||||
export default class BaseDetail extends Base {
|
|
||||||
init() {
|
init() {
|
||||||
this.store = new FloatingIpStore();
|
this.store = new FloatingIpStore();
|
||||||
}
|
}
|
||||||
@ -86,3 +84,5 @@ export default class BaseDetail extends Base {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(BaseDetail));
|
||||||
|
@ -22,9 +22,7 @@ import globalSubnetStore from 'stores/neutron/subnet';
|
|||||||
import { QoSPolicyStore } from 'stores/neutron/qos-policy';
|
import { QoSPolicyStore } from 'stores/neutron/qos-policy';
|
||||||
import { getQoSPolicyTabs } from 'resources/qos-policy';
|
import { getQoSPolicyTabs } from 'resources/qos-policy';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class Allocate extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class Allocate extends ModalAction {
|
|
||||||
static id = 'allocate';
|
static id = 'allocate';
|
||||||
|
|
||||||
static title = t('Allocate IP');
|
static title = t('Allocate IP');
|
||||||
@ -227,3 +225,5 @@ export default class Allocate extends ModalAction {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(Allocate));
|
@ -18,9 +18,7 @@ import globalFloatingIpsStore from 'stores/neutron/floatingIp';
|
|||||||
import { getQoSPolicyTabs } from 'resources/qos-policy';
|
import { getQoSPolicyTabs } from 'resources/qos-policy';
|
||||||
import { QoSPolicyStore } from 'stores/neutron/qos-policy';
|
import { QoSPolicyStore } from 'stores/neutron/qos-policy';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class Edit extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class Edit extends ModalAction {
|
|
||||||
static id = 'edit-floating-ip';
|
static id = 'edit-floating-ip';
|
||||||
|
|
||||||
static policy = 'update_floatingip';
|
static policy = 'update_floatingip';
|
||||||
@ -86,3 +84,5 @@ export default class Edit extends ModalAction {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(Edit));
|
||||||
|
@ -18,9 +18,7 @@ import { QoSPolicyStore } from 'stores/neutron/qos-policy';
|
|||||||
import { qosPolicyColumns, qosPolicyFilters } from 'resources/qos-policy';
|
import { qosPolicyColumns, qosPolicyFilters } from 'resources/qos-policy';
|
||||||
import actionConfigs from './actions';
|
import actionConfigs from './actions';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class QoSPolicy extends Base {
|
||||||
@observer
|
|
||||||
export default class QoSPolicy extends Base {
|
|
||||||
init() {
|
init() {
|
||||||
this.store = new QoSPolicyStore();
|
this.store = new QoSPolicyStore();
|
||||||
this.downloadStore = new QoSPolicyStore();
|
this.downloadStore = new QoSPolicyStore();
|
||||||
@ -75,3 +73,5 @@ export default class QoSPolicy extends Base {
|
|||||||
return filters;
|
return filters;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(QoSPolicy));
|
||||||
|
@ -18,9 +18,7 @@ import { QoSPolicyStore } from 'stores/neutron/qos-policy';
|
|||||||
import { qosPolicyColumns, qosPolicyFilters } from 'resources/qos-policy';
|
import { qosPolicyColumns, qosPolicyFilters } from 'resources/qos-policy';
|
||||||
import actionConfigs from './actions';
|
import actionConfigs from './actions';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class QoSPolicy extends Base {
|
||||||
@observer
|
|
||||||
export default class QoSPolicy extends Base {
|
|
||||||
init() {
|
init() {
|
||||||
this.store = new QoSPolicyStore();
|
this.store = new QoSPolicyStore();
|
||||||
this.downloadStore = new QoSPolicyStore();
|
this.downloadStore = new QoSPolicyStore();
|
||||||
@ -80,3 +78,5 @@ export default class QoSPolicy extends Base {
|
|||||||
return filters;
|
return filters;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(QoSPolicy));
|
||||||
|
@ -18,9 +18,7 @@ import { QoSPolicyStore } from 'stores/neutron/qos-policy';
|
|||||||
import { qosPolicyColumns, qosPolicyFilters } from 'resources/qos-policy';
|
import { qosPolicyColumns, qosPolicyFilters } from 'resources/qos-policy';
|
||||||
import actionConfigs from './actions';
|
import actionConfigs from './actions';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class QoSPolicy extends Base {
|
||||||
@observer
|
|
||||||
export default class QoSPolicy extends Base {
|
|
||||||
init() {
|
init() {
|
||||||
this.store = new QoSPolicyStore();
|
this.store = new QoSPolicyStore();
|
||||||
this.downloadStore = new QoSPolicyStore();
|
this.downloadStore = new QoSPolicyStore();
|
||||||
@ -83,3 +81,5 @@ export default class QoSPolicy extends Base {
|
|||||||
return filters;
|
return filters;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(QoSPolicy));
|
||||||
|
@ -16,9 +16,7 @@ import React from 'react';
|
|||||||
import { inject, observer } from 'mobx-react';
|
import { inject, observer } from 'mobx-react';
|
||||||
import Base from 'containers/BaseDetail';
|
import Base from 'containers/BaseDetail';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class BaseDetail extends Base {
|
||||||
@observer
|
|
||||||
export default class BaseDetail extends Base {
|
|
||||||
get leftCards() {
|
get leftCards() {
|
||||||
const cards = [this.aZoneCard];
|
const cards = [this.aZoneCard];
|
||||||
return cards;
|
return cards;
|
||||||
@ -90,3 +88,5 @@ export default class BaseDetail extends Base {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(BaseDetail));
|
||||||
|
@ -23,9 +23,7 @@ import StaticRouter from '../StaticRouter';
|
|||||||
import actionConfigs from '../actions';
|
import actionConfigs from '../actions';
|
||||||
// import Snat from '../Snat';
|
// import Snat from '../Snat';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class RouterDetail extends Base {
|
||||||
@observer
|
|
||||||
export default class RouterDetail extends Base {
|
|
||||||
get name() {
|
get name() {
|
||||||
return t('router');
|
return t('router');
|
||||||
}
|
}
|
||||||
@ -118,3 +116,5 @@ export default class RouterDetail extends Base {
|
|||||||
this.store = new RouterStore();
|
this.store = new RouterStore();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(RouterDetail));
|
||||||
|
@ -24,9 +24,7 @@ import {
|
|||||||
availabilityZoneResource,
|
availabilityZoneResource,
|
||||||
} from 'resources/neutron';
|
} from 'resources/neutron';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class Create extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class Create extends ModalAction {
|
|
||||||
static id = 'create';
|
static id = 'create';
|
||||||
|
|
||||||
static title = t('Create Router');
|
static title = t('Create Router');
|
||||||
@ -183,3 +181,5 @@ export default class Create extends ModalAction {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(Create));
|
||||||
|
@ -18,9 +18,7 @@ import { getRouterColumns, routerFitlers } from 'resources/router';
|
|||||||
import { RouterStore } from 'stores/neutron/router';
|
import { RouterStore } from 'stores/neutron/router';
|
||||||
import actionConfigs from './actions';
|
import actionConfigs from './actions';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class Routes extends Base {
|
||||||
@observer
|
|
||||||
export default class Routes extends Base {
|
|
||||||
init() {
|
init() {
|
||||||
this.store = new RouterStore();
|
this.store = new RouterStore();
|
||||||
this.downloadStore = new RouterStore();
|
this.downloadStore = new RouterStore();
|
||||||
@ -62,3 +60,5 @@ export default class Routes extends Base {
|
|||||||
return routerFitlers;
|
return routerFitlers;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(Routes));
|
@ -64,7 +64,7 @@ export default class DeleteAction extends ConfirmAction {
|
|||||||
}
|
}
|
||||||
const direction = item.direction === 'egress' ? 'to' : 'from';
|
const direction = item.direction === 'egress' ? 'to' : 'from';
|
||||||
if (remote_group_id) {
|
if (remote_group_id) {
|
||||||
remote = remote_group_id.substr(0, 13);
|
remote = remote_group_id;
|
||||||
} else {
|
} else {
|
||||||
remote = remote_ip_prefix || t('ANY');
|
remote = remote_ip_prefix || t('ANY');
|
||||||
}
|
}
|
||||||
|
@ -19,9 +19,7 @@ import { isEqual } from 'lodash';
|
|||||||
import members from './Rule';
|
import members from './Rule';
|
||||||
import actionConfigs from '../actions';
|
import actionConfigs from '../actions';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class SecurityGroupDetail extends Base {
|
||||||
@observer
|
|
||||||
export default class SecurityGroupDetail extends Base {
|
|
||||||
get name() {
|
get name() {
|
||||||
return t('security group');
|
return t('security group');
|
||||||
}
|
}
|
||||||
@ -79,3 +77,5 @@ export default class SecurityGroupDetail extends Base {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(SecurityGroupDetail));
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Popover, Avatar } from 'antd';
|
import { Popover, Avatar } from 'antd';
|
||||||
import { instanceStatus } from 'resources/instance';
|
import { instanceStatus } from 'resources/instance';
|
||||||
import instanceImage from '@/asset/image/instance.png';
|
import instanceImage from 'asset/image/instance.png';
|
||||||
import ImageType from 'components/ImageType';
|
import ImageType from 'components/ImageType';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import styles from './index.less';
|
import styles from './index.less';
|
||||||
|
@ -18,7 +18,7 @@ import { getLocalTimeStr } from 'utils/time';
|
|||||||
import { routerStatus } from 'resources/router';
|
import { routerStatus } from 'resources/router';
|
||||||
import { Descriptions, Popover, Button, Avatar } from 'antd';
|
import { Descriptions, Popover, Button, Avatar } from 'antd';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import routerImage from '@/asset/image/router.png';
|
import routerImage from 'asset/image/router.png';
|
||||||
import styles from './index.less';
|
import styles from './index.less';
|
||||||
|
|
||||||
export default class NodeCard extends React.Component {
|
export default class NodeCard extends React.Component {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Card, Button, Spin, Checkbox } from 'antd';
|
import { Card, Button, Spin, Checkbox } from 'antd';
|
||||||
import G6 from '@antv/g6';
|
import G6 from '@antv/g6';
|
||||||
import image from '@/asset/image/cloud.png';
|
import image from 'asset/image/cloud.png';
|
||||||
import { RedoOutlined } from '@ant-design/icons';
|
import { RedoOutlined } from '@ant-design/icons';
|
||||||
import { observer, inject } from 'mobx-react';
|
import { observer, inject } from 'mobx-react';
|
||||||
import globalNetworkStore from 'stores/neutron/network';
|
import globalNetworkStore from 'stores/neutron/network';
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import { inject, observer } from 'mobx-react';
|
import { inject, observer } from 'mobx-react';
|
||||||
import { ModalAction } from '@/containers/Action';
|
import { ModalAction } from 'containers/Action';
|
||||||
import { ipValidate } from 'utils/validate';
|
import { ipValidate } from 'utils/validate';
|
||||||
import { RouterStore } from 'stores/neutron/router';
|
import { RouterStore } from 'stores/neutron/router';
|
||||||
import { SubnetStore } from 'stores/neutron/subnet';
|
import { SubnetStore } from 'stores/neutron/subnet';
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import BaseLayout from '@/layouts/Basic';
|
import BaseLayout from 'layouts/Basic';
|
||||||
import E404 from 'pages/base/containers/404';
|
import E404 from 'pages/base/containers/404';
|
||||||
import Network from '../containers/Network';
|
import Network from '../containers/Network';
|
||||||
import AdminNetwork from '../containers/Network/AdminNetwork';
|
import AdminNetwork from '../containers/Network/AdminNetwork';
|
||||||
|
@ -17,9 +17,7 @@ import { Link } from 'react-router-dom';
|
|||||||
import { inject, observer } from 'mobx-react';
|
import { inject, observer } from 'mobx-react';
|
||||||
import Base from 'containers/BaseDetail';
|
import Base from 'containers/BaseDetail';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class BaseDetail extends Base {
|
||||||
@observer
|
|
||||||
export default class BaseDetail extends Base {
|
|
||||||
get leftCards() {
|
get leftCards() {
|
||||||
const cards = [this.attachmentsCard];
|
const cards = [this.attachmentsCard];
|
||||||
if (this.detailData.volume_image_metadata) {
|
if (this.detailData.volume_image_metadata) {
|
||||||
@ -106,3 +104,5 @@ export default class BaseDetail extends Base {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(BaseDetail));
|
||||||
|
@ -21,9 +21,7 @@ import { volumeStatus } from 'resources/volume';
|
|||||||
import BaseDetail from './BaseDetail';
|
import BaseDetail from './BaseDetail';
|
||||||
import actionConfigs from '../actions';
|
import actionConfigs from '../actions';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class VolumeDetail extends Base {
|
||||||
@observer
|
|
||||||
export default class VolumeDetail extends Base {
|
|
||||||
get name() {
|
get name() {
|
||||||
return t('volume');
|
return t('volume');
|
||||||
}
|
}
|
||||||
@ -113,3 +111,5 @@ export default class VolumeDetail extends Base {
|
|||||||
this.store = new VolumeStore();
|
this.store = new VolumeStore();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(VolumeDetail));
|
||||||
|
@ -18,9 +18,7 @@ import globalVolumeStore from 'stores/cinder/volume';
|
|||||||
import globalVolumeTypeStore from 'stores/cinder/volume-type';
|
import globalVolumeTypeStore from 'stores/cinder/volume-type';
|
||||||
import { isAvailableOrInUse, isOsDisk } from 'resources/volume';
|
import { isAvailableOrInUse, isOsDisk } from 'resources/volume';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class ChangeType extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class ChangeType extends ModalAction {
|
|
||||||
static id = 'change-type';
|
static id = 'change-type';
|
||||||
|
|
||||||
static title = t('Change Type');
|
static title = t('Change Type');
|
||||||
@ -99,3 +97,5 @@ export default class ChangeType extends ModalAction {
|
|||||||
return this.store.retype(id, body);
|
return this.store.retype(id, body);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(ChangeType));
|
||||||
|
@ -38,9 +38,7 @@ import { volumeTypeSelectProps } from 'resources/volume-type';
|
|||||||
import { allSettled } from 'utils';
|
import { allSettled } from 'utils';
|
||||||
import styles from './index.less';
|
import styles from './index.less';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class Create extends FormAction {
|
||||||
@observer
|
|
||||||
export default class Create extends FormAction {
|
|
||||||
init() {
|
init() {
|
||||||
this.snapshotStore = globalSnapshotStore;
|
this.snapshotStore = globalSnapshotStore;
|
||||||
this.imageStore = globalImageStore;
|
this.imageStore = globalImageStore;
|
||||||
@ -582,3 +580,5 @@ export default class Create extends FormAction {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(Create));
|
||||||
|
@ -18,9 +18,7 @@ import globalBackupStore from 'stores/cinder/backup';
|
|||||||
import { isAvailableOrInUse, isInUse } from 'resources/volume';
|
import { isAvailableOrInUse, isInUse } from 'resources/volume';
|
||||||
import { createTip, backupModeList, modeTip } from 'resources/backup';
|
import { createTip, backupModeList, modeTip } from 'resources/backup';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class CreateBackup extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class CreateBackup extends ModalAction {
|
|
||||||
static id = 'create-backup';
|
static id = 'create-backup';
|
||||||
|
|
||||||
static title = t('Create Backup');
|
static title = t('Create Backup');
|
||||||
@ -86,3 +84,5 @@ export default class CreateBackup extends ModalAction {
|
|||||||
return this.store.create(body);
|
return this.store.create(body);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(CreateBackup));
|
||||||
|
@ -18,9 +18,7 @@ import { imageOS, imageFormats } from 'resources/image';
|
|||||||
import globalVolumeStore from 'stores/cinder/volume';
|
import globalVolumeStore from 'stores/cinder/volume';
|
||||||
import { isAvailable } from 'resources/volume';
|
import { isAvailable } from 'resources/volume';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class CreateImage extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class CreateImage extends ModalAction {
|
|
||||||
static id = 'create-image';
|
static id = 'create-image';
|
||||||
|
|
||||||
static title = t('Create Image');
|
static title = t('Create Image');
|
||||||
@ -84,3 +82,5 @@ export default class CreateImage extends ModalAction {
|
|||||||
return this.store.uploadImage(id, values);
|
return this.store.uploadImage(id, values);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(CreateImage));
|
||||||
|
@ -17,9 +17,7 @@ import { ModalAction } from 'containers/Action';
|
|||||||
import globalVolumeStore from 'stores/cinder/volume';
|
import globalVolumeStore from 'stores/cinder/volume';
|
||||||
import { isAvailableOrInUse } from 'resources/volume';
|
import { isAvailableOrInUse } from 'resources/volume';
|
||||||
|
|
||||||
@inject('rootStore')
|
export class ExtendVolume extends ModalAction {
|
||||||
@observer
|
|
||||||
export default class ExtendVolume extends ModalAction {
|
|
||||||
static id = 'extend-snapshot';
|
static id = 'extend-snapshot';
|
||||||
|
|
||||||
static title = t('Extend Volume');
|
static title = t('Extend Volume');
|
||||||
@ -77,3 +75,5 @@ export default class ExtendVolume extends ModalAction {
|
|||||||
return this.store.extendSize(id, rest);
|
return this.store.extendSize(id, rest);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default inject('rootStore')(observer(ExtendVolume));
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import BaseLayout from '@/layouts/Basic';
|
import BaseLayout from 'layouts/Basic';
|
||||||
import E404 from 'pages/base/containers/404';
|
import E404 from 'pages/base/containers/404';
|
||||||
import Snapshot from '../containers/Snapshot';
|
import Snapshot from '../containers/Snapshot';
|
||||||
import SnapshotDetail from '../containers/Snapshot/Detail';
|
import SnapshotDetail from '../containers/Snapshot/Detail';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user