@openziti/ziti-console-lib 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2513,6 +2513,7 @@ let ListPageServiceClass = class ListPageServiceClass {
2513
2513
  paging.noSearch = false;
2514
2514
  paging.searchOn = filters[idx].columnId;
2515
2515
  paging.filter = filters[idx].value;
2516
+ paging.rawFilter = true;
2516
2517
  }
2517
2518
  return this.dataService.get(resourceType, paging, filters);
2518
2519
  }
@@ -6143,7 +6144,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
6143
6144
  See the License for the specific language governing permissions and
6144
6145
  limitations under the License.
6145
6146
  */
6146
- const CSV_COLUMNS$3 = [
6147
+ const CSV_COLUMNS$4 = [
6147
6148
  { label: 'Name', path: 'name' },
6148
6149
  { label: 'Roles', path: 'roleAttributes' },
6149
6150
  { label: 'Online', path: 'hasApiSession' },
@@ -6551,7 +6552,7 @@ class IdentitiesPageService extends ListPageServiceClass {
6551
6552
  });
6552
6553
  }
6553
6554
  downloadItems(selectedItems) {
6554
- this.csvDownloadService.download('identities', selectedItems, CSV_COLUMNS$3, false, false, undefined, false);
6555
+ this.csvDownloadService.download('identities', selectedItems, CSV_COLUMNS$4, false, false, undefined, false);
6555
6556
  }
6556
6557
  openUpdate(item) {
6557
6558
  this.modalType = 'identity';
@@ -6737,7 +6738,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
6737
6738
  args: [EDGE_ROUTER_EXTENSION_SERVICE]
6738
6739
  }] }]; } });
6739
6740
 
6740
- const CSV_COLUMNS$2 = [
6741
+ const CSV_COLUMNS$3 = [
6741
6742
  { label: 'Name', path: 'name' },
6742
6743
  { label: 'Attributes', path: 'roleAttributes' },
6743
6744
  { label: 'Verified', path: 'isVerified' },
@@ -7004,7 +7005,7 @@ class EdgeRoutersPageService extends ListPageServiceClass {
7004
7005
  });
7005
7006
  }
7006
7007
  downloadItems(selectedItems) {
7007
- this.csvDownloadService.download('edge-routers', selectedItems, CSV_COLUMNS$2, false, false, undefined, false);
7008
+ this.csvDownloadService.download('edge-routers', selectedItems, CSV_COLUMNS$3, false, false, undefined, false);
7008
7009
  }
