http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/app/assets/data/cluster_metrics/network_1hr.json ---------------------------------------------------------------------- diff --git a/ambari-web/app/assets/data/cluster_metrics/network_1hr.json b/ambari-web/app/assets/data/cluster_metrics/network_1hr.json index 931d460..855fb1c 100644 --- a/ambari-web/app/assets/data/cluster_metrics/network_1hr.json +++ b/ambari-web/app/assets/data/cluster_metrics/network_1hr.json @@ -2,8 +2,8 @@ "href" : "http://ambari/api/clusters/vmc?fields=metrics/network[1352702257,1352705857,15]", "metrics" : { "network" : { - "Out" : "[[12583.08,1352706495],[12583.08,1352706510],[12583.08,1352706525],[12583.08,1352706540],[12583.08,1352706555],[12583.08,1352706570],[12583.08,1352706585],[12583.08,1352706600],[12583.08,1352706615],[12583.08,1352706630],[12583.08,1352706645],[12583.08,1352706660],[12583.08,1352706675],[12106.336,1352706690],[10795.29,1352706705],[10795.29,1352706720],[10795.29,1352706735],[10795.29,1352706750],[10795.29,1352706765],[10795.29,1352706780],[10795.29,1352706795],[10795.29,1352706810],[10795.29,1352706825],[10795.29,1352706840],[31635.684667,1352706855],[88946.77,1352706870],[88946.77,1352706885],[68785.01,1352706900],[13340.17,1352706915],[13340.17,1352706930],[13340.17,1352706945],[13340.17,1352706960],[13340.17,1352706975],[13340.17,1352706990],[13340.17,1352707005],[13340.17,1352707020],[13340.17,1352707035],[13340.17,1352707050],[13340.17,1352707065],[13340.17,1352707080],[13340.17,1352707095],[13340.17,1352707110],[13340.17,1352707125],[13340.17,1352707140],[13340.1 7,1352707155],[13340.17,1352707170],[13118.971333,1352707185],[11681.18,1352707200],[11681.18,1352707215],[11681.18,1352707230],[11681.18,1352707245],[11681.18,1352707260],[11681.18,1352707275],[11681.18,1352707290],[11681.18,1352707305],[11681.18,1352707320],[11681.18,1352707335],[11681.18,1352707350],[11681.18,1352707365],[11681.18,1352707380],[11681.18,1352707395],[11681.18,1352707410],[11681.18,1352707425],[11681.18,1352707440],[11681.18,1352707455],[11681.18,1352707470],[11681.18,1352707485],[11983.44,1352707500],[12587.96,1352707515],[12587.96,1352707530],[12587.96,1352707545],[12587.96,1352707560],[12587.96,1352707575],[12587.96,1352707590],[12587.96,1352707605],[12587.96,1352707620],[12587.96,1352707635],[12587.96,1352707650],[12587.96,1352707665],[12587.96,1352707680],[12587.96,1352707695],[12587.96,1352707710],[12587.96,1352707725],[36661.513333,1352707740],[84808.62,1352707755],[66401.5,1352707770],[15781.92,1352707785],[15781.92,1352707800],[30233.69,1352707815],[88040.7 7,1352707830],[77739.934,1352707845],[10784.5,1352707860],[10784.5,1352707875],[10784.5,1352707890],[10784.5,1352707905],[10784.5,1352707920],[10784.5,1352707935],[10784.5,1352707950],[10784.5,1352707965],[10784.5,1352707980],[10784.5,1352707995],[10784.5,1352708010],[10784.5,1352708025],[10784.5,1352708040],[10784.5,1352708055],[10784.5,1352708070],[10784.5,1352708085],[10784.5,1352708100],[10784.5,1352708115],[10784.5,1352708130],[10784.5,1352708145],[12577.01,1352708160],[12577.01,1352708175],[12577.01,1352708190],[12577.01,1352708205],[12577.01,1352708220],[12577.01,1352708235],[12577.01,1352708250],[12577.01,1352708265],[12577.01,1352708280],[12577.01,1352708295],[12577.01,1352708310],[12577.01,1352708325],[12577.01,1352708340],[12577.01,1352708355],[12577.01,1352708370],[12577.01,1352708385],[12577.01,1352708400],[12577.01,1352708415],[12577.01,1352708430],[12577.01,1352708445],[76909.477333,1352708460],[86806.78,1352708475],[86806.78,1352708490],[28706.124,1352708505],[14180. 96,1352708520],[14180.96,1352708535],[14180.96,1352708550],[14180.96,1352708565],[14180.96,1352708580],[14180.96,1352708595],[14180.96,1352708610],[14180.96,1352708625],[14180.96,1352708640],[14180.96,1352708655],[14180.96,1352708670],[14180.96,1352708685],[14180.96,1352708700],[14180.96,1352708715],[14180.96,1352708730],[14180.96,1352708745],[14180.96,1352708760],[14180.96,1352708775],[14180.96,1352708790],[12369.776,1352708805],[10784.99,1352708820],[10784.99,1352708835],[10784.99,1352708850],[10784.99,1352708865],[10784.99,1352708880],[10784.99,1352708895],[10784.99,1352708910],[10784.99,1352708925],[10784.99,1352708940],[10784.99,1352708955],[10784.99,1352708970],[10784.99,1352708985],[10784.99,1352709000],[10784.99,1352709015],[10784.99,1352709030],[10784.99,1352709045],[10784.99,1352709060],[10784.99,1352709075],[11502.454,1352709090],[12578.65,1352709105],[12578.65,1352709120],[12578.65,1352709135],[12578.65,1352709150],[12578.65,1352709165],[12578.65,1352709180],[12578.65,13 52709195],[12578.65,1352709210],[12578.65,1352709225],[12578.65,1352709240],[12578.65,1352709255],[12578.65,1352709270],[12578.65,1352709285],[12578.65,1352709300],[12578.65,1352709315],[12578.65,1352709330],[12578.65,1352709345],[12578.65,1352709360],[12578.65,1352709375],[12578.65,1352709390],[11382.443333,1352709405],[10784.34,1352709420],[10784.34,1352709435],[10784.34,1352709450],[10784.34,1352709465],[10784.34,1352709480],[10784.34,1352709495],[10784.34,1352709510],[10784.34,1352709525],[10784.34,1352709540],[10784.34,1352709555],[10784.34,1352709570],[10784.34,1352709585],[10784.34,1352709600],[10784.34,1352709615],[10784.34,1352709630],[10784.34,1352709645],[10784.34,1352709660],[10784.34,1352709675],[10784.34,1352709690],[12345.674667,1352709705],[12585.88,1352709720],[12585.88,1352709735],[78700.907333,1352709750],[88872.45,1352709765],[88872.45,1352709780],[88872.45,1352709795],[88872.45,1352709810],[34560.793333,1352709825],[14811.1,1352709840],[67446.54,1352709855],[865 86.7,1352709870],[86586.7,1352709885],[33933.975333,1352709900],[14787.53,1352709915],[0.0,1352709930],[0.0,1352709945],[0.0,1352709960],[0.0,1352709975],[0.0,1352709990],[0.0,1352710005],[0.0,1352710020],[0.0,1352710035],[0.0,1352710050],[0.0,1352710065],[0.0,1352710080],[0.0,1352710095]]", - "In" : "[[363.51,1352706495],[363.51,1352706510],[363.51,1352706525],[363.51,1352706540],[363.51,1352706555],[363.51,1352706570],[363.51,1352706585],[363.51,1352706600],[363.51,1352706615],[363.51,1352706630],[363.51,1352706645],[363.51,1352706660],[363.51,1352706675],[355.134,1352706690],[332.1,1352706705],[332.1,1352706720],[332.1,1352706735],[332.1,1352706750],[332.1,1352706765],[332.1,1352706780],[332.1,1352706795],[332.1,1352706810],[332.1,1352706825],[332.1,1352706840],[718.19333333,1352706855],[1779.95,1352706870],[1779.95,1352706885],[1618.51,1352706900],[1174.55,1352706915],[1174.55,1352706930],[1174.55,1352706945],[1174.55,1352706960],[1174.55,1352706975],[1174.55,1352706990],[1174.55,1352707005],[1174.55,1352707020],[1174.55,1352707035],[1174.55,1352707050],[1174.55,1352707065],[1174.55,1352707080],[1174.55,1352707095],[1174.55,1352707110],[1174.55,1352707125],[1174.55,1352707140],[1174.55,1352707155],[1174.55,1352707170],[1062.434,1352707185],[333.68,1352707200],[3 33.68,1352707215],[333.68,1352707230],[333.68,1352707245],[333.68,1352707260],[333.68,1352707275],[333.68,1352707290],[333.68,1352707305],[333.68,1352707320],[333.68,1352707335],[333.68,1352707350],[333.68,1352707365],[333.68,1352707380],[333.68,1352707395],[333.68,1352707410],[333.68,1352707425],[333.68,1352707440],[333.68,1352707455],[333.68,1352707470],[333.68,1352707485],[343.97666667,1352707500],[364.57,1352707515],[364.57,1352707530],[364.57,1352707545],[364.57,1352707560],[364.57,1352707575],[364.57,1352707590],[364.57,1352707605],[364.57,1352707620],[364.57,1352707635],[364.57,1352707650],[364.57,1352707665],[364.57,1352707680],[364.57,1352707695],[364.57,1352707710],[364.57,1352707725],[755.93666667,1352707740],[1538.67,1352707755],[1283.942,1352707770],[583.44,1352707785],[583.44,1352707800],[783.546,1352707815],[1583.97,1352707830],[1414.7873333,1352707845],[315.1,1352707860],[315.1,1352707875],[315.1,1352707890],[315.1,1352707905],[315.1,1352707920],[315.1,1352707935],[3 15.1,1352707950],[315.1,1352707965],[315.1,1352707980],[315.1,1352707995],[315.1,1352708010],[315.1,1352708025],[315.1,1352708040],[315.1,1352708055],[315.1,1352708070],[315.1,1352708085],[315.1,1352708100],[315.1,1352708115],[315.1,1352708130],[315.1,1352708145],[359.9,1352708160],[359.9,1352708175],[359.9,1352708190],[359.9,1352708205],[359.9,1352708220],[359.9,1352708235],[359.9,1352708250],[359.9,1352708265],[359.9,1352708280],[359.9,1352708295],[359.9,1352708310],[359.9,1352708325],[359.9,1352708340],[359.9,1352708355],[359.9,1352708370],[359.9,1352708385],[359.9,1352708400],[359.9,1352708415],[359.9,1352708430],[359.9,1352708445],[1375.798,1352708460],[1532.09,1352708475],[1532.09,1352708490],[778.714,1352708505],[590.37,1352708520],[590.37,1352708535],[590.37,1352708550],[590.37,1352708565],[590.37,1352708580],[590.37,1352708595],[590.37,1352708610],[590.37,1352708625],[590.37,1352708640],[590.37,1352708655],[590.37,1352708670],[590.37,1352708685],[590.37,1352708700],[590.37, 1352708715],[590.37,1352708730],[590.37,1352708745],[590.37,1352708760],[590.37,1352708775],[590.37,1352708790],[442.36466667,1352708805],[312.86,1352708820],[312.86,1352708835],[312.86,1352708850],[312.86,1352708865],[312.86,1352708880],[312.86,1352708895],[312.86,1352708910],[312.86,1352708925],[312.86,1352708940],[312.86,1352708955],[312.86,1352708970],[312.86,1352708985],[312.86,1352709000],[312.86,1352709015],[312.86,1352709030],[312.86,1352709045],[312.86,1352709060],[312.86,1352709075],[329.824,1352709090],[355.27,1352709105],[355.27,1352709120],[355.27,1352709135],[355.27,1352709150],[355.27,1352709165],[355.27,1352709180],[355.27,1352709195],[355.27,1352709210],[355.27,1352709225],[355.27,1352709240],[355.27,1352709255],[355.27,1352709270],[355.27,1352709285],[355.27,1352709300],[355.27,1352709315],[355.27,1352709330],[355.27,1352709345],[355.27,1352709360],[355.27,1352709375],[355.27,1352709390],[322.90333333,1352709405],[306.72,1352709420],[306.72,1352709435],[306.72,1352 709450],[306.72,1352709465],[306.72,1352709480],[306.72,1352709495],[306.72,1352709510],[306.72,1352709525],[306.72,1352709540],[306.72,1352709555],[306.72,1352709570],[306.72,1352709585],[306.72,1352709600],[306.72,1352709615],[306.72,1352709630],[306.72,1352709645],[306.72,1352709660],[306.72,1352709675],[306.72,1352709690],[361.04266667,1352709705],[369.4,1352709720],[369.4,1352709735],[1606.3933333,1352709750],[1796.7,1352709765],[1796.7,1352709780],[1796.7,1352709795],[1796.7,1352709810],[978.52,1352709825],[681.0,1352709840],[923.56466667,1352709855],[1011.77,1352709870],[1011.77,1352709885],[793.442,1352709900],[714.05,1352709915],[0.0,1352709930],[0.0,1352709945],[0.0,1352709960],[0.0,1352709975],[0.0,1352709990],[0.0,1352710005],[0.0,1352710020],[0.0,1352710035],[0.0,1352710050],[0.0,1352710065],[0.0,1352710080],[0.0,1352710095]]" + "Out" : [[12583.08,1352706495],[12583.08,1352706510],[12583.08,1352706525],[12583.08,1352706540],[12583.08,1352706555],[12583.08,1352706570],[12583.08,1352706585],[12583.08,1352706600],[12583.08,1352706615],[12583.08,1352706630],[12583.08,1352706645],[12583.08,1352706660],[12583.08,1352706675],[12106.336,1352706690],[10795.29,1352706705],[10795.29,1352706720],[10795.29,1352706735],[10795.29,1352706750],[10795.29,1352706765],[10795.29,1352706780],[10795.29,1352706795],[10795.29,1352706810],[10795.29,1352706825],[10795.29,1352706840],[31635.684667,1352706855],[88946.77,1352706870],[88946.77,1352706885],[68785.01,1352706900],[13340.17,1352706915],[13340.17,1352706930],[13340.17,1352706945],[13340.17,1352706960],[13340.17,1352706975],[13340.17,1352706990],[13340.17,1352707005],[13340.17,1352707020],[13340.17,1352707035],[13340.17,1352707050],[13340.17,1352707065],[13340.17,1352707080],[13340.17,1352707095],[13340.17,1352707110],[13340.17,1352707125],[13340.17,1352707140],[13340.17 ,1352707155],[13340.17,1352707170],[13118.971333,1352707185],[11681.18,1352707200],[11681.18,1352707215],[11681.18,1352707230],[11681.18,1352707245],[11681.18,1352707260],[11681.18,1352707275],[11681.18,1352707290],[11681.18,1352707305],[11681.18,1352707320],[11681.18,1352707335],[11681.18,1352707350],[11681.18,1352707365],[11681.18,1352707380],[11681.18,1352707395],[11681.18,1352707410],[11681.18,1352707425],[11681.18,1352707440],[11681.18,1352707455],[11681.18,1352707470],[11681.18,1352707485],[11983.44,1352707500],[12587.96,1352707515],[12587.96,1352707530],[12587.96,1352707545],[12587.96,1352707560],[12587.96,1352707575],[12587.96,1352707590],[12587.96,1352707605],[12587.96,1352707620],[12587.96,1352707635],[12587.96,1352707650],[12587.96,1352707665],[12587.96,1352707680],[12587.96,1352707695],[12587.96,1352707710],[12587.96,1352707725],[36661.513333,1352707740],[84808.62,1352707755],[66401.5,1352707770],[15781.92,1352707785],[15781.92,1352707800],[30233.69,1352707815],[88040.77 ,1352707830],[77739.934,1352707845],[10784.5,1352707860],[10784.5,1352707875],[10784.5,1352707890],[10784.5,1352707905],[10784.5,1352707920],[10784.5,1352707935],[10784.5,1352707950],[10784.5,1352707965],[10784.5,1352707980],[10784.5,1352707995],[10784.5,1352708010],[10784.5,1352708025],[10784.5,1352708040],[10784.5,1352708055],[10784.5,1352708070],[10784.5,1352708085],[10784.5,1352708100],[10784.5,1352708115],[10784.5,1352708130],[10784.5,1352708145],[12577.01,1352708160],[12577.01,1352708175],[12577.01,1352708190],[12577.01,1352708205],[12577.01,1352708220],[12577.01,1352708235],[12577.01,1352708250],[12577.01,1352708265],[12577.01,1352708280],[12577.01,1352708295],[12577.01,1352708310],[12577.01,1352708325],[12577.01,1352708340],[12577.01,1352708355],[12577.01,1352708370],[12577.01,1352708385],[12577.01,1352708400],[12577.01,1352708415],[12577.01,1352708430],[12577.01,1352708445],[76909.477333,1352708460],[86806.78,1352708475],[86806.78,1352708490],[28706.124,1352708505],[14180.9 6,1352708520],[14180.96,1352708535],[14180.96,1352708550],[14180.96,1352708565],[14180.96,1352708580],[14180.96,1352708595],[14180.96,1352708610],[14180.96,1352708625],[14180.96,1352708640],[14180.96,1352708655],[14180.96,1352708670],[14180.96,1352708685],[14180.96,1352708700],[14180.96,1352708715],[14180.96,1352708730],[14180.96,1352708745],[14180.96,1352708760],[14180.96,1352708775],[14180.96,1352708790],[12369.776,1352708805],[10784.99,1352708820],[10784.99,1352708835],[10784.99,1352708850],[10784.99,1352708865],[10784.99,1352708880],[10784.99,1352708895],[10784.99,1352708910],[10784.99,1352708925],[10784.99,1352708940],[10784.99,1352708955],[10784.99,1352708970],[10784.99,1352708985],[10784.99,1352709000],[10784.99,1352709015],[10784.99,1352709030],[10784.99,1352709045],[10784.99,1352709060],[10784.99,1352709075],[11502.454,1352709090],[12578.65,1352709105],[12578.65,1352709120],[12578.65,1352709135],[12578.65,1352709150],[12578.65,1352709165],[12578.65,1352709180],[12578.65,135 2709195],[12578.65,1352709210],[12578.65,1352709225],[12578.65,1352709240],[12578.65,1352709255],[12578.65,1352709270],[12578.65,1352709285],[12578.65,1352709300],[12578.65,1352709315],[12578.65,1352709330],[12578.65,1352709345],[12578.65,1352709360],[12578.65,1352709375],[12578.65,1352709390],[11382.443333,1352709405],[10784.34,1352709420],[10784.34,1352709435],[10784.34,1352709450],[10784.34,1352709465],[10784.34,1352709480],[10784.34,1352709495],[10784.34,1352709510],[10784.34,1352709525],[10784.34,1352709540],[10784.34,1352709555],[10784.34,1352709570],[10784.34,1352709585],[10784.34,1352709600],[10784.34,1352709615],[10784.34,1352709630],[10784.34,1352709645],[10784.34,1352709660],[10784.34,1352709675],[10784.34,1352709690],[12345.674667,1352709705],[12585.88,1352709720],[12585.88,1352709735],[78700.907333,1352709750],[88872.45,1352709765],[88872.45,1352709780],[88872.45,1352709795],[88872.45,1352709810],[34560.793333,1352709825],[14811.1,1352709840],[67446.54,1352709855],[8658 6.7,1352709870],[86586.7,1352709885],[33933.975333,1352709900],[14787.53,1352709915],[0.0,1352709930],[0.0,1352709945],[0.0,1352709960],[0.0,1352709975],[0.0,1352709990],[0.0,1352710005],[0.0,1352710020],[0.0,1352710035],[0.0,1352710050],[0.0,1352710065],[0.0,1352710080],[0.0,1352710095]], + "In" : [[363.51,1352706495],[363.51,1352706510],[363.51,1352706525],[363.51,1352706540],[363.51,1352706555],[363.51,1352706570],[363.51,1352706585],[363.51,1352706600],[363.51,1352706615],[363.51,1352706630],[363.51,1352706645],[363.51,1352706660],[363.51,1352706675],[355.134,1352706690],[332.1,1352706705],[332.1,1352706720],[332.1,1352706735],[332.1,1352706750],[332.1,1352706765],[332.1,1352706780],[332.1,1352706795],[332.1,1352706810],[332.1,1352706825],[332.1,1352706840],[718.19333333,1352706855],[1779.95,1352706870],[1779.95,1352706885],[1618.51,1352706900],[1174.55,1352706915],[1174.55,1352706930],[1174.55,1352706945],[1174.55,1352706960],[1174.55,1352706975],[1174.55,1352706990],[1174.55,1352707005],[1174.55,1352707020],[1174.55,1352707035],[1174.55,1352707050],[1174.55,1352707065],[1174.55,1352707080],[1174.55,1352707095],[1174.55,1352707110],[1174.55,1352707125],[1174.55,1352707140],[1174.55,1352707155],[1174.55,1352707170],[1062.434,1352707185],[333.68,1352707200],[33 3.68,1352707215],[333.68,1352707230],[333.68,1352707245],[333.68,1352707260],[333.68,1352707275],[333.68,1352707290],[333.68,1352707305],[333.68,1352707320],[333.68,1352707335],[333.68,1352707350],[333.68,1352707365],[333.68,1352707380],[333.68,1352707395],[333.68,1352707410],[333.68,1352707425],[333.68,1352707440],[333.68,1352707455],[333.68,1352707470],[333.68,1352707485],[343.97666667,1352707500],[364.57,1352707515],[364.57,1352707530],[364.57,1352707545],[364.57,1352707560],[364.57,1352707575],[364.57,1352707590],[364.57,1352707605],[364.57,1352707620],[364.57,1352707635],[364.57,1352707650],[364.57,1352707665],[364.57,1352707680],[364.57,1352707695],[364.57,1352707710],[364.57,1352707725],[755.93666667,1352707740],[1538.67,1352707755],[1283.942,1352707770],[583.44,1352707785],[583.44,1352707800],[783.546,1352707815],[1583.97,1352707830],[1414.7873333,1352707845],[315.1,1352707860],[315.1,1352707875],[315.1,1352707890],[315.1,1352707905],[315.1,1352707920],[315.1,1352707935],[31 5.1,1352707950],[315.1,1352707965],[315.1,1352707980],[315.1,1352707995],[315.1,1352708010],[315.1,1352708025],[315.1,1352708040],[315.1,1352708055],[315.1,1352708070],[315.1,1352708085],[315.1,1352708100],[315.1,1352708115],[315.1,1352708130],[315.1,1352708145],[359.9,1352708160],[359.9,1352708175],[359.9,1352708190],[359.9,1352708205],[359.9,1352708220],[359.9,1352708235],[359.9,1352708250],[359.9,1352708265],[359.9,1352708280],[359.9,1352708295],[359.9,1352708310],[359.9,1352708325],[359.9,1352708340],[359.9,1352708355],[359.9,1352708370],[359.9,1352708385],[359.9,1352708400],[359.9,1352708415],[359.9,1352708430],[359.9,1352708445],[1375.798,1352708460],[1532.09,1352708475],[1532.09,1352708490],[778.714,1352708505],[590.37,1352708520],[590.37,1352708535],[590.37,1352708550],[590.37,1352708565],[590.37,1352708580],[590.37,1352708595],[590.37,1352708610],[590.37,1352708625],[590.37,1352708640],[590.37,1352708655],[590.37,1352708670],[590.37,1352708685],[590.37,1352708700],[590.37,1 352708715],[590.37,1352708730],[590.37,1352708745],[590.37,1352708760],[590.37,1352708775],[590.37,1352708790],[442.36466667,1352708805],[312.86,1352708820],[312.86,1352708835],[312.86,1352708850],[312.86,1352708865],[312.86,1352708880],[312.86,1352708895],[312.86,1352708910],[312.86,1352708925],[312.86,1352708940],[312.86,1352708955],[312.86,1352708970],[312.86,1352708985],[312.86,1352709000],[312.86,1352709015],[312.86,1352709030],[312.86,1352709045],[312.86,1352709060],[312.86,1352709075],[329.824,1352709090],[355.27,1352709105],[355.27,1352709120],[355.27,1352709135],[355.27,1352709150],[355.27,1352709165],[355.27,1352709180],[355.27,1352709195],[355.27,1352709210],[355.27,1352709225],[355.27,1352709240],[355.27,1352709255],[355.27,1352709270],[355.27,1352709285],[355.27,1352709300],[355.27,1352709315],[355.27,1352709330],[355.27,1352709345],[355.27,1352709360],[355.27,1352709375],[355.27,1352709390],[322.90333333,1352709405],[306.72,1352709420],[306.72,1352709435],[306.72,13527 09450],[306.72,1352709465],[306.72,1352709480],[306.72,1352709495],[306.72,1352709510],[306.72,1352709525],[306.72,1352709540],[306.72,1352709555],[306.72,1352709570],[306.72,1352709585],[306.72,1352709600],[306.72,1352709615],[306.72,1352709630],[306.72,1352709645],[306.72,1352709660],[306.72,1352709675],[306.72,1352709690],[361.04266667,1352709705],[369.4,1352709720],[369.4,1352709735],[1606.3933333,1352709750],[1796.7,1352709765],[1796.7,1352709780],[1796.7,1352709795],[1796.7,1352709810],[978.52,1352709825],[681.0,1352709840],[923.56466667,1352709855],[1011.77,1352709870],[1011.77,1352709885],[793.442,1352709900],[714.05,1352709915],[0.0,1352709930],[0.0,1352709945],[0.0,1352709960],[0.0,1352709975],[0.0,1352709990],[0.0,1352710005],[0.0,1352710020],[0.0,1352710035],[0.0,1352710050],[0.0,1352710065],[0.0,1352710080],[0.0,1352710095]] } }, "Clusters" : {
http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/app/mixins/common/widgets/export_metrics_mixin.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/mixins/common/widgets/export_metrics_mixin.js b/ambari-web/app/mixins/common/widgets/export_metrics_mixin.js index e49d7bc..1f2d657 100644 --- a/ambari-web/app/mixins/common/widgets/export_metrics_mixin.js +++ b/ambari-web/app/mixins/common/widgets/export_metrics_mixin.js @@ -29,16 +29,24 @@ App.ExportMetricsMixin = Em.Mixin.create({ */ exportToCSVArgument: true, - isMenuHidden: true, + isExportMenuHidden: true, + + isExportButtonHidden: false, exportMetricsMenuView: App.ExportMetricsMenuView.extend(), + hideMenuForNoData: function () { + if (this.get('isExportButtonHidden')) { + this.set('isExportMenuHidden', true); + } + }.observes('isExportButtonHidden'), + toggleFormatsList: function () { - this.toggleProperty('isMenuHidden'); + this.toggleProperty('isExportMenuHidden'); }, exportGraphData: function () { - this.set('isMenuHidden', true); + this.set('isExportMenuHidden', true); }, exportGraphDataSuccessCallback: function (response, request, params) { http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/app/styles/application.less ---------------------------------------------------------------------- diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less index bbd9e8a..31d495e 100644 --- a/ambari-web/app/styles/application.less +++ b/ambari-web/app/styles/application.less @@ -2306,9 +2306,11 @@ a:focus { z-index: 5; } .chart-title { - padding-right: 15px; text-align: center; font-size: small; + &.has-data { + padding-right: 15px; + } } .corner-icon { position: absolute; http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/app/styles/enhanced_service_dashboard.less ---------------------------------------------------------------------- diff --git a/ambari-web/app/styles/enhanced_service_dashboard.less b/ambari-web/app/styles/enhanced_service_dashboard.less index c1a241c..c033ee6 100644 --- a/ambari-web/app/styles/enhanced_service_dashboard.less +++ b/ambari-web/app/styles/enhanced_service_dashboard.less @@ -27,9 +27,9 @@ width: 98%; padding: 43px; border: 1px solid @border-color; - border-radius: 0px; - -webkit-border-radius: 0px; - -moz-border-radius: 0px; + border-radius: 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; background-image: none; .icon-plus { font-size: 70px; @@ -140,13 +140,13 @@ background: url(/img/spinner.gif) no-repeat center center; } .chart-container{ - margin: -4px 8px 0px 8px; + margin: -4px 8px 0 8px; .chart-y-axis{ margin-top: 10px; } .chart-legend { top: 110px; - left: 0px; + left: 0; padding: 3px; min-width: 100%; text-align: left; @@ -210,31 +210,33 @@ display: none; .icon-remove-sign{ color: #000000; - text-shadow: #fff 0px 0px 15px; + text-shadow: #fff 0 0 15px; position: absolute; left: -7px; top: -7px; } - .icon-edit, .icon-copy, .icon-save { - color: #555555; - font-weight: bold; - text-shadow: #ffffff -8px 8px 10px; - background-color: rgba(255,255,255,0.6); - position: absolute; - padding: 5px 5px; - } - .icon-copy { - right: 45px; - } - .icon-edit { - right: 25px; - } - .icon-save { - right: 5px; + } + .widget-icons { + position: absolute; + right: 5px; + top: 6px; + .corner-icon { + i { + position: relative; + color: #555555; + font-weight: bold; + text-shadow: #fff -8px 8px 8px, #fff 8px 8px 8px, #fff -8px -8px 8px, #fff 8px -8px 8px; + background-color: rgba(255,255,255,0.6); + padding: 5px 5px 5px 2px; + } + &.hidden i { + display: none; + } } } .export-graph-list { - right: -1px; + right: -6px; + margin-top: -2px; } &:hover { cursor: move; @@ -281,7 +283,7 @@ } .chart-legend .description-line { - padding: 0px 3px 8px 8px; + padding: 0 3px 8px 8px; line-height: 16px; max-height: 45px; font-weight: bold; @@ -440,7 +442,7 @@ a { position: absolute; right: 3px; - top: 0px; + top: 0; text-decoration: none; display: none; .icon-remove { @@ -479,9 +481,9 @@ -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; - border-radius: 0px; - -webkit-border-radius: 0px; - -moz-border-radius: 0px; + border-radius: 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; -webkit-transition: none; -moz-transition: none; -o-transition: none; @@ -528,7 +530,7 @@ } label.checkbox { line-height: 20px; - margin-bottom: 0px; + margin-bottom: 0; margin-top: 5px; } .description-text-area { @@ -556,7 +558,7 @@ .select-options-dropdown { width: 240px; max-height: 123px; - padding: 0px; + padding: 0; border-bottom: 200px transparent solid; border-right: 150px transparent solid; border-left: none; @@ -567,13 +569,13 @@ } li.metric-select { padding: 5px; - padding-bottom: 0px; + padding-bottom: 0; border: 1px #ccc solid; border-bottom: none; } li.aggregator-select { padding: 5px; - padding-bottom: 0px; + padding-bottom: 0; border: 1px #ccc solid; border-bottom: none; border-top: none; @@ -629,9 +631,9 @@ min-width: 300px; width: 300px; border: 1px solid rgba(0, 0, 0, 0.2); - -webkit-border-radius: 0px; - -moz-border-radius: 0px; - border-radius: 0px; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); @@ -645,7 +647,7 @@ max-height: 600px; position: fixed; .modal-body { - padding-top: 0px; + padding-top: 0; min-height: 290px; max-height: 460px; } @@ -717,7 +719,7 @@ } .is-shared-icon { display: inline-block; - margin-bottom: 0px; + margin-bottom: 0; margin-right: 5px; color: #888; } @@ -749,7 +751,7 @@ } .dropdown-menu { min-width: 110px; - left: 0px; + left: 0; } } } http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/app/templates/common/chart/linear_time.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/common/chart/linear_time.hbs b/ambari-web/app/templates/common/chart/linear_time.hbs index 1dd6f5f..e7bfa97 100644 --- a/ambari-web/app/templates/common/chart/linear_time.hbs +++ b/ambari-web/app/templates/common/chart/linear_time.hbs @@ -19,12 +19,10 @@ <div {{bindAttr class="view.isReady:hide:show :screensaver :no-borders :chart-container"}}></div> <div {{bindAttr class="view.isReady::hidden :time-label"}}> {{view.parentView.currentTimeState.name}} - {{#if view.parentView.graph.hasData}} - <a class="corner-icon pull-right" href="#" {{action toggleFormatsList target="view"}}> - <i class="icon-save"></i> - </a> - {{view view.exportMetricsMenuView}} - {{/if}} + <a {{bindAttr class="view.isExportButtonHidden:hidden :corner-icon :pull-right"}} href="#" {{action toggleFormatsList target="view"}}> + <i class="icon-save"></i> + </a> + {{view view.exportMetricsMenuView}} </div> {{#if view.isTimePagingEnable}} <div {{bindAttr class="view.leftArrowVisible:visibleArrow :arrow-left"}} {{action "switchTimeBack" target="view.parentView"}}></div> @@ -34,7 +32,7 @@ <div {{bindAttr id="view.xAxisId"}} {{bindAttr class="view.xAxisClass :chart-x-axis"}}></div> <div {{bindAttr id="view.legendId"}} {{bindAttr class="view.legendClass :chart-legend"}}></div> <div {{bindAttr id="view.chartId"}} {{bindAttr class="view.chartClass :chart"}}></div> - <div {{bindAttr id="view.titleId"}} {{bindAttr class="view.titleClass :chart-title"}}>{{view.title}}</div> + <div {{bindAttr id="view.titleId"}} {{bindAttr class="view.titleClass view.isExportButtonHidden::has-data :chart-title"}}>{{view.title}}</div> </div> {{#if view.isTimePagingEnable}} <div {{bindAttr class="view.rightArrowVisible:visibleArrow :arrow-right"}} {{action "switchTimeForward" "forward" target="view.parentView"}}></div> http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/app/templates/common/widget/gauge_widget.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/common/widget/gauge_widget.hbs b/ambari-web/app/templates/common/widget/gauge_widget.hbs index 0bfb22f..d31d743 100644 --- a/ambari-web/app/templates/common/widget/gauge_widget.hbs +++ b/ambari-web/app/templates/common/widget/gauge_widget.hbs @@ -23,12 +23,14 @@ </a> <div class="caption title span11">{{view.content.widgetName}}</div> {{#isAccessible ADMIN}} - <a class="corner-icon pull-right" href="#" {{action cloneWidget target="view"}}> - <i class="icon-copy"></i> - </a> - <a class="corner-icon pull-right" href="#" {{action editWidget target="view"}}> - <i class="icon-edit"></i> - </a> + <div class="widget-icons"> + <a class="corner-icon pull-right" href="#" {{action editWidget target="view"}}> + <i class="icon-edit"></i> + </a> + <a class="corner-icon pull-right" href="#" {{action cloneWidget target="view"}}> + <i class="icon-copy"></i> + </a> + </div> {{/isAccessible}} <div class="content"> {{#if view.isUnavailable}} http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/app/templates/common/widget/graph_widget.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/common/widget/graph_widget.hbs b/ambari-web/app/templates/common/widget/graph_widget.hbs index 05a4e40..062253a 100644 --- a/ambari-web/app/templates/common/widget/graph_widget.hbs +++ b/ambari-web/app/templates/common/widget/graph_widget.hbs @@ -23,16 +23,18 @@ </a> <div class="caption title span11">{{view.content.widgetName}}</div> {{#isAccessible ADMIN}} - <a class="corner-icon pull-right" href="#" {{action cloneWidget target="view"}}> - <i class="icon-copy"></i> - </a> - <a class="corner-icon pull-right" href="#" {{action editWidget target="view"}}> - <i class="icon-edit"></i> - </a> - <a class="corner-icon pull-right" href="#" {{action toggleFormatsList target="view"}}> - <i class="icon-save"></i> - </a> - {{view view.exportMetricsMenuView}} + <div class="widget-icons"> + <a {{bindAttr class="view.isExportButtonHidden:hidden :corner-icon :pull-right"}} href="#" {{action toggleFormatsList target="view"}}> + <i class="icon-save"></i> + </a> + <a class="corner-icon pull-right" href="#" {{action editWidget target="view"}}> + <i class="icon-edit"></i> + </a> + <a class="corner-icon pull-right" href="#" {{action cloneWidget target="view"}}> + <i class="icon-copy"></i> + </a> + {{view view.exportMetricsMenuView}} + </div> {{/isAccessible}} <div class="content"> {{view view.graphView}}</div> http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/app/templates/common/widget/number_widget.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/common/widget/number_widget.hbs b/ambari-web/app/templates/common/widget/number_widget.hbs index 478ab98..2a82891 100644 --- a/ambari-web/app/templates/common/widget/number_widget.hbs +++ b/ambari-web/app/templates/common/widget/number_widget.hbs @@ -23,12 +23,14 @@ </a> <div class="caption title span11">{{view.content.widgetName}}</div> {{#isAccessible ADMIN}} - <a class="corner-icon pull-right" href="#" {{action cloneWidget target="view"}}> - <i class="icon-copy"></i> - </a> + <div class="widget-icons"> <a class="corner-icon pull-right" href="#" {{action editWidget target="view"}}> <i class="icon-edit"></i> </a> + <a class="corner-icon pull-right" href="#" {{action cloneWidget target="view"}}> + <i class="icon-copy"></i> + </a> + </div> {{/isAccessible}} <div {{bindAttr class="view.contentColor :content"}}>{{view.displayValue}}</div> {{#if view.content.description}} http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/app/templates/common/widget/template_widget.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/common/widget/template_widget.hbs b/ambari-web/app/templates/common/widget/template_widget.hbs index 508c07b..2d2bff7 100644 --- a/ambari-web/app/templates/common/widget/template_widget.hbs +++ b/ambari-web/app/templates/common/widget/template_widget.hbs @@ -23,12 +23,14 @@ </a> <div class="caption title span11">{{view.content.widgetName}}</div> {{#isAccessible ADMIN}} - <a class="corner-icon pull-right" href="#" {{action cloneWidget target="view"}}> - <i class="icon-copy"></i> - </a> - <a class="corner-icon pull-right" href="#" {{action editWidget target="view"}}> - <i class="icon-edit"></i> - </a> + <div class="widget-icons"> + <a class="corner-icon pull-right" href="#" {{action editWidget target="view"}}> + <i class="icon-edit"></i> + </a> + <a class="corner-icon pull-right" href="#" {{action cloneWidget target="view"}}> + <i class="icon-copy"></i> + </a> + </div> {{/isAccessible}} <div {{bindAttr class="view.contentColor :content"}}>{{{view.displayValue}}}</div> {{#if view.content.description}} http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/app/templates/main/charts/linear_time.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/charts/linear_time.hbs b/ambari-web/app/templates/main/charts/linear_time.hbs index f95c5de..28e2fa4 100644 --- a/ambari-web/app/templates/main/charts/linear_time.hbs +++ b/ambari-web/app/templates/main/charts/linear_time.hbs @@ -26,11 +26,11 @@ <div id="{{unbound view.id}}-chart" class="chart" {{action showGraphInPopup target="view"}}></div> <div id="{{unbound view.id}}-timeline" class="timeline" {{action showGraphInPopup target="view"}}></div> {{#unless view.noTitleUnderGraph}} - <div id="{{unbound view.id}}-title" class="chart-title"> + <div id="{{unbound view.id}}-title" {{bindAttr class="view.isExportButtonHidden::has-data :chart-title"}}> {{view.title}} </div> {{#if view.isReady}} - <a class="corner-icon span1" href="#" {{action toggleFormatsList target="view"}}> + <a {{bindAttr class="view.isExportButtonHidden:hidden :corner-icon :span1"}} href="#" {{action toggleFormatsList target="view"}}> <i class="icon-save"></i> </a> <div class="export-graph-list-top"></div> http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/app/templates/main/dashboard/widgets/cluster_metrics.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/dashboard/widgets/cluster_metrics.hbs b/ambari-web/app/templates/main/dashboard/widgets/cluster_metrics.hbs index ac5ab3a..8919c41 100644 --- a/ambari-web/app/templates/main/dashboard/widgets/cluster_metrics.hbs +++ b/ambari-web/app/templates/main/dashboard/widgets/cluster_metrics.hbs @@ -25,7 +25,7 @@ <div class="caption span10">{{view.title}}</div> {{#if view.isDataLoaded}} {{#if view.childViews.lastObject.hasData}} - <a class="corner-icon span1" href="#" {{action toggleFormatsList target="view"}}> + <a {{bindAttr class="view.isExportButtonHidden:hidden :corner-icon :span1"}} href="#" {{action toggleFormatsList target="view"}}> <i class="icon-save"></i> </a> {{view view.exportMetricsMenuView}} http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/app/views/common/chart/linear_time.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/chart/linear_time.js b/ambari-web/app/views/common/chart/linear_time.js index fcb686c..4c29af7 100644 --- a/ambari-web/app/views/common/chart/linear_time.js +++ b/ambari-web/app/views/common/chart/linear_time.js @@ -165,7 +165,7 @@ App.ChartLinearTimeView = Ember.View.extend(App.ExportMetricsMixin, { this.loadData(); this.registerGraph(); this.$().parent().on('mouseleave', function () { - self.set('isMenuHidden', true); + self.set('isExportMenuHidden', true); }); App.tooltip(this.$("[rel='ZoomInTooltip']"), { placement: 'left', @@ -209,7 +209,7 @@ App.ChartLinearTimeView = Ember.View.extend(App.ExportMetricsMixin, { name: this.get('ajaxIndex'), sender: this, data: this.getDataForAjaxRequest(), - success: '_refreshGraph', + success: 'loadDataSuccessCallback', error: 'loadDataErrorCallback' }); } @@ -237,13 +237,20 @@ App.ChartLinearTimeView = Ember.View.extend(App.ExportMetricsMixin, { }; }, + loadDataSuccessCallback: function (response) { + this._refreshGraph(response); + }, + loadDataErrorCallback: function (xhr, textStatus, errorThrown) { this.set('isReady', true); if (xhr.readyState == 4 && xhr.status) { textStatus = xhr.status + " " + textStatus; } this._showMessage('warn', this.t('graphs.error.title'), this.t('graphs.error.message').format(textStatus, errorThrown)); - this.set('hasData', false); + this.setProperties({ + hasData: false, + isExportButtonHidden: true + }); }, /** @@ -390,7 +397,7 @@ App.ChartLinearTimeView = Ember.View.extend(App.ExportMetricsMixin, { * * @type Function */ - _refreshGraph: function (jsonData) { + _refreshGraph: function (jsonData, graphView) { if (this.get('isDestroyed')) { return; } @@ -414,7 +421,10 @@ App.ChartLinearTimeView = Ember.View.extend(App.ExportMetricsMixin, { } }); } - if (this.checkSeries(seriesData)) { + var hasData = this.checkSeries(seriesData); + var view = graphView || this; + view.set('isExportButtonHidden', !hasData); + if (hasData) { // Check container exists (may be not, if we go to another page and wait while graphs loading) if (graph_container.length) { container = $(this.get('_containerSelector')); @@ -760,7 +770,7 @@ App.ChartLinearTimeView = Ember.View.extend(App.ExportMetricsMixin, { }); this.$().closest('.modal').on('click', function (event) { if (!($(event.target).is('.corner-icon, .icon-save, .export-graph-list-container, .export-graph-list-container *'))) { - popupBody.set('isMenuHidden', true); + popupBody.set('isExportMenuHidden', true); } }); $('#modal').addClass('modal-graph-line'); http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/app/views/common/export_metrics_menu_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/export_metrics_menu_view.js b/ambari-web/app/views/common/export_metrics_menu_view.js index 84a6e6d..dd5ab42 100644 --- a/ambari-web/app/views/common/export_metrics_menu_view.js +++ b/ambari-web/app/views/common/export_metrics_menu_view.js @@ -20,7 +20,7 @@ var App = require('app'); App.ExportMetricsMenuView = Em.View.extend({ - classNameBindings: ['parentView.isMenuHidden::open', ':export-graph-list-container'], + classNameBindings: ['parentView.isExportMenuHidden::open', ':export-graph-list-container'], templateName: require('templates/common/export_metrics_menu') http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/app/views/common/widget/graph_widget_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/widget/graph_widget_view.js b/ambari-web/app/views/common/widget/graph_widget_view.js index 9f550e9..fb8e754 100644 --- a/ambari-web/app/views/common/widget/graph_widget_view.js +++ b/ambari-web/app/views/common/widget/graph_widget_view.js @@ -281,16 +281,15 @@ App.GraphWidgetView = Em.View.extend(App.WidgetMixin, App.ExportMetricsMixin, { }, loadData: function () { - var self = this; - Em.run.next(function () { - self._refreshGraph(self.get('parentView.data')) + Em.run.next(this, function () { + this._refreshGraph(this.get('parentView.data'), this.get('parentView')); }); }, didInsertElement: function () { var self = this; this.$().closest('.graph-widget').on('mouseleave', function () { - self.set('parentView.isMenuHidden', true); + self.set('parentView.isExportMenuHidden', true); }); this.setYAxisFormatter(); this.loadData(); @@ -315,7 +314,14 @@ App.GraphWidgetView = Em.View.extend(App.WidgetMixin, App.ExportMetricsMixin, { fileType = isCSV ? 'csv' : 'json', fileName = 'data.' + fileType, metrics = this.get('content.metrics'), + hasData = Em.isArray(metrics) && metrics.some(function (item) { + return Em.isArray(item.data); + }); + if (hasData) { data = isCSV ? this.prepareCSV(metrics) : this.prepareJSON(metrics); - fileUtils.downloadTextFile(data, fileType, fileName); + fileUtils.downloadTextFile(data, fileType, fileName); + } else { + App.showAlertPopup(Em.I18n.t('graphs.noData.title'), Em.I18n.t('graphs.noData.tooltip.title')); + } } }); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/app/views/main/dashboard/widgets/cluster_metrics_widget.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/widgets/cluster_metrics_widget.js b/ambari-web/app/views/main/dashboard/widgets/cluster_metrics_widget.js index a3d7f84..a4dfd69 100644 --- a/ambari-web/app/views/main/dashboard/widgets/cluster_metrics_widget.js +++ b/ambari-web/app/views/main/dashboard/widgets/cluster_metrics_widget.js @@ -25,7 +25,7 @@ App.ClusterMetricsDashboardWidgetView = App.DashboardWidgetView.extend(App.Expor didInsertElement: function () { var self = this; this.$().on('mouseleave', function () { - self.set('isMenuHidden', true); + self.set('isExportMenuHidden', true); }); App.tooltip(this.$('.corner-icon > .icon-save'), { title: Em.I18n.t('common.export') http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/test/mixins/common/widgets/export_metrics_mixin_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/mixins/common/widgets/export_metrics_mixin_test.js b/ambari-web/test/mixins/common/widgets/export_metrics_mixin_test.js index 01928d8..d20b484 100644 --- a/ambari-web/test/mixins/common/widgets/export_metrics_mixin_test.js +++ b/ambari-web/test/mixins/common/widgets/export_metrics_mixin_test.js @@ -33,20 +33,20 @@ describe('App.ExportMetricsMixin', function () { var cases = [ { - isMenuHidden: true, + isExportMenuHidden: true, title: 'menu should be visible' }, { - isMenuHidden: false, + isExportMenuHidden: false, title: 'menu should be hidden' } ]; cases.forEach(function (item) { it(item.title, function () { - obj.set('isMenuHidden', !item.isMenuHidden); + obj.set('isExportMenuHidden', !item.isExportMenuHidden); obj.toggleFormatsList(); - expect(obj.get('isMenuHidden')).to.equal(item.isMenuHidden); + expect(obj.get('isExportMenuHidden')).to.equal(item.isExportMenuHidden); }); }); @@ -56,20 +56,20 @@ describe('App.ExportMetricsMixin', function () { var cases = [ { - isMenuHidden: true, + isExportMenuHidden: true, title: 'menu should remain hidden' }, { - isMenuHidden: false, + isExportMenuHidden: false, title: 'menu should become hidden' } ]; cases.forEach(function (item) { it(item.title, function () { - obj.set('isMenuHidden', item.isMenuHidden); + obj.set('isExportMenuHidden', item.isExportMenuHidden); obj.exportGraphData(); - expect(obj.get('isMenuHidden')).to.be.true; + expect(obj.get('isExportMenuHidden')).to.be.true; }); }); @@ -289,4 +289,31 @@ describe('App.ExportMetricsMixin', function () { }); + describe('#hideMenuForNoData', function () { + + var cases = [ + { + isExportButtonHidden: true, + isExportMenuHidden: true, + title: 'menu should be hidden' + }, + { + isExportButtonHidden: false, + isExportMenuHidden: false, + title: 'menu should be visible' + } + ]; + + cases.forEach(function (item) { + it(item.title, function () { + obj.setProperties({ + isExportButtonHidden: item.isExportButtonHidden, + isExportMenuHidden: false + }); + expect(obj.get('isExportMenuHidden')).to.equal(item.isExportMenuHidden); + }); + }); + + }); + }); http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/test/views/common/chart/linear_time_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/views/common/chart/linear_time_test.js b/ambari-web/test/views/common/chart/linear_time_test.js index 8ac7703..74ea89c 100644 --- a/ambari-web/test/views/common/chart/linear_time_test.js +++ b/ambari-web/test/views/common/chart/linear_time_test.js @@ -266,6 +266,26 @@ describe('App.ChartLinearTimeView', function () { }); + describe('#loadDataSuccessCallback', function () { + + beforeEach(function () { + sinon.stub(chartLinearTimeView, '_refreshGraph', Em.K); + }); + + afterEach(function () { + chartLinearTimeView._refreshGraph.restore(); + }); + + it('should refresh graph', function () { + var response = { + key: 'value' + }; + chartLinearTimeView.loadDataSuccessCallback(response); + expect(chartLinearTimeView._refreshGraph.calledOnce).to.be.true; + expect(chartLinearTimeView._refreshGraph.calledWith(response)).to.be.true; + }); + }); + });