Browse Source

Add form-create plug-in and alarm group management add sample demo

pull/3/MERGE
break60 4 years ago committed by gaojun2048
parent
commit
ab884dfde6
  1. 1
      dolphinscheduler-dist/release-docs/LICENSE
  2. 21
      dolphinscheduler-dist/release-docs/licenses/ui-licenses/LICENSE-@form-create-element-ui
  3. 5
      dolphinscheduler-ui/package.json
  4. 4
      dolphinscheduler-ui/src/js/conf/home/index.js
  5. 51
      dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue
  6. 4
      dolphinscheduler-ui/src/js/conf/login/index.js

1
dolphinscheduler-dist/release-docs/LICENSE vendored

@ -484,6 +484,7 @@ The text of each license is also included at licenses/ui-licenses/LICENSE-[proje
======================================== ========================================
MIT licenses MIT licenses
======================================== ========================================
@form-create/element-ui 1.0.18: https://github.com/xaboy/form-create MIT
ans-UI 1.1.7: https://github.com/analysys/ans-ui MIT ans-UI 1.1.7: https://github.com/analysys/ans-ui MIT
axios 0.16.2: https://github.com/axios/axios MIT axios 0.16.2: https://github.com/axios/axios MIT
bootstrap 3.3.7: https://github.com/twbs/bootstrap MIT bootstrap 3.3.7: https://github.com/twbs/bootstrap MIT

21
dolphinscheduler-dist/release-docs/licenses/ui-licenses/LICENSE-@form-create-element-ui vendored

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2018 xaboy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

5
dolphinscheduler-ui/package.json

@ -12,6 +12,7 @@
"build:release": "npm run clean && cross-env NODE_ENV=production PUBLIC_PATH=/dolphinscheduler/ui webpack --config ./build/webpack.config.release.js" "build:release": "npm run clean && cross-env NODE_ENV=production PUBLIC_PATH=/dolphinscheduler/ui webpack --config ./build/webpack.config.release.js"
}, },
"dependencies": { "dependencies": {
"@form-create/element-ui": "^1.0.18",
"@riophae/vue-treeselect": "^0.4.0", "@riophae/vue-treeselect": "^0.4.0",
"ans-ui": "1.1.9", "ans-ui": "1.1.9",
"axios": "^0.16.2", "axios": "^0.16.2",
@ -22,8 +23,8 @@
"d3": "^3.5.17", "d3": "^3.5.17",
"dagre": "^0.8.5", "dagre": "^0.8.5",
"dayjs": "^1.7.8", "dayjs": "^1.7.8",
"element-ui": "2.13.2",
"echarts": "4.1.0", "echarts": "4.1.0",
"element-ui": "2.13.2",
"html2canvas": "^0.5.0-beta4", "html2canvas": "^0.5.0-beta4",
"jquery": "3.3.1", "jquery": "3.3.1",
"jquery-ui": "^1.12.1", "jquery-ui": "^1.12.1",
@ -32,7 +33,7 @@
"lodash": "^4.17.11", "lodash": "^4.17.11",
"normalize.css": "^8.0.1", "normalize.css": "^8.0.1",
"vue": "^2.5.17", "vue": "^2.5.17",
"vue-router": "2.7.0", "vue-router": "^2.7.0",
"vuex": "^3.0.0", "vuex": "^3.0.0",
"vuex-router-sync": "^5.0.0" "vuex-router-sync": "^5.0.0"
}, },

4
dolphinscheduler-ui/src/js/conf/home/index.js

@ -38,6 +38,8 @@ import 'bootstrap/dist/css/bootstrap.min.css'
import 'bootstrap/dist/js/bootstrap.min.js' import 'bootstrap/dist/js/bootstrap.min.js'
import 'canvg/dist/browser/canvg.min.js' import 'canvg/dist/browser/canvg.min.js'
import formCreate, {maker} from '@form-create/element-ui'
// Component internationalization // Component internationalization
const useOpt = i18n.globalScope.LOCALE === 'en_US' ? { locale: en_US } : {} const useOpt = i18n.globalScope.LOCALE === 'en_US' ? { locale: en_US } : {}
@ -46,6 +48,8 @@ Vue.use(ElementUI)
// Vue.use(ans) // Vue.use(ans)
Vue.use(ans, useOpt) Vue.use(ans, useOpt)
Vue.use(formCreate)
sync(store, router) sync(store, router)
Vue.config.devtools = true Vue.config.devtools = true

51
dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue

@ -16,6 +16,9 @@
*/ */
<template> <template>
<div class="list-model"> <div class="list-model">
<div>
<form-create v-model="fApi" :rule="rule" :option="option"></form-create>
</div>
<div class="table-box"> <div class="table-box">
<table> <table>
<tr> <tr>
@ -97,7 +100,53 @@
name: 'user-list', name: 'user-list',
data () { data () {
return { return {
list: [] list: [],
fApi: {},
rule: [
{
type: "input", // (inputradiocheckboxselectslider)
field: "userName", // (name),
className: "user-name-dom", // class
title: "用户名称:", // ,
value: "", // (value),
props: {
placeholder: "请输入用户名称!",
disabled: false,
readonly: false,
clearable: true //
},
validate: [
{
trigger: "blur",
required: true,
message: "用户名称不能为空!"
}
],
col: {
md: { span: 12 }
}
}
],
option: {
//
resetBtn: true,
//
onSubmit: formData => {
alert(JSON.stringify(formData));
console.log("获取表单中的数据:", formData);
//
// this.fApi.btn.loading();
//
// this.fApi.resetBtn.disabled();
//
// this.fApi.btn.finish();
}
}
} }
}, },
props: { props: {

4
dolphinscheduler-ui/src/js/conf/login/index.js

@ -29,10 +29,14 @@ import ans from 'ans-ui/lib/ans-ui.min'
import 'sass/conf/login/index.scss' import 'sass/conf/login/index.scss'
import 'bootstrap/dist/js/bootstrap.min.js' import 'bootstrap/dist/js/bootstrap.min.js'
import formCreate, {maker} from '@form-create/element-ui'
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(ans) Vue.use(ans)
Vue.use(formCreate)
Vue.config.devtools = true Vue.config.devtools = true
Vue.config.productionTip = true Vue.config.productionTip = true
Vue.config.silent = true Vue.config.silent = true

Loading…
Cancel
Save