dev: instance setup workflow (#2935)
* chore: instance type updated * chore: instance not ready screen added * chore: instance layout added * chore: instance magic sign in endpoint and type added * chore: instance admin password endpoint added * chore: instance setup page added * chore: instance setup form added * chore: instance layout updated * fix: instance admin workflow setup * fix: admin workflow setup --------- Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
This commit is contained in:
parent
ee30eb0590
commit
fd5b7d20a8
25 changed files with 905 additions and 38 deletions
|
|
@ -17,6 +17,7 @@ export interface IInstanceStore {
|
|||
formattedConfig: IFormattedInstanceConfiguration | null;
|
||||
// action
|
||||
fetchInstanceInfo: () => Promise<IInstance>;
|
||||
createInstance: () => Promise<IInstance>;
|
||||
fetchInstanceAdmins: () => Promise<IInstanceAdmin[]>;
|
||||
updateInstanceInfo: (data: Partial<IInstance>) => Promise<IInstance>;
|
||||
fetchInstanceConfigurations: () => Promise<any>;
|
||||
|
|
@ -45,6 +46,7 @@ export class InstanceStore implements IInstanceStore {
|
|||
formattedConfig: computed,
|
||||
// actions
|
||||
fetchInstanceInfo: action,
|
||||
createInstance: action,
|
||||
fetchInstanceAdmins: action,
|
||||
updateInstanceInfo: action,
|
||||
fetchInstanceConfigurations: action,
|
||||
|
|
@ -84,6 +86,22 @@ export class InstanceStore implements IInstanceStore {
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Creating new Instance In case of no instance found
|
||||
*/
|
||||
createInstance = async () => {
|
||||
try {
|
||||
const instance = await this.instanceService.createInstance();
|
||||
runInAction(() => {
|
||||
this.instance = instance;
|
||||
});
|
||||
return instance;
|
||||
} catch (error) {
|
||||
console.log("Error while creating the instance");
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* fetch instance admins from API
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue