Skip to content

Commit

Permalink
Merge pull request #2559 from lhzzforever/dev/develop_ci
Browse files Browse the repository at this point in the history
Dev/develop ci
  • Loading branch information
ielgnaw authored Mar 8, 2024
2 parents c650809 + 2f818f4 commit 6075844
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 30 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/choose-ip/topology-tree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,7 @@
.filter((item) => item.level === node.level)
.some((item) => item.type === 'node' && item.async);
const flag = !node.async && isSameLevelExistSync;
const asyncIconWidth = 5;
// const asyncIconWidth = 5;
if (!node.level) {
// if (flag) {
// return {
Expand All @@ -1294,7 +1294,7 @@
}
if (flag) {
return {
marginLeft: (node.level + 1) * this.leftBaseIndent + asyncIconWidth + 'px'
marginLeft: (node.level + 1) * this.leftBaseIndent + 'px'
};
}
return {
Expand Down
25 changes: 18 additions & 7 deletions frontend/src/views/group/components/render-resource.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
:limit-value="getLimitInstance(conditionLimitData[index])"
:select-list="curSelectList(index)"
:select-value="curSelectValue(index)"
:selection-mode="curSelectionMode(index)"
:system-params="params"
:has-attribute="condition.hasOwnProperty('attribute')"
:has-status-bar="conditionData.length > 1 && index !== conditionData.length - 1"
Expand Down Expand Up @@ -559,14 +560,24 @@
const isHasInstance = item.instance && item.instance.length > 0;
const isHasAttribute = item.attribute && item.attribute.length > 0;
let curSelectMode = '';
if (!isHasInstance && isHasAttribute) {
curSelectMode = 'attribute';
this.$delete(this.conditionData[index], 'instance');
} else if (isHasInstance && !isHasAttribute) {
curSelectMode = 'instance';
this.$delete(this.conditionData[index], 'attribute');
if (['instance:paste'].includes(this.selectionMode)) {
curSelectMode = this.selectionMode;
if (!isHasInstance) {
this.$delete(this.conditionData[index], 'instance');
}
if (!isHasAttribute) {
this.$delete(this.conditionData[index], 'attribute');
}
} else {
curSelectMode = 'all';
if (!isHasInstance && isHasAttribute) {
curSelectMode = 'attribute';
this.$delete(this.conditionData[index], 'instance');
} else if (isHasInstance && !isHasAttribute) {
curSelectMode = 'instance';
this.$delete(this.conditionData[index], 'attribute');
} else {
curSelectMode = 'all';
}
}
this.$set(this.selectionModeMap, index, curSelectMode);
});
Expand Down
24 changes: 17 additions & 7 deletions frontend/src/views/manage-spaces/components/render-resource.vue
Original file line number Diff line number Diff line change
Expand Up @@ -554,14 +554,24 @@
const isHasInstance = item.instance && item.instance.length > 0;
const isHasAttribute = item.attribute && item.attribute.length > 0;
let curSelectMode = '';
if (!isHasInstance && isHasAttribute) {
curSelectMode = 'attribute';
this.$delete(this.conditionData[index], 'instance');
} else if (isHasInstance && !isHasAttribute) {
curSelectMode = 'instance';
this.$delete(this.conditionData[index], 'attribute');
if (['instance:paste'].includes(this.selectionMode)) {
curSelectMode = this.selectionMode;
if (!isHasInstance) {
this.$delete(this.conditionData[index], 'instance');
}
if (!isHasAttribute) {
this.$delete(this.conditionData[index], 'attribute');
}
} else {
curSelectMode = 'all';
if (!isHasInstance && isHasAttribute) {
curSelectMode = 'attribute';
this.$delete(this.conditionData[index], 'instance');
} else if (isHasInstance && !isHasAttribute) {
curSelectMode = 'instance';
this.$delete(this.conditionData[index], 'attribute');
} else {
curSelectMode = 'all';
}
}
this.$set(this.selectionModeMap, index, curSelectMode);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -554,14 +554,24 @@
const isHasInstance = item.instance && item.instance.length > 0;
const isHasAttribute = item.attribute && item.attribute.length > 0;
let curSelectMode = '';
if (!isHasInstance && isHasAttribute) {
curSelectMode = 'attribute';
this.$delete(this.conditionData[index], 'instance');
} else if (isHasInstance && !isHasAttribute) {
curSelectMode = 'instance';
this.$delete(this.conditionData[index], 'attribute');
if (['instance:paste'].includes(this.selectionMode)) {
curSelectMode = this.selectionMode;
if (!isHasInstance) {
this.$delete(this.conditionData[index], 'instance');
}
if (!isHasAttribute) {
this.$delete(this.conditionData[index], 'attribute');
}
} else {
curSelectMode = 'all';
if (!isHasInstance && isHasAttribute) {
curSelectMode = 'attribute';
this.$delete(this.conditionData[index], 'instance');
} else if (isHasInstance && !isHasAttribute) {
curSelectMode = 'instance';
this.$delete(this.conditionData[index], 'attribute');
} else {
curSelectMode = 'all';
}
}
this.$set(this.selectionModeMap, index, curSelectMode);
});
Expand Down
24 changes: 17 additions & 7 deletions frontend/src/views/perm-template/components/render-resource.vue
Original file line number Diff line number Diff line change
Expand Up @@ -494,14 +494,24 @@
const isHasInstance = item.instance && item.instance.length > 0;
const isHasAttribute = item.attribute && item.attribute.length > 0;
let curSelectMode = '';
if (!isHasInstance && isHasAttribute) {
curSelectMode = 'attribute';
this.$delete(this.conditionData[index], 'instance');
} else if (isHasInstance && !isHasAttribute) {
curSelectMode = 'instance';
this.$delete(this.conditionData[index], 'attribute');
if (['instance:paste'].includes(this.selectionMode)) {
curSelectMode = this.selectionMode;
if (!isHasInstance) {
this.$delete(this.conditionData[index], 'instance');
}
if (!isHasAttribute) {
this.$delete(this.conditionData[index], 'attribute');
}
} else {
curSelectMode = 'all';
if (!isHasInstance && isHasAttribute) {
curSelectMode = 'attribute';
this.$delete(this.conditionData[index], 'instance');
} else if (isHasInstance && !isHasAttribute) {
curSelectMode = 'instance';
this.$delete(this.conditionData[index], 'attribute');
} else {
curSelectMode = 'all';
}
}
this.$set(this.selectionModeMap, index, curSelectMode);
});
Expand Down

0 comments on commit 6075844

Please sign in to comment.