@aliyun-obv/api 4.4.0 → 4.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/api.es.js +1 -46
  2. package/package.json +1 -1
package/dist/api.es.js CHANGED
@@ -511,44 +511,6 @@ function showConsoleBaseAlertDialog(response, config = {}, request) {
511
511
  }
512
512
  return true;
513
513
  }
514
- function showCSRFDialog(config) {
515
- const dialog = Dialog.alert({
516
- content: i18n.ERRMESSAGE1,
517
- title: ERROR_TITLE,
518
- className: "cdnext-alert cdnext-error-alert",
519
- afterClose: () => {
520
- isGlobalAlertShow = false;
521
- if (config.afterClose) {
522
- config.afterClose();
523
- }
524
- },
525
- messageProps: {
526
- prefix: "obviz-next-"
527
- },
528
- prefix: "obviz-next-",
529
- footer: [
530
- /* @__PURE__ */ React.createElement(
531
- Button,
532
- {
533
- prefix: "obviz-next-",
534
- type: "primary",
535
- onClick: () => {
536
- var _a;
537
- commonEasyFetch.get(`${(_a = getSLSdomain()) != null ? _a : ""}/console/ajax/getSecToken.json`).then((res) => {
538
- if ((res == null ? void 0 : res.code) === "200") {
539
- window.ALIYUN_SLS_CONSOLE_CONFIG = window.ALIYUN_SLS_CONSOLE_CONFIG || {};
540
- window.ALIYUN_SLS_CONSOLE_CONFIG.SEC_TOKEN = res.data;
541
- dialog.hide();
542
- }
543
- }).catch(() => {
544
- });
545
- }
546
- },
547
- i18n.REFRESH
548
- )
549
- ]
550
- });
551
- }
552
514
  function showNeedLoginDialog(config) {
553
515
  const parseQuery = urijs(location.search).escapeQuerySpace(false).query(true);
554
516
  if (judgeIframe() && parseQuery.reloadParent === "true") {
@@ -561,9 +523,7 @@ function showNeedLoginDialog(config) {
561
523
  console.error(e);
562
524
  }
563
525
  }
564
- let loginUrl = getOauthCallbackUrl(
565
- `${window.location.origin}/lognext/exit`
566
- );
526
+ let loginUrl = getOauthCallbackUrl(`${window.location.origin}/lognext/exit`);
567
527
  if (parseQuery.customLoginUrl && parseQuery.customLoginUrl !== "") {
568
528
  loginUrl = decodeURIComponent(parseQuery.customLoginUrl);
569
529
  }
@@ -642,11 +602,6 @@ function showAlertDialog(response, config = {}, request) {
642
602
  if (config.content == null || config.content === "") {
643
603
  config.content = errorMsgHandler(response);
644
604
  }
645
- if (response.code === "CsrfTokenError") {
646
- isGlobalAlertShow = true;
647
- showCSRFDialog(config);
648
- return true;
649
- }
650
605
  if (response.code === "ConsoleNeedLogin") {
651
606
  isGlobalAlertShow = true;
652
607
  showNeedLoginDialog(response);
package/package.json CHANGED
@@ -15,5 +15,5 @@
15
15
  "styled-components": "^5.2.0",
16
16
  "urijs": "^1.19.1"
17
17
  },
18
- "version": "4.4.0"
18
+ "version": "4.5.1"
19
19
  }