This commit is contained in:
@@ -972,8 +972,14 @@ export default {
|
|||||||
ret.push(6);
|
ret.push(6);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
},
|
||||||
|
///////////////////////////////////////////////
|
||||||
|
// Random integer from 0 to max
|
||||||
|
//
|
||||||
|
//
|
||||||
|
getRandomInt: function(max) {
|
||||||
|
return Math.floor(Math.random() * max);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -181,11 +181,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
//this.refresh();
|
|
||||||
if (this.updateFrequency > 0) {
|
if (this.updateFrequency > 0) {
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
this.refresh();
|
this.refresh();
|
||||||
}, this.updateFrequency);
|
}, this.updateFrequency + window.$gz.util.getRandomInt(30000)); //add up to 30 seconds so they don't all fire at once
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
icon="$ayiStickyNote"
|
icon="$ayiStickyNote"
|
||||||
:add-url="'home-reminders/0'"
|
:add-url="'home-reminders/0'"
|
||||||
:show-more-button="false"
|
:show-more-button="false"
|
||||||
:update-frequency="65000"
|
:update-frequency="300000"
|
||||||
:error-message="errorMessage"
|
:error-message="errorMessage"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
@dash-refresh="getDataFromApi()"
|
@dash-refresh="getDataFromApi()"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<gz-dash
|
<gz-dash
|
||||||
icon="$ayiCalendarCheck"
|
icon="$ayiCalendarCheck"
|
||||||
:show-more-button="false"
|
:show-more-button="false"
|
||||||
:update-frequency="65000"
|
:update-frequency="300000"
|
||||||
:error-message="errorMessage"
|
:error-message="errorMessage"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
@dash-refresh="getDataFromApi()"
|
@dash-refresh="getDataFromApi()"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
icon="$ayiUserClock"
|
icon="$ayiUserClock"
|
||||||
:add-url="'svc-workorders/0'"
|
:add-url="'svc-workorders/0'"
|
||||||
:show-more-button="false"
|
:show-more-button="false"
|
||||||
:update-frequency="60000"
|
:update-frequency="300000"
|
||||||
:error-message="errorMessage"
|
:error-message="errorMessage"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
@dash-refresh="getDataFromApi()"
|
@dash-refresh="getDataFromApi()"
|
||||||
|
|||||||
@@ -66,9 +66,12 @@
|
|||||||
</component>
|
</component>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12">
|
<v-col cols="12">
|
||||||
<v-btn outlined @click.native="showSelector = true">{{
|
<v-btn
|
||||||
$ay.t("Add")
|
v-if="formState.ready"
|
||||||
}}</v-btn>
|
text
|
||||||
|
@click.native="showSelector = true"
|
||||||
|
>{{ $ay.t("Add") }}</v-btn
|
||||||
|
>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user