Add triggers and filters check for target changing under push mode (#17731)

Signed-off-by: AllForNothing <sshijun@vmware.com>

Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
Shijun Sun 2022-11-02 15:34:34 +08:00 committed by GitHub
parent 1f05dcdcda
commit 4206ec8ab1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -136,7 +136,11 @@ export class CreateEditRuleComponent implements OnInit, OnDestroy {
.pipe(finalize(() => (this.inProgress = false)))
.subscribe({
next: adapter => {
this.setFilterAndTrigger(adapter);
// for push mode, if id === 0, what we get is currentRegistryInfo, and then setFilterAndTrigger(currentRegistryInfo)
// for pull mode, always setFilterAndTrigger
if ((this.isPushMode && !id) || !this.isPushMode) {
this.setFilterAndTrigger(adapter);
}
if (id) {
this.checkChunkOption(id, adapter);
}