mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-16 17:25:58 +00:00
Fix refresh resources button and remove portal specific notebooks call (#123)
This commit is contained in:
parent
14ef40029d
commit
2a53dfabb5
@ -2,6 +2,7 @@ import { MessageTypes } from "../Contracts/ExplorerContracts";
|
|||||||
import Q from "q";
|
import Q from "q";
|
||||||
import * as _ from "underscore";
|
import * as _ from "underscore";
|
||||||
import * as Constants from "./Constants";
|
import * as Constants from "./Constants";
|
||||||
|
import { config, Platform } from "../Config";
|
||||||
|
|
||||||
export interface CachedDataPromise<T> {
|
export interface CachedDataPromise<T> {
|
||||||
deferred: Q.Deferred<T>;
|
deferred: Q.Deferred<T>;
|
||||||
@ -59,7 +60,7 @@ export function sendMessage(data: any): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function canSendMessage(): boolean {
|
export function canSendMessage(): boolean {
|
||||||
return window.parent !== window;
|
return config.platform === Platform.Portal && window.parent !== window;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: This is exported just for testing. It should not be.
|
// TODO: This is exported just for testing. It should not be.
|
||||||
|
@ -2606,7 +2606,11 @@ export default class Explorer {
|
|||||||
|
|
||||||
private async _refreshNotebooksEnabledStateForAccount(): Promise<void> {
|
private async _refreshNotebooksEnabledStateForAccount(): Promise<void> {
|
||||||
const authType = window.authType as AuthType;
|
const authType = window.authType as AuthType;
|
||||||
if (authType === AuthType.EncryptedToken || authType === AuthType.ResourceToken) {
|
if (
|
||||||
|
authType === AuthType.EncryptedToken ||
|
||||||
|
authType === AuthType.ResourceToken ||
|
||||||
|
authType === AuthType.MasterKey
|
||||||
|
) {
|
||||||
this.isNotebooksEnabledForAccount(false);
|
this.isNotebooksEnabledForAccount(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user