7009
7010
  reenroll(router) {
7010
7011
  const data = {
@@ -11120,7 +11121,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
11120
11121
  See the License for the specific language governing permissions and
11121
11122
  limitations under the License.
11122
11123
  */
11123
- const CSV_COLUMNS$1 = [
11124
+ const CSV_COLUMNS$2 = [
11124
11125
  { label: 'Name', path: 'name' },
11125
11126
  { label: 'Created At', path: 'createdAt' }
11126
11127
  ];
@@ -11270,7 +11271,7 @@ class ServicesPageService extends ListPageServiceClass {
11270
11271
  });
11271
11272
  }
11272
11273
  downloadItems(selectedItems) {
11273
- this.csvDownloadService.download('services', selectedItems, CSV_COLUMNS$1, false, false, undefined, false);
11274
+ this.csvDownloadService.download('services', selectedItems, CSV_COLUMNS$2, false, false, undefined, false);
11274
11275
  }
11275
11276
  openUpdate(item) {
11276
11277
  this.modalType = 'service';
@@ -13005,11 +13006,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
13005
13006
  See the License for the specific language governing permissions and
13006
13007
  limitations under the License.
13007
13008
  */
13008
- const CSV_COLUMNS = [
13009
+ const CSV_COLUMNS$1 = [
13009
13010
  { label: 'Name', path: 'name' },
13010
13011
  { label: 'Created At', path: 'createdAt' }
13011
13012
  ];
13012
- class ServicePoliciesPageService extends ListPageServiceClass {
13013
+ class EdgeRouterPoliciesPageService extends ListPageServiceClass {
13013
13014
  constructor(settings, filterService, zitiService, csvDownloadService, growlerService, dialogForm, extService) {
13014
13015
  super(settings, filterService, csvDownloadService, extService);
13015
13016
  this.zitiService = zitiService;
@@ -13018,14 +13019,14 @@ class ServicePoliciesPageService extends ListPageServiceClass {
13018
13019
  this.dialogForm = dialogForm;
13019
13020
  this.extService = extService;
13020
13021
  this.paging = this.DEFAULT_PAGING;
13021
- this.modalType = 'service-policy';
13022
+ this.modalType = 'edge-router-policy';
13022
13023
  this.serviceType = '';
13023
13024
  this.selectedServicePolicy = new Service();
13024
- this.serviceRoleAttributes = [];
13025
- this.serviceNamedAttributes = [];
13026
- this.serviceNamedAttributesMap = {};
13027
- this.selectedServiceRoleAttributes = [];
13028
- this.selectedServiceNamedAttributes = [];
13025
+ this.routerRoleAttributes = [];
13026
+ this.routerNamedAttributes = [];
13027
+ this.routerNamedAttributesMap = {};
13028
+ this.selectedRouterRoleAttributes = [];
13029
+ this.selectedRouterNamedAttributes = [];
13029
13030
  this.identityRoleAttributes = [];
13030
13031
  this.identityNamedAttributes = [];
13031
13032
  this.identityNamedAttributesMap = {};
@@ -13049,16 +13050,16 @@ class ServicePoliciesPageService extends ListPageServiceClass {
13049
13050
  { name: 'Download All', action: 'download-all' },
13050
13051
  { name: 'Download Selected', action: 'download-selected' },
13051
13052
  ];
13052
- this.resourceType = 'service-policies';
13053
+ this.resourceType = 'edge-router-policies';
13053
13054
  this.validate = (formData) => {
13054
13055
  return Promise.resolve({ passed: true });
13055
13056
  };
13056
13057
  this.filterService.filtersChanged.subscribe(filters => {
13057
- let serviceFilter, identityFilter, postureFilter;
13058
+ let routerFilter, identityFilter, postureFilter;
13058
13059
  filters.forEach((filter) => {
13059
13060
  switch (filter.columnId) {
13060
- case 'serviceRoles':
13061
- serviceFilter = true;
13061
+ case 'edgeRouterRoles':
13062
+ routerFilter = true;
13062
13063
  break;
13063
13064
  case 'identityRoles':
13064
13065
  identityFilter = true;
@@ -13068,9 +13069,9 @@ class ServicePoliciesPageService extends ListPageServiceClass {
13068
13069
  break;
13069
13070
  }
13070
13071
  });
13071
- if (!serviceFilter) {
13072
- this.selectedServiceRoleAttributes = [];
13073
- this.selectedServiceNamedAttributes = [];
13072
+ if (!routerFilter) {
13073
+ this.selectedRouterRoleAttributes = [];
13074
+ this.selectedRouterNamedAttributes = [];
13074
13075
  }
13075
13076
  if (!identityFilter) {
13076
13077
  this.selectedIdentityRoleAttributes = [];
@@ -13083,29 +13084,29 @@ class ServicePoliciesPageService extends ListPageServiceClass {
13083
13084
  filterType: 'DATETIME',
13084
13085
  };
13085
13086
  const self = this;
13086
- const serviceRolesHeaderComponentParams = {
13087
+ const routerRolesHeaderComponentParams = {
13087
13088
  filterType: 'ATTRIBUTE',
13088
13089
  enableSorting: true,
13089
13090
  getRoleAttributes: () => {
13090
- return self.serviceRoleAttributes;
13091
+ return self.routerRoleAttributes;
13091
13092
  },
13092
13093
  getNamedAttributes: () => {
13093
- return self.serviceNamedAttributes;
13094
+ return self.routerNamedAttributes;
13094
13095
  },
13095
13096
  getSelectedRoleAttributes: () => {
13096
- return self.selectedServiceRoleAttributes;
13097
+ return self.selectedRouterRoleAttributes;
13097
13098
  },
13098
13099
  getSelectedNamedAttributes: () => {
13099
- return self.selectedServiceNamedAttributes;
13100
+ return self.selectedRouterNamedAttributes;
13100
13101
  },
13101
13102
  setSelectedRoleAttributes: (attributes) => {
13102
- self.selectedServiceRoleAttributes = attributes;
13103
+ self.selectedRouterRoleAttributes = attributes;
13103
13104
  },
13104
13105
  setSelectedNamedAttributes: (attributes) => {
13105
- self.selectedServiceNamedAttributes = attributes;
13106
+ self.selectedRouterNamedAttributes = attributes;
13106
13107
  },
13107
13108
  getNamedAttributesMap: () => {
13108
- return self.serviceNamedAttributesMap;
13109
+ return self.routerNamedAttributesMap;
13109
13110
  }
13110
13111
  };
13111
13112
  const identityRolesHeaderComponentParams = {
@@ -13204,11 +13205,11 @@ class ServicePoliciesPageService extends ListPageServiceClass {
13204
13205
  width: 300,
13205
13206
  },
13206
13207
  {
13207
- colId: 'serviceRoles',
13208
- field: 'serviceRoles',
13209
- headerName: 'Service Attributes',
13208
+ colId: 'edgeRouterRoles',
13209
+ field: 'edgeRouterRoles',
13210
+ headerName: 'Router Attributes',
13210
13211
  headerComponent: TableColumnDefaultComponent,
13211
- headerComponentParams: serviceRolesHeaderComponentParams,
13212
+ headerComponentParams: routerRolesHeaderComponentParams,
13212
13213
  onCellClicked: (data) => {
13213
13214
  if (this.hasSelectedText()) {
13214
13215
  return;
@@ -13241,25 +13242,6 @@ class ServicePoliciesPageService extends ListPageServiceClass {
13241
13242
  sortable: false,
13242
13243
  filter: false,
13243
13244
  },
13244
- {
13245
- colId: 'postureCheckRoles',
13246
- field: 'postureCheckRoles',
13247
- headerName: 'Posture Check Attributes',
13248
- headerComponent: TableColumnDefaultComponent,
13249
- headerComponentParams: postureRolesHeaderComponentParams,
13250
- onCellClicked: (data) => {
13251
- if (this.hasSelectedText()) {
13252
- return;
13253
- }
13254
- this.serviceType = '';
13255
- this.openUpdate(data.data);
13256
- },
13257
- resizable: true,
13258
- cellRenderer: this.rolesRenderer,
13259
- cellClass: 'nf-cell-vert-align tCol',
13260
- sortable: false,
13261
- filter: false,
13262
- },
13263
13245
  {
13264
13246
  colId: 'semantic',
13265
13247
  field: 'semantic',
@@ -13280,26 +13262,6 @@ class ServicePoliciesPageService extends ListPageServiceClass {
13280
13262
  cellClass: 'nf-cell-vert-align tCol',
13281
13263
  width: 100,
13282
13264
  },
13283
- {
13284
- colId: 'type',
13285
- field: 'type',
13286
- headerName: 'Type',
13287
- headerComponent: TableColumnDefaultComponent,
13288
- //headerComponentParams: typeHeaderComponentParams,
13289
- onCellClicked: (data) => {
13290
- if (this.hasSelectedText()) {
13291
- return;
13292
- }
13293
- this.serviceType = '';
13294
- this.openUpdate(data.data);
13295
- },
13296
- resizable: true,
13297
- cellRenderer: (row) => {
13298
- return row.data?.type;
13299
- },
13300
- cellClass: 'nf-cell-vert-align tCol',
13301
- width: 100,
13302
- },
13303
13265
  {
13304
13266
  colId: 'createdAt',
13305
13267
  field: 'createdAt',
@@ -13325,7 +13287,7 @@ class ServicePoliciesPageService extends ListPageServiceClass {
13325
13287
  getData(filters, sort, page) {
13326
13288
  // we can customize filters or sorting here before moving on...
13327
13289
  this.paging.page = page || this.paging.page;
13328
- return super.getTableData('service-policies', this.paging, filters, sort)
13290
+ return super.getTableData('edge-router-policies', this.paging, filters, sort)
13329
13291
  .then((results) => {
13330
13292
  return this.processData(results);
13331
13293
  });
@@ -13346,9 +13308,9 @@ class ServicePoliciesPageService extends ListPageServiceClass {
13346
13308
  return row;
13347
13309
  });
13348
13310
  }
13349
- getServiceRoleAttributes() {
13350
- return this.zitiService.get('service-role-attributes', {}, []).then((result) => {
13351
- this.serviceRoleAttributes = result.data;
13311
+ getEdgeRouterRoleAttributes() {
13312
+ return this.zitiService.get('edge-router-role-attributes', {}, []).then((result) => {
13313
+ this.routerRoleAttributes = result.data;
13352
13314
  return result;
13353
13315
  });
13354
13316
  }
@@ -13363,12 +13325,12 @@ class ServicePoliciesPageService extends ListPageServiceClass {
13363
13325
  });
13364
13326
  }
13365
13327
  getServiceNamedAttributes() {
13366
- return this.zitiService.get('services', {}, []).then((result) => {
13367
- const namedAttributes = result.data.map((service) => {
13368
- this.serviceNamedAttributesMap[service.name] = service.id;
13369
- return service.name;
13328
+ return this.zitiService.get('edge-routers', {}, []).then((result) => {
13329
+ const namedAttributes = result.data.map((router) => {
13330
+ this.routerNamedAttributesMap[router.name] = router.id;
13331
+ return router.name;
13370
13332
  });
13371
- this.serviceNamedAttributes = namedAttributes;
13333
+ this.routerNamedAttributes = namedAttributes;
13372
13334
  return namedAttributes;
13373
13335
  });
13374
13336
  }
@@ -13391,16 +13353,16 @@ class ServicePoliciesPageService extends ListPageServiceClass {
13391
13353
  downloadAllItems() {
13392
13354
  const paging = cloneDeep(this.paging);
13393
13355
  paging.total = this.totalCount;
13394
- super.getTableData('service-policies', paging, undefined, undefined)
13356
+ super.getTableData('edge-router-policies', paging, undefined, undefined)
13395
13357
  .then((results) => {
13396
13358
  return this.downloadItems(results?.data);
13397
13359
  });
13398
13360
  }
13399
13361
  downloadItems(selectedItems) {
13400
- this.csvDownloadService.download('service-policies', selectedItems, CSV_COLUMNS, false, false, undefined, false);
13362
+ this.csvDownloadService.download('edge-router-policies', selectedItems, CSV_COLUMNS$1, false, false, undefined, false);
13401
13363
  }
13402
13364
  openUpdate(item) {
13403
- this.modalType = 'service-policies';
13365
+ this.modalType = 'edge-router-policies';
13404
13366
  if (item) {
13405
13367
  this.selectedServicePolicy = item;
13406
13368
  this.selectedServicePolicy.badges = [];
@@ -13411,10 +13373,10 @@ class ServicePoliciesPageService extends ListPageServiceClass {
13411
13373
  }
13412
13374
  this.sideModalOpen = true;
13413
13375
  }
13414
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ServicePoliciesPageService, deps: [{ token: SETTINGS_SERVICE }, { token: DataTableFilterService }, { token: ZITI_DATA_SERVICE }, { token: CsvDownloadService }, { token: GrowlerService }, { token: i3$1.MatDialog }, { token: SHAREDZ_EXTENSION }], target: i0.ɵɵFactoryTarget.Injectable }); }
13415
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ServicePoliciesPageService, providedIn: 'root' }); }
13376
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EdgeRouterPoliciesPageService, deps: [{ token: SETTINGS_SERVICE }, { token: DataTableFilterService }, { token: ZITI_DATA_SERVICE }, { token: CsvDownloadService }, { token: GrowlerService }, { token: i3$1.MatDialog }, { token: SHAREDZ_EXTENSION }], target: i0.ɵɵFactoryTarget.Injectable }); }
13377
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EdgeRouterPoliciesPageService, providedIn: 'root' }); }
13416
13378
  }
13417
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ServicePoliciesPageService, decorators: [{
13379
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EdgeRouterPoliciesPageService, decorators: [{
13418
13380
  type: Injectable,
13419
13381
  args: [{
13420
13382
  providedIn: 'root'
@@ -13887,17 +13849,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
13887
13849
  See the License for the specific language governing permissions and
13888
13850
  limitations under the License.
13889
13851
  */
13890
- class ServicePoliciesPageComponent extends ListPageComponent {
13852
+ class EdgeRouterPoliciesPageComponent extends ListPageComponent {
13891
13853
  constructor(svc, filterService, dialogForm, tabNames, consoleEvents, zacWrapperService) {
13892
13854
  super(filterService, svc, consoleEvents, dialogForm);
13893
13855
  this.svc = svc;
13894
13856
  this.tabNames = tabNames;
13895
13857
  this.zacWrapperService = zacWrapperService;
13896
- this.serviceType = '';
13897
- this.serviceRoleAttributes = [];
13858
+ this.routerRoleAttributes = [];
13898
13859
  this.identityRoleAttributes = [];
13899
13860
  this.formDataChanged = false;
13900
- this.title = 'Manage Service Policies';
13861
+ this.title = 'Manage Edge Router Policies';
13901
13862
  let userLang = navigator.language || 'en-us';
13902
13863
  userLang = userLang.toLowerCase();
13903
13864
  }
@@ -13919,7 +13880,7 @@ class ServicePoliciesPageComponent extends ListPageComponent {
13919
13880
  const selectedItems = this.rowData.filter((row) => {
13920
13881
  return row.selected;
13921
13882
  });
13922
- const label = selectedItems.length > 1 ? 'services' : 'service';
13883
+ const label = selectedItems.length > 1 ? 'services' : 'edge router';
13923
13884
  this.openBulkDelete(selectedItems, label);
13924
13885
  break;
13925
13886
  default:
@@ -13952,8 +13913,8 @@ class ServicePoliciesPageComponent extends ListPageComponent {
13952
13913
  }
13953
13914
  }
13954
13915
  getRoleAttributes() {
13955
- this.svc.getServiceRoleAttributes().then((result) => {
13956
- this.serviceRoleAttributes = result.data;
13916
+ this.svc.getEdgeRouterRoleAttributes().then((result) => {
13917
+ this.routerRoleAttributes = result.data;
13957
13918
  });
13958
13919
  this.svc.getIdentityRoleAttributes().then((result) => {
13959
13920
  this.identityRoleAttributes = result.data;
@@ -13963,7 +13924,7 @@ class ServicePoliciesPageComponent extends ListPageComponent {
13963
13924
  this.svc.getPostureNamedAttributes();
13964
13925
  }
13965
13926
  deleteItem(item) {
13966
- this.openBulkDelete([item], 'service-policies');
13927
+ this.openBulkDelete([item], 'edge-router-policies');
13967
13928
  }
13968
13929
  closeModal(event) {
13969
13930
  this.svc.sideModalOpen = false;
@@ -13977,13 +13938,13 @@ class ServicePoliciesPageComponent extends ListPageComponent {
13977
13938
  serviceTypeSelected(event) {
13978
13939
  this.svc.serviceType = event;
13979
13940
  }
13980
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ServicePoliciesPageComponent, deps: [{ token: ServicePoliciesPageService }, { token: DataTableFilterService }, { token: i3$1.MatDialog }, { token: TabNameService }, { token: ConsoleEventsService }, { token: ZAC_WRAPPER_SERVICE }], target: i0.ɵɵFactoryTarget.Component }); }
13981
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ServicePoliciesPageComponent, selector: "lib-service-policies-page", usesInheritance: true, ngImport: i0, template: "<div class=\"ziti-page-container ziti-service-policies-container\">\n <lib-list-page-header [title]=\"title\"\n [tabs]=\"tabs\"\n [showAdd]=\"!itemsSelected\"\n (actionClicked)=\"headerActionClicked($event)\"></lib-list-page-header>\n\n <lib-data-table [tableId]=\"'configurations'\"\n [rowData]=\"rowData\"\n [columnDefinitions]=\"columnDefs\"\n (actionRequested)=\"tableAction($event)\"\n [startCount]=\"startCount\"\n [endCount]=\"endCount\"\n [totalCount]=\"totalCount\"\n [emptyMsg]=\"'No Service Policies defined, Click the plus to add a Service Policy.'\"\n [filterApplied]=\"filterApplied\"\n [menuItems]=\"svc.menuItems\"\n (gridReady)=\"gridReady($event)\"\n >\n </lib-data-table>\n\n <lib-side-modal [(open)]=\"svc.sideModalOpen\" [showClose]=\"false\">\n <lib-service-policy-form\n *ngIf=\"svc.sideModalOpen\"\n [formData]=\"svc.selectedServicePolicy\"\n [serviceRoleAttributes]=\"svc.serviceRoleAttributes\"\n [serviceNamedAttributes]=\"svc.serviceNamedAttributes\"\n [serviceNamedAttributesMap]=\"svc.serviceNamedAttributesMap\"\n [identityRoleAttributes]=\"svc.identityRoleAttributes\"\n [identityNamedAttributes]=\"svc.identityNamedAttributes\"\n [identityNamedAttributesMap]=\"svc.identityNamedAttributesMap\"\n [postureRoleAttributes]=\"svc.postureRoleAttributes\"\n [postureNamedAttributes]=\"svc.postureNamedAttributes\"\n [postureNamedAttributesMap]=\"svc.postureNamedAttributesMap\"\n (close)=\"closeModal($event)\"\n (dataChange)=\"dataChanged($event)\">\n </lib-service-policy-form>\n </lib-side-modal>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ListPageHeaderComponent, selector: "lib-list-page-header", inputs: ["title", "tabs", "showAdd", "hideAction"], outputs: ["actionClicked"] }, { kind: "component", type: DataTableComponent, selector: "lib-data-table", inputs: ["rowData", "expandRowData", "collapseRowData", "rowValidation", "isTimeSearchAvailable", "isLoading", "tableId", "options", "validateService", "rowsToggled", "tableRefreshCount", "view", "serverSideDataSource", "allowDownload", "startCount", "endCount", "totalCount", "emptyMsg", "filterApplied", "menuItems", "headerActions", "noItemsClass", "entityTypeName", "showNoItemsAdd", "currentPage", "noItemsImage", "columnDefinitions", "refreshCount"], outputs: ["actionRequested", "gridReady", "dragStart", "dragLeave", "pageChanged"] }, { kind: "component", type: SideModalComponent, selector: "lib-side-modal", inputs: ["showClose", "open"], outputs: ["openChange"] }, { kind: "component", type: ServicePolicyFormComponent, selector: "lib-service-policy-form", inputs: ["formData", "serviceRoleAttributes", "serviceNamedAttributes", "serviceNamedAttributesMap", "identityRoleAttributes", "identityNamedAttributes", "identityNamedAttributesMap", "postureRoleAttributes", "postureNamedAttributes", "postureNamedAttributesMap"], outputs: ["close"] }] }); }
13941
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EdgeRouterPoliciesPageComponent, deps: [{ token: EdgeRouterPoliciesPageService }, { token: DataTableFilterService }, { token: i3$1.MatDialog }, { token: TabNameService }, { token: ConsoleEventsService }, { token: ZAC_WRAPPER_SERVICE }], target: i0.ɵɵFactoryTarget.Component }); }
13942
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EdgeRouterPoliciesPageComponent, selector: "lib-edge-router-policies-page", usesInheritance: true, ngImport: i0, template: "<div class=\"ziti-page-container edge-router-policies-container\">\n <lib-list-page-header [title]=\"title\"\n [tabs]=\"tabs\"\n [showAdd]=\"!itemsSelected\"\n (actionClicked)=\"headerActionClicked($event)\"></lib-list-page-header>\n\n <lib-data-table [tableId]=\"'edge-router-policies'\"\n [rowData]=\"rowData\"\n [columnDefinitions]=\"columnDefs\"\n (actionRequested)=\"tableAction($event)\"\n [startCount]=\"startCount\"\n [endCount]=\"endCount\"\n [totalCount]=\"totalCount\"\n [emptyMsg]=\"'No Edge Router Policies defined, Click the plus to add a Edge Router Policy.'\"\n [filterApplied]=\"filterApplied\"\n [menuItems]=\"svc.menuItems\"\n (gridReady)=\"gridReady($event)\"\n >\n </lib-data-table>\n\n <lib-side-modal [(open)]=\"svc.sideModalOpen\" [showClose]=\"false\">\n <lib-service-policy-form\n *ngIf=\"svc.sideModalOpen\"\n [formData]=\"svc.selectedServicePolicy\"\n [serviceRoleAttributes]=\"svc.routerRoleAttributes\"\n [serviceNamedAttributes]=\"svc.routerNamedAttributes\"\n [serviceNamedAttributesMap]=\"svc.routerNamedAttributesMap\"\n [identityRoleAttributes]=\"svc.identityRoleAttributes\"\n [identityNamedAttributes]=\"svc.identityNamedAttributes\"\n [identityNamedAttributesMap]=\"svc.identityNamedAttributesMap\"\n [postureRoleAttributes]=\"svc.postureRoleAttributes\"\n [postureNamedAttributes]=\"svc.postureNamedAttributes\"\n [postureNamedAttributesMap]=\"svc.postureNamedAttributesMap\"\n (close)=\"closeModal($event)\"\n (dataChange)=\"dataChanged($event)\">\n </lib-service-policy-form>\n </lib-side-modal>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ListPageHeaderComponent, selector: "lib-list-page-header", inputs: ["title", "tabs", "showAdd", "hideAction"], outputs: ["actionClicked"] }, { kind: "component", type: DataTableComponent, selector: "lib-data-table", inputs: ["rowData", "expandRowData", "collapseRowData", "rowValidation", "isTimeSearchAvailable", "isLoading", "tableId", "options", "validateService", "rowsToggled", "tableRefreshCount", "view", "serverSideDataSource", "allowDownload", "startCount", "endCount", "totalCount", "emptyMsg", "filterApplied", "menuItems", "headerActions", "noItemsClass", "entityTypeName", "showNoItemsAdd", "currentPage", "noItemsImage", "columnDefinitions", "refreshCount"], outputs: ["actionRequested", "gridReady", "dragStart", "dragLeave", "pageChanged"] }, { kind: "component", type: SideModalComponent, selector: "lib-side-modal", inputs: ["showClose", "open"], outputs: ["openChange"] }, { kind: "component", type: ServicePolicyFormComponent, selector: "lib-service-policy-form", inputs: ["formData", "serviceRoleAttributes", "serviceNamedAttributes", "serviceNamedAttributesMap", "identityRoleAttributes", "identityNamedAttributes", "identityNamedAttributesMap", "postureRoleAttributes", "postureNamedAttributes", "postureNamedAttributesMap"], outputs: ["close"] }] }); }
13982
13943
  }
13983
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ServicePoliciesPageComponent, decorators: [{
13944
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EdgeRouterPoliciesPageComponent, decorators: [{
13984
13945
  type: Component,
13985
- args: [{ selector: 'lib-service-policies-page', template: "<div class=\"ziti-page-container ziti-service-policies-container\">\n <lib-list-page-header [title]=\"title\"\n [tabs]=\"tabs\"\n [showAdd]=\"!itemsSelected\"\n (actionClicked)=\"headerActionClicked($event)\"></lib-list-page-header>\n\n <lib-data-table [tableId]=\"'configurations'\"\n [rowData]=\"rowData\"\n [columnDefinitions]=\"columnDefs\"\n (actionRequested)=\"tableAction($event)\"\n [startCount]=\"startCount\"\n [endCount]=\"endCount\"\n [totalCount]=\"totalCount\"\n [emptyMsg]=\"'No Service Policies defined, Click the plus to add a Service Policy.'\"\n [filterApplied]=\"filterApplied\"\n [menuItems]=\"svc.menuItems\"\n (gridReady)=\"gridReady($event)\"\n >\n </lib-data-table>\n\n <lib-side-modal [(open)]=\"svc.sideModalOpen\" [showClose]=\"false\">\n <lib-service-policy-form\n *ngIf=\"svc.sideModalOpen\"\n [formData]=\"svc.selectedServicePolicy\"\n [serviceRoleAttributes]=\"svc.serviceRoleAttributes\"\n [serviceNamedAttributes]=\"svc.serviceNamedAttributes\"\n [serviceNamedAttributesMap]=\"svc.serviceNamedAttributesMap\"\n [identityRoleAttributes]=\"svc.identityRoleAttributes\"\n [identityNamedAttributes]=\"svc.identityNamedAttributes\"\n [identityNamedAttributesMap]=\"svc.identityNamedAttributesMap\"\n [postureRoleAttributes]=\"svc.postureRoleAttributes\"\n [postureNamedAttributes]=\"svc.postureNamedAttributes\"\n [postureNamedAttributesMap]=\"svc.postureNamedAttributesMap\"\n (close)=\"closeModal($event)\"\n (dataChange)=\"dataChanged($event)\">\n </lib-service-policy-form>\n </lib-side-modal>\n</div>\n" }]
13986
- }], ctorParameters: function () { return [{ type: ServicePoliciesPageService }, { type: DataTableFilterService }, { type: i3$1.MatDialog }, { type: TabNameService }, { type: ConsoleEventsService }, { type: ZacWrapperServiceClass, decorators: [{
13946
+ args: [{ selector: 'lib-edge-router-policies-page', template: "<div class=\"ziti-page-container edge-router-policies-container\">\n <lib-list-page-header [title]=\"title\"\n [tabs]=\"tabs\"\n [showAdd]=\"!itemsSelected\"\n (actionClicked)=\"headerActionClicked($event)\"></lib-list-page-header>\n\n <lib-data-table [tableId]=\"'edge-router-policies'\"\n [rowData]=\"rowData\"\n [columnDefinitions]=\"columnDefs\"\n (actionRequested)=\"tableAction($event)\"\n [startCount]=\"startCount\"\n [endCount]=\"endCount\"\n [totalCount]=\"totalCount\"\n [emptyMsg]=\"'No Edge Router Policies defined, Click the plus to add a Edge Router Policy.'\"\n [filterApplied]=\"filterApplied\"\n [menuItems]=\"svc.menuItems\"\n (gridReady)=\"gridReady($event)\"\n >\n </lib-data-table>\n\n <lib-side-modal [(open)]=\"svc.sideModalOpen\" [showClose]=\"false\">\n <lib-service-policy-form\n *ngIf=\"svc.sideModalOpen\"\n [formData]=\"svc.selectedServicePolicy\"\n [serviceRoleAttributes]=\"svc.routerRoleAttributes\"\n [serviceNamedAttributes]=\"svc.routerNamedAttributes\"\n [serviceNamedAttributesMap]=\"svc.routerNamedAttributesMap\"\n [identityRoleAttributes]=\"svc.identityRoleAttributes\"\n [identityNamedAttributes]=\"svc.identityNamedAttributes\"\n [identityNamedAttributesMap]=\"svc.identityNamedAttributesMap\"\n [postureRoleAttributes]=\"svc.postureRoleAttributes\"\n [postureNamedAttributes]=\"svc.postureNamedAttributes\"\n [postureNamedAttributesMap]=\"svc.postureNamedAttributesMap\"\n (close)=\"closeModal($event)\"\n (dataChange)=\"dataChanged($event)\">\n </lib-service-policy-form>\n </lib-side-modal>\n</div>\n" }]
13947
+ }], ctorParameters: function () { return [{ type: EdgeRouterPoliciesPageService }, { type: DataTableFilterService }, { type: i3$1.MatDialog }, { type: TabNameService }, { type: ConsoleEventsService }, { type: ZacWrapperServiceClass, decorators: [{
13987
13948
  type: Inject,
13988
13949
  args: [ZAC_WRAPPER_SERVICE]
13989
13950
  }] }]; } });
@@ -14003,163 +13964,721 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
14003
13964
  See the License for the specific language governing permissions and
14004
13965
  limitations under the License.
14005
13966
  */
14006
- function playerFactory() {
14007
- return import(/* webpackChunkName: 'lottie-web' */ 'lottie-web');
14008
- }
14009
- class OpenZitiConsoleLibModule {
14010
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OpenZitiConsoleLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
14011
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: OpenZitiConsoleLibModule, declarations: [ZacWrapperComponent,
14012
- SafePipe,
14013
- ExtendableComponent,
14014
- StringInputComponent,
14015
- NumberInputComponent,
14016
- BooleanToggleInputComponent,
14017
- ObjectComponent,
14018
- SelectorInputComponent,
14019
- TextListInputComponent,
14020
- CheckboxListInputComponent,
14021
- ProtocolAddressPortInputComponent,
14022
- SideToolbarComponent,
14023
- SideNavbarComponent,
14024
- SideBannerComponent,
14025
- PasswordInputComponent,
14026
- ConfigurationFormComponent,
14027
- ConfigurationsPageComponent,
14028
- ListPageHeaderComponent,
14029
- FilterBarComponent,
14030
- ListPageFormComponent,
14031
- IdentitiesPageComponent,
14032
- EdgeRoutersPageComponent,
14033
- DataTableComponent,
14034
- TableCellSelectComponent,
14035
- TableColumnSelectComponent,
14036
- TableCellMenuComponent,
14037
- TableColumnMenuComponent,
14038
- TableColumnDefaultComponent,
14039
- TableColumnFilterComponent,
14040
- IdentityFormComponent,
14041
- EdgeRouterFormComponent,
14042
- HiddenColumnsBarComponent,
14043
- FilterBarComponent,
14044
- ExtendableComponent,
14045
- ConfirmComponent,
14046
- NoItemsComponent,
14047
- SideModalComponent,
14048
- FormHeaderComponent,
14049
- FormFieldContainerComponent,
14050
- PreviewListComponent,
14051
- LoadingIndicatorComponent,
14052
- FormFieldToggleComponent,
14053
- JsonViewComponent,
14054
- TagSelectorComponent,
14055
- QrCodeComponent,
14056
- TableCellTokenComponent,
14057
- OSTooltipComponent,
14058
- SDKTooltipComponent,
14059
- OverridesComponent,
14060
- ResetEnrollmentComponent,
14061
- IdentityServicePathComponent,
14062
- CustomTagsComponent,
14063
- ServicesPageComponent,
14064
- ServiceFormComponent,
14065
- PortRangesComponent,
14066
- ForwardingConfigComponent,
14067
- CardListComponent,
14068
- SimpleServiceComponent,
14069
- CardComponent,
14070
- CreationSummaryDialogComponent,
14071
- ConfigEditorComponent,
14072
- ServicePoliciesPageComponent,
14073
- ServicePolicyFormComponent], imports: [CommonModule,
14074
- FormsModule,
14075
- MatDialogModule,
14076
- HttpClientModule,
14077
- ZacRoutingModule,
14078
- ChipsModule,
14079
- CalendarModule,
14080
- AgGridModule,
14081
- QRCodeModule,
14082
- ClickOutsideModule,
14083
- NgJsonEditorModule,
14084
- MatTooltipModule,
14085
- MatAutocompleteModule, i1$2.LottieModule, DropdownModule], exports: [ZacWrapperComponent,
14086
- ExtendableComponent,
14087
- SideToolbarComponent,
14088
- SideNavbarComponent,
14089
- SideBannerComponent,
14090
- StringInputComponent,
14091
- SelectorInputComponent,
14092
- PasswordInputComponent,
14093
- NumberInputComponent,
14094
- BooleanToggleInputComponent,
14095
- ObjectComponent,
14096
- TextListInputComponent,
14097
- CheckboxListInputComponent,
14098
- ProtocolAddressPortInputComponent,
14099
- ConfigurationsPageComponent,
14100
- ConfigurationFormComponent,
14101
- EdgeRouterFormComponent,
14102
- IdentitiesPageComponent,
14103
- EdgeRoutersPageComponent,
14104
- ServicesPageComponent,
14105
- ZacRoutingModule,
14106
- SideModalComponent,
14107
- IdentityFormComponent,
14108
- LoadingIndicatorComponent,
14109
- GrowlerModule,
14110
- FormFieldContainerComponent,
14111
- FormFieldToggleComponent,
14112
- ServiceFormComponent,
14113
- ServicePoliciesPageComponent,
14114
- ServicePolicyFormComponent] }); }
14115
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OpenZitiConsoleLibModule, providers: [
14116
- { provide: SHAREDZ_EXTENSION, useClass: ExtensionsNoopService },
14117
- { provide: ZITI_NAVIGATOR, useValue: {} },
14118
- {
14119
- provide: APP_INITIALIZER,
14120
- useFactory: onAppInit,
14121
- deps: [Injector],
14122
- multi: true
14123
- },
14124
- ], imports: [CommonModule,
14125
- FormsModule,
14126
- MatDialogModule,
14127
- HttpClientModule,
14128
- ZacRoutingModule,
14129
- ChipsModule,
14130
- CalendarModule,
14131
- AgGridModule,
14132
- QRCodeModule,
14133
- ClickOutsideModule,
14134
- NgJsonEditorModule,
14135
- MatTooltipModule,
14136
- MatAutocompleteModule,
14137
- LottieModule.forRoot({ player: playerFactory }),
14138
- DropdownModule, ZacRoutingModule,
14139
- GrowlerModule] }); }
14140
- }
14141
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OpenZitiConsoleLibModule, decorators: [{
14142
- type: NgModule,
14143
- args: [{
14144
- declarations: [
14145
- ZacWrapperComponent,
14146
- SafePipe,
14147
- ExtendableComponent,
14148
- StringInputComponent,
14149
- NumberInputComponent,
14150
- BooleanToggleInputComponent,
14151
- ObjectComponent,
14152
- SelectorInputComponent,
14153
- TextListInputComponent,
14154
- CheckboxListInputComponent,
14155
- ProtocolAddressPortInputComponent,
14156
- SideToolbarComponent,
14157
- SideNavbarComponent,
14158
- SideBannerComponent,
14159
- PasswordInputComponent,
14160
- ConfigurationFormComponent,
14161
- ConfigurationsPageComponent,
14162
- ListPageHeaderComponent,
13967
+ const CSV_COLUMNS = [
13968
+ { label: 'Name', path: 'name' },
13969
+ { label: 'Created At', path: 'createdAt' }
13970
+ ];
13971
+ class ServicePoliciesPageService extends ListPageServiceClass {
13972
+ constructor(settings, filterService, zitiService, csvDownloadService, growlerService, dialogForm, extService) {
13973
+ super(settings, filterService, csvDownloadService, extService);
13974
+ this.zitiService = zitiService;
13975
+ this.csvDownloadService = csvDownloadService;
13976
+ this.growlerService = growlerService;
13977
+ this.dialogForm = dialogForm;
13978
+ this.extService = extService;
13979
+ this.paging = this.DEFAULT_PAGING;
13980
+ this.modalType = 'service-policy';
13981
+ this.serviceType = '';
13982
+ this.selectedServicePolicy = new Service();
13983
+ this.serviceRoleAttributes = [];
13984
+ this.serviceNamedAttributes = [];
13985
+ this.serviceNamedAttributesMap = {};
13986
+ this.selectedServiceRoleAttributes = [];
13987
+ this.selectedServiceNamedAttributes = [];
13988
+ this.identityRoleAttributes = [];
13989
+ this.identityNamedAttributes = [];
13990
+ this.identityNamedAttributesMap = {};
13991
+ this.selectedIdentityRoleAttributes = [];
13992
+ this.selectedIdentityNamedAttributes = [];
13993
+ this.postureRoleAttributes = [];
13994
+ this.postureNamedAttributes = [];
13995
+ this.postureNamedAttributesMap = {};
13996
+ this.selectedPostureRoleAttributes = [];
13997
+ this.selectedPostureNamedAttributes = [];
13998
+ this.columnFilters = {
13999
+ name: '',
14000
+ os: '',
14001
+ createdAt: '',
14002
+ };
14003
+ this.menuItems = [
14004
+ { name: 'Edit', action: 'update' },
14005
+ { name: 'Delete', action: 'delete' },
14006
+ ];
14007
+ this.tableHeaderActions = [
14008
+ { name: 'Download All', action: 'download-all' },
14009
+ { name: 'Download Selected', action: 'download-selected' },
14010
+ ];
14011
+ this.resourceType = 'service-policies';
14012
+ this.validate = (formData) => {
14013
+ return Promise.resolve({ passed: true });
14014
+ };
14015
+ this.filterService.filtersChanged.subscribe(filters => {
14016
+ let serviceFilter, identityFilter, postureFilter;
14017
+ filters.forEach((filter) => {
14018
+ switch (filter.columnId) {
14019
+ case 'serviceRoles':
14020
+ serviceFilter = true;
14021
+ break;
14022
+ case 'identityRoles':
14023
+ identityFilter = true;
14024
+ break;
14025
+ case 'postureRoles':
14026
+ postureFilter = true;
14027
+ break;
14028
+ }
14029
+ });
14030
+ if (!serviceFilter) {
14031
+ this.selectedServiceRoleAttributes = [];
14032
+ this.selectedServiceNamedAttributes = [];
14033
+ }
14034
+ if (!identityFilter) {
14035
+ this.selectedIdentityRoleAttributes = [];
14036
+ this.selectedIdentityNamedAttributes = [];
14037
+ }
14038
+ });
14039
+ }
14040
+ initTableColumns() {
14041
+ const createdAtHeaderComponentParams = {
14042
+ filterType: 'DATETIME',
14043
+ };
14044
+ const self = this;
14045
+ const serviceRolesHeaderComponentParams = {
14046
+ filterType: 'ATTRIBUTE',
14047
+ enableSorting: true,
14048
+ getRoleAttributes: () => {
14049
+ return self.serviceRoleAttributes;
14050
+ },
14051
+ getNamedAttributes: () => {
14052
+ return self.serviceNamedAttributes;
14053
+ },
14054
+ getSelectedRoleAttributes: () => {
14055
+ return self.selectedServiceRoleAttributes;
14056
+ },
14057
+ getSelectedNamedAttributes: () => {
14058
+ return self.selectedServiceNamedAttributes;
14059
+ },
14060
+ setSelectedRoleAttributes: (attributes) => {
14061
+ self.selectedServiceRoleAttributes = attributes;
14062
+ },
14063
+ setSelectedNamedAttributes: (attributes) => {
14064
+ self.selectedServiceNamedAttributes = attributes;
14065
+ },
14066
+ getNamedAttributesMap: () => {
14067
+ return self.serviceNamedAttributesMap;
14068
+ }
14069
+ };
14070
+ const identityRolesHeaderComponentParams = {
14071
+ filterType: 'ATTRIBUTE',
14072
+ enableSorting: true,
14073
+ getRoleAttributes: () => {
14074
+ return self.identityRoleAttributes;
14075
+ },
14076
+ getNamedAttributes: () => {
14077
+ return self.identityNamedAttributes;
14078
+ },
14079
+ getSelectedRoleAttributes: () => {
14080
+ return self.selectedIdentityRoleAttributes;
14081
+ },
14082
+ getSelectedNamedAttributes: () => {
14083
+ return self.selectedIdentityNamedAttributes;
14084
+ },
14085
+ setSelectedRoleAttributes: (attributes) => {
14086
+ self.selectedIdentityRoleAttributes = attributes;
14087
+ },
14088
+ setSelectedNamedAttributes: (attributes) => {
14089
+ self.selectedIdentityNamedAttributes = attributes;
14090
+ },
14091
+ getNamedAttributesMap: () => {
14092
+ return self.identityNamedAttributesMap;
14093
+ }
14094
+ };
14095
+ const postureRolesHeaderComponentParams = {
14096
+ filterType: 'ATTRIBUTE',
14097
+ enableSorting: true,
14098
+ getRoleAttributes: () => {
14099
+ return self.postureRoleAttributes;
14100
+ },
14101
+ getNamedAttributes: () => {
14102
+ return self.postureNamedAttributes;
14103
+ },
14104
+ getSelectedRoleAttributes: () => {
14105
+ return self.selectedPostureRoleAttributes;
14106
+ },
14107
+ getSelectedNamedAttributes: () => {
14108
+ return self.selectedPostureNamedAttributes;
14109
+ },
14110
+ setSelectedRoleAttributes: (attributes) => {
14111
+ self.selectedPostureRoleAttributes = attributes;
14112
+ },
14113
+ setSelectedNamedAttributes: (attributes) => {
14114
+ self.selectedPostureNamedAttributes = attributes;
14115
+ },
14116
+ getNamedAttributesMap: () => {
14117
+ return self.postureNamedAttributesMap;
14118
+ }
14119
+ };
14120
+ const semanticHeaderComponentParams = {
14121
+ filterType: 'SELECT',
14122
+ enableSorting: true,
14123
+ filterOptions: [
14124
+ { label: 'Any Of', value: 'AnyOf', columnId: 'semantic' },
14125
+ { label: 'All Of', value: 'AllOf', columnId: 'semantic' },
14126
+ ],
14127
+ getFilterOptions: () => {
14128
+ return semanticHeaderComponentParams.filterOptions;
14129
+ }
14130
+ };
14131
+ const typeHeaderComponentParams = {
14132
+ filterType: 'SELECT',
14133
+ enableSorting: true,
14134
+ filterOptions: [
14135
+ { label: 'Dial', value: 'Dial', columnId: 'type' },
14136
+ { label: 'Bind', value: 'Bind', columnId: 'type' },
14137
+ ],
14138
+ getFilterOptions: () => {
14139
+ return typeHeaderComponentParams.filterOptions;
14140
+ }
14141
+ };
14142
+ return [
14143
+ {
14144
+ colId: 'name',
14145
+ field: 'name',
14146
+ headerName: 'Name',
14147
+ headerComponent: TableColumnDefaultComponent,
14148
+ headerComponentParams: this.headerComponentParams,
14149
+ onCellClicked: (data) => {
14150
+ if (this.hasSelectedText()) {
14151
+ return;
14152
+ }
14153
+ this.serviceType = 'advanced';
14154
+ this.openUpdate(data.data);
14155
+ },
14156
+ resizable: true,
14157
+ cellRenderer: this.nameColumnRenderer,
14158
+ cellClass: 'nf-cell-vert-align tCol',
14159
+ sortable: true,
14160
+ filter: true,
14161
+ sortColumn: this.sort.bind(this),
14162
+ sortDir: 'asc',
14163
+ width: 300,
14164
+ },
14165
+ {
14166
+ colId: 'serviceRoles',
14167
+ field: 'serviceRoles',
14168
+ headerName: 'Service Attributes',
14169
+ headerComponent: TableColumnDefaultComponent,
14170
+ headerComponentParams: serviceRolesHeaderComponentParams,
14171
+ onCellClicked: (data) => {
14172
+ if (this.hasSelectedText()) {
14173
+ return;
14174
+ }
14175
+ this.serviceType = '';
14176
+ this.openUpdate(data.data);
14177
+ },
14178
+ resizable: true,
14179
+ cellRenderer: this.rolesRenderer,
14180
+ cellClass: 'nf-cell-vert-align tCol',
14181
+ sortable: false,
14182
+ filter: false,
14183
+ },
14184
+ {
14185
+ colId: 'identityRoles',
14186
+ field: 'identityRoles',
14187
+ headerName: 'Identity Attributes',
14188
+ headerComponent: TableColumnDefaultComponent,
14189
+ headerComponentParams: identityRolesHeaderComponentParams,
14190
+ onCellClicked: (data) => {
14191
+ if (this.hasSelectedText()) {
14192
+ return;
14193
+ }
14194
+ this.serviceType = '';
14195
+ this.openUpdate(data.data);
14196
+ },
14197
+ resizable: true,
14198
+ cellRenderer: this.rolesRenderer,
14199
+ cellClass: 'nf-cell-vert-align tCol',
14200
+ sortable: false,
14201
+ filter: false,
14202
+ },
14203
+ {
14204
+ colId: 'postureCheckRoles',
14205
+ field: 'postureCheckRoles',
14206
+ headerName: 'Posture Check Attributes',
14207
+ headerComponent: TableColumnDefaultComponent,
14208
+ headerComponentParams: postureRolesHeaderComponentParams,
14209
+ onCellClicked: (data) => {
14210
+ if (this.hasSelectedText()) {
14211
+ return;
14212
+ }
14213
+ this.serviceType = '';
14214
+ this.openUpdate(data.data);
14215
+ },
14216
+ resizable: true,
14217
+ cellRenderer: this.rolesRenderer,
14218
+ cellClass: 'nf-cell-vert-align tCol',
14219
+ sortable: false,
14220
+ filter: false,
14221
+ },
14222
+ {
14223
+ colId: 'semantic',
14224
+ field: 'semantic',
14225
+ headerName: 'Semantic',
14226
+ headerComponent: TableColumnDefaultComponent,
14227
+ headerComponentParams: semanticHeaderComponentParams,
14228
+ onCellClicked: (data) => {
14229
+ if (this.hasSelectedText()) {
14230
+ return;
14231
+ }
14232
+ this.serviceType = '';
14233
+ this.openUpdate(data.data);
14234
+ },
14235
+ resizable: true,
14236
+ cellRenderer: (row) => {
14237
+ return row.data?.semantic === 'AnyOf' ? 'Any Of' : 'All Of';
14238
+ },
14239
+ cellClass: 'nf-cell-vert-align tCol',
14240
+ width: 100,
14241
+ },
14242
+ {
14243
+ colId: 'type',
14244
+ field: 'type',
14245
+ headerName: 'Type',
14246
+ headerComponent: TableColumnDefaultComponent,
14247
+ //headerComponentParams: typeHeaderComponentParams,
14248
+ onCellClicked: (data) => {
14249
+ if (this.hasSelectedText()) {
14250
+ return;
14251
+ }
14252
+ this.serviceType = '';
14253
+ this.openUpdate(data.data);
14254
+ },
14255
+ resizable: true,
14256
+ cellRenderer: (row) => {
14257
+ return row.data?.type;
14258
+ },
14259
+ cellClass: 'nf-cell-vert-align tCol',
14260
+ width: 100,
14261
+ },
14262
+ {
14263
+ colId: 'createdAt',
14264
+ field: 'createdAt',
14265
+ headerName: 'Created At',
14266
+ headerComponent: TableColumnDefaultComponent,
14267
+ headerComponentParams: createdAtHeaderComponentParams,
14268
+ valueFormatter: this.createdAtFormatter,
14269
+ resizable: true,
14270
+ sortable: true,
14271
+ sortColumn: this.sort.bind(this),
14272
+ cellClass: 'nf-cell-vert-align tCol',
14273
+ onCellClicked: (data) => {
14274
+ if (this.hasSelectedText()) {
14275
+ return;
14276
+ }
14277
+ this.serviceType = '';
14278
+ this.openUpdate(data.data);
14279
+ },
14280
+ hide: true
14281
+ }
14282
+ ];
14283
+ }
14284
+ getData(filters, sort, page) {
14285
+ // we can customize filters or sorting here before moving on...
14286
+ this.paging.page = page || this.paging.page;
14287
+ return super.getTableData('service-policies', this.paging, filters, sort)
14288
+ .then((results) => {
14289
+ return this.processData(results);
14290
+ });
14291
+ }
14292
+ processData(results) {
14293
+ if (!isEmpty(results?.data)) {
14294
+ //pre-process data before rendering
14295
+ results.data = this.addActionsPerRow(results);
14296
+ }
14297
+ if (!isEmpty(results?.meta?.pagination)) {
14298
+ this.totalCount = results.meta?.pagination.totalCount;
14299
+ }
14300
+ return results;
14301
+ }
14302
+ addActionsPerRow(results) {
14303
+ return results.data.map((row) => {
14304
+ row.actionList = ['update', 'delete'];
14305
+ return row;
14306
+ });
14307
+ }
14308
+ getServiceRoleAttributes() {
14309
+ return this.zitiService.get('service-role-attributes', {}, []).then((result) => {
14310
+ this.serviceRoleAttributes = result.data;
14311
+ return result;
14312
+ });
14313
+ }
14314
+ getIdentityNamedAttributes() {
14315
+ return this.zitiService.get('identities', { rawFilter: true, filter: '', sort: 'name', order: 'asc', total: -1, page: 1 }, []).then((result) => {
14316
+ const namedAttributes = result.data.map((identity) => {
14317
+ this.identityNamedAttributesMap[identity.name] = identity.id;
14318
+ return identity.name;
14319
+ });
14320
+ this.identityNamedAttributes = namedAttributes;
14321
+ return namedAttributes;
14322
+ });
14323
+ }
14324
+ getServiceNamedAttributes() {
14325
+ return this.zitiService.get('services', { rawFilter: true, filter: '', sort: 'name', order: 'asc', total: -1, page: 1 }, []).then((result) => {
14326
+ const namedAttributes = result.data.map((service) => {
14327
+ this.serviceNamedAttributesMap[service.name] = service.id;
14328
+ return service.name;
14329
+ });
14330
+ this.serviceNamedAttributes = namedAttributes;
14331
+ return namedAttributes;
14332
+ });
14333
+ }
14334
+ getIdentityRoleAttributes() {
14335
+ return this.zitiService.get('identity-role-attributes', {}, []).then((result) => {
14336
+ this.identityRoleAttributes = result.data;
14337
+ return result;
14338
+ });
14339
+ }
14340
+ getPostureNamedAttributes() {
14341
+ return this.zitiService.get('posture-checks', {}, []).then((result) => {
14342
+ const namedAttributes = result.data.map((postureCheck) => {
14343
+ this.postureNamedAttributesMap[postureCheck.name] = postureCheck.id;
14344
+ return postureCheck.name;
14345
+ });
14346
+ this.postureNamedAttributes = namedAttributes;
14347
+ return namedAttributes;
14348
+ });
14349
+ }
14350
+ downloadAllItems() {
14351
+ const paging = cloneDeep(this.paging);
14352
+ paging.total = this.totalCount;
14353
+ super.getTableData('service-policies', paging, undefined, undefined)
14354
+ .then((results) => {
14355
+ return this.downloadItems(results?.data);
14356
+ });
14357
+ }
14358
+ downloadItems(selectedItems) {
14359
+ this.csvDownloadService.download('service-policies', selectedItems, CSV_COLUMNS, false, false, undefined, false);
14360
+ }
14361
+ openUpdate(item) {
14362
+ this.modalType = 'service-policies';
14363
+ if (item) {
14364
+ this.selectedServicePolicy = item;
14365
+ this.selectedServicePolicy.badges = [];
14366
+ unset(this.selectedServicePolicy, '_links');
14367
+ }
14368
+ else {
14369
+ this.selectedServicePolicy = new Service();
14370
+ }
14371
+ this.sideModalOpen = true;
14372
+ }
14373
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ServicePoliciesPageService, deps: [{ token: SETTINGS_SERVICE }, { token: DataTableFilterService }, { token: ZITI_DATA_SERVICE }, { token: CsvDownloadService }, { token: GrowlerService }, { token: i3$1.MatDialog }, { token: SHAREDZ_EXTENSION }], target: i0.ɵɵFactoryTarget.Injectable }); }
14374
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ServicePoliciesPageService, providedIn: 'root' }); }
14375
+ }
14376
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ServicePoliciesPageService, decorators: [{
14377
+ type: Injectable,
14378
+ args: [{
14379
+ providedIn: 'root'
14380
+ }]
14381
+ }], ctorParameters: function () { return [{ type: SettingsServiceClass, decorators: [{
14382
+ type: Inject,
14383
+ args: [SETTINGS_SERVICE]
14384
+ }] }, { type: DataTableFilterService }, { type: ZitiDataService, decorators: [{
14385
+ type: Inject,
14386
+ args: [ZITI_DATA_SERVICE]
14387
+ }] }, { type: CsvDownloadService }, { type: GrowlerService }, { type: i3$1.MatDialog }, { type: undefined, decorators: [{
14388
+ type: Inject,
14389
+ args: [SHAREDZ_EXTENSION]
14390
+ }] }]; } });
14391
+
14392
+ /*
14393
+ Copyright NetFoundry Inc.
14394
+
14395
+ Licensed under the Apache License, Version 2.0 (the "License");
14396
+ you may not use this file except in compliance with the License.
14397
+ You may obtain a copy of the License at
14398
+
14399
+ https://www.apache.org/licenses/LICENSE-2.0
14400
+
14401
+ Unless required by applicable law or agreed to in writing, software
14402
+ distributed under the License is distributed on an "AS IS" BASIS,
14403
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14404
+ See the License for the specific language governing permissions and
14405
+ limitations under the License.
14406
+ */
14407
+ class ServicePoliciesPageComponent extends ListPageComponent {
14408
+ constructor(svc, filterService, dialogForm, tabNames, consoleEvents, zacWrapperService) {
14409
+ super(filterService, svc, consoleEvents, dialogForm);
14410
+ this.svc = svc;
14411
+ this.tabNames = tabNames;
14412
+ this.zacWrapperService = zacWrapperService;
14413
+ this.serviceType = '';
14414
+ this.serviceRoleAttributes = [];
14415
+ this.identityRoleAttributes = [];
14416
+ this.formDataChanged = false;
14417
+ this.title = 'Manage Service Policies';
14418
+ let userLang = navigator.language || 'en-us';
14419
+ userLang = userLang.toLowerCase();
14420
+ }
14421
+ ngOnInit() {
14422
+ super.ngOnInit();
14423
+ this.getRoleAttributes();
14424
+ this.tabs = this.tabNames.getTabs('policies');
14425
+ }
14426
+ headerActionClicked(action) {
14427
+ switch (action) {
14428
+ case 'add':
14429
+ this.svc.serviceType = '';
14430
+ this.svc.openUpdate();
14431
+ break;
14432
+ case 'edit':
14433
+ this.svc.openUpdate();
14434
+ break;
14435
+ case 'delete':
14436
+ const selectedItems = this.rowData.filter((row) => {
14437
+ return row.selected;
14438
+ });
14439
+ const label = selectedItems.length > 1 ? 'services' : 'service';
14440
+ this.openBulkDelete(selectedItems, label);
14441
+ break;
14442
+ default:
14443
+ }
14444
+ }
14445
+ tableAction(event) {
14446
+ switch (event?.action) {
14447
+ case 'toggleAll':
14448
+ case 'toggleItem':
14449
+ this.itemToggled(event.item);
14450
+ break;
14451
+ case 'update':
14452
+ this.svc.serviceType = 'advanced';
14453
+ this.svc.openUpdate(event.item);
14454
+ break;
14455
+ case 'create':
14456
+ this.svc.openUpdate();
14457
+ break;
14458
+ case 'delete':
14459
+ this.deleteItem(event.item);
14460
+ break;
14461
+ case 'download-all':
14462
+ this.svc.downloadAllItems();
14463
+ break;
14464
+ case 'download-selected':
14465
+ this.svc.downloadItems(this.selectedItems);
14466
+ break;
14467
+ default:
14468
+ break;
14469
+ }
14470
+ }
14471
+ getRoleAttributes() {
14472
+ this.svc.getServiceRoleAttributes().then((result) => {
14473
+ this.serviceRoleAttributes = result.data;
14474
+ });
14475
+ this.svc.getIdentityRoleAttributes().then((result) => {
14476
+ this.identityRoleAttributes = result.data;
14477
+ });
14478
+ this.svc.getServiceNamedAttributes();
14479
+ this.svc.getIdentityNamedAttributes();
14480
+ this.svc.getPostureNamedAttributes();
14481
+ }
14482
+ deleteItem(item) {
14483
+ this.openBulkDelete([item], 'service-policies');
14484
+ }
14485
+ closeModal(event) {
14486
+ this.svc.sideModalOpen = false;
14487
+ if (event?.refresh) {
14488
+ this.refreshData();
14489
+ }
14490
+ }
14491
+ dataChanged(event) {
14492
+ this.formDataChanged = event;
14493
+ }
14494
+ serviceTypeSelected(event) {
14495
+ this.svc.serviceType = event;
14496
+ }
14497
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ServicePoliciesPageComponent, deps: [{ token: ServicePoliciesPageService }, { token: DataTableFilterService }, { token: i3$1.MatDialog }, { token: TabNameService }, { token: ConsoleEventsService }, { token: ZAC_WRAPPER_SERVICE }], target: i0.ɵɵFactoryTarget.Component }); }
14498
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ServicePoliciesPageComponent, selector: "lib-service-policies-page", usesInheritance: true, ngImport: i0, template: "<div class=\"ziti-page-container ziti-service-policies-container\">\n <lib-list-page-header [title]=\"title\"\n [tabs]=\"tabs\"\n [showAdd]=\"!itemsSelected\"\n (actionClicked)=\"headerActionClicked($event)\"></lib-list-page-header>\n\n <lib-data-table [tableId]=\"'configurations'\"\n [rowData]=\"rowData\"\n [columnDefinitions]=\"columnDefs\"\n (actionRequested)=\"tableAction($event)\"\n [startCount]=\"startCount\"\n [endCount]=\"endCount\"\n [totalCount]=\"totalCount\"\n [emptyMsg]=\"'No Service Policies defined, Click the plus to add a Service Policy.'\"\n [filterApplied]=\"filterApplied\"\n [menuItems]=\"svc.menuItems\"\n (gridReady)=\"gridReady($event)\"\n >\n </lib-data-table>\n\n <lib-side-modal [(open)]=\"svc.sideModalOpen\" [showClose]=\"false\">\n <lib-service-policy-form\n *ngIf=\"svc.sideModalOpen\"\n [formData]=\"svc.selectedServicePolicy\"\n [serviceRoleAttributes]=\"svc.serviceRoleAttributes\"\n [serviceNamedAttributes]=\"svc.serviceNamedAttributes\"\n [serviceNamedAttributesMap]=\"svc.serviceNamedAttributesMap\"\n [identityRoleAttributes]=\"svc.identityRoleAttributes\"\n [identityNamedAttributes]=\"svc.identityNamedAttributes\"\n [identityNamedAttributesMap]=\"svc.identityNamedAttributesMap\"\n [postureRoleAttributes]=\"svc.postureRoleAttributes\"\n [postureNamedAttributes]=\"svc.postureNamedAttributes\"\n [postureNamedAttributesMap]=\"svc.postureNamedAttributesMap\"\n (close)=\"closeModal($event)\"\n (dataChange)=\"dataChanged($event)\">\n </lib-service-policy-form>\n </lib-side-modal>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ListPageHeaderComponent, selector: "lib-list-page-header", inputs: ["title", "tabs", "showAdd", "hideAction"], outputs: ["actionClicked"] }, { kind: "component", type: DataTableComponent, selector: "lib-data-table", inputs: ["rowData", "expandRowData", "collapseRowData", "rowValidation", "isTimeSearchAvailable", "isLoading", "tableId", "options", "validateService", "rowsToggled", "tableRefreshCount", "view", "serverSideDataSource", "allowDownload", "startCount", "endCount", "totalCount", "emptyMsg", "filterApplied", "menuItems", "headerActions", "noItemsClass", "entityTypeName", "showNoItemsAdd", "currentPage", "noItemsImage", "columnDefinitions", "refreshCount"], outputs: ["actionRequested", "gridReady", "dragStart", "dragLeave", "pageChanged"] }, { kind: "component", type: SideModalComponent, selector: "lib-side-modal", inputs: ["showClose", "open"], outputs: ["openChange"] }, { kind: "component", type: ServicePolicyFormComponent, selector: "lib-service-policy-form", inputs: ["formData", "serviceRoleAttributes", "serviceNamedAttributes", "serviceNamedAttributesMap", "identityRoleAttributes", "identityNamedAttributes", "identityNamedAttributesMap", "postureRoleAttributes", "postureNamedAttributes", "postureNamedAttributesMap"], outputs: ["close"] }] }); }
14499
+ }
14500
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ServicePoliciesPageComponent, decorators: [{
14501
+ type: Component,
14502
+ args: [{ selector: 'lib-service-policies-page', template: "<div class=\"ziti-page-container ziti-service-policies-container\">\n <lib-list-page-header [title]=\"title\"\n [tabs]=\"tabs\"\n [showAdd]=\"!itemsSelected\"\n (actionClicked)=\"headerActionClicked($event)\"></lib-list-page-header>\n\n <lib-data-table [tableId]=\"'configurations'\"\n [rowData]=\"rowData\"\n [columnDefinitions]=\"columnDefs\"\n (actionRequested)=\"tableAction($event)\"\n [startCount]=\"startCount\"\n [endCount]=\"endCount\"\n [totalCount]=\"totalCount\"\n [emptyMsg]=\"'No Service Policies defined, Click the plus to add a Service Policy.'\"\n [filterApplied]=\"filterApplied\"\n [menuItems]=\"svc.menuItems\"\n (gridReady)=\"gridReady($event)\"\n >\n </lib-data-table>\n\n <lib-side-modal [(open)]=\"svc.sideModalOpen\" [showClose]=\"false\">\n <lib-service-policy-form\n *ngIf=\"svc.sideModalOpen\"\n [formData]=\"svc.selectedServicePolicy\"\n [serviceRoleAttributes]=\"svc.serviceRoleAttributes\"\n [serviceNamedAttributes]=\"svc.serviceNamedAttributes\"\n [serviceNamedAttributesMap]=\"svc.serviceNamedAttributesMap\"\n [identityRoleAttributes]=\"svc.identityRoleAttributes\"\n [identityNamedAttributes]=\"svc.identityNamedAttributes\"\n [identityNamedAttributesMap]=\"svc.identityNamedAttributesMap\"\n [postureRoleAttributes]=\"svc.postureRoleAttributes\"\n [postureNamedAttributes]=\"svc.postureNamedAttributes\"\n [postureNamedAttributesMap]=\"svc.postureNamedAttributesMap\"\n (close)=\"closeModal($event)\"\n (dataChange)=\"dataChanged($event)\">\n </lib-service-policy-form>\n </lib-side-modal>\n</div>\n" }]
14503
+ }], ctorParameters: function () { return [{ type: ServicePoliciesPageService }, { type: DataTableFilterService }, { type: i3$1.MatDialog }, { type: TabNameService }, { type: ConsoleEventsService }, { type: ZacWrapperServiceClass, decorators: [{
14504
+ type: Inject,
14505
+ args: [ZAC_WRAPPER_SERVICE]
14506
+ }] }]; } });
14507
+
14508
+ /*
14509
+ Copyright NetFoundry Inc.
14510
+
14511
+ Licensed under the Apache License, Version 2.0 (the "License");
14512
+ you may not use this file except in compliance with the License.
14513
+ You may obtain a copy of the License at
14514
+
14515
+ https://www.apache.org/licenses/LICENSE-2.0
14516
+
14517
+ Unless required by applicable law or agreed to in writing, software
14518
+ distributed under the License is distributed on an "AS IS" BASIS,
14519
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14520
+ See the License for the specific language governing permissions and
14521
+ limitations under the License.
14522
+ */
14523
+ function playerFactory() {
14524
+ return import(/* webpackChunkName: 'lottie-web' */ 'lottie-web');
14525
+ }
14526
+ class OpenZitiConsoleLibModule {
14527
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OpenZitiConsoleLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
14528
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: OpenZitiConsoleLibModule, declarations: [ZacWrapperComponent,
14529
+ SafePipe,
14530
+ ExtendableComponent,
14531
+ StringInputComponent,
14532
+ NumberInputComponent,
14533
+ BooleanToggleInputComponent,
14534
+ ObjectComponent,
14535
+ SelectorInputComponent,
14536
+ TextListInputComponent,
14537
+ CheckboxListInputComponent,
14538
+ ProtocolAddressPortInputComponent,
14539
+ SideToolbarComponent,
14540
+ SideNavbarComponent,
14541
+ SideBannerComponent,
14542
+ PasswordInputComponent,
14543
+ ConfigurationFormComponent,
14544
+ ConfigurationsPageComponent,
14545
+ ListPageHeaderComponent,
14546
+ FilterBarComponent,
14547
+ ListPageFormComponent,
14548
+ IdentitiesPageComponent,
14549
+ EdgeRoutersPageComponent,
14550
+ DataTableComponent,
14551
+ TableCellSelectComponent,
14552
+ TableColumnSelectComponent,
14553
+ TableCellMenuComponent,
14554
+ TableColumnMenuComponent,
14555
+ TableColumnDefaultComponent,
14556
+ TableColumnFilterComponent,
14557
+ IdentityFormComponent,
14558
+ EdgeRouterFormComponent,
14559
+ HiddenColumnsBarComponent,
14560
+ FilterBarComponent,
14561
+ ExtendableComponent,
14562
+ ConfirmComponent,
14563
+ NoItemsComponent,
14564
+ SideModalComponent,
14565
+ FormHeaderComponent,
14566
+ FormFieldContainerComponent,
14567
+ PreviewListComponent,
14568
+ LoadingIndicatorComponent,
14569
+ FormFieldToggleComponent,
14570
+ JsonViewComponent,
14571
+ TagSelectorComponent,
14572
+ QrCodeComponent,
14573
+ TableCellTokenComponent,
14574
+ OSTooltipComponent,
14575
+ SDKTooltipComponent,
14576
+ OverridesComponent,
14577
+ ResetEnrollmentComponent,
14578
+ IdentityServicePathComponent,
14579
+ CustomTagsComponent,
14580
+ ServicesPageComponent,
14581
+ ServiceFormComponent,
14582
+ PortRangesComponent,
14583
+ ForwardingConfigComponent,
14584
+ CardListComponent,
14585
+ SimpleServiceComponent,
14586
+ CardComponent,
14587
+ CreationSummaryDialogComponent,
14588
+ ConfigEditorComponent,
14589
+ ServicePoliciesPageComponent,
14590
+ ServicePolicyFormComponent,
14591
+ EdgeRouterPoliciesPageComponent], imports: [CommonModule,
14592
+ FormsModule,
14593
+ MatDialogModule,
14594
+ HttpClientModule,
14595
+ ZacRoutingModule,
14596
+ ChipsModule,
14597
+ CalendarModule,
14598
+ AgGridModule,
14599
+ QRCodeModule,
14600
+ ClickOutsideModule,
14601
+ NgJsonEditorModule,
14602
+ MatTooltipModule,
14603
+ MatAutocompleteModule, i1$2.LottieModule, DropdownModule], exports: [ZacWrapperComponent,
14604
+ ExtendableComponent,
14605
+ SideToolbarComponent,
14606
+ SideNavbarComponent,
14607
+ SideBannerComponent,
14608
+ StringInputComponent,
14609
+ SelectorInputComponent,
14610
+ PasswordInputComponent,
14611
+ NumberInputComponent,
14612
+ BooleanToggleInputComponent,
14613
+ ObjectComponent,
14614
+ TextListInputComponent,
14615
+ CheckboxListInputComponent,
14616
+ ProtocolAddressPortInputComponent,
14617
+ ConfigurationsPageComponent,
14618
+ ConfigurationFormComponent,
14619
+ EdgeRouterFormComponent,
14620
+ IdentitiesPageComponent,
14621
+ EdgeRoutersPageComponent,
14622
+ ServicesPageComponent,
14623
+ ZacRoutingModule,
14624
+ SideModalComponent,
14625
+ IdentityFormComponent,
14626
+ LoadingIndicatorComponent,
14627
+ GrowlerModule,
14628
+ FormFieldContainerComponent,
14629
+ FormFieldToggleComponent,
14630
+ ServiceFormComponent,
14631
+ ServicePoliciesPageComponent,
14632
+ ServicePolicyFormComponent,
14633
+ EdgeRouterPoliciesPageComponent] }); }
14634
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OpenZitiConsoleLibModule, providers: [
14635
+ { provide: SHAREDZ_EXTENSION, useClass: ExtensionsNoopService },
14636
+ { provide: ZITI_NAVIGATOR, useValue: {} },
14637
+ {
14638
+ provide: APP_INITIALIZER,
14639
+ useFactory: onAppInit,
14640
+ deps: [Injector],
14641
+ multi: true
14642
+ },
14643
+ ], imports: [CommonModule,
14644
+ FormsModule,
14645
+ MatDialogModule,
14646
+ HttpClientModule,
14647
+ ZacRoutingModule,
14648
+ ChipsModule,
14649
+ CalendarModule,
14650
+ AgGridModule,
14651
+ QRCodeModule,
14652
+ ClickOutsideModule,
14653
+ NgJsonEditorModule,
14654
+ MatTooltipModule,
14655
+ MatAutocompleteModule,
14656
+ LottieModule.forRoot({ player: playerFactory }),
14657
+ DropdownModule, ZacRoutingModule,
14658
+ GrowlerModule] }); }
14659
+ }
14660
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OpenZitiConsoleLibModule, decorators: [{
14661
+ type: NgModule,
14662
+ args: [{
14663
+ declarations: [
14664
+ ZacWrapperComponent,
14665
+ SafePipe,
14666
+ ExtendableComponent,
14667
+ StringInputComponent,
14668
+ NumberInputComponent,
14669
+ BooleanToggleInputComponent,
14670
+ ObjectComponent,
14671
+ SelectorInputComponent,
14672
+ TextListInputComponent,
14673
+ CheckboxListInputComponent,
14674
+ ProtocolAddressPortInputComponent,
14675
+ SideToolbarComponent,
14676
+ SideNavbarComponent,
14677
+ SideBannerComponent,
14678
+ PasswordInputComponent,
14679
+ ConfigurationFormComponent,
14680
+ ConfigurationsPageComponent,
14681
+ ListPageHeaderComponent,
14163
14682
  FilterBarComponent,
14164
14683
  ListPageFormComponent,
14165
14684
  IdentitiesPageComponent,
@@ -14204,7 +14723,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
14204
14723
  CreationSummaryDialogComponent,
14205
14724
  ConfigEditorComponent,
14206
14725
  ServicePoliciesPageComponent,
14207
- ServicePolicyFormComponent
14726
+ ServicePolicyFormComponent,
14727
+ EdgeRouterPoliciesPageComponent
14208
14728
  ],
14209
14729
  imports: [
14210
14730
  CommonModule,
@@ -14253,7 +14773,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
14253
14773
  FormFieldToggleComponent,
14254
14774
  ServiceFormComponent,
14255
14775
  ServicePoliciesPageComponent,
14256
- ServicePolicyFormComponent
14776
+ ServicePolicyFormComponent,
14777
+ EdgeRouterPoliciesPageComponent
14257
14778
  ],
14258
14779
  providers: [
14259
14780
  { provide: SHAREDZ_EXTENSION, useClass: ExtensionsNoopService },
@@ -14269,7 +14790,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
14269
14790
  }] });
14270
14791
 
14271
14792
  const VERSION = {
14272
- "version": "3.3.0"
14793
+ "version": "3.3.1"
14273
14794
  };
14274
14795
 
14275
14796
  /*
@@ -15325,6 +15846,8 @@ class NodeDataService extends ZitiDataService {
15325
15846
  get(type, paging, filters = [], url) {
15326
15847
  const nodeServerURL = window.location.origin;
15327
15848
  const serviceUrl = nodeServerURL + '/api/data';
15849
+ const urlFilter = this.getUrlFilter(paging, filters);
15850
+ paging.filter = urlFilter;
15328
15851
  const body = { paging: paging, type: type, url: url };
15329
15852
  return firstValueFrom(this.httpClient.post(serviceUrl, body, {}).pipe(catchError((err) => {
15330
15853
  const error = "Server Not Accessible";
@@ -15332,19 +15855,7 @@ class NodeDataService extends ZitiDataService {
15332
15855
  throw ({ error: err.code });
15333
15856
  throw ({ error: error });
15334
15857
  }), map((results) => {
15335
- if (filters.length > 0) {
15336
- filters.forEach((filter) => {
15337
- let newData = [];
15338
- if (filter.columnId !== 'name' && !isEmpty(filter.value)) {
15339
- results.data.forEach(row => {
15340
- if (get(row, filter.columnId)?.indexOf(filter.value) >= 0)
15341
- newData.push(row);
15342
- });
15343
- results.data = newData;
15344
- }
15345
- });
15346
- }
15347
- else if (results.error) {
15858
+ if (results.error) {
15348
15859
  this.handleError(results);
15349
15860
  }
15350
15861
  return results;
@@ -15491,10 +16002,13 @@ class NodeDataService extends ZitiDataService {
15491
16002
  return schema.result;
15492
16003
  });
15493
16004
  }
15494
- getUrlFilter(paging) {
16005
+ getUrlFilter(paging, filters) {
15495
16006
  let urlFilter = '';
15496
16007
  let toSearchOn = "name";
15497
- let noSearch = false;
16008
+ let noSearch = filters?.length <= 0;
16009
+ if (isEmpty(paging)) {
16010
+ paging = {};
16011
+ }
15498
16012
  if (paging && paging.sort != null) {
15499
16013
  if (paging.searchOn)
15500
16014
  toSearchOn = paging.searchOn;
@@ -15502,23 +16016,57 @@ class NodeDataService extends ZitiDataService {
15502
16016
  noSearch = true;
15503
16017
  if (!paging.filter)
15504
16018
  paging.filter = "";
15505
- paging.filter = paging.filter.split('#').join('');
15506
- if (noSearch) {
15507
- if (paging.page !== -1)
15508
- urlFilter = "?limit=" + paging.total + "&offset=" + ((paging.page - 1) * paging.total) + "&sort=" + paging.sort + " " + paging.order;
16019
+ if (!isArray(paging.filter) && isNaN(paging.filter)) {
16020
+ paging.filter = paging.filter.split('#').join('');
16021
+ }
16022
+ }
16023
+ filters.forEach((filter, index) => {
16024
+ let filterVal = '';
16025
+ switch (filter.type) {
16026
+ case 'TEXTINPUT':
16027
+ filterVal = `${filter.columnId} contains "${filter.value}"`;
16028
+ break;
16029
+ case 'SELECT':
16030
+ case 'COMBO':
16031
+ const val = isNumber(filter.value) ? `${filter.value}` : `"${filter.value}"`;
16032
+ filterVal = `${filter.columnId} = ${val}`;
16033
+ break;
16034
+ case 'DATETIME':
16035
+ paging.rawFilter = true;
16036
+ filterVal = `${filter.columnId} >= datetime(${filter.value[0]}) and ${filter.columnId} <= datetime(${filter.value[1]})`;
16037
+ break;
16038
+ case 'ATTRIBUTE':
16039
+ paging.rawFilter = true;
16040
+ filterVal = this.getAttributeFilter(filter.value, filter.columnId);
16041
+ break;
16042
+ default:
16043
+ filterVal = `${filter.columnId} contains "${filter.value}"`;
16044
+ break;
16045
+ }
16046
+ if (index <= 0) {
16047
+ urlFilter = `${filterVal}`;
15509
16048
  }
15510
16049
  else {
15511
- if (paging.page !== -1)
15512
- urlFilter = "?filter=(" + toSearchOn + " contains \"" + paging.filter + "\")&limit=" + paging.total + "&offset=" + ((paging.page - 1) * paging.total) + "&sort=" + paging.sort + " " + paging.order;
15513
- if (paging.params) {
15514
- for (const key in paging.params) {
15515
- urlFilter += ((urlFilter.length === 0) ? "?" : "&") + key + "=" + paging.params[key];
15516
- }
15517
- }
16050
+ urlFilter += ` and ${filterVal}`;
15518
16051
  }
15519
- }
16052
+ });
15520
16053
  return urlFilter;
15521
16054
  }
16055
+ getAttributeFilter(val, columnId) {
16056
+ let filter = '';
16057
+ if (isArray(val)) {
16058
+ val.forEach((attr, index) => {
16059
+ if (index > 0) {
16060
+ filter += ' or ';
16061
+ }
16062
+ filter += `anyOf(${columnId}) = "${attr}"`;
16063
+ });
16064
+ }
16065
+ else {
16066
+ filter = `anyOf(${columnId}) = "${val}"`;
16067
+ }
16068
+ return filter;
16069
+ }
15522
16070
  handleError(results) {
15523
16071
  if (results?.errorObj?.code === 'UNAUTHORIZED') {
15524
16072
  localStorage.removeItem('ziti.settings');
@@ -15809,5 +16357,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
15809
16357
  * Generated bundle index. Do not edit.
15810
16358
  */
15811
16359
 
15812
- export { BooleanToggleInputComponent, COMPONENTS, CheckboxListInputComponent, ConfigurationFormComponent, ConfigurationsPageComponent, CsvDownloadService, DEACTIVATE_GUARD, DeactivateGuardService, EDGE_ROUTER_EXTENSION_SERVICE, EdgeRouter, EdgeRouterFormComponent, EdgeRouterFormService, EdgeRoutersPageComponent, EdgeRoutersPageService, ExtendableComponent, ExtensionsNoopService, FormFieldContainerComponent, FormFieldToggleComponent, FormHeaderComponent, GrowlerComponent, GrowlerModel, GrowlerModule, GrowlerService, IDENTITY_EXTENSION_SERVICE, IdentitiesPageComponent, IdentitiesPageService, Identity, IdentityFormComponent, IdentityFormService, ListPageComponent, ListPageServiceClass, LoadingIndicatorComponent, LoggerService, LoginServiceClass, NodeDataService, NodeWrapperService, NoopLoginService, NoopTabInterceptorService, NumberInputComponent, ObjectComponent, OpenZitiConsoleLibModule, PasswordInputComponent, ProjectableForm, ProtocolAddressPortInputComponent, ResetEnrollmentService, SERVICE_EXTENSION_SERVICE, SERVICE_POLICY_EXTENSION_SERVICE, SETTINGS_SERVICE, SHAREDZ_EXTENSION, SelectorInputComponent, ServiceFormComponent, ServiceFormService, ServicePoliciesPageComponent, ServicePoliciesPageService, ServicePolicyFormComponent, ServicePolicyFormService, ServicesPageComponent, ServicesPageService, SettingsService, SettingsServiceClass, SideBannerComponent, SideModalComponent, SideNavbarComponent, SideToolbarComponent, StringInputComponent, TabNameService, TextListInputComponent, VERSION, ZAC_LOGIN_SERVICE, ZAC_WRAPPER_SERVICE, ZITI_DATA_SERVICE, ZITI_DOMAIN_CONTROLLER, ZITI_NAVIGATOR, ZITI_TAB_OVERRIDES, ZITI_URLS, ZacRoutingModule, ZacWrapperComponent, ZacWrapperService, ZacWrapperServiceClass, ZitiControllerDataService, ZitiDataService, playerFactory };
16360
+ export { BooleanToggleInputComponent, COMPONENTS, CheckboxListInputComponent, ConfigurationFormComponent, ConfigurationsPageComponent, CsvDownloadService, DEACTIVATE_GUARD, DeactivateGuardService, EDGE_ROUTER_EXTENSION_SERVICE, EdgeRouter, EdgeRouterFormComponent, EdgeRouterFormService, EdgeRouterPoliciesPageComponent, EdgeRouterPoliciesPageService, EdgeRoutersPageComponent, EdgeRoutersPageService, ExtendableComponent, ExtensionsNoopService, FormFieldContainerComponent, FormFieldToggleComponent, FormHeaderComponent, GrowlerComponent, GrowlerModel, GrowlerModule, GrowlerService, IDENTITY_EXTENSION_SERVICE, IdentitiesPageComponent, IdentitiesPageService, Identity, IdentityFormComponent, IdentityFormService, ListPageComponent, ListPageServiceClass, LoadingIndicatorComponent, LoggerService, LoginServiceClass, NodeDataService, NodeWrapperService, NoopLoginService, NoopTabInterceptorService, NumberInputComponent, ObjectComponent, OpenZitiConsoleLibModule, PasswordInputComponent, ProjectableForm, ProtocolAddressPortInputComponent, ResetEnrollmentService, SERVICE_EXTENSION_SERVICE, SERVICE_POLICY_EXTENSION_SERVICE, SETTINGS_SERVICE, SHAREDZ_EXTENSION, SelectorInputComponent, ServiceFormComponent, ServiceFormService, ServicePoliciesPageComponent, ServicePoliciesPageService, ServicePolicyFormComponent, ServicePolicyFormService, ServicesPageComponent, ServicesPageService, SettingsService, SettingsServiceClass, SideBannerComponent, SideModalComponent, SideNavbarComponent, SideToolbarComponent, StringInputComponent, TabNameService, TextListInputComponent, VERSION, ZAC_LOGIN_SERVICE, ZAC_WRAPPER_SERVICE, ZITI_DATA_SERVICE, ZITI_DOMAIN_CONTROLLER, ZITI_NAVIGATOR, ZITI_TAB_OVERRIDES, ZITI_URLS, ZacRoutingModule, ZacWrapperComponent, ZacWrapperService, ZacWrapperServiceClass, ZitiControllerDataService, ZitiDataService, playerFactory };
15813
16361
  //# sourceMappingURL=openziti-ziti-console-lib.mjs.map