├── .babelrc ├── .gitignore ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── build_and_run.sh ├── git_img ├── auth_key.png ├── cmdb_pool.png ├── cron_execute.png ├── db_backup.png ├── db_history.png ├── db_instance.png ├── edit_script.png ├── excuting.png ├── execute.png ├── login.png ├── module_tree.png ├── product_info.png └── script_list.png ├── nginx.conf └── vue.conf ├── package-lock.json ├── package.json ├── postcss.config.js ├── src ├── App.vue ├── assets │ ├── js │ │ └── axios.js │ └── logo.png ├── cmdb │ ├── cmdb_pool.vue │ ├── module_tree.vue │ ├── product_info.vue │ └── user_auth.vue ├── components │ ├── coder.vue │ └── login.vue ├── config │ └── api_url.js ├── db_job │ ├── db_backup.vue │ ├── db_backup_history.vue │ └── db_instance.vue ├── index.html ├── main.js ├── ops_job │ ├── excute_model.vue │ ├── script_create.vue │ ├── script_cron_edit.vue │ ├── script_cron_list.vue │ ├── script_edit.vue │ ├── script_excutor.vue │ ├── script_history.vue │ └── script_history_detail.vue ├── router.js ├── static │ ├── css │ │ └── navicon.css │ ├── fonts │ │ └── icon │ │ │ ├── demo.css │ │ │ ├── iconfont.css │ │ │ ├── iconfont.eot │ │ │ ├── iconfont.js │ │ │ ├── iconfont.svg │ │ │ ├── iconfont.ttf │ │ │ └── iconfont.woff │ └── image │ │ ├── job.png │ │ └── node.png ├── store.js └── vendor.js ├── webpack.config.js └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [["es2015", { "modules": false }]], 3 | "plugins": [ 4 | [ 5 | "component", 6 | { 7 | "libraryName": "element-ui", 8 | "styleLibraryName": "theme-chalk" 9 | } 10 | ], 11 | "transform-vue-jsx" 12 | ] 13 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log 5 | .idea 6 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8.12.0 2 | 3 | WORKDIR /app/ 4 | COPY ./dist/ /app/ 5 | 6 | # RUN npm install -g http-server 7 | RUN echo "deb http://ftp.cn.debian.org/debian/ stretch main" > /etc/apt/sources.list 8 | RUN echo "deb http://ftp.cn.debian.org/debian/ stretch-updates main" >> /etc/apt/sources.list 9 | RUN echo "deb http://ftp.cn.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list 10 | 11 | RUN apt update 12 | 13 | RUN apt install -y nginx 14 | 15 | ADD ./nginx.conf/ /etc/nginx/conf.d/ 16 | 17 | ENTRYPOINT [ "/usr/sbin/nginx", "-g", "daemon off;" ] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 brickli 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: dist build 2 | install: 3 | @npm install 4 | 5 | dev: install 6 | @npm run dev 7 | 8 | build: 9 | @npm run build 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Develop 2 | 3 | ``` bash 4 | # serve with hot reload at localhost:8010 5 | npm run dev 6 | ``` 7 | 8 | ## Build 9 | 10 | ``` bash 11 | # build for production with minification 12 | npm run build 13 | ``` 14 | 15 | ## Docker部署 16 | 17 | ``` bash 18 | sh build_and_run.sh 19 | ``` 20 | 21 | # 基于element,django的一套自动化运维系统 22 | 23 | ## 资产管理 24 | - 1. 资产注册 25 | ![资产注册](git_img/cmdb_pool.png) 26 | - 2. 资产目录树 27 | ![资产目录树](git_img/module_tree.png) 28 | 29 | ## 数据库管理 30 | - 1. 数据库实例注册 31 | ![数据库实例注册](git_img/db_instance.png) 32 | - 2. 数据库表备份 33 | ![数据库表备份](git_img/db_backup.png) 34 | 35 | ## 作业执行 36 | - 1. 作业管理 37 | ![新建作业](git_img/edit_script.png) 38 | - 2. 作业执行态与定时作业 39 | ![作业执行态与定时作业](git_img/cron_execute.png) 40 | - 3. 执行输出 41 | ![执行输出](git_img/excuting.png) -------------------------------------------------------------------------------- /build_and_run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # clear last build 4 | [[ `docker ps -a | grep -w ops_vue | wc -l` -ne 0 ]] && docker rm -f ops_vue 5 | 6 | # if clean last build, open it 7 | [[ `docker images | grep -w ops_vue | wc -l` -ne 0 ]] && docker rmi ops_vue 8 | 9 | export OPS_RUN_MODE=DEPLOY 10 | 11 | npm install --registry=https://registry.npm.taobao.org 12 | 13 | npm run build 14 | 15 | docker build . -t ops_vue 16 | 17 | docker run -d --network ops_web --name ops_vue -p 8082:8000 ops_vue -------------------------------------------------------------------------------- /git_img/auth_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brick-li/ops-vue/70c86d46ad57603d067917717969b201151e6283/git_img/auth_key.png -------------------------------------------------------------------------------- /git_img/cmdb_pool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brick-li/ops-vue/70c86d46ad57603d067917717969b201151e6283/git_img/cmdb_pool.png -------------------------------------------------------------------------------- /git_img/cron_execute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brick-li/ops-vue/70c86d46ad57603d067917717969b201151e6283/git_img/cron_execute.png -------------------------------------------------------------------------------- /git_img/db_backup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brick-li/ops-vue/70c86d46ad57603d067917717969b201151e6283/git_img/db_backup.png -------------------------------------------------------------------------------- /git_img/db_history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brick-li/ops-vue/70c86d46ad57603d067917717969b201151e6283/git_img/db_history.png -------------------------------------------------------------------------------- /git_img/db_instance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brick-li/ops-vue/70c86d46ad57603d067917717969b201151e6283/git_img/db_instance.png -------------------------------------------------------------------------------- /git_img/edit_script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brick-li/ops-vue/70c86d46ad57603d067917717969b201151e6283/git_img/edit_script.png -------------------------------------------------------------------------------- /git_img/excuting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brick-li/ops-vue/70c86d46ad57603d067917717969b201151e6283/git_img/excuting.png -------------------------------------------------------------------------------- /git_img/execute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brick-li/ops-vue/70c86d46ad57603d067917717969b201151e6283/git_img/execute.png -------------------------------------------------------------------------------- /git_img/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brick-li/ops-vue/70c86d46ad57603d067917717969b201151e6283/git_img/login.png -------------------------------------------------------------------------------- /git_img/module_tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brick-li/ops-vue/70c86d46ad57603d067917717969b201151e6283/git_img/module_tree.png -------------------------------------------------------------------------------- /git_img/product_info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brick-li/ops-vue/70c86d46ad57603d067917717969b201151e6283/git_img/product_info.png -------------------------------------------------------------------------------- /git_img/script_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brick-li/ops-vue/70c86d46ad57603d067917717969b201151e6283/git_img/script_list.png -------------------------------------------------------------------------------- /nginx.conf/vue.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 8000; 3 | index index.html index.htm index.php; 4 | root /app/; 5 | error_page 404 /404.html; 6 | error_page 502 /502.html; 7 | 8 | location / { 9 | try_files $uri $uri/ /index.html; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "element-starter", 3 | "description": "A Vue.js project", 4 | "author": "yi.shyang@ele.me", 5 | "private": true, 6 | "scripts": { 7 | "dev": "webpack-dev-server --inline --hot --env.dev", 8 | "build": "rimraf dist && webpack -p --progress --hide-modules" 9 | }, 10 | "dependencies": { 11 | "@vue/cli-service": "^3.2.0", 12 | "axios": "^0.18.0", 13 | "babel-helper-vue-jsx-merge-props": "^2.0.3", 14 | "babel-plugin-syntax-jsx": "^6.18.0", 15 | "babel-plugin-transform-vue-jsx": "^3.7.0", 16 | "element-ui": "^2.3.4", 17 | "monaco-editor": "^0.15.6", 18 | "qs": "^6.6.0", 19 | "vue": "^2.5.16", 20 | "vue-monaco-editor": "0.0.19", 21 | "vue-router": "^3.0.2" 22 | }, 23 | "engines": { 24 | "node": ">=6" 25 | }, 26 | "devDependencies": { 27 | "autoprefixer": "^6.6.0", 28 | "babel": "^6.23.0", 29 | "babel-core": "^6.24.1", 30 | "babel-loader": "^6.4.0", 31 | "babel-plugin-component": "^1.1.1", 32 | "babel-preset-es2015": "^6.24.1", 33 | "babel-preset-vue-app": "^1.2.0", 34 | "copy-webpack-plugin": "^4.6.0", 35 | "css-loader": "^0.27.3", 36 | "file-loader": "^0.10.1", 37 | "html-webpack-plugin": "^2.24.1", 38 | "postcss-loader": "^1.3.3", 39 | "rimraf": "^2.5.4", 40 | "style-loader": "^0.13.2", 41 | "uglifyjs-webpack-plugin": "^2.0.1", 42 | "url-loader": "^0.5.8", 43 | "vue-html-loader": "^1.2.4", 44 | "vue-loader": "^13.7.3", 45 | "vue-style-loader": "^4.1.2", 46 | "vue-template-compiler": "^2.5.16", 47 | "webpack": "^2.4.1", 48 | "webpack-dev-server": "^2.4.2" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('autoprefixer')() 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 45 | 46 | 188 | 189 | 207 | 208 | 211 | -------------------------------------------------------------------------------- /src/assets/js/axios.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | import getUrl from '../../config/api_url' 3 | import qs from 'qs' 4 | import router from '../../router' 5 | 6 | export default { 7 | AxiosGet(config) { 8 | axios.get( 9 | getUrl(config.url), 10 | { 11 | headers: { 12 | sessionid: sessionStorage.getItem('session_id') 13 | }, 14 | params: config.params 15 | }).then ((res) => { 16 | stateDetection(res); 17 | config.callback && config.callback(res); 18 | }); 19 | //}else{ 20 | // router.push({name: 'Login'}); 21 | //} 22 | }, 23 | AxiosPost(config) { 24 | //if (sessionStorage.hasOwnProperty('session_id')){ 25 | //console.log(config); 26 | axios.post( 27 | getUrl(config.url), 28 | qs.stringify(config.params), 29 | { 30 | headers: { 31 | sessionid: sessionStorage.getItem('session_id') 32 | } 33 | }).then((res) => { 34 | //console.log(res.data); 35 | if (res.data.result==='needLogin'){ 36 | router.push({name: 'Login'}); 37 | }else{ 38 | stateDetection(res); 39 | config.callback && config.callback(res); 40 | } 41 | }) 42 | //}else{ 43 | // router.push({name: 'Login'}); 44 | //} 45 | } 46 | 47 | } 48 | //状态检测 49 | let stateDetection = (data, callback) => { 50 | let status = data.status_code; 51 | switch (status) { 52 | case 102: 53 | break; 54 | case 103: 55 | alert(data.content); 56 | break; 57 | case 404: 58 | window.location.href = data.url; 59 | break; 60 | } 61 | }; -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brick-li/ops-vue/70c86d46ad57603d067917717969b201151e6283/src/assets/logo.png -------------------------------------------------------------------------------- /src/cmdb/cmdb_pool.vue: -------------------------------------------------------------------------------- 1 | 106 | 107 | -------------------------------------------------------------------------------- /src/cmdb/product_info.vue: -------------------------------------------------------------------------------- 1 | 90 | 91 | -------------------------------------------------------------------------------- /src/cmdb/user_auth.vue: -------------------------------------------------------------------------------- 1 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /src/components/coder.vue: -------------------------------------------------------------------------------- 1 | 41 | 42 | 190 | 191 | 192 | 193 | -------------------------------------------------------------------------------- /src/components/login.vue: -------------------------------------------------------------------------------- 1 | 2 | 24 | 25 | 90 | -------------------------------------------------------------------------------- /src/config/api_url.js: -------------------------------------------------------------------------------- 1 | export default function getUrl(str) { 2 | let run_mode = process.env.OPS_RUN_MODE; 3 | let url = ''; 4 | if (run_mode==='DEPLOY'){ 5 | url = 'your domain' + str; 6 | }else { 7 | url = 'http://127.0.0.1:8000/' + str; 8 | } 9 | return url; 10 | } -------------------------------------------------------------------------------- /src/db_job/db_backup.vue: -------------------------------------------------------------------------------- 1 | 54 | 55 | 135 | 136 | -------------------------------------------------------------------------------- /src/db_job/db_backup_history.vue: -------------------------------------------------------------------------------- 1 | 46 | 47 | 92 | 93 | -------------------------------------------------------------------------------- /src/db_job/db_instance.vue: -------------------------------------------------------------------------------- 1 | 166 | 167 | 168 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ops 7 | 8 | 9 | 10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue'; 4 | import ElementUI from 'element-ui'; 5 | import 'element-ui/lib/theme-chalk/index.css'; 6 | import App from './App' 7 | import Login from './components/login' 8 | import router from './router.js'; 9 | 10 | 11 | 12 | //import { Button, Container } from 'element-ui'; 13 | 14 | //Vue.use(Button); 15 | //Vue.use(Container); 16 | 17 | //Vue.use(ElementUI); 18 | Vue.use(ElementUI); 19 | 20 | Vue.config.productionTip = false; 21 | 22 | new Vue({ 23 | el: '#container_main', 24 | router, 25 | components: { App }, 26 | template: '', 27 | }); 28 | -------------------------------------------------------------------------------- /src/ops_job/excute_model.vue: -------------------------------------------------------------------------------- 1 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /src/ops_job/script_create.vue: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /src/ops_job/script_cron_edit.vue: -------------------------------------------------------------------------------- 1 | 91 | 92 | -------------------------------------------------------------------------------- /src/ops_job/script_cron_list.vue: -------------------------------------------------------------------------------- 1 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /src/ops_job/script_edit.vue: -------------------------------------------------------------------------------- 1 | 42 | 43 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /src/ops_job/script_excutor.vue: -------------------------------------------------------------------------------- 1 | 82 | 83 | -------------------------------------------------------------------------------- /src/ops_job/script_history.vue: -------------------------------------------------------------------------------- 1 | 76 | 77 | 158 | 159 | -------------------------------------------------------------------------------- /src/ops_job/script_history_detail.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 58 | 59 | -------------------------------------------------------------------------------- /src/router.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | 4 | import ScriptEdit from './ops_job/script_edit' 5 | import ScriptCreate from './ops_job/script_create' 6 | import coder from './components/coder' 7 | import ScriptCronList from './ops_job/script_cron_list' 8 | import ScriptCronEdit from './ops_job/script_cron_edit' 9 | import ScriptHistory from './ops_job/script_history' 10 | import ScriptHistoryDetail from './ops_job/script_history_detail' 11 | import ScriptExcutor from './ops_job/script_excutor' 12 | import CmdbMoudleTree from './cmdb/module_tree' 13 | import CmdbPool from './cmdb/cmdb_pool' 14 | import CmdbProductInfo from './cmdb/product_info' 15 | import CmdbUserAuth from './cmdb/user_auth' 16 | import DbJobInstance from './db_job/db_instance' 17 | import DbJobBackup from './db_job/db_backup' 18 | import DbJobBackupHistory from './db_job/db_backup_history' 19 | import UserLogin from './components/login' 20 | 21 | Vue.use(Router); 22 | 23 | const NotFound = { template: '

