More alert suppression changes
This commit is contained in:
parent
f2c9398a87
commit
cf8b9ba6dd
8 changed files with 708 additions and 696 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -524,13 +524,14 @@ class Computer extends Component {
|
||||||
*/
|
*/
|
||||||
this.stateFailSafe = new State(this, PCX86.APPVERSION, Computer.STATE_FAILSAFE);
|
this.stateFailSafe = new State(this, PCX86.APPVERSION, Computer.STATE_FAILSAFE);
|
||||||
if (this.stateFailSafe.load()) {
|
if (this.stateFailSafe.load()) {
|
||||||
this.powerReport(stateComputer);
|
if (this.powerReport(stateComputer)) {
|
||||||
/*
|
/*
|
||||||
* We already know resume is something other than RESUME_NONE, so we'll go ahead and bump it
|
* We already know resume is something other than RESUME_NONE, so we'll go ahead and bump it
|
||||||
* all the way to RESUME_PROMPT, so that the user will be prompted, and if the user declines to
|
* all the way to RESUME_PROMPT, so that the user will be prompted, and if the user declines to
|
||||||
* restore, the state will be removed.
|
* restore, the state will be removed.
|
||||||
*/
|
*/
|
||||||
resume = Computer.RESUME_PROMPT;
|
resume = Computer.RESUME_PROMPT;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* To ensure that the set() below succeeds, we need to call unload(), otherwise it may fail
|
* To ensure that the set() below succeeds, we need to call unload(), otherwise it may fail
|
||||||
* with a "read only" error (eg, "TypeError: Cannot assign to read only property 'timestamp'").
|
* with a "read only" error (eg, "TypeError: Cannot assign to read only property 'timestamp'").
|
||||||
|
|
@ -814,12 +815,17 @@ class Computer extends Component {
|
||||||
*
|
*
|
||||||
* @this {Computer}
|
* @this {Computer}
|
||||||
* @param {State} stateComputer
|
* @param {State} stateComputer
|
||||||
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
powerReport(stateComputer)
|
powerReport(stateComputer)
|
||||||
{
|
{
|
||||||
|
if (!this.flags.unloading) {
|
||||||
if (Component.confirmUser("There may be a problem with your " + PCX86.APPNAME + " machine.\n\nTo help us diagnose it, click OK to send this " + PCX86.APPNAME + " machine state to http://" + SITEHOST + ".")) {
|
if (Component.confirmUser("There may be a problem with your " + PCX86.APPNAME + " machine.\n\nTo help us diagnose it, click OK to send this " + PCX86.APPNAME + " machine state to http://" + SITEHOST + ".")) {
|
||||||
Web.sendReport(PCX86.APPNAME, PCX86.APPVERSION, this.url, this.getUserID(), ReportAPI.TYPE.BUG, stateComputer.toString());
|
Web.sendReport(PCX86.APPNAME, PCX86.APPVERSION, this.url, this.getUserID(), ReportAPI.TYPE.BUG, stateComputer.toString());
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -74200,13 +74200,14 @@ class Computer extends Component {
|
||||||
*/
|
*/
|
||||||
this.stateFailSafe = new State(this, PCX86.APPVERSION, Computer.STATE_FAILSAFE);
|
this.stateFailSafe = new State(this, PCX86.APPVERSION, Computer.STATE_FAILSAFE);
|
||||||
if (this.stateFailSafe.load()) {
|
if (this.stateFailSafe.load()) {
|
||||||
this.powerReport(stateComputer);
|
if (this.powerReport(stateComputer)) {
|
||||||
/*
|
/*
|
||||||
* We already know resume is something other than RESUME_NONE, so we'll go ahead and bump it
|
* We already know resume is something other than RESUME_NONE, so we'll go ahead and bump it
|
||||||
* all the way to RESUME_PROMPT, so that the user will be prompted, and if the user declines to
|
* all the way to RESUME_PROMPT, so that the user will be prompted, and if the user declines to
|
||||||
* restore, the state will be removed.
|
* restore, the state will be removed.
|
||||||
*/
|
*/
|
||||||
resume = Computer.RESUME_PROMPT;
|
resume = Computer.RESUME_PROMPT;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* To ensure that the set() below succeeds, we need to call unload(), otherwise it may fail
|
* To ensure that the set() below succeeds, we need to call unload(), otherwise it may fail
|
||||||
* with a "read only" error (eg, "TypeError: Cannot assign to read only property 'timestamp'").
|
* with a "read only" error (eg, "TypeError: Cannot assign to read only property 'timestamp'").
|
||||||
|
|
@ -74490,12 +74491,17 @@ class Computer extends Component {
|
||||||
*
|
*
|
||||||
* @this {Computer}
|
* @this {Computer}
|
||||||
* @param {State} stateComputer
|
* @param {State} stateComputer
|
||||||
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
powerReport(stateComputer)
|
powerReport(stateComputer)
|
||||||
{
|
{
|
||||||
|
if (!this.flags.unloading) {
|
||||||
if (Component.confirmUser("There may be a problem with your " + PCX86.APPNAME + " machine.\n\nTo help us diagnose it, click OK to send this " + PCX86.APPNAME + " machine state to http://" + SITEHOST + ".")) {
|
if (Component.confirmUser("There may be a problem with your " + PCX86.APPNAME + " machine.\n\nTo help us diagnose it, click OK to send this " + PCX86.APPNAME + " machine state to http://" + SITEHOST + ".")) {
|
||||||
Web.sendReport(PCX86.APPNAME, PCX86.APPVERSION, this.url, this.getUserID(), ReportAPI.TYPE.BUG, stateComputer.toString());
|
Web.sendReport(PCX86.APPNAME, PCX86.APPVERSION, this.url, this.getUserID(), ReportAPI.TYPE.BUG, stateComputer.toString());
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue