How to use the @choerodon/master.axios.get function in @choerodon/master

To help you get started, we’ve selected a few @choerodon/master examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github choerodon / devops-service / react / routes / code-manager / stores / DevPipelineStore.js View on Github external
queryAppData = (projectId = AppState.currentMenuType.id, type, refersh, isReloadApp) => {
    // 已经加载过app数据 只更新对应模块的数据, 除非主动刷新 否则不查询app数据,
    if (!isReloadApp && this.appData.length !== 0 && type !== 'CodeManagerBranch') {
      refersh && refersh();
      return;
    }
    if (Number(this.preProId) !== Number(projectId)) {
      DeploymentPipelineStore.setProRole('app', '');
    }
    this.setAppData([]);
    this.setPreProId(projectId);
    this.setLoading(true);
    axios.get(`/devops/v1/projects/${projectId}/app_service/list_by_active`)
      .then((data) => {
        this.setLoading(false);
        if (handlePromptError(data)) {
          this.setAppData(data);
          if (data && data.length) {
            if (this.selectedApp) {
              if (_.filter(data, ['id', this.selectedApp]).length === 0) {
                this.setSelectApp(data[0].id);
              }
            } else {
              this.setSelectApp(data[0].id);
            }
            refersh && refersh();
          } else {
            this.setSelectApp(null);
          }
github choerodon / devops-service / react / routes / app-service / stores / ListDataSet.js View on Github external
async function checkCode(value) {
    const pa = /^[a-z]([-a-z0-9]*[a-z0-9])?$/;
    if (value && pa.test(value)) {
      try {
        const res = await axios.get(`/devops/v1/projects/${projectId}/app_service/check_code?code=${value}`);
        if (res && res.failed) {
          return formatMessage({ id: 'checkCodeExist' });
        } else {
          return true;
        }
      } catch (err) {
        return formatMessage({ id: 'checkCodeFailed' });
      }
    } else {
      return formatMessage({ id: 'checkCodeReg' });
    }
  }
github choerodon / devops-service / react / routes / resource / main-view / stores / useCustomStore.js View on Github external
async loadSingleData(projectId, id) {
      try {
        const res = await axios.get(`/devops/v1/projects/${projectId}/customize_resource/${id}`);
        if (handlePromptError(res)) {
          this.setSingleData(res);
        }
      } catch (e) {
        Choerodon.handleResponseError(e);
      }
    },
github choerodon / manager-service / react / src / app / iam / containers / global / instance / Instance.js View on Github external
page: current,
      size: pageSize,
      instanceId,
      version,
      params,
      service: serviceName,
    };
    if (columnKey) {
      const sorter = [];
      sorter.push(columnKey);
      if (order === 'asc') {
        sorter.push('asc');
      }
      queryObj.sort = sorter.join(',');
    }
    return axios.get(`/manager/v1/instances?${querystring.stringify(queryObj)}`);
  }
github choerodon / manager-service / react / src / app / iam / stores / global / instance / InstanceStore.js View on Github external
  loadInstanceInfo = instanceId => axios.get(`manager/v1/instances/${instanceId}`)
}
github choerodon / devops-service / react / routes / environment / main-view / contents / detail / modals / resource-setting / store / NotificationsStore.js View on Github external
  loadSingleData = (projectId, id) => axios.get(`/devops/v1/projects/${projectId}/notification/${id}`)
    .then((data) => {
      if (handlePromptError(data)) {
        this.setSingleData(data);
        return data;
      } else {
        return false;
      }
    });
github choerodon / devops-service / react / routes / code-manager / stores / useStore.js View on Github external
async checkHasApp(projectId) {
      this.setLoading(true);
      try {
        const res = await axios.get(`/devops/v1/projects/${projectId}/app_service/count_by_active`);
        if ((res && !res.failed) || res === 0) {
          this.setHasApp(res);
        }
        this.setLoading(false);
      } catch (e) {
        this.setLoading(false);
        Choerodon.handleResponseError(e);
      }
    },
  }));
github choerodon / devops-service / react / routes / resource / main-view / contents / application / stores / useSecretStore.js View on Github external
async loadSingleData(projectId, id) {
      const res = await axios.get(`/devops/v1/projects/${projectId}/secret/${id}?to_decode=true`);
      if (handlePromptError(res)) {
        this.setSingleData(res);
      }
      return res;
    },

@choerodon/master

A package of Master for Choerodon platform.

ISC
Latest version published 2 years ago

Package Health Score

43 / 100
Full package analysis