Skip to content

Commit

Permalink
Merge pull request #27 from osstotalsoft/acr
Browse files Browse the repository at this point in the history
Acr
  • Loading branch information
niemenX authored Jul 21, 2023
2 parents 793c60c + 85741cf commit b326a4d
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
1 change: 0 additions & 1 deletion gql-bff/helm/atlas-gql-mesh/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ gql:
env:
ELASTIC_SEARCH_LOGGING_LEVEL: "[ELASTIC_SEARCH_LOGGING_LEVEL]"
ELASTIC_SEARCH_HOST: "[ELASTIC_SEARCH_HOST]"
ELASTIC_SEARCH_API_VERSION: "[ELASTIC_SEARCH_API_VERSION]"
IDENTITY_AUTHORITY: "[IDENTITY_AUTHORITY_URL]"
APOLLO_LOGGING_LEVEL: "[APOLLO_LOGGING_LEVEL]"
ELASTIC_VERSION: 6
Expand Down
1 change: 1 addition & 0 deletions react-ui/.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ REACT_APP_VERSION=0.0.0
REACT_APP_IDENTITY_CLIENT_ID=Atlas
REACT_APP_IDENTITY_SCOPE=IdentityServerApi roles
REACT_APP_IDENTITY_AUTHORITY=
REACT_APP_IDENTITY_ACR=

REACT_APP_GQL=localhost:5000
REACT_APP_GQL_HTTP_PROTOCOL=http
Expand Down
4 changes: 2 additions & 2 deletions react-ui/src/features/designer/components/TrayWidgetFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const TrayWidgetFilter = ({ filters, setFilters, activeTask }) => {
const classes = useStyles()

const handleFilterChange = useCallback(
event => {
setFilters(event?.target?.value)
value => {
setFilters(value)
},
[setFilters]
)
Expand Down
11 changes: 10 additions & 1 deletion react-ui/src/features/designer/constants/NodeConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { includes } from 'ramda'
import SubworkflowNodeModel from '../nodeModels/subworkflowNode/SubworkflowNodeModel'
import TaskNodeModel from '../nodeModels/taskNode/TaskNodeModel'

export const nodeConfig = {
const nodeConfigData = {
START: {
name: 'START',
type: 'START',
Expand Down Expand Up @@ -113,6 +113,15 @@ export const nodeConfig = {
getInstance: () => new EndNodeModel()
}
}

const handler = {
get(nodeConfigData, prop, _receiver) {
return nodeConfigData[prop] ?? nodeConfigData['TASK']
}
}

export const nodeConfig = new Proxy(nodeConfigData, handler);

export const isDefault = type =>
includes(type, [
nodeConfig.LAMBDA.type,
Expand Down
8 changes: 4 additions & 4 deletions react-ui/src/features/designer/diagram/WorkflowGraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ const WorkflowGraph = ({ style, className, dag, executionMode, onClick }) => {

const drawGraph = () => {
if (inner) inner.remove()
if (!svg.select("g").selectAll("g.node").empty()) {
svg.select("g").remove()
if (!svg.select('g').selectAll('g.node').empty()) {
svg.select('g').remove()
}
inner = svg.append('g')

Expand Down Expand Up @@ -205,7 +205,7 @@ const WorkflowGraph = ({ style, className, dag, executionMode, onClick }) => {
}

const handleClick = e => {
const taskRef = e
const taskRef = e.currentTarget.id
const node = graph.node(taskRef)
inner.selectAll('g.node').classed('selected', false)
if (node.type === 'DF_TASK_PLACEHOLDER') {
Expand All @@ -218,7 +218,7 @@ const WorkflowGraph = ({ style, className, dag, executionMode, onClick }) => {
return null // No-op for click on unexecuted DF card-pile or terminal nodes
} else {
// Non-DF, or unexecuted DF vertex
const node = dag.graph.node(e)
const node = dag.graph.node(taskRef)
onClick({ ref: node })
if (taskRef) {
inner.select(`g[id='${taskRef}']`).classed('selected', true)
Expand Down
2 changes: 1 addition & 1 deletion react-ui/src/utils/auth/authConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const AUTH = {
}

const getAuthenticationConfiguration = tenant => {
const acr_values = isNullOrWhitespace(tenant) ? undefined : `tenant:${tenant}`
const acr_values = isNullOrWhitespace(tenant) ? env.REACT_APP_IDENTITY_ACR : `tenant:${tenant}`
return {
client_id: env.REACT_APP_IDENTITY_CLIENT_ID,
authority: env.REACT_APP_IDENTITY_AUTHORITY,
Expand Down

0 comments on commit b326a4d

Please sign in to comment.