Skip to content

Refresh if maintenance mode is over - #3937

Merged
LukasReschke merged 1 commit into
masterfrom
refresh_if_maintenance_is_over
Sep 11, 2014
Merged

LukasReschke merged 1 commit into
masterfrom
refresh_if_maintenance_is_over

Conversation

@Niduroki

@Niduroki Niduroki commented Jul 4, 2013

Copy link
Copy Markdown

Using status.php for this.
I modified status.php to also show, whether we're in maintenance.

Checks every 20 seconds if maintenance is over, if yes: reload.

@karlitschek @tanghus @Raydiation

@Niduroki

Niduroki commented Jul 4, 2013

Copy link
Copy Markdown
Author

Also strokes one point of the list of #1140
@DeepDiver1975

Comment thread core/js/maintenance-check.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will that work on all browsers?
Why not use jquery.ajax?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if something's wrong with jquery …
While we're in maintenance everything could go wrong …

Besides: I tested this in Firefox and Chromium. Internet says IE likes it after/with IE7.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaik the whole maintenance page is jquery based - right?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The maintenance page loads all the files that are loaded elsewhere (including jquery), because of initTemplateEngine().
When commenting all the scripts out the maintenance page still works fine. (The non-admin maintenance page, the update page needs jquery afaik).

Having all these "requirements" (if a script is missing addScript() refuses to work) for a "last-stand" isn't really great though.

Edit: If the maintenance page is designed to have jquery I will use it of course, but I'd imagine a maintenance page to have nothing but the are necessities, because things like jquery may miss, or something alike.

@MTGap

MTGap commented Jul 4, 2013

Copy link
Copy Markdown
Contributor

@Niduroki

Niduroki commented Jul 4, 2013

Copy link
Copy Markdown
Author

@MTGap I'm talking about the page that only says "ownCloud is in maintenance mode", not the updating-page.

@MTGap

MTGap commented Jul 4, 2013

Copy link
Copy Markdown
Contributor

Is that really necessary? You added unnecessary complications. I'm going to say no 👎

@Niduroki

Niduroki commented Jul 4, 2013

Copy link
Copy Markdown
Author

#1140 :

Let's add a javascript reload to the error page to bring the user back to normal operations as soon as the maintenance mode ends.

@DeepDiver1975 ↑

In the context of #1140 this would be nice, and I'm sort of doing #1140 step by step.

@DeepDiver1975

Copy link
Copy Markdown
Contributor

Is that really necessary? You added unnecessary complications.

I have to agree to some extend - what about adding a simple page reload?

@Niduroki

Niduroki commented Jul 4, 2013

Copy link
Copy Markdown
Author

Like simply reload after 20 seconds without checking?
(via <meta http-equiv="refresh" content="20">)

@VicDeo

VicDeo commented Aug 5, 2013

Copy link
Copy Markdown
Contributor

👍
Tested Firefox | Chrome | IE8

@ghost

ghost commented Sep 4, 2013

Copy link
Copy Markdown

@Niduroki

Niduroki commented Nov 7, 2013

Copy link
Copy Markdown
Author

What's the status of this now?
Do we want a fancy automated reload, or a simple "Press F5 to refresh"? (latter is already in …)

@karlitschek

Copy link
Copy Markdown
Contributor

👍 not tested

@DeepDiver1975

Copy link
Copy Markdown
Contributor

I'd still vote for a simpler solution as commented above #3937 (comment)

Why? Less code to maintain - code which is almost never used 😉

@karlitschek

Copy link
Copy Markdown
Contributor

I agree with @DeepDiver1975

@Niduroki

Niduroki commented Nov 7, 2013

Copy link
Copy Markdown
Author

This way we still tell the user to refresh manually though...

@jancborchardt

Copy link
Copy Markdown
Contributor

So what’s the call on this? @PVince81 what do you think?

@PVince81

Copy link
Copy Markdown
Contributor

Is this still relevant ?
I just had an upgrade test a few minutes ago and the page reloading worked already on 6.0.0a for a successful upgrade.

@Niduroki

Copy link
Copy Markdown
Author

@PVince81 #3937 (comment)

The page an user sees when owncloud is updating/in maintenance mode, not the "updating" page an admin/the update initiator sees.

@jancborchardt

Copy link
Copy Markdown
Contributor

So what’s the call on this? I haven’t looked at it but it sounds like it’s a nice addition to not let people waiting.

@PVince81?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use jquery's $.ajax() instead ? Or is jquery not loaded at this stage ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DeepDiver1975

Copy link
Copy Markdown
Contributor

I'd still vote for a simple page refresh - this is tooo much code throw an issue which is low prio and almost never occurs - please keep in mind: we have to maintain all that code in the upcoming years. Especially code on pages with are not triggered on a day-to-day basis have a high risk of failure.

