mirror of
https://github.com/getrebuild/rebuild.git
synced 2025-02-22 05:14:38 +08:00
better on install
This commit is contained in:
parent
7fd6bd3fa7
commit
c66940c5d2
3 changed files with 20 additions and 18 deletions
|
@ -143,7 +143,7 @@ public class Application implements ApplicationListener<ApplicationStartedEvent>
|
|||
public void run() {
|
||||
log.warn(RebuildBanner.formatBanner(
|
||||
"REBUILD IS WAITING FOR INSTALL ...",
|
||||
"Install URL : " + BootApplication.getLocalUrl() + "/setup/install"));
|
||||
"Install : " + BootApplication.getLocalUrl() + "/setup/install"));
|
||||
}
|
||||
}, 1500);
|
||||
}
|
||||
|
|
|
@ -79,11 +79,13 @@ public class RebuildWebInterceptor implements AsyncHandlerInterceptor, InstallSt
|
|||
|
||||
// 服务暂不可用
|
||||
if (!Application.isReady()) {
|
||||
final boolean isError = requestUri.endsWith("/error") || requestUri.contains("/error/");
|
||||
|
||||
// 已安装
|
||||
if (checkInstalled()) {
|
||||
log.error("Server Unavailable : " + requestEntry);
|
||||
|
||||
if (requestUri.endsWith("/error") || requestUri.contains("/error/")) {
|
||||
if (isError) {
|
||||
return true;
|
||||
} else {
|
||||
sendRedirect(response, "/error/server-status", null);
|
||||
|
@ -91,7 +93,7 @@ public class RebuildWebInterceptor implements AsyncHandlerInterceptor, InstallSt
|
|||
}
|
||||
}
|
||||
// 未安装
|
||||
else if (!requestUri.contains("/setup/")) {
|
||||
else if (!(requestUri.contains("/setup/") || requestUri.contains("/commons/theme/") || isError)) {
|
||||
sendRedirect(response, "/setup/install", null);
|
||||
return false;
|
||||
} else {
|
||||
|
|
|
@ -27,7 +27,7 @@ class Setup extends React.Component {
|
|||
<div>
|
||||
<div className="rb-finish text-center">
|
||||
<div>
|
||||
<i className={`zmdi icon ${state[0]}`}></i>
|
||||
<i className={`zmdi icon ${state[0]}`} />
|
||||
</div>
|
||||
<h2 className="mb-0">{state[1]}</h2>
|
||||
{this.state.installState === 11 && (
|
||||
|
@ -43,7 +43,7 @@ class Setup extends React.Component {
|
|||
{this.state.installState === 12 && this.state.installError && (
|
||||
<div className="alert alert-danger alert-icon alert-icon-border alert-sm mt-5 mb-0 text-left">
|
||||
<div className="icon">
|
||||
<span className="zmdi zmdi-close-circle-o"></span>
|
||||
<i className="zmdi zmdi-close-circle-o" />
|
||||
</div>
|
||||
<div className="message">{this.state.installError}</div>
|
||||
</div>
|
||||
|
@ -205,15 +205,15 @@ class DatabaseConf extends React.Component {
|
|||
</div>
|
||||
</form>
|
||||
<div className="progress">
|
||||
<div className="progress-bar" style={{ width: '20%' }}></div>
|
||||
<div className="progress-bar" style={{ width: '20%' }} />
|
||||
</div>
|
||||
<div className="splash-footer">
|
||||
{this.state.testMessage && (
|
||||
<div className={`alert ${this.state.testState ? 'alert-success' : 'alert-danger'} alert-icon alert-icon-border text-left alert-sm`}>
|
||||
<div className="icon">
|
||||
<span className={`zmdi ${this.state.testState ? 'zmdi-check' : 'zmdi-close-circle-o'}`}></span>
|
||||
<i className={`zmdi ${this.state.testState ? 'zmdi-check' : 'zmdi-close-circle-o'}`} />
|
||||
</div>
|
||||
<div className="message" dangerouslySetInnerHTML={{ __html: this.state.testMessage }}></div>
|
||||
<div className="message" dangerouslySetInnerHTML={{ __html: this.state.testMessage }} />
|
||||
</div>
|
||||
)}
|
||||
<button className="btn btn-link float-left text-left pl-0" onClick={this._prev}>
|
||||
|
@ -229,7 +229,7 @@ class DatabaseConf extends React.Component {
|
|||
{$L('下一步')}
|
||||
</button>
|
||||
</div>
|
||||
<div className="clearfix"></div>
|
||||
<div className="clearfix" />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
@ -347,15 +347,15 @@ class CacheConf extends DatabaseConf {
|
|||
)}
|
||||
</form>
|
||||
<div className="progress">
|
||||
<div className="progress-bar" style={{ width: '40%' }}></div>
|
||||
<div className="progress-bar" style={{ width: '40%' }} />
|
||||
</div>
|
||||
<div className="splash-footer">
|
||||
{this.state.testMessage && (
|
||||
<div className={`alert ${this.state.testState ? 'alert-success' : 'alert-danger'} alert-icon alert-icon-border text-left alert-sm`}>
|
||||
<div className="icon">
|
||||
<span className={`zmdi ${this.state.testState ? 'zmdi-check' : 'zmdi-close-circle-o'}`}></span>
|
||||
<i className={`zmdi ${this.state.testState ? 'zmdi-check' : 'zmdi-close-circle-o'}`} />
|
||||
</div>
|
||||
<div className="message" dangerouslySetInnerHTML={{ __html: this.state.testMessage }}></div>
|
||||
<div className="message" dangerouslySetInnerHTML={{ __html: this.state.testMessage }} />
|
||||
</div>
|
||||
)}
|
||||
<button className="btn btn-link float-left text-left pl-0" onClick={this._prev}>
|
||||
|
@ -373,7 +373,7 @@ class CacheConf extends DatabaseConf {
|
|||
{$L('下一步')}
|
||||
</button>
|
||||
</div>
|
||||
<div className="clearfix"></div>
|
||||
<div className="clearfix" />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
@ -461,7 +461,7 @@ class AdminConf extends DatabaseConf {
|
|||
</div>
|
||||
</form>
|
||||
<div className="progress">
|
||||
<div className="progress-bar" style={{ width: '60%' }}></div>
|
||||
<div className="progress-bar" style={{ width: '60%' }} />
|
||||
</div>
|
||||
<div className="splash-footer">
|
||||
{this.props.$$$parent.state.installType === 1 && (
|
||||
|
@ -481,7 +481,7 @@ class AdminConf extends DatabaseConf {
|
|||
{$L('下一步')}
|
||||
</button>
|
||||
</div>
|
||||
<div className="clearfix"></div>
|
||||
<div className="clearfix" />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
@ -547,9 +547,9 @@ class ModelConf extends React.Component {
|
|||
<RbAlertBox message={ModelConf_error} />
|
||||
</div>
|
||||
)}
|
||||
<div className="clearfix"></div>
|
||||
<div className="clearfix" />
|
||||
<div className="progress">
|
||||
<div className="progress-bar" style={{ width: '80%' }}></div>
|
||||
<div className="progress-bar" style={{ width: '80%' }} />
|
||||
</div>
|
||||
<div className="splash-footer">
|
||||
<button className="btn btn-link float-left text-left pl-0" onClick={() => this._prev(4)}>
|
||||
|
@ -561,7 +561,7 @@ class ModelConf extends React.Component {
|
|||
{$L('完成安装')}
|
||||
</button>
|
||||
</div>
|
||||
<div className="clearfix"></div>
|
||||
<div className="clearfix" />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue