Skip to content
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

[UI] ADH-5616: Add "Scheduled" status for actions #152

Merged
merged 2 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
import React from 'react';
import TableCell from '@uikit/Table/TableCell/TableCell';
import StatusMarker from '@commonComponents/StatusMarker/StatusMarker';
import { AdhActionState } from '@models/adh';
import type { AdhAction } from '@models/adh';
import { type AdhAction, AdhActionState } from '@models/adh';
import { getStatusLabel } from '@utils/humanisationUtils';
import type { CommonStatus } from '@commonComponents/StatusMarker/StatusMarker.types';
import { FlexGroup } from '@uikit';
Expand All @@ -28,6 +27,7 @@ const actionStateToStatus: Record<AdhActionState, CommonStatus> = {
[AdhActionState.Failed]: 'red',
[AdhActionState.Running]: 'blue',
[AdhActionState.Successful]: 'green',
[AdhActionState.Scheduled]: 'circle',
};

interface ActionStatusCellProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
--statusMarker-blue: var(--color-blue);
--statusMarker-green: var(--color-greenSaturated);
--statusMarker-red: var(--color-red);
--statusMarker-circle: var(--color-grayUsual);
}
body.theme-light {
--statusMarker-gray: var(--color-popupLightDarker);
--statusMarker-blue: var(--color-blue);
--statusMarker-green: var(--color-greenLogo);
--statusMarker-red: var(--color-red);
--statusMarker-circle: var(--color-ADCM);
}
}

Expand All @@ -31,4 +33,7 @@
&_red {
background-color: var(--statusMarker-red);
}
&_circle {
border: 1px solid var(--statusMarker-circle);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export type CommonStatus = 'gray' | 'blue' | 'green' | 'red';
export type CommonStatus = 'gray' | 'blue' | 'green' | 'red' | 'circle';
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* limitations under the License.
*/

import React from 'react';
import { type IconsNames, Icon, Title } from '@uikit';
import { AdhActionState } from '@models/adh';
import s from './ActionHeader.module.scss';
Expand All @@ -27,6 +26,7 @@ const actionStateToIconName: Record<AdhActionState, IconsNames> = {
[AdhActionState.Failed]: 'status-failed',
[AdhActionState.Running]: 'status-running',
[AdhActionState.Successful]: 'status-ok',
[AdhActionState.Scheduled]: 'status-scheduled',
};

const ActionHeader = () => {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions smart-frontend/app/src/components/uikit/Icon/sprite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const allowIconsNames = [
'status-ok',
'status-running',
'status-warning',
'status-scheduled',
'table-filter',
'user',
] as const;
Expand Down
1 change: 1 addition & 0 deletions smart-frontend/app/src/models/adh/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export enum AdhActionState {
Running = 'RUNNING',
Successful = 'SUCCESSFUL',
Failed = 'FAILED',
Scheduled = 'SCHEDULED',
}

export interface AdhAction {
Expand Down
Loading