Skip to content

Commit

Permalink
Merge pull request #3 from ProtosL/rewrite
Browse files Browse the repository at this point in the history
模型管理、进程管理
  • Loading branch information
joe511230 committed Sep 5, 2018
2 parents 18fde2f + 20d661b commit c8aebeb
Show file tree
Hide file tree
Showing 34 changed files with 3,697 additions and 455 deletions.
Binary file added src/ui/src/assets/images/icon/down_icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/ui/src/assets/logo.png
Binary file not shown.
3 changes: 2 additions & 1 deletion src/ui/src/assets/scss/_vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ $cmdbPrimaryHoverColor: #6b7baa; // 主要颜色
$cmdbMainBtnColor: #498fe0;
$cmdbTextColor: #737987;
$cmdbTableBorderColor: #dde4eb;
$cmdbDangerColor: #ff5656;
$cmdbDangerColor: #ff5656;
$cmdbBorderLightColor: #e7e9ef;
295 changes: 182 additions & 113 deletions src/ui/src/assets/scss/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ ul, dl {
th {
font-weight: normal;
}

a, a:hover, a:active, a:visited, a:focus {
text-decoration: none;
color: $cmdbTextColor;
Expand Down Expand Up @@ -75,133 +74,132 @@ input.cmdb-form-input{
}
}
.cmdb-form-radio{
font-size: 14px;
color: #666666;
margin-right: 30px;
line-height: 18px;
display: inline-block;
padding: 7px 0;

.cmdb-radio-text{
font-style: normal;
font-weight: normal;
cursor: pointer;
vertical-align: middle;
}

input[type=radio]{
width: 18px;
height: 18px;
outline: none;
visibility: visible;
cursor: pointer;
vertical-align: middle;
background-color: #fff;
background-image: url('../images/checkbox-sprite.png');
font-size: 14px;
color: #737987;
margin-right: 30px;
line-height: 18px;
display: inline-block;
background-position: 0 0;
-webkit-appearance: none;

margin: 0 5px 0 0;
padding: 7px 0;

&:checked {
background-position: -33px 0;
&[disabled]{
color: #ccc;
background-position: -99px 0;
}
}
&[disabled]{
background-position: -66px 0;
cursor: default;
& + .bk-radio-text{
color: #ccc;
cursor: default;
}
.cmdb-radio-text{
font-style: normal;
font-weight: normal;
cursor: pointer;
vertical-align: middle;
}
}

&.cmdb-radio-small{
input[type=radio]{
width: 14px;
height: 14px;
background-position: 0 -33px;

&:checked {
background-position: -33px -33px;
width: 18px;
height: 18px;
outline: none;
visibility: visible;
cursor: pointer;
vertical-align: middle;
background-color: #fff;
background-image: url('../images/checkbox-sprite.png');
display: inline-block;
background-position: 0 0;
-webkit-appearance: none;
margin: 0 5px 0 0;

&:checked {
background-position: -33px 0;
&[disabled]{
color: #ccc;
background-position: -99px 0;
}
}
&[disabled]{
background-position: -99px -33px;
background-position: -66px 0;
cursor: default;
& + .bk-radio-text{
color: #ccc;
cursor: default;
}
}
}

&.cmdb-radio-small{
input[type=radio]{
width: 14px;
height: 14px;
background-position: 0 -33px;

&:checked {
background-position: -33px -33px;
&[disabled]{
background-position: -99px -33px;
}
}
&[disabled]{
background-position: -66px -33px;
}
}
}
&[disabled]{
background-position: -66px -33px;
}
}
}
}
.cmdb-form-checkbox{
font-size: 14px;
color: #666666;
margin-right: 30px;
line-height: 18px;
display: inline-block;
padding: 7px 0;

.cmdb-checkbox-text{
font-style: normal;
font-weight: normal;
cursor: pointer;
vertical-align: middle;
}

input[type=checkbox]{
width: 18px;
height: 18px;
outline: none;
visibility: visible;
cursor: pointer;
vertical-align: middle;
background: #fff;
background-image: url('../images/checkbox-sprite.png');
font-size: 14px;
color: #737987;
margin-right: 30px;
line-height: 18px;
display: inline-block;
background-position: 0 -62px;
-webkit-appearance: none;
margin: 0 5px 0 0;

&:checked {
background-position: -33px -62px;
&[disabled]{
color: #ccc;
background-position: -99px -62px;
}
}
&[disabled]{
background-position: -66px -62px;
cursor: default;
& + .bk-checkbox-text{
color: #ccc;
cursor: default;
}
padding: 7px 0;

.cmdb-checkbox-text{
font-style: normal;
font-weight: normal;
cursor: pointer;
vertical-align: middle;
}
}

&.cmdb-checkbox-small{
input[type=checkbox]{
width: 14px;
height: 14px;
background-position: 0 -95px;

&:checked {
background-position: -33px -95px;
width: 18px;
height: 18px;
outline: none;
visibility: visible;
cursor: pointer;
vertical-align: middle;
background: #fff;
background-image: url('../images/checkbox-sprite.png');
display: inline-block;
background-position: 0 -62px;
-webkit-appearance: none;
margin: 0 5px 0 0;

&:checked {
background-position: -33px -62px;
&[disabled]{
color: #ccc;
background-position: -99px -62px;
}
}
&[disabled]{
background-position: -99px -95px;
background-position: -66px -62px;
cursor: default;
& + .bk-checkbox-text{
color: #ccc;
cursor: default;
}
}
}

&.cmdb-checkbox-small{
input[type=checkbox]{
width: 14px;
height: 14px;
background-position: 0 -95px;

&:checked {
background-position: -33px -95px;
&[disabled]{
background-position: -99px -95px;
}
}
&[disabled]{
background-position: -66px -95px;
}
}
}
&[disabled]{
background-position: -66px -95px;
}
}
}
}

.icon-triple-dot {
Expand Down Expand Up @@ -231,6 +229,14 @@ input.cmdb-form-input{
color: #ff5656;
}

.mask{
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
}

/* rewrite magicbox style -----start----- */
.bk-tab2{
border: none !important;
Expand All @@ -248,12 +254,22 @@ input.cmdb-form-input{
}

.bk-button.bk-default:hover{
color: #0082ff !important;
border-color: #0082ff !important;
color: #0082ff;
border-color: #0082ff;
background: #fff;
}
.bk-selector .bk-selector-list-item .text{
@include ellipsis;
}
.bk-selector.bk-selector-small {
.bk-selector-input {
height: 30px;
line-height: 30px;
}
.bk-selector-icon {
top: 9px;
}
}
/* rewrite magicbox style ------end------ */

/* form-error -----------start----------- */
Expand Down Expand Up @@ -413,3 +429,56 @@ input.cmdb-form-input{
}
/* permission -------end------- */

/* model-field -------start------- */
.model-field-wrapper {
.form-item {
font-size: 0;
float: left;
vertical-align: middle;
&.has-right-content {
margin-right: 20px;
}
.form-label {
display: inline-block;
width: 80px;
padding-right: 5px;
font-size: 14px;
text-align: right;
vertical-align: top;
line-height: 30px;
}
.cmdb-form-input {
display: inline-block;
width: 130px;
height: 30px;
line-height: 28px;
}
.form-selector {
width: 130px;
display: inline-block;
}
.error-msg {
font-size: 12px;
}
.input-box {
display: inline-block;
width: 130px;
}
}
}
.model-wrapper .details-wrapper {
.footer-btn {
width: calc(100% + 40px);
margin: 0 -20px;
position: absolute;
left: 0;
bottom: 0;
padding: 14px 10px;
background: $cmdbPrimaryColor;
button {
min-width: 110px;
margin-left: 10px;
}
}
}
/* model-field -------end------- */
6 changes: 3 additions & 3 deletions src/ui/src/i18n/lang/cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@
"系统内建模型不可删除": "系统内建模型不可删除",
"新增模型": "新增模型",
"此分类下无已启用模型": "此分类下无已启用模型",
"此分类下无模型": "此分类下无模型",
"确认要删除此分类?": "确认要删除此分类",
"此分组下无模型": "此分组下无模型",
"确认要删除此分组?": "确认要删除此分组",
"该字段是必填项": "该字段是必填项",
"格式不正确,只能包含下划线,数字,英文小写": "格式不正确,只能包含下划线,数字,英文小写",
"修改成功": "修改成功",
Expand All @@ -310,7 +310,7 @@
"内置字段不可删除": "内置字段不可删除",
"导入成功": "导入成功",
"导入失败": "导入失败",
"确定删除字段?": "确定删除字段?",
"确定删除字段?": "确定删除字段{name}",
"未命名": "未命名",
"该名字已经存在": "该名字已经存在",
"已经存在未命名分组": "已经存在未命名分组",
Expand Down
8 changes: 4 additions & 4 deletions src/ui/src/i18n/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,9 @@
"系统内建模型不可停用": "The model is not deactivated within the system",
"系统内建模型不可删除": "System model cannot be deleted",
"新增模型": "Add Model",
"此分类下无已启用模型": "This category has no model is enable",
"此分类下无模型": "No model for this group",
"确认要删除此分类?": "Confirm that you want to delete this group?",
"此分组下无已启用模型": "This category has no model is enable",
"此分组下无模型": "No model for this group",
"确认要删除此分组?": "Confirm that you want to delete this group?",
"该字段是必填项": "This field is required",
"格式不正确,只能包含下划线,数字,英文小写": "The format is incorrect and can only contain underscores, numbers, and lowercase English",
"修改成功": "Successfully Modified",
Expand All @@ -308,7 +308,7 @@
"内置字段不可删除": "Built-in fields cannot be deleted",
"导入成功": "Imported Successfully",
"导入失败": "Failed to import",
"确定删除字段?": "Are you sure to delete the field?",
"确定删除字段?": "Are you sure to delete the field {name}?",
"未命名": "unnamed",
"该名字已经存在": "The name already exists",
"已经存在未命名分组": "Unnamed grouping already exists",
Expand Down

0 comments on commit c8aebeb

Please sign in to comment.