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
import { writer, produce, reader, consume, createTopic,listTopics } from 'k6/x/kafka'; | |
import { check, sleep } from 'k6'; | |
const bootstrapServers = ['myServer:9093'] | |
const kafkaTopic = 'aircraft-hub'; | |
const auth = JSON.stringify({ | |
username: '$ConnectionString', | |
password: 'myConnectionString', | |
}); |
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
import { writer, produce, reader, consume, createTopic,listTopics } from 'k6/x/kafka'; | |
import { check, sleep } from 'k6'; | |
const bootstrapServers = ['myServer:9093'] | |
const kafkaTopic = 'aircraft-hub'; | |
const auth = JSON.stringify({ | |
username: '$ConnectionString', | |
password: 'myConnectionString' | |
}); |
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
import Stack from '@material-ui/core/Stack'; | |
import Button from '@material-ui/core/Button'; | |
import { Switch, Typography } from '@material-ui/core'; | |
import { Box } from '@material-ui/system'; | |
import { useContext } from 'react'; | |
import ThemeContext from '../Theme/ThemeContext'; | |
function ContentApp() { | |
const { isDark, toggleTheme } = useContext(ThemeContext); |
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
import * as React from 'react'; | |
import { ThemeProvider } from '@emotion/react'; | |
import ThemeContext from './ThemeContext' | |
import { LOCAL_STORAGE_KEY, DARK_THEME, LIGHT_THEME } from "./Theme"; | |
function ThemeHandler(props) { | |
const [isDark, setDark] = React.useState(localStorage.getItem(LOCAL_STORAGE_KEY) === 'true'); | |
const ctxValue = { |
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
import * as React from 'react'; | |
const ThemeContext = React.createContext({}); | |
export default ThemeContext; |
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
import { createTheme } from "@material-ui/core/styles" | |
const LOCAL_STORAGE_KEY = "isDark"; | |
const baseTheme = createTheme({ | |
typography: { | |
fontFamily: "'Work Sans', sans-serif", | |
fontSize: 14, | |
fontFamilySecondary: "'Roboto Condensed', sans-serif" | |
} |
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
import ContentApp from './Content/ContentApp' | |
import ThemeHandler from './Theme/ThemeProvider'; | |
import CssBaseline from '@material-ui/core/CssBaseline'; | |
function App() { | |
return ( | |
<ThemeHandler> | |
<CssBaseline /> | |
<ContentApp /> | |
</ThemeHandler> |
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
# Fonction générique pour faire une requête GET | |
def callGet(requestUrl, headers, helper): | |
requestUri = URI(requestUrl, False); | |
print "-----start of callGet-------"; | |
print "requestUrl:"+requestUrl; | |
msg = HttpMessage(); | |
requestHeader = HttpRequestHeader(HttpRequestHeader.GET, requestUri, HttpHeader.HTTP10); | |
msg.setRequestHeader(requestHeader); | |
for name, value in headers.items(): |
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
# Lancement de ZAP... | |
# Attente du lancement de Zap... | |
# Lancement d'une session... | |
# Création d'un nouveau contexte... | |
# Ajout des URL du contexte... | |
# Ajout des URL hors contexte... | |
# Choisir la gestion de session (sessionManagement) "cookieBasedSessionManagement" pour cookie, "httpAuthSessionManagement" pour JWT | |
zap.sessionManagement.set_session_management_method( | |
contextid=contextId, methodname=sessionManagement, | |
methodconfigparams=None)) |
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
import time | |
def sendingRequest(msg, initiator, helper): | |
accessToken = GlobalVariables.getGlobalCustomVar(ACCESS_TOKEN) | |
# Token KO ou expiré | |
if accessToken is None or tokenHasExpired(): | |
login() | |
#Token OK |
NewerOlder