-
Notifications
You must be signed in to change notification settings - Fork 29
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
opera target view #246
Closed
Closed
opera target view #246
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
96da03d
use exp version
Haishi2016 c99c1d4
go mod tidy
Haishi2016 32cfa10
Merge branch 'main' into experimental
Haishi2016 09decb5
merge main
Haishi2016 4a96738
commit to experimental branch
Haishi2016 b51cf99
fix update target result (#227)
msftcoderdjw 9039246
[API] Merge ADO changes to OSS (#220)
msftcoderdjw c492ff7
opera target view
Haishi2016 c810af0
remove Docker check; remove 'v' prefix of version parameter (#228)
Haishi2016 b2cf925
[K8S] Merge ADO changes to OSS (#233)
msftcoderdjw 02bfa81
Support device in non-default namespace (#238)
RemindD 4504f60
mo mod tidy on maestro (#244)
Haishi2016 9d44b8b
Remove spec.name in catalog/instance/campaign/activation (#242)
msftcoderdjw f6b5ee2
Adomerge packages (#237)
iwangjintian 3cb5392
Use BOT_USER (eclipse-symphoy-bot) to checkout, commit, push changes …
msftcoderdjw 952f021
Bump version to 0.48.23
actions-user 5d414bd
Remove CatalogSpec.SiteId (#236)
RemindD 22130ea
Correctly setup commit user and email in release workflow (#249)
netomi 9b8d91f
add experimental notice
Haishi2016 48e9cab
experimental feature table
Haishi2016 7ba255c
experimental
Haishi2016 1b69e4b
Proxy processor (#229)
Haishi2016 fb33b80
remove proxy changes
Haishi2016 072b08a
re-generate artifacts
Haishi2016 7f078cd
remove version.txt from branch
Haishi2016 164238b
restore version.txt from main branch
Haishi2016 b1a9cfe
add statusMessage to show user-friendly display (#255)
msftcoderdjw 4b67ef1
keep up with main
Haishi2016 fdb1ac6
merge conflict
Haishi2016 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: workflow.symphony/v1 | ||
kind: Activation | ||
metadata: | ||
name: counter-activation | ||
spec: | ||
campaign: "counter-campaign" | ||
name: "counter-activation" | ||
stage: "" | ||
inputs: | ||
val.init: 10 | ||
val: 2 |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: workflow.symphony/v1 | ||
kind: Campaign | ||
metadata: | ||
name: counter-campaign | ||
spec: | ||
firstStage: "counter" | ||
selfDriving: true | ||
stages: | ||
counter: | ||
name: "counter" | ||
provider: "providers.stage.counter" | ||
stageSelector: "${{$if($lt($output(counter,val), 20), counter, '')}}" |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: workflow.symphony/v1 | ||
kind: Activation | ||
metadata: | ||
name: hello-world-activation | ||
spec: | ||
campaign: "hello-world" | ||
name: "hello-world-activation" | ||
inputs: | ||
foo: "bar" |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: workflow.symphony/v1 | ||
kind: Campaign | ||
metadata: | ||
name: hello-world | ||
spec: | ||
firstStage: "mock" | ||
selfDriving: true | ||
stages: | ||
mock: | ||
name: "mock" | ||
provider: "providers.stage.mock" |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Step 1: Build the base image with node.js | ||
FROM node:16-alpine as builder | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy package.json and package-lock.json | ||
COPY package.json package-lock.json ./ | ||
|
||
# Install dependencies | ||
RUN npm ci | ||
# Copy the rest of the application code | ||
COPY . . | ||
|
||
# Build the application | ||
RUN npm run build | ||
|
||
# Step 2: Use a smaller base image for the production environment | ||
FROM node:16-alpine | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Install the Next.js production server | ||
RUN npm install next | ||
|
||
# Copy the build artifacts from the builder stage | ||
COPY --from=builder /app/public ./public | ||
COPY --from=builder /app/.next ./.next | ||
COPY --from=builder /app/node_modules ./node_modules | ||
COPY --from=builder /app/package.json ./package.json | ||
|
||
# Expose the port Next.js runs on | ||
EXPOSE 3000 | ||
|
||
# Command to run the application | ||
CMD ["npm", "start"] |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from 'react' | ||
import { getServerSession } from 'next-auth'; | ||
import MultiView from '@/components/MultiView'; | ||
import { options } from '../api/auth/[...nextauth]/options'; | ||
import {TargetState, User} from '../types'; | ||
const getTargets = async () => { | ||
const session = await getServerSession(options); | ||
const symphonyApi = process.env.SYMPHONY_API; | ||
const userObj: User | undefined = session?.user?? undefined; | ||
const res = await fetch( `${symphonyApi}targets/registry`, { | ||
method: 'GET', | ||
headers: { | ||
'Authorization': `Bearer ${userObj?.accessToken}`, | ||
} | ||
}); | ||
const data = await res.json(); | ||
return data; | ||
} | ||
async function TargetsPage() { | ||
const targets = await getTargets(); | ||
const params = { | ||
type: 'targets', | ||
menuItems: [ | ||
{ | ||
name: 'Add Solution', | ||
href: '/solutions/add', | ||
} | ||
], | ||
views: ['cards', 'table'], | ||
items: targets, | ||
columns: [] | ||
} | ||
return ( | ||
<div> | ||
<MultiView params={params} /> | ||
</div> | ||
); | ||
} | ||
|
||
export default TargetsPage; |
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 |
---|---|---|
|
@@ -63,7 +63,7 @@ export interface CatalogSpec { | |
properties: Record<string, any>; | ||
metadata: Record<string, string>; | ||
parentName: string; | ||
objectRef: ObjectRef; | ||
objectRef?: ObjectRef | null | undefined; | ||
generation: string; | ||
} | ||
|
||
|
@@ -77,6 +77,79 @@ export interface CatalogState { | |
status: CatalogStatus; | ||
} | ||
|
||
export interface BindingSpec { | ||
role: string; | ||
provider: string; | ||
config: Record<string, string>; | ||
} | ||
|
||
export interface TopologySpec { | ||
device: string; | ||
selector: Record<string, string>; | ||
bindings: BindingSpec[]; | ||
} | ||
|
||
export interface TargetSpec { | ||
displayName: string; | ||
scope: string; | ||
metadata: Record<string, string>; | ||
properties: Record<string, string>; | ||
components: ComponentSpec[]; | ||
constraints: string; | ||
topologies: TopologySpec[]; | ||
forceRedeploy: boolean; | ||
generation: string; | ||
version: string; | ||
} | ||
|
||
export interface ComponentError { | ||
code: string; | ||
message: string; | ||
target: string; | ||
} | ||
|
||
export interface TargetError { | ||
code: string; | ||
message: string; | ||
target: string; | ||
details: ComponentError[]; | ||
} | ||
|
||
export interface ErrorType { | ||
code: string; | ||
message: string; | ||
target: string; | ||
details: TargetError[]; | ||
} | ||
|
||
export interface ProvisioningStatus{ | ||
operationId: string; | ||
status: string; | ||
failureCause: string; | ||
logErrors: boolean; | ||
error: ErrorType; | ||
output: Record<string, string>; | ||
} | ||
|
||
export interface DeployableStatus { | ||
properties: Record<string, string>; | ||
ProvisioningStatus: ProvisioningStatus; | ||
lastModified: Date; | ||
} | ||
|
||
export interface ObjectMeta { | ||
namespace: string; | ||
name: string; | ||
labels: Record<string, string>; | ||
annotations: Record<string, string>; | ||
} | ||
|
||
export interface TargetState { | ||
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. I saw in this file, there's still some object like SolutionState which doesn't align new object model. Do we need to fix them? |
||
metadata: ObjectMeta; | ||
spec: TargetSpec; | ||
status: DeployableStatus; | ||
} | ||
|
||
export interface SolutionState { | ||
id: string; | ||
namespace: string; | ||
|
@@ -160,7 +233,7 @@ export interface User { | |
email?: string | nulll | undefined; | ||
image?: string | null | undefined; | ||
username?: string; | ||
tokenType: string; | ||
tokenType?: string | null | undefined; | ||
roles?: string[] | undefined; | ||
} | ||
|
||
|
@@ -172,4 +245,4 @@ export interface Rule { | |
} | ||
export interface Schema { | ||
rules: Record<string, Rule>; | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Just curious in which case, when will we get float64 status?