Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import {
observable, action, computed, toJS,
} from 'mobx';
import { store } from '@choerodon/master';
import _ from 'lodash';
import { getParams } from '../common/utils';
import {
getCycle, getCycleDetails, getCycleHistiorys,
} from '../api/ExecuteDetailApi';
import { getStatusList } from '../api/TestStatusApi';
import { getUsers } from '../api/IamApi';
import { getIssueList, getIssuesForDefects } from '../api/agileApi';
@store('ExecuteDetailStore')
class ExecuteDetailStore {
@observable id = null;
@observable issueList = [];
@observable loading = false;
@observable selectLoading = false;
@observable ExecuteDetailSideVisible = true;
@observable userList = [];
// 用户列表
@observable statusList = [];
/**
* Created by hulingfangzi on 2018/6/20.
*/
import { action, computed, observable } from 'mobx';
import { axios, store, stores } from '@choerodon/master';
@store('InstanceStore')
class InstanceStore {
@observable service = [];
@observable currentService = { name: 'total' };
@observable loading = true;
@observable instanceData = [];
@observable instanceDetail = null;
@action setLoading(flag) {
this.loading = flag;
}
@action setCurrentService(data) {
this.currentService = data;
}
@computed get getCurrentService() {
* @param collection 所有数据
* @param value 当前数据项
* @param number 显示最近使用的条数
* @returns {*[]}
*/
function saveRecent(collection = [], value, number) {
const index = findDataIndex(collection, value);
if (index !== -1) {
return collection.splice(index, 1).concat(collection.slice());
} else {
collection.unshift(value);
return collection.slice(0, number);
}
}
@store('DevPipelineStore')
class DevPipelineStore {
@observable appData = [];
@observable selectedApp = null;
@observable defaultAppName = null;
@observable recentApp = null;
@observable preProId = AppState.currentMenuType.id;
@observable loading = false;
@observable selectAppData = {};
@computed get getSelectAppData() {
/**
* @author ale0720@163.com
* @date 2019-05-13 14:46
*/
import { observable, action, computed } from 'mobx';
import { axios, store } from '@choerodon/master';
import { handlePromptError } from '../../../../../../../../utils/index';
import { HEIGHT, SORTER_MAP } from '../Constants';
@store('NotificationsStore')
class NotificationsStore {
@observable listData = [];
@observable loading = false;
@observable pageInfo = {
current: 1,
total: 0,
pageSize: 10,
};
@observable users = [];
@observable singleData = {};
@observable disabledEvent = [];