Page not found

' }; 24 | const Home = { template: '

home page

' }; 25 | const About = { template: '

about page

' }; 26 | 27 | let run_mode = process.env.OPS_RUN_MODE; 28 | let router_mode = 'hash'; 29 | if (run_mode==='DEPLOY'){ 30 | router_mode = 'hash'; 31 | }else{ 32 | router_mode = 'history'; 33 | } 34 | 35 | const router = new Router ({ 36 | mode: router_mode, 37 | routes: [ 38 | { 39 | path: '/login/user_login', // 登录 40 | name: 'Login', 41 | component: UserLogin, 42 | meta: { 43 | loginRequire: true 44 | } 45 | }, 46 | 47 | { 48 | path: '/ops_job/script_cron_list', //定时任务列表 49 | name: 'ops_job_script_cron_list', 50 | component: ScriptCronList 51 | }, 52 | { 53 | path: '/ops_job/script_cron_edit', //定时任务编辑 54 | name: 'ops_job_script_cron_edit', 55 | component: ScriptCronEdit, 56 | }, 57 | { 58 | path: '/ops_job/script_create', //创建脚本 59 | name: 'ops_job_script_create', 60 | component: ScriptCreate 61 | }, 62 | { 63 | path: '/ops_job/script_edit', //脚本列表 64 | name: 'ops_job_script_edit', 65 | component: ScriptEdit 66 | }, 67 | { 68 | path: '/ops_job/script_history', //执行历史记录列表 69 | name: 'script_history', 70 | component: ScriptHistory 71 | }, 72 | { 73 | path: '/ops_job/script_history_detail', //执行历史详细记录 74 | name: 'script_history_detail', 75 | component: ScriptHistoryDetail, 76 | }, 77 | { 78 | path: '/ops_job/script_excutor', //执行脚本 79 | name: 'script_excutor', 80 | component: ScriptExcutor, 81 | }, 82 | 83 | { 84 | path: '/coder', 85 | name: 'coder', 86 | component: coder, 87 | }, 88 | { 89 | path: '/cmdb/cmdb_pool', //设备资源池 90 | name: 'cmdb_pool', 91 | component: CmdbPool, 92 | }, 93 | { 94 | path: '/cmdb/module_tree', //资源目录树 95 | name: 'cmdb_module_tree', 96 | component: CmdbMoudleTree, 97 | }, 98 | { 99 | path: '/cmdb/product_info', //业务列表 100 | name: 'cmdb_product_info', 101 | component: CmdbProductInfo, 102 | }, 103 | { 104 | path: '/cmdb/user_auth', 105 | name: 'cmdb_user_auth', 106 | component: CmdbUserAuth, 107 | }, 108 | { 109 | path: '/db_job/db_instance', 110 | name: 'db_job_db_instance', 111 | component: DbJobInstance, 112 | }, 113 | { 114 | path: '/db_job/db_backup', 115 | name: 'db_backup', 116 | component: DbJobBackup, 117 | }, 118 | { 119 | path: '/db_job/db_backup_history', 120 | name: 'db_job_db_backup_history', 121 | component: DbJobBackupHistory, 122 | } 123 | ], 124 | beforeEach(){ 125 | console.log("test"); 126 | } 127 | }); 128 | 129 | 130 | router.beforeEach((to, from, next) => { 131 | const isLogin = sessionStorage.getItem('session_id'); 132 | if (isLogin) { 133 | next() 134 | } else { 135 | if (to.path === '/login/user_login') { //这就是跳出循环的关键 136 | next() 137 | } else { 138 | next('/login/user_login') 139 | } 140 | } 141 | }); 142 | 143 | export default router -------------------------------------------------------------------------------- /src/static/css/navicon.css: -------------------------------------------------------------------------------- 1 | .navimage { 2 | background: url('../image/job.png'); 3 | } 4 | 5 | [class^="icon"], [class*=" icon"]/*这里有空格*/ 6 | { font-family: "navicon" !important; 7 | font-size: 16px; 8 | font-style: normal; 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; } -------------------------------------------------------------------------------- /src/static/fonts/icon/demo.css: -------------------------------------------------------------------------------- 1 | *{margin: 0;padding: 0;list-style: none;} 2 | /* 3 | KISSY CSS Reset 4 | 理念:1. reset 的目的不是清除浏览器的默认样式,这仅是部分工作。清除和重置是紧密不可分的。 5 | 2. reset 的目的不是让默认样式在所有浏览器下一致,而是减少默认样式有可能带来的问题。 6 | 3. reset 期望提供一套普适通用的基础样式。但没有银弹,推荐根据具体需求,裁剪和修改后再使用。 7 | 特色:1. 适应中文;2. 基于最新主流浏览器。 8 | 维护:玉伯, 正淳 9 | */ 10 | 11 | /** 清除内外边距 **/ 12 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */ 13 | dl, dt, dd, ul, ol, li, /* list elements 列表元素 */ 14 | pre, /* text formatting elements 文本格式元素 */ 15 | form, fieldset, legend, button, input, textarea, /* form elements 表单元素 */ 16 | th, td /* table elements 表格元素 */ { 17 | margin: 0; 18 | padding: 0; 19 | } 20 | 21 | /** 设置默认字体 **/ 22 | body, 23 | button, input, select, textarea /* for ie */ { 24 | font: 12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif; 25 | } 26 | h1, h2, h3, h4, h5, h6 { font-size: 100%; } 27 | address, cite, dfn, em, var { font-style: normal; } /* 将斜体扶正 */ 28 | code, kbd, pre, samp { font-family: courier new, courier, monospace; } /* 统一等宽字体 */ 29 | small { font-size: 12px; } /* 小于 12px 的中文很难阅读,让 small 正常化 */ 30 | 31 | /** 重置列表元素 **/ 32 | ul, ol { list-style: none; } 33 | 34 | /** 重置文本格式元素 **/ 35 | a { text-decoration: none; } 36 | a:hover { text-decoration: underline; } 37 | 38 | 39 | /** 重置表单元素 **/ 40 | legend { color: #000; } /* for ie6 */ 41 | fieldset, img { border: 0; } /* img 搭车:让链接里的 img 无边框 */ 42 | button, input, select, textarea { font-size: 100%; } /* 使得表单元素在 ie 下能继承字体大小 */ 43 | /* 注:optgroup 无法扶正 */ 44 | 45 | /** 重置表格元素 **/ 46 | table { border-collapse: collapse; border-spacing: 0; } 47 | 48 | /* 清除浮动 */ 49 | .ks-clear:after, .clear:after { 50 | content: '\20'; 51 | display: block; 52 | height: 0; 53 | clear: both; 54 | } 55 | .ks-clear, .clear { 56 | *zoom: 1; 57 | } 58 | 59 | .main { 60 | padding: 30px 100px; 61 | width: 960px; 62 | margin: 0 auto; 63 | } 64 | .main h1{font-size:36px; color:#333; text-align:left;margin-bottom:30px; border-bottom: 1px solid #eee;} 65 | 66 | .helps{margin-top:40px;} 67 | .helps pre{ 68 | padding:20px; 69 | margin:10px 0; 70 | border:solid 1px #e7e1cd; 71 | background-color: #fffdef; 72 | overflow: auto; 73 | } 74 | 75 | .icon_lists{ 76 | width: 100% !important; 77 | 78 | } 79 | 80 | .icon_lists li{ 81 | float:left; 82 | width: 100px; 83 | height:180px; 84 | text-align: center; 85 | list-style: none !important; 86 | } 87 | .icon_lists .icon{ 88 | font-size: 42px; 89 | line-height: 100px; 90 | margin: 10px 0; 91 | color:#333; 92 | -webkit-transition: font-size 0.25s ease-out 0s; 93 | -moz-transition: font-size 0.25s ease-out 0s; 94 | transition: font-size 0.25s ease-out 0s; 95 | 96 | } 97 | .icon_lists .icon:hover{ 98 | font-size: 100px; 99 | } 100 | 101 | 102 | 103 | .markdown { 104 | color: #666; 105 | font-size: 14px; 106 | line-height: 1.8; 107 | } 108 | 109 | .highlight { 110 | line-height: 1.5; 111 | } 112 | 113 | .markdown img { 114 | vertical-align: middle; 115 | max-width: 100%; 116 | } 117 | 118 | .markdown h1 { 119 | color: #404040; 120 | font-weight: 500; 121 | line-height: 40px; 122 | margin-bottom: 24px; 123 | } 124 | 125 | .markdown h2, 126 | .markdown h3, 127 | .markdown h4, 128 | .markdown h5, 129 | .markdown h6 { 130 | color: #404040; 131 | margin: 1.6em 0 0.6em 0; 132 | font-weight: 500; 133 | clear: both; 134 | } 135 | 136 | .markdown h1 { 137 | font-size: 28px; 138 | } 139 | 140 | .markdown h2 { 141 | font-size: 22px; 142 | } 143 | 144 | .markdown h3 { 145 | font-size: 16px; 146 | } 147 | 148 | .markdown h4 { 149 | font-size: 14px; 150 | } 151 | 152 | .markdown h5 { 153 | font-size: 12px; 154 | } 155 | 156 | .markdown h6 { 157 | font-size: 12px; 158 | } 159 | 160 | .markdown hr { 161 | height: 1px; 162 | border: 0; 163 | background: #e9e9e9; 164 | margin: 16px 0; 165 | clear: both; 166 | } 167 | 168 | .markdown p, 169 | .markdown pre { 170 | margin: 1em 0; 171 | } 172 | 173 | .markdown > p, 174 | .markdown > blockquote, 175 | .markdown > .highlight, 176 | .markdown > ol, 177 | .markdown > ul { 178 | width: 80%; 179 | } 180 | 181 | .markdown ul > li { 182 | list-style: circle; 183 | } 184 | 185 | .markdown > ul li, 186 | .markdown blockquote ul > li { 187 | margin-left: 20px; 188 | padding-left: 4px; 189 | } 190 | 191 | .markdown > ul li p, 192 | .markdown > ol li p { 193 | margin: 0.6em 0; 194 | } 195 | 196 | .markdown ol > li { 197 | list-style: decimal; 198 | } 199 | 200 | .markdown > ol li, 201 | .markdown blockquote ol > li { 202 | margin-left: 20px; 203 | padding-left: 4px; 204 | } 205 | 206 | .markdown code { 207 | margin: 0 3px; 208 | padding: 0 5px; 209 | background: #eee; 210 | border-radius: 3px; 211 | } 212 | 213 | .markdown pre { 214 | border-radius: 6px; 215 | background: #f7f7f7; 216 | padding: 20px; 217 | } 218 | 219 | .markdown pre code { 220 | border: none; 221 | background: #f7f7f7; 222 | margin: 0; 223 | } 224 | 225 | .markdown strong, 226 | .markdown b { 227 | font-weight: 600; 228 | } 229 | 230 | .markdown > table { 231 | border-collapse: collapse; 232 | border-spacing: 0px; 233 | empty-cells: show; 234 | border: 1px solid #e9e9e9; 235 | width: 95%; 236 | margin-bottom: 24px; 237 | } 238 | 239 | .markdown > table th { 240 | white-space: nowrap; 241 | color: #333; 242 | font-weight: 600; 243 | 244 | } 245 | 246 | .markdown > table th, 247 | .markdown > table td { 248 | border: 1px solid #e9e9e9; 249 | padding: 8px 16px; 250 | text-align: left; 251 | } 252 | 253 | .markdown > table th { 254 | background: #F7F7F7; 255 | } 256 | 257 | .markdown blockquote { 258 | font-size: 90%; 259 | color: #999; 260 | border-left: 4px solid #e9e9e9; 261 | padding-left: 0.8em; 262 | margin: 1em 0; 263 | font-style: italic; 264 | } 265 | 266 | .markdown blockquote p { 267 | margin: 0; 268 | } 269 | 270 | .markdown .anchor { 271 | opacity: 0; 272 | transition: opacity 0.3s ease; 273 | margin-left: 8px; 274 | } 275 | 276 | .markdown .waiting { 277 | color: #ccc; 278 | } 279 | 280 | .markdown h1:hover .anchor, 281 | .markdown h2:hover .anchor, 282 | .markdown h3:hover .anchor, 283 | .markdown h4:hover .anchor, 284 | .markdown h5:hover .anchor, 285 | .markdown h6:hover .anchor { 286 | opacity: 1; 287 | display: inline-block; 288 | } 289 | 290 | .markdown > br, 291 | .markdown > p > br { 292 | clear: both; 293 | } 294 | 295 | 296 | .hljs { 297 | display: block; 298 | background: white; 299 | padding: 0.5em; 300 | color: #333333; 301 | overflow-x: auto; 302 | } 303 | 304 | .hljs-comment, 305 | .hljs-meta { 306 | color: #969896; 307 | } 308 | 309 | .hljs-string, 310 | .hljs-variable, 311 | .hljs-template-variable, 312 | .hljs-strong, 313 | .hljs-emphasis, 314 | .hljs-quote { 315 | color: #df5000; 316 | } 317 | 318 | .hljs-keyword, 319 | .hljs-selector-tag, 320 | .hljs-type { 321 | color: #a71d5d; 322 | } 323 | 324 | .hljs-literal, 325 | .hljs-symbol, 326 | .hljs-bullet, 327 | .hljs-attribute { 328 | color: #0086b3; 329 | } 330 | 331 | .hljs-section, 332 | .hljs-name { 333 | color: #63a35c; 334 | } 335 | 336 | .hljs-tag { 337 | color: #333333; 338 | } 339 | 340 | .hljs-title, 341 | .hljs-attr, 342 | .hljs-selector-id, 343 | .hljs-selector-class, 344 | .hljs-selector-attr, 345 | .hljs-selector-pseudo { 346 | color: #795da3; 347 | } 348 | 349 | .hljs-addition { 350 | color: #55a532; 351 | background-color: #eaffea; 352 | } 353 | 354 | .hljs-deletion { 355 | color: #bd2c00; 356 | background-color: #ffecec; 357 | } 358 | 359 | .hljs-link { 360 | text-decoration: underline; 361 | } 362 | 363 | pre{ 364 | background: #fff; 365 | } 366 | 367 | 368 | 369 | 370 | 371 | -------------------------------------------------------------------------------- /src/static/fonts/icon/iconfont.css: -------------------------------------------------------------------------------- 1 | 2 | @font-face {font-family: "iconfont"; 3 | src: url('iconfont.eot?t=1544082994516'); /* IE9*/ 4 | src: url('iconfont.eot?t=1544082994516#iefix') format('embedded-opentype'), /* IE6-IE8 */ 5 | url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAA7UAAsAAAAAGgQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY8eUgCY21hcAAAAYAAAACLAAACJhBj601nbHlmAAACDAAACjoAABJsv0TjOGhlYWQAAAxIAAAAMQAAADYTfDJhaGhlYQAADHwAAAAgAAAAJAfdA5BobXR4AAAMnAAAABMAAAA8PAD//2xvY2EAAAywAAAAIAAAACAbGh8SbWF4cAAADNAAAAAfAAAAIAFBAYJuYW1lAAAM8AAAAUUAAAJtPlT+fXBvc3QAAA44AAAAmgAAAM02vaofeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWCcwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeMT3jZ27438AQw9zI0AgUZgTJAQDegAv2eJztke0NwyAMBS8JIV+ELNIROlB/db5OxBqpH69j1NJZ8mEQsoEZmIJHkGB4M6B4hR26n9i7Tzx7T5Jv131HHpWjTj2P0ZvixczCyhb3DgonNQ4z/yg9f35V1fxMn+hkkEtGm2mz0YxbNtpaWwxyq0FuM8jtBrnDaJutGOROo9+1apC7DPULYgwjpQB4nK1YfWwcxRWft3O3e7t3t3f7cbt35/ju9j72bN/ZDvbdXpTgs5M4JDGkdQIxiI9gQiFAkCpoaIACdlqo2iqtRJoikFDqFIlSEC1SCaKqqhwFgQL/VEWpShW1BopaisofSJVA8q37Zvfs2CImUktu/d6892bezrx57zezIUFCFudpi+ZIinSTXrKRTBBSqjlDRjfIIFgDUFaa0LAyYCYsxVLqViLYhAwIVIYBaIDdBCMLhh4DJo9CyRkAPga8jsomDAKdVdep0KUvzOtdgJzmkC+0KGkTjguaaSkw61HgRU5PSQ+FQg9JKZ0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zI5DLwcAEEgUAGiwLEQAAAHicY2BkYGBu+N/AEMPC8P8/AwMLAwNQBAXwAwB15gR2eJxjYWBgYCEK//+PLgYAKpkCOwAAAAAAAHoA/gGcAegCjANKA94ETARyBRAFrAZQCHwJNnicY2BkYGDgZyxj0GAAASYg5gJCBob/YD4DABkXAcUAeJxlj01OwzAQhV/6B6QSqqhgh+QFYgEo/RGrblhUavdddN+mTpsqiSPHrdQDcB6OwAk4AtyAO/BIJ5s2lsffvHljTwDc4Acejt8t95E9XDI7cg0XuBeuU38QbpBfhJto41W4Rf1N2MczpsJtdGF5g9e4YvaEd2EPHXwI13CNT+E69S/hBvlbuIk7/Aq30PHqwj7mXle4jUcv9sdWL5xeqeVBxaHJIpM5v4KZXu+Sha3S6pxrW8QmU4OgX0lTnWlb3VPs10PnIhVZk6oJqzpJjMqt2erQBRvn8lGvF4kehCblWGP+tsYCjnEFhSUOjDFCGGSIyujoO1Vm9K+xQ8Jee1Y9zed0WxTU/3OFAQL0z1xTurLSeTpPgT1fG1J1dCtuy56UNJFezUkSskJe1rZUQuoBNmVXjhF6XNGJPyhnSP8ACVpuyAAAAHicbYzbDoIwEES7yEVAwB/xm8zSlrICW2xdI39vE189L3OSyYzK1I9G/WeADE6QQwElVHCGGhpo4QId9DDAVbVxtqOlBWnC5PKQBXlE7g9id3h2TpBXqkl7vk84Sm+QUh9n+hCy67RNmk74mQaVQ/9IWepZtHBh0AfJV4+m0qvElw3d5o2s9rb5RZDKaMPbhhz3PSr1Bf+GNJcAAA==') format('woff'), 6 | url('iconfont.ttf?t=1544082994516') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ 7 | url('iconfont.svg?t=1544082994516#iconfont') format('svg'); /* iOS 4.1- */ 8 | } 9 | 10 | .iconfont { 11 | font-family:"iconfont" !important; 12 | font-size:16px; 13 | font-style:normal; 14 | -webkit-font-smoothing: antialiased; 15 | -moz-osx-font-smoothing: grayscale; 16 | } 17 | 18 | [class^="icon"], [class*=" icon"] /*这里有空格*/ 19 | { font-family: "iconfont" !important; 20 | font-size: 12px; 21 | font-style: normal; 22 | margin: 5px; 23 | -webkit-font-smoothing: antialiased; 24 | -moz-osx-font-smoothing: grayscale; } 25 | 26 | .icon-shebeikaifa:before { content: "\e602"; } 27 | 28 | .icon-shujukanban:before { content: "\e603"; } 29 | 30 | .icon-yingyongguanli:before { content: "\e604"; } 31 | 32 | .icon-icon_fabu:before { content: "\e605"; } 33 | 34 | .icon-daibanshixiang:before { content: "\e606"; } 35 | 36 | .icon-ceshishenqing:before { content: "\e607"; } 37 | 38 | .icon-gaojing:before { content: "\e608"; } 39 | 40 | .icon-chucun:before { content: "\e609"; } 41 | 42 | .icon-daoru:before { content: "\e60a"; } 43 | 44 | .icon-load:before { content: "\e60b"; } 45 | 46 | .icon-cluster:before { content: "\e60c"; } 47 | 48 | .icon-module-mokuai:before { content: "\e60d"; } 49 | 50 | .icon-server:before { content: "\e60e"; } 51 | 52 | .icon-apps:before { content: "\e60f"; } 53 | 54 | -------------------------------------------------------------------------------- /src/static/fonts/icon/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brick-li/ops-vue/70c86d46ad57603d067917717969b201151e6283/src/static/fonts/icon/iconfont.eot -------------------------------------------------------------------------------- /src/static/fonts/icon/iconfont.js: -------------------------------------------------------------------------------- 1 | !function(o){var a,i='',c=(a=document.getElementsByTagName("script"))[a.length-1].getAttribute("data-injectcss");if(c&&!o.__iconfont__svg__cssinject__){o.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}!function(a){if(document.addEventListener)if(~["complete","loaded","interactive"].indexOf(document.readyState))setTimeout(a,0);else{var c=function(){document.removeEventListener("DOMContentLoaded",c,!1),a()};document.addEventListener("DOMContentLoaded",c,!1)}else document.attachEvent&&(t=a,l=o.document,h=!1,e=function(){h||(h=!0,t())},(i=function(){try{l.documentElement.doScroll("left")}catch(a){return void setTimeout(i,50)}e()})(),l.onreadystatechange=function(){"complete"==l.readyState&&(l.onreadystatechange=null,e())});var t,l,h,e,i}(function(){var a,c,t,l,h,e;(a=document.createElement("div")).innerHTML=i,i=null,(c=a.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",t=c,(l=document.body).firstChild?(h=t,(e=l.firstChild).parentNode.insertBefore(h,e)):l.appendChild(t))})}(window); -------------------------------------------------------------------------------- /src/static/fonts/icon/iconfont.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | Created by iconfont 9 | 10 | 11 | 12 | 13 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/static/fonts/icon/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brick-li/ops-vue/70c86d46ad57603d067917717969b201151e6283/src/static/fonts/icon/iconfont.ttf -------------------------------------------------------------------------------- /src/static/fonts/icon/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brick-li/ops-vue/70c86d46ad57603d067917717969b201151e6283/src/static/fonts/icon/iconfont.woff -------------------------------------------------------------------------------- /src/static/image/job.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brick-li/ops-vue/70c86d46ad57603d067917717969b201151e6283/src/static/image/job.png -------------------------------------------------------------------------------- /src/static/image/node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brick-li/ops-vue/70c86d46ad57603d067917717969b201151e6283/src/static/image/node.png -------------------------------------------------------------------------------- /src/store.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | 4 | Vue.use(Vuex) 5 | 6 | export default new Vuex.Store({ 7 | state: { 8 | 9 | }, 10 | mutations: { 11 | 12 | }, 13 | actions: { 14 | 15 | } 16 | }) 17 | -------------------------------------------------------------------------------- /src/vendor.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import ElementUI from 'element-ui' -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const resolve = require('path').resolve 2 | const webpack = require('webpack') 3 | const HtmlWebpackPlugin = require('html-webpack-plugin') 4 | const url = require('url') 5 | const publicPath = '' 6 | const CopyWebpackPlugin = require('copy-webpack-plugin'); 7 | 8 | module.exports = (options = {}) => ({ 9 | entry: { 10 | vendor: './src/vendor', 11 | index: './src/main.js' 12 | }, 13 | output: { 14 | path: resolve(__dirname, 'dist'), 15 | filename: options.dev ? '[name].js' : '[name].js?[chunkhash]', 16 | chunkFilename: '[id].js?[chunkhash]', 17 | publicPath: options.dev ? '/assets/' : publicPath 18 | }, 19 | module: { 20 | rules: [{ 21 | test: /\.vue$/, 22 | use: ['vue-loader'] 23 | }, 24 | { 25 | test: /\.js$/, 26 | use: [{ 27 | loader: 'babel-loader', 28 | options: { 29 | presets: ['es2015'] 30 | } 31 | }], 32 | exclude: /node_modules\/(?!(vue-monaco-editor)\/).*/, 33 | }, 34 | { 35 | test: /\.css$/, 36 | use: ['style-loader', 'css-loader', 'postcss-loader'] 37 | }, 38 | { 39 | test: /\.(png|jpg|jpeg|gif|eot|ttf|woff|woff2|svg|svgz)(\?.+)?$/, 40 | use: [{ 41 | loader: 'url-loader', 42 | options: { 43 | limit: 10000 44 | } 45 | }] 46 | } 47 | ] 48 | }, 49 | plugins: [ 50 | new webpack.optimize.CommonsChunkPlugin({ 51 | names: ['vendor', 'manifest'] 52 | }), 53 | new HtmlWebpackPlugin({ 54 | template: 'src/index.html' 55 | }), 56 | new CopyWebpackPlugin([ 57 | { 58 | from: 'node_modules/monaco-editor/min/vs', 59 | to: 'vs', 60 | } 61 | ]), 62 | new webpack.DefinePlugin({ 63 | 'process.env': { 64 | OPS_RUN_MODE: JSON.stringify(process.env.OPS_RUN_MODE) 65 | } 66 | }) 67 | ], 68 | resolve: { 69 | alias: { 70 | 'vue$': 'vue/dist/vue.esm.js', 71 | '~': resolve(__dirname, 'src') 72 | }, 73 | extensions: ['.js', '.vue', '.json', '.css'] 74 | }, 75 | devServer: { 76 | host: '127.0.0.1', 77 | port: 8010, 78 | proxy: { 79 | '/api/': { 80 | target: 'http://127.0.0.1:8000', 81 | changeOrigin: true, 82 | pathRewrite: { 83 | '^/api': '' 84 | } 85 | } 86 | }, 87 | historyApiFallback: { 88 | index: url.parse(options.dev ? '/assets/' : publicPath).pathname 89 | } 90 | }, 91 | devtool: options.dev ? '#eval-source-map' : '#source-map', 92 | }) 93 | --------------------------------------------------------------------------------