Skip to content

Commit a3ceb80

Browse files
authored
Merge feature/ecs into master #2326
2 parents 1f5b341 + 8256eb8 commit a3ceb80

38 files changed

+1840
-315
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "AWS Explorer shows ECS resources and supports \"Run command in container\""
4+
}

package.json

Lines changed: 92 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,28 @@
201201
"description": "%AWS.configuration.description.suppressPrompts%",
202202
"default": {
203203
"apprunnerNotifyPricing": false,
204+
"ecsRunCommand": false,
205+
"ecsRunCommandDisable": false,
206+
"ecsRunCommandEnable": false,
204207
"yamlExtPrompt": false
205208
},
206209
"properties": {
207210
"apprunnerNotifyPricing": {
208211
"type": "boolean",
209212
"default": false
210213
},
214+
"ecsRunCommand": {
215+
"type": "boolean",
216+
"default": false
217+
},
218+
"ecsRunCommandEnable": {
219+
"type": "boolean",
220+
"default": false
221+
},
222+
"ecsRunCommandDisable": {
223+
"type": "boolean",
224+
"default": false
225+
},
211226
"yamlExtPrompt": {
212227
"type": "boolean",
213228
"default": false
@@ -960,6 +975,22 @@
960975
{
961976
"command": "aws.resources.viewDocs",
962977
"when": "false"
978+
},
979+
{
980+
"command": "aws.ecs.runCommandInContainer",
981+
"when": "false"
982+
},
983+
{
984+
"command": "aws.ecs.enableEcsExec",
985+
"when": "false"
986+
},
987+
{
988+
"command": "aws.ecs.disableEcsExec",
989+
"when": "false"
990+
},
991+
{
992+
"command": "aws.ecs.viewDocumentation",
993+
"when": "false"
963994
}
964995
],
965996
"editor/title": [
@@ -1343,7 +1374,7 @@
13431374
},
13441375
{
13451376
"command": "aws.copyArn",
1346-
"when": "view == aws.explorer && viewItem =~ /^(awsRegionFunctionNode|awsRegionFunctionNodeDownloadable|awsCloudFormationFunctionNode|awsStateMachineNode|awsCloudFormationNode|awsCloudWatchLogNode|awsS3BucketNode|awsS3FolderNode|awsS3FileNode|awsApiGatewayNode|awsEcrRepositoryNode|awsIotThingNode)$|^(awsAppRunnerServiceNode|awsIotCertificateNode|awsIotPolicyNode|awsIotPolicyVersionNode)/",
1377+
"when": "view == aws.explorer && viewItem =~ /^(awsRegionFunctionNode|awsRegionFunctionNodeDownloadable|awsCloudFormationFunctionNode|awsStateMachineNode|awsCloudFormationNode|awsCloudWatchLogNode|awsS3BucketNode|awsS3FolderNode|awsS3FileNode|awsApiGatewayNode|awsEcrRepositoryNode|awsIotThingNode)$|^(awsAppRunnerServiceNode|awsEcsServiceNode|awsIotCertificateNode|awsIotPolicyNode|awsIotPolicyVersionNode)/",
13471378
"group": "2@2"
13481379
},
13491380
{
@@ -1436,6 +1467,26 @@
14361467
"group": "3@2",
14371468
"when": "view == aws.explorer && viewItem == awsDocumentItemNodeWriteable"
14381469
},
1470+
{
1471+
"command": "aws.ecs.runCommandInContainer",
1472+
"group": "0@1",
1473+
"when": "view == aws.explorer && viewItem == awsEcsContainerNode"
1474+
},
1475+
{
1476+
"command": "aws.ecs.enableEcsExec",
1477+
"group": "0@1",
1478+
"when": "view == aws.explorer && viewItem == awsEcsServiceNode.DISABLED"
1479+
},
1480+
{
1481+
"command": "aws.ecs.disableEcsExec",
1482+
"group": "0@2",
1483+
"when": "view == aws.explorer && viewItem == awsEcsServiceNode.ENABLED"
1484+
},
1485+
{
1486+
"command": "aws.ecs.viewDocumentation",
1487+
"group": "1@3",
1488+
"when": "view == aws.explorer && viewItem =~ /^(awsEcsClusterNode|awsEcsContainerNode)$|^awsEcsServiceNode/"
1489+
},
14391490
{
14401491
"command": "aws.resources.configure",
14411492
"when": "view == aws.explorer && viewItem == resourcesRootNode && !isCloud9",
@@ -2396,6 +2447,36 @@
23962447
}
23972448
}
23982449
},
2450+
{
2451+
"command": "aws.ecs.runCommandInContainer",
2452+
"title": "%AWS.ecs.runCommandInContainer%",
2453+
"category": "%AWS.title%",
2454+
"cloud9": {
2455+
"cn": {
2456+
"category": "%AWS.title.cn%"
2457+
}
2458+
}
2459+
},
2460+
{
2461+
"command": "aws.ecs.enableEcsExec",
2462+
"title": "%AWS.ecs.enableEcsExec%",
2463+
"category": "%AWS.title%",
2464+
"cloud9": {
2465+
"cn": {
2466+
"category": "%AWS.title.cn%"
2467+
}
2468+
}
2469+
},
2470+
{
2471+
"command": "aws.ecs.viewDocumentation",
2472+
"title": "%AWS.generic.viewDocs%",
2473+
"category": "%AWS.title%",
2474+
"cloud9": {
2475+
"cn": {
2476+
"category": "%AWS.title.cn%"
2477+
}
2478+
}
2479+
},
23992480
{
24002481
"command": "aws.resources.copyIdentifier",
24012482
"title": "%AWS.command.resources.copyIdentifier%",
@@ -2514,6 +2595,16 @@
25142595
}
25152596
}
25162597
},
2598+
{
2599+
"command": "aws.ecs.disableEcsExec",
2600+
"title": "%AWS.ecs.disableEcsExec%",
2601+
"category": "%AWS.title%",
2602+
"cloud9": {
2603+
"cn": {
2604+
"category": "%AWS.title.cn%"
2605+
}
2606+
}
2607+
},
25172608
{
25182609
"command": "aws.apprunner.createServiceFromEcr",
25192610
"title": "%AWS.command.apprunner.createServiceFromEcr%",

package.nls.json

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,21 @@
181181
"AWS.command.ecr.createRepository": "Create Repository...",
182182
"AWS.command.ecr.deleteRepository": "Delete Repository...",
183183
"AWS.command.ecr.deleteTag": "Delete Tag...",
184+
"AWS.ecs.enableEcsExec": "Enable Command Execution",
185+
"AWS.ecs.disableEcsExec": "Disable Command Execution",
186+
"AWS.ecs.runCommandInContainer": "Run command in container",
187+
"AWS.ecs.runCommandInContainer.error": "Failed to execute command in container.",
188+
"AWS.command.ecs.runCommandInContainer.warnBeforeExecute": "Command may modify the running container {0}. Are you sure?",
189+
"AWS.command.ecs.runCommandInContainer.noPluginFound": "This feature requires the SSM Session Manager plugin (session-manager-plugin) to be installed and available on your $PATH",
190+
"AWS.command.ecs.runCommandInContainer.noTasks": "There are no running tasks for the service: {0}",
191+
"AWS.command.ecs.runCommandInContainer.prompt": "Enter the command to run in container: {0}",
192+
"AWS.command.ecs.runCommandInContainer.placeHolder": "Command to run",
193+
"AWS.command.ecs.runCommandInContainer.warning.enableExecuteFlag": "Enabling command execution will change the state of resources in your AWS account, including but not limited to stopping and restarting the service.\nAltering the state of resources while the Execute Command is enabled can lead to unpredictable results.\n Continue?",
194+
"AWS.command.ecs.runCommandInContainer.warning.disableExecuteFlag": "Disabling command execution will change the state of resources in your AWS account, including but not limited to stopping and restarting the service.\n Continue?",
195+
"AWS.command.ecs.enableEcsExec.alreadyEnabled": "ECS Exec is already enabled for this service",
196+
"AWS.command.ecs.disableEcsExec.alreadyDisabled": "ECS Exec is already disabled for this service",
197+
"AWS.command.ecs.runCommandInContainer.warnDeploymentInProgress": "Service is currently deploying (ACTIVE={0}, IN_PROGRESS={1})",
198+
"AWS.command.ecs.runCommandInContainer.chooseTask": "Choose a task",
184199
"AWS.command.samcli.detect": "Detect SAM CLI",
185200
"AWS.command.deleteCloudFormation": "Delete CloudFormation Stack",
186201
"AWS.command.viewSchemaItem": "View Schema",
@@ -271,6 +286,9 @@
271286
"AWS.explorerNode.ecr.error": "Error loading ECR resources",
272287
"AWS.explorerNode.ecr.noRepositories": "[No repositories found]",
273288
"AWS.explorerNode.ecr.noTags": "[No tags found]",
289+
"AWS.explorerNode.ecs.noClusters": "[No Clusters found]",
290+
"AWS.explorerNode.ecs.noServices": "[No Services found]",
291+
"AWS.explorerNode.ecs.noContainers": "[No Containers found]",
274292
"AWS.explorerNode.lambda.error": "Error loading Lambda resources",
275293
"AWS.explorerNode.loadMoreChildren": "Load More...",
276294
"AWS.explorerNode.loadMoreChildren.error": "Error loading more resources",
@@ -382,7 +400,14 @@
382400
"AWS.message.browseMoreFiles": "Browse more files...",
383401
"AWS.message.selectBucket": "Select an S3 bucket to upload to",
384402
"AWS.message.selectRegion": "Select an {0} region",
385-
"AWS.message.prompt.defaultRegionHidden.alwaysAdd": "Yes, and don't ask again",
403+
"AWS.message.statusBar.loading.cloudFormation": "Loading CloudFormations...",
404+
"AWS.message.statusBar.loading.logGroups": "Loading Log Groups...",
405+
"AWS.message.statusBar.loading.lambda": "Loading Lambdas...",
406+
"AWS.message.statusBar.loading.registries": "Loading Registry Items...",
407+
"AWS.message.statusBar.loading.schemaItems": "Loading Schema Items...",
408+
"AWS.message.statusBar.searching.schemas": "Searching Schemas...",
409+
"AWS.message.prompt.yesDontAskAgain": "Yes, and don't ask again",
410+
"AWS.message.prompt.defaultRegionHidden": "This profile's default region ({0}) is currently hidden. Would you like to show it in the Explorer?",
386411
"AWS.message.prompt.defaultRegionHidden.alwaysIgnore": "No, and don't ask again",
387412
"AWS.message.prompt.defaultRegionHidden.suppressed": "You will no longer be asked what to do when the current profile's default region is hidden from the Explorer. This behavior can be changed by modifying the '{0}' setting.",
388413
"AWS.message.prompt.cloudFormation.delete": "Are you sure you want to delete {0}?",

resources/dark/ecs/cluster.svg

Lines changed: 4 additions & 0 deletions
Loading

resources/dark/ecs/container.svg

Lines changed: 9 additions & 0 deletions
Loading

resources/dark/ecs/service.svg

Lines changed: 4 additions & 0 deletions
Loading

resources/light/ecs/cluster.svg

Lines changed: 4 additions & 0 deletions
Loading

resources/light/ecs/container.svg

Lines changed: 9 additions & 0 deletions
Loading

resources/light/ecs/service.svg

Lines changed: 4 additions & 0 deletions
Loading

src/awsexplorer/defaultRegion.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ enum OnDefaultRegionMissingOperation {
3838
class DefaultRegionMissingPromptItems {
3939
public static readonly add: string = localizedText.yes
4040
public static readonly alwaysAdd: string = localize(
41-
'AWS.message.prompt.defaultRegionHidden.alwaysAdd',
41+
'AWS.message.prompt.yesDontAskAgain',
4242
"Yes, and don't ask again"
4343
)
4444
public static readonly ignore: string = localizedText.no

0 commit comments

Comments
 (0)