Giter VIP home page Giter VIP logo

k8s-web-frontend's Introduction

SpringBoot-Vue实现对k8s的管理设计方案

0.开发背景

应实验室需求,开发此前后端分离Web项目,实现用户在网页对Pod申请,得到Pod信息后可以使用ssh连接。管理员可以简单管理用户和Pod。

1.开发环境

操作系统:windows11

使用的工具:Git+IDEA+VSCode+MySQLWorkBrench+docker

使用的框架(组件):Maven+MybatisPlus+Swagger+JWT+SpringCloudKubernetes

数据库:MySQL

3.前端部分

使用vue3+elementPlus

3.1跨域问题:

设置axios拦截器,令Referrer-Policy = no-referrer

axios.interceptors.request.use((config) => {
    const token = Cookies.get('token');
    const username = Cookies.get('username');
    if (token) {
        config.headers['Authorization'] = token;
    }

    if (username) {
        config.headers['X-Username'] = username;
    }

    config.headers['Referrer-Policy'] = 'no-referrer'
    return config;
});

其他是将token和username装在header中传递,以便后端用来鉴权。

3.2chatgpt:

这些前端的页面代码几乎都是chatgpt完成的,它提供的页面比我自己写的要好看得多。我只需要手动处理对后端发起的请求和数据处理部分就可以了。

k8s-web-frontend's People

Contributors

gohoy avatar

Watchers

 avatar

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.