-
Notifications
You must be signed in to change notification settings - Fork 17
Add revision draft support (single revision mode) #405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 20 commits
848165c
24e27fa
a58ee13
a62d704
0ef0044
3ae11b1
c133338
9bf039f
f79c419
02dc1a4
6e5ff2f
73a82b1
60737de
a66b3ff
67a5079
ea677ed
0b07f91
6621678
0256b14
242b6ad
ebe802e
91a7cdb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,14 +6,16 @@ | |
| "containerApps.enableOutputTimestamps": "Prepends each line displayed in the output channel with a timestamp.", | ||
| "containerApps.browse": "Browse", | ||
| "containerApps.createContainerApp": "Create Container App...", | ||
| "containerApps.deployImage": "Update Container App Image......", | ||
| "containerApps.editContainerApp": "Edit Container App (Advanced)", | ||
|
nturinski marked this conversation as resolved.
Outdated
|
||
| "containerApps.deployImage": "Update Container App Image...", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm wondering if we should call this: "Update Container..." or "Edit Container..." after our conversation offline. The image is just a part of the overall container, after all. It's annoying and confusing, but Container =/= Container App.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah it's 😵💫 |
||
| "containerApps.deployImageApi": "Update Container App Image (API)...", | ||
| "containerApps.deleteContainerApp": "Delete Container App...", | ||
| "containerApps.disableIngress": "Disable Ingress for Container App", | ||
| "containerApps.enableIngress": "Enable Ingress for Container App...", | ||
| "containerApps.toggleVisibility": "Switch Ingress Visibility...", | ||
| "containerApps.editTargetPort": "Edit Target Port...", | ||
| "containerApps.chooseRevisionMode": "Choose Revision Mode...", | ||
| "containerApps.discardRevisionDraft": "Discard Changes...", | ||
| "containerApps.activateRevision": "Activate Revision", | ||
| "containerApps.deactivateRevision": "Deactivate Revision", | ||
| "containerApps.restartRevision": "Restart Revision", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| /*--------------------------------------------------------------------------------------------- | ||
| * Copyright (c) Microsoft Corporation. All rights reserved. | ||
| * Licensed under the MIT License. See License.txt in the project root for license information. | ||
| *--------------------------------------------------------------------------------------------*/ | ||
|
|
||
| import { KnownActiveRevisionsMode } from "@azure/arm-appcontainers"; | ||
| import type { IActionContext } from "@microsoft/vscode-azext-utils"; | ||
| import { ext } from "../extensionVariables"; | ||
| import type { ContainerAppItem } from "../tree/ContainerAppItem"; | ||
| import { localize } from "../utils/localize"; | ||
| import { pickContainerApp } from "../utils/pickContainerApp"; | ||
|
|
||
| export async function editContainerApp(context: IActionContext, node?: ContainerAppItem): Promise<void> { | ||
| node ??= await pickContainerApp(context); | ||
|
|
||
| if (node.containerApp.revisionsMode !== KnownActiveRevisionsMode.Single) { | ||
| throw new Error(localize('revisionModeError', 'The issued command can only be executed when the container app is in single revision mode.')); | ||
| } | ||
|
|
||
| await ext.revisionDraftFileSystem.editRevisionDraft(node); | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.