Skip to content
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

Merge endgame-202311 #750

Merged
merged 102 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
030a3ef
Add keyvault node to explorer
Nov 15, 2023
b62e2bc
Add properties view support for azure key vault
Nov 16, 2023
0e99e6c
Merge branch 'develop' into hanli/key-vault
wangmingliang-ms Nov 20, 2023
00e22b5
Migrate to use azure cli to show/download credential
Nov 20, 2023
cb4676f
Fix environment variable value issue in machine tagging service
Nov 20, 2023
f69a824
Fix possible NPE in credential properties
Nov 21, 2023
79fba3f
Support create credential/credential version for key vaults
Nov 21, 2023
f2990ab
Support create key vault in Azure Toolkits
Nov 21, 2023
3b51005
Add more help message for key vault creation dialogs
Nov 22, 2023
3b8cfd3
Support set enabled/content type for secret during creation
Nov 22, 2023
374204f
Show notification after download credential from key vaults
Nov 22, 2023
d2bbfd6
Add up missing operation properties
Nov 22, 2023
4a7f533
get key in `handleInsert` context and pass it to subsequent operation…
wangmingliang-ms Nov 10, 2023
563e636
telemetry for loading children nodes.
wangmingliang-ms Nov 17, 2023
154dc55
code completion features for Azure KeyVault.
wangmingliang-ms Nov 17, 2023
50d262a
small fixes
wangmingliang-ms Nov 17, 2023
064cee3
line marker/element reference for keyvault secrets.
wangmingliang-ms Nov 20, 2023
1423aec
add missing `property-source-enabled` when injecting spring configura…
wangmingliang-ms Nov 20, 2023
b136101
take more conditions when detecting secret properties.
wangmingliang-ms Nov 20, 2023
76f422d
enhance the logic of extracting key vault secret environment variable…
wangmingliang-ms Nov 21, 2023
c145b7f
filter out invalid connections when generating references.
wangmingliang-ms Nov 22, 2023
c9b824a
add `Connect to project` action for KeyVaults.
wangmingliang-ms Nov 22, 2023
1993174
add missing operation.properties
wangmingliang-ms Nov 22, 2023
a7a52b8
create KeyVault Secret from plain text secret.
wangmingliang-ms Nov 22, 2023
e1aeb92
Change Key Vaults display name to Key Vault
Nov 22, 2023
0732db0
Always use Key Vault instead of key vault
Nov 22, 2023
9367a23
Fix UX issues for key vault
Nov 22, 2023
aedf24c
Fix possible NPE in function run configuration
Nov 22, 2023
cb029ef
Only disable show/get credential for secret when it was disabed
Nov 22, 2023
752516f
Support set azure cli in azure settings
Nov 22, 2023
0bdf789
rename module/package 'keyvaults' -> 'keyvault'
wangmingliang-ms Nov 23, 2023
66ffe9e
rename telemetry service name 'keyvaults'->'keyvault'
wangmingliang-ms Nov 23, 2023
77ada6d
rename classes 'KeyVaults'->'KeyVault'
wangmingliang-ms Nov 23, 2023
354e828
update icons for Azure Key Vault resources.
wangmingliang-ms Nov 23, 2023
4818bf6
setting initial value when creating Secret and change warning style o…
wangmingliang-ms Nov 23, 2023
90162fd
fix intention message about creating secret from plain secret text.
wangmingliang-ms Nov 23, 2023
35bfb43
remove white background of Azure KeyVault icon.
wangmingliang-ms Nov 23, 2023
1fcfc5d
Merge pull request #8014 from microsoft/feature-keyvault
wangmingliang-ms Nov 26, 2023
d9c4429
update keyvault icons.
wangmingliang-ms Nov 26, 2023
59b6cf5
Merge pull request #8018 from microsoft/feature-keyvault
Flanker32 Nov 27, 2023
7ee5988
Remove SNAPSHOT for toolkit libs, prepare for release
Nov 27, 2023
15d83c5
Remove SNAPSHOT for intellij toolkit, prepare for release
Nov 27, 2023
a27ef1a
Add name validation for key vault resource
Nov 27, 2023
ffb737c
Set label for attributes in key vault creation panel
Nov 27, 2023
2c07003
Merge pull request #8020 from microsoft/hanli/keyvault-validation
Flanker32 Nov 27, 2023
652a71d
Merge pull request #8019 from microsoft/prepare-endgame-202311
wangmingliang-ms Nov 27, 2023
1a398c1
add missing icons
wangmingliang-ms Nov 27, 2023
6c1685e
Fix display issue for key vault in properties editor
Nov 27, 2023
5b442eb
Add restrict for create actions for key vault nodes
Nov 27, 2023
cd636d9
Remove wrong hint message for key/secret/certificate creation dialog
Nov 27, 2023
424de30
Remove Pin for key/secret/certificate version
Nov 27, 2023
50e594a
fix background task description, AB#2123005
wangmingliang-ms Nov 27, 2023
eb413c6
use `org.apache.commons.lang3` instead `org.apache.commons.lang`
wangmingliang-ms Nov 27, 2023
23a236a
return empty environment variables when .env file is invalid, AB#2123931
wangmingliang-ms Nov 27, 2023
47d2ad5
show resource group as tail text of cloud resource code completion item.
wangmingliang-ms Nov 28, 2023
cb6a9a2
change annotation severity to warning for "storage blob/file not foun…
wangmingliang-ms Nov 28, 2023
7273e28
remove Utils in `*.storage.code`
wangmingliang-ms Nov 28, 2023
54b7a48
skip annotator check if environment variables used in "azure-blob:"
wangmingliang-ms Nov 28, 2023
db4efa4
rename `storage.code.spring.StringLiteral*` to `storage.code.spring.S…
wangmingliang-ms Nov 28, 2023
740a085
Add up operation bundle for key vault
Nov 28, 2023
fd1a281
show resource group as tail text of cloud resource code completion it…
wangmingliang-ms Nov 28, 2023
f00fa84
Merge pull request #8024 from microsoft/hanli/fixes-202311
wangmingliang-ms Nov 28, 2023
3fd26ee
Merge pull request #8025 from microsoft/wangmi/hotfix-202311
wangmingliang-ms Nov 28, 2023
f3e7c42
signin action doesn't show after typing "$" because of prefix.
wangmingliang-ms Nov 28, 2023
b7aad59
fix settings about char filter and type handler.
wangmingliang-ms Nov 28, 2023
8851c6d
select the latest located ancestor when the target is not found.
wangmingliang-ms Nov 28, 2023
ab47713
rename `storage.code.spring.StringLiteral*` to `storage.code.spring.S…
wangmingliang-ms Nov 28, 2023
d9e2a50
reference/line marker for keyvault secret used in @Value
wangmingliang-ms Nov 28, 2023
0403949
add support for referring to keyvault secrets from @Value annotation.…
wangmingliang-ms Nov 29, 2023
63580b1
update UI in EDT AB#2125973
wangmingliang-ms Nov 29, 2023
220a827
connect a keyvault first if not when referring keyvault secret.
wangmingliang-ms Nov 29, 2023
fd8f163
use getConnectedResources instead.
wangmingliang-ms Nov 29, 2023
bf9e596
Merge pull request #8026 from microsoft/wangmi/hotfix-202311
wangmingliang-ms Nov 29, 2023
bd85083
Fix possible NPE and message bundle issue for key vault property view
Nov 29, 2023
407a336
Fix incorrect behavior of azure cli input in azure settings panel
Nov 29, 2023
33a2663
Fix operation title for enable/disable/show/download credential version
Nov 29, 2023
add94fc
Fix possible NPE in function run configuration
Nov 29, 2023
0f59b12
Fix build task will be removed when resource connection is added
Nov 29, 2023
817c548
Add telemetry for yaml/function code completition
Nov 29, 2023
d63013b
Merge pull request #8027 from microsoft/hanli/fixes-202311
wangmingliang-ms Nov 30, 2023
a360ebb
Add telemetry to track azure cli install status when invoke cli commands
Nov 30, 2023
0406853
bugfix: focus always moves to the latest ancestor of a not found node…
wangmingliang-ms Nov 30, 2023
7a8b4ca
update spring properties to fit spring boot 3+
wangmingliang-ms Nov 30, 2023
9fe1529
Merge remote-tracking branch 'origin/hanli/fixes-202311' into endgame…
wangmingliang-ms Nov 30, 2023
fd27386
Track credential type when enable/disable/show/download credential
Dec 1, 2023
7f6ec99
Fix action name for create new key version
Dec 1, 2023
183a929
Update changlog for intellij toolkit
Dec 1, 2023
ca29ffa
focus on pinned resource after pinning
wangmingliang-ms Dec 1, 2023
dcc61ec
focus on newly created keyvault secret.
wangmingliang-ms Dec 1, 2023
0ea4f09
improve code completion experience for secret properties(`*.password`).
wangmingliang-ms Dec 1, 2023
3673fe5
set preloading disabled by default.
wangmingliang-ms Dec 1, 2023
c5609e1
check cancelled for long activity in code completion provider to avoi…
wangmingliang-ms Dec 1, 2023
832fa96
add screenshots for keyvaults
wangmingliang-ms Dec 1, 2023
0423ca5
Merge pull request #8029 from microsoft/hanli/fixes-202311
wangmingliang-ms Dec 1, 2023
75ac1d3
upgrade zookeeper version to 3.7.2
fengshuaihu Dec 4, 2023
bcd4737
Merge pull request #8041 from fengshuaihu/users/v-shufeng/fix-zk
fengshuaihu Dec 4, 2023
c3b4e77
fix hdi netty cve issue
fengshuaihu Dec 4, 2023
59073ed
fix hdi lib version err
fengshuaihu Dec 4, 2023
e2d08a6
upgrade lib version to 0.39.2
wangmingliang-ms Dec 7, 2023
2f5cff2
Revert "fix hdi lib version err"
wangmingliang-ms Dec 7, 2023
a5c3d1a
Merge branch 'develop' into merge-endgame-202311
rafaelldi Dec 20, 2023
39787da
Updating versions of dependencies
rafaelldi Dec 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: microsoft/azure-maven-plugins
ref: develop
ref: endgame-202311
path: azure-maven-plugins