@Niduroki

Copy link
Copy Markdown
Author

#3937 (comment)
#3937 (comment)
#3937 (comment)

Make up your mind, what do we want exactly?

@RobinMcCorkell

Copy link
Copy Markdown
Contributor

Simple page refreshes are also more visible to the user that the page is actually doing something. The user may still refresh the page manually if AJAX is doing the checking, unless notices are put on the maintenance page.

@Niduroki

Copy link
Copy Markdown
Author

@Xenopathic good point, I'll add a notice, if we want the behaviour introduced here
@jancborchardt what'd you say UX wise?

Everyone, settle on one please:

  1. Press F5/the circly button on your browser/"reload" after 2½ eternities
  2. <meta http-equiv="refresh" content="2.5ets"> (ets is the Kondou defined standard abbreviation for an eternity)
  3. This PR: Background checking via ajax, reloading as soon as maintenance is over without user interaction (TODO tell the user he doesn't need to reload)
  4. Do nothing and say nothing (current state)

@jancborchardt

Copy link
Copy Markdown
Contributor

@Kondou-ger your approach is definitely best UX-wise. Maintenance mode is annoying when it occurs, so we should handle that gracefully.

@MorrisJobke

Copy link
Copy Markdown
Contributor

Ping

@karlitschek

Copy link
Copy Markdown
Contributor

no longer valid

@jancborchardt

Copy link
Copy Markdown
Contributor

I don’t get why this is not wanted. After maintenance mode is over, you should automatically be directed to ownCloud again. Manually needing to hit refresh is just tedious.
I can’t judge the code-wise approach here, but think that @Kondou-ger’s idea in general is very valid.

@karlitschek you gave 👍 before but then just closed it. What do you mean by »no longer valid«?

@PVince81

Copy link
Copy Markdown
Contributor

Maybe there was again a confusion between updating with the code and updating with the "updater" app. This happens all the time.
The "update with the code" has an overview page where you need to click "Update" to start update, then it will do the update, and then you are redirected.

As for the updater app itself, which seem to be the question in this issue, I don't really know. I guess it does make sense to also do the redirection at the end.

@PVince81

Copy link
Copy Markdown
Contributor

Ah no, oops. Seems to not even be about the updater app.
It's only the status.php seen be other users who are waiting for the admin to update.

@Niduroki

Copy link
Copy Markdown
Author

So why has this been closed?

@PVince81

Copy link
Copy Markdown
Contributor

It was a misunderstanding.

@PVince81

Copy link
Copy Markdown
Contributor

Feel free to reopen.

@Niduroki
Niduroki restored the refresh_if_maintenance_is_over branch August 11, 2014 12:26
@Niduroki Niduroki reopened this Aug 11, 2014
@jancborchardt

Copy link
Copy Markdown
Contributor

@Kondou-ger ok, this needs rebase. Or maybe a fresh start. ;)

@Niduroki
Niduroki force-pushed the refresh_if_maintenance_is_over branch from 302e21e to b7e1d62 Compare August 30, 2014 13:40
@Niduroki

Copy link
Copy Markdown
Author

Why do the unittests fail btw?

I've just added 5 lines of php of which:
1 is a translation
2 is an addscript used the way it should be
3,4 is some simple if
5 is an array entry …

@ghost

ghost commented Aug 30, 2014

Copy link
Copy Markdown

@MTRichards MTRichards added this to the 2014-sprint-03-current milestone Sep 2, 2014
Comment thread core/templates/update.user.php Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too technical. Please use something like "This page will refresh itself when the $cloud instance is available again."

@th3fallen

Copy link
Copy Markdown
Contributor

@Kondou-ger Please see @LukasReschke Comments

@ghost

ghost commented Sep 8, 2014

Copy link
Copy Markdown

@th3fallen

Copy link
Copy Markdown
Contributor

👍

@DeepDiver1975

Copy link
Copy Markdown
Contributor

squash please

Using status.php for this.
I modified status.php to also show, whether we're in maintenance.

Checks every 20 seconds if maintenance is over, if yes: reload.
@Niduroki
Niduroki force-pushed the refresh_if_maintenance_is_over branch from 6f1336d to 69f2c05 Compare September 9, 2014 15:30
@scrutinizer-notifier

Copy link
Copy Markdown

A new inspection was created.

@ghost

ghost commented Sep 9, 2014

Copy link
Copy Markdown

@LukasReschke

Copy link
Copy Markdown
Contributor

Let's merge this after this long discussion => 👍

LukasReschke added a commit that referenced this pull request Sep 11, 2014
@LukasReschke
LukasReschke merged commit 8d79265 into master Sep 11, 2014
@LukasReschke
LukasReschke deleted the refresh_if_maintenance_is_over branch September 11, 2014 09:34
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.