Skip to content

Commit

Permalink
merge dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Fluder-Paradyne committed Jun 30, 2023
2 parents 26a9e12 + b185111 commit bec1921
Show file tree
Hide file tree
Showing 35 changed files with 737 additions and 253 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ superagi/controllers/__pycache__
**agent_dictvenv
**/__gitpycache__/
gui/node_modules
node_modules
gui/.next
.DS_Store
.DS_Store?
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ services:
- super_network
volumes:
- ./gui:/app
- /app/node_modules
- /app/.next
super__redis:
image: "docker.io/library/redis:latest"
Expand Down
2 changes: 2 additions & 0 deletions gui/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
.next/
5 changes: 3 additions & 2 deletions gui/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM node:lts
FROM node:lts AS deps

WORKDIR /app

COPY package*.json ./
COPY . .
RUN npm ci

COPY . .

CMD ["npm", "run", "dev"]
82 changes: 82 additions & 0 deletions gui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"date-fns": "^2.30.0",
"eslint": "8.40.0",
"eslint-config-next": "13.4.2",
"jszip": "^3.10.1",
"mitt": "^3.0.0",
"next": "13.4.2",
"react": "18.2.0",
Expand Down
6 changes: 3 additions & 3 deletions gui/pages/Content/Agents/ActionConsole.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
import styles from './Agents.module.css';
import Image from 'next/image';
import { updatePermissions } from '@/pages/api/DashboardService';
import { formatTime } from '@/utils/utils';
import {formatTimeDifference} from '@/utils/utils';

function ActionBox({ action, index, denied, reasons, handleDeny, handleSelection, setReasons }) {
const isDenied = denied[index];
Expand Down Expand Up @@ -49,7 +49,7 @@ function ActionBox({ action, index, denied, reasons, handleDeny, handleSelection
<div>
<Image width={12} height={12} src="/images/schedule.svg" alt="schedule-icon" />
</div>
<div className={styles.history_info}>{formatTime(action.created_at)}</div>
<div className={styles.history_info}>{formatTimeDifference(action.time_difference)}</div>
</div>
</div>
);
Expand Down Expand Up @@ -81,7 +81,7 @@ function HistoryBox({ action }){
<div>
<Image width={12} height={12} src="/images/schedule.svg" alt="schedule-icon" />
</div>
<div className={styles.history_info}>{formatTime(action.created_at)}</div>
<div className={styles.history_info}>{formatTimeDifference(action.time_difference)}</div>
</div>
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions gui/pages/Content/Agents/ActivityFeed.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, {useEffect, useRef, useState} from 'react';
import styles from './Agents.module.css';
import {getExecutionFeeds} from "@/pages/api/DashboardService";
import Image from "next/image";
import {formatTime, loadingTextEffect} from "@/utils/utils";
import {loadingTextEffect, formatTimeDifference} from "@/utils/utils";
import {EventBus} from "@/utils/eventBus";

export default function ActivityFeed({selectedRunId, selectedView, setFetchedData }) {
Expand Down Expand Up @@ -59,7 +59,7 @@ export default function ActivityFeed({selectedRunId, selectedView, setFetchedDat
const data = response.data;
setFeeds(data.feeds);
setRunStatus(data.status);
console.log(data.permissions)
EventBus.emit('resetRunStatus', {executionId: selectedRunId, status: data.status});
setFetchedData(data.permissions);
})
.catch((error) => {
Expand Down Expand Up @@ -92,13 +92,13 @@ export default function ActivityFeed({selectedRunId, selectedView, setFetchedDat
<div className={styles.feed_title}>{f?.feed || ''}</div>
</div>
<div className={styles.more_details_wrapper}>
{f.updated_at && formatTime(f.updated_at) !== 'Invalid Time' && <div className={styles.more_details}>
{f.time_difference && <div className={styles.more_details}>
<div style={{display: 'flex', alignItems: 'center'}}>
<div>
<Image width={12} height={12} src="/images/schedule.svg" alt="schedule-icon"/>
</div>
<div className={styles.history_info}>
{formatTime(f.updated_at)}
{formatTimeDifference(f.time_difference)}
</div>
</div>
</div>}
Expand Down
Loading

0 comments on commit bec1921

Please sign in to comment.