Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function(action$, { api }) {
return action$.pipe(
ofType(RUN_UPGRADE_PACKAGE_TESTS),
mergeMap(async () => {
await api.upgrade.cluster_pre_upgrade({});
})
);
}
function _replaceModalAfterSuccess(action$) {
return action$.pipe(
ofType(COMPLETE_CREATE_ACCOUNT),
mergeMap(action => {
const { accountName, password } = action.payload;
return action$.pipe(
ofType(COMPLETE_FETCH_SYSTEM_INFO),
take(1),
map(() => replaceWithAccountCreatedModal(accountName, password))
);
})
);
}
export default function(action$, { browser }) {
return action$.pipe(
ofType(COMPLETE_UPGRADE_SYSTEM),
map(action => {
const { system, version } = action.payload;
const url = realizeUri(routes.system, { system }, { afterupgrade: version });
browser.reload(url);
})
);
}
export default function(action$, { api }) {
return action$.pipe(
ofType(LEAVE_MAINTENANCE_MODE),
mergeMap(async () => {
try {
await api.system.set_maintenance_mode({ duration : 0 });
return completeLeaveMaintenanceMode();
} catch (error) {
return failLeaveMaintenanceMode(
mapErrorObject(error)
);
}
})
);
}
export default function(action$) {
return action$.pipe(
ofType(FAIL_CREATE_ACCOUNT),
map(() => closeModal())
);
}
constructor({ bucketName }) {
super();
this.bucketName = ko.unwrap(bucketName);
this.observe(
state$.pipe(
getMany(
['buckets', this.bucketName, 'triggers'],
'functions',
'accounts'
)
),
this.onState
);
}
this.breadcrumbs = ko.observableArray();
this.area = ko.observable();
this.panel = ko.observable();
this.isUploadButtonVisible = ko.observable(false);
this.observe(
state$.pipe(getMany(
'location',
'session'
)),
this.onLocation
);
this.observe(
state$.pipe(
getMany(
'accounts',
['session', 'user']
)
),
this.onAccount
);
registerForAlerts();
}
constructor({ bucketName }) {
super();
this.bucketName = ko.unwrap(bucketName);
this.observe(
state$.pipe(get('location')),
this.onLocation
);
this.observe(
state$.pipe(
getMany(
['buckets', this.bucketName],
'objects',
['session', 'user'],
['accounts'],
['system', 'sslCert', 'installed']
)
),
this.onState
);
}
label: 'New Version',
value: this.stagedVersion
},
{
label: 'Validated at',
value: this.testedAt
},
{
label: 'Validation Result',
value: 'Successful'
}
];
this.observe(
state$.pipe(
getMany(
['location', 'params', 'system'],
'system',
['topology', 'servers']
)
),
this.onState
);
}
constructor({ bucketName }) {
super();
this.observe(
state$.pipe(
getMany(
['buckets', ko.unwrap(bucketName)],
'hostPools'
)
),
this.onState
);
}