-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Deal with crosssite api call after login. #10533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9b03c78
9c4fb52
7c041f9
232df43
8aae38e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -317,7 +317,6 @@ const user = { | |
| const result = response.listusersresponse.user[0] | ||
| commit('SET_INFO', result) | ||
| commit('SET_NAME', result.firstname + ' ' + result.lastname) | ||
| store.dispatch('SetCsLatestVersion', result.rolename) | ||
| resolve(cachedApis) | ||
| }).catch(error => { | ||
| reject(error) | ||
|
|
@@ -556,6 +555,9 @@ const user = { | |
| commit('SET_DOMAIN_STORE', domainStore) | ||
| }, | ||
| SetCsLatestVersion ({ commit }, rolename) { | ||
| if (!vueProps.$config.notifyLatestCSVersion) { | ||
| return | ||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe instead of Github, we should query one of the ASF or repo links to find latest release? For example - https://dlcdn.apache.org/cloudstack/releases/ - we may even introduce to put like a file that gives latest version info say from https://download.cloudstack.org/
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rohityadavcloud , I am not sure this would be easily cleanly implemented. https://api.github.com/repos/apache/cloudstack/releases give a cleanish yaml with results. In contrast https://dlcdn.apache.org/cloudstack/releases/ gives a directory listing. I would prefer to continue as is but make the retrieval of new version optional, advising operators to set it on test environments and to disable it in production. What do you think?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we just put a file on cloudstack.apache.org, for example https://cloudstack.apache.org/latest_cloudstack_version ? We do not need to get the new version very soon after the release, 1-7 days delay is good I think. |
||
| const lastFetchTs = store.getters.latestVersion?.fetchedTs ? store.getters.latestVersion.fetchedTs : 0 | ||
| if (rolename === 'Root Admin' && (+new Date() - lastFetchTs) > 24 * 60 * 60 * 1000) { | ||
| axios.get( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the issue where it is making 2 API calls.