actions in ui (#87)

This commit is contained in:
Michael Quigley 2022-11-01 17:32:32 -04:00
parent cc80b0e860
commit a1879ea61b
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
2 changed files with 16 additions and 0 deletions

View File

@ -1,5 +1,7 @@
import DataTable from 'react-data-table-component';
import Services from './Services';
import Icon from "@mdi/react";
import {mdiCloseOutline} from "@mdi/js";
const Environments = (props) => {
const humanizeDuration = require("humanize-duration")
@ -25,6 +27,12 @@ const Environments = (props) => {
selector: row => row.environment.zId,
sortable: true,
},
{
name: 'Actions',
selector: row => <>
<button title={"Disable Environment '"+row.environment.zId+"'"}><Icon path={mdiCloseOutline} size={0.7}/></button>
</>
},
{
name: 'Uptime',
selector: row => humanizeDuration(Date.now() - row.environment.updatedAt),

View File

@ -1,5 +1,7 @@
import DataTable from 'react-data-table-component';
import {Sparklines, SparklinesLine, SparklinesSpots} from 'react-sparklines';
import {mdiCloseOutline} from "@mdi/js";
import Icon from "@mdi/react";
const Services = (props) => {
const humanizeDuration = require("humanize-duration")
@ -15,6 +17,12 @@ const Services = (props) => {
selector: row => row.backend,
sortable: true,
},
{
name: 'Actions',
selector: row => <>
<button title={"Disable Service '"+row.name+"'"}><Icon path={mdiCloseOutline} size={0.7}/></button>
</>
},
{
name: 'Uptime',
selector: row => humanizeDuration(Date.now() - row.updatedAt),