1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 14:50:29 +00:00

Merge branch 'master' into 13.0

This commit is contained in:
Michael An
2025-02-20 17:59:59 +08:00
3 changed files with 7 additions and 8 deletions

View File

@@ -32,6 +32,7 @@ class TransferDialog extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
options: [],
selectedOption: null, selectedOption: null,
errorMsg: [], errorMsg: [],
transferToUser: true, transferToUser: true,
@@ -39,7 +40,6 @@ class TransferDialog extends React.Component {
reshare: false, reshare: false,
activeTab: !this.props.isDepAdminTransfer ? TRANS_USER : TRANS_DEPART activeTab: !this.props.isDepAdminTransfer ? TRANS_USER : TRANS_DEPART
}; };
this.options = [];
this.userSelect = React.createRef(); this.userSelect = React.createRef();
} }
@@ -83,7 +83,7 @@ class TransferDialog extends React.Component {
} }
updateOptions = (departmentsRes) => { updateOptions = (departmentsRes) => {
this.options = departmentsRes.data.map(item => { const options = departmentsRes.data.map(item => {
let option = { let option = {
value: item.name, value: item.name,
email: item.email, email: item.email,
@@ -91,6 +91,7 @@ class TransferDialog extends React.Component {
}; };
return option; return option;
}); });
this.setState({ options });
}; };
onClick = () => { onClick = () => {
@@ -182,7 +183,7 @@ class TransferDialog extends React.Component {
hideSelectedOptions={true} hideSelectedOptions={true}
components={makeAnimated()} components={makeAnimated()}
placeholder={gettext('Select a department')} placeholder={gettext('Select a department')}
options={this.options} options={this.state.options}
onChange={this.handleSelectChange} onChange={this.handleSelectChange}
value={this.state.selectedOption} value={this.state.selectedOption}
className="transfer-repo-select-department" className="transfer-repo-select-department"

View File

@@ -76,7 +76,7 @@ function validate_seafile_data_dir () {
} }
function validate_already_running () { function validate_already_running () {
if pid=$(pgrep -f "seaf-fuse" 2>/dev/null); then if pid=$(pgrep -f "bin/seaf-fuse" 2>/dev/null); then
echo "seaf-fuse is already running, pid $pid" echo "seaf-fuse is already running, pid $pid"
echo echo
exit 1; exit 1;
@@ -111,7 +111,7 @@ function start_seaf_fuse () {
sleep 2 sleep 2
# check if seaf-fuse started successfully # check if seaf-fuse started successfully
if ! pgrep -f "seaf-fuse" 2>/dev/null 1>&2; then if ! pgrep -f "bin/seaf-fuse" 2>/dev/null 1>&2; then
echo "Failed to start seaf-fuse" echo "Failed to start seaf-fuse"
exit 1; exit 1;
fi fi
@@ -121,7 +121,7 @@ function start_seaf_fuse () {
} }
function stop_seaf_fuse() { function stop_seaf_fuse() {
if ! pgrep -f "seaf-fuse" 2>/dev/null 1>&2; then if ! pgrep -f "bin/seaf-fuse" 2>/dev/null 1>&2; then
echo "seaf-fuse not running yet" echo "seaf-fuse not running yet"
return 1; return 1;
fi fi

View File

@@ -48,7 +48,6 @@ function check_component_running() {
fi fi
} }
<<'COMMENT'
function validate_already_running () { function validate_already_running () {
if pid=$(pgrep -f "seafile-monitor.sh" 2>/dev/null); then if pid=$(pgrep -f "seafile-monitor.sh" 2>/dev/null); then
echo "seafile server is still running, stop it by \"seafile.sh stop\"" echo "seafile server is still running, stop it by \"seafile.sh stop\""
@@ -59,7 +58,6 @@ function validate_already_running () {
check_component_running "seaf-server" "seaf-server" check_component_running "seaf-server" "seaf-server"
check_component_running "seafdav" "wsgidav.server.server_cli" check_component_running "seafdav" "wsgidav.server.server_cli"
} }
COMMENT
function run_seaf_import () { function run_seaf_import () {
validate_seafile_data_dir; validate_seafile_data_dir;