This repository has been archived by the owner on Mar 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* vm logs mock * vm logs * feat(vm-logs): show vm logs * vm logs * add tests * fix action name * fix selector name * fix monospace text in column header * feat(vm-logs): replace show logs icon button with text button * feat(vm-logs): keyword filtering * feat(vm-logs): save vm log keywords in query params * feat(vm-logs): filter by dates * feat(vm-logs): filter by dates * v1.10.1 * fix tests * fix version * fix package.json * sort by timestamp * fix timestamp * feat(vm-logs): filter vms by account * refactor date picker label * refactor labels * refactor labels * fix IE * feat(vm-logs): newest first sorting * add types * add types * fix newest first * fix typings * fix typings * fix typings
- Loading branch information
Vladimir Shakhov
authored
Oct 19, 2018
1 parent
25cdf54
commit 2fa5125
Showing
12 changed files
with
182 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,94 +1,103 @@ | ||
import { Action } from '@ngrx/store'; | ||
import { VmLog } from '../models/vm-log.model'; | ||
|
||
export const LOAD_VM_LOGS_REQUEST = '[VM Logs] LOAD_VM_LOGS_REQUEST'; | ||
export const LOAD_VM_LOGS_RESPONSE = '[VM Logs] LOAD_VM_LOGS_RESPONSE'; | ||
export const VM_LOGS_FILTER_UPDATE = '[VM Logs] VM_LOGS_FILTER_UPDATE'; | ||
export const VM_LOGS_ADD_KEYWORD = '[VM Logs] VM_LOGS_ADD_KEYWORD'; | ||
export const VM_LOGS_REMOVE_KEYWORD = '[VM Logs] VM_LOGS_REMOVE_KEYWORD'; | ||
export const VM_LOGS_UPDATE_START_DATE = '[VM Logs] VM_LOGS_UPDATE_START_DATE'; | ||
export const VM_LOGS_UPDATE_START_TIME = '[VM Logs] VM_LOGS_UPDATE_START_TIME'; | ||
export const VM_LOGS_UPDATE_END_DATE = '[VM Logs] VM_LOGS_UPDATE_END_DATE'; | ||
export const VM_LOGS_UPDATE_END_TIME = '[VM Logs] VM_LOGS_UPDATE_END_TIME'; | ||
export const VM_LOGS_UPDATE_ACCOUNT_IDS = '[VM Logs] VM_LOGS_UPDATE_ACCOUNT_IDS'; | ||
import { Keyword } from '../models/keyword.model'; | ||
import { Time } from '../../shared/components/time-picker/time-picker.component'; | ||
import { VmLogsFilters } from './vm-logs.reducers'; | ||
|
||
export enum VmLogsActionTypes { | ||
LOAD_VM_LOGS_REQUEST = '[VM Logs] LOAD_VM_LOGS_REQUEST', | ||
LOAD_VM_LOGS_RESPONSE = '[VM Logs] LOAD_VM_LOGS_RESPONSE', | ||
VM_LOGS_FILTER_UPDATE = '[VM Logs] VM_LOGS_FILTER_UPDATE', | ||
VM_LOGS_ADD_KEYWORD = '[VM Logs] VM_LOGS_ADD_KEYWORD', | ||
VM_LOGS_REMOVE_KEYWORD = '[VM Logs] VM_LOGS_REMOVE_KEYWORD', | ||
VM_LOGS_UPDATE_START_DATE = '[VM Logs] VM_LOGS_UPDATE_START_DATE', | ||
VM_LOGS_UPDATE_START_TIME = '[VM Logs] VM_LOGS_UPDATE_START_TIME', | ||
VM_LOGS_UPDATE_END_DATE = '[VM Logs] VM_LOGS_UPDATE_END_DATE', | ||
VM_LOGS_UPDATE_END_TIME = '[VM Logs] VM_LOGS_UPDATE_END_TIME', | ||
VM_LOGS_UPDATE_ACCOUNT_IDS = '[VM Logs] VM_LOGS_UPDATE_ACCOUNT_IDS', | ||
VM_LOGS_TOGGLE_NEWEST_FIRST = '[VM Logs] VM_LOGS_TOGGLE_NEWEST_FIRST' | ||
} | ||
|
||
export class LoadVmLogsRequest implements Action { | ||
type = LOAD_VM_LOGS_REQUEST; | ||
|
||
constructor(public payload?: any) { | ||
} | ||
|
||
readonly type = VmLogsActionTypes.LOAD_VM_LOGS_REQUEST; | ||
} | ||
|
||
export class LoadVmLogsResponse implements Action { | ||
type = LOAD_VM_LOGS_RESPONSE; | ||
readonly type = VmLogsActionTypes.LOAD_VM_LOGS_RESPONSE; | ||
|
||
constructor(public payload: Array<VmLog> | any) { | ||
constructor(readonly payload: Array<VmLog>) { | ||
} | ||
|
||
} | ||
|
||
export class VmLogsFilterUpdate implements Action { | ||
type = VM_LOGS_FILTER_UPDATE; | ||
readonly type = VmLogsActionTypes.VM_LOGS_FILTER_UPDATE; | ||
|
||
constructor(public payload: any) { | ||
constructor(readonly payload: Partial<VmLogsFilters>) { | ||
} | ||
|
||
} | ||
|
||
export class VmLogsAddKeyword implements Action { | ||
type = VM_LOGS_ADD_KEYWORD; | ||
readonly type = VmLogsActionTypes.VM_LOGS_ADD_KEYWORD; | ||
|
||
constructor(public payload: any) { | ||
constructor(readonly payload: Keyword) { | ||
} | ||
} | ||
|
||
export class VmLogsRemoveKeyword implements Action { | ||
type = VM_LOGS_REMOVE_KEYWORD; | ||
readonly type = VmLogsActionTypes.VM_LOGS_REMOVE_KEYWORD; | ||
|
||
constructor(public payload: any) { | ||
constructor(readonly payload: Keyword) { | ||
} | ||
} | ||
|
||
export class VmLogsUpdateStartDate implements Action { | ||
type = VM_LOGS_UPDATE_START_DATE; | ||
readonly type = VmLogsActionTypes.VM_LOGS_UPDATE_START_DATE; | ||
|
||
constructor(public payload: any) { | ||
constructor(readonly payload: Date) { | ||
} | ||
} | ||
|
||
export class VmLogsUpdateStartTime implements Action { | ||
type = VM_LOGS_UPDATE_START_TIME; | ||
readonly type = VmLogsActionTypes.VM_LOGS_UPDATE_START_TIME; | ||
|
||
constructor(public payload: any) { | ||
constructor(readonly payload: Time) { | ||
} | ||
} | ||
|
||
export class VmLogsUpdateEndDate implements Action { | ||
type = VM_LOGS_UPDATE_END_DATE; | ||
readonly type = VmLogsActionTypes.VM_LOGS_UPDATE_END_DATE; | ||
|
||
constructor(public payload: any) { | ||
constructor(readonly payload: Date) { | ||
} | ||
} | ||
|
||
export class VmLogsUpdateEndTime implements Action { | ||
type = VM_LOGS_UPDATE_END_TIME; | ||
readonly type = VmLogsActionTypes.VM_LOGS_UPDATE_END_TIME; | ||
|
||
constructor(public payload: any) { | ||
constructor(readonly payload: Time) { | ||
} | ||
} | ||
|
||
export class VmLogsUpdateAccountIds implements Action { | ||
type = VM_LOGS_UPDATE_ACCOUNT_IDS; | ||
readonly type = VmLogsActionTypes.VM_LOGS_UPDATE_ACCOUNT_IDS; | ||
|
||
constructor(public payload: any) { | ||
constructor(readonly payload: Array<string>) { | ||
} | ||
} | ||
|
||
export class VmLogsToggleNewestFirst implements Action { | ||
readonly type = VmLogsActionTypes.VM_LOGS_TOGGLE_NEWEST_FIRST; | ||
} | ||
|
||
export type Actions = | ||
LoadVmLogsResponse | ||
| LoadVmLogsRequest | ||
| VmLogsFilterUpdate | ||
| VmLogsAddKeyword | ||
| VmLogsUpdateStartDate | ||
| VmLogsUpdateStartTime | ||
| VmLogsUpdateEndDate | ||
| VmLogsUpdateEndTime | ||
| VmLogsRemoveKeyword | ||
| VmLogsUpdateAccountIds; | ||
| VmLogsUpdateAccountIds | ||
| VmLogsToggleNewestFirst; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.