How to use the @clr/angular.SortOrder.Unsorted function in @clr/angular

To help you get started, we’ve selected a few @clr/angular examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Qihoo360 / wayne / src / frontend / src / app / portal / cronjob / list-event / list-event.component.ts View on Github external
import { Event } from '../../../shared/model/v1/deploymenttpl';
import { SortOrder } from '@clr/angular';

@Component({
  selector: 'list-event',
  providers: [Inventory],
  templateUrl: 'list-event.component.html',
  styleUrls: ['list-event.scss']
})

export class ListEventComponent implements OnInit {
  checkOnGoing = false;
  isSubmitOnGoing = false;
  modalOpened: boolean;
  warnings: Event[];
  sortOrder: SortOrder = SortOrder.Unsorted;
  sorted = false;

  timeComparator = new TimeComparator();

  constructor(private inventory: Inventory) {
  }

  openModal(warnings: Event[]) {
    this.modalOpened = true;
    this.inventory.size = warnings.length;
    this.inventory.reset(warnings);
    this.warnings = this.inventory.all;
  }

  ngOnInit(): void {
  }
github Qihoo360 / wayne / src / frontend / src / app / admin / kubernetes / persistentvolume / list-persistentvolume / list-persistentvolume.component.ts View on Github external
import { PersistentVolumeClient } from '../../../../shared/client/v1/kubernetes/persistentvolume';
import { MessageHandlerService } from '../../../../shared/message-handler/message-handler.service';
import { AuthService } from '../../../../shared/auth/auth.service';
import { PersistentVolumeRobinClient } from '../../../../shared/client/v1/kubernetes/persistentvolume-robin';
import { StorageService } from '../../../../shared/client/v1/storage.service';

@Component({
  selector: 'list-persistentvolume',
  templateUrl: 'list-persistentvolume.component.html'
})

export class ListPersistentVolumeComponent implements OnInit, OnDestroy {
  @Input() persistentVolumes: PersistentVolume[];
  @Input() cluster: string;
  @Input() showState: object;
  sortOrder: SortOrder = SortOrder.Unsorted;
  sorted = false;
  currentPage = 1;
  _pageSize = 10;
  timeComparator = new TimeComparator();
  nameComparator = new NameComparator();
  nameFilter = new NameFilter();
  rbdImageNameFilter = new RbdImageNameFilter;
  pvcFilter = new PvcFilter();
  @Output() delete = new EventEmitter();
  @Output() edit = new EventEmitter();
  @Output() refresh = new EventEmitter();
  pageSizes: number[] = new Array(10, 20, 50);

  subscription: Subscription;

  constructor(private confirmationDialogService: ConfirmationDialogService,
github vmware / clarity / v0.10 / src / app / documentation / demos / datagrid / sorting / sorting.ts View on Github external
import {User} from "../inventory/user";
import {SortOrder} from "@clr/angular";
import {PokemonComparator} from "../utils/pokemon-comparator";
import {EXAMPLES} from "./examples";

@Component({
    selector: "clr-datagrid-sorting-demo",
    providers: [Inventory],
    templateUrl: "./sorting.html",
    styleUrls: ["../datagrid.demo.scss"]
})
export class DatagridSortingDemo {
    examples = EXAMPLES;
    users: User[];
    usersDeprecated: User[];
    sortOrder: SortOrder = SortOrder.Unsorted;
    sorted: boolean = false;
    descSort: SortOrder = SortOrder.Desc;


    pokemonComparator = new PokemonComparator();

    constructor(private inventory: Inventory) {
        inventory.size = 10;
        inventory.reset();
        this.users = inventory.all;
        this.usersDeprecated = inventory.all;
    }
}
github Qihoo360 / wayne / src / frontend / src / app / portal / deployment / list-pod / list-pod.component.ts View on Github external
import { CopyService } from '../../../shared/client/v1/copy.service';
import { AuthService } from '../../../shared/auth/auth.service';

@Component({
  selector: 'list-pod',
  providers: [Inventory],
  templateUrl: 'list-pod.component.html',
  styleUrls: ['list-pod.scss']
})

export class ListPodComponent implements OnInit, OnDestroy {
  checkOnGoing = false;
  isSubmitOnGoing = false;
  modalOpened: boolean;
  pods: Pod[];
  sortOrder: SortOrder = SortOrder.Unsorted;
  sorted = false;
  timeComparator = new TimeComparator();
  stateComparator = new StateComparator();
  currentCluster: string;
  deployment: string;
  logSource: string;
  timer: any;
  whetherHotReflash = true;
  isCopied = false;

  subscription: Subscription;

  get appId(): number {
    return parseInt(this.route.parent.snapshot.params['id'], 10);
  }