Skip to content

Commit 52f1490

Browse files
author
zhangjunfeng
committed
bugfixed
1 parent 79a92e3 commit 52f1490

4 files changed

Lines changed: 12 additions & 9 deletions

File tree

modules/vertx-rest/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestProtocol.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ private boolean configSingletonJetty() throws IgniteCheckedException {
236236
try {
237237

238238
String jettyPath = config().getJettyPath();
239-
final URL cfgUrl;
239+
URL cfgUrl;
240240

241241
if (jettyPath == null) {
242242
cfgUrl = null;
@@ -246,7 +246,9 @@ private boolean configSingletonJetty() throws IgniteCheckedException {
246246
}
247247
else {
248248
cfgUrl = U.resolveIgniteUrl(jettyPath);
249-
249+
if (cfgUrl == null && (jettyPath.startsWith("http://") || jettyPath.startsWith("https://"))){
250+
cfgUrl = new URL(jettyPath);
251+
}
250252
if (cfgUrl == null)
251253
throw new IgniteSpiException("Invalid Vertx configuration file: " + jettyPath);
252254
else if (log.isDebugEnabled())

web-console/frontend/app/components/page-queries/components/queries-notebook/controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ export class NotebookCtrl {
834834

835835
const _startWatch = () => {
836836
const finishLoading$ = defer(() => {
837-
if (!this.Demo.enabled)
837+
//-if (!this.Demo.enabled)
838838
Loading.finish('sqlLoading');
839839
}).pipe(take(1));
840840

web-console/frontend/app/components/web-console-header/components/demo-mode-button/controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default class DemoModeButton {
2525

2626
async startDemo() {
2727
const connectionState = this.agentMgr.connectionSbj.getValue();
28-
const disconnected = _.get(connectionState, 'state') === 'AGENT_DISCONNECTED';
28+
const disconnected = _.get(connectionState, 'state') === 'AGENT_DISCONNECTED' || _.get(connectionState, 'state') === 'CLUSTER_DISCONNECTED';
2929
const demoEnabled = _.get(connectionState, 'hasDemo');
3030
const user = await this.User.current$.pipe(take(1)).toPromise();
3131

web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/WebSocketRouter.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -461,13 +461,14 @@ private JsonObject processClusterStart(WebSocketRequest evt) {
461461

462462
try {
463463
String work = U.workDirectory(null, null);
464+
String configPath = work+"/config/";
464465
if(isDemo){
465-
work = work + "/demo-work";
466+
configPath = work + "/demo-config/";
466467
}
467-
boolean success = IgniteClusterLauncher.saveBlobToFile(json,work+"/config/",messages);
468+
boolean success = IgniteClusterLauncher.saveBlobToFile(json,configPath,messages);
468469
if(success){
469470
if(json.containsKey("crudui")) {
470-
String descDir = work+"/config/" + clusterName+"/";
471+
String descDir = configPath + clusterName+"/";
471472
CrudUICodeGenerator codeGen = new CrudUICodeGenerator();
472473
List<String> codeMessages = codeGen.generator(descDir,json.getMap(),validTokens);
473474
messages.addAll(codeMessages);
@@ -515,7 +516,7 @@ else if(!success) {
515516
}
516517
else {
517518

518-
String cfgFile = String.format("%s/config/%s/src/main/resources/META-INF/%s-server.xml", work, clusterName,clusterName);
519+
String cfgFile = String.format("%s%s/src/main/resources/META-INF/%s-server.xml", configPath, clusterName,clusterName);
519520
File configWorkFile = new File(cfgFile);
520521

521522
if(configWorkFile.exists() && configFile.exists()) {
@@ -551,7 +552,7 @@ else if(configFile.exists()) {
551552
else {
552553
// 启动一个内存型的node,有多少个Agent就有多少个Demo Node
553554
AgentMetadataDemo.bindTestDatasource();
554-
String cfgFile = String.format("%s/config/%s/src/main/resources/META-INF/%s-server.xml", work, clusterName,clusterName);
555+
String cfgFile = String.format("%s%s/src/main/resources/META-INF/%s-server.xml", configPath, clusterName,clusterName);
555556
// 启动Demo节点,并且在最后一个节点部署服务
556557
ignite = AgentClusterDemo.tryStart(clusterName,cfgFile,cfg.serverId(),isLastNode);
557558
if(ignite!=null) {

0 commit comments

Comments
 (0)