-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* added stop app command and documentation * updated stop app to use process wrapper * removed comments and temp bug fix for dapr list error * added stop app assets * removed unused imports and fixed eslint errors * minor changes to var names * updated stop application to kill instances of dapr and daprd * windows support + minor refactoring * updating package-lock * changed kill proc to SIGTERM * updated to use which module to find daprd executable * adding package.json * updated package-lock * removed unused imports * updated error handling * moved stop logic to dapr cli client * added open telemetry module
- Loading branch information
Showing
14 changed files
with
115 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
|
||
import DaprApplicationNode from "../../views/applications/daprApplicationNode"; | ||
import { UserInput } from '../../services/userInput'; | ||
import { IActionContext } from 'vscode-azureextensionui'; | ||
import { getLocalizationPathForFile } from '../../util/localization'; | ||
import * as nls from 'vscode-nls'; | ||
import { DaprCliClient } from "../../services/daprCliClient"; | ||
|
||
const localize = nls.loadMessageBundle(getLocalizationPathForFile(__filename)); | ||
|
||
export async function stopApp(daprCliClient: DaprCliClient, ui: UserInput, node: DaprApplicationNode | undefined): Promise<void> { | ||
try { | ||
return daprCliClient.stopApp(node?.application); | ||
} catch { | ||
await ui.showWarningMessage(localize('commands.invokeCommon.stopAppError', 'Failed to stop application \'{0}\'', node?.application.appId), | ||
{ modal: true }); | ||
} | ||
} | ||
|
||
const createStopCommand = (daprCliClient: DaprCliClient, ui: UserInput) => (context: IActionContext, node: DaprApplicationNode | undefined): Promise<void> => stopApp(daprCliClient, ui, node); | ||
|
||
export default createStopCommand; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters