mirror of
https://github.com/caprover/caprover
synced 2026-05-06 03:30:29 +00:00
Making logs section expand right after deploy even before logs retrieved
This commit is contained in:
@@ -7,6 +7,7 @@ import { Input, Icon, Alert, Row, Spin } from "antd";
|
||||
export default class BuildLogsView extends ApiComponent<
|
||||
{
|
||||
appName: string;
|
||||
buildLogRecreationId: string;
|
||||
},
|
||||
{
|
||||
isAppBuilding: boolean;
|
||||
@@ -20,7 +21,7 @@ export default class BuildLogsView extends ApiComponent<
|
||||
super(props);
|
||||
this.state = {
|
||||
isAppBuilding: false,
|
||||
expandedLogs: false,
|
||||
expandedLogs: !!this.props.buildLogRecreationId,
|
||||
buildLogs: "",
|
||||
lastLineNumberPrinted: -10000
|
||||
};
|
||||
|
||||
@@ -48,6 +48,7 @@ export default class Deployment extends Component<
|
||||
<div>
|
||||
<BuildLogsView
|
||||
appName={app.appName!}
|
||||
buildLogRecreationId={self.state.buildLogRecreationId}
|
||||
key={app.appName! + "-" + self.state.buildLogRecreationId}
|
||||
/>
|
||||
<div style={{ height: 20 }} />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { Component } from "react";
|
||||
import ApiComponent from "../../../global/ApiComponent";
|
||||
import { Row, Input, Button } from "antd";
|
||||
import { Row, Input, Button, message } from "antd";
|
||||
import Toaster from "../../../../utils/Toaster";
|
||||
|
||||
export default abstract class UploaderPlainTextBase extends ApiComponent<
|
||||
@@ -39,6 +39,10 @@ export default abstract class UploaderPlainTextBase extends ApiComponent<
|
||||
true
|
||||
);
|
||||
})
|
||||
.then(function() {
|
||||
self.setState({ userEnteredValue: "" });
|
||||
self.props.onUploadSucceeded();
|
||||
})
|
||||
.catch(Toaster.createCatcher())
|
||||
.then(function() {
|
||||
self.setState({ uploadInProcess: false });
|
||||
@@ -65,7 +69,9 @@ export default abstract class UploaderPlainTextBase extends ApiComponent<
|
||||
<div style={{ height: 20 }} />
|
||||
<Row type="flex" justify="end">
|
||||
<Button
|
||||
disabled={!self.state.userEnteredValue.trim()}
|
||||
disabled={
|
||||
self.state.uploadInProcess || !self.state.userEnteredValue.trim()
|
||||
}
|
||||
type="primary"
|
||||
onClick={() =>
|
||||
self.startDeploy(
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
import React, { Component } from "react";
|
||||
import ApiComponent from "../../../global/ApiComponent";
|
||||
import { Row, Input, Button } from "antd";
|
||||
import UploaderPlainTextCaptainDefinition from "./UploaderPlainTextCaptainDefinition";
|
||||
import { ICaptainDefinition } from "../../../../models/ICaptainDefinition";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user