From 2e3df8d63809235124176a65fb4b427d97827bb7 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 7 Jul 2020 22:39:48 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 19 +++++-------------- ayanova/src/api/authutil.js | 4 ++++ ayanova/src/api/notifypoll.js | 5 +++++ 3 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 ayanova/src/api/notifypoll.js diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index fb07c469..6c660db3 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -6,26 +6,17 @@ PRIORITY - ALWAYS Lowest level stuff first, i.e. TODO at server, api route chang todo: notification - it's time, this is a big deal and it's tied to infrastructure shit so qualifies as an early thing to be done - add CLIENT long polling notification route check - add dummy route for above then flesh out - - Currently there is no UI area for notification display, maybe the settings one there would become that and - there are other ways to do settings already devised see specs / cases - - Notifications for OPS jobs? (Notify me when done kind of thing?) - todo: OPS notification created for failed jobs - also maybe direct immediate email bypassing generator? - Add backup fail to this will stub out for now - This is a bit outdated, lots of decisions already made and worked out in cases / spec docs - https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/3507 - - Need way to acknowledge receipt of long poll info from client to server so that it can be removed or something? - - maybe successfull sending clears it regardless of client? + https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/3783 + polling example code: + https://davidwalsh.name/javascript-polling + https://javascript.info/long-polling https://github.com/vuetifyjs/vuetify/blob/3513d76774ce4ed02c34220ba6389fa0f42467c1/packages/docs/src/components/app/Notifications.vue todo: PickLists based on AyaPickList at server, need one for each type, so far have widget and user only Not sure if should just make them all or...?? Maybe when I hit a form that uses it, that's when I really need it? - +todo: help links for individual extensions? (button I guess since no menu on them) todo: rockfish, can't do purchase for raven or view it I think todo: rockfish, upgrade to latest bootstrap, out of date Currently todo: rockfish, trial license fetched On date not updating? (not showing in UI) diff --git a/ayanova/src/api/authutil.js b/ayanova/src/api/authutil.js index b954b411..23f04593 100644 --- a/ayanova/src/api/authutil.js +++ b/ayanova/src/api/authutil.js @@ -1,6 +1,7 @@ /* xeslint-disable */ import decode from "jwt-decode"; import initialize from "./initialize"; +import notifypoll from "./notifypoll"; export function processLogin(authResponse, loggedInWithKnownPassword) { return new Promise(async function(resolve, reject) { @@ -82,12 +83,15 @@ export function processLogin(authResponse, loggedInWithKnownPassword) { reject(err); } + //start notification polling + notifypoll.startPolling(); resolve(); //------------------------------------------------- }); } export function processLogout() { + notifypoll.stopPolling(); if (window.$gz.store.state.authenticated) { window.$gz.store.commit( "logItem", diff --git a/ayanova/src/api/notifypoll.js b/ayanova/src/api/notifypoll.js new file mode 100644 index 00000000..94366938 --- /dev/null +++ b/ayanova/src/api/notifypoll.js @@ -0,0 +1,5 @@ +/* xeslint-disable */ + +let _timerId = null; + +export default { startPolling() {}, stopPolling() {} };