mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-11-16 01:38:21 +01:00
fix: support passing arguments when pushing a service
Some checks failed
gitea-sync/antos/pipeline/head There was a failure building this commit
Some checks failed
gitea-sync/antos/pipeline/head There was a failure building this commit
This commit is contained in:
parent
6895b94c7d
commit
185dce4d7f
5
d.ts/antos.d.ts
vendored
5
d.ts/antos.d.ts
vendored
@ -1191,9 +1191,10 @@ declare namespace OS {
|
||||
*
|
||||
* @export
|
||||
* @param {string} ph
|
||||
* @param {AppArgumentsType[]} [params] service arguments
|
||||
* @returns {Promise<PM.ProcessType>}
|
||||
*/
|
||||
function pushService(ph: string): Promise<PM.ProcessType>;
|
||||
function pushService(ph: string, params?: AppArgumentsType[]): Promise<PM.ProcessType>;
|
||||
/**
|
||||
* Synchronously start a list of services
|
||||
*
|
||||
@ -10802,7 +10803,7 @@ declare namespace OS {
|
||||
* @export
|
||||
* @param {string} app class name string
|
||||
* @param {ProcessTypeClass} cls prototype class
|
||||
* @param {GUI.AppArgumentsType[]} [args] process arguments
|
||||
* @param {AppArgumentsType[]} [args] process arguments
|
||||
* @returns {Promise<ProcessType>} a promise on the created process
|
||||
*/
|
||||
function createProcess(app: string, cls: ModelTypeClass, args?: AppArgumentsType[]): Promise<ProcessType>;
|
||||
|
@ -644,9 +644,10 @@ namespace OS {
|
||||
*
|
||||
* @export
|
||||
* @param {string} ph
|
||||
* @param {AppArgumentsType[]} [params] service arguments
|
||||
* @returns {Promise<PM.ProcessType>}
|
||||
*/
|
||||
export function pushService(ph: string): Promise<PM.ProcessType> {
|
||||
export function pushService(ph: string, params?: AppArgumentsType[]): Promise<PM.ProcessType> {
|
||||
return new Promise(async function (resolve, reject) {
|
||||
const arr = ph.split("/");
|
||||
const srv = arr[1];
|
||||
@ -662,7 +663,8 @@ namespace OS {
|
||||
}
|
||||
const d = await PM.createProcess(
|
||||
srv,
|
||||
application[srv]
|
||||
application[srv],
|
||||
params
|
||||
);
|
||||
return resolve(d);
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ namespace OS {
|
||||
* @export
|
||||
* @param {string} app class name string
|
||||
* @param {ProcessTypeClass} cls prototype class
|
||||
* @param {GUI.AppArgumentsType[]} [args] process arguments
|
||||
* @param {AppArgumentsType[]} [args] process arguments
|
||||
* @returns {Promise<ProcessType>} a promise on the created process
|
||||
*/
|
||||
export function createProcess(
|
||||
|
Loading…
Reference in New Issue
Block a user