Giter VIP home page Giter VIP logo

omsui's Introduction

My GitHub

Top Langs

omsui's People

Contributors

gdm257 avatar lixin59 avatar ssbeatty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

omsui's Issues

[Bug] CORS 未做跨源处理

Related

#10 同样的问题

Problem

反代为 HTTPS 之后,oms 前端许多功能无法使用

Reproduce

  1. 使用任意反代如 Nginx 对 oms 进行代理,并开启 SSL
  2. 浏览器中通过 HTTPS 访问 oms
  3. F12 开发者工具 - 网络
  4. 刷新页面
  5. 网络面板中能看见许多 xhr 请求被浏览器拦截,状态显示为 (blocked:mixed-content)

Reason

  • src/api/http/requestUrl.ts 中的 baseUrl 写死成了 http 协议
  • 根据浏览器的同源政策(same-origin policy),必须要 protocol host port 全部相同才算同源
  • 此时,浏览器与反代之间用的是 https,而 js 中的 xhr(axios) 用的是 httpprotocol 不同,算是跨源
  • 浏览器默认会拦截 js 脚本的跨源请求,导致前端 js 无法正常工作

Solution

对于可能的解决方案,protocol 不要硬编码,而是跟随浏览器。

let protocol = window.location.protocol;
export const baseUrl = `${protocol}//${localhost}/api/v1`;

添加全局websocket

使用全局的一个websocket代替现有的websocket连接方式,用于与后端通信

前端只能显示100个资产

我检查了数据库中 导入的120多台服务器是有的 前端只显示了100台,而且是比如显示20-120 条 就是删除数据,之前不显示的前20条也不显示

能否加一个访问限制

部署完成后,所有知道ip地址和端口的人都可以访问并管理所有的服务器,能否加一个例如用户登录或者是访问密码形式的访问限制啊?这样就可以方便的放到公网上,只要有浏览器的地方都可以管理自己的服务器了。

host状态信息拟订

cpu:
cpu 实时利用率 折线图
cpu load 1 5 15 数字图
cpu核心数和型号 数字图
进程数 数字图

内存:
内存占用 饼图/水滴图
mem_buffers 数字图
mem_cached 数字图
swap占用 饼图/水滴图

磁盘占用:
磁盘占用 饼图/水滴图
磁盘IO 折线图

网络:
流量 折线图

操作提示

某些操作按钮没有做提示功能,不管是成功或者失败,或者在loading状态都应该能够有提示

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.