# Check out current repository
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
All notable changes to "Azure Toolkit for IntelliJ IDEA" will be documented in this file.

- [Change Log](#change-log)
- [3.83.0](#3830)
- [3.82.0](#3820)
- [3.81.0](#3810)
- [3.80.0](#3800)
Expand Down Expand Up @@ -104,6 +105,20 @@ All notable changes to "Azure Toolkit for IntelliJ IDEA" will be documented in t
- [3.0.7](#307)
- [3.0.6](#306)

## 3.83.0
### Added
- Add Azure Key Vault support in Azure Toolkits
* Resource Management features in Azure explorer
- Create new secret/certificate/key in toolkts
- View/Download secret/certificate/key (need Azure CLI installed)
* Code assistance of Key Vault for Spring project

### Fixed
- Get the error of "AzureToolkitRuntimeException" when opening project with resource connection configuration file
- Get duplicate property key when connect resource from .properties
- Generate deprecated configurations with code completions in spring properties
- Build task will be removed for project with resource connection

## 3.82.0
### Added
- Code assistance of Azure resources for Spring and Azure Functions.
Expand Down
6 changes: 3 additions & 3 deletions PluginsAndFeatures/AddLibrary/AzureLibraries/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<parent>
<groupId>com.microsoft.azuretools</groupId>
<artifactId>utils</artifactId>
<version>3.83.0-SNAPSHOT</version>
<version>3.83.0</version>
</parent>
<groupId>com.microsoft.azuretools</groupId>
<artifactId>com.microsoft.azuretools.sdk.lib</artifactId>
Expand All @@ -39,9 +39,9 @@
</organization>

<properties>
<azuretool.version>3.83.0-SNAPSHOT</azuretool.version>
<azuretool.version>3.83.0</azuretool.version>
<azuretool.sdk.version>3.32.0.qualifier</azuretool.sdk.version>
<azure.toolkit-lib.version>0.39.0-SNAPSHOT</azure.toolkit-lib.version>
<azure.toolkit-lib.version>0.39.2</azure.toolkit-lib.version>
</properties>
<dependencyManagement>
<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ Export-Package: com.microsoft.azuretools.appservice,
com.microsoft.azuretools.appservice.handlers,
com.microsoft.azuretools.appservice.ui
Bundle-ClassPath: .,
target/lib/azure-toolkit-ide-appservice-lib-0.39.0-SNAPSHOT.jar
target/lib/azure-toolkit-ide-appservice-lib-0.39.2.jar
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-toolkit-ide-appservice-lib</artifactId>
<version>0.39.0-SNAPSHOT</version>
<version>0.39.2</version>
</dependency>
</dependencies>
<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Require-Bundle: org.eclipse.ui,
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
target/lib/azure-toolkit-ide-springcloud-lib-0.39.0-SNAPSHOT.jar
target/lib/azure-toolkit-ide-springcloud-lib-0.39.2.jar
Import-Package: com.microsoft.azuretools.core.actions,
org.eclipse.core.expressions,
org.eclipse.jface.text.hyperlink,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-toolkit-ide-springcloud-lib</artifactId>
<version>0.39.0-SNAPSHOT</version>
<version>0.39.2</version>
</dependency>
</dependencies>
<build>
Expand Down

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
Expand Up @@ -131,7 +131,7 @@ public String getLocalSettingsJsonPath() {
@javax.annotation.Nullable
public String getDefaultLocalSettingsJsonPath(final Module module) {
// workaround to get module file, todo: investigate the process canceled exception with FilenameIndex API
return Paths.get(ModuleUtil.getModuleDirPath(module), "local.settings.json").toString();
return Objects.isNull(module) || Objects.isNull(module.getModuleFilePath()) ? null : Paths.get(ModuleUtil.getModuleDirPath(module), "local.settings.json").toString();
}

public Map<String, String> getAppSettings() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.microsoft.azure.toolkit.ide.guidance.ComponentContext;
import com.microsoft.azure.toolkit.ide.guidance.config.InputConfig;
import com.microsoft.azure.toolkit.ide.guidance.input.GuidanceInput;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

import javax.annotation.Nonnull;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import com.microsoft.azure.toolkit.lib.appservice.function.FunctionApp;
import com.microsoft.azure.toolkit.lib.common.action.Action;
import com.microsoft.azure.toolkit.lib.common.operation.AzureOperation;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

import javax.annotation.Nonnull;
import java.util.List;
Expand All @@ -43,11 +43,11 @@ public void execute() throws Exception {
final String trigger = (String) context.getParameter(TRIGGER);
final FunctionApp functionApp = Azure.az(AzureFunctions.class).functionApp(functionId);
final List<FunctionEntity> functionEntities = Objects.requireNonNull(functionApp, String.format("failed to find function with id (%s) in Azure",
functionId)).listFunctions(true);
functionId)).listFunctions(true);
final FunctionEntity target = functionEntities.stream().filter(entity -> StringUtils.equals(entity.getName(), trigger))
.findFirst().orElse(functionEntities.get(0));
.findFirst().orElse(functionEntities.get(0));
final Action.Id<FunctionEntity> action = PlatformUtils.isIdeaUltimate() ?
FunctionAppActionsContributor.TRIGGER_FUNCTION_WITH_HTTP_CLIENT : FunctionAppActionsContributor.TRIGGER_FUNCTION_IN_BROWSER;
FunctionAppActionsContributor.TRIGGER_FUNCTION_WITH_HTTP_CLIENT : FunctionAppActionsContributor.TRIGGER_FUNCTION_IN_BROWSER;
final DataContext context = dataId -> CommonDataKeys.PROJECT.getName().equals(dataId) ? project : null;
final AnActionEvent event = AnActionEvent.createFromAnAction(new EmptyAction(), null, "azure.guidance.summary", context);
IntellijAzureActionManager.getInstance().getAction(action).handle(target, event);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import com.microsoft.azure.toolkit.lib.common.form.AzureForm;
import com.microsoft.azure.toolkit.lib.common.form.AzureFormInput;
import com.microsoft.azure.toolkit.lib.common.form.AzureValidationInfo;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.jetbrains.annotations.Nullable;

Expand All @@ -21,7 +21,7 @@
import java.util.regex.Pattern;

public class AddAppSettingsDialog extends AzureDialog<Pair<String, String>>
implements AzureForm<Pair<String, String>> {
implements AzureForm<Pair<String, String>> {

private static final Pattern APP_SETTINGS_NAME_PATTERN = Pattern.compile("^[a-zA-Z0-9_\\.]+$");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ allprojects {
}

ext {
azureToolkitLibsVersion = "0.39.0-SNAPSHOT"
azureToolkitIdeLibsVersion = "0.39.0-SNAPSHOT"
azureToolkitLibsVersion = "0.39.2"
azureToolkitIdeLibsVersion = "0.39.2"
}

dependencyManagement {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pluginVersion=3.83.0-SNAPSHOT
pluginVersion=3.83.0
intellijDisplayVersion=2023.1
intellij_version=IU-2023.1
dep_plugins=org.intellij.scala:2023.1.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns:xi="http://www.w3.org/2001/XInclude">
<id>com.microsoft.tooling.msservices.intellij.azure</id>
<name>Azure Toolkit</name>
<version>3.83.0-SNAPSHOT</version>
<version>3.83.0</version>
<vendor email="[email protected]" url="http://www.microsoft.com">Microsoft</vendor>

<description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.intellij.openapi.fileTypes.FileType;
import com.intellij.openapi.fileTypes.ex.FileTypeManagerEx;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.project.ProjectManager;
import com.intellij.openapi.ui.ComboBox;
import com.intellij.openapi.ui.Messages;
import com.intellij.ui.EditorTextField;
Expand All @@ -20,7 +19,7 @@
import com.microsoft.azure.toolkit.lib.cognitiveservices.CognitiveAccount;
import com.microsoft.azure.toolkit.lib.cognitiveservices.CognitiveDeployment;
import com.microsoft.azure.toolkit.lib.common.operation.AzureOperation;
import org.apache.commons.lang.BooleanUtils;
import org.apache.commons.lang3.BooleanUtils;

import javax.annotation.Nonnull;
import javax.swing.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import com.microsoft.azure.toolkit.lib.cognitiveservices.AzureCognitiveServices;
import com.microsoft.azure.toolkit.lib.common.model.Subscription;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.BooleanUtils;
import org.apache.commons.lang3.BooleanUtils;

import javax.annotation.Nonnull;
import java.util.*;
Expand All @@ -29,15 +29,15 @@ public CognitiveSubscriptionComboBox(boolean listUnselectedSubscriptions) {
@Override
protected List<Subscription> loadItems() {
final List<Subscription> subscriptions = Optional.of(super.loadItems()).filter(CollectionUtils::isNotEmpty)
.orElseGet(this::getAllSubscriptions);
.orElseGet(this::getAllSubscriptions);
this.status = subscriptions.stream().collect(Collectors.toMap(subscription -> subscription,
subscription -> Azure.az(AzureCognitiveServices.class).isOpenAIEnabled(subscription.getId())));
subscription -> Azure.az(AzureCognitiveServices.class).isOpenAIEnabled(subscription.getId())));
return subscriptions;
}

private List<Subscription> getAllSubscriptions() {
return listUnselectedSubscriptions && Azure.az(AzureAccount.class).isLoggedIn() ?
Azure.az(AzureAccount.class).getAccount().getSubscriptions() : Collections.emptyList();
Azure.az(AzureAccount.class).getAccount().getSubscriptions() : Collections.emptyList();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import com.microsoft.azure.toolkit.lib.common.model.Region;
import com.microsoft.azure.toolkit.lib.common.model.Subscription;
import com.microsoft.azure.toolkit.lib.resource.ResourceGroup;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.NotNull;

import javax.annotation.Nonnull;
Expand All @@ -37,7 +37,7 @@

public class CognitiveAccountCreationDialog extends AzureDialog<CognitiveAccountDraft> implements AzureForm<CognitiveAccountDraft> {
public static final String REGISTER_SUBSCRIPTION_TEXT = "Azure OpenAI Service is currently available to customers via an application form. The selected subscription has not been enabled for use of the service and does not have quota for any pricing tiers. " +
"<a href = \"https://aka.ms/oai/access\">Click here to request access to Azure OpenAI service</a>.\u2197";
"<a href = \"https://aka.ms/oai/access\">Click here to request access to Azure OpenAI service</a>.\u2197";
private JLabel lblSubscription;
private CognitiveSubscriptionComboBox cbSubscription;
private JLabel lblResourceGroup;
Expand Down Expand Up @@ -112,7 +112,7 @@ private void createUIComponents() {
@Override
protected @NotNull HyperlinkListener createHyperlinkListener() {
return event -> Optional.of(event).filter(e -> e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
.ifPresent(ignore -> AzureActionManager.getInstance().getAction(CognitiveServicesActionsContributor.ENABLE_OPENAI).handle(cbSubscription.getValue()));
.ifPresent(ignore -> AzureActionManager.getInstance().getAction(CognitiveServicesActionsContributor.ENABLE_OPENAI).handle(cbSubscription.getValue()));
}
};

Expand All @@ -139,7 +139,7 @@ public CognitiveAccountDraft getValue() {
final String name = Objects.requireNonNull(txtName.getValue());
final ResourceGroup resourceGroup = Objects.requireNonNull(cbResourceGroup.getValue());
final CognitiveAccountDraft draft = Azure.az(AzureCognitiveServices.class)
.accounts(subscription.getId()).create(name, resourceGroup.getName());
.accounts(subscription.getId()).create(name, resourceGroup.getName());
final CognitiveAccountDraft.Config config = new CognitiveAccountDraft.Config();
config.setResourceGroup(resourceGroup);
config.setName(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import lombok.Setter;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.ListUtils;
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang3.ObjectUtils;

import javax.annotation.Nonnull;
import javax.swing.*;
Expand All @@ -40,9 +40,9 @@
public class SystemMessagePanel implements AzureForm<SystemMessage> {
private static final int DEBOUNCE_DELAY = 200;
public static final String SYSTEM_MESSAGE_DESCRIPTION = "Use a template to get started, or just start writing your own system " +
"message below. Want some tips? <a href = \"https://go.microsoft.com/fwlink/?linkid=2235756\">Learn more</a>\u2197";
"message below. Want some tips? <a href = \"https://go.microsoft.com/fwlink/?linkid=2235756\">Learn more</a>\u2197";
public static final String EXAMPLE_DESCRIPTION = "Add examples to show the chat what responses you want. " +
"It will try to mimic any responses you add here so make sure they match the rules you laid out in the system message.";
"It will try to mimic any responses you add here so make sure they match the rules you laid out in the system message.";
public static final String CHANGE_SYSTEM_MESSAGE_CONFIRM_MESSAGE = "Loading a new example will replace the current system message and start a new chat session. To save the current system message, copy it to a separate document before continuing.";
public static final String UPDATE_SYSTEM_MESSAGE = "Update system message?";
private JPanel pnlRoot;
Expand Down Expand Up @@ -74,8 +74,8 @@ public SystemMessagePanel() {

private void init() {
final Action<Void> addExampleAction = new Action<Void>(Action.Id.of("user/openai.add_example"))
.withAuthRequired(false)
.withHandler(ignore -> this.onAddNewExample());
.withAuthRequired(false)
.withHandler(ignore -> this.onAddNewExample());
this.btnAddExample.setAction(addExampleAction);
this.btnAddExample.setIcon(AllIcons.General.Add);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.microsoft.azure.toolkit.lib.Azure;
import com.microsoft.azure.toolkit.lib.auth.AzureAccount;
import com.microsoft.azure.toolkit.lib.common.action.Action;
import com.microsoft.azure.toolkit.lib.common.bundle.AzureString;
import com.microsoft.azure.toolkit.lib.common.model.AzResource;
import com.microsoft.azure.toolkit.lib.common.model.Region;
import com.microsoft.azure.toolkit.lib.common.model.Subscription;
Expand Down Expand Up @@ -154,12 +153,11 @@ private void initListeners() {
.withIdParam(this.containerApp.getName())
.withHandler(ignore -> this.refresh());
this.btnRefresh.setAction(refreshAction);
final AzureString saveTitle = AzureString.format("Saving updates of app(%s)", this.draft.getName());
final Action<Void> saveAction = new Action<Void>(Action.Id.of("user/containerapps.update_container_app.app"))
.withAuthRequired(true)
.withSource(this.containerApp)
.withIdParam(this.containerApp.getName())
.withHandler(ignore -> tm.runInBackground(saveTitle, this::save));
.withHandler(ignore -> this.save());
this.saveButton.setAction(saveAction);
}

Expand Down Expand Up @@ -239,7 +237,7 @@ private void save() {
final ContainerAppDraft.Config config = Optional.ofNullable(this.draft.getConfig()).orElseGet(ContainerAppDraft.Config::new);
config.setIngressConfig(ingressConfig);
draft.setConfig(config);
AzureTaskManager.getInstance().runInBackground("Saving updates", this.draft::commit);
AzureTaskManager.getInstance().runInBackground("save updates", this.draft::commit);
}

private void reset() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

@Data
@EqualsAndHashCode
Expand Down
Loading