-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e84fed
commit d1fdd81
Showing
12 changed files
with
58 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,33 @@ | ||
import { UrlQueryMap } from '@grafana/data'; | ||
|
||
import { KioskMode } from '../../types'; | ||
import config from '../config'; | ||
|
||
// TODO Remove after topnav feature toggle is permanent and old NavBar is removed | ||
export function getKioskMode(queryParams: UrlQueryMap): KioskMode | null { | ||
switch (queryParams.kiosk) { | ||
case 'tv': | ||
return KioskMode.TV; | ||
// legacy support | ||
case '1': | ||
case true: | ||
return KioskMode.Full; | ||
default: | ||
return null; | ||
if (config.KioskMode === 'off') { | ||
switch (queryParams.kiosk) { | ||
case 'tv': | ||
return KioskMode.TV; | ||
// legacy support | ||
case '1': | ||
case 'full': | ||
case true: | ||
return KioskMode.Full; | ||
case 'embed': | ||
return KioskMode.Embed; | ||
default: | ||
return null; | ||
} | ||
} else { | ||
switch (config.KioskMode) { | ||
// legacy support | ||
case 'full': | ||
return KioskMode.Full; | ||
case 'embed': | ||
return KioskMode.Embed; | ||
default: | ||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters