From f8a480b84b83dca9cf6a02ee48636194b0492cf6 Mon Sep 17 00:00:00 2001 From: Jeremy Mitchell Date: Thu, 2 Mar 2017 21:55:34 -0700 Subject: [PATCH 01/14] adds tooltips and cleaner buttons --- .../form.deliveryService.tpl.html | 9 +++++---- .../modules/form/division/form.division.tpl.html | 12 ++++++++++-- .../form/parameter/form.parameter.tpl.html | 10 +++++++++- .../form/physLocation/form.physLocation.tpl.html | 12 ++++++++++-- .../modules/form/profile/form.profile.tpl.html | 4 ++-- .../modules/form/region/form.region.tpl.html | 12 ++++++++++-- .../modules/form/status/form.status.tpl.html | 10 +++++++++- .../common/modules/form/type/form.type.tpl.html | 16 ++++++++++++---- .../common/modules/form/user/form.user.tpl.html | 12 ++++++++++-- .../modules/navigation/navigation.tpl.html | 2 +- .../modules/table/asns/table.asns.tpl.html | 4 ++-- .../cacheGroupAsns/table.cacheGroupAsns.tpl.html | 2 +- .../table.cacheGroupParameters.tpl.html | 4 ++-- .../table.cacheGroupServers.tpl.html | 2 +- .../table.cacheGroupStaticDnsEntries.tpl.html | 2 +- .../table.cdnDeliveryServices.tpl.html | 2 +- .../modules/table/cdns/table.cdns.tpl.html | 4 ++-- .../table.deliveryServiceRegexes.tpl.html | 4 ++-- .../table.deliveryServiceServers.tpl.html | 8 +++----- ...able.deliveryServiceStaticDnsEntries.tpl.html | 2 +- .../table.deliveryServiceUsers.tpl.html | 2 +- .../table.deliveryServices.tpl.html | 4 ++-- .../table.divisionRegions.tpl.html | 2 +- .../table/divisions/table.divisions.tpl.html | 4 ++-- .../table.parameterProfiles.tpl.html | 6 +++--- .../table/parameters/table.parameters.tpl.html | 4 ++-- .../table.physLocationServers.tpl.html | 2 +- .../physLocations/table.physLocations.tpl.html | 4 ++-- .../table.profileParameters.tpl.html | 6 +++--- .../profileServers/table.profileServers.tpl.html | 4 ++-- .../table/profiles/table.profiles.tpl.html | 4 ++-- .../table.regionPhysLocations.tpl.html | 2 +- .../modules/table/regions/table.regions.tpl.html | 4 ++-- .../table.serverDeliveryServices.tpl.html | 6 +++--- .../modules/table/servers/table.servers.tpl.html | 2 +- .../statusServers/table.statusServers.tpl.html | 4 ++-- .../table/statuses/table.statuses.tpl.html | 4 ++-- .../modules/table/tenants/table.tenants.tpl.html | 2 +- .../table.typeCacheGroups.tpl.html | 2 +- .../table.typeDeliveryServices.tpl.html | 2 +- .../table/typeServers/table.typeServers.tpl.html | 4 ++-- .../table.typeStaticDnsEntries.tpl.html | 2 +- .../modules/table/types/table.types.tpl.html | 4 ++-- .../table.userDeliveryServices.tpl.html | 6 +++--- .../modules/table/users/table.users.tpl.html | 4 ++-- 45 files changed, 139 insertions(+), 84 deletions(-) diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/deliveryService/form.deliveryService.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/deliveryService/form.deliveryService.tpl.html index 6062f63e57..8024dede9e 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/deliveryService/form.deliveryService.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/deliveryService/form.deliveryService.tpl.html @@ -24,19 +24,20 @@
  • {{deliveryServiceName}}
  • - - +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/division/form.division.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/division/form.division.tpl.html index f0001e13bb..983d9ac6ae 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/division/form.division.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/division/form.division.tpl.html @@ -23,8 +23,16 @@
  • Divisions
  • {{divisionName}}
  • -
    - +
    +
    + + +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/parameter/form.parameter.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/parameter/form.parameter.tpl.html index e38a3f1032..caa2fdceb9 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/parameter/form.parameter.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/parameter/form.parameter.tpl.html @@ -24,7 +24,15 @@
  • {{parameterName}}
  • - +
    + + +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/physLocation/form.physLocation.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/physLocation/form.physLocation.tpl.html index e3ebad33b5..baaf28f2c8 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/physLocation/form.physLocation.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/physLocation/form.physLocation.tpl.html @@ -23,8 +23,16 @@
  • Physical Locations
  • {{physLocationName}}
  • -
    - +
    +
    + + +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/profile/form.profile.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/profile/form.profile.tpl.html index 3e314d233f..06473c9557 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/profile/form.profile.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/profile/form.profile.tpl.html @@ -24,8 +24,8 @@
  • {{profileName}}
  • - - + +
    +
    +
    + + +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/status/form.status.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/status/form.status.tpl.html index d1ac71cb61..8cfa805d0c 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/status/form.status.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/status/form.status.tpl.html @@ -24,7 +24,15 @@
  • {{statusName}}
  • - +
    + + +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/type/form.type.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/type/form.type.tpl.html index f9a99b9d7e..d09bb7dfac 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/type/form.type.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/type/form.type.tpl.html @@ -24,10 +24,18 @@
  • {{typeName}}
  • - - - - +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/user/form.user.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/user/form.user.tpl.html index da388b5d6e..ba333d2427 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/user/form.user.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/user/form.user.tpl.html @@ -24,8 +24,16 @@
  • Users
  • {{userName}}
  • -
    - +
    +
    + + +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/navigation/navigation.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/navigation/navigation.tpl.html index 19307583b3..0452689bbc 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/navigation/navigation.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/navigation/navigation.tpl.html @@ -44,7 +44,7 @@
  • ASNs
  • CDNs
  • Divisions
  • -
  • Phys Locations
  • +
  • Phys Locations
  • Parameters
  • Profiles
  • Regions
  • diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/asns/table.asns.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/asns/table.asns.tpl.html index 007d59017d..db51b17ca7 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/asns/table.asns.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/asns/table.asns.tpl.html @@ -23,8 +23,8 @@
  • ASNs
  • - - + +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupAsns/table.cacheGroupAsns.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupAsns/table.cacheGroupAsns.tpl.html index 141d2cc74e..8dcb2d3d1f 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupAsns/table.cacheGroupAsns.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupAsns/table.cacheGroupAsns.tpl.html @@ -25,7 +25,7 @@
  • ASNs
  • - +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupParameters/table.cacheGroupParameters.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupParameters/table.cacheGroupParameters.tpl.html index d111fc01b3..282d7a3d86 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupParameters/table.cacheGroupParameters.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupParameters/table.cacheGroupParameters.tpl.html @@ -25,8 +25,8 @@
  • Parameters
  • - - + +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/table.cacheGroupServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/table.cacheGroupServers.tpl.html index 004ab39291..6044d28a71 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/table.cacheGroupServers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/table.cacheGroupServers.tpl.html @@ -27,7 +27,7 @@
    - +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupStaticDnsEntries/table.cacheGroupStaticDnsEntries.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupStaticDnsEntries/table.cacheGroupStaticDnsEntries.tpl.html index 320e16d6a1..9032cc9a81 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupStaticDnsEntries/table.cacheGroupStaticDnsEntries.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupStaticDnsEntries/table.cacheGroupStaticDnsEntries.tpl.html @@ -25,7 +25,7 @@
  • Static DNS Entries
  • - +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cdnDeliveryServices/table.cdnDeliveryServices.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnDeliveryServices/table.cdnDeliveryServices.tpl.html index 0745b66b66..6237660c6c 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/cdnDeliveryServices/table.cdnDeliveryServices.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnDeliveryServices/table.cdnDeliveryServices.tpl.html @@ -25,7 +25,7 @@
  • Delivery Services
  • - +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cdns/table.cdns.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/cdns/table.cdns.tpl.html index 9997811579..c9d88279fd 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/cdns/table.cdns.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cdns/table.cdns.tpl.html @@ -23,8 +23,8 @@
  • CDNs
  • - - + +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceRegexes/table.deliveryServiceRegexes.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceRegexes/table.deliveryServiceRegexes.tpl.html index 74112cefef..b1f6816d63 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceRegexes/table.deliveryServiceRegexes.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceRegexes/table.deliveryServiceRegexes.tpl.html @@ -25,8 +25,8 @@
  • Regexes
  • - - + +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceServers/table.deliveryServiceServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceServers/table.deliveryServiceServers.tpl.html index dd02269f06..2aa7653471 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceServers/table.deliveryServiceServers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceServers/table.deliveryServiceServers.tpl.html @@ -25,8 +25,8 @@
  • Servers
  • - - + +
    @@ -35,7 +35,6 @@ - @@ -53,7 +52,6 @@ - @@ -66,7 +64,7 @@ - +
    Update? hostName domainName cdn
    {{server.updPending}} {{server.hostName}} {{server.domainName}} {{server.cdnName}}{{server.profile}} {{server.iloIpAddress}} {{server.iloIpGateway}}
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceStaticDnsEntries/table.deliveryServiceStaticDnsEntries.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceStaticDnsEntries/table.deliveryServiceStaticDnsEntries.tpl.html index 57363c5d28..7fc0eb6935 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceStaticDnsEntries/table.deliveryServiceStaticDnsEntries.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceStaticDnsEntries/table.deliveryServiceStaticDnsEntries.tpl.html @@ -25,7 +25,7 @@
  • Static DNS Entries
  • - +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceUsers/table.deliveryServiceUsers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceUsers/table.deliveryServiceUsers.tpl.html index da12f86f18..cfc02ead5e 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceUsers/table.deliveryServiceUsers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceUsers/table.deliveryServiceUsers.tpl.html @@ -25,7 +25,7 @@
  • Users
  • - +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServices/table.deliveryServices.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServices/table.deliveryServices.tpl.html index f69398fe87..63d25538bf 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServices/table.deliveryServices.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServices/table.deliveryServices.tpl.html @@ -23,8 +23,8 @@
  • Delivery Services
  • - - + +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/divisionRegions/table.divisionRegions.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/divisionRegions/table.divisionRegions.tpl.html index a40112550d..70183d2ad4 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/divisionRegions/table.divisionRegions.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/divisionRegions/table.divisionRegions.tpl.html @@ -25,7 +25,7 @@
  • Regions
  • - +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/divisions/table.divisions.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/divisions/table.divisions.tpl.html index 7c17e52d46..d1406f899c 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/divisions/table.divisions.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/divisions/table.divisions.tpl.html @@ -23,8 +23,8 @@
  • Divisions
  • - - + +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/parameterProfiles/table.parameterProfiles.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/parameterProfiles/table.parameterProfiles.tpl.html index 26d3bf739c..2c946819c6 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/parameterProfiles/table.parameterProfiles.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/parameterProfiles/table.parameterProfiles.tpl.html @@ -25,8 +25,8 @@
  • Profiles
  • - - + +
    @@ -44,7 +44,7 @@ {{parameterProfile.name}} {{parameterProfile.description}} - + diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/parameters/table.parameters.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/parameters/table.parameters.tpl.html index 00df10327d..c17546e2c5 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/parameters/table.parameters.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/parameters/table.parameters.tpl.html @@ -23,8 +23,8 @@
  • Parameters
  • - - + +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/physLocationServers/table.physLocationServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/physLocationServers/table.physLocationServers.tpl.html index d31fac63ca..ffe90e73ac 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/physLocationServers/table.physLocationServers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/physLocationServers/table.physLocationServers.tpl.html @@ -25,7 +25,7 @@
  • Servers
  • - +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/physLocations/table.physLocations.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/physLocations/table.physLocations.tpl.html index 2281587e85..c636bb0a1b 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/physLocations/table.physLocations.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/physLocations/table.physLocations.tpl.html @@ -23,8 +23,8 @@
  • Physical Locations
  • - - + +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/profileParameters/table.profileParameters.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/profileParameters/table.profileParameters.tpl.html index f9da5e9b04..7db87be3cf 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/profileParameters/table.profileParameters.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/profileParameters/table.profileParameters.tpl.html @@ -25,8 +25,8 @@
  • Parameters
  • - - + +
    @@ -48,7 +48,7 @@ {{parameter.name}} {{parameter.configFile}} {{parameter.value}} - + diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/profileServers/table.profileServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/profileServers/table.profileServers.tpl.html index d2ce979e35..05b7f1863b 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/profileServers/table.profileServers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/profileServers/table.profileServers.tpl.html @@ -25,7 +25,7 @@
  • Servers
  • - +
    @@ -51,7 +51,7 @@ - {{server.updPending}} + {{server.hostName}} {{server.domainName}} {{server.cdnName}} diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/profiles/table.profiles.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/profiles/table.profiles.tpl.html index 27ccd769b2..9d7b497ea8 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/profiles/table.profiles.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/profiles/table.profiles.tpl.html @@ -23,8 +23,8 @@
  • Profiles
  • - - + +
    +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/regions/table.regions.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/regions/table.regions.tpl.html index b1882d1879..8dde63f206 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/regions/table.regions.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/regions/table.regions.tpl.html @@ -23,8 +23,8 @@
  • Regions
  • - - + +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/serverDeliveryServices/table.serverDeliveryServices.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/serverDeliveryServices/table.serverDeliveryServices.tpl.html index ad032b2cbd..3761a88973 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/serverDeliveryServices/table.serverDeliveryServices.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/serverDeliveryServices/table.serverDeliveryServices.tpl.html @@ -25,8 +25,8 @@
  • Delivery Services
  • - - + +
    + diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/servers/table.servers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/servers/table.servers.tpl.html index df95acd644..982444d0c2 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/servers/table.servers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/servers/table.servers.tpl.html @@ -24,7 +24,7 @@
    - +
    +
    @@ -51,7 +51,7 @@ - {{server.updPending}} + {{server.hostName}} {{server.domainName}} {{server.cdnName}} diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/statuses/table.statuses.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/statuses/table.statuses.tpl.html index 0978eace14..5feaa3d33a 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/statuses/table.statuses.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/statuses/table.statuses.tpl.html @@ -23,8 +23,8 @@
  • Statuses
  • - - + +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/tenants/table.tenants.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/tenants/table.tenants.tpl.html index 4b4b561782..f8155e4069 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/tenants/table.tenants.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/tenants/table.tenants.tpl.html @@ -23,7 +23,7 @@
  • Tenants
  • - +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/typeCacheGroups/table.typeCacheGroups.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/typeCacheGroups/table.typeCacheGroups.tpl.html index aee9b08286..c38eefbc3f 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/typeCacheGroups/table.typeCacheGroups.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/typeCacheGroups/table.typeCacheGroups.tpl.html @@ -25,7 +25,7 @@
  • Cache Groups
  • - +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/typeDeliveryServices/table.typeDeliveryServices.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/typeDeliveryServices/table.typeDeliveryServices.tpl.html index 48af88cddc..cac9df05e4 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/typeDeliveryServices/table.typeDeliveryServices.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/typeDeliveryServices/table.typeDeliveryServices.tpl.html @@ -25,7 +25,7 @@
  • Delivery Services
  • - +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/typeServers/table.typeServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/typeServers/table.typeServers.tpl.html index 9fe29e7b56..49e5ced769 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/typeServers/table.typeServers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/typeServers/table.typeServers.tpl.html @@ -25,7 +25,7 @@
  • Servers
  • - +
    @@ -51,7 +51,7 @@ - {{server.updPending}} + {{server.hostName}} {{server.domainName}} {{server.cdnName}} diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/typeStaticDnsEntries/table.typeStaticDnsEntries.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/typeStaticDnsEntries/table.typeStaticDnsEntries.tpl.html index 15f18f64dc..f94828345c 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/typeStaticDnsEntries/table.typeStaticDnsEntries.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/typeStaticDnsEntries/table.typeStaticDnsEntries.tpl.html @@ -25,7 +25,7 @@
  • Static DNS Entries
  • - +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/types/table.types.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/types/table.types.tpl.html index 7d3a8f77ae..6d9f3da2b8 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/types/table.types.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/types/table.types.tpl.html @@ -23,8 +23,8 @@
  • Types
  • - - + +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/userDeliveryServices/table.userDeliveryServices.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/userDeliveryServices/table.userDeliveryServices.tpl.html index a242da52c1..f265854c18 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/userDeliveryServices/table.userDeliveryServices.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/userDeliveryServices/table.userDeliveryServices.tpl.html @@ -25,8 +25,8 @@
  • Delivery Services
  • - - + +
    @@ -46,7 +46,7 @@ {{deliveryService.xmlId}} {{deliveryService.orgServerFqdn}} {{deliveryService.cdnName}} - + diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/users/table.users.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/users/table.users.tpl.html index 2f6389449d..55a19f99d0 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/users/table.users.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/users/table.users.tpl.html @@ -23,8 +23,8 @@
  • Users
  • - - + +
    From d511897850b556534e3c26853e98f62c4f49cf3b Mon Sep 17 00:00:00 2001 From: Jeremy Mitchell Date: Fri, 3 Mar 2017 08:13:48 -0700 Subject: [PATCH 02/14] adds flag / ban icons to server table for updates --- .../ui/app/src/common/modules/table/_table.scss | 6 ++++++ .../cacheGroupServers/table.cacheGroupServers.tpl.html | 7 +++++-- .../modules/table/cdnServers/table.cdnServers.tpl.html | 7 +++++-- .../table.deliveryServiceServers.tpl.html | 5 +++++ .../physLocationServers/table.physLocationServers.tpl.html | 5 +++++ .../table/profileServers/table.profileServers.tpl.html | 5 ++++- .../common/modules/table/servers/table.servers.tpl.html | 7 +++++-- .../table/statusServers/table.statusServers.tpl.html | 5 ++++- .../modules/table/typeServers/table.typeServers.tpl.html | 5 ++++- traffic_ops/experimental/ui/app/src/styles/main.scss | 1 + 10 files changed, 44 insertions(+), 9 deletions(-) create mode 100644 traffic_ops/experimental/ui/app/src/common/modules/table/_table.scss diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/_table.scss b/traffic_ops/experimental/ui/app/src/common/modules/table/_table.scss new file mode 100644 index 0000000000..11fe4af287 --- /dev/null +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/_table.scss @@ -0,0 +1,6 @@ +.update-column { + text-align: center; + .fa-flag { + font-weight: bold; + } +} \ No newline at end of file diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/table.cacheGroupServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/table.cacheGroupServers.tpl.html index 6044d28a71..b14697209d 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/table.cacheGroupServers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/table.cacheGroupServers.tpl.html @@ -36,7 +36,7 @@ - + @@ -53,7 +53,10 @@ - + diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html index a9925da527..9189f43206 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html @@ -36,7 +36,7 @@
    Update? hostName domainName cdn
    + + + {{server.hostName}} {{server.domainName}} {{server.cdnName}}
    - + @@ -53,7 +53,10 @@ - + diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceServers/table.deliveryServiceServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceServers/table.deliveryServiceServers.tpl.html index 2aa7653471..e3a9481b08 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceServers/table.deliveryServiceServers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceServers/table.deliveryServiceServers.tpl.html @@ -35,6 +35,7 @@
    Update? hostName domainName cdn
    + + + {{server.hostName}} {{server.domainName}} {{server.cdnName}}
    + @@ -52,6 +53,10 @@ + diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/physLocationServers/table.physLocationServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/physLocationServers/table.physLocationServers.tpl.html index ffe90e73ac..bef4077817 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/physLocationServers/table.physLocationServers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/physLocationServers/table.physLocationServers.tpl.html @@ -34,6 +34,7 @@
    Update? hostName domainName cdn
    + + + {{server.hostName}} {{server.domainName}} {{server.cdnName}}
    + @@ -50,6 +51,10 @@ + diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/profileServers/table.profileServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/profileServers/table.profileServers.tpl.html index 05b7f1863b..e94b6192e9 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/profileServers/table.profileServers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/profileServers/table.profileServers.tpl.html @@ -51,7 +51,10 @@ - + diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/servers/table.servers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/servers/table.servers.tpl.html index 982444d0c2..137f046312 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/servers/table.servers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/servers/table.servers.tpl.html @@ -42,7 +42,7 @@
    Update? hostName domainName cdn
    + + + {{server.hostName}} {{server.domainName}} {{server.cdnName}}
    + + + {{server.hostName}} {{server.domainName}} {{server.cdnName}}
    - + @@ -59,7 +59,10 @@ - + diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/statusServers/table.statusServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/statusServers/table.statusServers.tpl.html index 5a7300e723..815d82faae 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/statusServers/table.statusServers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/statusServers/table.statusServers.tpl.html @@ -51,7 +51,10 @@ - + diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/typeServers/table.typeServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/typeServers/table.typeServers.tpl.html index 49e5ced769..99ab56a4bc 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/typeServers/table.typeServers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/typeServers/table.typeServers.tpl.html @@ -51,7 +51,10 @@ - + diff --git a/traffic_ops/experimental/ui/app/src/styles/main.scss b/traffic_ops/experimental/ui/app/src/styles/main.scss index 653e961491..19d70cecb6 100755 --- a/traffic_ops/experimental/ui/app/src/styles/main.scss +++ b/traffic_ops/experimental/ui/app/src/styles/main.scss @@ -31,6 +31,7 @@ $fa-font-path: "../assets/fonts"; @import "../common/modules/header/header"; @import "../common/modules/message/message"; @import "../common/modules/navigation/navigation"; +@import "../common/modules/table/table"; @import "../common/modules/release/release"; // public From afad1fdbacb210535246f7c5bce28222da647e48 Mon Sep 17 00:00:00 2001 From: Jeremy Mitchell Date: Fri, 10 Mar 2017 11:10:51 -0700 Subject: [PATCH 03/14] adds cdn domain name --- .../modules/form/cdn/FormCDNController.js | 6 ------ .../common/modules/form/cdn/form.cdn.tpl.html | 21 +++++++++++++------ .../modules/table/cdns/table.cdns.tpl.html | 2 ++ 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/FormCDNController.js b/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/FormCDNController.js index d71e8efca6..28fc0c4cb9 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/FormCDNController.js +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/FormCDNController.js @@ -21,12 +21,6 @@ var FormCDNController = function(cdn, $scope, $location, formUtils, stringUtils, $scope.cdn = cdn; - $scope.props = [ - { name: 'name', type: 'text', required: true, maxLength: 45 } - ]; - - $scope.labelize = stringUtils.labelize; - $scope.falseTrue = [ { value: false, label: 'false' }, { value: true, label: 'true' } diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html index ef2822dc92..0dae223cfe 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html @@ -47,13 +47,22 @@

    -
    - +
    +
    - - Required - Too Long - + + Required + Too Long + +
    +
    +
    + +
    + + Required + Too Long +
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cdns/table.cdns.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/cdns/table.cdns.tpl.html index c9d88279fd..9199b5511d 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/cdns/table.cdns.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cdns/table.cdns.tpl.html @@ -34,12 +34,14 @@
    + + From da9fdfaa667df5d042719e06a25e75a38ea76605 Mon Sep 17 00:00:00 2001 From: Jeremy Mitchell Date: Fri, 10 Mar 2017 13:57:08 -0700 Subject: [PATCH 04/14] adds cdn and type to profiles --- .../form/profile/FormProfileController.js | 35 +++++++++++++++---- .../form/profile/form.profile.tpl.html | 30 ++++++++++++---- .../table/profiles/table.profiles.tpl.html | 4 +++ 3 files changed, 57 insertions(+), 12 deletions(-) diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/profile/FormProfileController.js b/traffic_ops/experimental/ui/app/src/common/modules/form/profile/FormProfileController.js index 14822d8a1c..67755fdfdc 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/profile/FormProfileController.js +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/profile/FormProfileController.js @@ -17,16 +17,34 @@ * under the License. */ -var FormProfileController = function(profile, $scope, $location, formUtils, stringUtils, locationUtils) { +var FormProfileController = function(profile, $scope, $location, formUtils, locationUtils, cdnService) { + + var getCDNs = function() { + cdnService.getCDNs() + .then(function(result) { + $scope.cdns = result; + }); + }; $scope.profile = profile; - $scope.props = [ - { name: 'name', type: 'text', required: true, maxLength: 45 } + $scope.types = [ + { value: 'ATS_PROFILE' }, + { value: 'TR_PROFILE' }, + { value: 'TM_PROFILE' }, + { value: 'TS_PROFILE' }, + { value: 'TP_PROFILE' }, + { value: 'INFLUXDB_PROFILE' }, + { value: 'RIAK_PROFILE' }, + { value: 'SPLUNK_PROFILE' }, + { value: 'DS_PROFILE' }, + { value: 'ORG_PROFILE' }, + { value: 'KAFKA_PROFILE' }, + { value: 'LOGSTASH_PROFILE' }, + { value: 'ES_PROFILE' }, + { value: 'UNK_PROFILE' } ]; - $scope.labelize = stringUtils.labelize; - $scope.viewParams = function() { $location.path($location.path() + '/parameters'); }; @@ -49,7 +67,12 @@ var FormProfileController = function(profile, $scope, $location, formUtils, stri $scope.hasPropertyError = formUtils.hasPropertyError; + var init = function () { + getCDNs(); + }; + init(); + }; -FormProfileController.$inject = ['profile', '$scope', '$location', 'formUtils', 'stringUtils', 'locationUtils']; +FormProfileController.$inject = ['profile', '$scope', '$location', 'formUtils', 'locationUtils', 'cdnService']; module.exports = FormProfileController; diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/profile/form.profile.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/profile/form.profile.tpl.html index 06473c9557..820659e613 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/profile/form.profile.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/profile/form.profile.tpl.html @@ -43,13 +43,31 @@

    -
    - +
    +
    - - Required - Too Long - + + Required + Too Long + +
    +
    +
    + +
    + + Required +
    +
    +
    + +
    + + Required
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/profiles/table.profiles.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/profiles/table.profiles.tpl.html index 9d7b497ea8..3d9ea8e38e 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/profiles/table.profiles.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/profiles/table.profiles.tpl.html @@ -44,13 +44,17 @@
    + + + +
    Update? hostName domainName cdn
    + + + {{server.hostName}} {{server.domainName}} {{server.cdnName}}
    + + + {{server.hostName}} {{server.domainName}} {{server.cdnName}}
    + + + {{server.hostName}} {{server.domainName}} {{server.cdnName}}
    namedomainName dnssecEnabled
    {{cdn.name}}{{cdn.domainName}} {{cdn.dnssecEnabled}}
    nametype descriptioncdn
    {{profile.name}}{{profile.type}} {{profile.description}}{{profile.cdnName}}
    From 3727d6d2efa5c6dd41401f0d423b997855b262fc Mon Sep 17 00:00:00 2001 From: Jeremy Mitchell Date: Mon, 13 Mar 2017 21:14:45 -0600 Subject: [PATCH 05/14] DS profile is now optional --- .../form/deliveryService/form.deliveryService.tpl.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/deliveryService/form.deliveryService.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/deliveryService/form.deliveryService.tpl.html index 8024dede9e..d13dab46ba 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/deliveryService/form.deliveryService.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/deliveryService/form.deliveryService.tpl.html @@ -283,12 +283,11 @@
    - +
    - - Required
    From 966c486ff4a1b6adaae92fe61586a780530259e4 Mon Sep 17 00:00:00 2001 From: Jeremy Mitchell Date: Mon, 13 Mar 2017 21:43:34 -0600 Subject: [PATCH 06/14] adds profile deliveryservices table --- traffic_ops/experimental/ui/app/src/app.js | 2 + .../form/profile/FormProfileController.js | 4 + .../form/profile/form.profile.tpl.html | 5 +- .../TableProfileDeliveryServicesController.js | 46 ++++++++++++ .../table/profileDeliveryServices/index.js | 22 ++++++ .../table.profileDeliveryServices.tpl.html | 74 +++++++++++++++++++ .../admin/profiles/deliveryServices/index.js | 42 +++++++++++ 7 files changed, 193 insertions(+), 2 deletions(-) create mode 100644 traffic_ops/experimental/ui/app/src/common/modules/table/profileDeliveryServices/TableProfileDeliveryServicesController.js create mode 100644 traffic_ops/experimental/ui/app/src/common/modules/table/profileDeliveryServices/index.js create mode 100644 traffic_ops/experimental/ui/app/src/common/modules/table/profileDeliveryServices/table.profileDeliveryServices.tpl.html create mode 100644 traffic_ops/experimental/ui/app/src/modules/private/admin/profiles/deliveryServices/index.js diff --git a/traffic_ops/experimental/ui/app/src/app.js b/traffic_ops/experimental/ui/app/src/app.js index 2a73e6dbba..a3fa799134 100644 --- a/traffic_ops/experimental/ui/app/src/app.js +++ b/traffic_ops/experimental/ui/app/src/app.js @@ -79,6 +79,7 @@ var trafficOps = angular.module('trafficOps', [ require('./modules/private/admin/parameters/new').name, require('./modules/private/admin/parameters/profiles').name, require('./modules/private/admin/profiles').name, + require('./modules/private/admin/profiles/deliveryServices').name, require('./modules/private/admin/profiles/edit').name, require('./modules/private/admin/profiles/list').name, require('./modules/private/admin/profiles/new').name, @@ -226,6 +227,7 @@ var trafficOps = angular.module('trafficOps', [ require('./common/modules/table/physLocationServers').name, require('./common/modules/table/parameters').name, require('./common/modules/table/parameterProfiles').name, + require('./common/modules/table/profileDeliveryServices').name, require('./common/modules/table/profileParameters').name, require('./common/modules/table/profileServers').name, require('./common/modules/table/profiles').name, diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/profile/FormProfileController.js b/traffic_ops/experimental/ui/app/src/common/modules/form/profile/FormProfileController.js index 67755fdfdc..20797b78f3 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/profile/FormProfileController.js +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/profile/FormProfileController.js @@ -53,6 +53,10 @@ var FormProfileController = function(profile, $scope, $location, formUtils, loca $location.path($location.path() + '/servers'); }; + $scope.viewDeliveryServices = function() { + $location.path($location.path() + '/delivery-services'); + }; + $scope.cloneProfile = function() { alert('not hooked up yet: cloneProfile'); }; diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/profile/form.profile.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/profile/form.profile.tpl.html index 820659e613..f2d5450ac2 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/profile/form.profile.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/profile/form.profile.tpl.html @@ -25,14 +25,15 @@
    - -
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/profileDeliveryServices/TableProfileDeliveryServicesController.js b/traffic_ops/experimental/ui/app/src/common/modules/table/profileDeliveryServices/TableProfileDeliveryServicesController.js new file mode 100644 index 0000000000..8655d52266 --- /dev/null +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/profileDeliveryServices/TableProfileDeliveryServicesController.js @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +var TableProfileDeliveryServicesController = function(profile, deliveryServices, $scope, $state, locationUtils) { + + $scope.profile = profile; + + $scope.deliveryServices = deliveryServices; + + $scope.editDeliveryService = function(id) { + locationUtils.navigateToPath('/configure/delivery-services/' + id); + }; + + $scope.refresh = function() { + $state.reload(); // reloads all the resolves for the view + }; + + $scope.navigateToPath = locationUtils.navigateToPath; + + angular.element(document).ready(function () { + $('#deliveryServicesTable').dataTable({ + "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]], + "iDisplayLength": -1 + }); + }); + +}; + +TableProfileDeliveryServicesController.$inject = ['profile', 'deliveryServices', '$scope', '$state', 'locationUtils']; +module.exports = TableProfileDeliveryServicesController; diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/profileDeliveryServices/index.js b/traffic_ops/experimental/ui/app/src/common/modules/table/profileDeliveryServices/index.js new file mode 100644 index 0000000000..e8bdce3a6b --- /dev/null +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/profileDeliveryServices/index.js @@ -0,0 +1,22 @@ + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +module.exports = angular.module('trafficOps.table.profileDeliveryServices', []) + .controller('TableProfileDeliveryServicesController', require('./TableProfileDeliveryServicesController')); diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/profileDeliveryServices/table.profileDeliveryServices.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/profileDeliveryServices/table.profileDeliveryServices.tpl.html new file mode 100644 index 0000000000..119b545151 --- /dev/null +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/profileDeliveryServices/table.profileDeliveryServices.tpl.html @@ -0,0 +1,74 @@ + + +
    +
    + +
    + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    xmlIdorgServerFqdncdnprofileccrDnsTtlactivetypedscpsignedqstringIgnoregeoLimitprotocolipv6RoutingEnabledrangeRequestHandling
    {{deliveryService.xmlId}}{{deliveryService.orgServerFqdn}}{{deliveryService.cdnName}}{{deliveryService.profileName}}{{deliveryService.ccrDnsTtl}}{{deliveryService.active}}{{deliveryService.type}}{{deliveryService.dscp}}{{deliveryService.signed}}{{deliveryService.qstringIgnore}}{{deliveryService.geoLimit}}{{deliveryService.protocol}}{{deliveryService.ipv6RoutingEnabled}}{{deliveryService.rangeRequestHandling}}
    +
    +
    + diff --git a/traffic_ops/experimental/ui/app/src/modules/private/admin/profiles/deliveryServices/index.js b/traffic_ops/experimental/ui/app/src/modules/private/admin/profiles/deliveryServices/index.js new file mode 100644 index 0000000000..1a6c4a0691 --- /dev/null +++ b/traffic_ops/experimental/ui/app/src/modules/private/admin/profiles/deliveryServices/index.js @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +module.exports = angular.module('trafficOps.private.admin.profiles.deliveryServices', []) + .config(function($stateProvider, $urlRouterProvider) { + $stateProvider + .state('trafficOps.private.admin.profiles.deliveryServices', { + url: '/{profileId}/delivery-services', + views: { + profilesContent: { + templateUrl: 'common/modules/table/profileDeliveryServices/table.profileDeliveryServices.tpl.html', + controller: 'TableProfileDeliveryServicesController', + resolve: { + profile: function($stateParams, profileService) { + return profileService.getProfile($stateParams.profileId); + }, + deliveryServices: function($stateParams, deliveryServiceService) { + return deliveryServiceService.getDeliveryServices({ profileId: $stateParams.profileId }); + } + } + } + } + }) + ; + $urlRouterProvider.otherwise('/'); + }); From 306916d4b754e02d8cf7ef1067a3766c071d9415 Mon Sep 17 00:00:00 2001 From: Jeremy Mitchell Date: Tue, 14 Mar 2017 21:05:11 -0600 Subject: [PATCH 07/14] adds /parameters/:id/cache-groups view --- traffic_ops/experimental/ui/app/src/app.js | 2 + .../app/src/common/api/CacheGroupService.js | 4 ++ .../form/parameter/FormParameterController.js | 4 ++ .../form/parameter/form.parameter.tpl.html | 1 + .../TableParameterCacheGroupsController.js | 50 ++++++++++++++++ .../table/parameterCacheGroups/index.js | 21 +++++++ .../table.parameterCacheGroups.tpl.html | 59 +++++++++++++++++++ .../TableParameterProfilesController.js | 2 +- .../admin/parameters/cacheGroups/index.js | 42 +++++++++++++ 9 files changed, 184 insertions(+), 1 deletion(-) create mode 100644 traffic_ops/experimental/ui/app/src/common/modules/table/parameterCacheGroups/TableParameterCacheGroupsController.js create mode 100644 traffic_ops/experimental/ui/app/src/common/modules/table/parameterCacheGroups/index.js create mode 100644 traffic_ops/experimental/ui/app/src/common/modules/table/parameterCacheGroups/table.parameterCacheGroups.tpl.html create mode 100644 traffic_ops/experimental/ui/app/src/modules/private/admin/parameters/cacheGroups/index.js diff --git a/traffic_ops/experimental/ui/app/src/app.js b/traffic_ops/experimental/ui/app/src/app.js index a3fa799134..d6877f8bb6 100644 --- a/traffic_ops/experimental/ui/app/src/app.js +++ b/traffic_ops/experimental/ui/app/src/app.js @@ -74,6 +74,7 @@ var trafficOps = angular.module('trafficOps', [ require('./modules/private/admin/physLocations/new').name, require('./modules/private/admin/physLocations/servers').name, require('./modules/private/admin/parameters').name, + require('./modules/private/admin/parameters/cacheGroups').name, require('./modules/private/admin/parameters/edit').name, require('./modules/private/admin/parameters/list').name, require('./modules/private/admin/parameters/new').name, @@ -226,6 +227,7 @@ var trafficOps = angular.module('trafficOps', [ require('./common/modules/table/physLocations').name, require('./common/modules/table/physLocationServers').name, require('./common/modules/table/parameters').name, + require('./common/modules/table/parameterCacheGroups').name, require('./common/modules/table/parameterProfiles').name, require('./common/modules/table/profileDeliveryServices').name, require('./common/modules/table/profileParameters').name, diff --git a/traffic_ops/experimental/ui/app/src/common/api/CacheGroupService.js b/traffic_ops/experimental/ui/app/src/common/api/CacheGroupService.js index 2f30df02e8..fe26d15740 100644 --- a/traffic_ops/experimental/ui/app/src/common/api/CacheGroupService.js +++ b/traffic_ops/experimental/ui/app/src/common/api/CacheGroupService.js @@ -88,6 +88,10 @@ var CacheGroupService = function(Restangular, locationUtils, messageModel) { ); }; + this.getParameterCacheGroups = function(paramId) { + // todo: this needs an api: /parameters/:id/cachegroups + return Restangular.one('parameters', paramId).getList('cachegroups'); + }; }; diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/parameter/FormParameterController.js b/traffic_ops/experimental/ui/app/src/common/modules/form/parameter/FormParameterController.js index d398735ac6..4de9b5aba7 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/parameter/FormParameterController.js +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/parameter/FormParameterController.js @@ -33,6 +33,10 @@ var FormParameterController = function(parameter, $scope, $location, formUtils, $location.path($location.path() + '/profiles'); }; + $scope.viewCacheGroups = function() { + $location.path($location.path() + '/cache-groups'); + }; + $scope.navigateToPath = locationUtils.navigateToPath; $scope.hasError = formUtils.hasError; diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/parameter/form.parameter.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/parameter/form.parameter.tpl.html index caa2fdceb9..1958ce9335 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/parameter/form.parameter.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/parameter/form.parameter.tpl.html @@ -30,6 +30,7 @@
    diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/parameterCacheGroups/TableParameterCacheGroupsController.js b/traffic_ops/experimental/ui/app/src/common/modules/table/parameterCacheGroups/TableParameterCacheGroupsController.js new file mode 100644 index 0000000000..ce4c855037 --- /dev/null +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/parameterCacheGroups/TableParameterCacheGroupsController.js @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +var TableParameterCacheGroupsController = function(parameter, cacheGroups, $scope, $state, locationUtils) { + + $scope.parameter = parameter; + + $scope.cacheGroups = cacheGroups; + + $scope.addCacheGroup = function() { + alert('not hooked up yet: add cg to parameter'); + }; + + $scope.removeCacheGroup = function() { + alert('not hooked up yet: remove cg from parameter'); + }; + + $scope.refresh = function() { + $state.reload(); // reloads all the resolves for the view + }; + + $scope.navigateToPath = locationUtils.navigateToPath; + + angular.element(document).ready(function () { + $('#cacheGroupsTable').dataTable({ + "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]], + "iDisplayLength": 100 + }); + }); + +}; + +TableParameterCacheGroupsController.$inject = ['parameter', 'cacheGroups', '$scope', '$state', 'locationUtils']; +module.exports = TableParameterCacheGroupsController; diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/parameterCacheGroups/index.js b/traffic_ops/experimental/ui/app/src/common/modules/table/parameterCacheGroups/index.js new file mode 100644 index 0000000000..6a5edafc27 --- /dev/null +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/parameterCacheGroups/index.js @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +module.exports = angular.module('trafficOps.table.parameterCacheGroups', []) + .controller('TableParameterCacheGroupsController', require('./TableParameterCacheGroupsController')); diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/parameterCacheGroups/table.parameterCacheGroups.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/parameterCacheGroups/table.parameterCacheGroups.tpl.html new file mode 100644 index 0000000000..3da948cc51 --- /dev/null +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/parameterCacheGroups/table.parameterCacheGroups.tpl.html @@ -0,0 +1,59 @@ + + +
    +
    + +
    + + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    nameshortNametypelatitudelongitude
    {{cacheGroup.name}}{{cacheGroup.shortName}}{{cacheGroup.typeName}}{{cacheGroup.latitude}}{{cacheGroup.longitude}}
    +
    +
    + diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/parameterProfiles/TableParameterProfilesController.js b/traffic_ops/experimental/ui/app/src/common/modules/table/parameterProfiles/TableParameterProfilesController.js index 97e89a3315..06d341a70e 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/parameterProfiles/TableParameterProfilesController.js +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/parameterProfiles/TableParameterProfilesController.js @@ -38,7 +38,7 @@ var TableParameterProfilesController = function(parameter, parameterProfiles, $s $scope.navigateToPath = locationUtils.navigateToPath; angular.element(document).ready(function () { - $('#parametersTable').dataTable({ + $('#parameterProfilesTable').dataTable({ "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]], "iDisplayLength": 100 }); diff --git a/traffic_ops/experimental/ui/app/src/modules/private/admin/parameters/cacheGroups/index.js b/traffic_ops/experimental/ui/app/src/modules/private/admin/parameters/cacheGroups/index.js new file mode 100644 index 0000000000..f5476c6550 --- /dev/null +++ b/traffic_ops/experimental/ui/app/src/modules/private/admin/parameters/cacheGroups/index.js @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +module.exports = angular.module('trafficOps.private.admin.parameters.cacheGroups', []) + .config(function($stateProvider, $urlRouterProvider) { + $stateProvider + .state('trafficOps.private.admin.parameters.cacheGroups', { + url: '/{parameterId}/cache-groups', + views: { + parametersContent: { + templateUrl: 'common/modules/table/parameterCacheGroups/table.parameterCacheGroups.tpl.html', + controller: 'TableParameterCacheGroupsController', + resolve: { + parameter: function($stateParams, parameterService) { + return parameterService.getParameter($stateParams.parameterId); + }, + cacheGroups: function($stateParams, cacheGroupService) { + return cacheGroupService.getParameterCacheGroups($stateParams.parameterId); + } + } + } + } + }) + ; + $urlRouterProvider.otherwise('/'); + }); From 863364c3997c7f69f62f6c1505b370f6a32007bb Mon Sep 17 00:00:00 2001 From: Jeremy Mitchell Date: Tue, 14 Mar 2017 21:51:17 -0600 Subject: [PATCH 08/14] adds offline reason popover to all server tables --- .../TableCacheGroupServersController.js | 8 +++-- .../table.cacheGroupServers.tpl.html | 5 ++- .../cdnServers/TableCDNServersController.js | 8 +++-- .../cdnServers/table.cdnServers.tpl.html | 5 ++- .../TableDeliveryServiceServersController.js | 8 +++-- .../table.deliveryServiceServers.tpl.html | 5 ++- .../TablePhysLocationServersController.js | 8 +++-- .../table.physLocationServers.tpl.html | 5 ++- .../TableProfileServersController.js | 8 +++-- .../table.profileServers.tpl.html | 5 ++- .../table/servers/TableServersController.js | 8 +++-- .../table/servers/table.servers.tpl.html | 5 ++- .../TableStatusServersController.js | 8 +++-- .../table.statusServers.tpl.html | 5 ++- .../typeServers/TableTypeServersController.js | 8 +++-- .../typeServers/table.typeServers.tpl.html | 5 ++- .../src/common/service/utils/ServerUtils.js | 33 +++++++++++++++++++ .../ui/app/src/common/service/utils/index.js | 1 + 18 files changed, 114 insertions(+), 24 deletions(-) create mode 100644 traffic_ops/experimental/ui/app/src/common/service/utils/ServerUtils.js diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/TableCacheGroupServersController.js b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/TableCacheGroupServersController.js index 18740a377a..9a97660ece 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/TableCacheGroupServersController.js +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/TableCacheGroupServersController.js @@ -17,7 +17,7 @@ * under the License. */ -var TableCacheGroupsServersController = function(cacheGroup, servers, $scope, $state, $uibModal, cacheGroupService, locationUtils) { +var TableCacheGroupsServersController = function(cacheGroup, servers, $scope, $state, $uibModal, cacheGroupService, locationUtils, serverUtils) { $scope.cacheGroup = cacheGroup; @@ -101,6 +101,10 @@ var TableCacheGroupsServersController = function(cacheGroup, servers, $scope, $s $scope.navigateToPath = locationUtils.navigateToPath; + $scope.isOffline = serverUtils.isOffline; + + $scope.offlineReason = serverUtils.offlineReason; + angular.element(document).ready(function () { $('#serversTable').dataTable({ "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]], @@ -110,5 +114,5 @@ var TableCacheGroupsServersController = function(cacheGroup, servers, $scope, $s }; -TableCacheGroupsServersController.$inject = ['cacheGroup', 'servers', '$scope', '$state', '$uibModal', 'cacheGroupService', 'locationUtils']; +TableCacheGroupsServersController.$inject = ['cacheGroup', 'servers', '$scope', '$state', '$uibModal', 'cacheGroupService', 'locationUtils', 'serverUtils']; module.exports = TableCacheGroupsServersController; diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/table.cacheGroupServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/table.cacheGroupServers.tpl.html index b14697209d..ba792b6f8e 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/table.cacheGroupServers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/table.cacheGroupServers.tpl.html @@ -65,7 +65,10 @@ {{server.physLocation}} {{server.ipAddress}} {{server.ip6Address}} - {{server.status}} + + {{server.status}} + {{server.status}} + {{server.profile}} {{server.iloIpAddress}} {{server.iloIpGateway}} diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/TableCDNServersController.js b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/TableCDNServersController.js index 1c3d1e9731..787bf37d03 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/TableCDNServersController.js +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/TableCDNServersController.js @@ -17,7 +17,7 @@ * under the License. */ -var TableCDNServersController = function(cdn, servers, $scope, $state, locationUtils, cdnService) { +var TableCDNServersController = function(cdn, servers, $scope, $state, locationUtils, serverUtils, cdnService) { $scope.cdn = cdn; @@ -49,6 +49,10 @@ var TableCDNServersController = function(cdn, servers, $scope, $state, locationU $state.reload(); // reloads all the resolves for the view }; + $scope.isOffline = serverUtils.isOffline; + + $scope.offlineReason = serverUtils.offlineReason; + $scope.navigateToPath = locationUtils.navigateToPath; angular.element(document).ready(function () { @@ -60,5 +64,5 @@ var TableCDNServersController = function(cdn, servers, $scope, $state, locationU }; -TableCDNServersController.$inject = ['cdn', 'servers', '$scope', '$state', 'locationUtils', 'cdnService']; +TableCDNServersController.$inject = ['cdn', 'servers', '$scope', '$state', 'locationUtils', 'serverUtils', 'cdnService']; module.exports = TableCDNServersController; diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html index 9189f43206..0b211e5a97 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html @@ -65,7 +65,10 @@ {{server.physLocation}} {{server.ipAddress}} {{server.ip6Address}} - {{server.status}} + + {{server.status}} + {{server.status}} + {{server.profile}} {{server.iloIpAddress}} {{server.iloIpGateway}} diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceServers/TableDeliveryServiceServersController.js b/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceServers/TableDeliveryServiceServersController.js index c8f082cdfc..805fbea28d 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceServers/TableDeliveryServiceServersController.js +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceServers/TableDeliveryServiceServersController.js @@ -17,7 +17,7 @@ * under the License. */ -var TableDeliveryServiceServersController = function(deliveryService, servers, $scope, $state, locationUtils) { +var TableDeliveryServiceServersController = function(deliveryService, servers, $scope, $state, locationUtils, serverUtils) { $scope.deliveryService = deliveryService; @@ -35,6 +35,10 @@ var TableDeliveryServiceServersController = function(deliveryService, servers, $ $state.reload(); // reloads all the resolves for the view }; + $scope.isOffline = serverUtils.isOffline; + + $scope.offlineReason = serverUtils.offlineReason; + $scope.navigateToPath = locationUtils.navigateToPath; angular.element(document).ready(function () { @@ -46,5 +50,5 @@ var TableDeliveryServiceServersController = function(deliveryService, servers, $ }; -TableDeliveryServiceServersController.$inject = ['deliveryService', 'servers', '$scope', '$state', 'locationUtils']; +TableDeliveryServiceServersController.$inject = ['deliveryService', 'servers', '$scope', '$state', 'locationUtils', 'serverUtils']; module.exports = TableDeliveryServiceServersController; diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceServers/table.deliveryServiceServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceServers/table.deliveryServiceServers.tpl.html index e3a9481b08..91feddc447 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceServers/table.deliveryServiceServers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/deliveryServiceServers/table.deliveryServiceServers.tpl.html @@ -65,7 +65,10 @@ {{server.physLocation}} {{server.ipAddress}} {{server.ip6Address}} - {{server.status}} + + {{server.status}} + {{server.status}} + {{server.profile}} {{server.iloIpAddress}} {{server.iloIpGateway}} diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/physLocationServers/TablePhysLocationServersController.js b/traffic_ops/experimental/ui/app/src/common/modules/table/physLocationServers/TablePhysLocationServersController.js index eb149025c4..3af755cac2 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/physLocationServers/TablePhysLocationServersController.js +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/physLocationServers/TablePhysLocationServersController.js @@ -17,7 +17,7 @@ * under the License. */ -var TablePhysLocationServersController = function(physLocation, servers, $scope, $state, locationUtils) { +var TablePhysLocationServersController = function(physLocation, servers, $scope, $state, locationUtils, serverUtils) { $scope.physLocation = physLocation; @@ -31,6 +31,10 @@ var TablePhysLocationServersController = function(physLocation, servers, $scope, $state.reload(); // reloads all the resolves for the view }; + $scope.isOffline = serverUtils.isOffline; + + $scope.offlineReason = serverUtils.offlineReason; + $scope.navigateToPath = locationUtils.navigateToPath; angular.element(document).ready(function () { @@ -42,5 +46,5 @@ var TablePhysLocationServersController = function(physLocation, servers, $scope, }; -TablePhysLocationServersController.$inject = ['physLocation', 'servers', '$scope', '$state', 'locationUtils']; +TablePhysLocationServersController.$inject = ['physLocation', 'servers', '$scope', '$state', 'locationUtils', 'serverUtils']; module.exports = TablePhysLocationServersController; diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/physLocationServers/table.physLocationServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/physLocationServers/table.physLocationServers.tpl.html index bef4077817..7e99de4172 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/physLocationServers/table.physLocationServers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/physLocationServers/table.physLocationServers.tpl.html @@ -63,7 +63,10 @@ {{server.physLocation}} {{server.ipAddress}} {{server.ip6Address}} - {{server.status}} + + {{server.status}} + {{server.status}} + {{server.profile}} {{server.iloIpAddress}} {{server.iloIpGateway}} diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/profileServers/TableProfileServersController.js b/traffic_ops/experimental/ui/app/src/common/modules/table/profileServers/TableProfileServersController.js index 4fd5f69348..f84699a0fd 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/profileServers/TableProfileServersController.js +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/profileServers/TableProfileServersController.js @@ -17,7 +17,7 @@ * under the License. */ -var TableProfileServersController = function(profile, servers, $scope, $state, locationUtils) { +var TableProfileServersController = function(profile, servers, $scope, $state, locationUtils, serverUtils) { $scope.profile = profile; @@ -31,6 +31,10 @@ var TableProfileServersController = function(profile, servers, $scope, $state, l $state.reload(); // reloads all the resolves for the view }; + $scope.isOffline = serverUtils.isOffline; + + $scope.offlineReason = serverUtils.offlineReason; + $scope.navigateToPath = locationUtils.navigateToPath; angular.element(document).ready(function () { @@ -42,5 +46,5 @@ var TableProfileServersController = function(profile, servers, $scope, $state, l }; -TableProfileServersController.$inject = ['profile', 'servers', '$scope', '$state', 'locationUtils']; +TableProfileServersController.$inject = ['profile', 'servers', '$scope', '$state', 'locationUtils', 'serverUtils']; module.exports = TableProfileServersController; diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/profileServers/table.profileServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/profileServers/table.profileServers.tpl.html index e94b6192e9..fcf64c7e82 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/profileServers/table.profileServers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/profileServers/table.profileServers.tpl.html @@ -63,7 +63,10 @@ {{server.physLocation}} {{server.ipAddress}} {{server.ip6Address}} - {{server.status}} + + {{server.status}} + {{server.status}} + {{server.profile}} {{server.iloIpAddress}} {{server.iloIpGateway}} diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/servers/TableServersController.js b/traffic_ops/experimental/ui/app/src/common/modules/table/servers/TableServersController.js index b1c966e138..bb98d28dc7 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/servers/TableServersController.js +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/servers/TableServersController.js @@ -17,7 +17,7 @@ * under the License. */ -var TableServersController = function(servers, $scope, $state, locationUtils) { +var TableServersController = function(servers, $scope, $state, locationUtils, serverUtils) { $scope.servers = servers; @@ -37,6 +37,10 @@ var TableServersController = function(servers, $scope, $state, locationUtils) { $state.reload(); // reloads all the resolves for the view }; + $scope.isOffline = serverUtils.isOffline; + + $scope.offlineReason = serverUtils.offlineReason; + angular.element(document).ready(function () { $('#serversTable').dataTable({ "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]], @@ -46,5 +50,5 @@ var TableServersController = function(servers, $scope, $state, locationUtils) { }; -TableServersController.$inject = ['servers', '$scope', '$state', 'locationUtils']; +TableServersController.$inject = ['servers', '$scope', '$state', 'locationUtils', 'serverUtils']; module.exports = TableServersController; diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/servers/table.servers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/servers/table.servers.tpl.html index 137f046312..c8d793e4d2 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/servers/table.servers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/servers/table.servers.tpl.html @@ -71,7 +71,10 @@ {{server.physLocation}} {{server.ipAddress}} {{server.ip6Address}} - {{server.status}} + + {{server.status}} + {{server.status}} + {{server.profile}} {{server.iloIpAddress}} {{server.iloIpGateway}} diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/statusServers/TableStatusServersController.js b/traffic_ops/experimental/ui/app/src/common/modules/table/statusServers/TableStatusServersController.js index 8ba4daf526..dd06a76a56 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/statusServers/TableStatusServersController.js +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/statusServers/TableStatusServersController.js @@ -17,7 +17,7 @@ * under the License. */ -var TableStatusServersController = function(status, servers, $scope, $state, locationUtils) { +var TableStatusServersController = function(status, servers, $scope, $state, locationUtils, serverUtils) { $scope.status = status; @@ -31,6 +31,10 @@ var TableStatusServersController = function(status, servers, $scope, $state, loc $state.reload(); // reloads all the resolves for the view }; + $scope.isOffline = serverUtils.isOffline; + + $scope.offlineReason = serverUtils.offlineReason; + $scope.navigateToPath = locationUtils.navigateToPath; angular.element(document).ready(function () { @@ -42,5 +46,5 @@ var TableStatusServersController = function(status, servers, $scope, $state, loc }; -TableStatusServersController.$inject = ['status', 'servers', '$scope', '$state', 'locationUtils']; +TableStatusServersController.$inject = ['status', 'servers', '$scope', '$state', 'locationUtils', 'serverUtils']; module.exports = TableStatusServersController; diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/statusServers/table.statusServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/statusServers/table.statusServers.tpl.html index 815d82faae..9659649468 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/statusServers/table.statusServers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/statusServers/table.statusServers.tpl.html @@ -63,7 +63,10 @@ {{server.physLocation}} {{server.ipAddress}} {{server.ip6Address}} - {{server.status}} + + {{server.status}} + {{server.status}} + {{server.profile}} {{server.iloIpAddress}} {{server.iloIpGateway}} diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/typeServers/TableTypeServersController.js b/traffic_ops/experimental/ui/app/src/common/modules/table/typeServers/TableTypeServersController.js index 786344e71f..30f1fa4c4b 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/typeServers/TableTypeServersController.js +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/typeServers/TableTypeServersController.js @@ -17,7 +17,7 @@ * under the License. */ -var TableTypeServersController = function(type, servers, $scope, $state, locationUtils) { +var TableTypeServersController = function(type, servers, $scope, $state, locationUtils, serverUtils) { $scope.type = type; @@ -31,6 +31,10 @@ var TableTypeServersController = function(type, servers, $scope, $state, locatio $state.reload(); // reloads all the resolves for the view }; + $scope.isOffline = serverUtils.isOffline; + + $scope.offlineReason = serverUtils.offlineReason; + $scope.navigateToPath = locationUtils.navigateToPath; angular.element(document).ready(function () { @@ -42,5 +46,5 @@ var TableTypeServersController = function(type, servers, $scope, $state, locatio }; -TableTypeServersController.$inject = ['type', 'servers', '$scope', '$state', 'locationUtils']; +TableTypeServersController.$inject = ['type', 'servers', '$scope', '$state', 'locationUtils', 'serverUtils']; module.exports = TableTypeServersController; diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/typeServers/table.typeServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/typeServers/table.typeServers.tpl.html index 99ab56a4bc..b15c24663c 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/table/typeServers/table.typeServers.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/typeServers/table.typeServers.tpl.html @@ -63,7 +63,10 @@ {{server.physLocation}} {{server.ipAddress}} {{server.ip6Address}} - {{server.status}} + + {{server.status}} + {{server.status}} + {{server.profile}} {{server.iloIpAddress}} {{server.iloIpGateway}} diff --git a/traffic_ops/experimental/ui/app/src/common/service/utils/ServerUtils.js b/traffic_ops/experimental/ui/app/src/common/service/utils/ServerUtils.js new file mode 100644 index 0000000000..a4d2c4c839 --- /dev/null +++ b/traffic_ops/experimental/ui/app/src/common/service/utils/ServerUtils.js @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +var ServerUtils = function() { + + this.isOffline = function(status) { + return (status == 'OFFLINE' || status == 'ADMIN_DOWN'); + }; + + this.offlineReason = function(server) { + return (server.offlineReason) ? server.offlineReason : 'None'; + }; + +}; + +ServerUtils.$inject = []; +module.exports = ServerUtils; diff --git a/traffic_ops/experimental/ui/app/src/common/service/utils/index.js b/traffic_ops/experimental/ui/app/src/common/service/utils/index.js index c9d19777ad..82f5bb79c4 100644 --- a/traffic_ops/experimental/ui/app/src/common/service/utils/index.js +++ b/traffic_ops/experimental/ui/app/src/common/service/utils/index.js @@ -20,4 +20,5 @@ module.exports = angular.module('trafficOps.utils', []) .service('formUtils', require('./FormUtils')) .service('locationUtils', require('./LocationUtils')) + .service('serverUtils', require('./serverUtils')) .service('stringUtils', require('./StringUtils')); From 9beb9233a7e52c25f42c1f5289613513b63b4594 Mon Sep 17 00:00:00 2001 From: Jeremy Mitchell Date: Wed, 15 Mar 2017 21:54:31 -0600 Subject: [PATCH 09/14] expands server form html --- .../form/server/FormServerController.js | 39 +-- .../modules/form/server/form.server.tpl.html | 229 +++++++++++++++++- 2 files changed, 227 insertions(+), 41 deletions(-) diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/server/FormServerController.js b/traffic_ops/experimental/ui/app/src/common/modules/form/server/FormServerController.js index 49af665dfa..22303e3190 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/server/FormServerController.js +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/server/FormServerController.js @@ -17,7 +17,7 @@ * under the License. */ -var FormServerController = function(server, $scope, $location, $state, formUtils, stringUtils, locationUtils, serverService, cacheGroupService, cdnService, physLocationService, profileService, statusService, typeService) { +var FormServerController = function(server, $scope, $location, $state, formUtils, locationUtils, serverService, cacheGroupService, cdnService, physLocationService, profileService, statusService, typeService) { var getPhysLocations = function() { physLocationService.getPhysLocations() @@ -67,39 +67,12 @@ var FormServerController = function(server, $scope, $location, $state, formUtils // supposedly matches IPv4 and IPv6 formats. but actually need one that matches each. todo. - var ipRegex = new RegExp(/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$|^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/); + $scope.validations = { + ipRegex: new RegExp(/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$|^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/) + }; - $scope.server = server; - $scope.props = [ - { name: 'hostName', type: 'text', required: true, maxLength: 45, pattern: new RegExp(/^\S*$/), invalidMsg: 'No Spaces' }, - { name: 'domainName', type: 'text', required: true, maxLength: 45, pattern: new RegExp(/^\S*$/), invalidMsg: 'No Spaces' }, - { name: 'tcpPort', type: 'text', required: false, maxLength: 10, pattern: new RegExp(/^\d+$/), invalidMsg: 'Number' }, - { name: 'xmppId', type: 'text', required: false, maxLength: 256 }, - { name: 'xmppPasswd', type: 'text', required: false, maxLength: 45 }, - { name: 'interfaceName', type: 'text', required: true, maxLength: 45 }, - { name: 'ipAddress', type: 'text', required: true, maxLength: 45, pattern: ipRegex, invalidMsg: 'Invalid' }, - { name: 'ipNetmask', type: 'text', required: true, maxLength: 45, pattern: ipRegex, invalidMsg: 'Invalid' }, - { name: 'ipGateway', type: 'text', required: true, maxLength: 45, pattern: ipRegex, invalidMsg: 'Invalid' }, - { name: 'ip6Address', type: 'text', required: false, maxLength: 50 }, - { name: 'ip6Gateway', type: 'text', required: false, maxLength: 50 }, - { name: 'interfaceMtu', type: 'text', required: true, maxLength: 11, pattern: new RegExp(/(^1500$|^9000$)/), invalidMsg: '1500 or 9000' }, - { name: 'rack', type: 'text', required: false, maxLength: 64 }, - { name: 'offlineReason', type: 'text', required: false, maxLength: 256 }, - { name: 'mgmtIpAddress', type: 'text', required: false, maxLength: 50, pattern: ipRegex, invalidMsg: 'Invalid' }, - { name: 'mgmtIpNetmask', type: 'text', required: false, maxLength: 45, pattern: ipRegex, invalidMsg: 'Invalid' }, - { name: 'mgmtIpGateway', type: 'text', required: false, maxLength: 45, pattern: ipRegex, invalidMsg: 'Invalid' }, - { name: 'iloIpAddress', type: 'text', required: false, maxLength: 45, pattern: ipRegex, invalidMsg: 'Invalid' }, - { name: 'iloIpNetmask', type: 'text', required: false, maxLength: 45, pattern: ipRegex, invalidMsg: 'Invalid' }, - { name: 'iloIpGateway', type: 'text', required: false, maxLength: 45, pattern: ipRegex, invalidMsg: 'Invalid' }, - { name: 'iloUsername', type: 'text', required: false, maxLength: 45, pattern: new RegExp(/^\S*$/), invalidMsg: 'No Spaces' }, - { name: 'iloPassword', type: 'text', required: false, maxLength: 45 }, - { name: 'routerHostName', type: 'text', required: false, maxLength: 256, pattern: new RegExp(/^\S*$/), invalidMsg: 'No Spaces' }, - { name: 'routerPortName', type: 'text', required: false, maxLength: 256 }, - { name: 'httpsPort', type: 'text', required: false, maxLength: 10, pattern: new RegExp(/^\d+$/), invalidMsg: 'Number' }, - ]; - - $scope.labelize = stringUtils.labelize; + $scope.server = server; $scope.falseTrue = [ { value: false, label: 'false' }, @@ -166,5 +139,5 @@ var FormServerController = function(server, $scope, $location, $state, formUtils }; -FormServerController.$inject = ['server', '$scope', '$location', '$state', 'formUtils', 'stringUtils', 'locationUtils', 'serverService', 'cacheGroupService', 'cdnService', 'physLocationService', 'profileService', 'statusService', 'typeService']; +FormServerController.$inject = ['server', '$scope', '$location', '$state', 'formUtils', 'locationUtils', 'serverService', 'cacheGroupService', 'cdnService', 'physLocationService', 'profileService', 'statusService', 'typeService']; module.exports = FormServerController; diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/server/form.server.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/server/form.server.tpl.html index b64dad9143..80e339735f 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/server/form.server.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/server/form.server.tpl.html @@ -44,14 +44,227 @@

    -
    - -
    - - Required - Too Long - {{prop.invalidMsg}} - +
    + +
    + + Required + Too Long + No Spaces + +
    +
    +
    + +
    + + Required + Too Long + No Spaces + +
    +
    +
    + +
    + + Too Long + Number + +
    +
    +
    + +
    + + Too Long + +
    +
    +
    + +
    + + Too Long + +
    +
    +
    + +
    + + Required + Too Long + +
    +
    +
    + +
    + + Required + Too Long + Invalid + +
    +
    +
    + +
    + + Required + Too Long + Invalid + +
    +
    +
    + +
    + + Required + Too Long + Invalid + +
    +
    +
    + +
    + + Too Long + +
    +
    +
    + +
    + + Too Long + +
    +
    +
    + +
    + + Required + Too Long + 1500 or 9000 + +
    +
    +
    + +
    + + Too Long + +
    +
    +
    + +
    + + Too Long + +
    +
    +
    + +
    + + Too Long + Invalid + +
    +
    +
    + +
    + + Too Long + Invalid + +
    +
    +
    + +
    + + Too Long + Invalid + +
    +
    +
    + +
    + + Too Long + Invalid + +
    +
    +
    + +
    + + Too Long + Invalid + +
    +
    +
    + +
    + + Too Long + Invalid + +
    +
    +
    + +
    + + Too Long + No Spaces + +
    +
    +
    + +
    + + Too Long + +
    +
    +
    + +
    + + Too Long + No Spaces + +
    +
    +
    + +
    + + Too Long + +
    +
    +
    + +
    + + Too Long + Number +
    From 012a3cc397679b1dc081028156649248d891e01c Mon Sep 17 00:00:00 2001 From: Jeremy Mitchell Date: Wed, 22 Mar 2017 21:11:18 -0600 Subject: [PATCH 10/14] hooks up tenant table and form --- traffic_ops/experimental/ui/app/src/app.js | 1 + .../ui/app/src/common/api/TenantService.js | 8 ++--- .../form/tenant/FormTenantController.js | 25 +++++++++++----- .../modules/form/tenant/form.tenant.tpl.html | 30 ++++++++++++++----- .../modules/navigation/navigation.tpl.html | 1 + .../table/tenants/table.tenants.tpl.html | 8 ++++- 6 files changed, 54 insertions(+), 19 deletions(-) diff --git a/traffic_ops/experimental/ui/app/src/app.js b/traffic_ops/experimental/ui/app/src/app.js index d6877f8bb6..05dce5b400 100644 --- a/traffic_ops/experimental/ui/app/src/app.js +++ b/traffic_ops/experimental/ui/app/src/app.js @@ -239,6 +239,7 @@ var trafficOps = angular.module('trafficOps', [ require('./common/modules/table/serverDeliveryServices').name, require('./common/modules/table/statuses').name, require('./common/modules/table/statusServers').name, + require('./common/modules/table/tenants').name, require('./common/modules/table/types').name, require('./common/modules/table/typeCacheGroups').name, require('./common/modules/table/typeDeliveryServices').name, diff --git a/traffic_ops/experimental/ui/app/src/common/api/TenantService.js b/traffic_ops/experimental/ui/app/src/common/api/TenantService.js index edec73efd5..b35003367d 100644 --- a/traffic_ops/experimental/ui/app/src/common/api/TenantService.js +++ b/traffic_ops/experimental/ui/app/src/common/api/TenantService.js @@ -20,15 +20,15 @@ var TenantService = function(Restangular, messageModel) { this.getTenants = function(queryParams) { - return Restangular.all('tenant').getList(queryParams); + return Restangular.all('tenants').getList(queryParams); }; this.getTenant = function(id) { - return Restangular.one("tenant", id).get(); + return Restangular.one("tenants", id).get(); }; this.createTenant = function(tenant) { - return Restangular.service('tenant').post(tenant) + return Restangular.service('tenants').post(tenant) .then( function() { messageModel.setMessages([ { level: 'success', text: 'Tenant created' } ], true); @@ -52,7 +52,7 @@ var TenantService = function(Restangular, messageModel) { }; this.deleteTenant = function(id) { - return Restangular.one("tenant", id).remove() + return Restangular.one("tenants", id).remove() .then( function() { messageModel.setMessages([ { level: 'success', text: 'Tenant deleted' } ], true); diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/tenant/FormTenantController.js b/traffic_ops/experimental/ui/app/src/common/modules/form/tenant/FormTenantController.js index 0fc30961ea..4acf3746eb 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/tenant/FormTenantController.js +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/tenant/FormTenantController.js @@ -17,15 +17,21 @@ * under the License. */ -var FormTenantController = function(tenant, $scope, formUtils, stringUtils, locationUtils) { +var FormTenantController = function(tenant, $scope, formUtils, locationUtils, tenantService) { - $scope.tenant = angular.copy(tenant); + var getTenants = function() { + tenantService.getTenants() + .then(function(result) { + $scope.tenants = result; + }); + }; - $scope.props = [ - { name: 'name', type: 'text', required: true, maxLength: 45 } - ]; + $scope.tenant = tenant; - $scope.labelize = stringUtils.labelize; + $scope.falseTrue = [ + { value: false, label: 'false' }, + { value: true, label: 'true' } + ]; $scope.navigateToPath = locationUtils.navigateToPath; @@ -33,7 +39,12 @@ var FormTenantController = function(tenant, $scope, formUtils, stringUtils, loca $scope.hasPropertyError = formUtils.hasPropertyError; + var init = function () { + getTenants(); + }; + init(); + }; -FormTenantController.$inject = ['tenant', '$scope', 'formUtils', 'stringUtils', 'locationUtils']; +FormTenantController.$inject = ['tenant', '$scope', 'formUtils', 'locationUtils', 'tenantService']; module.exports = FormTenantController; diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/tenant/form.tenant.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/tenant/form.tenant.tpl.html index d80aea0b4f..8567a86f69 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/tenant/form.tenant.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/tenant/form.tenant.tpl.html @@ -20,7 +20,7 @@
    @@ -28,13 +28,29 @@

    -
    - +
    +
    - - Required - Too Long - + + Required + Too Long + +
    +
    +
    + +
    + + Required +
    +
    +
    + +
    + + Required
    @@ -34,11 +34,17 @@ id + name + active + parent {{tenant.id}} + {{tenant.name}} + {{tenant.active}} + {{tenant.parentId}} From 31076838d8f09a305c7164de25c05c447e3d1444 Mon Sep 17 00:00:00 2001 From: Jeremy Mitchell Date: Thu, 23 Mar 2017 21:04:13 -0600 Subject: [PATCH 11/14] adds cdn profiles table --- traffic_ops/experimental/ui/app/src/app.js | 2 + .../modules/form/cdn/FormCDNController.js | 4 ++ .../common/modules/form/cdn/form.cdn.tpl.html | 3 +- .../cdnProfiles/TableCDNProfilesController.js | 46 ++++++++++++++++ .../common/modules/table/cdnProfiles/index.js | 21 +++++++ .../cdnProfiles/table.cdnProfiles.tpl.html | 55 +++++++++++++++++++ .../private/admin/cdns/profiles/index.js | 42 ++++++++++++++ 7 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 traffic_ops/experimental/ui/app/src/common/modules/table/cdnProfiles/TableCDNProfilesController.js create mode 100644 traffic_ops/experimental/ui/app/src/common/modules/table/cdnProfiles/index.js create mode 100644 traffic_ops/experimental/ui/app/src/common/modules/table/cdnProfiles/table.cdnProfiles.tpl.html create mode 100644 traffic_ops/experimental/ui/app/src/modules/private/admin/cdns/profiles/index.js diff --git a/traffic_ops/experimental/ui/app/src/app.js b/traffic_ops/experimental/ui/app/src/app.js index 05dce5b400..20461f3134 100644 --- a/traffic_ops/experimental/ui/app/src/app.js +++ b/traffic_ops/experimental/ui/app/src/app.js @@ -62,6 +62,7 @@ var trafficOps = angular.module('trafficOps', [ require('./modules/private/admin/cdns/edit').name, require('./modules/private/admin/cdns/list').name, require('./modules/private/admin/cdns/new').name, + require('./modules/private/admin/cdns/profiles').name, require('./modules/private/admin/cdns/servers').name, require('./modules/private/admin/divisions').name, require('./modules/private/admin/divisions/edit').name, @@ -216,6 +217,7 @@ var trafficOps = angular.module('trafficOps', [ require('./common/modules/table/asns').name, require('./common/modules/table/cdns').name, require('./common/modules/table/cdnDeliveryServices').name, + require('./common/modules/table/cdnProfiles').name, require('./common/modules/table/cdnServers').name, require('./common/modules/table/deliveryServices').name, require('./common/modules/table/deliveryServiceRegexes').name, diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/FormCDNController.js b/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/FormCDNController.js index 28fc0c4cb9..d76772d2c9 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/FormCDNController.js +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/FormCDNController.js @@ -50,6 +50,10 @@ var FormCDNController = function(cdn, $scope, $location, formUtils, stringUtils, alert('not hooked up yet: manageSnapshots for CDN'); }; + $scope.viewProfiles = function() { + $location.path($location.path() + '/profiles'); + }; + $scope.viewServers = function() { $location.path($location.path() + '/servers'); }; diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html index 0dae223cfe..661c3a8aa3 100644 --- a/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html +++ b/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html @@ -37,8 +37,9 @@
  • Manage SSL Keys
  • View Cachegroup Health
  • -
  • View Servers
  • View Delivery Services
  • +
  • View Profiles
  • +
  • View Servers
  • diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cdnProfiles/TableCDNProfilesController.js b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnProfiles/TableCDNProfilesController.js new file mode 100644 index 0000000000..9a093bb133 --- /dev/null +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnProfiles/TableCDNProfilesController.js @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +var TableCDNProfilesController = function(cdn, profiles, $scope, $state, locationUtils) { + + $scope.cdn = cdn; + + $scope.profiles = profiles; + + $scope.editProfile = function(id) { + locationUtils.navigateToPath('/admin/profiles/' + id); + }; + + $scope.refresh = function() { + $state.reload(); // reloads all the resolves for the view + }; + + $scope.navigateToPath = locationUtils.navigateToPath; + + angular.element(document).ready(function () { + $('#profilesTable').dataTable({ + "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]], + "iDisplayLength": 100 + }); + }); + +}; + +TableCDNProfilesController.$inject = ['cdn', 'profiles', '$scope', '$state', 'locationUtils']; +module.exports = TableCDNProfilesController; diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cdnProfiles/index.js b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnProfiles/index.js new file mode 100644 index 0000000000..8939080424 --- /dev/null +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnProfiles/index.js @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +module.exports = angular.module('trafficOps.table.cdnProfiles', []) + .controller('TableCDNProfilesController', require('./TableCDNProfilesController')); diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cdnProfiles/table.cdnProfiles.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnProfiles/table.cdnProfiles.tpl.html new file mode 100644 index 0000000000..f017e84232 --- /dev/null +++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnProfiles/table.cdnProfiles.tpl.html @@ -0,0 +1,55 @@ + + +
    +
    + +
    + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + +
    namedescriptioncdn
    {{profile.name}}{{profile.description}}{{profile.cdnName}}
    +
    +
    + + + + diff --git a/traffic_ops/experimental/ui/app/src/modules/private/admin/cdns/profiles/index.js b/traffic_ops/experimental/ui/app/src/modules/private/admin/cdns/profiles/index.js new file mode 100644 index 0000000000..45f9064c98 --- /dev/null +++ b/traffic_ops/experimental/ui/app/src/modules/private/admin/cdns/profiles/index.js @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +module.exports = angular.module('trafficOps.private.admin.cdns.profiles', []) + .config(function($stateProvider, $urlRouterProvider) { + $stateProvider + .state('trafficOps.private.admin.cdns.profiles', { + url: '/{cdnId}/profiles', + views: { + cdnsContent: { + templateUrl: 'common/modules/table/cdnProfiles/table.cdnProfiles.tpl.html', + controller: 'TableCDNProfilesController', + resolve: { + cdn: function($stateParams, cdnService) { + return cdnService.getCDN($stateParams.cdnId); + }, + profiles: function($stateParams, profileService) { + return profileService.getProfiles({ cdn: $stateParams.cdnId }); + } + } + } + } + }) + ; + $urlRouterProvider.otherwise('/'); + }); From 0f902297877352664a7a60cf93a16554ad8c9047 Mon Sep 17 00:00:00 2001 From: Jeremy Mitchell Date: Thu, 6 Apr 2017 11:43:21 -0600 Subject: [PATCH 12/14] upgrades to ui libraries --- traffic_ops/experimental/ui/bower.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/traffic_ops/experimental/ui/bower.json b/traffic_ops/experimental/ui/bower.json index 2f1fc625f4..a09ab069bf 100755 --- a/traffic_ops/experimental/ui/bower.json +++ b/traffic_ops/experimental/ui/bower.json @@ -3,14 +3,14 @@ "version": "2.0.0", "description": "Traffic Ops UI", "dependencies": { - "angular": "1.5.0", - "angular-animate": "1.5.0", - "angular-resource": "1.5.0", - "angular-route": "1.5.0", - "angular-sanitize": "1.5.0", + "angular": "1.6.4", + "angular-animate": "1.6.4", + "angular-resource": "1.6.4", + "angular-route": "1.6.4", + "angular-sanitize": "1.6.4", "angular-bootstrap": "0.14.3", "angular-loading-bar": "0.8.0", - "angular-ui-router": "0.2.18", + "angular-ui-router": "0.4.2", "angular-jwt": "0.0.9", "bootstrap-sass-official": "3.3.6", "es5-shim": "4.5.6", From bf9dfae5fadbc8566a1558a46aef54f6a15c9e6a Mon Sep 17 00:00:00 2001 From: Jeremy Mitchell Date: Thu, 6 Apr 2017 11:45:01 -0600 Subject: [PATCH 13/14] uses then instead of deprecated success/error --- .../ui/app/src/common/api/HttpService.js | 56 +++++++++++-------- .../app/src/common/api/TrafficOpsService.js | 14 +++-- .../ui/app/src/common/api/UserService.js | 16 +++--- 3 files changed, 49 insertions(+), 37 deletions(-) diff --git a/traffic_ops/experimental/ui/app/src/common/api/HttpService.js b/traffic_ops/experimental/ui/app/src/common/api/HttpService.js index ab01b9df2d..a74b7fffb4 100644 --- a/traffic_ops/experimental/ui/app/src/common/api/HttpService.js +++ b/traffic_ops/experimental/ui/app/src/common/api/HttpService.js @@ -23,12 +23,14 @@ var HttpService = function($http, $q) { var deferred = $q.defer(); $http.get(resource) - .success(function(result) { - deferred.resolve(result); - }) - .error(function(fault) { - deferred.reject(fault); - }); + .then( + function(result) { + deferred.resolve(result); + }, + function(fault) { + deferred.reject(fault); + } + ); return deferred.promise; }; @@ -37,12 +39,14 @@ var HttpService = function($http, $q) { var deferred = $q.defer(); $http.post(resource, payload) - .success(function(result) { - deferred.resolve(result); - }) - .error(function(fault) { - deferred.reject(fault); - }); + .then( + function(result) { + deferred.resolve(result); + }, + function(fault) { + deferred.reject(fault); + } + ); return deferred.promise; }; @@ -51,12 +55,14 @@ var HttpService = function($http, $q) { var deferred = $q.defer(); $http.put(resource, payload) - .success(function(result) { - deferred.resolve(result.response); - }) - .error(function(fault) { - deferred.reject(fault); - }); + .then( + function(result) { + deferred.resolve(result.response); + }, + function(fault) { + deferred.reject(fault); + } + ); return deferred.promise; }; @@ -65,12 +71,14 @@ var HttpService = function($http, $q) { var deferred = $q.defer(); $http.delete(resource) - .success(function(result) { - deferred.resolve(result.response); - }) - .error(function(fault) { - deferred.reject(fault); - }); + .then( + function(result) { + deferred.resolve(result.response); + }, + function(fault) { + deferred.reject(fault); + } + ); return deferred.promise; }; diff --git a/traffic_ops/experimental/ui/app/src/common/api/TrafficOpsService.js b/traffic_ops/experimental/ui/app/src/common/api/TrafficOpsService.js index 63966f156b..6c6ff82e27 100644 --- a/traffic_ops/experimental/ui/app/src/common/api/TrafficOpsService.js +++ b/traffic_ops/experimental/ui/app/src/common/api/TrafficOpsService.js @@ -22,12 +22,14 @@ var TrafficOpsService = function($http, $q) { this.getReleaseVersionInfo = function() { var deferred = $q.defer(); $http.get('traffic_ops_release.json') - .success(function(result) { - deferred.resolve(result); - }) - .error(function(fault) { - deferred.reject(fault); - }); + .then( + function(result) { + deferred.resolve(result); + }, + function(fault) { + deferred.reject(fault); + } + ); return deferred.promise; }; diff --git a/traffic_ops/experimental/ui/app/src/common/api/UserService.js b/traffic_ops/experimental/ui/app/src/common/api/UserService.js index 37c1e78a12..e4a8a5f066 100644 --- a/traffic_ops/experimental/ui/app/src/common/api/UserService.js +++ b/traffic_ops/experimental/ui/app/src/common/api/UserService.js @@ -35,13 +35,15 @@ var UserService = function(Restangular, $http, $location, $q, authService, locat ); } else { $http.get(ENV.api['root'] + "user/current.json") - .success(function(result) { - userModel.setUser(result.response); - deferred.resolve(result.response); - }) - .error(function(fault) { - deferred.reject(fault); - }); + .then( + function(result) { + userModel.setUser(result.response); + deferred.resolve(result.response); + }, + function(fault) { + deferred.reject(fault); + } + ); return deferred.promise; } From 608d07703e59532081412c9b090501a5ce433623 Mon Sep 17 00:00:00 2001 From: Jeremy Mitchell Date: Thu, 6 Apr 2017 12:09:55 -0600 Subject: [PATCH 14/14] fixes bug in retrieving user object --- .../experimental/ui/app/src/common/api/UserService.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/traffic_ops/experimental/ui/app/src/common/api/UserService.js b/traffic_ops/experimental/ui/app/src/common/api/UserService.js index e4a8a5f066..0995d627f5 100644 --- a/traffic_ops/experimental/ui/app/src/common/api/UserService.js +++ b/traffic_ops/experimental/ui/app/src/common/api/UserService.js @@ -34,11 +34,11 @@ var UserService = function(Restangular, $http, $location, $q, authService, locat } ); } else { - $http.get(ENV.api['root'] + "user/current.json") + $http.get(ENV.api['root'] + "user/current") .then( function(result) { - userModel.setUser(result.response); - deferred.resolve(result.response); + userModel.setUser(result.data.response); + deferred.resolve(result.data.response); }, function(fault) { deferred.reject(fault);