Skip to content

Commit

Permalink
feat(version): release 0.18.2 version
Browse files Browse the repository at this point in the history
  • Loading branch information
gokhangunduz committed Nov 6, 2023
1 parent e0f42dc commit 8eae94a
Show file tree
Hide file tree
Showing 31 changed files with 280 additions and 317 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<img src="https://img.shields.io/badge/nodejs-18.18.2-dgreen" alt="node">
</a>
<a href="https://github.com/robolaunch/ui/releases">
<img src="https://img.shields.io/badge/release-v0.18.1-red" alt="release">
<img src="https://img.shields.io/badge/release-v0.18.2-red" alt="release">
</a>
<a href="#">
<img src="https://img.shields.io/badge/language-typescript-blue" alt="language">
Expand Down
86 changes: 86 additions & 0 deletions docker/Jenkinsfile-private-robolaunch
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
pipeline {
agent {
kubernetes {
yaml '''
apiVersion: v1
kind: Pod
metadata:
name: kube-pod
spec:
containers:
- name: docker
image: docker:latest
imagePullPolicy: Always
command:
- cat
tty: true
securityContext:
privileged: true
runAsUser: 0
volumeMounts:
- mountPath: /var/run/docker.sock
name: docker-sock
- name: ubuntu
image: robolaunchio/build-image:1.0
imagePullPolicy: Always
command:
- cat
tty: true
env:
- name: CI
value: false
volumes:
- name: docker-sock
hostPath:
path: /var/run/docker.sock
'''
}
}
stages {
stage('Install Node') {
steps {
container('ubuntu') {
sh 'npm install -g n'
sh 'n latest'
}
}
}
stage('Git Clone') {
steps {
container('ubuntu') {
git branch: 'main', credentialsId: '7322b7d8-a45e-4594-9bd8-fa1952a7aaad', url: '[email protected]:robolaunch/ui.git'
sh """export VER=`grep '"version":' package.json | awk '{print \$2}' | sed 's/"//g' | sed 's/,//'` && echo \$VER > version.txt"""
script {
env.VER = readFile('version.txt').trim()
}
}
}
}
stage('Install Depends && Build') {
steps {
container('ubuntu') {
withCredentials([file(credentialsId: 'frontend-private-robolaunch-env', variable: 'text')]) {
writeFile file:'./.env', text: readFile(text)
}
sh 'npm i --force'
sh 'npm run build'
sh "tar -zcvf ui-${env.VER}-${env.BUILD_NUMBER}.tar.gz build"
withCredentials([usernamePassword(credentialsId: '7fadeb6b-976b-40ed-8c7c-20e157b4f81a', passwordVariable: 'password', usernameVariable: 'username')]) {
sh "curl --fail -u $username:$password --upload-file ui-${env.VER}-${env.BUILD_NUMBER}.tar.gz https://nexus.robolaunch.cloud/repository/ui/"
}
}
}
}
stage('Docker Build && Push') {
steps {
container('docker') {
sh "docker build -t robolaunchio/frontend-private-robolaunch-httpd:${env.VER} ."
withCredentials([usernamePassword(credentialsId: 'dockerhub-robolaunchio', passwordVariable: 'password', usernameVariable: 'username')]) {
sh 'docker login -u $username -p $password'
}
sh "docker push robolaunchio/frontend-private-robolaunch-httpd:${env.VER}"
}
}
}
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "ui",
"version": "0.18.1",
"version": "0.18.2",
"private": true,
"scripts": {
"start": "react-scripts start",
"dev": "react-scripts start",
"watch": "npx tailwindcss -i ./tailwind.css -o ./public/css/style.css --watch",
"build": "react-scripts build",
"test": "react-scripts test",
Expand Down
4 changes: 4 additions & 0 deletions public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2411,6 +2411,10 @@ video {
line-height: 2.25rem;
}

.text-\[0\.58rem\] {
font-size: 0.58rem;
}

.text-\[0\.60rem\] {
font-size: 0.60rem;
}
Expand Down
27 changes: 27 additions & 0 deletions src/components/ColorLabel/ColorLabel.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React, { ReactElement } from "react";
import useRobot from "../../hooks/useRobot";
import { envOnPremiseRobot } from "../../helpers/envProvider";
import ContentLoader from "react-content-loader";

export default function ColorLabel(): ReactElement {
const { responseRobot } = useRobot();

return (
<div className="w-fit rounded-lg bg-layer-primary-100 px-2 py-1 text-[0.58rem] font-medium capitalize text-layer-primary-500">
{responseRobot?.robotClusters?.length === 1
? `Virtual ${envOnPremiseRobot ? "Application" : "Robot"}`
: (responseRobot?.robotClusters?.length === 2 &&
`Physical ${envOnPremiseRobot ? "Application" : "Robot"}`) || (
<ContentLoader
speed={1}
width={64}
height={18}
backgroundColor="#f5e5ff"
foregroundColor="#fbf4ff"
>
<rect width="64" height="18" />
</ContentLoader>
)}
</div>
);
}
25 changes: 25 additions & 0 deletions src/components/ConnectionLabel/ConnectionLabel.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Fragment, ReactElement } from "react";
import { RxOpenInNewWindow } from "react-icons/rx";

interface IConnectionLabel {
label: string;
url: string;
}

export default function ConnectionLabel({
label,
url,
}: IConnectionLabel): ReactElement {
return (
<Fragment>
{!url ? (
<span className="text-xs font-semibold">{label}:</span>
) : (
<a className="flex gap-1" href={url} target="_blank" rel="noreferrer">
<RxOpenInNewWindow size={14} />
<span className="text-xs font-semibold">{label}:</span>
</a>
)}
</Fragment>
);
}
44 changes: 44 additions & 0 deletions src/components/Connections/Connections.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React, { ReactElement, useEffect } from "react";
import useRobot from "../../hooks/useRobot";
import StateCell from "../TableInformationCells/StateCell";
import ConnectionLabel from "../ConnectionLabel/ConnectionLabel";

export default function Connections(): ReactElement {
const { responseRobot, isSettedCookie } = useRobot();

useEffect(() => {
console.log("isSettedCookie", isSettedCookie);
}, [isSettedCookie]);

return (
<div className="flex gap-4">
<div className="flex gap-1" id="ide">
<ConnectionLabel label="IDE" url={responseRobot?.ideIngressEndpoint} />
<StateCell
state={
isSettedCookie === null
? "Waiting"
: isSettedCookie
? "Connected"
: "Warning"
}
/>
</div>
<div className="flex gap-1" id="vdi">
<ConnectionLabel
label="VDI"
url={"https://" + responseRobot?.vdiIngressEndpoint?.split("//")[1]}
/>
<StateCell
state={
isSettedCookie === null
? "Waiting"
: isSettedCookie
? "Connected"
: "Warning"
}
/>
</div>
</div>
);
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { useFormik } from "formik";
import responseProviders from "../../mock/CloudInstanceProviders.json";
import CreateFormCancelButton from "../CreateFormCancelButton/CreateFormCancelButton";

export default function CreateCloudInstancesForm(): ReactElement {
export default function CFInstance(): ReactElement {
const { sidebarState, setSidebarState, selectedState } = useMain();
const dispatch = useAppDispatch();

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import useMain from "../../hooks/useMain";
import InfoTip from "../InfoTip/InfoTip";
import Button from "../Button/Button";

export default function CreateOrganizationForm(): ReactElement {
export default function CFOrganization(): ReactElement {
const { sidebarState, setSidebarState }: any = useMain();

const dispatch = useAppDispatch();
Expand Down Expand Up @@ -49,7 +49,7 @@ export default function CreateOrganizationForm(): ReactElement {
className="!text-sm"
disabled={formik.isSubmitting}
/>
<InputError error={formik.errors.name} touched={formik.errors.name} />
<InputError error={formik.errors.name} touched={!!formik.errors.name} />
</div>

<div className="flex gap-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Button from "../Button/Button";
import { useFormik } from "formik";
import { toast } from "sonner";

export default function ConnectPhysicalInstanceForm(): ReactElement {
export default function CFPhysical(): ReactElement {
const [code, setCode] = React.useState<string>("");
const { sidebarState, setSidebarState, selectedState } = useMain();
const dispatch = useAppDispatch();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import InfoTip from "../InfoTip/InfoTip";
import responseProviders from "../../mock/CloudInstanceProviders.json";
import CreateFormCancelButton from "../CreateFormCancelButton/CreateFormCancelButton";

export default function CreateRoboticsCloudForm(): ReactElement {
export default function CFRegion(): ReactElement {
const { sidebarState, setSidebarState, selectedState } = useMain();
const dispatch = useAppDispatch();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ import Button from "../Button/Button";
import { useFormik } from "formik";
import { toast } from "sonner";

interface ICreateRobotFormStep1 {
interface ICFStep1 {
isImportRobot?: boolean;
}

export default function CreateRobotFormStep1({
isImportRobot,
}: ICreateRobotFormStep1): ReactElement {
export default function CFStep1({ isImportRobot }: ICFStep1): ReactElement {
const { robotData, setRobotData } = useCreateRobot();
const { selectedState, handleCreateRobotNextStep } = useMain();
const [responseRobot, setResponseRobot] = useState<any>(undefined);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ import Button from "../Button/Button";
import { useFormik } from "formik";
import { toast } from "sonner";

interface ICreateRobotFormStep2 {
interface ICFStep2 {
isImportRobot?: boolean;
}

export default function CreateRobotFormStep2({
isImportRobot,
}: ICreateRobotFormStep2): ReactElement {
export default function CFStep2({ isImportRobot }: ICFStep2): ReactElement {
const [responseFleet, setResponseFleet] = useState<any>(undefined);
const [responseRobot, setResponseRobot] = useState<any>(undefined);
const { selectedState, handleCreateRobotNextStep, setSidebarState } =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Fragment, ReactElement, useEffect, useState } from "react";
import RobotDeleteBuildManagerButton from "../RobotDeleteBuildManagerButton/RobotDeleteBuildManagerButton";
import CreateRobotFormAddButton from "../CreateRobotFormAddButton/CreateRobotFormAddButton";
import React, { Fragment, ReactElement, useEffect, useState } from "react";
import CFAddBuildButton from "../CFAddBuildButton/CFAddBuildButton";
import { IBuildSteps } from "../../interfaces/robotInterfaces";
import { createBuildManager } from "../../toolkit/RobotSlice";
Expand All @@ -18,13 +18,11 @@ import Button from "../Button/Button";
import { toast } from "sonner";
import * as Yup from "yup";

interface ICreateRobotFormStep3 {
interface ICFStep3 {
isImportRobot?: boolean;
}

export default function CreateRobotFormStep3({
isImportRobot,
}: ICreateRobotFormStep3): ReactElement {
export default function CFStep3({ isImportRobot }: ICFStep3): ReactElement {
const { robotData, setRobotData, handleAddStepToBuildStep } =
useCreateRobot();
const [responseRobot, setResponseRobot] = useState<any>(undefined);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ import { useFormik } from "formik";
import { toast } from "sonner";
import * as Yup from "yup";

interface ICreateRobotFormStep4 {
interface ICFStep4 {
isImportRobot?: boolean;
robotDataLaunchIndex?: number;
robotClusters?: any[];
}

export default function CreateRobotFormStep4({
export default function CFStep4({
isImportRobot,
robotDataLaunchIndex,
robotClusters,
}: ICreateRobotFormStep4): ReactElement {
}: ICFStep4): ReactElement {
const { robotData, setRobotData } = useCreateRobot();
const { selectedState } = useMain();
const dispatch = useAppDispatch();
Expand Down
Loading

0 comments on commit 8eae94a

Please sign in to comment.