Skip to content

Commit 0b18f03

Browse files
committed
Merge branch 'service-traffic-lights' of Arnei/opencast-admin-interface into main
Pull request #1178 Fixes #1166 Show service online status
2 parents a758624 + e0aa3fa commit 0b18f03

File tree

5 files changed

+10
-1
lines changed

5 files changed

+10
-1
lines changed

src/configs/tableConfigs/serversTableConfig.ts

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export const serversTableConfig: TableConfig = {
1616
template: "ServersStatusCell",
1717
name: "online",
1818
label: "SYSTEMS.SERVERS.TABLE.STATUS",
19-
sortable: true,
2019
},
2120
{
2221
name: "hostname",

src/configs/tableConfigs/servicesTableConfig.ts

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ import { TableConfig } from "./aclsTableConfig";
1212
*/
1313
export const servicesTableConfig: TableConfig = {
1414
columns: [
15+
{
16+
template: "ServersStatusCell",
17+
name: "online",
18+
label: "SYSTEMS.SERVICES.TABLE.ONLINE",
19+
},
1520
{
1621
name: "status",
1722
label: "SYSTEMS.SERVICES.TABLE.STATUS",

src/configs/tableConfigs/servicesTableMap.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import MeanRunTimeCell from "../../components/systems/partials/MeanRunTimeCell";
22
import MeanQueueTimeCell from "../../components/systems/partials/MeanQueueTimeCell";
33
import ServicesActionCell from "../../components/systems/partials/ServicesActionsCell";
4+
import ServersStatusCell from "../../components/systems/partials/ServersStatusCell";
45

56
/**
67
* This map contains the mapping between the template strings above and the corresponding react component.
78
* This helps to render different templates of cells more dynamically. Even empty needed, because Table component
89
* uses template map.
910
*/
1011
export const servicesTemplateMap = {
12+
ServersStatusCell: ServersStatusCell,
1113
MeanRunTimeCell: MeanRunTimeCell,
1214
MeanQueueTimeCell: MeanQueueTimeCell,
1315
ServicesActionsCell: ServicesActionCell,

src/i18n/org/opencastproject/adminui/languages/lang-en_US.json

+1
Original file line numberDiff line numberDiff line change
@@ -1706,6 +1706,7 @@
17061706
"SERVICES": {
17071707
"TABLE": {
17081708
"CAPTION": "Services",
1709+
"ONLINE": "Online",
17091710
"STATUS": "Status",
17101711
"NAME": "Service name",
17111712
"HOST_NAME": "Host name",

src/slices/serviceSlice.ts

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ export type Service = {
1818
queued: number,
1919
running: number,
2020
status: string,
21+
online: boolean,
22+
maintenance: boolean,
2123
}
2224

2325
type ServiceState = {

0 commit comments

Comments
 (0)