Skip to content

Commit

Permalink
schedule records may be undefined when use local cache
Browse files Browse the repository at this point in the history
  • Loading branch information
brookshi committed Jan 16, 2018
1 parent 92d594a commit ab5ac86
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion client/src/modules/schedule/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class Schedule extends React.Component<ScheduleProps, ScheduleState> {
<Content className="schedule-content">
<ScheduleRunHistoryGrid
schedule={schedule}
scheduleRecordsInfo={scheduleRecordsInfo[activeSchedule]}
scheduleRecordsInfo={scheduleRecordsInfo ? scheduleRecordsInfo[activeSchedule] : undefined}
envName={envName}
compareEnvName={compareEnvName}
envNames={this.getEnvNames()}
Expand Down
5 changes: 3 additions & 2 deletions client/src/modules/schedule/schedule_run_history_grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ interface ScheduleRunHistoryGridProps {

schedule: DtoSchedule;

scheduleRecordsInfo: ScheduleRecordsInfo;
scheduleRecordsInfo?: ScheduleRecordsInfo;

envName: string;

Expand Down Expand Up @@ -573,8 +573,9 @@ class ScheduleRunHistoryGrid extends React.Component<ScheduleRunHistoryGridProps
}

private insertToStatisticsData(envs: string[], statisticsData: _.Dictionary<ScheduleStatistics>, runResults: Array<RunResult | _.Dictionary<RunResult>>, runDate: Date) {
const { scheduleRecordsInfo } = this.props;
this.flattenRunResult(runResults).forEach(o => {
if (envs.find(e => e === o.envId) || this.props.scheduleRecordsInfo.excludeNotExist === false) {
if (envs.find(e => e === o.envId) || (scheduleRecordsInfo && scheduleRecordsInfo.excludeNotExist === false)) {
const key = `${o.id}${o.param || ''}${o.envId || ''}`;
statisticsData[key] = statisticsData[key] || {};
statisticsData[key].runResults = statisticsData[key].runResults || [];
Expand Down
2 changes: 1 addition & 1 deletion client/tslint.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": [
"tslint:latest", "tslint-react"
"tslint-react"
],
"rules": {
"align": [
Expand Down
11 changes: 9 additions & 2 deletions cn/installation/StepByStep.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,19 @@


#### 安装过程可能出现的问题

-----
问: 提交后跳转不成功

答: 安装过程出错,看看server的命令行有什么提示,一般是权限相关问题。

-----
问:启动后一直再转圈

答:可能是数据库连不上导致,先查看在当前机器上是否能访问数据库;也有可能是连接数据库出错导致,请确保数据库支持json列。

-----
问:Windows系统下启动后弹出好几个窗口
答:正常现象,pm2启动的,如果想避免弹窗,可以考虑把pm2注册成服务。

答:正常现象,pm2启动的,如果想避免弹窗,可以考虑把pm2注册成服务。

-----

0 comments on commit ab5ac86

Please sign in to comment.