Skip to content

Commit

Permalink
#1 update default model
Browse files Browse the repository at this point in the history
  • Loading branch information
roywu committed Nov 19, 2020
1 parent 3cce3f2 commit e99c578
Show file tree
Hide file tree
Showing 15 changed files with 575 additions and 105 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ tmptests/reader.py
build/lib/*
build/bdist.win-amd64/*
build/bdist.linux-x86_64/*
ui/node_modules
ui/node_modules
.eggs/*
257 changes: 211 additions & 46 deletions init.sql

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wecmdb",
"version": "0.1.0",
"name": "itsdangerous",
"version": "1.0.0",
"private": true,
"scripts": {
"build": "vue-cli-service build",
Expand Down
7 changes: 5 additions & 2 deletions ui/src/locale/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
"emptyToadd": "There are empty items and cannot be added!",
"emptyToSave": "There are empty items and cannot be saved!"
},

"delete_confirm": "Confirm the deletion:",
"hr_policies": "Policies",
"hr_box": "Boxes",
Expand Down Expand Up @@ -131,5 +130,9 @@
"lineno": "Line No",
"message": "Message",
"script_name": "Script Name",
"content": "Content"
"content": "Content",
"hr_created_by": "Created By",
"hr_created_time": "Created Time",
"hr_updated_by": "Updated By",
"hr_updated_time": "Updated Time"
}
7 changes: 5 additions & 2 deletions ui/src/locale/i18n/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
"emptyToadd": "存在空项,无法新增!",
"emptyToSave": "存在空项,无法保存!"
},

"delete_confirm": "确认删除:",
"hr_policies": "策略",
"hr_box": "试盒",
Expand Down Expand Up @@ -131,5 +130,9 @@
"lineno": "行号",
"message": "信息",
"script_name": "脚本名",
"content": "脚本内容"
"content": "脚本内容",
"hr_created_by": "创建用户",
"hr_created_time": "创建时间",
"hr_updated_by": "更新用户",
"hr_updated_time": "更新时间"
}
24 changes: 22 additions & 2 deletions ui/src/pages/boxes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<div slot="boxes">
<div class="marginbottom params-each">
<label class="col-md-2 label-name">{{ $t('hr_policies') }}:</label>
<Select v-model="modelConfig.addRow.policy_id" style="width:338px">
<Select v-model="modelConfig.addRow.policy_id" style="width: 338px">
<Option v-for="item in modelConfig.v_select_configs.policyOptions" :value="item.value" :key="item.value">
{{ item.label }}
</Option>
</Select>
</div>
<div class="marginbottom params-each">
<label class="col-md-2 label-name">{{ $t('hr_subject') }}:</label>
<Select v-model="modelConfig.addRow.subject_id" style="width:338px">
<Select v-model="modelConfig.addRow.subject_id" style="width: 338px">
<Option v-for="item in modelConfig.v_select_configs.subjectOptions" :value="item.value" :key="item.value">
{{ item.label }}
</Option>
Expand Down Expand Up @@ -56,6 +56,26 @@ let tableEle = [
title: 'hr_subject',
value: 'subject.name', //
display: true
},
{
title: 'hr_created_by',
value: 'created_by', //
display: true
},
{
title: 'hr_created_time',
value: 'created_time', //
display: true
},
{
title: 'hr_updated_by',
value: 'updated_by', //
display: true
},
{
title: 'hr_updated_time',
value: 'updated_time', //
display: true
}
]
const btn = [
Expand Down
22 changes: 21 additions & 1 deletion ui/src/pages/match-params.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div slot="match-params">
<div class="marginbottom params-each">
<label class="col-md-2 label-name">{{ $t('hr_type') }}:</label>
<Select v-model="modelConfig.addRow.type" style="width:338px" multiple>
<Select v-model="modelConfig.addRow.type" style="width: 338px" multiple>
<Option v-for="item in modelConfig.v_select_configs.typeOptions" :value="item.value" :key="item.value">
{{ item.label }}
</Option>
Expand Down Expand Up @@ -41,6 +41,26 @@ let tableEle = [
title: 'hr_type',
value: 'type',
display: true
},
{
title: 'hr_created_by',
value: 'created_by', //
display: true
},
{
title: 'hr_created_time',
value: 'created_time', //
display: true
},
{
title: 'hr_updated_by',
value: 'updated_by', //
display: true
},
{
title: 'hr_updated_time',
value: 'updated_time', //
display: true
}
]
const btn = [
Expand Down
22 changes: 21 additions & 1 deletion ui/src/pages/plugin-params.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div slot="plugin-params">
<div class="marginbottom params-each">
<label class="col-md-2 label-name">{{ $t('content_type') }}:</label>
<Select v-model="modelConfig.addRow.content_type" style="width:338px">
<Select v-model="modelConfig.addRow.content_type" style="width: 338px">
<Option
v-for="item in modelConfig.v_select_configs.contentTypeOptions"
:value="item.value"
Expand Down Expand Up @@ -42,6 +42,26 @@ let tableEle = [
title: 'endpoint_field', // 脚本地址
value: 'endpoint_field',
display: true
},
{
title: 'hr_created_by',
value: 'created_by', //
display: true
},
{
title: 'hr_created_time',
value: 'created_time', //
display: true
},
{
title: 'hr_updated_by',
value: 'updated_by', //
display: true
},
{
title: 'hr_updated_time',
value: 'updated_time', //
display: true
}
]
const btn = [
Expand Down
22 changes: 21 additions & 1 deletion ui/src/pages/policy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div slot="policy">
<div class="marginbottom params-each">
<label class="col-md-2 label-name">{{ $t('hr_rule') }}:</label>
<Select v-model="modelConfig.addRow.rules" style="width:338px" multiple>
<Select v-model="modelConfig.addRow.rules" style="width: 338px" multiple>
<Option v-for="item in modelConfig.v_select_configs.ruleOptions" :value="item.value" :key="item.value">
{{ item.label }}
</Option>
Expand Down Expand Up @@ -33,6 +33,26 @@ let tableEle = [
title: 'hr_enabled',
value: 'enabled',
display: true
},
{
title: 'hr_created_by',
value: 'created_by', //
display: true
},
{
title: 'hr_created_time',
value: 'created_time', //
display: true
},
{
title: 'hr_updated_by',
value: 'updated_by', //
display: true
},
{
title: 'hr_updated_time',
value: 'updated_time', //
display: true
}
]
const btn = [
Expand Down
28 changes: 24 additions & 4 deletions ui/src/pages/rule.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@
<div slot="rule">
<div class="marginbottom params-each">
<label class="col-md-2 label-name">{{ $t('effect_on') }}:</label>
<Select v-model="modelConfig.addRow.policy_id" style="width:338px">
<Select v-model="modelConfig.addRow.policy_id" style="width: 338px">
<Option v-for="item in modelConfig.v_select_configs.effectOptions" :value="item.value" :key="item.value">
{{ item.label }}
</Option>
</Select>
</div>
<div class="marginbottom params-each">
<label class="col-md-2 label-name">{{ $t('match_type') }}:</label>
<Select v-model="modelConfig.addRow.match_type" style="width:338px">
<Select v-model="modelConfig.addRow.match_type" style="width: 338px">
<Option v-for="item in modelConfig.v_select_configs.matchOptions" :value="item.value" :key="item.value">
{{ item.label }}
</Option>
</Select>
</div>
<div class="marginbottom params-each">
<label class="col-md-2 label-name">{{ $t('match_param_id') }}:</label>
<Select v-model="modelConfig.addRow.match_param_id" style="width:338px">
<Select v-model="modelConfig.addRow.match_param_id" style="width: 338px">
<Option v-for="item in modelConfig.v_select_configs.matchParamOption" :value="item.value" :key="item.value">
{{ item.label }}
</Option>
Expand Down Expand Up @@ -72,7 +72,27 @@ let tableEle = [
},
{
title: 'match_param_id', // 不必
value: 'match_param_id', // 调用参数
value: 'match_param.name', // 调用参数
display: true
},
{
title: 'hr_created_by',
value: 'created_by', //
display: true
},
{
title: 'hr_created_time',
value: 'created_time', //
display: true
},
{
title: 'hr_updated_by',
value: 'updated_by', //
display: true
},
{
title: 'hr_updated_time',
value: 'updated_time', //
display: true
}
]
Expand Down
22 changes: 21 additions & 1 deletion ui/src/pages/subjects.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div slot="subjects">
<div class="marginbottom params-each">
<label class="col-md-2 label-name">{{ $t('hr_target') }}:</label>
<Select v-model="modelConfig.addRow.targets" style="width:338px" multiple>
<Select v-model="modelConfig.addRow.targets" style="width: 338px" multiple>
<Option v-for="item in modelConfig.v_select_configs.targetOptions" :value="item.value" :key="item.value">
{{ item.label }}
</Option>
Expand Down Expand Up @@ -33,6 +33,26 @@ let tableEle = [
title: 'hr_enabled',
value: 'enabled',
display: true
},
{
title: 'hr_created_by',
value: 'created_by', //
display: true
},
{
title: 'hr_created_time',
value: 'created_time', //
display: true
},
{
title: 'hr_updated_by',
value: 'updated_by', //
display: true
},
{
title: 'hr_updated_time',
value: 'updated_time', //
display: true
}
]
const btn = [
Expand Down
20 changes: 20 additions & 0 deletions ui/src/pages/targets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,26 @@ let tableEle = [
title: 'hr_enabled',
value: 'enabled',
display: true
},
{
title: 'hr_created_by',
value: 'created_by', //
display: true
},
{
title: 'hr_created_time',
value: 'created_time', //
display: true
},
{
title: 'hr_updated_by',
value: 'updated_by', //
display: true
},
{
title: 'hr_updated_time',
value: 'updated_time', //
display: true
}
]
const btn = [
Expand Down
Loading

0 comments on commit e99c578

Please sign in to comment.